/* ====================================================================
   LOGIN-MODERN.CSS — doclic Premium Login v3
   Left: emerald brand panel · Right: clean white form
   ==================================================================== */

/* ── 1. Reset & Base ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  /* Brand palette (mirrors global.css) */
  --g: #00704A;
  --g-dark: #00583A;
  --g-mid: #0D8A62;
  --g-soft: rgba(0, 112, 74, 0.10);
  --g-glow: rgba(0, 112, 74, 0.28);
  --ink: #153128;
  --muted: #66786F;
  --border: rgba(0, 112, 74, 0.16);
  --white: #ffffff;

  /* Form side */
  --f-border: rgba(0, 112, 74, 0.18);
  --f-focus: rgba(0, 112, 74, 0.12);
  --f-label: #31453D;

  /* Transitions */
  --ease: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth: cubic-bezier(0.25, 0.8, 0.25, 1);
}

html { height: 100%; }

body {
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  height: 100%;
  background: #fff;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ── 2. Layout ── */
.login-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}

/* ====================================================================
   3. LEFT — Brand panel
   ==================================================================== */
.login-left {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4rem 4.5rem;
  overflow: hidden;
  /* Emerald gradient */
  background: linear-gradient(145deg, #005c3c 0%, #00704A 45%, #0D8A62 100%);
}

/* Grid overlay */
.login-left::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}

/* Animated glow orbs */
.animated-background { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }

.shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  animation: drift 22s ease-in-out infinite alternate;
}
.shape-1 { width: 640px; height: 640px; background: rgba(255,255,255,0.06); top: -260px; left: -200px; }
.shape-2 { width: 540px; height: 540px; background: rgba(255,255,255,0.04); bottom: -220px; right: -150px; animation-delay: -7s; }
.shape-3 { width: 380px; height: 380px; background: rgba(255,255,255,0.05); top: 38%; left: 42%; animation-delay: -14s; }

@keyframes drift {
  0%   { transform: translate(0,0) scale(1); }
  50%  { transform: translate(50px, -60px) scale(1.12); }
  100% { transform: translate(-40px, 40px) scale(0.88); }
}

/* Back link */
.back-home {
  position: absolute;
  top: 2rem; left: 2rem;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 7px 14px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.25s var(--ease-smooth);
  z-index: 20;
}
.back-home:hover {
  background: rgba(255,255,255,0.22);
  color: #fff;
  transform: translateX(-4px);
}

/* Brand content */
.branding-content {
  position: relative;
  z-index: 10;
  color: #fff;
  max-width: 460px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 1.75rem;
}
.logo-img {
  height: 42px;
  width: auto;
  object-fit: contain;
  filter: brightness(0) invert(1) drop-shadow(0 4px 12px rgba(0,0,0,0.2));
}
.logo-text {
  font-size: 2.1rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: #ffffff;
}
.logo-text span { color: rgba(255,255,255,0.55); }

.tagline {
  font-size: 1.1rem;
  font-weight: 400;
  color: rgba(255,255,255,0.72);
  line-height: 1.65;
  margin-bottom: 2.25rem;
  max-width: 380px;
}

.features {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
  margin-bottom: 2.75rem;
}
.feature-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(255,255,255,0.88);
}
.feature-item i {
  color: #6ee7b7;
  font-size: 1rem;
  flex-shrink: 0;
}

/* ── Dashboard mockup ── */
.branding-visual {
  position: relative;
  width: 100%;
  height: 210px;
}

.mockup-card {
  position: absolute;
  background: rgba(255,255,255,0.92);
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.5);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow:
    0 20px 60px rgba(0,0,0,0.22),
    0 8px 20px rgba(0,0,0,0.12),
    inset 0 1px 0 rgba(255,255,255,0.6);
  animation: cardFloat 6s ease-in-out infinite;
}
@keyframes cardFloat {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}

/* Main chart card */
.card-main {
  top: 0; left: 0;
  width: 240px;
  padding: 1.1rem 1.15rem;
  z-index: 2;
  animation-duration: 7s;
}
.mockup-traffic {
  font-size: 0.67rem;
  font-weight: 600;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.6rem;
  opacity: 0.7;
}
.mockup-chart {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 55px;
}
.mockup-bar {
  flex: 1;
  border-radius: 4px 4px 2px 2px;
  background: rgba(0,112,74,0.1);
  transition: all 0.4s var(--ease);
}
.mockup-bar.hi {
  background: linear-gradient(180deg, var(--g) 0%, var(--g-mid) 100%);
  box-shadow: 0 4px 12px rgba(0,112,74,0.3);
}

/* Stat badge */
.card-badge {
  top: -12px;
  left: 205px;
  padding: 0.8rem 1rem;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 4;
  animation-duration: 5s;
  animation-delay: -2s;
  white-space: nowrap;
}
.icon-badge {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--g) 0%, var(--g-mid) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.85rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0,112,74,0.35);
}
.badge-text { display: flex; flex-direction: column; }
.badge-num  { font-size: 1rem; font-weight: 600; color: var(--ink); line-height: 1.1; }
.badge-lbl  { font-size: 0.67rem; font-weight: 600; color: var(--muted); }

/* Appointment card */
.card-appt {
  top: 105px;
  left: 105px;
  width: 240px;
  padding: 0.9rem 1rem;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 3;
  border-left: 4px solid var(--g);
  animation-duration: 8s;
  animation-delay: -4s;
}
.appt-date {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--g);
  line-height: 1;
  flex-shrink: 0;
}
.appt-info { display: flex; flex-direction: column; gap: 2px; }
.appt-title { font-size: 0.78rem; font-weight: 600; color: var(--ink); }
.appt-time  { font-size: 0.68rem; font-weight: 600; color: var(--muted); }

