/* ============================================================================
   IBO Alfa — Painel de revenda · CSS puro (sem dependências ✕ JS leve)
   ============================================================================ */

:root {
  --brand: #ff8f00;
  --brand-2: #ffb300;
  --grad-brand: linear-gradient(135deg, #ff8f00, #ffb300);
  --sidebar-bg: #0f1a30;
  --sidebar-line: rgba(255, 255, 255, 0.07);
  --bg: #eef2f9;
  --text: #0f172a;
  --muted: #64748b;
  --card: #ffffff;
  --line: #e5e9f2;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 12px 28px -14px rgba(15, 23, 42, 0.18);
  --focus-ring: 0 0 0 3px rgba(255, 143, 0, 0.18);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background:
    radial-gradient(1200px 600px at 100% -10%, rgba(255, 143, 0, 0.08), transparent 60%),
    radial-gradient(1000px 500px at -10% 110%, rgba(139, 92, 246, 0.08), transparent 60%),
    var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }

::selection { background: rgba(255, 143, 0, 0.25); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #c7d0e2; border-radius: 8px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background-color: #aab6cf; }
::-webkit-scrollbar-track { background: transparent; }

/* ------------------------------ Layout geral ------------------------------ */
.layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 250px;
  background:
    radial-gradient(320px 240px at 20% 0%, rgba(255, 143, 0, 0.22), transparent 65%),
    linear-gradient(180deg, #101b33, var(--sidebar-bg));
  color: #e2e8f0;
  display: flex;
  flex-direction: column;
  position: fixed;
  inset: 0 auto 0 0;
  overflow-y: auto;
  border-right: 1px solid var(--sidebar-line);
  z-index: 40;
}

.sidebar .brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 18px 16px;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border-bottom: 1px solid var(--sidebar-line);
}

.brand-logo {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  background: var(--grad-brand);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  box-shadow: 0 4px 14px rgba(255, 143, 0, 0.45);
}

.sidebar .menu-label {
  padding: 16px 18px 5px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #7c8db5;
}

.sidebar nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9.5px 14px;
  margin: 1px 8px;
  border-radius: 9px;
  color: #b8c4dd;
  font-size: 0.92rem;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.sidebar nav a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  transform: translateX(2px);
}

.sidebar nav a.active,
.sidebar nav a.active:hover {
  background: linear-gradient(90deg, rgba(255, 143, 0, 0.28), rgba(255, 143, 0, 0.08));
  color: #fff;
  font-weight: 600;
  box-shadow: inset 2px 0 0 var(--brand);
}

.sidebar .footer {
  margin-top: auto;
  padding: 14px 16px;
  border-top: 1px solid var(--sidebar-line);
  font-size: 0.78rem;
  color: #8a9bbf;
  line-height: 1.7;
}

.sidebar .logout-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9.5px 14px;
  margin: 1px 8px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #b8c4dd;
  font: inherit;
  font-size: 0.92rem;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.sidebar .logout-btn:hover {
  background: rgba(220, 38, 38, 0.12);
  color: #fca5a5;
  transform: translateX(2px);
}

.main {
  margin-left: 250px;
  flex: 1;
  padding: 26px 28px;
  max-width: 1300px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}

.topbar h1 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.topbar-left { display: flex; align-items: center; gap: 12px; }

/* Botão de menu (mobile) */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  color: var(--muted);
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: color 0.15s ease, border-color 0.15s ease;
}

.nav-toggle:hover { color: var(--brand); border-color: var(--brand); }

/* ------------------------------ Cards / tabelas --------------------------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}

.card h2 {
  margin: 0 0 14px;
  font-size: 1.02rem;
  font-weight: 700;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.table-wrap { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

th, td {
  text-align: left;
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

thead th {
  background: #f7f9fd;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
}

tr:hover td { background: #f7f9fd; }

tbody tr:last-child td { border-bottom: 0; }

/* ------------------------------ Formulários ------------------------------- */
.form-group { margin-bottom: 15px; }

label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 0.86rem;
  color: #334155;
}

