:root {
      color-scheme: dark;
      --bg: #050807;
      --panel: #0A100D;
      --panel2: #101814;
      --panel3: #14221B;
      --ink: #FFFFFF;
      --ink2: #B6C4BC;
      --mut: #788D82;
      --line: #172820;
      --acc: #00E676;
      --acc-glow: rgba(0, 230, 118, 0.25);
      --good: #00E676;
      --warn: #F59E0B;
      --bad: #EF4444;
      --track: #15221B;
      --grid: #0E1713;
    }
    html {
      -webkit-text-size-adjust: 100%;
      text-size-adjust: 100%;
      scroll-behavior: smooth;
    }
    body {
      background-color: var(--bg);
      color: var(--ink);
      font-family: 'Inter', sans-serif;
      overflow-x: hidden;
      -webkit-font-smoothing: antialiased;
      padding-bottom: env(safe-area-inset-bottom, 0px);
    }
    h1, h2, h3, .font-display {
      font-family: 'Plus Jakarta Sans', sans-serif;
    }
    .tabular-nums {
      font-variant-numeric: tabular-nums;
    }
    
    ::-webkit-scrollbar {
      width: 5px;
      height: 5px;
    }
    ::-webkit-scrollbar-track {
      background: #050807;
    }
    ::-webkit-scrollbar-thumb {
      background: #14221B;
      border-radius: 3px;
    }
    ::-webkit-scrollbar-thumb:hover {
      background: #00E676;
    }
    .no-scrollbar::-webkit-scrollbar {
      display: none;
    }
    .no-scrollbar {
      -ms-overflow-style: none;
      scrollbar-width: none;
    }
    
    .bg-grid-pattern {
      background-image: 
        radial-gradient(circle at 15% 0%, rgba(0, 230, 118, 0.08) 0%, transparent 45%),
        radial-gradient(circle at 85% 0%, rgba(13, 148, 136, 0.07) 0%, transparent 45%),
        radial-gradient(rgba(0, 230, 118, 0.04) 1px, transparent 1px);
      background-size: 100% 100%, 100% 100%, 24px 24px;
    }

    .gauge-card {
      background: radial-gradient(130% 95% at 50% 100%, #101914, #0A100D);
      border: 1px solid #172820;
      border-radius: 16px;
      padding: 12px 10px 14px;
      text-align: center;
      position: relative;
      transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    }
    .gauge-card:hover {
      border-color: rgba(0, 230, 118, 0.35);
      box-shadow: 0 8px 24px -6px rgba(0, 230, 118, 0.12);
      transform: translateY(-2px);
    }
    .gauge-card svg {
      width: 100%;
      height: auto;
      display: block;
    }
    .gauge-card .lbl {
      font-size: 11px;
      color: #8FA398;
      font-weight: 700;
      letter-spacing: .5px;
      text-transform: uppercase;
      margin-top: -6px;
    }
    .gauge-card .meta {
      font-size: 11px;
      color: #697E73;
      margin-top: 3px;
      font-family: 'JetBrains Mono', monospace;
    }
    .gauge-card .st {
      position: absolute;
      top: 10px;
      right: 12px;
      font-size: 10px;
      font-weight: 700;
      letter-spacing: .5px;
      padding: 2px 6px;
      border-radius: 99px;
      border: 1px solid currentColor;
      background: rgba(5, 8, 7, 0.85);
    }

    .funnel-container {
      display: flex;
      gap: 0;
      align-items: stretch;
      overflow-x: auto;
      padding-bottom: 6px;
    }
    .fstep {
      flex: 1;
      min-width: 136px;
      background: #0D1612;
      border: 1px solid #172820;
      border-radius: 12px;
      padding: 12px 14px;
      position: relative;
      transition: all 0.2s;
    }
    .fstep.hot {
      border-color: #EF4444 !important;
      box-shadow: 0 0 16px rgba(239, 68, 68, 0.22) inset, 0 0 14px rgba(239, 68, 68, 0.25);
      background: #170E10;
    }
    .fstep .n {
      font-size: 20px;
      font-weight: 700;
      font-variant-numeric: tabular-nums;
      font-family: 'JetBrains Mono', monospace;
    }
    .fstep .t {
      font-size: 12px;
      color: #A3B5AA;
      margin-top: 2px;
      font-weight: 500;
    }
    .fstep .c {
      font-size: 11px;
      color: #697E73;
      margin-top: 4px;
      font-family: 'JetBrains Mono', monospace;
    }
    .farrow {
      min-width: 72px;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      font-size: 10.5px;
      color: #788D82;
      text-align: center;
      padding: 0 4px;
      font-family: 'JetBrains Mono', monospace;
    }
    .farrow b {
      font-size: 13.5px;
      color: #FFFFFF;
      font-weight: 700;
    }
    .farrow.bad b {
      color: #EF4444;
    }
    .farrow.ok b {
      color: #00E676;
    }

    .tw {
      overflow-x: auto;
      -webkit-overflow-scrolling: touch;
    }
    table {
      width: 100%;
      border-collapse: collapse;
      font-variant-numeric: tabular-nums;
    }
    th, td {
      text-align: right;
      padding: 8px 10px;
      border-top: 1px solid #14221B;
      white-space: nowrap;
    }
    th {
      color: #788D82;
      font-weight: 600;
      font-size: 11px;
      text-transform: uppercase;
      letter-spacing: .4px;
      border-top: 0;
      position: sticky;
      top: 0;
      background: #0A100D;
    }
    th:first-child, td:first-child {
      text-align: left;
      white-space: normal;
      min-width: 170px;
    }
    td.k {
      max-width: 380px;
      word-break: break-word;
    }
    td small {
      color: #788D82;
    }
    .bar {
      display: inline-block;
      height: 7px;
      border-radius: 4px;
      background: #00E676;
      vertical-align: middle;
      margin-right: 6px;
      min-width: 2px;
      opacity: .88;
      box-shadow: 0 0 6px rgba(0, 230, 118, 0.4);
    }
    .pill {
      display: inline-block;
      padding: 2px 8px;
      border-radius: 99px;
      font-size: 11px;
      border: 1px solid #172820;
      color: #A3B5AA;
      font-family: 'JetBrains Mono', monospace;
    }
    .pill.g { border-color: rgba(0, 230, 118, 0.4); color: #00E676; background: rgba(0, 230, 118, 0.08); }
    .pill.w { border-color: rgba(245, 158, 11, 0.4); color: #F59E0B; background: rgba(245, 158, 11, 0.08); }
    .pill.b { border-color: rgba(239, 68, 68, 0.4); color: #EF4444; background: rgba(239, 68, 68, 0.08); }

    .seg-group {
      display: inline-flex;
      background: #0A100D;
      border: 1px solid #172820;
      border-radius: 10px;
      overflow: hidden;
      padding: 2px;
    }
    .seg-group button {
      border: 0;
      background: none;
      color: #8FA398;
      padding: 6px 11px;
      font-size: 12px;
      font-weight: 500;
      cursor: pointer;
      border-radius: 7px;
      transition: all 0.15s ease;
      white-space: nowrap;
    }
    .seg-group button:hover {
      color: #FFFFFF;
      background: rgba(20, 34, 27, 0.6);
    }
    .seg-group button.on {
      background: #00E676;
      color: #050807;
      font-weight: 700;
      box-shadow: 0 1px 6px rgba(0, 230, 118, 0.3);
    }

    .days-chart {
      display: flex;
      align-items: flex-end;
      gap: 3px;
      height: 120px;
    }
    .days-chart div {
      flex: 1;
      display: flex;
      flex-direction: column;
      justify-content: flex-end;
      gap: 2px;
      min-width: 5px;
      position: relative;
      cursor: pointer;
    }
    .days-chart i {
      display: block;
      width: 100%;
      background: #172820;
      border-radius: 2px 2px 0 0;
      transition: opacity 0.15s;
    }
    .days-chart div:hover i {
      opacity: 0.8;
    }
    .days-chart i.c {
      background: #00E676;
    }

    #chart-tooltip {
      position: fixed;
      pointer-events: none;
      background: rgba(10, 16, 13, 0.95);
      color: #FFFFFF;
      border: 1px solid rgba(0, 230, 118, 0.4);
      font-size: 11.5px;
      padding: 6px 10px;
      border-radius: 8px;
      opacity: 0;
      transition: opacity .12s, transform .12s;
      z-index: 60;
      white-space: nowrap;
      box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.7);
      backdrop-filter: blur(8px);
      font-family: 'JetBrains Mono', monospace;
    }

    @media (max-width: 640px) {
      input, select, textarea {
        font-size: 16px !important;
      }
      th, td {
        padding: 6px 7px !important;
        font-size: 12px;
      }
    }
    @keyframes authShake {
      0%, 100% { transform: translateX(0); }
      20%, 60% { transform: translateX(-7px); }
      40%, 80% { transform: translateX(7px); }
    }
    .shake-card {
      animation: authShake 0.4s cubic-bezier(.36,.07,.19,.97) both;
    }
/* Administration uses the dashboard palette and native accessible controls. */
.tas-admin { max-width: 640px; max-height: 90dvh; overflow-y: auto; color: #d5e4dc; }
.tas-admin [hidden] { display: none !important; }
.tas-admin label { display: block; font-size: 12px; font-weight: 600; margin: 14px 0 6px; }
.tas-admin input, .tas-admin select { display: block; box-sizing: border-box; width: 100%; min-height: 44px; margin-top: 6px; padding: 10px 12px; border: 1px solid #294435; border-radius: 8px; background: #101814; color: #e9f5ee; font-size: 14px; }
.tas-admin input:focus, .tas-admin select:focus, .tas-admin button:focus-visible, .tas-admin summary:focus-visible { outline: 2px solid #00e676; outline-offset: 2px; }
.tas-admin-help { font-size: 12px; line-height: 1.6; color: #9db4a6; margin: 8px 0; overflow-wrap: anywhere; }
.tas-admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tas-admin summary { cursor: pointer; font-size: 12px; margin: 16px 0 8px; }
.tas-admin-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.tas-admin-actions button { min-height: 44px; padding: 10px 16px; border: 1px solid #294435; border-radius: 8px; font-size: 13px; }
.tas-admin-actions button[type=submit] { background: #00e676; color: #050807; font-weight: 700; }
.tas-admin button:disabled { opacity: .5; cursor: wait; }
#admin-message { overflow-wrap: anywhere; }
@media(max-width: 480px) { .tas-admin-grid { grid-template-columns: 1fr; gap: 0; } .tas-admin-actions button { width: 100%; } }
