:root{
  --bg:#070b15;
  --card:rgba(255,255,255,.06);
  --border:rgba(255,255,255,.12);
  --text:#e5e7eb;
  --muted:rgba(229,231,235,.70);
  --primary:#23b7ff;
  --accent:#38f9d7;
}

/* Light theme (Part 8.8) */
html[data-ui-theme="light"]{
  --bg:#F6F8FF;
  --card:rgba(255,255,255,.82);
  --border:rgba(11,18,32,.12);
  --text:#0B1220;
  --muted:rgba(11,18,32,.60);
  --primary:#1677FF;
  --accent:#06C6A7;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  background:radial-gradient(1200px 600px at 20% 10%, rgba(35,183,255,.18), transparent 55%),
             radial-gradient(900px 500px at 80% 20%, rgba(56,249,215,.14), transparent 60%),
             var(--bg);
  color:var(--text);
}

a{color:inherit;text-decoration:none}
.container{max-width:1100px;margin:0 auto;padding:24px}
.card{background:var(--card);border:1px solid var(--border);border-radius:18px;padding:18px;backdrop-filter:blur(10px)}
.row{display:flex;gap:14px;flex-wrap:wrap}
.btn{display:inline-flex;align-items:center;gap:8px;border-radius:14px;padding:10px 14px;border:1px solid var(--border);background:rgba(255,255,255,.06);cursor:pointer}
.btn:hover{border-color:rgba(35,183,255,.55)}
.btn.primary{background:linear-gradient(90deg, rgba(35,183,255,.9), rgba(56,249,215,.75));border:none;color:#031018}
.btn.ghost{background:transparent}
.btn.small{padding:8px 10px;border-radius:12px;font-size:13px}
.btn.danger{border-color:rgba(255,80,80,.35)}
.btn.danger:hover{border-color:rgba(255,80,80,.75)}
.muted{color:var(--muted)}

input{
  width:100%;
  padding:12px 12px;
  border-radius:14px;
  border:1px solid var(--border);
  background:rgba(0,0,0,.25);
  color:var(--text);
  outline:none;
}
html[data-ui-theme="light"] input{background:rgba(255,255,255,.88)}
html[data-ui-theme="light"] .sidebar{background:rgba(255,255,255,.55)}
label{font-size:13px;color:var(--muted)}

.topbar{
  display:flex;align-items:center;justify-content:space-between;
  padding:16px 24px;border-bottom:1px solid rgba(255,255,255,.08)
}

/* Shell (CP/Admin) */
.shell{min-height:100vh;display:grid;grid-template-columns:280px 1fr}
.sidebar{border-right:1px solid rgba(255,255,255,.08);padding:18px 16px;position:sticky;top:0;height:100vh;overflow:auto;background:rgba(0,0,0,.18);backdrop-filter:blur(10px)}
.side-head{padding-bottom:12px;border-bottom:1px solid rgba(255,255,255,.08);margin-bottom:12px}
.nav{display:flex;flex-direction:column;gap:8px}
.navlink{display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:14px;border:1px solid rgba(255,255,255,.10);background:rgba(255,255,255,.04)}
.navlink:hover{border-color:rgba(35,183,255,.55)}
.navlink.active{background:linear-gradient(90deg, rgba(35,183,255,.18), rgba(56,249,215,.08));border-color:rgba(35,183,255,.55)}

.nav-search{margin:10px 0 12px 0}
.nav-search input{padding:10px 12px;border-radius:14px;font-size:13px}
.navgrp{margin:10px 0 6px 0;padding:0 10px;font-size:11px;color:var(--muted);letter-spacing:.12em;text-transform:uppercase}
.navico{width:22px;display:inline-flex;justify-content:center}
.navlbl{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.navbadge{margin-inline-start:auto;font-size:11px;padding:2px 8px;border-radius:999px;border:1px solid rgba(255,255,255,.18);background:rgba(255,255,255,.06)}
.main{display:flex;flex-direction:column;min-width:0}
.content{max-width:1100px;margin:0 auto;padding:18px 24px 26px 24px;width:100%}
.h1{font-size:20px;font-weight:900}

.page-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:12px}
.page-title{display:flex;flex-direction:column;gap:4px}
.page-title .t{font-size:20px;font-weight:1000;letter-spacing:.2px}
.page-title .d{font-size:13px;color:var(--muted);line-height:1.4}

.toolbar{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-top:10px}
.toolbar .filters{display:flex;gap:10px;flex-wrap:wrap;align-items:flex-end}
.field{display:flex;flex-direction:column;gap:6px}
.field label{font-size:12px}
.field .help{font-size:12px;color:var(--muted)}

.table-wrap{overflow:auto;border-radius:18px;border:1px solid rgba(255,255,255,.10);background:rgba(255,255,255,.03)}
.table{width:100%;border-collapse:separate;border-spacing:0}
.table thead th{position:sticky;top:0;background:rgba(10,16,30,.92);backdrop-filter:blur(10px);z-index:2}
html[data-ui-theme="light"] .table thead th{background:rgba(255,255,255,.92)}
.table th{padding:12px 12px;border-bottom:1px solid rgba(255,255,255,.10);text-align:left}
.table td{padding:12px 12px;border-bottom:1px solid rgba(255,255,255,.06)}
.table tbody tr:hover td{background:rgba(35,183,255,.06)}

.alert{margin-bottom:12px;border-radius:16px;padding:12px 14px;border:1px solid rgba(255,255,255,.14);background:rgba(255,255,255,.06)}
.alert.ok{border-color:rgba(107,255,180,.35)}
.alert.warn{border-color:rgba(255,223,107,.35)}

/* legacy admin notices */
.notice{margin-bottom:12px;border-radius:16px;padding:12px 14px;border:1px solid rgba(255,255,255,.14);background:rgba(255,255,255,.06)}

.grid2{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.select{width:100%;padding:12px 12px;border-radius:14px;border:1px solid var(--border);background:rgba(0,0,0,.25);color:var(--text);outline:none}
.mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace}

.fx-table{width:100%;border-collapse:separate;border-spacing:0 10px}
.fx-table th{color:var(--muted);font-weight:800;font-size:12px;text-align:left;padding:0 10px}
.fx-table td{background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.10);padding:10px 10px}
.fx-table tr td:first-child{border-radius:14px 0 0 14px}
.fx-table tr td:last-child{border-radius:0 14px 14px 0}

