/* ================================================================
   carecoordin8 – auth.css  (signup + login shared styles)
   ================================================================ */

/* ---- Auth body ---- */
.auth-page {
  min-height: 100vh;
  background: var(--clr-bg);
  display: flex;
  flex-direction: column;
}

/* ================================================================
   AUTH NAV
   ================================================================ */

.auth-nav {
  background: var(--clr-surface);
  border-bottom: 1px solid var(--clr-border);
  padding-block: var(--space-4);
}

.auth-nav__inner {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.auth-nav__divider {
  width: 1px;
  height: 22px;
  background: var(--clr-border);
}

.auth-nav__label {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--clr-text-muted);
}

.auth-nav__switch {
  margin-left: auto;
  font-size: var(--fs-sm);
  color: var(--clr-text-muted);
  transition: color var(--transition);
}

.auth-nav__switch strong {
  color: var(--clr-primary);
}

.auth-nav__switch:hover { color: var(--clr-primary); }


/* ================================================================
   AUTH LAYOUT
   ================================================================ */

.auth-main {
  flex: 1;
  display: flex;
  align-items: stretch;
}

.auth-layout {
  display: grid;
  grid-template-columns: 1fr 420px;
  width: 100%;
  min-height: calc(100vh - 65px);
}

/* ---- Form panel ---- */
.auth-form-panel {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: var(--space-12) var(--space-8);
  overflow-y: auto;
}

.auth-form-wrap {
  width: 100%;
  max-width: 520px;
}

.auth-header {
  margin-bottom: var(--space-6);
}

.auth-header h1 {
  font-size: var(--fs-3xl);
  font-weight: 800;
  color: var(--clr-text);
  line-height: 1.2;
  margin-bottom: var(--space-2);
}

.auth-header p {
  font-size: var(--fs-md);
  color: var(--clr-text-muted);
}

/* ---- Side panel ---- */
.auth-side-panel {
  background: linear-gradient(160deg, #0F3D35 0%, #1A7F6E 100%);
  color: #fff;
  display: flex;
  align-items: center;
  padding: var(--space-12) var(--space-10);
  position: sticky;
  top: 65px;
  height: calc(100vh - 65px);
  overflow: hidden;
}

.auth-side-panel__inner {
  width: 100%;
}

.side-panel-content { display: block; }
.side-panel-content--hidden { display: none; }

.side-panel-content h2 {
  font-size: var(--fs-2xl);
  font-weight: 800;
  line-height: 1.25;
  color: #fff;
  margin-block: var(--space-4) var(--space-4);
}

.side-panel-content > p {
  font-size: var(--fs-sm);
  color: rgba(255,255,255,0.75);
  line-height: 1.7;
  margin-bottom: var(--space-6);
}

.side-perks {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-8);
}

.side-perks li {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--fs-sm);
  color: rgba(255,255,255,0.88);
  font-weight: 500;
}

.side-perks li svg {
  flex-shrink: 0;
  color: #7DDFD3;
}

/* Testimonial on side */
.side-testimonial {
  background: rgba(255,255,255,0.1);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  border: 1px solid rgba(255,255,255,0.15);
}

.side-testimonial p {
  font-size: var(--fs-sm);
  color: rgba(255,255,255,0.9);
  font-style: italic;
  line-height: 1.65;
  margin-bottom: var(--space-4);
}

.side-testimonial__author {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.side-testimonial__author strong {
  display: block;
  font-size: var(--fs-sm);
  color: #fff;
}

.side-testimonial__author span {
  font-size: var(--fs-xs);
  color: rgba(255,255,255,0.6);
}

/* Stat grid on side */
.side-stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

.side-stat {
  background: rgba(255,255,255,0.1);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  border: 1px solid rgba(255,255,255,0.12);
}

.side-stat strong {
  display: block;
  font-size: var(--fs-xl);
  font-weight: 800;
  color: #fff;
  margin-bottom: 2px;
}

.side-stat span {
  font-size: var(--fs-xs);
  color: rgba(255,255,255,0.65);
}


/* ================================================================
   ROLE SELECTOR
   ================================================================ */

.role-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}

