
    :root {
      --bg: #0f0f0f;
      --bg-elevated: #212121;
      --bg-hover: #2a2a2a;
      --border: #303030;
      --text: #f1f1f1;
      --text-muted: #aaaaaa;
      --accent: #ff0000;
      --accent-dark: #cc0000;
      --success: #3dd68c;
      --warning: #f5a623;
      --danger: #ff4d4d;
      --sidebar-w: 240px;
      --radius: 10px;
      --font: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    }

    * {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }

    html, body {
      height: 100%;
      background: var(--bg);
      color: var(--text);
      font-family: var(--font);
    }

    button, input {
      font-family: inherit;
    }

    .hidden {
      display: none !important;
    }

    /* ——— Login ——— */
    #login-view {
      min-height: 100%;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 24px;
      background:
        radial-gradient(ellipse at top, #1a1a1a 0%, var(--bg) 55%),
        var(--bg);
    }

    .login-card {
      width: 100%;
      max-width: 400px;
      background: var(--bg-elevated);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 36px 32px 28px;
      box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
    }

    .brand {
      display: flex;
      align-items: center;
      gap: 12px;
      margin-bottom: 8px;
    }

    .brand-mark {
      width: 36px;
      height: 36px;
      border-radius: 8px;
      background: var(--accent);
      display: grid;
      place-items: center;
      font-weight: 800;
      font-size: 18px;
      color: #fff;
      flex-shrink: 0;
    }

    .brand-name {
      font-size: 22px;
      font-weight: 700;
      letter-spacing: -0.02em;
    }

    .login-card h1 {
      font-size: 15px;
      font-weight: 500;
      color: var(--text-muted);
      margin: 4px 0 28px;
    }

    .field {
      margin-bottom: 16px;
    }

    .field label {
      display: block;
      font-size: 13px;
      color: var(--text-muted);
      margin-bottom: 6px;
    }

    .field input {
      width: 100%;
      background: var(--bg);
      border: 1px solid var(--border);
      border-radius: 8px;
      color: var(--text);
      padding: 12px 14px;
      font-size: 15px;
      outline: none;
      transition: border-color 0.15s ease;
    }

    .field input:focus {
      border-color: #666;
    }

    .login-error {
      min-height: 20px;
      font-size: 13px;
      color: var(--danger);
      margin-bottom: 12px;
    }

    .btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      border: none;
      border-radius: 8px;
      cursor: pointer;
      font-size: 14px;
      font-weight: 600;
      padding: 12px 18px;
      transition: background 0.15s ease, opacity 0.15s ease;
    }

    .btn:disabled {
      opacity: 0.6;
      cursor: not-allowed;
    }

    .btn-primary {
      background: var(--accent);
      color: #fff;
      width: 100%;
    }

    .btn-primary:hover:not(:disabled) {
      background: var(--accent-dark);
    }

    .btn-ghost {
      background: transparent;
      color: var(--text-muted);
      padding: 8px 12px;
    }

    .btn-ghost:hover {
      color: var(--text);
      background: var(--bg-hover);
    }

    .login-footer {
      margin-top: 20px;
      text-align: center;
      font-size: 12px;
      color: #666;
    }

    /* ——— Dashboard shell ——— */
    #dashboard-view {
      min-height: 100%;
      display: flex;
    }

    .sidebar {
      width: var(--sidebar-w);
      background: var(--bg-elevated);
      border-right: 1px solid var(--border);
      display: flex;
      flex-direction: column;
      padding: 20px 12px;
      position: sticky;
      top: 0;
      height: 100vh;
      flex-shrink: 0;
    }

    .sidebar .brand {
      padding: 0 8px 20px;
      margin-bottom: 8px;
      border-bottom: 1px solid var(--border);
    }

    .nav {
      display: flex;
      flex-direction: column;
      gap: 4px;
      flex: 1;
    }

    .nav-item {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 10px 12px;
      border-radius: 8px;
      color: var(--text-muted);
      text-decoration: none;
      font-size: 14px;
      font-weight: 500;
      border: none;
      background: transparent;
      cursor: pointer;
      text-align: left;
      width: 100%;
    }

    .nav-item.active,
    .nav-item:hover {
      background: var(--bg-hover);
      color: var(--text);
    }

    .nav-item.active {
      border-left: 3px solid var(--accent);
      padding-left: 9px;
    }

    .nav-icon {
      width: 18px;
      text-align: center;
      opacity: 0.85;
    }

    .sidebar-footer {
      padding-top: 12px;
      border-top: 1px solid var(--border);
    }

    .main {
      flex: 1;
      min-width: 0;
      padding: 28px 32px 40px;
    }

    .topbar {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 16px;
      margin-bottom: 28px;
      flex-wrap: wrap;
    }

    .topbar h1 {
      font-size: 24px;
      font-weight: 700;
      letter-spacing: -0.02em;
    }

    .topbar p {
      color: var(--text-muted);
      font-size: 14px;
      margin-top: 4px;
    }

    .badge {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      background: rgba(61, 214, 140, 0.12);
      color: var(--success);
      font-size: 12px;
      font-weight: 600;
      padding: 6px 10px;
      border-radius: 999px;
    }

    .badge-dot {
      width: 7px;
      height: 7px;
      border-radius: 50%;
      background: var(--success);
    }

    /* ——— Stats ——— */
    .stats {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 16px;
      margin-bottom: 24px;
    }

    .stat-card {
      background: var(--bg-elevated);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 20px 22px;
    }

    .stat-label {
      font-size: 13px;
      color: var(--text-muted);
      margin-bottom: 10px;
    }

    .stat-value {
      font-size: 28px;
      font-weight: 700;
      letter-spacing: -0.03em;
      line-height: 1.1;
    }

    .stat-meta {
      margin-top: 10px;
      font-size: 12px;
      color: var(--text-muted);
    }

    .stat-meta .up {
      color: var(--success);
    }

    /* ——— Panels ——— */
    .panels {
      display: grid;
      grid-template-columns: 1.4fr 1fr;
      gap: 16px;
    }

    .panel {
      background: var(--bg-elevated);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      overflow: hidden;
    }

    .panel-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 16px 20px;
      border-bottom: 1px solid var(--border);
    }

    .panel-header h2 {
      font-size: 15px;
      font-weight: 600;
    }

    .panel-body {
      padding: 0;
    }

    table {
      width: 100%;
      border-collapse: collapse;
      font-size: 13px;
    }

    th, td {
      text-align: left;
      padding: 12px 20px;
      border-bottom: 1px solid var(--border);
    }

    th {
      color: var(--text-muted);
      font-weight: 500;
      font-size: 12px;
      text-transform: uppercase;
      letter-spacing: 0.04em;
    }

    tr:last-child td {
      border-bottom: none;
    }

    tbody tr:hover {
      background: var(--bg-hover);
    }

    .tag {
      display: inline-block;
      font-size: 11px;
      font-weight: 600;
      padding: 3px 8px;
      border-radius: 4px;
    }

    .tag-login { background: rgba(66, 133, 244, 0.18); color: #8ab4f8; }
    .tag-purchase { background: rgba(61, 214, 140, 0.15); color: var(--success); }
    .tag-system { background: rgba(245, 166, 35, 0.15); color: var(--warning); }

    .status-list {
      list-style: none;
      padding: 8px 0;
    }

    .status-list li {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 14px 20px;
      border-bottom: 1px solid var(--border);
      font-size: 14px;
    }

    .status-list li:last-child {
      border-bottom: none;
    }

    .status-label {
      color: var(--text-muted);
    }

    .status-value {
      font-weight: 600;
    }

    .bar {
      width: 110px;
      height: 6px;
      background: #333;
      border-radius: 999px;
      overflow: hidden;
      display: inline-block;
      vertical-align: middle;
      margin-right: 8px;
    }

    .bar > span {
      display: block;
      height: 100%;
      background: var(--accent);
      border-radius: inherit;
    }

    .api-online {
      color: var(--success);
    }

    @media (max-width: 960px) {
      .stats {
        grid-template-columns: 1fr;
      }
      .panels {
        grid-template-columns: 1fr;
      }
    }

    @media (max-width: 720px) {
      #dashboard-view {
        flex-direction: column;
      }
      .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        flex-direction: row;
        align-items: center;
        flex-wrap: wrap;
        gap: 8px;
        padding: 12px;
      }
      .sidebar .brand {
        border-bottom: none;
        padding: 0 8px 0 0;
        margin: 0;
        flex: 1;
      }
      .nav {
        flex-direction: row;
        flex: 0 0 auto;
      }
      .sidebar-footer {
        border-top: none;
        padding-top: 0;
      }
      .main {
        padding: 20px 16px 32px;
      }
      .stat-value {
        font-size: 24px;
      }
    }
  