.logoPrev{display:flex;align-items:center;gap:12px;border:1px dashed rgba(255,255,255,.18);border-radius:16px;padding:12px;background:rgba(255,255,255,.04)}
.logoPrev img{width:56px;height:56px;border-radius:16px;object-fit:cover}

.colors{display:flex;flex-direction:column;gap:10px}
.colorRow{display:grid;grid-template-columns:90px 50px 1fr;gap:10px;align-items:center}
.color{width:50px;height:38px;border-radius:12px;border:1px solid rgba(255,255,255,.16);background:transparent;padding:0}
.brand{display:flex;align-items:center;gap:10px}
.brand img{width:34px;height:34px;border-radius:10px;object-fit:cover}
.brand .t{font-weight:800;letter-spacing:.2px}

.kpi{flex:1;min-width:220px}
.kpi .n{font-size:22px;font-weight:800}

/* Board */
.board-wrap{height:100vh;display:flex;flex-direction:column}
.board-header{
  display:flex;align-items:center;justify-content:space-between;gap:14px;
  padding:16px 22px;
  border-bottom:1px solid rgba(255,255,255,.10);
  background:linear-gradient(180deg, rgba(10,16,30,.78), rgba(10,16,30,.55));
  backdrop-filter:blur(12px);
  position:sticky;top:0;z-index:10;
}
.board-title{display:flex;align-items:center;gap:12px}
.board-title img{width:46px;height:46px;border-radius:14px;background:rgba(255,255,255,.08)}
.chip{border:1px solid var(--border);border-radius:999px;padding:6px 10px;color:var(--muted);font-size:13px}
.chip.ok{border-color:rgba(107,255,180,.35);color:rgba(107,255,180,.95)}
.chip.info{border-color:rgba(96,165,250,.35);color:rgba(147,197,253,.98)}
.chip.warn{border-color:rgba(255,223,107,.35);color:rgba(255,223,107,.95)}

.board-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:flex-end}

