/* ══════════════════════════════════════════════════════════════
   KIT SÊNIOR — layout.css
   Shell, sidebar, nav, topbar
   ══════════════════════════════════════════════════════════════ */

/* ── SHELL ────────────────────────────────────────────────────── */
.shell {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 100vh;
}

/* ── SIDEBAR ──────────────────────────────────────────────────── */
.sidebar {
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  transition: background .2s;
}

/* logo */
.logo {
  padding: 22px 18px 18px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.logo-mark {
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo-sq {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--teal), var(--purple));
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--display);
  font-size: 13px; font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.logo-name {
  font-family: var(--display);
  font-size: 15px;
  color: var(--text);
}
.logo-sub {
  font-size: 9px;
  letter-spacing: .18em;
  color: var(--text-mute);
  text-transform: uppercase;
  margin-top: 2px;
}

/* nav */
.nav {
  flex: 1;
  padding: 12px 10px;
  overflow-y: auto;
}
.nav-section-label {
  font-size: 9px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--text-mute);
  padding: 8px 8px 4px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: var(--r);
  cursor: pointer;
  font-size: 11px;
  color: var(--text-dim);
  border: 1px solid transparent;
  margin-bottom: 1px;
  transition: all .15s;
  text-decoration: none;
}
.nav-item:hover {
  background: rgba(45,154,176,0.06);
  color: var(--text);
}
.nav-item.active {
  background: rgba(45,154,176,0.1);
  border-color: var(--border2);
  color: var(--teal);
}
.nav-dot {
  width: 20px; height: 20px;
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
  flex-shrink: 0;
}
.nav-badge {
  margin-left: auto;
  font-size: 9px;
  padding: 1px 6px;
  border-radius: 10px;
  font-weight: 700;
  background: rgba(212,133,26,0.15);
  color: var(--amber);
}

/* sidebar footer */
.sidebar-footer {
  padding: 14px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.api-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}
.api-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--text-mute);
  transition: background .3s;
}
.api-dot.online  { background: var(--green); box-shadow: 0 0 6px rgba(29,184,122,.4); }
.api-dot.offline { background: var(--red); }
.api-label { font-size: 10px; color: var(--text-dim); flex: 1; }
.api-url {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border2);
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 9px;
  padding: 5px 8px;
  outline: none;
  border-radius: var(--r);
  margin-top: 4px;
  transition: border-color .15s;
}
.api-url:focus { border-color: var(--teal); }

/* ── MAIN ─────────────────────────────────────────────────────── */
.main {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* topbar */
.topbar {
  height: 52px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 28px;
  background: var(--bg2);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 40;
  transition: background .2s;
}
.topbar-title {
  font-family: var(--display);
  font-size: 14px;
  color: var(--text);
}
.topbar-sep { flex: 1; }

/* theme toggle */
.theme-toggle {
  width: 32px; height: 32px;
  border-radius: var(--r);
  border: 1px solid var(--border2);
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  transition: all .15s;
}
.theme-toggle:hover {
  border-color: var(--teal);
  color: var(--teal);
}

/* views */
.view { display: none; padding: 28px 28px 48px; }
.view.active { display: block; }

/* section label */
.sec-label {
  font-size: 9px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.sec-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ══════════════════════════════════════════════════════════════
   NAVBAR PÚBLICA + AUTH + PLANS + FOOTER (Flask pages)
   ══════════════════════════════════════════════════════════════ */

.navbar {
  height: 60px;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 32px;
  gap: 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background .2s;
}
.navbar-brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; flex-shrink: 0;
}
.brand-sq {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--teal), var(--purple));
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--display); font-size: 13px; font-weight: 700; color: #fff;
  flex-shrink: 0;
}
.brand-name { font-family: var(--display); font-size: 15px; color: var(--text); }
.brand-sub  { font-size: 9px; letter-spacing: .16em; text-transform: uppercase; color: var(--text-mute); margin-top: 1px; }

.navbar-links { display: flex; align-items: center; gap: 4px; flex: 1; }
.nav-link { font-size: 11px; color: var(--text-dim); text-decoration: none; padding: 6px 12px; border-radius: var(--r); transition: all .15s; }
.nav-link:hover, .nav-link.active { color: var(--teal); background: rgba(45,154,176,0.07); }

.navbar-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.nav-user { display: flex; align-items: center; gap: 8px; }
.nav-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; border: 1px solid var(--border2); }
.nav-avatar-placeholder { width: 28px; height: 28px; border-radius: 50%; background: rgba(45,154,176,.15); border: 1px solid var(--border2); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: var(--teal); }
.nav-username { font-size: 11px; color: var(--text-dim); }

