/* ============================================================
   NucciFerrari Design System — Portal
   Paleta: Verde Matrix #00FF41 | Evernote #2DBE60 | Aston #004225
   Fundo: #0B0F14
   ============================================================ */

:root {
  --bg:        #0B0F14;
  --bg-soft:   #09100c;
  --panel:     rgba(255,255,255,.04);
  --panel-2:   rgba(255,255,255,.07);
  --line:      rgba(255,255,255,.08);
  --text:      #f5f7f6;
  --muted:     #9aa4a0;
  --matrix:    #00FF41;
  --evernote:  #2DBE60;
  --aston:     #004225;
  --mint:      #7EE787;
  --danger:    #e74c3c;
  --warning:   #f39c12;
  --shadow:    0 0 40px rgba(45,190,96,.12);
  --radius:    20px;
  --radius-sm: 12px;
  --max:       1280px;
  --sidebar-w: 220px;
  --topbar-h:  64px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(0,255,65,.06), transparent 30%),
    radial-gradient(circle at bottom right, rgba(45,190,96,.06), transparent 25%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.6;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(45,190,96,.25); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(45,190,96,.45); }

/* ── Topbar ── */
.nf-topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--topbar-h);
  backdrop-filter: blur(18px);
  background: rgba(11,15,20,.82);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px;
  gap: 16px;
}

.nf-brand {
  display: flex; align-items: center; gap: 12px; flex: none;
}
.nf-brand-mark {
  width: 38px; height: 38px; border-radius: 12px;
  background: var(--evernote);
  display: grid; place-items: center;
  box-shadow: 0 0 16px rgba(45,190,96,.28);
  flex: none;
}
.nf-brand-mark .n2 {
  color: #000; font-weight: 900; font-size: 1.2rem; line-height: 1; position: relative;
}
.nf-brand-mark .n2 sup {
  position: absolute; right: -10px; top: -5px; font-size: .6rem; font-weight: 900;
}
.nf-brand-name {
  font-size: 1.05rem; font-weight: 700; letter-spacing: .07em;
  background: linear-gradient(90deg, var(--matrix), var(--evernote), var(--mint));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.nf-brand-sub {
  font-size: .6rem; color: #7f8c86; letter-spacing: .28em; text-transform: uppercase; margin-top: 2px;
}

.nf-topbar-nav {
  display: flex; gap: 6px; align-items: center; flex: 1; justify-content: center;
}
.nf-topbar-nav a {
  padding: 6px 14px; border-radius: 8px; font-size: .82rem; font-weight: 500;
  color: var(--muted); text-transform: uppercase; letter-spacing: .12em;
  transition: color .18s, background .18s;
}
.nf-topbar-nav a:hover,
.nf-topbar-nav a.active {
  color: var(--mint); background: rgba(45,190,96,.08);
}

.nf-topbar-actions { display: flex; gap: 10px; align-items: center; flex: none; }

/* ── Botões ── */
.nf-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 18px; border-radius: 10px; border: 1px solid transparent;
  font-weight: 700; text-transform: uppercase; letter-spacing: .1em; font-size: .78rem;
  cursor: pointer; transition: .18s ease; white-space: nowrap;
}
.nf-btn-primary {
  background: var(--evernote); color: #000;
  box-shadow: 0 0 20px rgba(45,190,96,.2);
}
.nf-btn-primary:hover { background: var(--matrix); transform: translateY(-1px); }
.nf-btn-secondary {
  background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.12); color: #fff;
}
.nf-btn-secondary:hover { background: rgba(255,255,255,.10); transform: translateY(-1px); }
.nf-btn-ghost {
  background: transparent; border-color: rgba(45,190,96,.3); color: var(--evernote);
}
.nf-btn-ghost:hover { background: rgba(45,190,96,.08); }
.nf-btn-danger {
  background: rgba(231,76,60,.12); border-color: rgba(231,76,60,.3); color: var(--danger);
}
.nf-btn-danger:hover { background: rgba(231,76,60,.22); }
.nf-btn:disabled { opacity: .45; cursor: not-allowed; transform: none !important; }