.board-table{flex:1;overflow:hidden;padding:18px 22px}
table{width:100%;border-collapse:separate;border-spacing:0 10px}
.board-table thead th{color:var(--muted);font-weight:1000;font-size:16px;letter-spacing:.35px;text-align:left;padding:0 14px 10px 14px}
.board-table tbody td{
  background:linear-gradient(90deg, rgba(255,255,255,.07), rgba(255,255,255,.04));
  border:1px solid rgba(255,255,255,.10);
  padding:14px 14px;
}
.board-table tbody tr:hover td{
  background:rgba(35,183,255,.08);
  border-color:rgba(35,183,255,.35);
}
tr td:first-child{border-radius:16px 0 0 16px}
tr td:last-child{border-radius:0 16px 16px 0}
.code{font-weight:1000;letter-spacing:.5px}
.num{font-size:32px;font-weight:1000}
.warn{color:#ffdf6b}
.ok{color:#6bffb4}

/* Overlay (Activation / Locked) */
.fx-overlay{
  position:fixed;inset:0;z-index:9999;
  background:rgba(0,0,0,.62);
  display:flex;align-items:center;justify-content:center;
  padding:18px;
}
.fx-modal{
  width:min(720px, 100%);
  background:rgba(13,21,38,.92);
  border:1px solid rgba(255,255,255,.14);
  border-radius:18px;
  padding:18px;
  backdrop-filter:blur(14px);
  box-shadow:0 30px 80px rgba(0,0,0,.55);
}

@media (max-width:720px){
  .container{padding:14px}
  .board-header{padding:14px}
  .board-table{padding:14px}
  .shell{grid-template-columns:1fr}
  .sidebar{position:relative;height:auto;border-right:none;border-bottom:1px solid rgba(255,255,255,.08)}
  .content{padding:14px}
  .grid2{grid-template-columns:1fr}
  .colorRow{grid-template-columns:70px 50px 1fr}
}


/* Board improvements: flags, change%, english digits */
.board-table th.col-buy, .board-table th.col-sell, .board-table th.col-chg,
.board-table td.num, .board-table td.chg-cell{ text-align:center; }

.board-table th.col-cur{ width:52%; }
.board-table th.col-buy{ width:18%; }
.board-table th.col-sell{ width:18%; }
.board-table th.col-chg{ width:12%; }

.cur{ display:flex; align-items:center; gap:12px; }
.cur-meta{ display:flex; flex-direction:column; line-height:1.15; min-width:0; }
.code-line{display:flex;align-items:center;gap:10px;min-width:0}
.cur-name{ font-size:15px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

.num{
  font-variant-numeric: tabular-nums;
  letter-spacing:.2px;
}

.chg{
  display:inline-flex; align-items:center; justify-content:center;
  gap:6px;
  padding:6px 10px;
  border-radius:999px;
  font-size:14px;
  font-weight:900;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(255,255,255,.05);
  min-width:92px;
}
.chg.up{ color:#6bffb4; border-color:rgba(107,255,180,.30); }
.chg.down{ color:#ff6b6b; border-color:rgba(255,107,107,.30); }
.chg.flat{ color:rgba(229,231,235,.75); border-color:rgba(229,231,235,.18); }

/* RTL: keep currency column aligned, but numbers centered */
html[dir="rtl"] .board-table th{ text-align:right; }
html[dir="rtl"] .board-table th.col-buy,
html[dir="rtl"] .board-table th.col-sell,
html[dir="rtl"] .board-table th.col-chg{ text-align:center; }

@media (max-width: 720px){
  .board-header{ padding:14px 14px; flex-direction:column; align-items:flex-start; }
  .board-table{ padding:14px 14px; }
  td{ padding:12px 10px; }
  .num{ font-size:18px; }
  .chip{ padding:6px 9px; }
}

/* =====================
   SMS Relay by Yebrax UI v2 (no-scroll + rotation)
   ===================== */

.board-header{
  display:grid;
  grid-template-columns: minmax(260px,1fr) auto minmax(260px,1fr);
  align-items:center;
  gap:14px;
}
.board-left{display:flex;align-items:center;min-width:0}
.board-center{display:flex;justify-content:center;min-width:0}

.basebar{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 14px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,0.12);
  background:linear-gradient(180deg, rgba(10,16,31,0.42), rgba(10,16,31,0.26));
  box-shadow: 0 10px 30px rgba(0,0,0,0.28);
  backdrop-filter: blur(10px);
}
.base-flag{width:74px;height:52px;object-fit:cover;border-radius:12px;border:1px solid rgba(255,255,255,0.14)}
.base-title{font-weight:1000;font-size:30px;letter-spacing:0.2px;line-height:1.05}
.base-sub{font-size:20px}

.board-actions{justify-content:flex-end}

.board-table{overflow:hidden}

/* Light mode fixes: keep row cards visible and remove the washed-out look */
html[data-ui-theme="light"] .board-header{
  background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(248,250,252,0.88));
  border-color: rgba(2,6,23,0.10);
  box-shadow: 0 14px 42px rgba(2,6,23,0.10);
}
html[data-ui-theme="light"] .basebar{
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(248,250,252,0.86));
  border-color: rgba(2,6,23,0.10);
  box-shadow: 0 14px 40px rgba(2,6,23,0.10);
}
html[data-ui-theme="light"] .base-flag{border-color: rgba(2,6,23,0.12)}
html[data-ui-theme="light"] .board-table{
  background: rgba(255,255,255,0.70);
  border-color: rgba(2,6,23,0.10);
}
html[data-ui-theme="light"] .board-table thead th{
  color: rgba(2,6,23,0.80);
}
html[data-ui-theme="light"] .board-table tbody td{
  background: rgba(255,255,255,0.92);
  border-color: rgba(2,6,23,0.10);
}
html[data-ui-theme="light"] .board-table tbody tr:hover td{
  border-color: rgba(2,6,23,0.16);
  transform: none;
}
html[data-ui-theme="light"] .chg.flat{background: rgba(2,6,23,0.06); border-color: rgba(2,6,23,0.10); color: rgba(2,6,23,0.68)}

/* Responsive: stack center under title on narrow widths */
@media (max-width: 900px){
  .board-header{grid-template-columns: 1fr; gap:10px;}
  .board-actions{justify-content:flex-start}
  .board-center{justify-content:flex-start}
}


/* Board: hard-disable scrollbars */
body.fx-board{overflow:hidden}

.fx-flag{width:34px;height:24px;object-fit:cover;border-radius:6px;border:1px solid rgba(255,255,255,0.14)}
html[data-ui-theme="light"] .fx-flag{border-color: rgba(2,6,23,0.12)}

.fx-flag-inline{width:42px;height:30px;object-fit:cover;border-radius:9px;border:1px solid rgba(255,255,255,0.14)}
html[data-ui-theme="light"] .fx-flag-inline{border-color: rgba(2,6,23,0.12)}

/* Board readability: bigger currency code/name (TV friendly) */
body.fx-board .board-table thead th{font-size:18px}
body.fx-board .board-table .code{font-size:22px}
body.fx-board .cur-name{font-size:18px}
body.fx-board .num{font-size:34px}
body.fx-board .chg{font-size:15px; min-width:102px}

/* =====================
   RTL corner fix (Board rows)
   In RTL, the first column is rendered on the right, so we must swap
   the start/end rounding to keep row corners correct.
   ===================== */
html[dir="rtl"] .board-table tbody tr td:first-child{
  border-radius:0 16px 16px 0 !important; /* right side */
}
html[dir="rtl"] .board-table tbody tr td:last-child{
  border-radius:16px 0 0 16px !important; /* left side */
}

/* Same idea for CP tables that use fx-table spacing */
html[dir="rtl"] .fx-table tr td:first-child{border-radius:0 14px 14px 0 !important;}
html[dir="rtl"] .fx-table tr td:last-child{border-radius:14px 0 0 14px !important;}

/* =====================
   RTL Currency Item order + reliable row corners
   - In Arabic (RTL) we want the flag at START (right) then code/name.
   - Also, rely on explicit TD classes (td-cur / td-chg) instead of :first-child
     because table rendering in RTL can be confusing across browsers.
   ===================== */

/* Make the currency item read naturally in RTL: flag on the right */
html[dir="rtl"] body.fx-board .board-table td.td-cur .cur{
  flex-direction: row-reverse;
  justify-content: flex-end;
  width: 100%;
}
html[dir="rtl"] body.fx-board .board-table td.td-cur .cur-meta{
  align-items: flex-end;
  text-align: right;
}
html[dir="rtl"] body.fx-board .board-table td.td-cur .code-line{
  justify-content: flex-end;
}

/* Reset generic rounding on all cells, then apply only on row edges */
body.fx-board .board-table tbody td{
  border-radius: 0 !important;
  overflow: hidden; /* clip bg+border for rounded edges */
}

/* LTR: Currency is left edge, Change is right edge */
html[dir="ltr"] body.fx-board .board-table tbody td.td-cur{
  border-radius: 16px 0 0 16px !important;
}
html[dir="ltr"] body.fx-board .board-table tbody td.td-chg{
  border-radius: 0 16px 16px 0 !important;
}

/* RTL: Currency is right edge, Change is left edge */
html[dir="rtl"] body.fx-board .board-table tbody td.td-cur{
  border-radius: 0 16px 16px 0 !important;
}
html[dir="rtl"] body.fx-board .board-table tbody td.td-chg{
  border-radius: 16px 0 0 16px !important;
}

/* Keep flag inline after the code (not above) */
body.fx-board .code-line{flex-wrap:nowrap}

.num-sub{
  display:inline-flex;
  align-items:center;
  gap:8px;
  margin-top:6px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(255,255,255,.06);
  font-size:18px;
  font-weight:950;
  letter-spacing:.2px;
  line-height:1;
  color:var(--text);
  opacity:.95;
}

.sub-tag{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height:22px;
  padding:0 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:1000;
  letter-spacing:.25px;
  color:#fff;
  background:linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow:0 8px 18px rgba(0,0,0,.25);
}

html[data-ui-theme="light"] .num-sub{
  border-color:rgba(0,0,0,.12);
  background:rgba(0,0,0,.05);
}

/* Page change animation (rotation) */
#sms_rows.sms-page-out{opacity:0;transform:translateY(10px);transition:opacity .22s ease, transform .22s ease}
#sms_rows.sms-page-in{animation:smsPageIn .45s ease}
@keyframes smsPageIn{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}


/* Board: better Light mode contrast */
html[data-ui-theme="light"] .board-head{background:linear-gradient(90deg, rgba(22,119,255,.10), rgba(6,198,167,.10));border-color:rgba(2,6,23,.10)}
html[data-ui-theme="light"] .board-table thead th{background:rgba(2,6,23,.03);border-bottom-color:rgba(2,6,23,.10)}
html[data-ui-theme="light"] .board-table tbody tr{background:rgba(255,255,255,.70);border:1px solid rgba(2,6,23,.08)}
html[data-ui-theme="light"] .board-table tbody td{border-left-color:rgba(2,6,23,.06)}
html[data-ui-theme="light"] .chg{background:rgba(2,6,23,.04);border-color:rgba(2,6,23,.08)}

/* =====================
   FX Patch v6 — Fixes
   - Restore stable board design
   - Activation code row UI
   - Cell/row glow on change (no full redraw)
   - Flag/Name sizing adjustments
   ===================== */

/* Activation code input with fixed prefix FX- */
.fx-code-row{display:flex;align-items:center;gap:10px}
.fx-code-prefix{
  display:inline-flex;align-items:center;justify-content:center;
  height:46px;min-width:56px;
  padding:0 12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.16);
  background:rgba(255,255,255,.06);
  font-weight:1000;
  letter-spacing:.5px;
  color:var(--text);
}
html[data-ui-theme="light"] .fx-code-prefix{border-color:rgba(2,6,23,.12);background:rgba(2,6,23,.05)}

/* Board AppBar: slightly smaller base flag + title */
.base-flag{width:64px;height:44px}
.base-title{font-size:26px}
.base-sub{font-size:18px}

/* Currency cell: ensure START alignment + bigger name */
.cur{display:flex;align-items:center;gap:12px}
html[dir="rtl"] .cur{flex-direction:row-reverse}

/* RTL (Arabic) fix: align currency item content to the right and keep a clean order */
html[dir="rtl"] .board-table td .cur{justify-content:flex-end}
html[dir="rtl"] .cur-meta{align-items:flex-end;text-align:right}
html[dir="rtl"] .code-line{justify-content:flex-end}
html[dir="rtl"] .cur-name{text-align:right}

/* Bigger flags in rows */
.fx-flag-inline{width:56px;height:40px;border-radius:12px}

/* Make currency name a bit bigger for TV */
body.fx-board .cur-name{font-size:22px}

/* Glow (only when data changes) */
.fx-row-glow td{
  border-color:rgba(35,183,255,.38) !important;
  box-shadow: inset 0 0 0 1px rgba(35,183,255,.18), 0 0 18px rgba(35,183,255,.10);
}

.fx-cell-glow{
  box-shadow: inset 0 0 0 2px rgba(56,249,215,.18), 0 0 20px rgba(56,249,215,.12);
  border-radius:14px;
}

html[data-ui-theme="light"] .fx-row-glow td{
  border-color:rgba(2,6,23,.22) !important;
  box-shadow: inset 0 0 0 1px rgba(2,6,23,.10), 0 0 16px rgba(2,6,23,.08);
}
html[data-ui-theme="light"] .fx-cell-glow{
  box-shadow: inset 0 0 0 2px rgba(22,119,255,.14), 0 0 16px rgba(22,119,255,.10);
}

/* =====================
   FX Patch v11 — RTL/LTR Currency Items + Row Corners (Raised)
   Problems fixed:
   - EN (LTR): row corners were not rounded ("no raised")
   - AR (RTL): flag not at START and text drifting toward flag/left

   Fix approach:
   - Force board table spacing (raised look)
   - Use logical border radii on td-cur/td-chg so it works for RTL/LTR
   - Use CSS Grid for currency item to make flag placement deterministic
   ===================== */

/* Keep row gaps in ALL languages */
body.fx-board .board-table > table{
  border-collapse: separate !important;
  border-spacing: 0 10px !important;
}

/* Reset any generic rounding then apply only on row edges */
body.fx-board .board-table tbody td{
  border-radius: 0 !important;
  overflow: hidden;
}

/* Logical rounding: Currency = START edge, Change = END edge */
body.fx-board .board-table tbody td.td-cur{
  border-start-start-radius: 16px !important;
  border-end-start-radius: 16px !important;
}
body.fx-board .board-table tbody td.td-chg{
  border-start-end-radius: 16px !important;
  border-end-end-radius: 16px !important;
}

/* Fallbacks */
html[dir="ltr"] body.fx-board .board-table tbody td.td-cur{
  border-top-left-radius:16px !important;
  border-bottom-left-radius:16px !important;
}
html[dir="ltr"] body.fx-board .board-table tbody td.td-chg{
  border-top-right-radius:16px !important;
  border-bottom-right-radius:16px !important;
}
html[dir="rtl"] body.fx-board .board-table tbody td.td-cur{
  border-top-right-radius:16px !important;
  border-bottom-right-radius:16px !important;
}
html[dir="rtl"] body.fx-board .board-table tbody td.td-chg{
  border-top-left-radius:16px !important;
  border-bottom-left-radius:16px !important;
}

/* Currency item: deterministic layout (flag at START) */
body.fx-board .board-table td.td-cur .cur{
  display:grid !important;
  grid-template-columns: auto minmax(0,1fr);
  align-items:center;
  column-gap:14px;
  width:100%;
}
/* RTL: START is right → make flag second column */
html[dir="rtl"] body.fx-board .board-table td.td-cur .cur{
  grid-template-columns: minmax(0,1fr) auto;
}

body.fx-board .board-table td.td-cur .cur-flag{justify-self:start;}
html[dir="rtl"] body.fx-board .board-table td.td-cur .cur-flag{justify-self:end;}

body.fx-board .board-table td.td-cur .cur-meta{
  min-width:0;
  display:flex;
  flex-direction:column;
  line-height:1.15;
  align-items:flex-start;
  text-align:left;
}
html[dir="rtl"] body.fx-board .board-table td.td-cur .cur-meta{
  align-items:flex-end;
  text-align:right;
}

body.fx-board .board-table td.td-cur .code-line{justify-content:flex-start;}
html[dir="rtl"] body.fx-board .board-table td.td-cur .code-line{justify-content:flex-end;}

/* Neutralize older RTL flex flips (double reverse) */
html[dir="rtl"] body.fx-board .cur{flex-direction:initial !important;}

/* =====================
   FX Patch v12 — Final RTL/LTR Currency Item alignment + Row Raised
   Fixes:
   - AR (RTL): flag must be at START (right) and text must sit next to it (not drift left)
   - EN (LTR): restore raised/rounded row corners reliably
   Notes:
   - Keep markup unchanged (flag then meta)
   - Use flex (not grid) with explicit direction to make placement deterministic
   - Apply row rounding using first/last td per direction (works across browsers)
   ===================== */

/* Force raised look: keep row gaps */
body.fx-board .board-table > table{
  border-collapse: separate !important;
  border-spacing: 0 10px !important;
}

/* Reset then apply row-edge rounding in a direction-safe way */
body.fx-board .board-table tbody tr td{ border-radius:0 !important; }

html[dir="ltr"] body.fx-board .board-table tbody tr td:first-child{
  border-top-left-radius:16px !important;
  border-bottom-left-radius:16px !important;
}
html[dir="ltr"] body.fx-board .board-table tbody tr td:last-child{
  border-top-right-radius:16px !important;
  border-bottom-right-radius:16px !important;
}

html[dir="rtl"] body.fx-board .board-table tbody tr td:first-child{
  border-top-right-radius:16px !important;
  border-bottom-right-radius:16px !important;
}
html[dir="rtl"] body.fx-board .board-table tbody tr td:last-child{
  border-top-left-radius:16px !important;
  border-bottom-left-radius:16px !important;
}

/* Currency item: deterministic (flag at START) */
body.fx-board .board-table td.td-cur .cur{
  display:flex !important;
  align-items:center;
  gap:14px;
  width:100%;
  justify-content:flex-start;
}

/* Explicit direction so flex-start is correct per language */
html[dir="rtl"] body.fx-board .board-table td.td-cur .cur{ direction:rtl; }
html[dir="ltr"] body.fx-board .board-table td.td-cur .cur{ direction:ltr; }

body.fx-board .board-table td.td-cur .cur-flag{ flex:0 0 auto; }

/* Let meta shrink/ellipsis but keep it next to the flag */
body.fx-board .board-table td.td-cur .cur-meta{
  flex:1 1 auto;
  min-width:0;
  display:flex;
  flex-direction:column;
  line-height:1.15;
}

/* Text alignment per language (avoid drifting) */
html[dir="rtl"] body.fx-board .board-table td.td-cur .cur-meta{ direction:rtl; text-align:right; align-items:flex-start; }
html[dir="ltr"] body.fx-board .board-table td.td-cur .cur-meta{ direction:ltr; text-align:left; align-items:flex-start; }

html[dir="rtl"] body.fx-board .board-table td.td-cur .code-line{ direction:rtl; justify-content:flex-start; }
html[dir="ltr"] body.fx-board .board-table td.td-cur .code-line{ direction:ltr; justify-content:flex-start; }

/* Bigger flags in rows (slightly) */
.fx-flag-inline{ width:60px; height:42px; border-radius:12px; }

/* =====================
   FX Patch v13 — Arabic currency item alignment
   Issue: In RTL, .cur uses row-reverse (flag on START/right). With justify-content:flex-end
   the group was pushed to the left. We want it anchored to the right edge.
   Fix: In RTL + row-reverse => use flex-start.
   ===================== */
html[dir="rtl"] body.fx-board .board-table td.td-cur .cur{
  justify-content:flex-start !important; /* anchor to right (start) when row-reverse */
}
html[dir="rtl"] body.fx-board .board-table td.td-cur{
  text-align:right;
}


/* =========================
   Landing (Public) — Part 7
   ========================= */
.landing{min-height:100vh}
.landing-nav{
  position:sticky;top:0;z-index:20;
  display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;
  padding:14px 18px;border-bottom:1px solid rgba(255,255,255,.10);
  background:rgba(0,0,0,.22);backdrop-filter:blur(12px)
}
html[data-ui-theme="light"] .landing-nav{background:rgba(255,255,255,.72)}
.landing-nav .brand{display:flex;align-items:center;gap:10px;text-decoration:none}
.landing-nav .brand img{width:40px;height:40px;border-radius:12px;object-fit:cover}
.landing-nav .brand .t{font-weight:1000;letter-spacing:.2px}
.landing-links{display:flex;gap:12px;align-items:center;flex-wrap:wrap}
.landing-links a{color:var(--muted);text-decoration:none;padding:8px 10px;border-radius:12px;border:1px solid rgba(255,255,255,.08);background:rgba(255,255,255,.03)}
.landing-links a:hover{border-color:rgba(35,183,255,.55);color:var(--text)}
.landing-hero{margin-top:16px;padding:18px}
.hero-grid{display:grid;grid-template-columns:1.2fr .8fr;gap:14px;align-items:stretch}
.hero-title{margin:10px 0 0 0;font-size:34px;font-weight:1100;letter-spacing:.3px;line-height:1.1}
.hero-sub{margin:10px 0 0 0;color:var(--muted);line-height:1.8;max-width:680px}
.hero-badges{display:flex;gap:10px;flex-wrap:wrap}
.badge{border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.04);padding:7px 10px;border-radius:999px;font-size:12px;color:var(--text)}
.hero-cta{display:flex;gap:10px;flex-wrap:wrap;margin-top:14px}
.hero-note{display:grid;grid-template-columns:1fr;gap:10px;margin-top:14px}
.hero-note .note{border:1px solid rgba(255,255,255,.10);background:rgba(255,255,255,.03);border-radius:14px;padding:10px 12px;color:var(--muted);line-height:1.6}
.hero-media{min-width:0}
.shot-wrap{border-radius:18px;border:1px solid rgba(255,255,255,.10);background:rgba(255,255,255,.03);overflow:hidden;min-height:320px;display:flex;flex-direction:column}
.shot-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 12px;border-bottom:1px solid rgba(255,255,255,.08)}
.shots{position:relative;flex:1;min-height:0}
.shot{position:absolute;inset:0;opacity:0;transform:scale(.98);transition:opacity .35s ease, transform .45s ease}
.shot.active{opacity:1;transform:scale(1)}
.shot-img{width:100%;height:100%;display:block;object-fit:contain;
  background:radial-gradient(1200px 500px at 20% 20%, rgba(35,183,255,.18), transparent 60%),
             radial-gradient(900px 400px at 80% 40%, rgba(56,249,215,.14), transparent 60%),
             linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
}
.shot-cap{position:absolute;left:12px;bottom:12px;display:flex;gap:10px;align-items:center}
html[dir="rtl"] .shot-cap{left:auto;right:12px}

