:root {
  /* Marca */
  --brand: #0698F4;          /* cyan primário */
  --brand-2: #2261E8;        /* azul royal (CTA) */
  --brand-3: #5935E7;        /* violeta (fim do gradiente) */
  --brand-light: #3FA9FF;    /* cyan claro (foco/realce) */

  /* Fundos (navy) */
  --bg: #000416;             /* base */
  --bg-2: #040813;           /* seções */
  --card: #0A0E28;           /* cards / inputs */
  --card-2: #0C1234;         /* painéis elevados */
  --border: #16224A;
  --border-2: #1D2C5E;

  /* Texto */
  --text: #F7F7F8;
  --muted: #AAAAAA;
  --subtle: #888888;

  /* Semânticas */
  --green: #4CAF50;
  --red: #FF5555;
  --gold: #FFD700;

  --radius: 14px;
  --shadow: 0 10px 40px rgba(0,0,0,.45);
  --grad: linear-gradient(135deg, #0698F4 0%, #2261E8 50%, #5935E7 100%);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-light); }

.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 20px; }

.brand-gradient { background: var(--grad); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 10px; border: 1px solid transparent;
  font-weight: 600; font-size: 15px; cursor: pointer; transition: .2s;
  background: var(--card-2); color: var(--text);
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--brand-2);
  color: #fff;
}
.btn-primary:hover { background: var(--brand); box-shadow: 0 8px 24px rgba(6,152,244,.35); color: #fff; }
.btn-ghost { background: transparent; border-color: var(--border-2); color: var(--text); }
.btn-ghost:hover { border-color: var(--brand); }
.btn-danger { background: var(--red); color: #2a0000; }
.btn-block { width: 100%; justify-content: center; }
.btn-sm { padding: 7px 14px; font-size: 13px; }

/* ---------- Navbar ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(10px);
  background: rgba(0,4,22,.8);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; color: var(--text); }
.logo-mark {
  width: 34px; height: 34px; border-radius: 9px;
  background: #060a1a url('/imgs/icon.jpg') center/cover no-repeat;
  display: grid; place-items: center;
  color: transparent; font-size: 0; /* esconde o "P" de fallback */
  overflow: hidden;
  flex-shrink: 0;
}
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a { color: var(--muted); font-weight: 500; }
.nav-links a:hover { color: var(--text); }

/* ---------- Hero ---------- */
.hero { padding: 70px 0 70px; text-align: center; position: relative; overflow: hidden; }
.hero-logo {
  width: 160px; height: auto; border-radius: 22px; margin: 0 auto 26px;
  display: block; box-shadow: 0 12px 40px rgba(6,152,244,.18);
  border: 1px solid var(--border);
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 50% at 50% 0%, rgba(34,97,232,.22), transparent 70%);
  pointer-events: none;
}
.badge {
  display: inline-block; padding: 6px 14px; border-radius: 999px;
  background: var(--card-2); border: 1px solid var(--border);
  color: var(--brand-light); font-size: 13px; font-weight: 600; margin-bottom: 22px;
}
.hero h1 { font-size: clamp(34px, 5vw, 58px); line-height: 1.1; font-weight: 800; letter-spacing: -.02em; }
.hero h1 .grad {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero p { color: var(--muted); font-size: 19px; max-width: 640px; margin: 22px auto 34px; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- Sections ---------- */
.section { padding: 70px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 50px; }
.section-head h2 { font-size: clamp(28px, 3.5vw, 40px); font-weight: 800; letter-spacing: -.02em; }
.section-head p { color: var(--muted); margin-top: 12px; font-size: 17px; }

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

.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px;
}
.card .icon {
  width: 46px; height: 46px; border-radius: 11px; margin-bottom: 16px;
  background: var(--card-2); display: grid; place-items: center; font-size: 22px;
}
.card h3 { font-size: 19px; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 15px; }

/* ---------- Pricing ---------- */
.price-card { text-align: center; max-width: 420px; margin: 0 auto; position: relative; }
.price-card.featured { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand), var(--shadow); }
.price { font-size: 52px; font-weight: 800; margin: 14px 0; }
.price span { font-size: 18px; color: var(--muted); font-weight: 500; }
.price-features { list-style: none; text-align: left; margin: 24px 0; display: grid; gap: 12px; }
.price-features li { display: flex; gap: 10px; color: var(--muted); }
.price-features li::before { content: '✓'; color: var(--green); font-weight: 800; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); padding: 40px 0; color: var(--muted); margin-top: 40px; }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; }

