/* ═══════════════════════════════════════════════════════════════
   authentication/css/login_v2.css
   Patient booking login — warm modern healthcare aesthetic
   Fonts: Sora (body/UI) + Lora (display headings)
   ═══════════════════════════════════════════════════════════════ */

/* ── Design Tokens ──────────────────────────────────────────── */
:root {
  --c-teal:          #0d7a6e;
  --c-teal-dark:     #095f55;
  --c-teal-mid:      #128075;
  --c-teal-light:    #e6f5f3;
  --c-teal-xlight:   #f0faf9;
  --c-amber:         #f5a623;
  --c-amber-light:   #fff8ec;

  --c-white:         #ffffff;
  --c-bg:            #f0f5f4;
  --c-text:          #18211f;
  --c-text-sub:      #4a5e5a;
  --c-text-muted:    #8a9e9a;
  --c-border:        #d6e4e2;
  --c-border-focus:  #0d7a6e;
  --c-input-bg:      #f4faf9;
  --c-error:         #c0392b;
  --c-error-bg:      #fdf3f2;

  --r-card:          20px;
  --r-input:         11px;
  --r-btn:           12px;
  --shadow-card:     0 12px 60px rgba(13, 122, 110, 0.10), 0 2px 8px rgba(0,0,0,0.04);
  --shadow-btn:      0 4px 22px rgba(13, 122, 110, 0.38);
  --shadow-emr:      0 4px 20px rgba(13, 122, 110, 0.18);
  --transition:      0.22s cubic-bezier(0.4, 0, 0.2, 1);

  --font-display:    'Lora', Georgia, serif;
  --font-body:       'Sora', -apple-system, sans-serif;
}

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

html { height: 100%; }

body.patient-login-page {
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--c-text);
  background: var(--c-bg);
  position: relative;
  overflow-x: hidden;
}

/* ── Decorative background blobs ────────────────────────────── */
.bg-blob {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.45;
}

.bg-blob-1 {
  width: 560px;
  height: 560px;
  background: radial-gradient(circle, rgba(13,122,110,0.18) 0%, transparent 70%);
  top: -140px;
  right: -120px;
}

.bg-blob-2 {
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(245,166,35,0.12) 0%, transparent 70%);
  bottom: -80px;
  left: -80px;
}

/* ── Page wrapper ───────────────────────────────────────────── */
.pl-wrapper {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px 20px;
  gap: 24px;
}

/* ── Header / Logo ──────────────────────────────────────────── */
.pl-header {
  width: 100%;
  max-width: 860px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pl-logo {
  height: 80px;
  width: auto;
  object-fit: contain;
  opacity: 0;
  animation: fadeDown 0.6s 0.1s forwards;
}

/* ── Main card ──────────────────────────────────────────────── */
.pl-card {
  width: 100%;
  max-width: 860px;
  background: var(--c-white);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(13, 122, 110, 0.07);
  display: flex;
  align-items: stretch;
  overflow: hidden;
  opacity: 0;
  animation: fadeUp 0.65s 0.2s forwards;
}

/* ── Vertical divider ───────────────────────────────────────── */
.pl-divider {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 0;
  flex-shrink: 0;
}

.pl-divider-line {
  flex: 1;
  width: 1px;
  background: var(--c-border);
  max-height: 80px;
}

.pl-divider-text {
  padding: 10px 0;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--c-text-muted);
  writing-mode: vertical-lr;
  text-orientation: mixed;
}

/* ══════════════════════════════════════════════════════════════
   LEFT PANEL — Booking form
   ══════════════════════════════════════════════════════════════ */
.pl-side-form {
  flex: 1;
  padding: 44px 44px 44px 48px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Form header */
.plf-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
}

.plf-icon-wrap {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: var(--c-teal-light);
  color: var(--c-teal);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.plf-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  color: var(--c-text);
  line-height: 1.2;
  letter-spacing: -0.2px;
}

.plf-subtitle {
  font-size: 12px;
  font-weight: 500;
  color: var(--c-teal);
  margin-top: 3px;
  letter-spacing: 0.2px;
}

.plf-desc {
  font-size: 13.5px;
  color: var(--c-text-sub);
  line-height: 1.6;
  margin-bottom: 28px;
}

/* Alert */
.pl-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 18px;
  animation: shake 0.4s ease;
}

.pl-alert-error {
  background: var(--c-error-bg);
  color: var(--c-error);
  border: 1px solid rgba(192,57,43,0.15);
}

.pl-alert i { margin-top: 1px; flex-shrink: 0; }

/* Form */
.plf-form { display: flex; flex-direction: column; gap: 20px; }

/* Fields */
.plf-field { display: flex; flex-direction: column; gap: 0; }

.plf-label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text);
  margin-bottom: 7px;
  letter-spacing: 0.1px;
}

.plf-required { color: var(--c-teal); font-size: 15px; line-height: 1; }

/* Input wrapper */
.plf-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.plf-input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--c-text-muted);
  font-size: 15px;
  pointer-events: none;
  transition: color var(--transition);
  z-index: 1;
}

