:root {
  color-scheme: dark;
  --bg: #111315;
  --panel: #191c1f;
  --panel-2: #202428;
  --line: #30353a;
  --text: #f3f4f5;
  --muted: #90979e;
  --accent: #f5a45b;
  --accent-soft: rgba(245, 164, 91, .12);
  --danger: #ef6b66;
  --success: #66b986;
  --sidebar: 252px;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); letter-spacing: 0; }
button, input, select, textarea { font: inherit; letter-spacing: 0; }
button { cursor: pointer; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.eyebrow { color: var(--accent); font-size: 12px; font-weight: 800; letter-spacing: 3px; }
.login { width: min(420px, calc(100% - 32px)); min-height: 100vh; margin: auto; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; }
.login-mark, .brand-mark { display: grid; place-items: center; background: var(--accent); color: #151515; font-weight: 900; }
.login-mark { width: 66px; height: 66px; border-radius: 8px; font-size: 28px; box-shadow: 0 16px 50px rgba(245,164,91,.16); }
.login h1 { font-size: 32px; margin: 14px 0 4px; }
.login-copy { line-height: 1.55; margin: 0 0 24px; max-width: 350px; }
.primary, .secondary, .danger-button { border: 0; border-radius: 7px; min-height: 46px; padding: 0 18px; font-weight: 750; }
.primary { background: var(--accent); color: #171717; }
.secondary { background: var(--panel-2); color: var(--text); border: 1px solid var(--line); }
.danger-button { background: rgba(239,107,102,.12); color: #ff8d88; border: 1px solid rgba(239,107,102,.28); }
.wide { width: 100%; }
.code-panel { margin-top: 18px; width: 100%; padding: 24px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; }
.code-panel span { font-size: 11px; color: var(--muted); font-weight: 800; letter-spacing: 2px; }
.code-panel strong { display: block; font-size: 43px; letter-spacing: 9px; color: var(--accent); margin: 12px 0 8px; font-variant-numeric: tabular-nums; }
.code-panel p { color: var(--muted); margin: 0; font-size: 14px; }
.error { color: var(--danger); }
.app { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar) 1fr; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar); padding: 22px 16px; background: #151719; border-right: 1px solid #24282b; display: flex; flex-direction: column; z-index: 20; }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 24px; }
.brand-mark { width: 38px; height: 38px; border-radius: 7px; }
.brand b { display: block; font-size: 16px; }
.brand small { color: var(--muted); font-size: 9px; letter-spacing: 1.6px; }
nav { display: grid; gap: 4px; }
.nav-item { width: 100%; min-height: 44px; display: flex; align-items: center; gap: 13px; border: 0; border-radius: 6px; padding: 0 13px; background: transparent; color: #aab0b5; text-align: left; }
.nav-item span { width: 22px; text-align: center; font-size: 19px; }
.nav-item:hover { color: var(--text); background: #1c1f22; }
.nav-item.active { background: var(--accent-soft); color: var(--accent); }
.sidebar-foot { margin-top: auto; padding: 15px 9px 0; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 9px; }
.sidebar-foot div { min-width: 0; flex: 1; }
.sidebar-foot b, .sidebar-foot small { display: block; }
.sidebar-foot b { font-size: 13px; }.sidebar-foot small { color: var(--muted); font-size: 10px; }
.sidebar-foot button { border: 0; background: transparent; color: var(--muted); font-size: 21px; }
.owner-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 12px rgba(102,185,134,.55); }
main { grid-column: 2; min-width: 0; }
.topbar { height: 72px; border-bottom: 1px solid #25292c; background: rgba(17,19,21,.94); display: flex; align-items: center; gap: 16px; padding: 0 30px; position: sticky; top: 0; z-index: 10; }
.search { flex: 1; max-width: 640px; position: relative; }
.search span { position: absolute; left: 14px; top: 10px; color: var(--muted); font-size: 20px; }
.search input { width: 100%; height: 42px; border: 1px solid var(--line); border-radius: 7px; background: #171a1c; color: var(--text); padding: 0 15px 0 42px; outline: none; }
.search input:focus { border-color: #6e573f; box-shadow: 0 0 0 3px var(--accent-soft); }
.system-state { margin-left: auto; display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.system-state i { width: 7px; height: 7px; background: var(--success); border-radius: 50%; }
.content { max-width: 1450px; padding: 34px; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 24px; }
.page-head h1 { margin: 0; font-size: 27px; }.page-head p { margin: 7px 0 0; color: var(--muted); }
.page-actions { display: flex; gap: 8px; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; margin-bottom: 24px; }
.metric, .panel { background: var(--panel); border: 1px solid var(--line); border-radius: 7px; }
.metric { padding: 19px; min-height: 126px; }
.metric small { color: var(--muted); font-weight: 650; }
.metric strong { display: block; font-size: 29px; margin: 17px 0 8px; }
.metric span { color: var(--success); font-size: 12px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr); gap: 14px; }
.panel { overflow: hidden; }
.panel-head { min-height: 62px; padding: 16px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.panel-head h2 { margin: 0; font-size: 16px; }.panel-head small { color: var(--muted); }
.attention-list, .activity-list { padding: 5px 18px; }
.attention, .activity { display: flex; align-items: center; gap: 13px; min-height: 76px; border-bottom: 1px solid #2a2e32; }
.attention:last-child, .activity:last-child { border: 0; }
.attention-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 6px; color: var(--accent); background: var(--accent-soft); }
.attention div, .activity div { min-width: 0; flex: 1; }.attention b, .activity b { display: block; font-size: 14px; }.attention small, .activity small { color: var(--muted); }
.count { font-weight: 800; font-variant-numeric: tabular-nums; }
.table-panel { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 800px; }
th { text-align: left; color: var(--muted); font-size: 11px; letter-spacing: 1.2px; padding: 13px 16px; border-bottom: 1px solid var(--line); }
td { padding: 14px 16px; border-bottom: 1px solid #282c2f; font-size: 13px; }
tbody tr { cursor: pointer; } tbody tr:hover { background: #1e2225; }
.user-cell { display: flex; align-items: center; gap: 10px; }.avatar { width: 34px; height: 34px; border-radius: 50%; background: #2a2e31; display: grid; place-items: center; font-weight: 800; }
.user-cell b, .user-cell small { display: block; }.user-cell small { color: var(--muted); margin-top: 2px; }
.badge { display: inline-flex; align-items: center; min-height: 25px; padding: 0 9px; border-radius: 20px; background: #272c2f; color: #bbc0c4; font-size: 11px; font-weight: 800; }
.badge.active, .badge.approved, .badge.success, .badge.paid, .badge.succeeded { color: var(--success); background: rgba(102,185,134,.1); }
.badge.trial, .badge.pending { color: var(--accent); background: var(--accent-soft); }
.badge.expired, .badge.rejected, .badge.failed, .badge.canceled { color: var(--danger); background: rgba(239,107,102,.1); }
.filters { display: flex; gap: 8px; }
select, .field { height: 40px; border: 1px solid var(--line); background: #171a1c; color: var(--text); border-radius: 6px; padding: 0 12px; outline: none; }
.empty, .loading { min-height: 220px; display: grid; place-items: center; color: var(--muted); text-align: center; }
.detail-drawer { position: fixed; z-index: 41; right: 0; top: 0; bottom: 0; width: min(560px, 100%); background: #16191b; border-left: 1px solid var(--line); transform: translateX(101%); transition: transform .22s ease; overflow-y: auto; }
.detail-drawer.open { transform: translateX(0); }
.drawer-backdrop, .modal-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,.58); }
.drawer-head { position: sticky; top: 0; z-index: 2; background: rgba(22,25,27,.96); padding: 22px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 14px; }
.drawer-head .avatar { width: 48px; height: 48px; }.drawer-head div { flex: 1; }.drawer-head h2 { margin: 0; font-size: 20px; }.drawer-head p { margin: 4px 0 0; color: var(--muted); }
.icon-button { width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel-2); color: var(--text); font-size: 20px; }
.drawer-content { padding: 22px; display: grid; gap: 14px; }
.info-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }.info { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 13px; }.info small { display: block; color: var(--muted); margin-bottom: 6px; }.info b { font-size: 14px; }
.section-title { margin: 12px 0 0; font-size: 12px; color: var(--muted); letter-spacing: 2px; }
.section-caption { margin: 28px 0 10px; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.section-caption h2 { margin: 0; font-size: 17px; }
.section-caption small { color: var(--muted); }
.notification-metrics { margin-bottom: 6px; }
.template-panel td:first-child b, .template-panel td:first-child small { display: block; }
.template-panel td:first-child small { color: var(--muted); margin-top: 4px; }
.template-changed { color: var(--accent); font-weight: 750; }
.compact { min-height: 34px; padding: 0 12px; font-size: 12px; }
.timeline-item { padding: 12px 0; border-bottom: 1px solid var(--line); }.timeline-item b, .timeline-item span { display: block; }.timeline-item span { color: var(--muted); margin-top: 4px; font-size: 12px; }
.modal-backdrop { z-index: 50; display: grid; place-items: center; padding: 20px; }.modal { width: min(520px, 100%); background: #1a1d20; border: 1px solid var(--line); border-radius: 8px; padding: 22px; box-shadow: 0 24px 80px rgba(0,0,0,.4); }.modal h2 { margin: 0 0 7px; }.modal p { color: var(--muted); margin: 0 0 18px; }.form-grid { display: grid; gap: 11px; }.form-grid label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; }.form-grid input, .form-grid textarea, .form-grid select { width: 100%; background: #131618; border: 1px solid var(--line); border-radius: 6px; color: var(--text); padding: 11px; outline: none; }.form-grid textarea { min-height: 110px; resize: vertical; }.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.toast { position: fixed; z-index: 80; right: 22px; bottom: 22px; background: #252a2e; border: 1px solid #3a4146; color: var(--text); padding: 13px 17px; border-radius: 7px; box-shadow: 0 12px 35px rgba(0,0,0,.35); }
.mobile-only { display: none; }
@media (max-width: 1050px) { .metrics { grid-template-columns: repeat(2,1fr); }.dashboard-grid { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; }.sidebar { transform: translateX(-101%); transition: transform .2s ease; width: min(300px, 88vw); }.sidebar.open { transform: translateX(0); }.app main { grid-column: 1; }.mobile-only { display: grid; place-items: center; }.topbar { padding: 0 14px; }.system-state { display: none; }.content { padding: 23px 14px 42px; }.page-head { align-items: flex-start; flex-direction: column; }.metrics { grid-template-columns: 1fr 1fr; }.metric { min-height: 110px; padding: 15px; }.metric strong { font-size: 23px; }.page-actions { width: 100%; }.page-actions button { flex: 1; }.info-grid { grid-template-columns: 1fr 1fr; }.section-caption { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 440px) { .metrics { grid-template-columns: 1fr; }.info-grid { grid-template-columns: 1fr; }.login h1 { font-size: 27px; }.code-panel strong { font-size: 34px; letter-spacing: 7px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }
