@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

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

:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #fafbfc;
  --text: #111827;
  --text-2: #4b5563;
  --text-3: #9ca3af;
  --line: #e8eaed;
  --line-2: #d1d5db;
  --accent: #4f46e5;
  --accent-soft: #eef2ff;
  --accent-hover: #4338ca;
  --ok: #059669;
  --ok-soft: #ecfdf5;
  --bad: #dc2626;
  --bad-soft: #fef2f2;
  --warn: #d97706;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 8px 24px rgba(16, 24, 40, 0.06);
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06);
  --radius: 14px;
  --radius-sm: 10px;
  --sidebar-w: 252px;
  --font: 'Outfit', system-ui, sans-serif;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
}

a {
  color: var(--accent);
  text-decoration: none;
}

/* ── Login ── */
.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem;
  background:
    radial-gradient(circle at 20% 20%, rgba(79, 70, 229, 0.08), transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(79, 70, 229, 0.05), transparent 35%),
    var(--bg);
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.login-brand .mark {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
}

.login-brand h1 {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* ── Layout ── */
.shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 200;
  transition: transform 0.25s var(--ease);
}

.sidebar-head {
  padding: 1.35rem 1.25rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  border-bottom: 1px solid var(--line);
}

.sidebar-head .mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.sidebar-head span {
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav {
  list-style: none;
  padding: 0.75rem 0.65rem;
  flex: 1;
  overflow-y: auto;
}

.nav li a {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.62rem 0.85rem;
  margin-bottom: 2px;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}

.nav li a i,
.nav li a svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.75;
}

.nav li a:hover {
  background: var(--surface-2);
  color: var(--text);
  text-decoration: none;
}

.nav li a.active {
  background: var(--accent-soft);
  color: var(--accent);
}

.nav li a.active i,
.nav li a.active svg {
  opacity: 1;
}

.nav-divider {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0.85rem;
  height: 1px;
  background: var(--line);
}

.sidebar-foot {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
  color: var(--text-3);
}

.main {
  flex: 1;
  margin-left: var(--sidebar-w);
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: 64px;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.topbar-left h1 {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-2);
  display: none;
  place-items: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.icon-btn:hover {
  border-color: var(--line-2);
  background: var(--surface-2);
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem 0.35rem 0.35rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.82rem;
  color: var(--text-2);
}

.user-chip .avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: 0.75rem;
}

.page {
  padding: 1.5rem;
  flex: 1;
  max-width: 1280px;
  width: 100%;
}

/* ── Stats ── */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, transform 0.2s;
}

.stat:hover {
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.stat-label {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.stat-value {
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-top: 0.2rem;
  line-height: 1.1;
}

/* ── Cards ── */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1rem;
  overflow: hidden;
}

.card-head {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.card-head h2 {
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.card-body {
  padding: 1.25rem;
}

.card-body.flush {
  padding: 0;
}

/* ── Forms ── */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-2);
  margin-bottom: 0.4rem;
}

.input-wrap {
  position: relative;
}

.input-wrap i,
.input-wrap svg {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-3);
  pointer-events: none;
}

.input-wrap input {
  padding-left: 2.5rem !important;
}

input,
select,
textarea {
  width: 100%;
  padding: 0.62rem 0.85rem;
  font: inherit;
  font-size: 0.9rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s, box-shadow 0.15s;
}

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

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

input[type="file"] {
  padding: 0.5rem;
  font-size: 0.85rem;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.15rem;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.58rem 1.1rem;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: var(--accent);
  color: #fff;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
  text-decoration: none;
  white-space: nowrap;
}

.btn:hover {
  background: var(--accent-hover);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

.btn:active {
  transform: scale(0.98);
}

.btn-sm {
  padding: 0.38rem 0.75rem;
  font-size: 0.8rem;
}

.btn-ghost {
  background: var(--surface);
  color: var(--text-2);
  border: 1px solid var(--line);
  box-shadow: none;
}

.btn-ghost:hover {
  background: var(--surface-2);
  color: var(--text);
  box-shadow: none;
}

.btn-danger {
  background: var(--bad);
}

.btn-danger:hover {
  background: #b91c1c;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
}

.btn-icon {
  width: 34px;
  height: 34px;
  padding: 0;
}

/* ── Table ── */
.table-scroll {
  overflow-x: auto;
}

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

th {
  text-align: left;
  padding: 0.75rem 1.25rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-3);
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}