.plf-input-wrap:focus-within .plf-input-icon { color: var(--c-teal); }

/* Django input override */
.plf-input-wrap input[type="text"],
.plf-input-wrap input[type="password"],
.plf-input-wrap input[type="email"],
.plf-input-wrap input[type="number"] {
  width: 100%;
  height: 50px;
  padding: 0 48px 0 44px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  color: var(--c-text);
  background: var(--c-input-bg);
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-input);
  outline: none;
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
  -webkit-appearance: none;
  letter-spacing: 0.2px;
}

.plf-input-wrap input::placeholder { color: var(--c-text-muted); font-weight: 300; }

.plf-input-wrap input:focus {
  border-color: var(--c-border-focus);
  background: var(--c-white);
  box-shadow: 0 0 0 3.5px rgba(13,122,110,0.12);
}

.plf-field-error .plf-input-wrap input {
  border-color: var(--c-error);
  background: var(--c-error-bg);
}

.plf-field-error .plf-input-wrap input:focus {
  box-shadow: 0 0 0 3.5px rgba(192,57,43,0.12);
}

/* Toggle button */
.plf-toggle-btn {
  position: absolute;
  right: 2px;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-text-muted);
  font-size: 15px;
  border-radius: 0 var(--r-input) var(--r-input) 0;
  transition: color var(--transition), background var(--transition);
}

.plf-toggle-btn:hover  { color: var(--c-teal); background: rgba(13,122,110,0.06); }
.plf-toggle-btn:focus  { outline: none; color: var(--c-teal); }
.plf-toggle-btn.active { color: var(--c-teal); }

/* Hint */
.plf-hint {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin-top: 7px;
  font-size: 12px;
  color: var(--c-text-muted);
  line-height: 1.5;
}

.plf-hint i { color: var(--c-teal-mid); flex-shrink: 0; font-size: 11px; margin-top: 2px; }
.plf-hint strong { color: var(--c-text-sub); font-weight: 600; }

/* Error message */
.plf-error-msg {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 7px;
  font-size: 12px;
  color: var(--c-error);
  font-weight: 500;
}

/* Submit button */
.plf-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 52px;
  margin-top: 4px;
  padding: 0 28px;
  font-family: var(--font-body);
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.2px;
  color: #fff;
  background: var(--c-teal);
  border: none;
  border-radius: var(--r-btn);
  cursor: pointer;
  box-shadow: var(--shadow-btn);
  position: relative;
  overflow: hidden;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}

.plf-submit::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.10), transparent);
  transform: translateX(-100%);
  transition: transform 0.55s ease;
}

.plf-submit:hover {
  background: var(--c-teal-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 28px rgba(13,122,110,0.45);
}

.plf-submit:hover::before { transform: translateX(100%); }
.plf-submit:active { transform: translateY(0); }
.plf-submit:disabled { opacity: 0.72; cursor: not-allowed; transform: none; }

.plf-submit-text {
  display: flex;
  align-items: center;
  gap: 9px;
}

.plf-submit-loading {
  display: flex;
  align-items: center;
  gap: 9px;
}

/* ══════════════════════════════════════════════════════════════
   RIGHT PANEL — EMR link
   ══════════════════════════════════════════════════════════════ */
.pl-side-emr {
  flex: 0 0 310px;
  background: linear-gradient(160deg, var(--c-teal-xlight) 0%, #e8f8f5 100%);
  border-left: 1px solid rgba(13,122,110,0.10);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 44px 36px;
}

.emr-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  width: 100%;
}

/* EMR icon */
.emr-icon-wrap {
  position: relative;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.emr-icon-wrap > i {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--c-teal);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  position: relative;
  z-index: 1;
  box-shadow: 0 4px 18px rgba(13,122,110,0.30);
}

.emr-icon-pulse {
  position: absolute;
  inset: -6px;
  border-radius: 20px;
  border: 2px solid rgba(13,122,110,0.20);
  animation: pulse 2.4s ease-in-out infinite;
}

/* EMR text */
.emr-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--c-text);
  line-height: 1.25;
}

.emr-desc {
  font-size: 13px;
  color: var(--c-text-sub);
  line-height: 1.65;
}

/* Feature list */
.emr-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
  width: 100%;
}

.emr-features li {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--c-text-sub);
}

.emr-features i {
  color: var(--c-teal);
  font-size: 13px;
  flex-shrink: 0;
}

/* EMR button */
.emr-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  height: 48px;
  padding: 0 20px;
  margin: 0 auto;
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--c-teal);
  background: var(--c-white);
  border: 1.5px solid var(--c-teal);
  border-radius: 11px;
  cursor: pointer;
  box-shadow: var(--shadow-emr);
  transition: background var(--transition), color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.emr-btn i {
  font-size: 14px;
  transition: transform var(--transition);
  flex-shrink: 0;
}

.emr-btn:hover {
  background: var(--c-teal);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(13,122,110,0.35);
}

.emr-btn:hover i { transform: translateX(4px); }
.emr-btn:active   { transform: translateY(0); }

