/*
 * Ped360 v3 — Design System
 * Aesthetic: Precision Clinical — deep navy + sky accent, warm whites
 * Font: Figtree (Google Fonts)
 * ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Figtree:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

/* ── 1. TOKENS ─────────────────────────────────────────────────── */
:root {
  /* Cores principais */
  --navy:          #0c1445;
  --navy-800:      #152060;
  --navy-700:      #1e2f7a;
  --blue:          #1d4ed8;
  --blue-500:      #3b82f6;
  --blue-400:      #60a5fa;
  --sky:           #0ea5e9;
  --sky-light:     #e0f2fe;

  /* Semânticas */
  --ok:            #10b981;
  --ok-bg:         #ecfdf5;
  --warn:          #f59e0b;
  --warn-bg:       #fffbeb;
  --err:           #ef4444;
  --err-bg:        #fef2f2;
  --info:          #6366f1;
  --info-bg:       #eef2ff;

  /* Neutros */
  --bg:            #f8fafc;
  --surface:       #ffffff;
  --surface-2:     #f1f5f9;
  --border:        #e2e8f0;
  --border-2:      #cbd5e1;

  /* Texto */
  --txt:           #0f172a;
  --txt-2:         #334155;
  --txt-3:         #64748b;
  --txt-4:         #94a3b8;
  --txt-inv:       #ffffff;

  /* Tipografia */
  --font:          'Figtree', system-ui, sans-serif;
  --sz-xs:         .75rem;
  --sz-sm:         .875rem;
  --sz-base:       1rem;
  --sz-lg:         1.125rem;
  --sz-xl:         1.25rem;
  --sz-2xl:        1.5rem;
  --sz-3xl:        1.875rem;
  --sz-4xl:        2.25rem;
  --fw-reg:        400;
  --fw-med:        500;
  --fw-semi:       600;
  --fw-bold:       700;
  --fw-xbold:      800;

  /* Espaço */
  --s1:  .25rem;  --s2:  .5rem;   --s3:  .75rem;
  --s4:  1rem;    --s5:  1.25rem; --s6:  1.5rem;
  --s8:  2rem;    --s10: 2.5rem;  --s12: 3rem;
  --s16: 4rem;

  /* Bordas */
  --r-sm: .375rem; --r:    .5rem;
  --r-lg: .75rem;  --r-xl: 1rem;
  --r-2xl:1.25rem; --r-full:9999px;

  /* Sombras */
  --sh-xs: 0 1px 2px 0 rgb(0 0 0/.05);
  --sh-sm: 0 1px 3px 0 rgb(0 0 0/.10),0 1px 2px -1px rgb(0 0 0/.10);
  --sh:    0 4px 6px -1px rgb(0 0 0/.10),0 2px 4px -2px rgb(0 0 0/.10);
  --sh-md: 0 10px 15px -3px rgb(0 0 0/.10),0 4px 6px -4px rgb(0 0 0/.10);
  --sh-lg: 0 20px 25px -5px rgb(0 0 0/.10),0 8px 10px -6px rgb(0 0 0/.10);
  --sh-navy: 0 8px 32px rgb(12 20 69/.28);

  /* Layout */
  --nav-h:    64px;
  --max-w:    1180px;

  /* Transição */
  --t:    150ms ease;
  --t-md: 250ms ease;
  --t-lg: 350ms ease;
}

/* Dark mode */
[data-tema="escuro"] {
  --bg:       #0b1120;
  --surface:  #131e30;
  --surface-2:#1a2740;
  --border:   #1e3050;
  --border-2: #2a4060;
  --txt:      #f0f6ff;
  --txt-2:    #c8d8f0;
  --txt-3:    #7a9ec8;
  --txt-4:    #4a6a88;
  --sky-light:#0a2540;
  --ok-bg:    #032215;
  --warn-bg:  #1f1500;
  --err-bg:   #1f0505;
  --info-bg:  #130f30;
}