input[type='text'],
input[type='password'],
input[type='date'],
input[type='number'],
input[type='url'],
textarea,
select {
  width: 100%;
  padding: 9.5px 12px;
  border: 1px solid #cdd6e8;
  border-radius: 9px;
  font-size: 0.92rem;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

textarea { min-height: 90px; resize: vertical; }

input:focus, textarea:focus, select:focus {
  outline: 0;
  border-color: var(--brand);
  box-shadow: var(--focus-ring);
}

/* ------------------------------ Botões ------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 10px;
  border: 1px solid #d3dcea;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  background: #fff;
  color: #334155;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  transition: transform 0.12s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary { background: var(--grad-brand); color: #fff; border: 0; box-shadow: 0 6px 16px -6px rgba(255, 143, 0, 0.6); }
.btn-primary:hover { background: linear-gradient(135deg, #ff8f00, #ffb300); color: #fff; }

.btn-success { background: linear-gradient(135deg, #16a34a, #15803d); color: #fff; border: 0; box-shadow: 0 6px 16px -6px rgba(22, 163, 74, 0.55); }
.btn-success:hover { color: #fff; filter: brightness(1.05); }

.btn-danger { background: linear-gradient(135deg, #dc2626, #b91c1c); color: #fff; border: 0; box-shadow: 0 6px 16px -6px rgba(220, 38, 38, 0.55); }
.btn-danger:hover { color: #fff; filter: brightness(1.05); }

.btn-warning { background: linear-gradient(135deg, #f59e0b, #d97706); color: #fff; border: 0; }
.btn-warning:hover { color: #fff; filter: brightness(1.05); }

.btn-sm { padding: 5px 11px; font-size: 0.82rem; border-radius: 8px; }

/* ------------------------------ Alertas ----------------------------------- */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px 15px;
  border-radius: 10px;
  margin-bottom: 14px;
  font-size: 0.9rem;
  border: 1px solid transparent;
}

