/* ---------------------------------------------------------------------
   Aureain — Inventário de Ativos
   Design tokens replicados do site institucional (aureain.com) e do painel
   original em Next.js/Tailwind. Ver também: fonte Sora, cores teal/navy.
--------------------------------------------------------------------- */

@font-face {
  font-family: "Sora";
  src: local("Sora");
}

:root {
  --teal: #44a083;
  --teal-500: #51b596;
  --teal-600: #3a886f;
  --teal-700: #2e6d59;
  --teal-50: rgba(68, 160, 131, 0.08);
  --teal-100: rgba(68, 160, 131, 0.12);
  --teal-200: rgba(68, 160, 131, 0.2);

  --navy: #0a3246;
  --navy-800: #082737;
  --navy-900: #061c27;

  --bg: #f6f8f9;
  --surface: #ffffff;
  --border: #e6ebee;

  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;

  --amber-50: #fffbeb;
  --amber-100: #fef3c7;
  --amber-200: #fde68a;
  --amber-600: #d97706;
  --amber-700: #b45309;
  --amber-800: #92400e;

  --blue-50: #eff6ff;
  --blue-200: #bfdbfe;
  --blue-500: #3b82f6;
  --blue-700: #1d4ed8;

  --red-50: #fef2f2;
  --red-200: #fecaca;
  --red-500: #ef4444;
  --red-700: #b91c1c;

  --zinc-100: #f4f4f5;
  --zinc-400: #a1a1aa;
  --zinc-500: #71717a;

  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  --radius-2xl: 1rem;
  --radius-full: 9999px;
}

* { box-sizing: border-box; }

html, body {
  background: var(--bg);
  color: var(--navy);
  font-family: "Sora", ui-sans-serif, system-ui, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  line-height: 1.5;
  margin: 0;
  font-size: 15px;
}

h1, h2, h3 { letter-spacing: -0.015em; margin: 0; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }

button { cursor: pointer; transition: transform 150ms ease, background-color 150ms ease, color 150ms ease, box-shadow 150ms ease; }
button:active:not(:disabled) { transform: scale(0.97); }
button:disabled { cursor: not-allowed; opacity: 0.6; }

:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }

/* ---------------------------- Animações ------------------------------ */