/* ====================================================================
   4. RIGHT — Form panel
   ==================================================================== */
.login-right {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 3.5rem;
  background: #ffffff;
}

.form-container {
  width: 100%;
  max-width: 400px;
  animation: slideUp 0.7s var(--ease-smooth) both;
  animation-delay: 0.15s;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Header */
.form-header { margin-bottom: 2.25rem; }
.form-header h2 {
  font-size: 2.4rem;
  font-weight: 600;
  letter-spacing: -0.04em;
  color: var(--ink);
  margin-bottom: 0.45rem;
}
.form-header p {
  font-size: 0.95rem;
  color: var(--muted);
  font-weight: 500;
}

/* ── Alerts ── */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 0.9rem 1.1rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.45;
}
.alert-success { background: #DFF4EC; color: #0D7D5C; border: 1px solid rgba(13,125,92,0.2); }
.alert-error,
.alert-danger   { background: #FFF0EE; color: #B42318; border: 1px solid rgba(180,35,24,0.18); }
.alert-warning  { background: #FFF8EC; color: #C9892B; border: 1px solid rgba(201,137,43,0.2); }
.alert i { margin-top: 2px; }

/* ── Form ── */
.login-form { display: flex; flex-direction: column; gap: 1.25rem; }

.form-group { display: flex; flex-direction: column; gap: 6px; }

.form-group label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--f-label);
  letter-spacing: 0.02em;
}
.form-group label i { font-size: 0.8rem; color: var(--g); }

.form-group input {
  width: 100%;
  padding: 0.85rem 1.1rem;
  font-size: 0.93rem;
  font-family: inherit;
  font-weight: 500;
  color: var(--ink);
  background: #f8fbf9;
  border: 1.5px solid var(--f-border);
  border-radius: 12px;
  outline: none;
  transition: all 0.22s var(--ease-smooth);
}
.form-group input:hover { border-color: rgba(0,112,74,0.35); background: #fff; }
.form-group input:focus {
  border-color: var(--g);
  background: #fff;
  box-shadow: 0 0 0 4px var(--f-focus);
}
.form-group input::placeholder { color: #9caa9f; font-weight: 400; }

/* Password toggle */
.password-input { position: relative; }
.password-input input { padding-right: 3rem; }
.toggle-password {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
  font-size: 1rem;
}
.toggle-password:hover { color: var(--g); }

/* Options row */
.form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: -0.1rem;
  margin-bottom: 0.4rem;
}
.remember-me {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.84rem;
  color: var(--muted);
  font-weight: 600;
}
.remember-me input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--g);
  cursor: pointer;
}
.forgot-password {
  font-size: 0.84rem;
  color: var(--g);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}
.forgot-password:hover { color: var(--g-dark); text-decoration: underline; }

/* Submit button */
.btn-login {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, var(--g) 0%, var(--g-mid) 100%);
  color: #fff;
  border: none;
  border-radius: 999px;
  font-size: 0.97rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0,112,74,0.3);
  transition: all 0.28s var(--ease);
  position: relative;
  overflow: hidden;
}
.btn-login::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.12) 0%, transparent 100%);
  opacity: 0;
  transition: opacity 0.2s;
}
.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0,112,74,0.38);
}
.btn-login:hover::after { opacity: 1; }
.btn-login:active { transform: translateY(0); box-shadow: 0 4px 12px rgba(0,112,74,0.22); }
.btn-login i { transition: transform 0.25s var(--ease); }
.btn-login:hover i { transform: translateX(5px); }

/* Biometric divider */
.biometric-login-divider {
  text-align: center;
  position: relative;
  margin: 1.25rem 0 1rem;
}
.biometric-login-divider hr {
  position: absolute;
  inset: 50% 0 auto;
  border: none;
  border-top: 1.5px solid var(--f-border);
  margin: 0;
}
.biometric-login-divider span {
  position: relative;
  z-index: 1;
  background: #fff;
  padding: 0 12px;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.06em;
}

/* Biometric button */
.btn-biometric-login {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  padding: 0.88rem 1.25rem;
  border: 1.5px dashed var(--g);
  border-radius: 999px;
  background: #f0f9f5;
  color: var(--g);
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.25s var(--ease-smooth);
}
.btn-biometric-login:hover {
  background: var(--g);
  color: #fff;
  border-style: solid;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,112,74,0.28);
}
.btn-biometric-login:disabled { opacity: 0.55; cursor: not-allowed; transform: none !important; }

/* Footer */
.form-footer {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(0,112,74,0.1);
  text-align: center;
}
.form-footer p { font-size: 0.87rem; color: var(--muted); font-weight: 500; }
.form-footer a { color: var(--g); font-weight: 600; text-decoration: none; }
.form-footer a:hover { color: var(--g-dark); text-decoration: underline; }

/* ====================================================================
   5. Responsive
   ==================================================================== */
@media (max-width: 1024px) {
  .login-container { grid-template-columns: 1fr; }
  .login-left { display: none; }
  .login-right { padding: 3rem 2.5rem; }
}
@media (max-width: 520px) {
  .login-right { padding: 2rem 1.5rem; }
  .form-container { max-width: 100%; }
  .form-header h2 { font-size: 1.9rem; }
}