/* ── 2. RESET & BASE ────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  font-size: var(--sz-base);
  color: var(--txt);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,h2,h3,h4,h5,h6 { line-height: 1.25; font-weight: var(--fw-bold); }
a  { color: var(--blue); text-decoration: none; transition: color var(--t); }
a:hover { color: var(--navy-700); }
img,svg { display: block; max-width: 100%; }
button  { cursor: pointer; font-family: var(--font); }
input,select,textarea { font-family: var(--font); }

/* ── 3. LAYOUT ──────────────────────────────────────────────────── */
.app { min-height: 100vh; display: flex; flex-direction: column; }
.main { flex: 1; padding-top: var(--nav-h); }

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--s6);
}

.page { padding: var(--s8) 0 var(--s16); }

/* ── 4. NAV ─────────────────────────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  z-index: 200;
  box-shadow: var(--sh-xs);
}

.nav-inner {
  display: flex; align-items: center;
  height: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--s6);
  gap: var(--s4);
}

.nav-logo {
  display: flex; align-items: center; gap: var(--s3);
  text-decoration: none;
  flex-shrink: 0;
}
.nav-logo-mark {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, var(--navy), var(--blue));
  border-radius: var(--r-lg);
  display: flex; align-items: center; justify-content: center;
}
.nav-logo-mark svg { width: 18px; height: 18px; color: #fff; }
.nav-logo-text {
  font-size: var(--sz-xl);
  font-weight: var(--fw-xbold);
  color: var(--navy);
  letter-spacing: -.5px;
}
[data-tema="escuro"] .nav-logo-text { color: var(--txt); }

.nav-links {
  display: flex; align-items: center;
  gap: var(--s1); margin-left: var(--s8); flex: 1;
}

.nav-link {
  display: flex; align-items: center; gap: var(--s2);
  padding: var(--s2) var(--s3);
  border-radius: var(--r);
  font-size: var(--sz-sm);
  font-weight: var(--fw-med);
  color: var(--txt-3);
  text-decoration: none;
  transition: background var(--t), color var(--t);
  white-space: nowrap;
}
.nav-link:hover { background: var(--surface-2); color: var(--txt); }
.nav-link.active {
  background: var(--sky-light);
  color: var(--blue);
  font-weight: var(--fw-semi);
}
.nav-link svg { width: 16px; height: 16px; flex-shrink: 0; }

.nav-right {
  display: flex; align-items: center;
  gap: var(--s2); margin-left: auto;
}

/* Botão ícone */
.icon-btn {
  position: relative;
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border: none; background: transparent;
  border-radius: var(--r);
  color: var(--txt-3);
  transition: background var(--t), color var(--t);
}
.icon-btn:hover { background: var(--surface-2); color: var(--txt); }
.icon-btn svg { width: 20px; height: 20px; }

.notif-dot {
  position: absolute; top: 6px; right: 6px;
  width: 8px; height: 8px;
  background: var(--err);
  border-radius: 50%;
  border: 2px solid var(--surface);
}

/* Avatar + dropdown */
.avatar-btn {
  display: flex; align-items: center; gap: var(--s2);
  padding: var(--s1) var(--s2) var(--s1) var(--s1);
  border: none; background: transparent;
  border-radius: var(--r-full);
  cursor: pointer;
  transition: background var(--t);
}
.avatar-btn:hover { background: var(--surface-2); }

.avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
}
.avatar-name {
  font-size: var(--sz-sm);
  font-weight: var(--fw-med);
  color: var(--txt-2);
  max-width: 100px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.avatar-chevron { width: 14px; height: 14px; color: var(--txt-4); }

.dropdown {
  position: absolute;
  top: calc(100% + var(--s2));
  right: 0;
  min-width: 210px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-lg);
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px) scale(.98);
  transition: opacity var(--t-md), transform var(--t-md);
  z-index: 300;
}
.dropdown.open {
  opacity: 1; pointer-events: auto;
  transform: translateY(0) scale(1);
}
.dropdown-user {
  padding: var(--s3) var(--s4);
  border-bottom: 1px solid var(--border);
}
.dropdown-user-name {
  font-size: var(--sz-sm); font-weight: var(--fw-semi); color: var(--txt);
}
.dropdown-user-email {
  font-size: var(--sz-xs); color: var(--txt-4);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dropdown-item {
  display: flex; align-items: center; gap: var(--s3);
  padding: var(--s3) var(--s4);
  font-size: var(--sz-sm); color: var(--txt-2);
  background: transparent; border: none;
  width: 100%; text-align: left;
  cursor: pointer; text-decoration: none;
  transition: background var(--t);
}
.dropdown-item:hover { background: var(--surface-2); }
.dropdown-item svg { width: 16px; height: 16px; color: var(--txt-4); flex-shrink: 0; }
.dropdown-item.danger { color: var(--err); }
.dropdown-item.danger svg { color: var(--err); }
.dropdown-sep {
  border: none; border-top: 1px solid var(--border);
  margin: var(--s1) 0;
}

/* Nav mobile */
.nav-burger { display: none; }
.nav-mobile {
  display: none;
  flex-direction: row;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: var(--s2) var(--s4);
  z-index: 200;
  box-shadow: 0 -4px 16px rgb(0 0 0/.06);
}
.nav-mobile-link {
  display: flex; flex-direction: column; align-items: center;
  gap: 3px;
  padding: var(--s2) var(--s3);
  border-radius: var(--r);
  color: var(--txt-4);
  font-size: 10px; font-weight: var(--fw-med);
  text-decoration: none; border: none; background: none;
  cursor: pointer; transition: color var(--t);
  flex: 1;
}
.nav-mobile-link svg { width: 22px; height: 22px; }
.nav-mobile-link.active { color: var(--blue); }

/* ── 5. BOTÕES ──────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--s2);
  padding: 0 var(--s5);
  height: 42px;
  border: 1px solid transparent;
  border-radius: var(--r);
  font-family: var(--font);
  font-size: var(--sz-sm);
  font-weight: var(--fw-semi);
  line-height: 1;
  cursor: pointer;
  transition: background var(--t), box-shadow var(--t), transform var(--t), border-color var(--t);
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }

.btn-primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 1px 3px rgb(29 78 216/.25);
}
.btn-primary:hover {
  background: var(--navy-700);
  box-shadow: 0 4px 12px rgb(29 78 216/.35);
  color: #fff;
}

.btn-navy {
  background: var(--navy);
  color: #fff;
  box-shadow: var(--sh-navy);
}
.btn-navy:hover { background: var(--navy-800); color: #fff; }

.btn-ghost {
  background: transparent;
  color: var(--txt-3);
  border-color: var(--border);
}
.btn-ghost:hover { background: var(--surface-2); color: var(--txt); border-color: var(--border-2); }

.btn-danger {
  background: var(--err);
  color: #fff;
}
.btn-danger:hover { background: #dc2626; color: #fff; }

.btn-sm   { height: 34px; padding: 0 var(--s4); font-size: var(--sz-xs); }
.btn-lg   { height: 50px; padding: 0 var(--s8); font-size: var(--sz-base); }
.btn-full { width: 100%; }

/* Spinner no botão */
.btn.loading { pointer-events: none; }
.btn.loading > *:not(.btn-spinner) { opacity: 0; }
.btn-spinner {
  position: absolute;
  width: 16px; height: 16px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin .6s linear infinite;
}

/* ── 6. FORMULÁRIOS ─────────────────────────────────────────────── */
.field {
  display: flex; flex-direction: column;
  gap: var(--s1);
}

.label {
  font-size: var(--sz-sm);
  font-weight: var(--fw-med);
  color: var(--txt-2);
  display: flex; align-items: center; gap: var(--s2);
}
.label-hint {
  font-size: var(--sz-xs);
  color: var(--txt-4);
  font-weight: var(--fw-reg);
}

.input-wrap { position: relative; }

.input {
  width: 100%;
  height: 44px;
  padding: 0 var(--s3);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  color: var(--txt);
  font-family: var(--font);
  font-size: var(--sz-sm);
  transition: border-color var(--t), box-shadow var(--t);
}
.input:focus {
  outline: none;
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgb(59 130 246/.15);
}
.input::placeholder { color: var(--txt-4); }
.input.has-icon-l { padding-left: var(--s10); }
.input.has-icon-r { padding-right: var(--s10); }
.input.error      { border-color: var(--err); }
.input.error:focus{ box-shadow: 0 0 0 3px rgb(239 68 68/.15); }

.input-icon-l,
.input-icon-r {
  position: absolute; top: 50%; transform: translateY(-50%);
  color: var(--txt-4); pointer-events: none;
}
.input-icon-l { left: var(--s3); }
.input-icon-r { right: var(--s3); }
.input-icon-l svg,
.input-icon-r svg { width: 16px; height: 16px; }

.input-action {
  position: absolute; top: 50%; transform: translateY(-50%);
  right: var(--s3);
  background: none; border: none;
  color: var(--txt-4); cursor: pointer;
  padding: 4px;
  border-radius: var(--r-sm);
  transition: color var(--t);
}
.input-action:hover { color: var(--txt-2); }
.input-action svg { width: 16px; height: 16px; }

textarea.input { height: auto; padding: var(--s3); min-height: 96px; resize: vertical; }
select.input   { padding-right: var(--s8); appearance: none; }

.field-error {
  font-size: var(--sz-xs);
  color: var(--err);
  display: flex; align-items: center; gap: 4px;
}
.field-error svg { width: 12px; height: 12px; flex-shrink: 0; }

.fields-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s4);
}