main{max-width:1500px} .cards{display:grid;grid-template-columns:repeat(3,1fr);gap:20px;margin:24px 0}.card,section{background:#191919;border:1px solid #303030;border-radius:10px;padding:24px;margin-bottom:20px}.value{font-size:36px;margin:14px 0}table{width:100%;border-collapse:collapse}td,th{text-align:left;padding:12px;border-bottom:1px solid #303030}textarea{width:100%;min-height:160px;background:#111;color:#eee;padding:16px;border:1px solid #444;border-radius:6px}button{margin:6px 6px 6px 0} .hint{color:#aaa;font-size:13px;line-height:1.7} .brand img{width:34px}.main{padding:32px;margin-left:240px}aside{position:fixed;inset:0 auto 0 0;width:240px;padding:24px;background:#181818;border-right:1px solid #303030}aside button{display:block;width:100%;text-align:left}input{padding:12px;background:#111;color:#eee;border:1px solid #444;border-radius:6px;width:100%;margin:8px 0}h1,h2{margin-bottom:16px}#message{color:#ffb35c;white-space:pre-wrap}pre{white-space:pre-wrap;word-break:break-word}.barline{height:12px;background:#e53935;min-width:2px} @media(max-width:850px){aside{position:static;width:auto}.main{margin:0;padding:16px}.cards{grid-template-columns:1fr}}[hidden]{display:none!important}

/* Studio navigation and restrained information hierarchy. */
aside{padding:28px 16px;display:flex;flex-direction:column;background:#161616}aside .brand{padding:0 10px;margin-bottom:8px}aside>p{padding:0 12px}nav{margin-top:24px}nav .btn{display:flex;align-items:center;justify-content:flex-start;gap:14px;padding:13px 16px;border-radius:6px;font-size:14px;margin:4px 0;color:#aaa;font-weight:500}nav .btn span{width:22px;font-size:21px;text-align:center;color:#888}nav .btn:hover{background:#242424;color:#fff}nav .btn.active{background:#332020;color:#ffb5b5;box-shadow:inset 3px 0 #ef4444}nav .btn.active span{color:#ef4444}.nav-label{font-size:10px;letter-spacing:1.4px;color:#777;padding:16px 16px 8px} .main{max-width:1700px;padding:36px 42px}.main>h1{font-size:26px;letter-spacing:-.5px;margin-bottom:8px}#status{font-size:12px;color:#999;min-height:22px}.cards{gap:16px;margin-top:24px}.card{padding:22px 24px;margin-bottom:0}.card h2{font-size:13px;font-weight:500;color:#aaa;margin:0}.value{font-weight:600;font-size:38px;letter-spacing:-1px;margin-bottom:0}section{margin-top:24px;padding:24px}section h2{font-size:17px;font-weight:600}.hint{margin:16px 0}th{font-size:11px;color:#888;letter-spacing:.6px}td{font-size:13px}.empty{display:flex;align-items:center;justify-content:center;min-height:130px;color:#888;background:#151515;border-radius:6px;text-align:center;padding:24px;font-size:13px}.chart{display:flex;align-items:flex-end;gap:8px;height:180px;padding-top:16px}.chart-column{flex:1;min-width:18px;display:flex;height:100%;flex-direction:column;justify-content:flex-end;gap:10px;align-items:center}.chart-column .barline{width:100%;max-width:50px;border-radius:3px 3px 0 0;height:var(--barheight)}.chart-column small{font-size:10px;color:#888}.chart-column strong{font-size:12px;color:#ddd}.discord-layout{display:grid;grid-template-columns:1.1fr 1fr;gap:24px}.discord-editor label{font-size:12px;color:#aaa;display:block;margin-top:18px}.discord-editor input,.discord-editor textarea{margin:8px 0 0}.discord-preview{background:#313338;border-radius:8px;padding:24px;align-self:start;position:sticky;top:24px}.discord-preview .bot-name{font-size:15px;font-weight:600;margin-bottom:16px}.discord-preview .embed{border-left:4px solid var(--embed-color,#ef4444);background:#2b2d31;border-radius:4px;padding:18px}.discord-preview .embed h2{font-size:17px;margin:8px 0}.discord-preview .embed p{white-space:pre-wrap;font-size:14px;line-height:1.5}.discord-preview .embed footer{font-size:11px;color:#bbb;margin-top:18px}.discord-preview .embed a{color:#8bbaff}.tools{display:flex;gap:8px;flex-wrap:wrap;margin-top:20px}.tools button{background:#292929;color:#eee;border:1px solid #444}.tools .send{background:#c93434;border-color:#c93434}.event-dot{color:#ef4444}.event-row{padding:18px 0;border-bottom:1px solid #303030;display:flex;gap:16px}.event-row small{display:block;margin-top:5px;color:#888}.danger{border:1px solid #6c2929;color:#ffaaaa;background:#291818;padding:12px;border-radius:5px}.inline-fields{display:grid;grid-template-columns:1fr 1fr;gap:12px}input[type=color]{height:44px;padding:5px}pre{overflow-wrap:anywhere} @media(max-width:1000px){.discord-layout{grid-template-columns:1fr}.discord-preview{position:static}.main{padding:24px}}@media(max-width:850px){aside{display:block}.cards{grid-template-columns:1fr}nav{display:flex;flex-wrap:wrap;gap:6px}nav .btn{width:auto}.nav-label{display:none}.main{padding:18px}.inline-fields{grid-template-columns:1fr}}

aside{overflow-y:auto}select{width:100%;padding:12px;background:#111;color:#eee;border:1px solid #444;border-radius:6px;margin-top:16px}label{display:block;font-size:13px;color:#bbb;margin-top:12px}