.shot-nav{position:absolute;inset:0;pointer-events:none;display:flex;align-items:center;justify-content:space-between;padding:0 10px}
.shot-btn{pointer-events:auto;width:44px;height:44px;border-radius:999px;border:1px solid rgba(255,255,255,.18);
  background:rgba(0,0,0,.25);backdrop-filter:blur(10px);color:var(--text);
  display:flex;align-items:center;justify-content:center;font-size:22px;font-weight:1000;cursor:pointer}
.shot-btn:hover{border-color:rgba(35,183,255,.55)}
html[data-ui-theme="light"] .shot-btn{background:rgba(255,255,255,.6);border-color:rgba(0,0,0,.12)}
.shot .shot-ph{
  height:100%;display:flex;align-items:center;justify-content:center;text-align:center;
  font-weight:900;font-size:18px;letter-spacing:.2px;
  background:radial-gradient(1200px 500px at 20% 20%, rgba(35,183,255,.22), transparent 60%),
             radial-gradient(900px 400px at 80% 40%, rgba(56,249,215,.16), transparent 60%),
             linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
  color:rgba(229,231,235,.92)
}
html[data-ui-theme="light"] .shot .shot-ph{
  color:rgba(11,18,32,.92);
  background:radial-gradient(1200px 500px at 20% 20%, rgba(22,119,255,.18), transparent 60%),
             radial-gradient(900px 400px at 80% 40%, rgba(6,198,167,.12), transparent 60%),
             linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,255,255,.75));
}
.shot-dots{display:flex;gap:8px;justify-content:center;padding:10px 0 12px 0}
.dot{width:10px;height:10px;border-radius:999px;border:1px solid rgba(255,255,255,.25);background:rgba(255,255,255,.08);cursor:pointer}
.dot.active{background:linear-gradient(90deg, rgba(35,183,255,.9), rgba(56,249,215,.75));border:none}