td {
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

tr:last-child td {
  border-bottom: none;
}

tbody tr {
  transition: background 0.12s;
}

tbody tr:hover td {
  background: #fafbfc;
}

.empty {
  text-align: center;
  padding: 2.5rem 1rem !important;
  color: var(--text-3);
}

code,
.url-chip {
  font-family: ui-monospace, 'Cascadia Code', Consolas, monospace;
  font-size: 0.8rem;
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  word-break: break-all;
}

.url-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
}

.badge-ok {
  background: var(--ok-soft);
  color: var(--ok);
}

.badge-bad {
  background: var(--bad-soft);
  color: var(--bad);
}

.row-actions {
  display: flex;
  gap: 0.35rem;
  justify-content: flex-end;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.toolbar input[type="text"],
.toolbar input[type="search"] {
  flex: 1;
  min-width: 180px;
}

.thumb {
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--line);
}

.preview-img {
  margin-top: 0.65rem;
  max-height: 72px;
  border-radius: 8px;
  border: 1px solid var(--line);
}

/* ── Overlay ── */
.backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.35);
  backdrop-filter: blur(2px);
  z-index: 150;
  opacity: 0;
  transition: opacity 0.25s;
}

.backdrop.show {
  display: block;
  opacity: 1;
}

/* ── Toast ── */
.toast-stack {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1.1rem;
  background: var(--text);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 500;
  box-shadow: var(--shadow);
  animation: toastIn 0.35s var(--ease);
  max-width: 340px;
}