/* Note */
.emr-note {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--c-text-muted);
}

.emr-note i { color: var(--c-teal-mid); font-size: 11px; }

/* ── Footer ─────────────────────────────────────────────────── */
.pl-footer {
  width: 100%;
  max-width: 860px;
}

/* ── Animations ─────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-6px); }
  40%       { transform: translateX(6px); }
  60%       { transform: translateX(-4px); }
  80%       { transform: translateX(4px); }
}

@keyframes pulse {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50%       { opacity: 0.15; transform: scale(1.08); }
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 820px) {
  .pl-card {
    flex-direction: column;
    max-width: 480px;
  }

  .pl-divider {
    flex-direction: row;
    padding: 0 40px;
  }

  .pl-divider-line {
    flex: 1;
    width: auto;
    height: 1px;
    max-height: none;
  }

  .pl-divider-text {
    padding: 0 12px;
    writing-mode: horizontal-tb;
  }

  .pl-side-form { padding: 36px 32px 28px; }

  .pl-side-emr {
    flex: none;
    border-left: none;
    border-top: 1px solid rgba(13,122,110,0.10);
    padding: 32px 32px 36px;
  }

  .emr-inner { gap: 14px; }
}

@media (max-width: 520px) {
  .pl-wrapper  { padding: 20px 16px; gap: 18px; }
  .pl-logo     { height: 38px; }

  .pl-side-form { padding: 28px 24px 24px; }
  .pl-side-emr  { padding: 24px; }

  .plf-title   { font-size: 22px; }
  .emr-title   { font-size: 19px; }
  .plf-submit  { font-size: 13.5px; height: 48px; }
}
/**** FOOTER ****/
/* Footer luôn nằm dưới cùng */
.site-footer {
  flex-shrink: 0;
  background: linear-gradient(120deg, #f5faff 75%, #e5f4fa 100%);
  border-top: 1.5px solid #E8F3FF;
  border-radius: 18px 18px 0 0;
  box-shadow: 0 0 18px 0 rgba(30, 132, 200, 0.07);
  padding: 24px 18px 20px 18px;
  font-size: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  max-width: 90%;
  margin: 0 auto;
  flex-wrap: wrap;
}

.footer-left {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    max-width: 68%;
    min-width: 200px;
}
.footer-logo {
    max-width: 150px;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 2px 8px 0 rgba(100,130,170,0.07);
}

.footer-info {
    line-height: 1.52;
    color: #23405a;
    font-size: 1rem;
}
.footer-title {
    font-weight: bold;
    font-size: 1.4em;
}
.footer-subname {
    font-size: 1em;
    color: #1954a1;
    font-weight: 500;
    margin-bottom: 20px;
    letter-spacing: 0.04em;
    opacity: 0.85;
}

.text-orange { color: #f37021; font-weight: bold; }
.footer-info a { color: #2471c8; text-decoration: none; }
.footer-info a:hover { text-decoration: underline; }

.footer-right {
    display: flex;
    gap: 30px;
    justify-content: flex-end;
    align-items: flex-start;
    min-width: 140px;
}

.qr-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 80px;
}
.footer-qr {
    width: 82px;
    height: 82px;
    border-radius: 10px;
    background: #fafafa;
    border: 1.5px solid #eef2f7;
    object-fit: contain;
    margin-bottom: 7px;
    box-shadow: 0 2px 8px 0 rgba(0,70,180,0.05);
}
.qr-caption {
    font-size: 1.01em;
    font-weight: 600;
    letter-spacing: 0.03em;
    margin-top: 1px;
}
.website-caption { color: #1166cc; }
.zalo-caption { color: #008ae6; }

/* Mobile responsive */
@media (max-width: 768px) {
    .site-footer {
        flex-direction: column;
        align-items: stretch;
        max-width: 98vw;
        padding: 16px 3vw 7px 3vw;
        border-radius: 13px 13px 0 0;
        gap: 12px;
    }
    .footer-left, .footer-right {
        max-width: 100%;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 8px;
    }
    .footer-logo { max-width: 150px; height: auto;}
    .footer-info { font-size: 14px;}
    .footer-right {
        margin-top: 10px;
        gap: 24px;
        flex-direction: row;
        justify-content: center;
    }
    .footer-qr { width: 62px; height: 62px;}
}


/* Mobile responsive */
@media (max-width: 768px) {
    .site-footer {
        flex-direction: column;
        align-items: stretch;
        max-width: 98vw;
        padding: 16px 3vw 7px 3vw;
        border-radius: 13px 13px 0 0;
        gap: 12px;
    }
    .footer-left, .footer-right {
        max-width: 100%;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 8px;
    }
    .footer-logo { max-width: 150px; height: auto;}
    .footer-info { font-size: 0.98em; text-align: center; }
    .footer-right {
        margin-top: 10px;
        gap: 24px;
        flex-direction: row;
        justify-content: center;
    }
    .footer-qr { width: 62px; height: 62px;}
}

/* ---------------------------------------------- */