/* =====================================================================
   NORTIVA — Design System
   Paleta: base quase-preta + ciano de sinal (#0196b2) como único acento.
   Tipografia: Space Grotesk (display) / Inter (corpo) / JetBrains Mono (dados).
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* cor */
  --bg: #060809;
  --bg-elev-1: #0c1113;
  --bg-elev-2: #12191c;
  --border: rgba(230, 244, 245, 0.09);
  --border-strong: rgba(230, 244, 245, 0.16);
  --text: #eaf3f4;
  --text-muted: #93a6ab;
  --text-faint: #5d6f74;
  --primary: #0196b2;
  --primary-light: #4fd6ee;
  --primary-dim: #026376;
  --ok: #35d399;
  --warn: #f2b84b;
  --danger: #f2665c;

  /* tipografia */
  --font-display: 'Space Grotesk', 'Inter', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* layout */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --container: 1180px;
  --shadow-glow: 0 0 0 1px rgba(1, 150, 178, 0.18), 0 8px 30px -8px rgba(1, 150, 178, 0.35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}
p { margin: 0 0 1em; color: var(--text-muted); }

:focus-visible {
  outline: 2px solid var(--primary-light);
  outline-offset: 2px;
  border-radius: 4px;
}

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.section { padding: 96px 0; }
.section--tight { padding: 56px 0; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary-light);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
}
.eyebrow::before {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 10px 2px rgba(1, 150, 178, 0.7);
}

.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(28px, 3.4vw, 40px); }
.section-head p { font-size: 17px; }

/* ---------------------------- NAVBAR ---------------------------- */

.navbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(6, 8, 9, 0.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--border);
}
.navbar__inner {
  max-width: var(--container); margin: 0 auto; padding: 16px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 19px; }