@keyframes fadeInUp { 0% { opacity: 0; transform: translateY(6px); } 100% { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { 0% { opacity: 0; } 100% { opacity: 1; } }
.animate-fade-in-up { animation: fadeInUp .35s ease-out both; }
.animate-fade-in { animation: fadeIn .25s ease-out both; }

/* ------------------------------ Layout -------------------------------- */

.shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 16rem;
  flex-shrink: 0;
  background: var(--navy);
  color: #fff;
  display: flex;
  flex-direction: column;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0.75rem 0.75rem 0.25rem;
  padding: 0.75rem 0.75rem;
  border-radius: var(--radius-xl);
  background: rgba(255,255,255,0.05);
  transition: background-color 150ms ease, transform 150ms ease;
}
.sidebar-logo:hover { background: var(--teal-200); }
.sidebar-logo:active { transform: scale(0.98); }
.sidebar-logo img { height: 2rem; width: auto; flex-shrink: 0; filter: drop-shadow(0 1px 1px rgba(0,0,0,.15)); }
.sidebar-logo-text { display: flex; flex-direction: column; line-height: 1.2; }
.sidebar-logo-title { font-size: 1.05rem; font-weight: 700; color: #fff; }
.sidebar-logo-sub { font-size: 0.65rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em; color: rgba(255,255,255,0.45); }

.sidebar-divider { margin: 0 0.75rem 0.75rem; border-bottom: 1px solid rgba(255,255,255,0.1); }

.sidebar-nav { flex: 1; padding: 1rem 0.75rem; display: flex; flex-direction: column; gap: 1.5rem; overflow-y: auto; }
.sidebar-section-title { padding: 0 0.75rem; margin-bottom: 0.5rem; font-size: 0.6rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(255,255,255,0.35); }
.sidebar-items { display: flex; flex-direction: column; gap: 0.125rem; }
.sidebar-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-radius: 0.375rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.7);
  transition: background-color 200ms ease, color 200ms ease, transform 200ms ease;
}
.sidebar-link:hover { background: rgba(255,255,255,0.05); color: #fff; transform: translateX(2px); }
.sidebar-link.active { background: rgba(255,255,255,0.1); color: #fff; transform: translateX(2px); }
.sidebar-link .bar { position: absolute; left: 0; top: 6px; bottom: 6px; width: 2px; border-radius: 999px; background: var(--teal); opacity: 0; }
.sidebar-link.active .bar { opacity: 1; }
.sidebar-link svg { flex-shrink: 0; color: rgba(255,255,255,0.6); }
.sidebar-link.active svg { color: var(--teal); }

.sidebar-footer { padding: 1rem 0.75rem; border-top: 1px solid rgba(255,255,255,0.1); }
.sidebar-user { margin-bottom: 0.5rem; padding: 0 0.75rem; font-size: 0.75rem; color: rgba(255,255,255,0.5); }
.sidebar-user-name { font-weight: 500; color: rgba(255,255,255,0.8); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-signout { display: block; width: 100%; background: none; border: none; border-radius: 0.375rem; padding: 0.5rem 0.75rem; text-align: left; font-size: 0.875rem; color: rgba(255,255,255,0.7); }
.sidebar-signout:hover { background: rgba(255,255,255,0.05); color: #fff; }
.sidebar-version { padding: 0.5rem 0.75rem 0; font-size: 0.68rem; color: rgba(255,255,255,0.4); }

.content-col { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; background: var(--teal); padding: 0.75rem 2rem; box-shadow: 0 1px 2px rgba(0,0,0,0.06); }
.topbar-title { display: flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; font-weight: 500; color: rgba(255,255,255,0.85); }
.topbar-diamond { height: 0.5rem; width: 0.5rem; border-radius: 2px; background: rgba(255,255,255,0.7); transform: rotate(45deg); }

.org-switch { position: relative; display: flex; align-items: center; gap: 0.5rem; }
.org-switch-btn { display: flex; align-items: center; gap: 0.5rem; border-radius: var(--radius-full); border: 1px solid rgba(255,255,255,0.2); background: rgba(255,255,255,0.1); color: #fff; padding: 0.375rem 0.9rem; font-size: 0.875rem; font-weight: 500; backdrop-filter: blur(2px); }
.org-switch-btn:hover { background: rgba(255,255,255,0.15); }
.org-switch-menu { display: none; position: absolute; right: 0; top: 100%; z-index: 20; margin-top: 0.5rem; width: 17rem; max-height: 22rem; overflow-y: auto; border-radius: var(--radius-2xl); border: 1px solid var(--slate-200); background: #fff; padding: 0.4rem 0; box-shadow: 0 10px 30px rgba(10,50,70,0.15); }
.org-switch.open .org-switch-menu { display: block; }
.org-switch-item { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 0.5rem; border: none; background: none; padding: 0.5rem 0.9rem; text-align: left; font-size: 0.875rem; color: rgba(10,50,70,0.75); }
.org-switch-item:hover { background: var(--slate-50); }
.org-switch-item.active { font-weight: 600; color: var(--teal-700); }
.org-switch-pill { flex-shrink: 0; border-radius: var(--radius-full); background: var(--teal-100); padding: 0.1rem 0.5rem; font-size: 0.6rem; font-weight: 500; color: var(--teal-700); }
.org-switch-sep { margin: 0.25rem 0; height: 1px; background: var(--slate-100); }

.main { flex: 1; width: 100%; max-width: 72rem; margin: 0 auto; padding: 1.75rem 2rem; }
.main-wide { flex: 1; width: 100%; padding: 0.5rem; }

/* --------------------------- Componentes ------------------------------ */

.page-header { margin-bottom: 1.75rem; display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.page-header h1 { font-size: 1.875rem; font-weight: 800; color: var(--navy-900); }
.page-header p { margin-top: 0.375rem; font-size: 0.875rem; color: rgba(10,50,70,0.55); }

.card { border-radius: var(--radius-2xl); border: 1px solid rgba(226,232,240,0.7); background: var(--surface); }
.card-pad { padding: 1.5rem; }
.card-hover { transition: transform 200ms ease, box-shadow 200ms ease; }
.card-hover:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(10,50,70,0.08); }

.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  border-radius: var(--radius-full); background: var(--teal); color: #fff;
  padding: 0.75rem 1.5rem; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
  border: none; box-shadow: 0 1px 2px rgba(0,0,0,0.05); transition: all 150ms ease;
}
.btn-primary:hover { background: var(--teal-600); box-shadow: 0 4px 10px rgba(0,0,0,0.1); }

.btn-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  border-radius: var(--radius-lg); border: 1px solid var(--slate-200); background: #fff; color: rgba(10,50,70,0.7);
  padding: 0.5rem 1.25rem; font-size: 0.875rem; font-weight: 500;
}
.btn-secondary:hover { background: var(--slate-50); }

.btn-sm {
  display: inline-flex; align-items: center; gap: 0.35rem; border-radius: var(--radius-lg); border: none;
  background: var(--teal); color: #fff; padding: 0.4rem 0.9rem; font-size: 0.8rem; font-weight: 500;
}
.btn-sm:hover { background: var(--teal-600); }
.btn-sm.danger { background: var(--red-50); color: var(--red-700); }
.btn-sm.danger:hover { background: #fee2e2; }
.btn-sm.ghost { background: transparent; border: 1px solid var(--slate-200); color: rgba(10,50,70,0.6); }

.kpi-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
@media (min-width: 640px) { .kpi-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .kpi-grid { grid-template-columns: repeat(5, 1fr); } }
.kpi-card { display: block; border-radius: var(--radius-2xl); border: 1px solid rgba(226,232,240,0.7); background: #fff; padding: 1rem; transition: all 200ms ease; }
.kpi-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(10,50,70,0.08); border-color: var(--teal-200); }
.kpi-top { display: flex; align-items: center; justify-content: space-between; }
.kpi-label { font-size: 0.7rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; color: rgba(10,50,70,0.45); }
.kpi-icon { display: flex; height: 2rem; width: 2rem; align-items: center; justify-content: center; border-radius: var(--radius-lg); }
.kpi-icon.teal { background: var(--teal-100); color: var(--teal-700); }
.kpi-icon.blue { background: var(--blue-50); color: var(--blue-700); }
.kpi-icon.red { background: var(--red-50); color: var(--red-700); }
.kpi-icon.slate { background: var(--slate-100); color: rgba(10,50,70,0.5); }
.kpi-value { margin-top: 0.5rem; font-size: clamp(1.15rem, 4.5vw, 1.75rem); font-weight: 600; color: var(--navy); font-variant-numeric: tabular-nums; white-space: nowrap; }

.badge { display: inline-flex; align-items: center; gap: 0.35rem; white-space: nowrap; border-radius: var(--radius-full); padding: 0.3rem 0.65rem; font-size: 0.72rem; font-weight: 500; }
.badge .dot { height: 0.35rem; width: 0.35rem; border-radius: 999px; flex-shrink: 0; }
.badge-IN_USE { background: var(--teal-100); color: var(--teal-700); } .badge-IN_USE .dot { background: var(--teal); }
.badge-IN_STOCK { background: var(--slate-100); color: var(--slate-600); } .badge-IN_STOCK .dot { background: var(--slate-400); }
.badge-RESERVED { background: var(--blue-50); color: var(--blue-700); } .badge-RESERVED .dot { background: var(--blue-500); }
.badge-RETIRED { background: var(--zinc-100); color: var(--zinc-500); } .badge-RETIRED .dot { background: var(--zinc-400); }
.badge-LOST { background: var(--red-50); color: var(--red-700); } .badge-LOST .dot { background: var(--red-500); }
.badge-ONLINE { background: var(--teal-100); color: var(--teal-700); } .badge-ONLINE .dot { background: var(--teal); }
.badge-OFFLINE { background: var(--red-50); color: var(--red-700); } .badge-OFFLINE .dot { background: var(--red-500); }
.badge-UNKNOWN { background: var(--slate-100); color: var(--slate-500); } .badge-UNKNOWN .dot { background: var(--slate-400); }
.badge-neutral { background: var(--slate-100); color: var(--slate-500); }
.badge-teal { background: var(--teal-100); color: var(--teal-700); }
.badge-blue { background: var(--blue-50); color: var(--blue-700); }
.badge-amber { background: var(--amber-100); color: var(--amber-800); }
.badge-red { background: var(--red-50); color: var(--red-700); }

.field { display: flex; flex-direction: column; gap: 0.25rem; }
.field label { font-size: 0.75rem; font-weight: 500; color: rgba(10,50,70,0.6); }
.field input, .field select, .field textarea {
  width: 100%; border-radius: var(--radius-lg); border: 1px solid var(--slate-200); background: #fff;
  padding: 0.5rem 0.75rem; font-size: 0.875rem; outline: none; color: var(--navy);
}
.field input::placeholder, .field textarea::placeholder { color: rgba(10,50,70,0.3); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-50); }
.field-grid { display: grid; gap: 1rem; }
@media (min-width: 640px) { .field-grid.cols-2 { grid-template-columns: repeat(2, 1fr); } }
.field-section-title { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: rgba(10,50,70,0.4); }
.field-section { border-top: 1px solid var(--slate-100); padding-top: 1rem; margin-top: 1rem; display: flex; flex-direction: column; gap: 0.75rem; }
.checkbox-row { display: flex; align-items: flex-start; gap: 0.5rem; font-size: 0.75rem; color: rgba(10,50,70,0.6); }
.checkbox-row input { margin-top: 2px; }

table.data-table { width: 100%; font-size: 0.875rem; border-collapse: collapse; }
table.data-table thead tr { border-bottom: 1px solid var(--slate-100); text-align: left; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.04em; color: rgba(10,50,70,0.4); }
table.data-table th { padding: 0.75rem 1rem; font-weight: 500; }
table.data-table td { padding: 0.75rem 1rem; border-top: 1px solid var(--slate-50); }
table.data-table tbody tr:hover { background: rgba(248,250,252,0.7); }
.text-right { text-align: right; }

.empty-state { border-radius: var(--radius-2xl); border: 1px dashed var(--slate-300); background: #fff; padding: 3rem; text-align: center; font-size: 0.875rem; color: rgba(10,50,70,0.5); }
.warning-box { border-radius: var(--radius-2xl); border: 1px solid var(--amber-200); background: var(--amber-50); padding: 1rem; font-size: 0.875rem; color: var(--amber-800); }
.notice-box { border-radius: var(--radius-2xl); border: 1px solid var(--teal-200); background: var(--teal-50); padding: 1rem; font-size: 0.875rem; color: rgba(10,50,70,0.7); }
.error-box { border-radius: var(--radius-lg); background: var(--red-50); padding: 0.5rem 0.75rem; font-size: 0.75rem; color: var(--red-700); }

.avatar { display: flex; height: 1.75rem; width: 1.75rem; align-items: center; justify-content: center; border-radius: 999px; background: rgba(10,50,70,0.05); font-size: 0.68rem; font-weight: 500; color: rgba(10,50,70,0.7); flex-shrink: 0; overflow: hidden; }
.avatar img { height: 100%; width: 100%; object-fit: cover; border-radius: 999px; }
.avatar-lg { height: 5.5rem; width: 5.5rem; font-size: 1.6rem; }

.sidebar-avatar { display: flex; height: 2.1rem; width: 2.1rem; align-items: center; justify-content: center; border-radius: 999px; background: rgba(255,255,255,0.12); color: #fff; font-size: 0.78rem; font-weight: 600; flex-shrink: 0; overflow: hidden; }
.sidebar-avatar img { height: 100%; width: 100%; object-fit: cover; border-radius: 999px; }
.sidebar-user-block { display: flex; align-items: center; gap: 0.6rem; border-radius: var(--radius-lg); padding: 0.4rem; margin: 0 -0.4rem; transition: background 150ms ease; text-decoration: none; color: inherit; }
.sidebar-user-block:hover { background: rgba(255,255,255,0.06); }

.breadcrumb { margin-bottom: 1.5rem; display: flex; align-items: center; gap: 0.25rem; font-size: 0.875rem; color: rgba(10,50,70,0.45); }
.breadcrumb a:hover { color: var(--navy); }
.breadcrumb .current { color: var(--navy); }

.diamond { border-radius: 0.4rem; transform: rotate(45deg); }

.hero { position: relative; overflow: hidden; margin-bottom: 1.75rem; border-radius: var(--radius-2xl); padding: 1.5rem 1.75rem; color: #fff; background: linear-gradient(135deg, var(--navy) 0%, var(--navy) 55%, var(--teal-700) 100%); box-shadow: 0 8px 24px rgba(10,50,70,0.15); }
.hero .shape-1 { position: absolute; right: -2.5rem; top: -4rem; height: 14rem; width: 14rem; border-radius: 1.5rem; background: rgba(255,255,255,0.05); transform: rotate(45deg); }
.hero .shape-2 { position: absolute; right: -1.5rem; bottom: 0; height: 7rem; width: 7rem; border-radius: 1rem; background: var(--teal-200); transform: rotate(45deg); }
.hero-row { position: relative; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; }
.hero-eyebrow { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: rgba(255,255,255,0.5); }
.hero h1 { margin-top: 0.25rem; font-size: 1.5rem; font-weight: 800; }
.hero-sub { margin-top: 0.25rem; font-size: 0.875rem; color: rgba(255,255,255,0.6); }
.hero-logo { display: flex; height: 2.75rem; width: 2.75rem; flex-shrink: 0; align-items: center; justify-content: center; border-radius: 999px; background: rgba(6,28,39,0.5); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.1); }
.hero-logo img { height: 1.5rem; }

.eyebrow-pill { display: inline-flex; align-items: center; border-radius: var(--radius-full); background: var(--teal-100); padding: 0.3rem 0.75rem; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--teal-700); }

.link-cta { display: inline-flex; align-items: center; gap: 0.25rem; font-size: 0.875rem; font-weight: 500; color: var(--teal-700); }
.link-cta:hover { color: var(--teal-600); }

.progress-track { height: 0.375rem; overflow: hidden; border-radius: 999px; background: var(--slate-100); }
.progress-fill { height: 0.375rem; border-radius: 999px; background: var(--teal); transition: width 700ms ease-out; }

.kanban { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.kanban-col { border-radius: var(--radius-2xl); background: var(--slate-50); padding: 0.75rem; }
.kanban-col h3 { font-size: 0.8rem; font-weight: 700; margin-bottom: 0.5rem; padding: 0 0.25rem; }
.kanban-card { background: #fff; border-radius: var(--radius-xl); border: 1px solid var(--slate-200); padding: 0.75rem; margin-bottom: 0.5rem; }

.checklist-item { display: flex; align-items: center; gap: 0.6rem; padding: 0.5rem 0; border-bottom: 1px solid var(--slate-50); }
.checklist-item.done span.title { text-decoration: line-through; color: rgba(10,50,70,0.4); }

.quicklink-item { display: flex; align-items: center; justify-content: space-between; padding: 0.6rem 0.9rem; border-radius: var(--radius-lg); border: 1px solid var(--slate-200); margin-bottom: 0.5rem; }
.quicklink-item a { color: var(--teal-700); font-weight: 500; }

.iframe-embed { width: 100%; height: calc(100vh - 6.5rem); border: none; border-radius: var(--radius-xl); background: #fff; }

.donut-wrap { display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.donut-legend { width: 100%; display: flex; flex-direction: column; gap: 0.4rem; font-size: 0.8rem; }
.donut-legend-row { display: flex; align-items: center; justify-content: space-between; }
.donut-legend-key { display: flex; align-items: center; gap: 0.5rem; color: rgba(10,50,70,0.65); }
.donut-legend-dot { height: 0.55rem; width: 0.55rem; border-radius: 999px; }

/* -------------------------- Termo (impressão) -------------------------- */

.termo { max-width: 800px; margin: 0 auto; background: #fff; border-radius: var(--radius-2xl); border: 1px solid var(--slate-200); padding: 2.5rem; }
.termo h2 { font-size: 1.15rem; font-weight: 700; margin-bottom: 1rem; }
.termo table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.termo table td, .termo table th { border: 1px solid var(--slate-200); padding: 0.5rem 0.65rem; font-size: 0.85rem; }
.termo .signature-line { margin-top: 3rem; border-top: 1px solid #000; padding-top: 0.4rem; width: 60%; font-size: 0.8rem; }

@media print {
  aside, header.topbar, .no-print { display: none !important; }
  main { padding: 0 !important; max-width: 100% !important; }
  .page2 { break-before: page; page-break-before: always; }
  .termo { box-shadow: none !important; border: none !important; }
  input { border: none !important; border-bottom: 1px solid #000 !important; }
}
@page { size: A4; margin: 12mm; }

/* ------------------------------ Login/Setup ---------------------------- */

.auth-page { display: grid; min-height: 100vh; background: #fff; }
@media (min-width: 768px) { .auth-page { grid-template-columns: 1fr 1fr; } }
.auth-form-col { display: flex; flex-direction: column; justify-content: center; padding: 3rem 1.5rem; }
@media (min-width: 640px) { .auth-form-col { padding: 3rem; } }
@media (min-width: 1024px) { .auth-form-col { padding: 3rem 5rem; } }
.auth-form-inner { margin: 0 auto; width: 100%; max-width: 24rem; }
.auth-brand { margin-bottom: 2.5rem; display: flex; align-items: center; gap: 0.5rem; }
.auth-brand img { height: 2rem; width: auto; }
.auth-brand span { font-size: 1.125rem; font-weight: 700; color: var(--navy); }
.auth-form-inner h1 { font-size: 2.25rem; font-weight: 800; line-height: 1.15; color: var(--navy); }
.auth-form-inner h1 .accent { color: var(--teal); }
.auth-form-inner > p { margin-top: 0.5rem; font-size: 0.875rem; color: rgba(10,50,70,0.55); }
.auth-form { margin-top: 2rem; display: flex; flex-direction: column; gap: 1rem; }
.auth-footer { margin-top: 1.5rem; text-align: center; font-size: 0.68rem; color: rgba(10,50,70,0.4); }
.auth-footer a { text-decoration: underline; }

.auth-side { position: relative; overflow: hidden; display: none; background: linear-gradient(135deg, var(--navy) 0%, var(--navy) 55%, var(--teal-700) 100%); }
@media (min-width: 768px) { .auth-side { display: block; } }
.auth-side .shape { position: absolute; border-radius: 1.5rem; transform: rotate(45deg); }
.auth-side .shape.s1 { right: -4rem; top: 2.5rem; height: 18rem; width: 18rem; background: rgba(255,255,255,0.05); }
.auth-side .shape.s2 { right: -2.5rem; top: 10rem; height: 14rem; width: 14rem; background: var(--teal-200); }
.auth-side .shape.s3 { right: 7rem; bottom: 1.5rem; height: 10rem; width: 10rem; border-radius: 1rem; background: rgba(255,255,255,0.05); }
.auth-side .shape.s4 { left: 2.5rem; bottom: 6rem; height: 6rem; width: 6rem; border-radius: 0.75rem; background: var(--teal-100); }
.auth-side-inner { position: relative; display: flex; height: 100%; flex-direction: column; align-items: center; justify-content: center; padding: 3rem; text-align: center; }
.auth-side-inner img { height: 2.5rem; margin-bottom: 1.5rem; }
.auth-side-brand { display: flex; align-items: center; gap: 0.65rem; margin-bottom: 1.5rem; }
.auth-side-brand span { font-size: 1.5rem; font-weight: 800; color: #fff; }
.auth-side-inner p { max-width: 20rem; font-size: 0.875rem; color: rgba(255,255,255,0.6); }

.qr-box { margin-top: 1.5rem; border-radius: var(--radius-2xl); border: 1px solid var(--slate-200); background: #fff; padding: 1.25rem; text-align: center; }
.qr-box img { margin: 0 auto 0.75rem; height: 11rem; width: 11rem; border-radius: var(--radius-lg); border: 1px solid var(--slate-100); padding: 0.25rem; }
.qr-secret { display: block; word-break: break-all; border-radius: 0.25rem; background: var(--slate-50); padding: 0.25rem 0.5rem; font-size: 0.68rem; color: rgba(10,50,70,0.7); font-family: ui-monospace, monospace; }

/* --------------------------- Utilitários gerais ------------------------- */

.flex { display: flex; } .items-center { align-items: center; } .justify-between { justify-content: space-between; }
.gap-1 { gap: 0.25rem; } .gap-2 { gap: 0.5rem; } .gap-3 { gap: 0.75rem; } .gap-4 { gap: 1rem; }
.mt-1 { margin-top: 0.25rem; } .mt-2 { margin-top: 0.5rem; } .mt-3 { margin-top: 0.75rem; } .mt-4 { margin-top: 1rem; } .mt-6 { margin-top: 1.5rem; } .mt-8 { margin-top: 2rem; }
.mb-2 { margin-bottom: 0.5rem; } .mb-3 { margin-bottom: 0.75rem; } .mb-4 { margin-bottom: 1rem; } .mb-6 { margin-bottom: 1.5rem; }
.text-xs { font-size: 0.75rem; } .text-sm { font-size: 0.875rem; }
.font-medium { font-weight: 500; } .font-semibold { font-weight: 600; } .font-bold { font-weight: 700; }
.text-muted { color: rgba(10,50,70,0.5); }
.grid { display: grid; } .gap-6 { gap: 1.5rem; }
/* Sem isso, uma tabela larga (e-mail comprido + botões que não quebram linha,
   tipo "Reenviar convite") força a coluna a crescer além do 1fr e empurra a
   próxima coluna pra fora da tela — foi o que causava o card verde ficar
   cortado/sobreposto na tela de Usuários. min-width:0 deixa a coluna encolher
   e rolar por dentro em vez de estourar o grid. */
.grid > * { min-width: 0; }
@media (min-width: 1024px) { .lg-grid-cols-2 { grid-template-columns: repeat(2, 1fr); } .lg-grid-cols-3 { grid-template-columns: repeat(3, 1fr); } .lg-col-span-2 { grid-column: span 2; } }
.max-w-lg { max-width: 32rem; } .max-w-2xl { max-width: 42rem; }
.w-full { width: 100%; }

/* ------------------------- Monitoramento (NOC) --------------------------- */
/* Grade de cards feita pra ser lida de longe / por qualquer pessoa da equipe:
   status em cor forte + ponto pulsando, sem precisar ler uma tabela densa. */

.live-dot { display: inline-block; height: 0.4rem; width: 0.4rem; border-radius: 999px; background: var(--teal); margin-right: 0.3rem; animation: hostPulseTeal 2s infinite; }

.kpi-card-teal { border-color: var(--teal-200); }
.kpi-card-red { border-color: var(--red-200); }

.hosts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }

.host-card {
  position: relative;
  display: flex; flex-direction: column; gap: 0.75rem;
  border-radius: var(--radius-2xl);
  border: 1px solid rgba(226,232,240,0.8);
  border-left: 5px solid var(--slate-300);
  background: #fff;
  padding: 1.1rem 1.15rem;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}
.host-card:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(10,50,70,0.1); }
.host-card.status-ONLINE { border-left-color: var(--teal); }
.host-card.status-OFFLINE { border-left-color: var(--red-500); background: linear-gradient(180deg, var(--red-50) 0%, #fff 45%); }
.host-card.status-UNKNOWN { border-left-color: var(--slate-300); }

.host-card-badge { position: absolute; top: 0.9rem; right: 0.9rem; }

.host-card-top { display: flex; align-items: center; gap: 0.7rem; padding-right: 4.5rem; }
.host-dot { flex-shrink: 0; height: 0.85rem; width: 0.85rem; border-radius: 999px; background: var(--slate-300); }
.host-card.status-ONLINE .host-dot { background: var(--teal); animation: hostPulseTeal 2s infinite; }
.host-card.status-OFFLINE .host-dot { background: var(--red-500); animation: hostPulseRed 1.1s infinite; }
@keyframes hostPulseTeal { 0% { box-shadow: 0 0 0 0 rgba(68,160,131,0.45); } 70% { box-shadow: 0 0 0 9px rgba(68,160,131,0); } 100% { box-shadow: 0 0 0 0 rgba(68,160,131,0); } }
@keyframes hostPulseRed { 0% { box-shadow: 0 0 0 0 rgba(239,68,68,0.55); } 70% { box-shadow: 0 0 0 11px rgba(239,68,68,0); } 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); } }

.host-card-name { min-width: 0; }
.host-card-name .font-medium { font-size: 0.95rem; line-height: 1.25; }
.host-card-name .mono { font-family: ui-monospace, monospace; font-size: 0.72rem; }

.host-card-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.tag { display: inline-flex; align-items: center; gap: 0.25rem; border-radius: var(--radius-full); background: var(--slate-100); color: rgba(10,50,70,0.6); padding: 0.15rem 0.55rem; font-size: 0.68rem; font-weight: 500; }
.tag-company { background: var(--blue-50); color: var(--blue-700); }

.host-card-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.5rem 0.75rem; border-top: 1px solid var(--slate-100); padding-top: 0.7rem; }
.host-stat { display: flex; flex-direction: column; gap: 0.15rem; }
.host-stat-label { font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.04em; color: rgba(10,50,70,0.4); }
.host-stat-value { font-size: 0.9rem; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--navy); }
.host-stat-value.latency-good { color: var(--teal-700); }
.host-stat-value.latency-warn { color: var(--amber-700); }
.host-stat-value.latency-bad { color: var(--red-700); }
.host-note { font-size: 0.68rem; color: rgba(10,50,70,0.45); border-top: 1px dashed var(--slate-200); padding-top: 0.5rem; }

.history-strip { display: flex; gap: 2px; }
.h-block { flex: 1; min-width: 3px; height: 16px; border-radius: 2px; background: var(--slate-200); }
.h-block.h-online { background: var(--teal); }
.h-block.h-offline { background: var(--red-500); }

@media (prefers-reduced-motion: reduce) {
  .live-dot, .host-dot { animation: none !important; }
}
