  :root{
    --paper:#EFEEEA; --panel:#FFFFFF; --ink:#1A1E22; --ink-muted:#5B6570; --ink-faint:#9198A0;
    --steel:#2C4A63; --steel-dark:#1D3244; --amber:#D98E2B; --amber-light:#F3D9AC;
    --green:#3F7D52; --green-bg:#E7F1E9; --red:#B23A34; --red-bg:#FBEAE9; --line:#DEDCD5;
    --ease: cubic-bezier(.2,.8,.2,1);
    --focus-ring: 0 0 0 3px rgba(44,74,99,0.28);
  }
  *{box-sizing:border-box;margin:0;padding:0}
  html{scroll-behavior:smooth}
  body{
    font-family:'Vazirmatn',sans-serif; font-feature-settings:"ss01" on;
    background:radial-gradient(circle at 15% -10%, rgba(217,142,43,0.08), transparent 40%), var(--paper);
    color:var(--ink); min-height:100vh; -webkit-font-smoothing:antialiased; overflow-x:hidden;
    line-height:1.65; font-size:15px;
  }
  /* Persian digits get the display font; technical/reference codes stay Latin+mono for scanability */
  .mono{font-family:'Roboto Mono',monospace;direction:ltr;unicode-bidi:isolate}
  .fa-num{font-variant-numeric:normal;font-feature-settings:normal}

  /* Accessible, visible focus for every interactive element (keyboard nav) */
  a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible,
  .chip:focus-visible, .doc-frame:focus-visible, .truck-chip:focus-visible{
    outline:none; box-shadow:var(--focus-ring); border-color:var(--steel);
  }

  @media (prefers-reduced-motion: reduce){
    *,*::before,*::after{animation-duration:.001ms !important; animation-iteration-count:1 !important; transition-duration:.001ms !important; scroll-behavior:auto !important}
  }

  @keyframes fadeUp{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:translateY(0)}}
  @keyframes fadeIn{from{opacity:0}to{opacity:1}}
  @keyframes popIn{from{opacity:0;transform:scale(.92)}to{opacity:1;transform:scale(1)}}
  @keyframes drift{0%,100%{transform:translateY(0)}50%{transform:translateY(-6px)}}
  @keyframes slideDown{from{opacity:0;transform:translateY(-8px);max-height:0}to{opacity:1;transform:translateY(0);max-height:400px}}
  @keyframes toastIn{from{opacity:0;transform:translateY(10px) translateX(0)}to{opacity:1;transform:translateY(0)}}

  #login-screen{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:24px;position:relative}
  .bg-ring{position:absolute;border:1px solid var(--line);border-radius:50%;animation:drift 8s ease-in-out infinite;pointer-events:none}
  .bg-ring.r1{width:520px;height:520px;top:-120px;right:-140px}
  .bg-ring.r2{width:340px;height:340px;bottom:-100px;left:-100px;animation-delay:1.5s}
  .login-card{
    background:var(--panel);border:1px solid var(--line);border-radius:20px;width:100%;max-width:400px;
    padding:44px 36px;text-align:center;box-shadow:0 24px 60px -30px rgba(26,30,34,0.25);
    animation:fadeUp .6s cubic-bezier(.2,.8,.2,1) both;position:relative;z-index:1;
  }
  .gauge-mark{width:92px;height:92px;margin:0 auto 22px}
  .gauge-mark .arc{stroke-dasharray:190;stroke-dashoffset:190;animation:sweepIn 1.1s .2s cubic-bezier(.2,.8,.2,1) forwards}
  .gauge-mark .needle{transform-origin:50px 50px;transform:rotate(-35deg);animation:needleIn 1.3s .4s cubic-bezier(.34,1.56,.64,1) forwards}
  @keyframes sweepIn{to{stroke-dashoffset:0}}
  @keyframes needleIn{from{transform:rotate(-95deg)}to{transform:rotate(-35deg)}}
  .login-card h1{font-size:22px;font-weight:700;margin-bottom:4px}
  .login-card .sub{color:var(--ink-muted);font-size:13.5px;margin-bottom:30px;line-height:1.6}
  .field{text-align:right;margin-bottom:16px;animation:fadeUp .5s both}
  .field:nth-of-type(1){animation-delay:.15s}
  .field:nth-of-type(2){animation-delay:.22s}
  .field label{display:block;font-size:12.5px;color:var(--ink-muted);margin-bottom:6px;font-weight:500}
  .field input{
    width:100%;height:44px;border:1px solid var(--line);border-radius:9px;padding:0 14px;
    font-family:'Roboto Mono',monospace;direction:ltr;text-align:left;font-size:14px;
    background:var(--paper);transition:border-color .15s,box-shadow .15s;
  }
  .field input:focus{outline:none;border-color:var(--steel);box-shadow:0 0 0 3px rgba(44,74,99,0.12)}
  .btn-primary{
    width:100%;height:46px;background:var(--steel);color:#fff;border:none;border-radius:9px;
    font-family:'Vazirmatn';font-size:15px;font-weight:600;cursor:pointer;margin-top:8px;
    transition:background .15s,transform .1s;animation:fadeUp .5s .28s both;
  }
  .btn-primary:hover{background:var(--steel-dark)}
  .btn-primary:active{transform:scale(.98)}
  .demo-note{margin-top:20px;font-size:12px;color:var(--ink-faint);animation:fadeUp .5s .34s both}
  .field-error{color:var(--red);font-size:12.5px;text-align:right;min-height:0;margin-top:-8px;margin-bottom:0;max-height:0;overflow:hidden;opacity:0;transition:max-height .2s ease,opacity .2s ease,margin .2s ease}
  .field-error.show{max-height:30px;opacity:1;margin-bottom:8px}
  @keyframes shake{10%,90%{transform:translateX(-1px)}20%,80%{transform:translateX(2px)}30%,50%,70%{transform:translateX(-4px)}40%,60%{transform:translateX(4px)}}
  .field input.invalid{border-color:var(--red);animation:shake .4s}
  .admin-link{
    display:inline-block;margin-top:14px;font-size:12.5px;color:var(--steel);cursor:pointer;
    text-decoration:none;border-bottom:1px dashed var(--steel);animation:fadeUp .5s .38s both;
  }
  .admin-link:hover{color:var(--steel-dark)}

  #dash-screen,#admin-screen{display:none;max-width:980px;margin:0 auto;padding:30px 20px 70px}
  .enter{animation:fadeIn .5s both}
  .topbar{display:flex;align-items:center;justify-content:space-between;margin-bottom:26px;flex-wrap:wrap;gap:12px;animation:fadeUp .5s both}
  .who .greet{font-size:12.5px;color:var(--ink-muted)}
  .who .name{font-size:20px;font-weight:700}
  .controls{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
  select,.date-input{
    height:40px;border:1px solid var(--line);border-radius:9px;background:var(--panel);
    padding:0 14px;font-family:'Vazirmatn';font-size:13.5px;cursor:pointer;transition:border-color .15s;
  }
  select:hover,.date-input:hover{border-color:var(--steel)}
  .plate-badge{
    font-family:'Roboto Mono',monospace;direction:ltr;background:var(--steel);color:#fff;
    padding:9px 16px;border-radius:9px;font-size:14px;font-weight:600;letter-spacing:.5px;
  }
  .lock-badge{
    display:inline-flex;align-items:center;gap:5px;background:var(--green-bg);color:var(--green);
    font-size:11.5px;font-weight:600;padding:5px 11px;border-radius:20px;
  }
  .lock-badge svg{width:11px;height:11px}

  .grid{display:grid;grid-template-columns:280px 1fr;gap:16px;margin-bottom:16px}
  @media(max-width:720px){.grid{grid-template-columns:1fr}}
  .card{background:var(--panel);border:1px solid var(--line);border-radius:18px;transition:box-shadow .2s,transform .2s;animation:fadeUp .55s both}
  .card:hover{box-shadow:0 16px 40px -24px rgba(26,30,34,0.22);transform:translateY(-2px)}
  .grid .card:nth-child(1){animation-delay:.05s}
  .grid .card:nth-child(2){animation-delay:.1s}
  .gauge-card{padding:24px;display:flex;flex-direction:column;align-items:center;justify-content:center}
  .gauge-card .label{font-size:12.5px;color:var(--ink-muted);margin-bottom:8px}
  .gauge-card .amount{font-size:24px;font-weight:700;margin-top:8px;font-family:'Vazirmatn';direction:rtl;transition:opacity .18s ease}
  .refreshing .amount,.refreshing .val{opacity:.35;transition:opacity .12s ease}
  .gauge-card .unit{font-size:12px;color:var(--ink-muted);margin-top:2px}
  .ledger-card{padding:24px 26px}
  .ledger-card h2{font-size:14px;font-weight:600;margin-bottom:14px;color:var(--ink-muted)}
  .ledger-row{display:flex;justify-content:space-between;align-items:center;padding:11px 0;border-bottom:1px dashed var(--line);font-size:14.5px;line-height:1.5;opacity:0;animation:fadeUp .4s forwards}
  .ledger-row:nth-child(2){animation-delay:.05s} .ledger-row:nth-child(3){animation-delay:.1s}
  .ledger-row:nth-child(4){animation-delay:.15s} .ledger-row:nth-child(5){animation-delay:.2s}
  .ledger-row:nth-child(6){animation-delay:.25s} .ledger-row:nth-child(7){animation-delay:.3s}
  .ledger-row:nth-child(8){animation-delay:.35s}
  .ledger-row:last-child{border-bottom:none}
  .ledger-row .lbl{color:var(--ink-muted)}
  .ledger-row .val{font-family:'Vazirmatn';font-weight:500}
  .ledger-row.deduct .val{color:var(--red)}
  .ledger-row.subtotal{border-top:1.5px solid var(--ink);border-bottom:none;margin-top:4px;padding-top:12px}
  .ledger-row.subtotal .lbl,.ledger-row.subtotal .val{font-weight:700}
  .ledger-row.final{background:var(--green-bg);border-radius:10px;padding:13px 14px;margin-top:10px;animation-delay:.4s}
  .ledger-row.final .lbl,.ledger-row.final .val{color:var(--green);font-weight:700;font-size:16.5px}

  .section-title{font-size:14px;font-weight:600;color:var(--ink-muted);margin:28px 0 10px;display:flex;align-items:center;gap:8px;flex-wrap:wrap;animation:fadeUp .5s .2s both}
  .tag{background:var(--amber-light);color:#8a5a10;font-size:11px;font-weight:600;padding:3px 9px;border-radius:20px}

  .doc-card{padding:0;overflow:hidden;animation:fadeUp .5s .3s both}
  .doc-header{display:flex;align-items:center;justify-content:space-between;padding:16px 22px;border-bottom:1px solid var(--line)}
  .doc-header h2{font-size:14px;font-weight:600;color:var(--ink-muted)}
  .doc-header .pages{font-size:12px;color:var(--ink-faint)}
  .doc-body{padding:18px 22px 22px;background:#F7F6F3}
  .doc-frame{border:1px solid var(--line);border-radius:12px;overflow:hidden;background:#fff;cursor:zoom-in;position:relative;transition:box-shadow .2s}
  .doc-frame:hover{box-shadow:0 18px 44px -26px rgba(26,30,34,0.3)}
  .doc-frame img{display:block;width:100%;height:auto;transition:transform .35s cubic-bezier(.2,.8,.2,1)}
  .doc-frame:hover img{transform:scale(1.015)}
  .doc-hint{position:absolute;bottom:10px;left:10px;background:rgba(26,30,34,0.72);color:#fff;font-size:11.5px;padding:5px 10px;border-radius:20px;opacity:0;transition:opacity .2s}
  .doc-frame:hover .doc-hint{opacity:1}
  .lightbox{display:none;position:fixed;inset:0;background:rgba(26,30,34,.86);z-index:50;align-items:center;justify-content:center;padding:30px;animation:fadeIn .2s both}
  .lightbox.show{display:flex}
  .lightbox img{max-width:min(1100px,92vw);max-height:88vh;border-radius:10px;box-shadow:0 30px 80px rgba(0,0,0,.4);animation:popIn .25s cubic-bezier(.2,.8,.2,1) both}
  .lightbox-close{position:absolute;top:24px;left:24px;width:40px;height:40px;border-radius:50%;background:rgba(255,255,255,.12);border:none;color:#fff;font-size:20px;cursor:pointer;transition:background .15s}
  .lightbox-close:hover{background:rgba(255,255,255,.22)}

  /* date range bar for بارنامه */
  .date-bar{
    display:flex;align-items:center;gap:8px;flex-wrap:wrap;background:var(--panel);
    border:1px solid var(--line);border-radius:14px;padding:12px 14px;margin-bottom:14px;
    animation:fadeUp .5s .22s both;
  }
  .date-bar label{font-size:12.5px;color:var(--ink-muted)}
  .date-bar input[type=text]{width:112px}
  .chip{
    height:32px;padding:0 13px;border-radius:20px;border:1px solid var(--line);background:var(--paper);
    font-size:12.5px;cursor:pointer;transition:.15s;color:var(--ink-muted);
  }
  .chip.active{background:var(--steel);color:#fff;border-color:var(--steel)}
  .chip:hover{border-color:var(--steel)}
  .date-bar .go{
    height:32px;padding:0 16px;border-radius:20px;border:none;background:var(--amber);color:#fff;
    font-size:12.5px;font-weight:600;cursor:pointer;transition:filter .15s;
  }
  .date-bar .go:hover{filter:brightness(.94)}

  .trip-table-wrap{background:var(--panel);border:1px solid var(--line);border-radius:18px;overflow:auto;animation:fadeUp .5s .25s both}
  table{width:100%;border-collapse:collapse;font-size:13.5px;min-width:560px}
  thead th{text-align:right;padding:13px 14px;background:var(--paper);color:var(--ink-muted);font-weight:600;font-size:12.5px;border-bottom:1px solid var(--line);position:sticky;top:0}
  tbody td{padding:13px 14px;border-bottom:1px solid var(--line);line-height:1.55}
  tbody tr{transition:background .15s}
  tbody tr:hover{background:var(--paper)}
  tbody tr:last-child td{border-bottom:none}
  tbody td.num{font-family:'Vazirmatn';text-align:left}
  .empty-row{padding:30px;text-align:center;color:var(--ink-faint);font-size:13.5px}

  .bottom-actions{display:flex;justify-content:space-between;align-items:center;margin-top:22px;animation:fadeUp .5s .4s both}
  .btn-ghost{background:transparent;border:1px solid var(--line);border-radius:9px;height:40px;padding:0 18px;font-family:'Vazirmatn';font-size:13.5px;cursor:pointer;transition:border-color .15s,background .15s;display:flex;align-items:center;gap:6px}
  .btn-ghost:hover{background:#fff;border-color:var(--steel)}
  .disclaimer{font-size:12px;color:var(--ink-faint)}

  /* ---------- ADMIN ---------- */
  .admin-topbar{display:flex;align-items:center;justify-content:space-between;margin-bottom:24px;animation:fadeUp .5s both}
  .admin-topbar h1{font-size:20px;font-weight:700}
  .back-link{font-size:13px;color:var(--steel);cursor:pointer;border-bottom:1px dashed var(--steel)}
  .stat-strip{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin-bottom:22px}
  @media(max-width:640px){.stat-strip{grid-template-columns:1fr}}
  .stat-card{background:var(--panel);border:1px solid var(--line);border-radius:16px;padding:18px 20px;animation:fadeUp .5s both}
  .stat-strip .stat-card:nth-child(2){animation-delay:.05s} .stat-strip .stat-card:nth-child(3){animation-delay:.1s}
  .stat-card .n{font-size:26px;font-weight:700;font-family:'Vazirmatn'}
  .stat-card .l{font-size:12.5px;color:var(--ink-muted);margin-top:4px}

  .admin-panel{background:var(--panel);border:1px solid var(--line);border-radius:18px;margin-bottom:18px;animation:fadeUp .5s .15s both}
  .admin-panel .ph{display:flex;align-items:center;justify-content:space-between;padding:16px 22px;border-bottom:1px solid var(--line);flex-wrap:wrap;gap:10px}
  .admin-panel .ph h2{font-size:14.5px;font-weight:600}
  .admin-panel .table-scroll{overflow-x:auto}
  .admin-panel table{min-width:520px}
  .btn-add{height:36px;padding:0 15px;background:var(--steel);color:#fff;border:none;border-radius:8px;font-size:13px;font-weight:600;cursor:pointer;transition:background .15s}
  .btn-add:hover{background:var(--steel-dark)}

  .assign-form{padding:18px 22px;border-bottom:1px solid var(--line);display:none;animation:slideDown .3s ease both;overflow:hidden}
  .assign-form.show{display:block}
  .form-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-bottom:14px}
  @media(max-width:640px){.form-grid{grid-template-columns:1fr}}
  .form-field label{display:block;font-size:12px;color:var(--ink-muted);margin-bottom:6px}
  .form-field input,.form-field select{width:100%;height:40px;border:1px solid var(--line);border-radius:8px;padding:0 12px;font-family:'Vazirmatn';font-size:13.5px}
  .form-field input.mono-in{font-family:'Roboto Mono',monospace;direction:ltr;text-align:left}
  .truck-checks{display:flex;flex-wrap:wrap;gap:8px;margin-top:4px}
  .truck-chip{
    border:1px solid var(--line);border-radius:8px;padding:7px 12px;font-family:'Roboto Mono',monospace;
    direction:ltr;font-size:12.5px;cursor:pointer;transition:.15s;background:var(--paper);
  }
  .truck-chip.picked{background:var(--steel);color:#fff;border-color:var(--steel)}
  .truck-chip.taken{opacity:.4;cursor:not-allowed}
  .submit-row{display:flex;gap:10px;justify-content:flex-end}
  .btn-cancel{height:38px;padding:0 16px;background:transparent;border:1px solid var(--line);border-radius:8px;font-size:13px;cursor:pointer}
  .btn-submit{height:38px;padding:0 18px;background:var(--amber);color:#fff;border:none;border-radius:8px;font-size:13px;font-weight:600;cursor:pointer}

  tbody tr.new-row{animation:fadeUp .5s cubic-bezier(.2,.8,.2,1) both, highlight 1.6s ease .1s}
  @keyframes highlight{0%{background:var(--amber-light)}100%{background:transparent}}
  .status-dot{display:inline-block;width:7px;height:7px;border-radius:50%;margin-left:6px}
  .status-dot.assigned{background:var(--green)}
  .status-dot.unassigned{background:var(--ink-faint)}
  .mini-tag{font-size:10.5px;background:var(--amber-light);color:#8a5a10;padding:2px 7px;border-radius:20px;margin-right:5px}

  .toast{
    position:fixed;bottom:24px;left:50%;transform:translateX(-50%);background:var(--ink);color:#fff;
    padding:12px 20px;border-radius:10px;font-size:13.5px;display:none;align-items:center;gap:8px;
    box-shadow:0 14px 34px rgba(0,0,0,.25);z-index:60;
  }
  .toast.show{display:flex;animation:toastIn .3s cubic-bezier(.2,.8,.2,1) both}

  @media print{ #login-screen,.topbar .controls,.bottom-actions,.doc-hint,.date-bar{display:none !important} body{background:#fff} }

/* --- additions for the real (non-demo) site --- */
body { font-size: 15px; }
a { color: var(--steel); }
.status-dot.invalid{background:var(--red)}
.plate-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.plate-row form{display:inline}
.link-back{font-size:13px;color:var(--steel);cursor:pointer;border-bottom:1px dashed var(--steel);text-decoration:none}
.small-note{font-size:12px;color:var(--ink-faint)}

/* --- plate autocomplete / checker widget --- */
.form-field{position:relative}
.plate-suggest-box{
  display:none;position:absolute;top:100%;right:0;left:0;z-index:40;margin-top:4px;
  background:#FFFFFF;border:1px solid #E2E8E5;border-radius:12px;
  box-shadow:0 4px 16px -2px rgba(9,78,68,.08),0 1px 4px rgba(9,78,68,.04);max-height:260px;overflow-y:auto;
}
.plate-suggest-box.show{display:block;animation:slideDown .15s ease both}
.plate-suggest-item{
  display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:8px 12px;cursor:pointer;
  width:100%;margin:0;border:0;border-bottom:1px solid var(--line);border-radius:0;
  background:#FFFFFF;color:#1E2928;font:inherit;font-size:13px;text-align:start;box-shadow:none;
}
.plate-suggest-item:last-child{border-bottom:none}
.plate-suggest-item:hover,.plate-suggest-item:focus-visible{background:#F3F6F5;outline:2px solid #00675B;outline-offset:-2px}
.plate-suggest-item .mono{font-family:'Roboto Mono',monospace;direction:ltr}
.plate-suggest-tag{font-size:10.5px;padding:2px 7px;border-radius:20px;white-space:nowrap}
.plate-suggest-tag.tag-local{background:var(--green-bg);color:var(--green)}
.plate-suggest-tag.tag-sql{background:#E4ECF2;color:var(--steel)}
.plate-suggest-tag.tag-site{background:var(--amber-light);color:#8a5a10}
.plate-suggest-sub{font-size:11.5px;color:var(--ink-faint);width:100%}
.plate-suggest-empty{padding:10px 12px;font-size:12.5px;color:var(--ink-faint)}

.mah-status-table td, .mah-status-table th{white-space:nowrap}
.mah-status-warn{color:var(--red);font-size:12.5px}
.mah-status-ok{color:var(--green);font-size:12.5px}
/* Repair release: accessible reporting, local fonts, mobile-safe tables. */
.report-screen { max-width: 1320px; margin: 32px auto; padding: 0 24px 48px; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 14px; align-items: end; margin: 20px 0; }
.filter-bar label { display: grid; gap: 7px; flex: 1 1 175px; min-width: 0; }
.filter-bar input, .filter-bar select { min-height: 42px; width: 100%; padding: 8px 12px; border: 1px solid #b9bdc3; border-radius: 8px; font: inherit; background: white; }
.filter-bar button { padding: 11px 18px; border: 0; border-radius: 8px; background: #294c65; color: white; cursor: pointer; font: inherit; }
.notice { padding: 14px 18px; border-radius: 8px; background: #edf1f4; margin: 14px 0; line-height: 1.9; }
.notice.warning { background: #fff3d5; color: #634900; }
.notice.error { background: #fee8e5; color: #842a20; }
.flash-messages { max-width: 1200px; margin: 20px auto; padding: 0 20px; }
.inline-form { display: inline; margin: 0; }
.link-button { border: 0; background: none; color: #294c65; font: inherit; cursor: pointer; padding: 0; }
.pagination { display: flex; gap: 24px; justify-content: center; padding: 20px; }
.document-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(220px,1fr)); gap: 20px; padding: 18px; }
.document-grid figure { margin: 0; }
.document-grid img { width: 100%; height: auto; border: 1px solid #cbd0d4; }
.document-grid figcaption { text-align: center; padding: 8px; }
.report-screen .card, #dash-screen details.card { padding: 20px; margin: 18px 0; }
summary { cursor: pointer; padding: 8px; }
.table-scroll { overflow-x: auto; }
.table-scroll table { min-width: 720px; }
.admin-topbar, .topbar, .controls { flex-wrap: wrap; gap: 14px; }
.admin-topbar > div { flex-wrap: wrap; }
[hidden] { display: none !important; }
@media(max-width:700px) { .report-screen { padding: 0 12px 32px; } .filter-bar { align-items: stretch; } .filter-bar label { flex-basis: 100%; } .grid { grid-template-columns: 1fr !important; } }

/* Performance: server-rendered, offline charts with exact-value HTML fallback. */
.performance-screen h1 { font-size: 27px; }
.performance-intro { margin: 22px 0 8px; color: var(--ink-muted); }
.performance-filters { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.performance-card { min-width: 0; }
.chart-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.chart-heading h2 { font-size: 19px; }
.eyebrow { color: #657785; font-size: 12px; margin-bottom: 5px; }
.chart-unit { font-size: 12px; color: #5b6570; background: #f3f5f6; padding: 7px 12px; border-radius: 20px; }
.trend-scroll { overflow-x: auto; direction: rtl; padding: 8px 0; }
.trend-chart { display: block; direction: ltr; width: 100%; min-width: 880px; max-height: 380px; overflow: visible; }
.chart-grid { stroke: #dce2e6; stroke-dasharray: 4 5; }
.axis-label { font-size: 11px; fill: #566570; }
.point-label { font-size: 10px; fill: #294c65; }
.trend-line { stroke: #294c65; stroke-width: 3; fill: none; stroke-linejoin: round; }
.trend-point { stroke: white; stroke-width: 3; fill: #d98e2b; }
.trend-point:focus { stroke: #294c65; stroke-width: 4; outline: none; }
.missing-point { fill: #929ca3; font-size: 14px; }
.leaderboard { list-style: none; display: grid; gap: 23px; margin: 8px 0 24px; }
.leader-row { display: flex; gap: 15px; align-items: center; }
.rank { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 34px; border-radius: 50%; background: #edf1f4; color: #294c65; font-weight: bold; }
.leader-row:first-child .rank { background: #f3d9ac; color: #68430e; }
.leader-main { flex: 1; min-width: 0; }
.leader-info { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 20px; margin-bottom: 9px; }
.leader-info a { text-decoration: none; overflow-wrap: anywhere; }
.leader-value { font-weight: bold; color: #294c65; }
.leader-value small { font-weight: normal; color: #68727a; }
.bar-track { height: 13px; border-radius: 4px; background: #edf1f4; overflow: hidden; }
.bar-fill { height: 100%; background: #49697e; border-radius: 4px; }
.leader-row:first-child .bar-fill { background: #d98e2b; }
.performance-card .small-note { color: #5b6570; line-height: 1.9; }
@media(max-width:700px) { .performance-screen h1 { font-size: 23px; } .leader-value { font-size: 14px; } .chart-heading h2 { font-size: 17px; } }
