/* =====================================================================
   Farol — Sistema de marca Fio Guia (Direção 02 · O Fio + Farol)
   "Quiet luxury · gravidade silenciosa." 80% neutros quentes, 20% verde.
   Verde-água é sotaque (o fio, links, foco) — nunca protagonista.
   ===================================================================== */

:root {
  /* Paleta Fio Guia */
  --ink:        #15242F;   /* Ink Petróleo — fundo escuro, texto sobre claro */
  --ink-700:    #11202a;
  --verde-fundo:#395750;   /* blocos, primária sólida */
  --agua:       #6FA79A;   /* sotaque: o fio, detalhes, links */
  --greige:     #CDBFAC;   /* neutro quente, superfícies */
  --marfim:     #EFE9DD;   /* respiro, fundos claros, texto sobre escuro */

  /* Marca / primária (sólida = verde fundo; sotaque = água) */
  --primary:        #395750;   /* verde fundo — botões/realce de texto */
  --primary-600:    #2c463f;
  --primary-500:    #6FA79A;   /* água — focos, progresso, "hoje" */
  --primary-soft:   #d7e6e0;   /* água clara — chips, anel de foco */
  --primary-tint:   #eef4f1;   /* água quase branca — hovers */
  --accent:         #6FA79A;   /* o fio */

  /* Neutros quentes */
  --bg:        #E7E0D2;   /* greige-marfim — backdrop */
  --surface:   #F6F1E8;   /* marfim — cards */
  --surface-2: #FBF8F1;   /* marfim claro — heads/foots */
  --border:    #DACEBB;   /* greige — bordas */
  --line:      #E4DAC8;   /* greige clara — divisórias internas */
  --text:      #15242F;   /* ink */
  --text-soft: #4B5B60;   /* ink suave */
  --text-mute: #8A9089;   /* greige-verde — rótulos */

  /* Semânticos (suaves, harmonizados ao quente) */
  --success:   #3f7d5e; --success-bg: #dbe7dd;
  --warning:   #b07a2e; --warning-bg: #efe4cf;
  --danger:    #b4524a; --danger-bg:  #ecdad6;
  --info:      #4f7d8a; --info-bg:    #dde8ea;
  --purple:    #6d6394; --purple-bg:  #e4dfec;

  --radius:    14px;
  --radius-sm: 9px;
  --shadow:    0 1px 2px rgba(21,36,47,.05), 0 8px 28px rgba(21,36,47,.07);
  --shadow-lg: 0 18px 50px rgba(21,36,47,.22);
  --sidebar-w: 256px;
  --font:       'Hanken Grotesk', 'Segoe UI', system-ui, -apple-system, Roboto, Arial, sans-serif;
  --font-serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-mono:  'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--greige); border-radius: 8px; border: 2px solid var(--bg); }

/* --- Tipografia da marca: serifada editorial nos títulos --- */
h1, h2, h3, .brand-name, .login-title, .page-title {
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: .2px;
}
/* Rótulos técnicos (mono, caixa-alta) — "o eco do prontuário" */
.nav-label, .section-title, table.tbl th, .kpi-label, .tag-auto, .login-or, .card-head .sub {
  font-family: var(--font-mono);
}

/* --- "O fio": linha contínua com laço, o grafismo condutor --- */
.fio, .card-head::after, .section-title { position: relative; }
.fio {
  display: block; height: 18px; margin: 2px 0 6px;
  background: no-repeat left center / 100% 2px
    linear-gradient(90deg, var(--agua), var(--agua));
}
.fio::after {  /* o laço final do fio */
  content: ''; position: absolute; right: 0; top: 50%;
  width: 9px; height: 9px; border: 1.6px solid var(--agua); border-radius: 50%;
  transform: translate(40%, -50%); background: var(--bg);
}

/* ----------------------------- Layout ------------------------------- */
.app { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  background: linear-gradient(180deg, var(--ink) 0%, var(--ink-700) 100%);
  color: var(--greige);
  position: fixed; inset: 0 auto 0 0;
  display: flex; flex-direction: column;
  padding: 22px 16px;
  border-right: 1px solid rgba(111,167,154,.14);
  z-index: 30;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 16px; border-bottom: 1px solid rgba(111,167,154,.16); margin-bottom: 6px; }
.brand .logo {
  width: 40px; height: 40px; border-radius: 11px;
  background: rgba(111,167,154,.14); color: var(--marfim); display: grid; place-items: center;
  font-size: 20px; flex: none;
}
.brand .brand-name { font-weight: 600; color: var(--marfim); font-size: 19px; line-height: 1.1; }
.brand .brand-sub { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--agua); }