.toast.ok { background: #065f46; }
.toast.bad { background: #991b1b; }
.toast.warn { background: #92400e; }

.toast.hide {
  animation: toastOut 0.3s var(--ease) forwards;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to { opacity: 1; transform: none; }
}

@keyframes toastOut {
  to { opacity: 0; transform: translateY(8px); }
}

/* ── Responsive ── */
@media (max-width: 960px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow);
  }

  .main {
    margin-left: 0;
  }

  .icon-btn {
    display: grid;
  }

  .stats {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .page {
    padding: 1rem;
  }

  .topbar {
    padding: 0 1rem;
  }

  .user-chip span:not(.avatar) {
    display: none;
  }
}


/* ── Syntra organização profissional ── */
.nav-section {
  padding: 0.85rem 0.85rem 0.35rem;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.35rem;
  margin-bottom: 1.25rem;
  background: linear-gradient(135deg, rgba(79,70,229,.12), rgba(124,58,237,.08)), var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.hero-panel h2,
.section-title h2 {
  font-size: 1.25rem;
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin: .15rem 0 .35rem;
}

.hero-panel p,
.section-title p,
.quick-card span,
.info-row p,
.stat-hint {
  color: var(--text-2);
  font-size: .88rem;
}

.eyebrow {
  color: var(--accent);
  font-weight: 700;
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  justify-content: flex-end;
}

.stats-compact {
  grid-template-columns: repeat(4, minmax(0,1fr));
}

.stat-hint { margin-top: .35rem; }
.stat-accent { border-left: 4px solid var(--accent); }
.stat-purple { border-left: 4px solid #7c3aed; }
.stat-green { border-left: 4px solid var(--ok); }
.stat-red { border-left: 4px solid var(--bad); }

.grid-2 {
  display: grid;
  grid-template-columns: 1.3fr .7fr;
  gap: 1rem;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: .75rem;
}

.quick-card {
  display: block;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text);
  transition: transform .15s, border-color .15s, box-shadow .15s;
}

.quick-card:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}

.quick-card svg { width: 20px; height: 20px; color: var(--accent); margin-bottom: .35rem; }
.quick-card strong { display: block; margin-bottom: .2rem; }
.quick-card span { display: block; }

.license-info { display: grid; gap: .9rem; }
.info-row { display: grid; gap: .35rem; }

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.badge-purple { background: #f3e8ff; color: #7c3aed; }
.badge-success { background: var(--ok-soft); color: var(--ok); }
.badge-danger { background: var(--bad-soft); color: var(--bad); }
.text-danger { color: var(--bad); }

@media (max-width: 960px) {
  .hero-panel, .section-title { flex-direction: column; align-items: stretch; }
  .hero-actions { justify-content: stretch; }
  .hero-actions .btn { flex: 1; }
  .stats-compact, .grid-2, .quick-grid { grid-template-columns: 1fr; }
}

/* SYNTRA Revenda V2.0 */
.status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: .75rem;
}
.status-item {
  display: grid;
  gap: .2rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
}
.status-item strong { color: var(--text); }
.status-item small { color: var(--text-2); }
.dot {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  display: inline-block;
  box-shadow: 0 0 0 4px rgba(79,70,229,.08);
}
.dot.ok { background: var(--ok); }
.dot.warn { background: var(--warn); }
.dot.bad { background: var(--bad); }
.badge-plan { background: var(--accent-soft); color: var(--accent); }
:root {
  --bg: #050511;
  --surface: rgba(10, 12, 24, 0.88);
  --surface-2: rgba(16, 18, 36, 0.92);
  --text: #f8f7ff;
  --text-2: #c9c4d8;
  --text-3: #8d86a4;
  --line: rgba(166, 91, 255, 0.22);
  --line-2: rgba(191, 122, 255, 0.45);
  --accent: #a855f7;
  --accent-soft: rgba(168, 85, 247, 0.14);
  --accent-hover: #c084fc;
  --ok: #32f06d;
  --ok-soft: rgba(50, 240, 109, 0.12);
  --bad: #ff4d6d;
  --bad-soft: rgba(255, 77, 109, 0.13);
  --warn: #facc15;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.42), 0 0 42px rgba(124, 58, 237, 0.11);
  --shadow-sm: 0 12px 32px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.035);
  --radius: 18px;
  --radius-sm: 12px;
}

html { background: #050511; }

body {
  background:
    radial-gradient(circle at 16% 8%, rgba(168, 85, 247, 0.23), transparent 28%),
    radial-gradient(circle at 90% 10%, rgba(79, 70, 229, 0.16), transparent 34%),
    linear-gradient(135deg, rgba(7, 8, 19, 0.98), rgba(13, 11, 30, 0.98) 45%, rgba(4, 5, 12, 1));
  color: var(--text);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .32;
  background-image:
    linear-gradient(rgba(168, 85, 247, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(168, 85, 247, .055) 1px, transparent 1px),
    radial-gradient(circle at 74% 22%, rgba(168,85,247,.19), transparent 12%);
  background-size: 52px 52px, 52px 52px, 100% 100%;
  mask-image: linear-gradient(to bottom, #000, transparent 82%);
  z-index: -1;
}

.login-wrap {
  background:
    radial-gradient(circle at 20% 15%, rgba(168,85,247,.30), transparent 34%),
    radial-gradient(circle at 80% 90%, rgba(79,70,229,.20), transparent 40%),
    #050511;
}

.login-card,
.sidebar,
.topbar,
.card,
.stat,
.hero-panel,
.status-item,
.quick-card,
.user-chip,
input,
select,
textarea,
.btn-ghost,
.icon-btn,
code,
.url-chip {
  background: linear-gradient(180deg, rgba(16, 18, 36, 0.90), rgba(7, 8, 18, 0.92));
  border-color: var(--line);
  color: var(--text);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(18px);
}

.sidebar {
  background: linear-gradient(180deg, rgba(5, 6, 15, .98), rgba(9, 8, 20, .98));
  border-right: 1px solid rgba(168, 85, 247, 0.26);
}

.sidebar-head {
  border-bottom-color: rgba(168, 85, 247, 0.22);
  padding-top: 1.4rem;
  padding-bottom: 1.25rem;
}

.sidebar-head .mark,
.login-brand .mark {
  border-radius: 16px;
  background:
    radial-gradient(circle at 50% 35%, rgba(255,255,255,.34), transparent 28%),
    linear-gradient(135deg, #4611a8, #7c3aed 45%, #c084fc);
  box-shadow: 0 0 26px rgba(168,85,247,.55), inset 0 0 16px rgba(255,255,255,.12);
}

.nav li a {
  color: #aaa3bd;
  border: 1px solid transparent;
}

.nav li a i,
.nav li a svg,
.input-wrap i,
.input-wrap svg,
.quick-card svg {
  color: #b15cff;
  stroke-width: 2.15;
  filter: drop-shadow(0 0 8px rgba(168,85,247,.48));
  opacity: 1;
}

.nav li a:hover {
  background: rgba(168, 85, 247, 0.10);
  border-color: rgba(168, 85, 247, 0.22);
  color: #fff;
}

.nav li a.active {
  background: linear-gradient(90deg, rgba(126, 34, 206, .38), rgba(168, 85, 247, .14));
  border-color: rgba(192, 132, 252, .48);
  color: #f7efff;
  box-shadow: inset 3px 0 0 #b15cff, 0 0 22px rgba(168, 85, 247, 0.16);
}

.nav-section,
.eyebrow,
.stat-label {
  color: #c084fc;
  text-shadow: 0 0 14px rgba(168,85,247,.34);
}

.nav-divider,
.card-head,
.sidebar-foot,
.topbar,
th,
td {
  border-color: rgba(168, 85, 247, 0.18) !important;
}

.main {
  background: transparent;
}

.page {
  max-width: 1360px;
}

.topbar {
  background: rgba(5, 6, 15, 0.72);
  border-bottom: 1px solid rgba(168, 85, 247, 0.20);
}

.topbar-left h1,
.card-head h2,
.hero-panel h2,
.section-title h2 {
  color: #ffffff;
}

.user-chip .avatar {
  background: radial-gradient(circle, rgba(168,85,247,.50), rgba(39, 23, 74, .95));
  color: #fff;
  border: 1px solid rgba(192, 132, 252, .35);
  box-shadow: 0 0 18px rgba(168,85,247,.30);
}

.card,
.stat,
.hero-panel {
  position: relative;
  overflow: hidden;
}

.card::before,
.stat::before,
.hero-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255,255,255,.045), transparent 34%), radial-gradient(circle at top right, rgba(168,85,247,.13), transparent 35%);
}

.card > *,
.stat > *,
.hero-panel > * { position: relative; z-index: 1; }

.stat {
  border-radius: 18px;
  min-height: 112px;
}

.stat-value {
  color: #fff;
  text-shadow: 0 0 18px rgba(168,85,247,.22);
}

.stat-accent,
.stat-purple {
  border-left-color: #b15cff;
  box-shadow: inset 4px 0 0 rgba(177, 92, 255, .75), var(--shadow-sm);
}

.stat-green {
  border-left-color: var(--ok);
  box-shadow: inset 4px 0 0 rgba(50, 240, 109, .65), var(--shadow-sm);
}

.stat-red {
  border-left-color: var(--bad);
  box-shadow: inset 4px 0 0 rgba(255, 77, 109, .65), var(--shadow-sm);
}

input,
select,
textarea {
  background: rgba(5, 8, 20, 0.74);
  color: #fff;
}

input::placeholder,
textarea::placeholder { color: rgba(230, 220, 255, .48); }

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(192, 132, 252, 0.90);
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.16), 0 0 22px rgba(168, 85, 247, 0.18);
}