.role-btn {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-4);
  border-radius: var(--radius-md);
  border: 2px solid var(--clr-border);
  background: var(--clr-surface);
  text-align: left;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  cursor: pointer;
}

.role-btn:hover {
  border-color: var(--clr-primary-light);
  background: var(--clr-primary-subtle);
}

.role-btn--active {
  border-color: var(--clr-primary);
  background: var(--clr-primary-subtle);
  box-shadow: 0 0 0 3px rgba(26,127,110,0.12);
}

.role-btn__icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--clr-primary-xlight);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--clr-primary);
  flex-shrink: 0;
}

.role-btn__icon svg {
  width: 18px;
  height: 18px;
}

.role-btn__text {
  flex: 1;
}

.role-btn__text strong {
  display: block;
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--clr-text);
}

.role-btn__text small {
  font-size: var(--fs-xs);
  color: var(--clr-text-muted);
}

.role-btn__check {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--clr-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  flex-shrink: 0;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.role-btn--active .role-btn__check {
  background: var(--clr-primary);
  border-color: var(--clr-primary);
  color: #fff;
}


/* ================================================================
   SOCIAL BUTTON
   ================================================================ */

.social-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--clr-border);
  background: var(--clr-surface);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--clr-text);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
  margin-bottom: var(--space-5);
}

.social-btn:hover {
  background: var(--clr-bg);
  border-color: #aaa;
  box-shadow: var(--shadow-sm);
}


/* ================================================================
   DIVIDER
   ================================================================ */

.auth-divider {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--clr-text-light);
  font-size: var(--fs-xs);
  font-weight: 500;
  margin-bottom: var(--space-5);
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--clr-border);
}


/* ================================================================
   FORM FIELDS
   ================================================================ */

.auth-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.form-row--2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.form-group label {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--clr-text);
}

.label-optional {
  font-weight: 400;
  color: var(--clr-text-muted);
  font-size: var(--fs-xs);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group select {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1.5px solid var(--clr-border);
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  font-family: var(--font-base);
  color: var(--clr-text);
  background: var(--clr-surface);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form-group input:focus,
.form-group select:focus {
  border-color: var(--clr-primary);
  box-shadow: 0 0 0 3px rgba(26,127,110,0.12);
}

.form-group input.invalid,
.form-group select.invalid {
  border-color: #D94F4F;
  box-shadow: 0 0 0 3px rgba(217,79,79,0.1);
}

.form-group input.valid {
  border-color: #1A7F6E;
}

.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236B7E7B' stroke-width='2' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.form-hint {
  font-size: var(--fs-xs);
  color: var(--clr-text-muted);
  margin-top: -2px;
}

.field-error {
  font-size: var(--fs-xs);
  color: #D94F4F;
  font-weight: 500;
  min-height: 16px;
}


/* ================================================================
   PSW EXTRA FIELDS
   ================================================================ */

.psw-fields__divider {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--clr-primary);
  margin-bottom: var(--space-1);
}

.psw-fields__divider::before,
.psw-fields__divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--clr-primary-xlight);
}

/* Checkbox grid */
.checkbox-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2) var(--space-4);
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-sm);
  color: var(--clr-text-muted);
  cursor: pointer;
  user-select: none;
}

.checkbox-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--clr-primary);
  cursor: pointer;
  flex-shrink: 0;
}

.checkbox-item--block {
  grid-column: 1 / -1;
  align-items: flex-start;
  font-size: var(--fs-sm);
  color: var(--clr-text-muted);
  line-height: 1.5;
}

.checkbox-item a {
  color: var(--clr-primary);
  text-decoration: underline;
}

/* Input with prefix/suffix */
.input-prefix-wrap {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--clr-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--clr-surface);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.input-prefix-wrap:focus-within {
  border-color: var(--clr-primary);
  box-shadow: 0 0 0 3px rgba(26,127,110,0.12);
}

.input-prefix,
.input-suffix {
  padding: 0.7rem 0.75rem;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--clr-text-muted);
  background: var(--clr-bg);
  border: none;
  white-space: nowrap;
}

.input-prefix { border-right: 1px solid var(--clr-border); }
.input-suffix { border-left: 1px solid var(--clr-border); }

.input-prefix-wrap input {
  flex: 1;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding: 0.7rem 0.75rem;
}

.input-prefix-wrap input:focus {
  outline: none;
  border: none;
  box-shadow: none;
}

/* PSW fields container animation */
#psw-fields {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}


/* ================================================================
   PASSWORD FIELD
   ================================================================ */

.password-wrap {
  position: relative;
}

.password-wrap input {
  padding-right: 44px;
}

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--clr-text-muted);
  transition: color var(--transition);
  display: flex;
  align-items: center;
}

.password-toggle:hover { color: var(--clr-primary); }

.password-strength {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-2);
}

.strength-bars {
  display: flex;
  gap: 4px;
}

.strength-bar {
  display: block;
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: var(--clr-border);
  transition: background var(--transition);
}

.strength-label {
  font-size: var(--fs-xs);
  color: var(--clr-text-muted);
  font-weight: 500;
}

/* Strength levels */
.strength-1 .strength-bar:nth-child(1) { background: #D94F4F; }
.strength-2 .strength-bar:nth-child(-n+2) { background: #E6A817; }
.strength-3 .strength-bar:nth-child(-n+3) { background: #2AB5A0; }
.strength-4 .strength-bar { background: #1A7F6E; }


/* ================================================================
   SUBMIT BUTTON
   ================================================================ */

.submit-btn {
  margin-top: var(--space-2);
  font-size: var(--fs-md);
  justify-content: center;
  position: relative;
}

.submit-arrow {
  transition: transform var(--transition);
}

.submit-btn:hover .submit-arrow {
  transform: translateX(4px);
}

.submit-btn.loading {
  opacity: 0.75;
  pointer-events: none;
}

.auth-switch-text {
  text-align: center;
  font-size: var(--fs-sm);
  color: var(--clr-text-muted);
}

.auth-switch-text a {
  color: var(--clr-primary);
  font-weight: 600;
}

.auth-switch-text a:hover { text-decoration: underline; }


/* ================================================================
   LOGIN-SPECIFIC (reused via auth.css)
   ================================================================ */

/* Label row — puts label and forgot-password link side by side */
.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.forgot-link {
  font-size: var(--fs-xs);
  color: var(--clr-primary);
  font-weight: 600;
}

.forgot-link:hover { text-decoration: underline; }

/* Error banner */
.auth-error-banner[hidden] { display: none !important; }

.auth-error-banner {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: #FEF2F2;
  border: 1px solid #FCCACA;
  border-radius: var(--radius-sm);
  color: #B91C1C;
  font-size: var(--fs-sm);
  font-weight: 500;
  margin-bottom: var(--space-2);
}

.auth-error-banner svg {
  flex-shrink: 0;
}

/* Centered layout variant for login (form takes full width, side panel is secondary) */
.auth-layout--centered {
  grid-template-columns: 1fr 380px;
}


/* ================================================================
   RESPONSIVE
   ================================================================ */

@media (max-width: 1024px) {
  .auth-layout {
    grid-template-columns: 1fr;
  }

  .auth-side-panel {
    display: none;
  }
}

@media (max-width: 600px) {
  .auth-form-panel {
    padding: var(--space-8) var(--space-5);
  }

  .form-row--2 {
    grid-template-columns: 1fr;
  }

  .role-selector {
    grid-template-columns: 1fr;
  }

  .checkbox-grid {
    grid-template-columns: 1fr;
  }

  .auth-header h1 {
    font-size: var(--fs-2xl);
  }
}