.nav { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; }
.nav::-webkit-scrollbar { width: 7px; }
.nav::-webkit-scrollbar-thumb { background: rgba(111,167,154,.2); border-radius: 8px; border: none; }
.nav-label { font-size: 9.5px; letter-spacing: .16em; text-transform: uppercase; color: rgba(205,191,172,.55); margin: 16px 10px 6px; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 11px; border-radius: 9px; color: rgba(239,233,221,.82);
  font-weight: 400; font-size: 13.5px; transition: background .15s, color .15s;
}
.nav-item .ico { width: 19px; text-align: center; font-size: 15px; opacity: .9; }
.nav-item:hover { background: rgba(239,233,221,.07); color: var(--marfim); }
.nav-item.active { background: var(--marfim); color: var(--ink); font-weight: 600; box-shadow: 0 6px 18px rgba(0,0,0,.25); }
.nav-item.active .ico { color: var(--verde-fundo); opacity: 1; }
.nav-item .badge { margin-left: auto; background: var(--agua); color: var(--ink); font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 20px; }
.nav-item.active .badge { background: var(--verde-fundo); color: var(--marfim); }

.sidebar-foot { flex: none; padding: 12px 8px 4px; border-top: 1px solid rgba(111,167,154,.16); }
.user-chip { display: flex; align-items: center; gap: 10px; }
.user-chip .avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--agua); color: var(--ink); display: grid; place-items: center; font-weight: 700; }
.user-chip .u-name { color: var(--marfim); font-size: 13px; font-weight: 600; }
.user-chip .u-role { color: rgba(205,191,172,.7); font-size: 11px; }

/* ----------------------------- Main --------------------------------- */
.main { margin-left: var(--sidebar-w); flex: 1; min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(246,241,232,.82); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 14px 30px; display: flex; align-items: center; gap: 16px;
}
.topbar h1 { font-size: 23px; margin: 0; font-weight: 600; letter-spacing: .2px; }
.topbar .page-sub { color: var(--text-mute); font-size: 12.5px; }
.topbar .spacer { flex: 1; }
.topbar .today { font-size: 12.5px; color: var(--text-soft); background: var(--surface); border: 1px solid var(--border); padding: 7px 12px; border-radius: 10px; }

/* Mini-perfil no topo (quem está logado + sair) */
.topbar-user { position: relative; }
.tb-user-btn { display: flex; align-items: center; gap: 9px; background: var(--surface); border: 1px solid var(--border); border-radius: 11px; padding: 5px 10px 5px 6px; cursor: pointer; }
.tb-user-btn:hover { border-color: var(--greige); background: var(--surface-2); }
.tb-user-info { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.tb-user-name { font-weight: 700; font-size: 13px; color: var(--text); }
.tb-user-role { font-size: 11px; color: var(--text-mute); }
.tb-caret { color: var(--text-mute); font-size: 11px; }
.tb-user-menu { position: absolute; right: 0; top: calc(100% + 8px); background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); min-width: 230px; overflow: hidden; z-index: 60; animation: pop .15s ease; }
.tb-menu-head { padding: 12px 14px; border-bottom: 1px solid var(--border); background: var(--surface-2); font-size: 13px; }
.tb-menu-item { width: 100%; text-align: left; padding: 12px 14px; border: none; background: transparent; cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--danger); display: flex; align-items: center; gap: 8px; }
.tb-menu-item:hover { background: var(--danger-bg); }
@media (max-width: 640px) { .tb-user-info { display: none; } }

.content { padding: 26px 30px 60px; max-width: 1240px; }