.plan-badge { font-size: 9px; padding: 2px 7px; border-radius: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.plan-starter { background: rgba(45,154,176,.12); color: var(--teal); border: 1px solid rgba(45,154,176,.25); }
.plan-pro     { background: rgba(124,111,205,.12); color: var(--purple); border: 1px solid rgba(124,111,205,.25); }
.plan-byok    { background: rgba(212,133,26,.12); color: var(--amber); border: 1px solid rgba(212,133,26,.25); }
.plan-free    { background: rgba(232,237,242,.06); color: var(--text-mute); border: 1px solid var(--border); }

.btn-nav-outline { font-size: 10px; padding: 6px 14px; border-radius: var(--r); border: 1px solid var(--border2); background: transparent; color: var(--text-dim); text-decoration: none; transition: all .15s; white-space: nowrap; }
.btn-nav-outline:hover { border-color: var(--teal); color: var(--teal); }

.btn-nav-primary { font-size: 10px; padding: 6px 14px; border-radius: var(--r); border: 1px solid rgba(45,154,176,.4); background: rgba(45,154,176,.1); color: var(--teal); text-decoration: none; transition: all .15s; white-space: nowrap; }
.btn-nav-primary:hover { background: rgba(45,154,176,.18); }

/* ── FLASH ──────────────────────────────────────────────────── */
.flash-container { padding: 8px 32px 0; }
.flash { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; border-radius: var(--r); font-size: 11px; margin-bottom: 6px; border: 1px solid var(--border); background: var(--surface); color: var(--text); }
.flash-success { border-color: rgba(29,184,122,.3); background: rgba(29,184,122,.06); }
.flash-danger  { border-color: rgba(217,79,79,.3);  background: rgba(217,79,79,.06); }
.flash-warning { border-color: rgba(212,133,26,.3); background: rgba(212,133,26,.06); }
.flash-info    { border-color: rgba(45,154,176,.3); background: rgba(45,154,176,.06); }
.flash-close { background: none; border: none; cursor: pointer; color: var(--text-mute); font-size: 16px; line-height: 1; padding: 0 0 0 12px; }

/* ── FOOTER ─────────────────────────────────────────────────── */
.footer { border-top: 1px solid var(--border); margin-top: auto; padding: 20px 32px; background: var(--bg2); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.footer-brand { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--text-mute); }
.footer-name { font-weight: 600; color: var(--text-dim); }
.footer-sep  { color: var(--border2); }
.footer-links { display: flex; gap: 16px; }
.footer-links a { font-size: 10px; color: var(--text-mute); text-decoration: none; transition: color .15s; }
.footer-links a:hover { color: var(--teal); }

/* ── AUTH PAGES ─────────────────────────────────────────────── */
.auth-page { min-height: calc(100vh - 60px); display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.auth-wrap { width: 100%; max-width: 460px; }
.auth-brand { text-align: center; margin-bottom: 28px; }
.auth-brand-sq { width: 40px; height: 40px; background: linear-gradient(135deg, var(--teal), var(--purple)); border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; font-family: var(--display); font-size: 15px; font-weight: 700; color: #fff; margin-bottom: 10px; }
.auth-brand-name { font-family: var(--display); font-size: 18px; color: var(--text); display: block; }
.auth-brand-divider { width: 32px; height: 1px; background: var(--teal); margin: 10px auto 0; opacity: .5; }
.auth-card { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 32px; }
.auth-card-title { font-family: var(--display); font-size: 20px; color: var(--text); margin-bottom: 8px; }
.auth-card-divider { height: 1px; background: var(--border); margin-bottom: 12px; }
.auth-card-sub { font-size: 11px; color: var(--text-dim); line-height: 1.6; margin-bottom: 20px; }

.field-group { margin-bottom: 14px; }
.field-label { display: block; font-size: 9px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-mute); margin-bottom: 5px; }
.field-input { width: 100%; background: var(--bg); border: 1px solid var(--border2); color: var(--text); font-family: var(--mono); font-size: 11px; padding: 9px 12px; border-radius: var(--r); outline: none; transition: border-color .15s; }
.field-input:focus { border-color: var(--teal); box-shadow: 0 0 0 2px rgba(45,154,176,.08); }
.field-error { font-size: 9px; color: var(--red); display: block; margin-top: 3px; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.btn-primary { display: block; width: 100%; padding: 11px; background: linear-gradient(135deg, var(--teal), var(--blue)); border: none; border-radius: var(--r); color: #fff; font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; cursor: pointer; transition: opacity .2s, transform .2s; }
.btn-primary:hover { opacity: .9; transform: translateY(-1px); }

.divider-or { text-align: center; font-size: 10px; color: var(--text-mute); margin: 18px 0; position: relative; }
.divider-or::before, .divider-or::after { content: ''; position: absolute; top: 50%; width: calc(50% - 50px); height: 1px; background: var(--border); }
.divider-or::before { left: 0; }
.divider-or::after  { right: 0; }

.btn-social { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 10px; border-radius: var(--r); border: 1px solid var(--border2); font-size: 11px; font-weight: 600; cursor: pointer; text-decoration: none; transition: all .15s; margin-bottom: 8px; }
.btn-google   { background: #fff; color: #444; border-color: #ddd; }
.btn-google:hover { background: #f8f8f8; }
.btn-linkedin { background: #0077B5; color: #fff; border-color: #0077B5; }
.btn-linkedin:hover { background: #005f8e; }

.auth-footer-link { text-align: center; margin-top: 20px; border-top: 1px solid var(--border); padding-top: 16px; font-size: 11px; color: var(--text-dim); }
.auth-link-accent { color: var(--teal); }

/* ── PLANS PAGE ─────────────────────────────────────────────── */
.plans-page { max-width: 1100px; margin: 0 auto; padding: 48px 32px; }
.plans-header { text-align: center; margin-bottom: 48px; }
.plans-title { font-family: var(--display); font-size: 32px; color: var(--text); margin-bottom: 10px; }
.plans-sub   { font-size: 13px; color: var(--text-dim); line-height: 1.6; }

.plans-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 40px; }
@media (max-width: 768px) { .plans-grid { grid-template-columns: 1fr; } }

.plan-card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 28px; position: relative; transition: border-color .2s, transform .2s; }
.plan-card:hover { border-color: var(--border2); transform: translateY(-2px); }
.plan-featured { border-color: rgba(45,154,176,.4); background: rgba(45,154,176,.03); }

.plan-badge-top { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); background: var(--teal); color: #fff; font-size: 9px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: 3px 12px; border-radius: 10px; }
.plan-name     { font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--text-mute); margin-bottom: 12px; }
.plan-price    { display: flex; align-items: baseline; gap: 2px; margin-bottom: 16px; }
.plan-currency { font-size: 16px; color: var(--text-dim); }
.plan-amount   { font-family: var(--display); font-size: 42px; color: var(--text); line-height: 1; }
.plan-period   { font-size: 11px; color: var(--text-mute); }
.plan-divider  { height: 1px; background: var(--border); margin-bottom: 20px; }

.plan-features { list-style: none; padding: 0; margin-bottom: 24px; display: flex; flex-direction: column; gap: 10px; }
.plan-feature  { display: flex; align-items: flex-start; gap: 8px; font-size: 11px; color: var(--text-dim); line-height: 1.5; }
.feat-check { color: var(--green); font-size: 12px; flex-shrink: 0; margin-top: 1px; }
.feat-gold  { color: var(--amber); }

.btn-plan         { display: block; width: 100%; padding: 11px; text-align: center; border: 1px solid var(--border2); border-radius: var(--r); background: transparent; color: var(--text-dim); font-size: 11px; font-weight: 600; text-decoration: none; transition: all .15s; cursor: pointer; }
.btn-plan:hover   { border-color: var(--teal); color: var(--teal); }
.btn-plan-primary { background: rgba(45,154,176,.1); border-color: rgba(45,154,176,.4); color: var(--teal); }
.btn-plan-primary:hover { background: rgba(45,154,176,.18); }
.btn-plan-current { display: block; width: 100%; padding: 11px; text-align: center; border-radius: var(--r); font-size: 11px; font-weight: 600; color: var(--text-mute); background: var(--surface2); border: 1px solid var(--border); }

.demo-banner { display: flex; align-items: center; justify-content: space-between; gap: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 20px 28px; flex-wrap: wrap; }
.demo-text   { font-size: 12px; color: var(--text-dim); line-height: 1.5; }
.btn-demo    { padding: 10px 20px; border-radius: var(--r); border: 1px solid var(--border2); background: transparent; color: var(--text-dim); font-size: 11px; text-decoration: none; transition: all .15s; white-space: nowrap; }
.btn-demo:hover { border-color: var(--teal); color: var(--teal); }