input[type="date"] {
  color: #39ff78;
  font-weight: 700;
  letter-spacing: .02em;
}

input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(1) hue-rotate(230deg) brightness(1.3); }

.btn {
  background: linear-gradient(135deg, #6d28d9, #9333ea 48%, #c026d3);
  color: #fff;
  box-shadow: 0 12px 32px rgba(147, 51, 234, 0.28), inset 0 1px 0 rgba(255,255,255,.15);
  font-weight: 700;
}

.btn:hover {
  background: linear-gradient(135deg, #7c3aed, #a855f7 50%, #d946ef);
  box-shadow: 0 16px 38px rgba(168, 85, 247, 0.34);
}

.btn-ghost,
.icon-btn {
  background: rgba(12, 13, 28, .78);
  color: #ddd6fe;
}

.btn-ghost:hover,
.icon-btn:hover {
  background: rgba(168, 85, 247, .12);
  color: #fff;
}

.btn-danger {
  background: linear-gradient(135deg, #9f1239, #e11d48);
}

table {
  color: var(--text);
}

th {
  background: rgba(255,255,255,.045);
  color: #b8accf;
}

tbody tr:hover td {
  background: rgba(168, 85, 247, 0.07);
}

.badge-ok,
.badge-success {
  background: rgba(50,240,109,.12);
  color: #39ff78;
  border: 1px solid rgba(50,240,109,.22);
}

.badge-bad,
.badge-danger {
  background: rgba(255,77,109,.12);
  color: #ff8ca2;
  border: 1px solid rgba(255,77,109,.22);
}

.badge-purple,
.badge-plan {
  background: rgba(168,85,247,.14);
  color: #d8b4fe;
  border: 1px solid rgba(168,85,247,.22);
}

.dot.ok { background: #39ff78; box-shadow: 0 0 0 4px rgba(50,240,109,.10), 0 0 18px rgba(50,240,109,.45); }
.dot.warn { background: #facc15; box-shadow: 0 0 0 4px rgba(250,204,21,.10), 0 0 18px rgba(250,204,21,.35); }
.dot.bad { background: #ff4d6d; box-shadow: 0 0 0 4px rgba(255,77,109,.10), 0 0 18px rgba(255,77,109,.35); }

.toast { background: rgba(14, 12, 30, .96); border: 1px solid rgba(168,85,247,.25); color: #fff; }
.toast.ok { background: rgba(5, 46, 22, .96); }
.toast.bad { background: rgba(76, 5, 25, .96); }
.toast.warn { background: rgba(70, 48, 4, .96); }

.backdrop.show { background: rgba(3, 5, 12, 0.72); }

@media (max-width: 960px) {
  .sidebar.open { box-shadow: 22px 0 70px rgba(0,0,0,.65), 0 0 50px rgba(168,85,247,.12); }
}