.brand__mark {
  width: 30px; height: 30px; border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), #024652);
  display: flex; align-items: center; justify-content: center;
  color: #eafcff; font-size: 14px; font-weight: 700;
  box-shadow: 0 0 18px -2px rgba(1, 150, 178, 0.75);
}
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { color: var(--text-muted); font-size: 14.5px; font-weight: 500; transition: color .15s; }
.nav-links a:hover { color: var(--text); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.nav-toggle { display: none; }

/* ---------------------------- BUTTONS ---------------------------- */

.btn {
  --pad-y: 11px; --pad-x: 20px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: var(--pad-y) var(--pad-x);
  border-radius: 10px;
  font-family: var(--font-body); font-weight: 600; font-size: 14.5px;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, border-color .15s ease, opacity .15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--primary {
  background: linear-gradient(180deg, var(--primary-light), var(--primary));
  color: #032025;
  box-shadow: 0 1px 0 rgba(255,255,255,0.25) inset, 0 8px 22px -8px rgba(1,150,178,0.65);
}
.btn--primary:hover { box-shadow: 0 1px 0 rgba(255,255,255,0.3) inset, 0 10px 28px -6px rgba(1,150,178,0.85); }
.btn--ghost { background: var(--bg-elev-2); color: var(--text); border-color: var(--border-strong); }
.btn--ghost:hover { border-color: var(--primary); color: var(--primary-light); }
.btn--outline { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn--outline:hover { border-color: var(--primary-light); color: var(--primary-light); }
.btn--danger { background: rgba(242,102,92,0.12); color: #ffb3ac; border-color: rgba(242,102,92,0.35); }
.btn--danger:hover { background: rgba(242,102,92,0.2); }
.btn--sm { --pad-y: 7px; --pad-x: 14px; font-size: 13px; }
.btn--block { width: 100%; }
.btn:disabled, .btn--loading { opacity: .6; cursor: not-allowed; transform: none !important; }

/* ---------------------------- HERO ---------------------------- */

.hero { position: relative; overflow: hidden; padding: 108px 0 90px; }
.hero__grid-bg {
  position: absolute; inset: 0; z-index: 0; opacity: .55; pointer-events: none;
}
.hero__inner { position: relative; z-index: 1; max-width: 760px; }
.hero h1 { font-size: clamp(38px, 6vw, 66px); }
.hero h1 .accent {
  background: linear-gradient(90deg, var(--primary-light), var(--primary));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.lead { font-size: 19px; max-width: 560px; margin-bottom: 34px; }
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* -------------------------- CARDS / GLASS -------------------------- */

.card {
  background: var(--bg-elev-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 26px;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.card--glass {
  background: linear-gradient(180deg, rgba(18,25,28,0.7), rgba(12,17,19,0.55));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.card--hover:hover { border-color: rgba(1,150,178,0.45); transform: translateY(-3px); box-shadow: var(--shadow-glow); }

.grid { display: grid; gap: 22px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }

/* Service card */
.svc-card { display: flex; flex-direction: column; height: 100%; }
.svc-card__img {
  width: 100%; aspect-ratio: 16/10; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(1,150,178,0.22), rgba(1,150,178,0.02));
  display: flex; align-items: center; justify-content: center;
  color: var(--primary-light); font-size: 30px; margin-bottom: 18px;
  border: 1px solid var(--border); overflow: hidden;
}
.svc-card__img img { width: 100%; height: 100%; object-fit: cover; }
.svc-card__cat { font-family: var(--font-mono); font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-faint); margin-bottom: 6px; }
.svc-card h3 { font-size: 19px; margin-bottom: 8px; }
.svc-card p { font-size: 14.5px; flex: 1; }
.svc-card__meta { display: flex; align-items: center; justify-content: space-between; margin: 14px 0 18px; font-size: 13.5px; color: var(--text-muted); }
.svc-card__price { font-family: var(--font-mono); color: var(--text); font-size: 17px; font-weight: 500; }
.svc-card__badge { display: inline-block; font-size: 11px; font-family: var(--font-mono); padding: 3px 8px; border-radius: 999px; background: rgba(1,150,178,0.14); color: var(--primary-light); border: 1px solid rgba(1,150,178,0.3); }

/* ---------------------------- PROCESS ---------------------------- */

.process { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }
.process__step { position: relative; padding: 22px 18px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--bg-elev-1); }
.process__num { font-family: var(--font-mono); color: var(--primary-light); font-size: 13px; margin-bottom: 12px; opacity: .85; }
.process__step h4 { font-size: 15.5px; margin-bottom: 6px; }
.process__step p { font-size: 13.5px; margin: 0; }

/* ---------------------------- CTA ---------------------------- */

.cta {
  position: relative; overflow: hidden;
  border-radius: var(--radius-lg);
  padding: 64px 48px;
  text-align: center;
  background: radial-gradient(120% 140% at 50% 0%, rgba(1,150,178,0.25), transparent 60%), var(--bg-elev-1);
  border: 1px solid var(--border-strong);
}
.cta h2 { font-size: clamp(26px, 3.4vw, 38px); margin-bottom: 14px; }
.cta p { max-width: 520px; margin: 0 auto 28px; font-size: 16.5px; }
.cta__actions { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }

/* ---------------------------- FOOTER ---------------------------- */

.footer { border-top: 1px solid var(--border); padding: 48px 0; margin-top: 40px; }
.footer__inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.footer p { margin: 0; font-size: 13.5px; color: var(--text-faint); }

/* ---------------------------- FORMS ---------------------------- */

.auth-shell { min-height: 100dvh; display: grid; place-items: center; padding: 40px 20px; position: relative; }
.auth-card { width: 100%; max-width: 420px; padding: 36px 32px; }
.auth-card h1 { font-size: 26px; margin-bottom: 6px; }
.auth-card > p.lead { margin-bottom: 28px; font-size: 14.5px; }

.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 7px; color: var(--text); }
.field .hint { font-size: 12.5px; color: var(--text-faint); margin-top: 6px; }
.field .error-text { font-size: 12.5px; color: var(--danger); margin-top: 6px; display: none; }
.field.has-error .error-text { display: block; }
.field.has-error input, .field.has-error textarea, .field.has-error select { border-color: var(--danger); }

input, textarea, select {
  width: 100%; background: var(--bg); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: 10px;
  padding: 11px 13px; font-family: var(--font-body); font-size: 14.5px;
  transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: var(--text-faint); }
input:focus, textarea:focus, select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(1,150,178,0.18);
  outline: none;
}
textarea { resize: vertical; min-height: 90px; }
label.checkbox { display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--text-muted); cursor: pointer; }
label.checkbox input { width: auto; }

.form-foot { margin-top: 22px; text-align: center; font-size: 13.5px; color: var(--text-muted); }
.form-foot a { color: var(--primary-light); font-weight: 600; }

/* ---------------------------- BADGES / STATES ---------------------------- */

.badge { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; font-family: var(--font-mono); }
.badge--ok { background: rgba(53,211,153,0.12); color: var(--ok); border: 1px solid rgba(53,211,153,0.3); }
.badge--warn { background: rgba(242,184,75,0.12); color: var(--warn); border: 1px solid rgba(242,184,75,0.3); }
.badge--danger { background: rgba(242,102,92,0.12); color: var(--danger); border: 1px solid rgba(242,102,92,0.3); }
.badge--info { background: rgba(1,150,178,0.12); color: var(--primary-light); border: 1px solid rgba(1,150,178,0.3); }

.state { padding: 60px 20px; text-align: center; color: var(--text-muted); }
.state--error p { color: var(--danger); }
.spinner {
  display: inline-block; width: 22px; height: 22px; margin-bottom: 12px;
  border: 2.5px solid var(--border-strong); border-top-color: var(--primary-light);
  border-radius: 50%; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------- TOASTS ---------------------------- */

.toast-stack { position: fixed; bottom: 22px; right: 22px; z-index: 1000; display: flex; flex-direction: column; gap: 10px; max-width: 340px; }
.toast {
  padding: 13px 16px; border-radius: 10px; font-size: 14px; font-weight: 500;
  background: var(--bg-elev-2); border: 1px solid var(--border-strong);
  box-shadow: 0 12px 30px -10px rgba(0,0,0,0.6);
  opacity: 0; transform: translateY(8px); transition: opacity .22s, transform .22s;
}
.toast--visible { opacity: 1; transform: translateY(0); }
.toast--success { border-color: rgba(53,211,153,0.4); }
.toast--error { border-color: rgba(242,102,92,0.4); }
.toast--info { border-color: rgba(1,150,178,0.4); }

/* ---------------------------- APP SHELL (dashboard/admin) ---------------------------- */

.app-shell { display: grid; grid-template-columns: 250px 1fr; min-height: 100dvh; }
.app-sidebar {
  border-right: 1px solid var(--border); padding: 22px 16px;
  display: flex; flex-direction: column; gap: 4px;
  position: sticky; top: 0; height: 100dvh; overflow-y: auto;
  background: var(--bg-elev-1);
}
.app-sidebar__brand { padding: 8px 10px 22px; }
.app-nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 9px;
  font-size: 14px; font-weight: 500; color: var(--text-muted);
  transition: background .15s, color .15s;
}
.app-nav-link:hover { background: var(--bg-elev-2); color: var(--text); }
.app-nav-link.is-active { background: rgba(1,150,178,0.14); color: var(--primary-light); }
.app-nav-sep { height: 1px; background: var(--border); margin: 12px 6px; }
.app-nav-tag { font-size: 11px; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--text-faint); padding: 14px 12px 6px; }

.app-main { padding: 32px 36px 80px; max-width: 1180px; }
.app-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 30px; flex-wrap: wrap; }
.app-header h1 { font-size: 27px; margin-bottom: 4px; }
.app-header p { margin: 0; }

.stat-card { padding: 22px; }
.stat-card__label { font-size: 12.5px; color: var(--text-faint); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 10px; }
.stat-card__value { font-family: var(--font-display); font-size: 30px; font-weight: 700; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
thead th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-faint); font-weight: 600; padding: 10px 14px; border-bottom: 1px solid var(--border); }
tbody td { padding: 14px; border-bottom: 1px solid var(--border); color: var(--text); vertical-align: middle; }
tbody tr:hover { background: rgba(255,255,255,0.015); }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--bg-elev-1); }
.table-toolbar { display: flex; justify-content: space-between; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.table-toolbar input, .table-toolbar select { width: auto; min-width: 200px; }

.mono { font-family: var(--font-mono); }
.muted { color: var(--text-muted); }
.divider { height: 1px; background: var(--border); margin: 28px 0; }

/* modal */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(3,5,6,0.72); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; z-index: 200; padding: 20px;
}
.modal { width: 100%; max-width: 480px; padding: 28px; max-height: 90vh; overflow-y: auto; }
.modal h3 { margin-bottom: 18px; }
.modal__actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.hidden { display: none !important; }

/* product detail page */
.pd-layout { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: start; }
.pd-gallery { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); aspect-ratio: 4/3; background: linear-gradient(135deg, rgba(1,150,178,0.2), rgba(1,150,178,0.02)); display: flex; align-items: center; justify-content: center; color: var(--primary-light); font-size: 44px; }
.pd-gallery img { width: 100%; height: 100%; object-fit: cover; }
.pd-panel { position: sticky; top: 100px; }
.pd-price { font-family: var(--font-mono); font-size: 30px; margin: 14px 0 4px; }
.pd-meta-row { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.pd-meta-row span:first-child { color: var(--text-faint); }

/* -------------------------------- RESPONSIVE -------------------------------- */

#sidebar-toggle { display: none; }

@media (max-width: 980px) {
  #sidebar-toggle { display: inline-flex; margin-bottom: 16px; }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .process { grid-template-columns: repeat(1, 1fr); }
  .pd-layout { grid-template-columns: 1fr; }
  .pd-panel { position: static; }
  .app-shell { grid-template-columns: 1fr; }
  .app-sidebar {
    position: fixed; z-index: 150; left: 0; top: 0; width: 250px;
    transform: translateX(-100%); transition: transform .2s ease;
  }
  .app-sidebar.is-open { transform: translateX(0); box-shadow: 20px 0 40px rgba(0,0,0,0.5); }
  .app-main { padding: 90px 20px 60px; }
}

@media (max-width: 720px) {
  .nav-links { display: none; }
  .grid--4, .grid--3, .grid--2 { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
  .cta { padding: 44px 22px; }
  .footer__inner { flex-direction: column; align-items: flex-start; }
}