.alert-success { background: #ecfdf3; color: #166534; border-color: #bcf0d4; }
.alert-error   { background: #fef2f2; color: #991b1b; border-color: #fbc5c5; }
.alert-warning { background: #fffbeb; color: #92400e; border-color: #fde68a; }

/* ------------------------------ Código / badges --------------------------- */
.code-badge {
  font-family: 'Consolas', 'Cascadia Code', monospace;
  background: #eef1ff;
  border: 1px solid #d5dbff;
  color: #4338ca;
  padding: 2px 9px;
  border-radius: 7px;
  font-size: 0.82rem;
}

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.badge-green { background: #d1fae5; color: #065f46; }
.badge-red   { background: #fee2e2; color: #991b1b; }
.badge-orange{ background: #ffedd5; color: #9a3412; }
.badge-bg    { background: #e5e7eb; color: #374151; }

.filter-chips { display: flex; flex-wrap: wrap; gap: 8px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--text-2);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.chip:hover { border-color: var(--brand); color: var(--brand); }

.chip-active {
  background: var(--grad-brand);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 12px -4px rgba(255, 143, 0, 0.5);
}

.chip-active:hover { color: #fff; filter: brightness(1.05); }

.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; }
.dot-green { background: #10b981; }
.dot-gray  { background: #9ca3af; }

.stat {
  background: linear-gradient(160deg, #16233f, #0f1a30);
  border: 1px solid #26345a;
  border-radius: 12px;
  padding: 16px 18px;
  min-width: 128px;
  text-align: center;
  color: #cbd5e1;
  font-size: 0.8rem;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease;
}

.stat strong {
  display: block;
  font-size: 1.5rem;
  color: #fff;
  margin-bottom: 2px;
  background: linear-gradient(135deg, #cdd2ff, #b9a7ff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat:hover { transform: translateY(-2px); }

.meta { color: var(--muted); font-size: 0.85rem; }

.topbar-right {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.topbar-settings {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  color: var(--muted);
  cursor: pointer;
  box-shadow: var(--shadow);
  text-decoration: none;
  transition: color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.topbar-settings:hover {
  color: var(--brand);
  border-color: var(--brand);
  transform: rotate(20deg);
}

.preview img {
  max-width: 220px;
  max-height: 90px;
  border-radius: 9px;
  border: 1px solid var(--line);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

/* ------------------------------ Login ------------------------------------- */
.auth-screen {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background:
    radial-gradient(900px 520px at 15% 10%, rgba(255, 143, 0, 0.5), transparent 60%),
    radial-gradient(800px 500px at 90% 90%, rgba(139, 92, 246, 0.45), transparent 60%),
    linear-gradient(135deg, #0b1226, #16233f 45%, #1e2a54);
}

.auth-screen::before,
.auth-screen::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.5;
  animation: auth-drift 14s ease-in-out infinite alternate;
}

.auth-screen::before {
  width: 340px;
  height: 340px;
  top: -90px;
  left: -110px;
  background: radial-gradient(circle, rgba(255, 143, 0, 0.9), transparent 70%);
}

.auth-screen::after {
  width: 300px;
  height: 300px;
  bottom: -100px;
  right: -80px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.9), transparent 70%);
  animation-delay: -6s;
}

@keyframes auth-drift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(28px, 22px) scale(1.08); }
}

.auth-box {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 392px;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(10px);
  padding: 36px 34px;
  border-radius: 18px;
  box-shadow: 0 24px 60px -18px rgba(2, 6, 23, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.auth-box h1 {
  margin: 0 0 4px;
  font-size: 1.4rem;
  text-align: center;
  letter-spacing: -0.01em;
}

.auth-box p.sub {
  text-align: center;
  color: var(--muted);
  margin: 0 0 22px;
  font-size: 0.9rem;
}

.auth-box img.logo {
  display: block;
  margin: 0 auto 16px;
  max-width: 92px;
  max-height: 92px;
  border-radius: 14px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.18);
}

.auth-box .btn { padding: 11px 16px; font-size: 0.94rem; }

.auth-foot {
  margin: 20px 0 0;
  text-align: center;
  font-size: 0.76rem;
  color: #94a3b8;
}

/* ------------------------------ Código de vendedor (sidebar) -------------- */
.code-box { display: flex; flex-direction: column; gap: 8px; }

.code-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8a9bbf;
}

.code-row { display: flex; align-items: center; gap: 8px; }

.code-edit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.06);
  color: #b8c4dd;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.code-edit-btn:hover {
  color: #fff;
  background: var(--grad-brand);
  border-color: transparent;
}

.code-form { display: flex; flex-direction: column; gap: 8px; margin-top: 2px; }

.code-form input[type='text'] {
  width: 100%;
  padding: 7px 9px;
  border: 1px solid #3a4a72;
  border-radius: 8px;
  background: #0d1730;
  color: #e2e8f0;
  font-size: 0.86rem;
  font-family: 'Consolas', 'Cascadia Code', monospace;
  text-transform: uppercase;
}

.code-form input[type='text']:focus { border-color: var(--brand); box-shadow: var(--focus-ring); outline: 0; }

.code-form-actions { display: flex; gap: 8px; }

.code-form-actions .btn { padding: 5px 10px; font-size: 0.78rem; }

.code-hint { font-size: 0.7rem; color: #7285ad; }

/* ------------------------------ Responsivo -------------------------------- */
@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; }

  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    box-shadow: 6px 0 30px rgba(2, 6, 23, 0.35);
  }

  body.nav-open .sidebar { transform: translateX(0); }

  body.nav-open::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.5);
    z-index: 30;
  }

  .sidebar .brand, .sidebar nav, .sidebar .footer { z-index: 1; }

  .main {
    margin-left: 0;
    padding: 18px 14px;
  }

  .topbar { flex-wrap: wrap; }
}
/* Play tv dark */ :root{ --bg:#0a0f1e; --panel:#111827; --panel-2:#0f1626; --text:#f2f6ff; --text-2:#aab4cc; --muted:#5b6478; --line:#1e2a44; --brand:#ff8f00; --brand-2:#ffb300; --danger:#ff6b6b; --focus-ring:0 0 0 3px rgba(255,143,0,.25); }
:root{ --grad-brand:linear-gradient(135deg,#ff8f00,#ffb300); --grad-brand-hover:linear-gradient(135deg,#ff8f00,#ffc107); --grad-ok:linear-gradient(135deg,#ff8f00,#ffb300); --grad-danger:linear-gradient(135deg,#ff6b6b,#ff8f00); }System.Text.UTF8Encoding