/* Checkbox estilizado */
.check-label {
  display: flex; align-items: center; gap: var(--s3);
  cursor: pointer; font-size: var(--sz-sm); color: var(--txt-2);
  user-select: none;
}
.check-label input { display: none; }
.check-box {
  width: 18px; height: 18px;
  border: 2px solid var(--border-2);
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  background: var(--surface);
  transition: background var(--t), border-color var(--t);
}
.check-label input:checked + .check-box {
  background: var(--blue);
  border-color: var(--blue);
}
.check-box svg { width: 11px; height: 11px; color: #fff; opacity: 0; }
.check-label input:checked + .check-box svg { opacity: 1; }

/* ── 7. CARDS ────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-xs);
  overflow: hidden;
}
.card-pad { padding: var(--s6); }
.card-header {
  padding: var(--s4) var(--s6);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: var(--s3);
}
.card-title {
  font-size: var(--sz-base);
  font-weight: var(--fw-semi);
  color: var(--txt);
}

/* Home cards (módulos) */
.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--s5);
}

.module-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-2xl);
  padding: var(--s6);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: flex; flex-direction: column; gap: var(--s4);
  transition: transform var(--t-md), box-shadow var(--t-md), border-color var(--t-md);
  position: relative;
  overflow: hidden;
}
.module-card::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--card-accent, var(--sky-light)) 0%, transparent 60%);
  opacity: 0;
  transition: opacity var(--t-md);
}
.module-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--sh-md);
  border-color: var(--card-accent-border, var(--blue-400));
}
.module-card:hover::before { opacity: 1; }

