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


    :root {
    /* Backgrounds */
    --color-background-primary: #ffffff;
    --color-background-secondary: #f5f5f5;
    --color-background-tertiary: #ebebeb;

    /* Borders */
    --color-border-tertiary: rgba(0, 0, 0, 0.10);
    --color-border-secondary: rgba(0, 0, 0, 0.20);
    --color-border-primary:   rgba(0, 0, 0, 0.30);

    /* Text */
    --color-text-primary:   #111111;
    --color-text-secondary: #555555;
    --color-text-tertiary:  #999999;

    /* Border radius */
    --border-radius-md: 8px;
    --border-radius-lg: 12px;
    --border-radius-xl: 16px;

    /* Fonts */
    --font-sans: system-ui, -apple-system, sans-serif;
    --font-mono: ui-monospace, monospace;
}

/* Dark mode — auto-switches based on OS preference */
@media (prefers-color-scheme: dark) {
    :root {
        --color-background-primary:   #1a1a1a;
        --color-background-secondary: #252525;
        --color-background-tertiary:  #2e2e2e;

        --color-border-tertiary: rgba(255, 255, 255, 0.08);
        --color-border-secondary: rgba(255, 255, 255, 0.15);
        --color-border-primary:   rgba(255, 255, 255, 0.25);

        --color-text-primary:   #f0f0f0;
        --color-text-secondary: #aaaaaa;
        --color-text-tertiary:  #666666;
    }
}

    body {
      background: #0f0f0f;
      color: #fff;
      font-family: system-ui, -apple-system, sans-serif;
      min-height: 100vh;
    }

    .layout { display: flex; min-height: 100vh; }

    .main {
      flex: 1;
      margin-left: 260px;
      display: flex;
      flex-direction: column;
      min-height: 100vh;
      overflow: hidden;
    }

    /* ── Topbar ── */
    .topbar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 18px 28px;
      border-bottom: 0.5px solid rgba(255,255,255,0.07);
      background: #0f0f0f;
      position: sticky;
      top: 0;
      z-index: 100;
    }
    .topbar-left { display: flex; align-items: center; gap: 14px; }
    .menu-btn {
      display: none;
      background: none;
      border: 0.5px solid rgba(255,255,255,0.1);
      border-radius: 8px;
      color: rgba(255,255,255,0.6);
      width: 34px; height: 34px;
      font-size: 16px;
      align-items: center;
      justify-content: center;
      cursor: pointer;
    }
    .page-title { font-size: 18px; font-weight: 500; color: #fff; }
    .breadcrumb {
      font-size: 12px;
      color: rgba(255,255,255,0.3);
      display: flex;
      align-items: center;
      gap: 6px;
      margin-top: 2px;
    }
    .breadcrumb a { color: rgba(255,255,255,0.3); text-decoration: none; }
    .breadcrumb a:hover { color: rgba(255,255,255,0.6); }
    .breadcrumb span:last-child { color: rgba(255,255,255,0.55); }
    .topbar-right { display: flex; align-items: center; gap: 10px; }
    .topbar-btn {
      display: flex; align-items: center; justify-content: center;
      width: 34px; height: 34px;
      border-radius: 8px;
      border: 0.5px solid rgba(255,255,255,0.1);
      background: rgba(255,255,255,0.04);
      color: rgba(255,255,255,0.6);
      font-size: 16px;
      cursor: pointer;
      text-decoration: none;
      position: relative;
    }
    .topbar-btn:hover { background: rgba(255,255,255,0.08); color: #fff; }
    .notif-dot {
      position: absolute; top: -3px; right: -3px;
      width: 8px; height: 8px;
      border-radius: 50%;
      background: #e05050;
      border: 1.5px solid #0f0f0f;
    }

    /* ── Page body ── */
    .page-body { padding: 28px; flex: 1; }

    /* ── Page header row ── */
    .page-header {
      display: flex;
      align-items: flex-end;
      justify-content: space-between;
      gap: 16px;
      flex-wrap: wrap;
      margin-bottom: 22px;
    }
    .page-header-title {
      font-size: 15px;
      font-weight: 500;
      color: rgba(255,255,255,0.85);
    }
    .page-header-sub {
      font-size: 11.5px;
      color: rgba(255,255,255,0.22);
      margin-top: 4px;
    }



    /* ── Skeleton ── */
    .skel {
      display: inline-block;
      border-radius: 5px;
      background: linear-gradient(90deg,
        rgba(255,255,255,0.04) 25%,
        rgba(255,255,255,0.09) 50%,
        rgba(255,255,255,0.04) 75%);
      background-size: 300% 100%;
      animation: shimmer 1.5s ease infinite;
    }
    @keyframes shimmer {
      0%   { background-position: 200% 0; }
      100% { background-position: -200% 0; }
    }

    /* ── State rows ── */
    .state-row td {
      text-align: center !important;
      padding: 56px 20px;
      color: rgba(255,255,255,0.18);
      font-size: 13px;
    }
    .state-row i { font-size: 34px; display: block; margin-bottom: 10px; }

    /* ── Footer ── */
    tfoot tr {
      background: #161616;
      border-top: 0.5px solid rgba(255,255,255,0.1);
    }
    tfoot td {
      padding: 13px 20px;
      font-size: 10.5px;
      letter-spacing: 0.07em;
      text-transform: uppercase;
      color: rgba(255,255,255,0.25);
    }
    tfoot td:not(:first-child) { text-align: right; }
    .foot-num {
      font-size: 13px;
      font-weight: 500;
      color: rgba(255,255,255,0.75);
      text-transform: none;
      letter-spacing: 0;
    }
    .foot-num.owed { color: #e05050; }

    /* ── Responsive ── */
    @media (max-width: 900px) {
      .main { margin-left: 0; }
      .menu-btn { display: flex; }
    }
    @media (max-width: 600px) {
      .page-body { padding: 16px; }
      th, td { padding: 11px 14px; }
    }