/* ---------- Auth / forms ---------- */
.auth-wrap {
  min-height: 100vh; display: grid; place-items: center; padding: 40px 20px;
  background: radial-gradient(circle at 50% 40%, #141E50 0%, #040813 100%);
}
.auth-card { width: 100%; max-width: 430px; }
.auth-card h1 { font-size: 26px; margin-bottom: 6px; }
.auth-card .sub { color: var(--muted); margin-bottom: 26px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 14px; margin-bottom: 7px; color: var(--muted); }
.field input, .field textarea, .field select {
  width: 100%; padding: 12px 14px; border-radius: 10px;
  background: var(--bg-2); border: 1px solid var(--border); color: var(--text);
  font-size: 15px; font-family: inherit;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--brand-light); box-shadow: 0 0 0 3px rgba(63,169,255,.15);
}
.field-row { display: flex; gap: 8px; align-items: center; }
.checkbox { display: flex; gap: 9px; align-items: flex-start; font-size: 14px; color: var(--muted); }
.checkbox input { width: auto; margin-top: 4px; }

.alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 18px; font-size: 14px; }
.alert-error { background: rgba(255,85,85,.12); border: 1px solid rgba(255,85,85,.4); color: #ffb3b3; }
.alert-success { background: rgba(76,175,80,.12); border: 1px solid rgba(76,175,80,.4); color: #a5e0a8; }
.alert-info { background: rgba(34,97,232,.14); border: 1px solid rgba(34,97,232,.45); color: #9fbcff; }

.muted { color: var(--muted); }
.center { text-align: center; }
.mt { margin-top: 18px; }

/* ---------- Dashboard ---------- */
.dash { min-height: 100vh; }
.dash-main { padding: 40px 0; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 28px; }
.stat { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.stat .label { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .05em; }
.stat .value { font-size: 34px; font-weight: 800; margin-top: 6px; }

.pill { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.pill-active { background: rgba(76,175,80,.16); color: #a5e0a8; }
.pill-inactive { background: rgba(170,170,170,.15); color: var(--muted); }
.pill-canceled { background: rgba(255,215,0,.15); color: #ffe680; }
.pill-past_due { background: rgba(255,85,85,.15); color: #ffb3b3; }

.license-box {
  font-family: 'SF Mono', Menlo, monospace; font-size: 22px; letter-spacing: 2px;
  background: var(--bg-2); border: 1px dashed var(--border-2); border-radius: 10px;
  padding: 16px 20px; display: flex; justify-content: space-between; align-items: center;
}

/* ---------- Tables (admin) ---------- */
.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--border); font-size: 14px; }
th { color: var(--muted); font-weight: 600; text-transform: uppercase; font-size: 12px; letter-spacing: .04em; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--card-2); }

.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.tabs { display: flex; gap: 6px; margin-bottom: 26px; border-bottom: 1px solid var(--border); }
.tabs a { padding: 12px 18px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; }
.tabs a.active { color: var(--text); border-bottom-color: var(--brand); }

.inline-form { display: inline-flex; gap: 6px; align-items: center; }
.inline-form input { width: 70px; padding: 6px 10px; }

@media (max-width: 860px) {
  .grid-3, .grid-2, .stat-grid { grid-template-columns: 1fr; }
  .nav-links { gap: 14px; }
  .nav-links .hide-mobile { display: none; }
}