.module-icon {
  width: 52px; height: 52px;
  border-radius: var(--r-xl);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.module-icon svg { width: 26px; height: 26px; }

.module-label {
  font-size: var(--sz-lg);
  font-weight: var(--fw-bold);
  color: var(--txt);
  line-height: 1.2;
}
.module-desc {
  font-size: var(--sz-sm);
  color: var(--txt-3);
  line-height: 1.6;
}
.module-arrow {
  display: flex; align-items: center; gap: var(--s2);
  font-size: var(--sz-xs);
  font-weight: var(--fw-semi);
  color: var(--txt-4);
  margin-top: auto;
}
.module-arrow svg { width: 14px; height: 14px; transition: transform var(--t); }
.module-card:hover .module-arrow { color: var(--blue); }
.module-card:hover .module-arrow svg { transform: translateX(3px); }

/* ── 8. ALERTAS / BADGES ────────────────────────────────────────── */
.alert {
  display: flex; gap: var(--s3);
  padding: var(--s3) var(--s4);
  border-radius: var(--r);
  border-left: 4px solid;
  font-size: var(--sz-sm);
  line-height: 1.5;
}
.alert svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; }
.alert-ok   { background: var(--ok-bg);   border-color: var(--ok);   color: #065f46; }
.alert-warn { background: var(--warn-bg); border-color: var(--warn); color: #92400e; }
.alert-err  { background: var(--err-bg);  border-color: var(--err);  color: #991b1b; }
.alert-info { background: var(--info-bg); border-color: var(--info); color: #3730a3; }

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px var(--s2);
  border-radius: var(--r-full);
  font-size: var(--sz-xs);
  font-weight: var(--fw-semi);
  line-height: 1.4;
}
.badge-blue   { background: var(--sky-light); color: var(--blue); }
.badge-ok     { background: var(--ok-bg);     color: var(--ok); }
.badge-warn   { background: var(--warn-bg);   color: #92400e; }
.badge-err    { background: var(--err-bg);    color: var(--err); }

/* ── 9. TOAST ───────────────────────────────────────────────────── */
#toasts {
  position: fixed;
  bottom: var(--s6); right: var(--s6);
  z-index: 9999;
  display: flex; flex-direction: column-reverse;
  gap: var(--s2);
  pointer-events: none;
  max-width: 360px;
}
.toast {
  display: flex; align-items: center; gap: var(--s3);
  padding: var(--s3) var(--s4);
  background: var(--navy);
  color: #fff;
  border-radius: var(--r-lg);
  box-shadow: var(--sh-lg);
  font-size: var(--sz-sm);
  font-weight: var(--fw-med);
  pointer-events: auto;
  animation: toast-in var(--t-md) ease;
}
.toast svg { width: 18px; height: 18px; flex-shrink: 0; }
.toast.ok   { background: var(--ok); }
.toast.err  { background: var(--err); }
.toast.warn { background: var(--warn); color: #1a1a1a; }

/* ── 10. PÁGINA AUTH ────────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  background: var(--bg);
}

.auth-left {
  width: 460px; flex-shrink: 0;
  display: flex; flex-direction: column;
  justify-content: center; padding: var(--s12) var(--s10);
  background: var(--surface);
  border-right: 1px solid var(--border);
}

.auth-right {
  flex: 1;
  position: relative;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-700) 40%, var(--blue) 100%);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: var(--s12);
  overflow: hidden;
}

/* Decoração geométrica do lado direito */
.auth-right::before {
  content: '';
  position: absolute;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: rgba(255,255,255,.04);
  top: -120px; right: -120px;
}
.auth-right::after {
  content: '';
  position: absolute;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: rgba(255,255,255,.03);
  bottom: -80px; left: -80px;
}

.auth-brand {
  display: flex; align-items: center; gap: var(--s3);
  margin-bottom: var(--s8);
}
.auth-brand-mark {
  width: 44px; height: 44px;
  background: linear-gradient(135deg, var(--navy), var(--blue));
  border-radius: var(--r-xl);
  display: flex; align-items: center; justify-content: center;
}
.auth-brand-mark svg { width: 24px; height: 24px; color: #fff; }
.auth-brand-name {
  font-size: var(--sz-2xl);
  font-weight: var(--fw-xbold);
  color: var(--txt);
  letter-spacing: -.75px;
}

.auth-title {
  font-size: var(--sz-2xl);
  font-weight: var(--fw-bold);
  color: var(--txt);
  margin-bottom: var(--s1);
  letter-spacing: -.5px;
}
.auth-subtitle {
  font-size: var(--sz-sm);
  color: var(--txt-3);
  margin-bottom: var(--s8);
  line-height: 1.5;
}

.auth-form { display: flex; flex-direction: column; gap: var(--s5); }

.auth-footer {
  margin-top: var(--s6);
  text-align: center;
  font-size: var(--sz-sm);
  color: var(--txt-4);
}
.auth-footer a { color: var(--blue); font-weight: var(--fw-med); }
.auth-footer a:hover { color: var(--navy); }

/* Lado direito — conteúdo */
.auth-hero { position: relative; z-index: 1; text-align: center; }
.auth-hero-title {
  font-size: var(--sz-4xl);
  font-weight: var(--fw-xbold);
  color: #fff;
  letter-spacing: -1.5px;
  line-height: 1.1;
  margin-bottom: var(--s4);
}
.auth-hero-sub {
  font-size: var(--sz-lg);
  color: rgba(255,255,255,.7);
  line-height: 1.6;
  max-width: 380px;
  margin: 0 auto var(--s10);
}
.auth-features { list-style: none; display: flex; flex-direction: column; gap: var(--s4); text-align: left; }
.auth-feature {
  display: flex; align-items: center; gap: var(--s4);
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--r-xl);
  padding: var(--s4) var(--s5);
  backdrop-filter: blur(8px);
}
.auth-feature-icon {
  width: 40px; height: 40px;
  background: rgba(255,255,255,.12);
  border-radius: var(--r-lg);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.auth-feature-icon svg { width: 20px; height: 20px; color: #fff; }
.auth-feature-text { color: rgba(255,255,255,.9); font-size: var(--sz-sm); font-weight: var(--fw-med); }

/* Divisor "ou" */
.auth-divider {
  display: flex; align-items: center; gap: var(--s3);
  font-size: var(--sz-xs); color: var(--txt-4);
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

/* ── 11. DASHBOARD / INÍCIO ─────────────────────────────────────── */
.page-hero {
  padding: var(--s10) 0 var(--s8);
}
.page-hero-greeting {
  font-size: var(--sz-xs);
  font-weight: var(--fw-semi);
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--blue);
  margin-bottom: var(--s2);
}
.page-hero-title {
  font-size: var(--sz-3xl);
  font-weight: var(--fw-xbold);
  color: var(--txt);
  letter-spacing: -1px;
  line-height: 1.15;
}
.page-hero-title span {
  background: linear-gradient(135deg, var(--blue), var(--sky));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.page-hero-sub {
  font-size: var(--sz-base);
  color: var(--txt-3);
  margin-top: var(--s2);
}

/* Stats strip */
.stats-strip {
  display: flex; gap: var(--s6);
  padding: var(--s5) var(--s6);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  margin-bottom: var(--s8);
  box-shadow: var(--sh-xs);
}
.stat-item { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.stat-val  { font-size: var(--sz-2xl); font-weight: var(--fw-xbold); color: var(--txt); letter-spacing: -.5px; }
.stat-lbl  { font-size: var(--sz-xs); color: var(--txt-4); font-weight: var(--fw-med); text-transform: uppercase; letter-spacing: .05em; }
.stat-sep  { width: 1px; background: var(--border); flex-shrink: 0; }

/* ── 12. PERFIL ─────────────────────────────────────────────────── */
.profile-header {
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
  padding: var(--s10) 0;
}
.profile-header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--s6);
  display: flex; align-items: center; gap: var(--s6);
}
.profile-avatar-wrap { position: relative; }
.profile-avatar {
  width: 88px; height: 88px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255,255,255,.6);
  box-shadow: var(--sh-md);
}
.profile-avatar-edit {
  position: absolute; bottom: 0; right: 0;
  width: 28px; height: 28px;
  background: var(--surface);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: var(--sh-sm);
  border: 2px solid var(--surface);
}
.profile-avatar-edit svg { width: 13px; height: 13px; color: var(--blue); }
.profile-name  { font-size: var(--sz-2xl); font-weight: var(--fw-bold); color: #fff; margin-bottom: 4px; letter-spacing: -.5px; }
.profile-meta  { display: flex; gap: var(--s5); flex-wrap: wrap; }
.profile-meta-item { display: flex; align-items: center; gap: var(--s2); color: rgba(255,255,255,.75); font-size: var(--sz-sm); }
.profile-meta-item svg { width: 14px; height: 14px; }

/* Tabs */
.tabs { display: flex; border-bottom: 2px solid var(--border); gap: 0; overflow-x: auto; }
.tab {
  padding: var(--s3) var(--s5);
  font-size: var(--sz-sm); font-weight: var(--fw-med);
  color: var(--txt-3);
  border: none; background: transparent;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer; white-space: nowrap;
  display: flex; align-items: center; gap: var(--s2);
  transition: color var(--t);
}
.tab:hover { color: var(--txt); }
.tab.active { color: var(--blue); border-bottom-color: var(--blue); font-weight: var(--fw-semi); }
.tab svg { width: 15px; height: 15px; }

.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fade-up .2s ease; }

/* ── 13. FOOTER ─────────────────────────────────────────────────── */
.footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: var(--s6) 0;
  margin-top: auto;
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--s6);
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s4); flex-wrap: wrap;
}
.footer-logo-text { font-size: var(--sz-sm); font-weight: var(--fw-bold); color: var(--txt-2); letter-spacing: -.25px; }
.footer-links { display: flex; gap: var(--s5); }
.footer-links a { font-size: var(--sz-xs); color: var(--txt-4); }
.footer-links a:hover { color: var(--txt-2); }
.footer-disclaimer { font-size: var(--sz-xs); color: var(--txt-4); max-width: 400px; line-height: 1.5; }

/* ── 14. UTILITÁRIOS ────────────────────────────────────────────── */
.flex    { display: flex; }
.col     { flex-direction: column; }
.items-c { align-items: center; }
.justify-b { justify-content: space-between; }
.gap-2   { gap: var(--s2); }
.gap-3   { gap: var(--s3); }
.gap-4   { gap: var(--s4); }
.gap-5   { gap: var(--s5); }
.gap-6   { gap: var(--s6); }
.mt-4    { margin-top: var(--s4); }
.mt-6    { margin-top: var(--s6); }
.mt-8    { margin-top: var(--s8); }
.mb-4    { margin-bottom: var(--s4); }
.mb-6    { margin-bottom: var(--s6); }
.mb-8    { margin-bottom: var(--s8); }
.text-sm  { font-size: var(--sz-sm); }
.text-xs  { font-size: var(--sz-xs); }
.text-muted { color: var(--txt-3); }
.text-faint { color: var(--txt-4); }
.font-semi  { font-weight: var(--fw-semi); }
.font-bold  { font-weight: var(--fw-bold); }
.hidden     { display: none !important; }
.sr-only    { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.divider    { border: none; border-top: 1px solid var(--border); margin: 0; }
.relative   { position: relative; }

/* ── 15. ANIMAÇÕES ──────────────────────────────────────────────── */
@keyframes spin      { to { transform: rotate(360deg); } }
@keyframes fade-up   { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toast-in  { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: translateX(0); } }
@keyframes pulse     { 0%,100% { opacity: 1; } 50% { opacity: .4; } }

.skeleton {
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--border) 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  border-radius: var(--r);
  animation: sk-wave 1.4s ease infinite;
}
@keyframes sk-wave { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ── 16. RESPONSIVO ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .auth-right { display: none; }
  .auth-left  { width: 100%; border-right: none; padding: var(--s8) var(--s6); }
  .auth-left .auth-brand { justify-content: center; }
  .auth-title, .auth-subtitle { text-align: center; }
}

@media (max-width: 768px) {
  :root { --nav-h: 0px; }
  .nav         { display: none; }
  .nav-mobile  { display: flex; flex-direction: row; justify-content: space-around; align-items: center; }
  .main        { padding-top: 0; padding-bottom: 80px; }
  .profile-tabs-bar { top: 0; }
  .profile-tabs { padding: 0 var(--s3); }
  .stats-strip { flex-wrap: wrap; }
  .stat-sep    { display: none; }
  .module-grid { grid-template-columns: 1fr 1fr; gap: var(--s3); }
  .fields-row  { grid-template-columns: 1fr; }
  #toasts      { bottom: 90px; right: var(--s4); left: var(--s4); max-width: none; }
  .page        { padding: var(--s6) 0 var(--s12); }
  .page-hero   { padding: var(--s6) 0 var(--s4); }
  .page-hero-title { font-size: var(--sz-2xl); }
  .footer      { margin-bottom: 80px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .profile-header-inner { flex-direction: column; text-align: center; }
  .profile-meta { justify-content: center; }
}

@media (max-width: 480px) {
  .module-grid { grid-template-columns: 1fr; }
  .container   { padding: 0 var(--s4); }
  .auth-left   { padding: var(--s6) var(--s4); }
}