.landing-section{margin-top:18px}
.sec-head{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:12px}
.sec-head h2{margin:0;font-size:22px;font-weight:1000}
.landing-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.feat{padding:16px}
.feat .ico{font-size:22px}
.feat .t{margin-top:10px;font-weight:1000}
.feat .d{margin-top:6px;color:var(--muted);line-height:1.7}

.how{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.step{padding:16px}
.step .n{width:34px;height:34px;border-radius:12px;display:flex;align-items:center;justify-content:center;
  background:rgba(35,183,255,.16);border:1px solid rgba(35,183,255,.35);font-weight:1000}
.step .t{margin-top:10px;font-weight:1000}
.step .d{margin-top:6px;color:var(--muted);line-height:1.7}

.pricing{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.price{padding:16px}
.price .t{font-weight:1000}
.price .p{margin-top:8px;font-size:28px;font-weight:1100}
.price .d{margin-top:6px;color:var(--muted)}

.download{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.dl{display:flex;align-items:center;gap:12px;text-decoration:none;color:var(--text)}
.dl .ico{font-size:22px}
.dl .t{font-weight:1000}
.dl .d{margin-top:4px;color:var(--muted);font-size:12px;word-break:break-all}

.landing-footer{margin:18px 0 10px 0;display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}

/* Public SYP Rates (Landing + /syp) */
.fx-rates-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px}
.fx-rate-card{padding:14px;border-radius:18px;background:var(--card);border:1px solid var(--border);backdrop-filter:blur(10px)}
.fx-rate-top{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.fx-rate-id{display:flex;align-items:center;gap:10px;min-width:0}
.fx-rate-flag{width:20px;height:20px;border-radius:8px;object-fit:cover;border:1px solid rgba(255,255,255,.18);background:rgba(255,255,255,.06)}
.fx-rate-flag.sm{width:18px;height:18px;border-radius:8px}
.fx-rate-emoji{font-size:18px;line-height:1}
.fx-rate-code{font-weight:1000;letter-spacing:.2px}
.fx-rate-name{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:180px}
.fx-rate-tag{font-size:11px;padding:2px 8px;border-radius:999px;border:1px solid rgba(255,255,255,.18);background:rgba(255,255,255,.06);color:var(--muted)}
.fx-rate-mid{margin-top:12px;display:grid;grid-template-columns:1fr 1fr;gap:10px}
.fx-rate-num{padding:10px 10px;border-radius:14px;border:1px solid rgba(255,255,255,.10);background:rgba(255,255,255,.04)}
.fx-rate-val{font-weight:1100;font-size:18px;margin-top:2px}
.fx-rate-sub{margin-top:4px;font-size:11px;color:var(--muted);line-height:1.4}
.fx-rate-meta{margin-top:10px;font-size:12px}
.fx-ic{display:inline-flex;align-items:center;justify-content:center}
.fx-contacts{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
.fx-contact{display:inline-flex;align-items:center;gap:8px;padding:8px 10px;border-radius:999px;border:1px solid var(--border);background:rgba(255,255,255,.04);color:var(--text);text-decoration:none;font-size:13px;max-width:100%}
.fx-contact:hover{background:rgba(35,183,255,.10);border-color:rgba(35,183,255,.35)}
.fx-contact.icononly{padding:10px;width:44px;height:44px;justify-content:center;gap:0}
.fx-contact.icononly .fx-ic{display:flex}

.fx-contact-addr{flex:1;min-width:260px}
.fx-footer-contacts{margin:8px 0 14px 0}
.fx-fab-wa{position:fixed;bottom:24px;right:18px;left:auto;inset-inline-end:18px;inset-inline-start:auto;width:54px;height:54px;border-radius:999px;display:flex;align-items:center;justify-content:center;background:#25D366;color:#fff;text-decoration:none;border:1px solid rgba(255,255,255,.22);box-shadow:0 10px 25px rgba(0,0,0,.35);z-index:10000}
html[dir="rtl"] .fx-fab-wa{right:auto;left:18px}
.fx-fab-wa.pos-left{left:18px;right:auto;inset-inline-start:18px;inset-inline-end:auto}
.fx-fab-wa.pos-right{right:18px;left:auto;inset-inline-end:18px;inset-inline-start:auto}
html[dir="rtl"] .fx-fab-wa.pos-right{right:18px;left:auto}
.fx-fab-wa:hover{filter:brightness(1.03);transform:translateY(-1px)}
@media (max-width: 900px){.fx-fab-wa{bottom:92px}}

.btn.is-loading{opacity:.65;pointer-events:none}


@media (max-width: 980px){
  .fx-rates-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media (max-width: 720px){
  .fx-rates-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .fx-rate-val{font-size:16px}
}

/* Responsive */
@media (max-width: 980px){
  .hero-grid{grid-template-columns:1fr}
  .shot-wrap{min-height:280px}
  .pricing{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width: 720px){
  .landing-grid{grid-template-columns:1fr}
  .how{grid-template-columns:1fr}
  .download{grid-template-columns:1fr}
  .hero-title{font-size:28px}
}

.board-content{flex:1;display:flex;flex-direction:column;min-height:0}
.board-sections{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:14px;padding:14px 22px 0;flex:0 0 auto}
.board-metals-section{border:1px solid rgba(255,255,255,.10);background:rgba(8,15,28,.68);border-radius:18px;padding:14px;backdrop-filter:blur(10px);box-shadow:0 10px 30px rgba(0,0,0,.22)}
.board-section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.board-section-title{font-weight:900;font-size:18px}
.board-metal-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px}
.board-metal-card{border:1px solid rgba(255,255,255,.08);background:rgba(255,255,255,.03);border-radius:16px;padding:12px;min-height:120px;display:flex;flex-direction:column;justify-content:space-between;gap:10px}
.board-metal-card-head{font-weight:900;font-size:16px}
.board-metal-usd{font-size:20px;font-weight:900;color:var(--accent)}
.board-metal-local{display:grid;gap:6px}
.board-metal-local .metal-line{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:13px}
.board-metal-local .metal-line b{font-size:15px;font-weight:900;text-align:end}
.board-metal-local .metal-line small{display:block;color:var(--muted);font-weight:700;font-size:11px;margin-top:2px}
.fx-no-currencies .board-table{display:none}
.fx-only-metals .board-sections{padding:18px 22px 22px;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));flex:1;align-content:start}
.fx-only-metals .board-metal-grid{grid-template-columns:repeat(auto-fit,minmax(180px,1fr))}
html[data-ui-theme="light"] .board-metals-section{background:rgba(255,255,255,.92);border-color:rgba(2,6,23,.08);box-shadow:0 10px 24px rgba(2,6,23,.06)}
html[data-ui-theme="light"] .board-metal-card{background:rgba(248,250,252,.96);border-color:rgba(2,6,23,.06)}
html[data-ui-theme="light"] .board-metal-local .metal-line small{color:#64748b}
@media (max-width:900px){
  .board-sections{padding:12px 14px 0;grid-template-columns:1fr}
  .fx-only-metals .board-sections{padding:12px 14px 14px}
  .board-metal-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:640px){
  .board-metal-grid{grid-template-columns:1fr}
  .board-section-head{flex-direction:column;align-items:flex-start}
}


/* Part-06 — Board UI 2.0 */
.board-topbar{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
  padding:12px 22px 0;
  flex:0 0 auto;
}
.board-kpi{
  border:1px solid rgba(255,255,255,.10);
  background:linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.025));
  border-radius:16px;
  padding:12px 14px;
  min-height:76px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  gap:8px;
  box-shadow:0 12px 28px rgba(0,0,0,.16);
}
.board-kpi-label{
  color:var(--muted);
  font-size:12px;
  font-weight:900;
  letter-spacing:.25px;
}
.board-kpi-value{
  font-size:20px;
  font-weight:1000;
  line-height:1.2;
}
.board-table-shell{
  border:1px solid rgba(255,255,255,.10);
  border-radius:22px;
  overflow:hidden;
  background:linear-gradient(180deg, rgba(8,15,28,.72), rgba(8,15,28,.58));
  backdrop-filter:blur(10px);
  box-shadow:0 12px 32px rgba(0,0,0,.22);
}
.board-table-head{
  padding:16px 18px 12px;
  margin-bottom:0;
  border-bottom:1px solid rgba(255,255,255,.08);
  background:linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
}
.board-inline-stats{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
.board-mini-chip{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:8px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.04);
  color:var(--text);
  font-size:12px;
  font-weight:800;
}
.board-metal-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.board-metal-badge,
.board-metal-key{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:26px;
  padding:4px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.05);
  font-size:11px;
  font-weight:900;
}
.board-metal-key{
  color:var(--muted);
  letter-spacing:.35px;
}
.board-metal-spot{
  display:grid;
  gap:4px;
}
.board-metal-spot-label{
  color:var(--muted);
  font-size:11px;
  font-weight:800;
}
.board-metal-card{
  min-height:148px;
  background:linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.03));
}
.board-metal-card-head{
  font-size:17px;
}
.board-metal-usd{
  font-size:22px;
}
.board-metal-local .metal-line{
  align-items:flex-start;
}
.board-metal-local .metal-line span{
  font-weight:800;
}
.board-metal-local .metal-line b{
  min-width:88px;
}
.fx-only-metals .board-topbar{
  padding-bottom:4px;
}
.fx-only-metals .board-kpi{
  min-height:88px;
}
html[data-ui-theme="light"] .board-kpi{
  background:linear-gradient(180deg, rgba(255,255,255,.96), rgba(248,250,252,.94));
  border-color:rgba(2,6,23,.08);
  box-shadow:0 10px 24px rgba(2,6,23,.06);
}
html[data-ui-theme="light"] .board-kpi-label{
  color:#64748b;
}
html[data-ui-theme="light"] .board-table-shell{
  background:linear-gradient(180deg, rgba(255,255,255,.96), rgba(248,250,252,.94));
  border-color:rgba(2,6,23,.08);
  box-shadow:0 10px 24px rgba(2,6,23,.06);
}
html[data-ui-theme="light"] .board-table-head{
  border-bottom-color:rgba(2,6,23,.08);
  background:linear-gradient(180deg, rgba(2,6,23,.02), rgba(2,6,23,.01));
}
html[data-ui-theme="light"] .board-mini-chip,
html[data-ui-theme="light"] .board-metal-badge,
html[data-ui-theme="light"] .board-metal-key{
  background:rgba(2,6,23,.03);
  border-color:rgba(2,6,23,.08);
}
@media (max-width: 1100px){
  .board-topbar{
    grid-template-columns:repeat(2,minmax(0,1fr));
    padding:12px 14px 0;
  }
}
@media (max-width: 900px){
  .board-table-head{
    flex-direction:column;
    align-items:flex-start;
  }
}
@media (max-width: 640px){
  .board-topbar{
    grid-template-columns:1fr;
  }
  .board-kpi{
    min-height:72px;
  }
  .board-kpi-value{
    font-size:18px;
  }
  .board-inline-stats{
    width:100%;
  }
}