/* ── Layout principal ── */
.nf-layout {
  display: flex; min-height: 100vh; padding-top: var(--topbar-h);
}

/* ── Sidebar ── */
.nf-sidebar {
  width: var(--sidebar-w); flex: none;
  position: fixed; top: var(--topbar-h); left: 0; bottom: 0;
  overflow-y: auto;
  background: rgba(0,0,0,.28);
  border-right: 1px solid var(--line);
  padding: 20px 12px;
  display: flex; flex-direction: column; gap: 4px;
}
.nf-sidebar-label {
  font-size: .65rem; text-transform: uppercase; letter-spacing: .3em;
  color: #4a5550; padding: 10px 10px 4px; margin-top: 8px;
}
.nf-sidebar a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 10px;
  font-size: .85rem; color: var(--muted);
  transition: color .18s, background .18s;
}
.nf-sidebar a:hover { color: var(--mint); background: rgba(45,190,96,.07); }
.nf-sidebar a.active {
  color: var(--matrix); background: rgba(0,255,65,.08);
  font-weight: 600;
}
.nf-sidebar a .icon { font-size: 1em; width: 18px; text-align: center; }

/* ── Conteúdo principal ── */
.nf-main {
  flex: 1; margin-left: var(--sidebar-w);
  padding: 32px 36px;
  min-width: 0;
}

/* ── Cards ── */
.nf-card {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: var(--radius);
  padding: 24px 28px;
  backdrop-filter: blur(8px);
}
.nf-card-title {
  font-size: 1.1rem; font-weight: 700; color: var(--text);
  display: flex; align-items: center; gap: 10px;
}
.nf-card-sub { font-size: .85rem; color: var(--muted); margin-top: 4px; }

/* ── Page header ── */
.nf-page-header { margin-bottom: 28px; }
.nf-page-header h1 {
  font-size: 1.7rem; font-weight: 800; letter-spacing: -.02em;
  background: linear-gradient(90deg, var(--matrix), var(--evernote));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  display: inline-block;
}
.nf-page-header .sub { color: var(--muted); font-size: .88rem; margin-top: 4px; }

/* ── Grid ── */
.nf-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.nf-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.nf-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

/* ── Stat cards ── */
.nf-stat {
  border: 1px solid var(--line); background: var(--panel);
  border-radius: var(--radius-sm); padding: 18px 20px;
}
.nf-stat-value { font-size: 1.8rem; font-weight: 800; color: var(--matrix); line-height: 1; }
.nf-stat-label { font-size: .78rem; color: var(--muted); margin-top: 6px; text-transform: uppercase; letter-spacing: .15em; }