/* ----------------------------- Buttons ------------------------------ */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 15px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font-weight: 600; font-size: 13.5px;
  transition: all .15s;
}
.btn:hover { border-color: var(--greige); background: var(--surface-2); }
.btn-primary { background: var(--primary); color: var(--marfim); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-600); border-color: var(--primary-600); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-soft); }
.btn-ghost:hover { background: var(--primary-tint); }
.btn-sm { padding: 6px 11px; font-size: 12.5px; }
.btn-wa { background: #25d366; color: #fff; border-color: #25d366; }
.btn-wa:hover { background: #1eb958; border-color: #1eb958; }

/* ----------------------------- Cards -------------------------------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 18px 20px; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.card-head h3 { margin: 0; font-size: 17px; font-weight: 600; }
.card-head .sub { color: var(--text-mute); font-size: 10px; text-transform: uppercase; letter-spacing: .1em; }

.grid { display: grid; gap: 16px; }
.cols-4 { grid-template-columns: repeat(4, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 1100px){ .cols-4 { grid-template-columns: repeat(2,1fr); } .cols-3 { grid-template-columns: repeat(2,1fr);} }
@media (max-width: 720px){ .cols-4,.cols-3,.cols-2 { grid-template-columns: 1fr; } }

/* KPI */
.kpi { padding: 18px; display: flex; flex-direction: column; gap: 7px; }
.kpi .kpi-top { display: flex; align-items: center; justify-content: space-between; }
.kpi .kpi-ico { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font-size: 18px; }
.kpi .kpi-label { color: var(--text-mute); font-size: 10px; font-weight: 500; text-transform: uppercase; letter-spacing: .12em; }
.kpi .kpi-value { font-family: var(--font-serif); font-size: 33px; font-weight: 600; letter-spacing: 0; }
.kpi .kpi-foot { font-size: 11.5px; color: var(--text-mute); }
.ic-teal { background: var(--primary-tint); color: var(--primary); }
.ic-blue { background: var(--info-bg); color: var(--info); }
.ic-green{ background: var(--success-bg); color: var(--success); }
.ic-amber{ background: var(--warning-bg); color: var(--warning); }
.ic-purple{background: var(--purple-bg); color: var(--purple); }
.ic-red  { background: var(--danger-bg); color: var(--danger); }

/* ----------------------------- Tables ------------------------------- */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.3px; }
table.tbl th { text-align: left; padding: 11px 14px; color: var(--text-mute); font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.tbl th { font-size: 10px; letter-spacing: .1em; }
table.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.tbl tr.clickable { cursor: pointer; transition: background .12s; }
table.tbl tr.clickable:hover td { background: var(--primary-tint); }
table.tbl tr:last-child td { border-bottom: none; }
.tbl .strong { font-weight: 600; color: var(--text); }
.tbl .muted { color: var(--text-mute); }

/* ----------------------------- Chips/badges ------------------------- */
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.chip-dot::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; display: inline-block; }
.c-green { background: var(--success-bg); color: #15803d; }
.c-amber { background: var(--warning-bg); color: #b45309; }
.c-red   { background: var(--danger-bg);  color: #b91c1c; }
.c-blue  { background: var(--info-bg);    color: #1d4ed8; }
.c-gray  { background: #e6ddcd;           color: #6b6657; }
.c-purple{ background: var(--purple-bg);  color: #6d28d9; }
.c-teal  { background: var(--primary-soft); color: var(--primary); }

/* ----------------------------- Inputs ------------------------------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12.5px; font-weight: 600; color: var(--text-soft); }
.field .hint { font-size: 11px; color: var(--text-mute); font-weight: 500; }
.input, select.input, textarea.input {
  width: 100%; padding: 9px 12px; border: 1px solid var(--border); border-radius: 10px;
  font-size: 13.5px; font-family: inherit; color: var(--text); background: #fff; transition: border .15s, box-shadow .15s;
}
.input:focus, select.input:focus, textarea.input:focus { outline: none; border-color: var(--primary-500); box-shadow: 0 0 0 3px var(--primary-soft); }
.input:disabled, .input.auto { background: #ece5d6; color: var(--text-soft); }
.field.auto label::after { content: ' 🔒'; font-size: 10px; }
textarea.input { resize: vertical; min-height: 64px; }

/* Agenda (calendário semanal) */
.ag-wrap { overflow-x: auto; }
.ag-grid { display: grid; grid-template-columns: repeat(7, minmax(135px, 1fr)); gap: 10px; min-width: 920px; }
.ag-col { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.ag-col.hoje { border-color: var(--primary-500); box-shadow: 0 0 0 2px var(--primary-soft); }
.ag-colhead { padding: 8px 10px; text-align: center; font-size: 12px; color: var(--text-soft); border-bottom: 1px solid var(--border); background: var(--surface-2); }
.ag-colhead.hoje { background: var(--primary-tint); color: var(--primary); font-weight: 600; }
.ag-colbody { padding: 8px; display: flex; flex-direction: column; gap: 8px; min-height: 80px; }
.ag-card { border: 1px solid var(--border); border-left: 3px solid var(--border); border-radius: 8px; padding: 7px 9px; transition: box-shadow .12s, transform .12s; background: #fff; }
.ag-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.ag-time { font-weight: 700; font-size: 12.5px; }
.ag-pac { font-weight: 600; font-size: 12.5px; line-height: 1.25; }
.ag-srv { font-size: 11.5px; color: var(--text-soft); }
.ag-prof { font-size: 11px; color: var(--text-mute); display: flex; align-items: center; gap: 5px; margin-top: 3px; }
.ag-vazio { color: var(--text-mute); text-align: center; font-size: 12px; padding: 12px 0; }
.ag-leg { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-soft); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }

/* Autocomplete de paciente (Nova marcação) */
.pac-picker { position: relative; }
.pac-results { position: absolute; top: calc(100% + 4px); left: 0; right: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-lg); max-height: 240px; overflow-y: auto; z-index: 50; display: none; }
.pac-result { padding: 9px 12px; cursor: pointer; font-size: 13.5px; border-bottom: 1px solid #eef2f5; }
.pac-result:last-child { border-bottom: none; }
.pac-result:hover { background: var(--primary-tint); }
.status-sel { width: auto; padding: 5px 9px; min-width: 140px; font-weight: 600; }
.chip-x { border: none; background: transparent; color: inherit; cursor: pointer; font-size: 10px; opacity: .55; padding: 0 0 0 2px; }
.chip-x:hover { opacity: 1; color: var(--danger); }

.search { position: relative; }
.search .input { padding-left: 36px; }
.search .s-ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-mute); }

/* ----------------------------- Conversas ---------------------------- */
.conv-wrap { display: grid; grid-template-columns: 320px 1fr; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); height: calc(100vh - 172px); min-height: 440px; }
.conv-list { border-right: 1px solid var(--border); overflow-y: auto; background: var(--surface-2); }
.conv-item { display: flex; gap: 10px; align-items: center; padding: 12px 14px; cursor: pointer; border-bottom: 1px solid var(--line); transition: background .12s; }
.conv-item:hover { background: var(--primary-tint); }
.conv-item.active { background: var(--primary-soft); }
.conv-item-body { flex: 1; min-width: 0; }
.conv-last { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-main { display: flex; flex-direction: column; min-width: 0; }
.conv-head { display: flex; align-items: center; gap: 10px; padding: 13px 18px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.conv-thread { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 8px; background: var(--bg); }
.bolha { max-width: 72%; padding: 8px 12px; border-radius: 12px; font-size: 13.5px; line-height: 1.4; box-shadow: var(--shadow); white-space: pre-wrap; word-break: break-word; }
.bolha .bolha-who { font-size: 9.5px; opacity: .75; margin-bottom: 2px; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .08em; }
.b-in { align-self: flex-start; background: var(--surface); border: 1px solid var(--border); }
.b-out { align-self: flex-end; background: var(--verde-fundo); color: var(--marfim); }
.conv-reply { display: flex; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--border); background: var(--surface-2); }
.conv-reply .input { flex: 1; }
@media (max-width: 720px){ .conv-wrap { grid-template-columns: 1fr; height: auto; min-height: 0; } .conv-list { max-height: 240px; } }

/* ----------------------------- Modal -------------------------------- */
.modal-overlay { position: fixed; inset: 0; background: rgba(16,24,40,.45); backdrop-filter: blur(2px); display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; z-index: 100; overflow-y: auto; }
.modal { background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-lg); width: 100%; max-width: 680px; animation: pop .18s ease; }
.modal.wide { max-width: 820px; }
@keyframes pop { from { transform: translateY(8px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head { display: flex; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.modal-head h3 { margin: 0; font-size: 17px; }
.modal-head .x { margin-left: auto; border: none; background: var(--bg); width: 32px; height: 32px; border-radius: 9px; font-size: 16px; color: var(--text-soft); }
.modal-head .x:hover { background: var(--greige); }
.modal-body { padding: 22px; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 16px 22px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 16px 16px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 620px){ .form-grid { grid-template-columns: 1fr; } }

.section-title { font-size: 10.5px; text-transform: uppercase; letter-spacing: .14em; color: var(--text-mute); font-weight: 500; margin: 8px 0 2px; grid-column: 1/-1; display: flex; align-items: center; gap: 10px; }
.section-title::after { content: ''; flex: 1; height: 1.5px; background: linear-gradient(90deg, var(--agua), transparent); }

/* Linhas dinâmicas (prescrição / anexos do prontuário) */
.dyn-row { display: flex; gap: 8px; margin-bottom: 6px; }
.dyn-row .input { flex: 1; }
.dyn-row .dyn-del { flex: none; }
.ro-list { margin: 4px 0 0; padding-left: 18px; font-size: 13.5px; }
.ro-list li { margin-bottom: 3px; }

/* ----------------------------- Follow-up ---------------------------- */
.fup-card { display: flex; gap: 14px; padding: 16px 18px; border-left: 4px solid var(--border); }
.fup-card.p-URGENTE { border-left-color: var(--danger); }
.fup-card.p-MÉDIO   { border-left-color: var(--warning); }
.fup-card.p-ATENÇÃO { border-left-color: var(--accent); }
.fup-card .fup-main { flex: 1; min-width: 0; }
.fup-card .fup-name { font-weight: 700; font-size: 15px; }
.fup-card .fup-reason { color: var(--text-soft); font-size: 13px; margin-top: 1px; }
.fup-msg { background: var(--bg); border: 1px dashed var(--border); border-radius: 10px; padding: 10px 12px; font-size: 12.8px; color: var(--text-soft); margin-top: 10px; }
.fup-meta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 10px; font-size: 12px; color: var(--text-mute); }
.fup-meta b { color: var(--text); font-weight: 600; }
.fup-side { text-align: right; flex: none; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.fup-value { font-size: 18px; font-weight: 800; color: var(--primary); }

/* ----------------------------- Misc --------------------------------- */
.row { display: flex; align-items: center; gap: 12px; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.gap-sm { gap: 8px; }
.mt { margin-top: 18px; }
.mt-sm { margin-top: 10px; }
.empty { text-align: center; padding: 50px 20px; color: var(--text-mute); }
.empty .big { font-size: 38px; margin-bottom: 8px; }

.avatar-sm { width: 32px; height: 32px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); display: inline-grid; place-items: center; font-weight: 700; font-size: 12.5px; flex: none; }
.cell-person { display: flex; align-items: center; gap: 10px; }

.progress { height: 7px; background: var(--line); border-radius: 20px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--primary-500); border-radius: 20px; }

.tag-auto { font-size: 10.5px; color: var(--primary); background: var(--primary-tint); border: 1px solid var(--primary-soft); padding: 1px 7px; border-radius: 6px; font-weight: 600; }

.toast-wrap { position: fixed; bottom: 24px; right: 24px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast { background: var(--ink); color: var(--marfim); padding: 12px 16px; border-radius: 11px; font-size: 13.5px; box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 10px; animation: pop .18s ease; }
.toast.ok { background: var(--verde-fundo); }

.banner { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 12px; font-size: 13px; }
.banner.info { background: var(--info-bg); color: #2f5560; }
.banner .b-ico { font-size: 18px; }

/* ----------------------------- Login -------------------------------- */
.login-wrap { width: 100%; min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(1200px 720px at 50% -10%, #1d3340, var(--ink)); }
.login-card { background: rgba(239,233,221,.97); border: 1px solid rgba(111,167,154,.28); border-radius: 18px; box-shadow: var(--shadow-lg); width: 100%; max-width: 410px; padding: 34px 30px; animation: pop .2s ease; }
.login-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; }
.login-brand .logo { width: 48px; height: 48px; border-radius: 12px; background: var(--ink); color: var(--marfim); border: 1px solid rgba(111,167,154,.45); display: grid; place-items: center; font-size: 22px; }
.login-title { font-weight: 600; font-size: 27px; line-height: 1; }
.login-sub { color: var(--text-soft); font-size: 11px; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .1em; margin-top: 3px; }
.login-or { display: flex; align-items: center; gap: 10px; margin: 16px 0; color: var(--text-mute); font-size: 12px; }
.login-or::before, .login-or::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.login-msg { margin-top: 14px; font-size: 13px; text-align: center; min-height: 18px; }
.login-msg.err { color: var(--danger); }
.login-msg.ok { color: var(--text-soft); }

.btn-logout { margin-left: auto; flex: none; width: 30px; height: 30px; border-radius: 8px; border: none;
  background: rgba(111,167,154,.16); color: var(--greige); font-size: 15px; transition: background .15s; }
.btn-logout:hover { background: rgba(111,167,154,.3); color: var(--marfim); }

.list-tight > * + * { border-top: 1px solid #eef2f5; }
.mini-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; }
.mini-row .m-main { flex: 1; min-width: 0; }
.mini-row .m-title { font-weight: 600; font-size: 13.5px; }
.mini-row .m-sub { color: var(--text-mute); font-size: 12px; }