/* Part-13 — board polish */
.board-topbar{
  grid-template-columns:repeat(6,minmax(0,1fr));
}
.board-kpi{
  position:relative;
  overflow:hidden;
}
.board-kpi::after{
  content:"";
  position:absolute;
  inset:auto 0 0;
  height:2px;
  background:linear-gradient(90deg, rgba(35,183,255,.0), rgba(56,249,215,.92), rgba(35,183,255,.0));
  opacity:.75;
}
.board-kpi-value{
  background:linear-gradient(90deg, rgba(229,231,235,1), rgba(56,249,215,.96));
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
}
html[data-ui-theme="light"] .board-kpi-value{
  background:linear-gradient(90deg, #0B1220, #1677FF);
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
}
.board-table-shell{
  overflow:hidden;
}
.board-table tbody td{
  transition:background .18s ease, border-color .18s ease, transform .18s ease;
}
.board-mini-chip{box-shadow:0 8px 18px rgba(0,0,0,.12)}
@media (max-width: 1400px){
  .board-topbar{grid-template-columns:repeat(3,minmax(0,1fr));}
}


.fx-metal-icon{width:28px;height:28px;object-fit:contain;display:inline-block;filter:drop-shadow(0 4px 12px rgba(0,0,0,.16));}
.board-metal-badge .board-metal-icon{width:18px;height:18px;flex:0 0 18px;}


/* Part-8 — board live notice + status tones */
.board-notice{
  grid-column:1 / -1;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:14px 16px;
  border:1px solid rgba(255,255,255,.10);
  border-radius:18px;
  background:linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.025));
  box-shadow:0 12px 28px rgba(0,0,0,.16);
}
.board-notice[data-tone="ok"]{border-color:rgba(107,255,180,.22)}
.board-notice[data-tone="manual"]{border-color:rgba(255,210,107,.28)}
.board-notice[data-tone="hybrid"]{border-color:rgba(35,183,255,.28)}
.board-notice[data-tone="warn"]{border-color:rgba(255,223,107,.30)}
.board-notice[data-tone="error"]{border-color:rgba(255,107,107,.32)}
.board-notice-main{display:flex;align-items:center;gap:10px;flex-wrap:wrap;min-width:0}
.board-notice-main b{font-size:15px}
.board-notice-side{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.board-notice-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:30px;
  padding:6px 12px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.06);
  color:var(--text);
  font-size:12px;
  font-weight:1000;
}
.chip.tone-ok,.board-notice-pill.tone-ok{border-color:rgba(107,255,180,.35);color:rgba(107,255,180,.98);background:rgba(107,255,180,.08)}
.chip.tone-manual,.board-notice-pill.tone-manual{border-color:rgba(255,210,107,.34);color:#ffe18a;background:rgba(255,210,107,.08)}
.chip.tone-hybrid,.board-notice-pill.tone-hybrid{border-color:rgba(35,183,255,.34);color:#8ed9ff;background:rgba(35,183,255,.08)}
.chip.tone-warn,.board-notice-pill.tone-warn{border-color:rgba(255,223,107,.35);color:rgba(255,223,107,.98);background:rgba(255,223,107,.09)}
.chip.tone-error,.board-notice-pill.tone-error{border-color:rgba(255,107,107,.36);color:#ff8f8f;background:rgba(255,107,107,.10)}
html[data-ui-theme="light"] .board-notice{
  background:linear-gradient(180deg, rgba(255,255,255,.96), rgba(248,250,252,.94));
  border-color:rgba(2,6,23,.08);
  box-shadow:0 10px 24px rgba(2,6,23,.06);
}
html[data-ui-theme="light"] .board-notice-pill{border-color:rgba(2,6,23,.10);background:rgba(2,6,23,.03)}
html[data-ui-theme="light"] .chip.tone-ok,html[data-ui-theme="light"] .board-notice-pill.tone-ok{color:#0f9f62;background:rgba(15,159,98,.08)}
html[data-ui-theme="light"] .chip.tone-manual,html[data-ui-theme="light"] .board-notice-pill.tone-manual{color:#b57900;background:rgba(181,121,0,.08)}
html[data-ui-theme="light"] .chip.tone-hybrid,html[data-ui-theme="light"] .board-notice-pill.tone-hybrid{color:#1677ff;background:rgba(22,119,255,.08)}
html[data-ui-theme="light"] .chip.tone-warn,html[data-ui-theme="light"] .board-notice-pill.tone-warn{color:#b26b00;background:rgba(178,107,0,.08)}
html[data-ui-theme="light"] .chip.tone-error,html[data-ui-theme="light"] .board-notice-pill.tone-error{color:#d12c2c;background:rgba(209,44,44,.08)}
@media (max-width:900px){
  .board-notice{flex-direction:column;align-items:flex-start}
  .board-notice-side{justify-content:flex-start}
}


/* Part-15 — stronger board states + extra presets */
.board-header .chip.tone-ok,.board-header .chip.tone-manual,.board-header .chip.tone-hybrid,.board-header .chip.tone-warn,.board-header .chip.tone-error{box-shadow:0 10px 22px rgba(0,0,0,.12)}
.board-notice[data-tone="warn"]{box-shadow:0 14px 30px rgba(255,190,92,.10)}
.board-notice[data-tone="error"]{box-shadow:0 14px 30px rgba(255,107,107,.10)}
@media (min-width: 980px){
  .preset-grid{grid-template-columns:repeat(3,minmax(0,1fr));}
}