/* ── Badges ── */
.nf-badge {
  display: inline-flex; align-items: center; padding: 3px 10px;
  border-radius: 999px; font-size: .72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .12em;
}
.nf-badge-green  { background: rgba(45,190,96,.12); color: #4ade80; border: 1px solid rgba(45,190,96,.2); }
.nf-badge-matrix { background: rgba(0,255,65,.08);  color: var(--matrix); border: 1px solid rgba(0,255,65,.2); }
.nf-badge-muted  { background: rgba(255,255,255,.05); color: var(--muted); border: 1px solid var(--line); }
.nf-badge-red    { background: rgba(231,76,60,.12); color: #f87171; border: 1px solid rgba(231,76,60,.2); }
.nf-badge-yellow { background: rgba(243,156,18,.12); color: #fbbf24; border: 1px solid rgba(243,156,18,.2); }

/* ── Tabelas ── */
.nf-table-wrap { overflow-x: auto; border-radius: var(--radius-sm); border: 1px solid var(--line); }
.nf-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.nf-table thead th {
  padding: 12px 16px; text-align: left;
  background: rgba(0,0,0,.3); color: var(--matrix);
  font-size: .72rem; text-transform: uppercase; letter-spacing: .18em;
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
.nf-table tbody tr { border-bottom: 1px solid rgba(255,255,255,.04); transition: background .15s; }
.nf-table tbody tr:last-child { border-bottom: none; }
.nf-table tbody tr:hover { background: rgba(45,190,96,.04); }
.nf-table td { padding: 11px 16px; color: var(--text); vertical-align: middle; }
.nf-table td.muted { color: var(--muted); }

/* ── Formulários ── */
.nf-form-group { display: flex; flex-direction: column; gap: 6px; }
.nf-label { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .12em; }
.nf-input, .nf-select, .nf-textarea {
  background: rgba(0,0,0,.35); border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px; color: var(--text); padding: 10px 14px;
  font-size: .9rem; font-family: inherit; width: 100%;
  transition: border-color .18s;
}
.nf-input:focus, .nf-select:focus, .nf-textarea:focus {
  outline: none; border-color: var(--evernote);
  box-shadow: 0 0 0 3px rgba(45,190,96,.12);
}
.nf-textarea { resize: vertical; min-height: 100px; }

/* ── Chip / tag ── */
.nf-chip {
  display: inline-flex; align-items: center; padding: 8px 14px; border-radius: 999px;
  background: rgba(45,190,96,.08); border: 1px solid rgba(45,190,96,.18);
  color: #bbf7d0; font-size: .72rem; text-transform: uppercase; letter-spacing: .25em;
}

/* ── Divisor ── */
.nf-divider {
  height: 1px; background: var(--line); margin: 24px 0;
}

/* ── Alert / toast ── */
.nf-alert {
  padding: 12px 16px; border-radius: 10px; font-size: .88rem;
  display: flex; align-items: flex-start; gap: 10px;
}
.nf-alert-info    { background: rgba(45,190,96,.08); border: 1px solid rgba(45,190,96,.2); color: #bbf7d0; }
.nf-alert-warning { background: rgba(243,156,18,.08); border: 1px solid rgba(243,156,18,.2); color: #fde68a; }
.nf-alert-error   { background: rgba(231,76,60,.08); border: 1px solid rgba(231,76,60,.2); color: #fca5a5; }

/* ── Status dot ── */
.nf-dot {
  width: 8px; height: 8px; border-radius: 999px; display: inline-block; flex: none;
}
.nf-dot-green  { background: var(--evernote); box-shadow: 0 0 6px rgba(45,190,96,.6); }
.nf-dot-red    { background: var(--danger); box-shadow: 0 0 6px rgba(231,76,60,.6); }
.nf-dot-yellow { background: var(--warning); box-shadow: 0 0 6px rgba(243,156,18,.6); }
.nf-dot-muted  { background: #4a5550; }

/* ── Pulse animation (status online) ── */
@keyframes nf-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .6; transform: scale(1.3); }
}
.nf-dot-pulse { animation: nf-pulse 2s ease-in-out infinite; }

/* ── Login / SSO page ── */
.nf-login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.nf-login-box {
  width: 100%; max-width: 400px;
  border: 1px solid var(--line); border-radius: 24px;
  background: rgba(255,255,255,.03); backdrop-filter: blur(16px);
  padding: 40px 36px; text-align: center;
}
.nf-login-logo { margin-bottom: 28px; }
.nf-login-title { font-size: 1.3rem; font-weight: 800; margin-bottom: 8px; }
.nf-login-sub { color: var(--muted); font-size: .88rem; margin-bottom: 28px; }
.nf-login-btn-google {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  width: 100%; padding: 13px 20px; border-radius: 12px;
  background: #fff; color: #1f2937; font-weight: 700; font-size: .9rem;
  border: none; cursor: pointer; transition: .18s;
}
.nf-login-btn-google:hover { background: #f3f4f6; transform: translateY(-1px); }
.nf-login-footer { margin-top: 24px; color: #4a5550; font-size: .75rem; }

/* ── Responsivo ── */
@media (max-width: 900px) {
  .nf-sidebar { display: none; }
  .nf-main { margin-left: 0; padding: 20px 18px; }
  .nf-topbar-nav { display: none; }
  .nf-grid-2, .nf-grid-3, .nf-grid-4 { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .nf-main { padding: 16px 14px; }
  .nf-card { padding: 18px 16px; }
}
