/* EIP sales platform. Mobile first, RTL. Colors from spec 10.1 */
:root {
  --green: #006225;
  --green-dark: #02421D;
  --green-mid: #15642B;
  --green-bar: #2A883A;
  --green-light: #3AAE2A;
  --lime: #83BA26;
  --gray: #DBE0E3;
  --bg: #FFFFFF;
  --surface: #F5F7F6;
  --card: #FFFFFF;
  --text: #1B2420;
  --text-2: #5B6661;
  --line: #E3E8E5;
  --red: #C62828;
  --red-bg: #FDECEC;
  --amber: #B26A00;
  --amber-bg: #FFF4E0;
  --gem-text: #1A4FA0;
  --gem-bg: #E8F0FE;
  --cl-text: #006225;
  --cl-bg: #E6F2EA;
  --primary: #006225;
  --on-primary: #FFFFFF;
  --shadow: 0 1px 2px rgba(16, 40, 28, .06), 0 2px 8px rgba(16, 40, 28, .06);
  --radius: 12px;
  --tap: 44px;
  --font: "IBM Plex Sans Arabic", "Aptos", "Segoe UI", "Inter", system-ui, sans-serif;
  --font-num: "Aptos", "Segoe UI", "Inter", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --bottom-nav: 64px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0F1512;
    --surface: #0F1512;
    --card: #18201C;
    --text: #E6EDE9;
    --text-2: #A3B0A9;
    --line: #26302B;
    --gray: #33403A;
    --primary: #3AAE2A;
    --on-primary: #0F1512;
    --red: #EF6B6B;
    --red-bg: #3A1D1D;
    --amber: #F0A23B;
    --amber-bg: #3A2C14;
    --gem-text: #A9C5FF;
    --gem-bg: #1C2A44;
    --cl-text: #7FD48A;
    --cl-bg: #163222;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--surface);
  overflow-x: hidden;
  min-width: 320px;
}
[hidden] { display: none !important; }
a { color: var(--primary); }
img { max-width: 100%; }
.ic { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.num, .ltr { font-family: var(--font-num); direction: ltr; unicode-bidi: isolate; }
.muted { color: var(--text-2); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Boot + login */
.boot { position: fixed; inset: 0; display: grid; place-items: center; background: var(--bg); z-index: 50; }
.boot img { opacity: .9; height: auto; }
.login { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 16px; background: linear-gradient(160deg, var(--green-dark), var(--green-bar)); }
.login-card { width: 100%; max-width: 380px; background: var(--card); border-radius: 16px; padding: 28px 20px; text-align: center; box-shadow: 0 10px 30px rgba(0, 0, 0, .2); }
.login-logo { background: #fff; border-radius: 10px; padding: 8px; display: inline-block; }
.login-logo img { height: auto; display: block; }
.login h1 { font-size: 22px; margin: 16px 0 4px; }
.gbtn { display: flex; justify-content: center; min-height: 44px; margin-top: 16px; }
.login-msg { color: var(--red); min-height: 1.5em; margin: 12px 0 0; font-size: 14px; }

/* Top bar */
.shell { min-height: 100vh; padding-bottom: calc(var(--bottom-nav) + env(safe-area-inset-bottom) + 16px); }
.topbar { position: sticky; top: 0; z-index: 20; background: linear-gradient(90deg, var(--green-dark), var(--green-bar)); color: #fff; padding-top: env(safe-area-inset-top); }
.topbar-row { display: flex; align-items: center; gap: 8px; padding: 6px 12px; min-height: 56px; max-width: 1200px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; min-width: 0; flex: 1 1 auto; }
.brand-chip { background: #fff; border-radius: 8px; padding: 4px 6px; display: flex; flex: none; }
.brand-chip img { height: 22px; width: auto; display: block; }
.brand-title { font-weight: 700; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-actions { display: flex; align-items: center; gap: 2px; flex: none; }
.status { display: flex; align-items: center; gap: 6px; background: rgba(255, 255, 255, .12); color: #fff; border: 0; border-radius: 999px; padding: 0 10px; min-height: var(--tap); font: inherit; font-size: 12px; cursor: pointer; }
.status .dot { width: 10px; height: 10px; border-radius: 50%; background: #9aa; box-shadow: 0 0 0 2px rgba(255, 255, 255, .35); flex: none; }
.status .dot.ok { background: #5BE36B; }
.status .dot.bad { background: #FF5A5A; }
.icon-btn { position: relative; display: inline-grid; place-items: center; width: var(--tap); height: var(--tap); border: 0; background: transparent; color: inherit; border-radius: 50%; cursor: pointer; flex: none; }
.icon-btn:hover { background: rgba(127, 127, 127, .14); }
.topbar .icon-btn { color: #fff; }
.badge { position: absolute; top: 4px; left: 4px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--red); color: #fff; font-size: 11px; font-family: var(--font-num); line-height: 18px; text-align: center; }
@media (max-width: 420px) {
  #statusText { display: none; }
  .status { padding: 0; width: var(--tap); justify-content: center; background: transparent; }
  .brand-title { font-size: 14px; }
  .topbar-row { padding: 6px 8px; gap: 6px; }
  .top-actions { gap: 0; }
  .brand { gap: 6px; }
  .brand-chip { padding: 3px 5px; }
  .brand-chip img { height: 17px; }
}
.price-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.price-row:first-child { border-top: 0; }
.price-row form { display: flex; gap: 6px; align-items: center; }
.price-row form input[type=text] { width: 92px; text-align: left; }

/* Tabs */
.tabs-top { display: none; }
.tabs-bottom { position: fixed; bottom: 0; inset-inline: 0; z-index: 20; display: flex; background: var(--card); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.tabs-bottom a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: var(--bottom-nav); color: var(--text-2); text-decoration: none; font-size: 12px; font-weight: 600; position: relative; }
.tabs-bottom a.on { color: var(--primary); }
.tabs-bottom a.on::before { content: ""; position: absolute; top: 0; width: 40px; height: 3px; border-radius: 0 0 3px 3px; background: var(--primary); }
.tab-badge { position: absolute; top: 6px; inset-inline-end: calc(50% - 26px); min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--red); color: #fff; font-size: 11px; line-height: 18px; font-family: var(--font-num); text-align: center; }
@media (min-width: 900px) {
  .tabs-bottom { display: none; }
  .shell { padding-bottom: 32px; }
  .tabs-top { display: flex; gap: 4px; max-width: 1200px; margin: 0 auto; padding: 0 12px; }
  .tabs-top a { color: rgba(255, 255, 255, .85); text-decoration: none; padding: 10px 18px; min-height: var(--tap); font-weight: 600; border-radius: 10px 10px 0 0; }
  .tabs-top a.on { background: var(--surface); color: var(--primary); }
  .tabs-top a:not(.on):hover { background: rgba(255, 255, 255, .1); }
}

/* Offline banner */
.offline { background: var(--amber-bg); color: var(--amber); text-align: center; font-size: 14px; padding: 8px 16px; font-weight: 600; }

/* Layout */
.view { max-width: 1200px; margin: 0 auto; padding: 16px; outline: none; }
.grid { display: grid; gap: 12px; }
@media (min-width: 900px) {
  .dash-grid { grid-template-columns: 1fr 1fr; align-items: start; }
  .dash-grid .span2 { grid-column: 1 / -1; }
}
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; min-width: 0; }
.card h2, .section-title { font-size: 16px; margin: 0 0 10px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.section-title { margin: 18px 0 8px; }
.section-title .count { font-family: var(--font-num); font-size: 13px; color: var(--text-2); font-weight: 600; }
.empty { color: var(--text-2); font-size: 14px; padding: 8px 0; }
.row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.row.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.list { list-style: none; margin: 0; padding: 0; }
.list > li { padding: 10px 0; border-top: 1px solid var(--line); min-width: 0; }
.list > li:first-child { border-top: 0; padding-top: 2px; }
.clip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.title-line { font-weight: 600; overflow-wrap: anywhere; }

/* Goal card */
.goal { background: linear-gradient(135deg, var(--green-dark), var(--green-bar)); color: #fff; }
.goal .big { font-size: 28px; font-weight: 700; line-height: 1.25; }
.goal .big small { font-size: 16px; font-weight: 600; opacity: .9; }
.goal .pct { font-size: 34px; font-weight: 700; }
.bar { height: 10px; border-radius: 6px; background: rgba(255, 255, 255, .25); overflow: hidden; margin: 10px 0 8px; }
.bar > i { display: block; height: 100%; background: #fff; border-radius: 6px; }
.goal .sub { font-size: 14px; opacity: .92; display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tile { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 10px 8px; text-align: center; min-width: 0; }
.tile .lbl { font-size: 13px; color: var(--text-2); font-weight: 600; }
.tile .val { font-size: 18px; font-weight: 700; overflow-wrap: anywhere; }
.tile .unit { font-size: 12px; color: var(--text-2); }
.tile.red .val { color: var(--red); }
.tile.amber .val { color: var(--amber); }
.tile.green .val { color: var(--primary); }

/* Comment cards */
.claude { background: var(--cl-bg); color: var(--cl-text); }
.gemini { background: var(--gem-bg); color: var(--gem-text); }
.claude h2, .gemini h2 { color: inherit; }
.claude p, .gemini p { margin: 4px 0; white-space: pre-wrap; overflow-wrap: anywhere; }

/* Stage chips */
.chip { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--gray); color: var(--text); line-height: 1.6; }
.chip.s-mid { background: var(--lime); color: #1B2420; }
.chip.s-late { background: var(--green); color: #fff; }
.chip.won { background: var(--green); color: #fff; }
.chip.lost { background: var(--red-bg); color: var(--red); }
.chip.amber { background: var(--amber-bg); color: var(--amber); }
.chip.blue { background: var(--gem-bg); color: var(--gem-text); }
.chip.est { background: transparent; border: 1px dashed var(--text-2); color: var(--text-2); padding: 0 6px; }
.flag { display: inline-block; background: var(--amber-bg); color: var(--amber); border-radius: 6px; font-size: 12px; font-weight: 600; padding: 1px 8px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: var(--tap); padding: 0 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--text); font: inherit; font-weight: 600; font-size: 15px; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { filter: brightness(.97); }
.btn.primary { background: var(--primary); color: var(--on-primary); border-color: transparent; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--primary); }
.btn.danger { color: var(--red); border-color: var(--red); background: transparent; }
.btn.blue { background: var(--gem-text); color: #fff; border-color: transparent; }
.btn.sm { min-height: var(--tap); padding: 0 12px; font-size: 14px; }
.btn.block { width: 100%; }
.btn[disabled], .btn.disabled { opacity: .55; cursor: default; }
.btn.disabled { pointer-events: none; }
.btn .ic { width: 20px; height: 20px; }
.btns { display: flex; flex-wrap: wrap; gap: 8px; }
.btns.grid2 { display: grid; grid-template-columns: 1fr 1fr; }
.btns.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.btns.grid3 .btn { padding: 0 6px; }

/* Task cards */
.task { position: relative; overflow: hidden; border-radius: var(--radius); margin-bottom: 10px; touch-action: pan-y; }
.task .swipe-bg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; font-weight: 700; color: #fff; }
.task .swipe-bg .done { color: #fff; }
.task.sw-right .swipe-bg { background: var(--primary); }
.task.sw-left .swipe-bg { background: var(--amber); }
.task .card { position: relative; transition: transform .18s ease; margin: 0; }
.task.dragging .card { transition: none; }
.task-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; font-size: 13px; color: var(--text-2); margin: 6px 0 10px; }
.task-meta .late { color: var(--red); font-weight: 700; }
.task .opp-name { font-size: 13px; color: var(--text-2); font-weight: 600; }
.task .t-title { font-weight: 700; font-size: 16px; overflow-wrap: anywhere; }
.task.done-task .t-title { text-decoration: line-through; color: var(--text-2); }
details.fold { margin-top: 8px; }
details.fold > summary { cursor: pointer; list-style: none; display: flex; align-items: center; min-height: var(--tap); font-weight: 700; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::after { content: "▾"; margin-inline-start: 8px; color: var(--text-2); }
details.fold[open] > summary::after { content: "▴"; }

/* Mini rows (dashboard) */
.mini { display: flex; align-items: center; gap: 10px; min-width: 0; }
.mini .info { flex: 1; min-width: 0; }
.mini .info .a { display: block; font-weight: 600; overflow-wrap: anywhere; }
.mini .info .b { display: block; font-size: 13px; color: var(--text-2); overflow-wrap: anywhere; }
.mini .m2 { font-family: var(--font-num); font-size: 13px; color: var(--text-2); white-space: nowrap; }
.link-row { text-decoration: none; color: inherit; display: flex; }

/* Stage bars */
.sbar { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 4px 10px; align-items: center; font-size: 13px; margin: 6px 0; }
.sbar .track { height: 18px; background: var(--surface); border-radius: 5px; overflow: hidden; position: relative; }
.sbar .fill { height: 100%; background: var(--lime); border-radius: 5px; min-width: 2px; }
.sbar .fill.s-early { background: var(--gray); }
.sbar .fill.s-late { background: var(--green); }
.sbar .meta { grid-column: 2; color: var(--text-2); font-size: 12px; margin-top: -2px; }
@media (prefers-color-scheme: dark) { .sbar .track { background: #0F1512; } }

/* Tables */
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th, .tbl td { text-align: start; padding: 8px 6px; border-top: 1px solid var(--line); vertical-align: top; }
.tbl th { color: var(--text-2); font-weight: 600; font-size: 13px; border-top: 0; }
.tbl td.n, .tbl th.n { text-align: end; font-family: var(--font-num); white-space: nowrap; }
.scroll-x { overflow-x: auto; max-width: 100%; }

/* Segmented + filters + search */
.seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); background: var(--card); border-radius: 12px; padding: 4px; box-shadow: var(--shadow); gap: 4px; }
.seg button { min-height: 40px; border: 0; background: transparent; border-radius: 9px; font: inherit; font-weight: 600; font-size: 14px; color: var(--text-2); cursor: pointer; padding: 0 4px; }
.seg button.on { background: var(--primary); color: var(--on-primary); }
.search { position: relative; margin-bottom: 12px; }
.search input[type=search] { padding-inline-start: 42px; }
.search .ic { position: absolute; top: 11px; inset-inline-start: 12px; color: var(--text-2); }
.filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 12px 0; }
.filters select { font-size: 14px; padding: 0 6px; }

/* Forms */
label.f { display: block; margin-bottom: 12px; font-size: 14px; font-weight: 600; }
label.f > span { display: block; margin-bottom: 4px; }
input[type=text], input[type=number], input[type=date], input[type=email], input[type=tel], input[type=url], input[type=search], select, textarea {
  width: 100%; min-height: var(--tap); border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--text);
  font: inherit; font-size: 16px; padding: 8px 12px;
}
textarea { min-height: 96px; resize: vertical; line-height: 1.6; }
input:focus, select:focus, textarea:focus, .btn:focus-visible, .seg button:focus-visible, a:focus-visible { outline: 2px solid var(--green-light); outline-offset: 1px; }
input[dir=ltr] { text-align: left; }
.hint { font-size: 13px; color: var(--text-2); font-weight: 400; margin-top: 4px; display: flex; gap: 6px; align-items: flex-start; }
.hint .ic { width: 18px; height: 18px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.check { display: flex; align-items: center; gap: 10px; min-height: var(--tap); font-weight: 600; font-size: 15px; }
.check input { width: 22px; height: 22px; accent-color: var(--primary); }

/* Result picker (done dialog) */
.results { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.results button { min-height: 56px; border-radius: 12px; border: 2px solid var(--line); background: var(--card); color: var(--text); font: inherit; font-weight: 700; font-size: 16px; cursor: pointer; }
.results button.on { border-color: var(--primary); background: var(--cl-bg); color: var(--cl-text); }
.results button[data-r="رفض"].on { border-color: var(--red); background: var(--red-bg); color: var(--red); }

/* Suggestions */
.sugg .head { display: flex; gap: 10px; align-items: flex-start; }
.score { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-num); font-weight: 700; font-size: 18px; border: 3px solid var(--primary); color: var(--primary); flex: none; background: var(--card); cursor: pointer; padding: 0; }
.score.mid { border-color: var(--lime); color: #4d7a0e; }
.score.low { border-color: var(--gray); color: var(--text-2); }
.reason { color: var(--cl-text); background: var(--cl-bg); border-radius: 8px; padding: 6px 10px; margin: 8px 0; font-size: 14px; overflow-wrap: anywhere; }
.src { font-size: 13px; color: var(--text-2); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; overflow-wrap: anywhere; min-width: 0; }
.src a { overflow-wrap: anywhere; }

/* Opportunity rows */
.opp-row { display: block; color: inherit; text-decoration: none; }
.opp-row .top { display: flex; gap: 8px; align-items: flex-start; justify-content: space-between; }
.opp-row .name { font-weight: 700; overflow-wrap: anywhere; min-width: 0; }
.opp-row .sub { font-size: 13px; color: var(--text-2); margin-top: 2px; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.opp-row .next { font-size: 13px; margin-top: 4px; color: var(--text); overflow-wrap: anywhere; }

/* Opportunity page */
.back { display: inline-flex; align-items: center; gap: 4px; min-height: var(--tap); text-decoration: none; font-weight: 600; margin: -6px 0 6px; }
.opp-head h1 { font-size: 20px; margin: 0; overflow-wrap: anywhere; line-height: 1.35; }
.opp-head .sub { color: var(--text-2); font-size: 14px; margin: 4px 0 10px; overflow-wrap: anywhere; }
.kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 640px) { .kv { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.kv > div { background: var(--surface); border-radius: 10px; padding: 8px 10px; min-width: 0; }
@media (prefers-color-scheme: dark) { .kv > div { background: #121915; } }
.kv .k { font-size: 12px; color: var(--text-2); font-weight: 600; }
.kv .v { font-weight: 700; font-family: var(--font-num); overflow-wrap: anywhere; }
.kv .v.ar { font-family: var(--font); }
.opp-cols { display: grid; gap: 12px; margin-top: 12px; }
@media (min-width: 900px) { .opp-cols { grid-template-columns: 1fr 1fr; align-items: start; } }
.party { padding: 10px 0; border-top: 1px solid var(--line); }
.party:first-child { border-top: 0; }
.party .who { font-weight: 700; overflow-wrap: anywhere; }
.party .role { font-size: 13px; color: var(--text-2); }
.party .contact { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.contact .btn { padding: 0 12px; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (min-width: 640px) { .actions { grid-template-columns: repeat(3, 1fr); } }
.actions .btn { white-space: normal; text-align: center; line-height: 1.3; padding: 6px 8px; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { border-radius: 10px; padding: 8px 10px; margin-bottom: 8px; background: var(--surface); border-inline-start: 4px solid var(--gray); overflow-wrap: anywhere; }
.timeline li.c-blue { background: var(--gem-bg); color: var(--gem-text); border-color: var(--gem-text); }
.timeline li.c-green { background: var(--cl-bg); color: var(--cl-text); border-color: var(--green-light); }
.timeline li.c-gray { color: var(--text-2); }
.timeline .when { font-size: 12px; opacity: .85; display: flex; gap: 8px; flex-wrap: wrap; }
.timeline .txt { white-space: pre-wrap; font-size: 14px; }
.calc-row { display: grid; grid-template-columns: minmax(0, 1fr) 100px; gap: 8px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line); }
.calc-row:first-child { border-top: 0; }
.calc-row .nm { font-size: 14px; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.calc-row .pr { font-size: 12px; color: var(--text-2); }
.calc-row input { text-align: left; direction: ltr; padding: 6px 8px; }
.calc-total { margin-top: 10px; display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; font-size: 14px; }
.calc-total .n { font-family: var(--font-num); text-align: end; font-weight: 700; direction: ltr; }

/* Sheet (bottom sheet on mobile, centered dialog on desktop) */
.sheet-wrap { position: fixed; inset: 0; z-index: 40; display: flex; align-items: flex-end; justify-content: center; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .45); }
.sheet { position: relative; width: 100%; max-width: 560px; max-height: 92vh; max-height: 92dvh; display: flex; flex-direction: column; background: var(--card); border-radius: 16px 16px 0 0; box-shadow: 0 -6px 24px rgba(0, 0, 0, .2); animation: up .18s ease-out; }
.sheet-head { display: flex; align-items: center; gap: 8px; padding: 8px 8px 0 8px; padding-inline-start: 16px; }
.sheet-head h2 { flex: 1; font-size: 17px; margin: 0; min-width: 0; overflow-wrap: anywhere; }
.sheet-body { padding: 12px 16px calc(16px + env(safe-area-inset-bottom)); overflow-y: auto; overscroll-behavior: contain; }
@media (min-width: 640px) {
  .sheet-wrap { align-items: center; padding: 16px; }
  .sheet { border-radius: 16px; }
}
@keyframes up { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }
.draft-subject { font-weight: 700; margin-bottom: 6px; overflow-wrap: anywhere; }
.draft-body { white-space: pre-wrap; background: var(--surface); border-radius: 10px; padding: 10px 12px; font-size: 14px; overflow-wrap: anywhere; max-height: 45vh; overflow-y: auto; }
.draft-body[dir=ltr] { text-align: left; font-family: var(--font-num); }

/* FAB */
.fab { position: fixed; inset-inline-start: 16px; bottom: calc(var(--bottom-nav) + env(safe-area-inset-bottom) + 16px); z-index: 25; width: 56px; height: 56px; border-radius: 50%; border: 0; background: var(--primary); color: var(--on-primary); display: grid; place-items: center; box-shadow: 0 6px 16px rgba(0, 0, 0, .25); cursor: pointer; }
.fab .ic { width: 28px; height: 28px; stroke-width: 2.4; }
@media (min-width: 900px) { .fab { bottom: 24px; inset-inline-start: 24px; } }

/* Toast */
.toast { position: fixed; z-index: 60; inset-inline: 16px; bottom: calc(var(--bottom-nav) + env(safe-area-inset-bottom) + 84px); margin: 0 auto; max-width: 480px; background: #1B2420; color: #fff; border-radius: 12px; padding: 12px 16px; font-size: 15px; box-shadow: 0 6px 18px rgba(0, 0, 0, .3); text-align: center; }
.toast.err { background: var(--red); }
@media (min-width: 900px) { .toast { bottom: 24px; } }

/* Settings */
.set-group { margin-bottom: 12px; }
.set-group h2 { font-size: 15px; }
.usage ol { padding-inline-start: 22px; margin: 0; }
.usage li { margin-bottom: 10px; }
.notice { background: var(--surface); border-radius: 10px; padding: 10px 12px; font-size: 14px; }
.notice.amber { background: var(--amber-bg); color: var(--amber); }
.banner { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.banner .t { flex: 1; min-width: 180px; font-size: 14px; }

/* notifications center + guide (v5) */
.acct-row{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-bottom:12px}
.ntf-list{list-style:none;margin:10px 0 0;padding:0}
.ntf{border-bottom:1px solid var(--line,#DBE0E3)}
.ntf:last-child{border-bottom:0}
.ntf a,.ntf .ntf-static{display:flex;gap:10px;align-items:flex-start;padding:10px 4px;color:inherit;text-decoration:none;min-height:44px}
.ntf.unread{background:color-mix(in srgb,#3AAE2A 8%,transparent);border-radius:10px}
.ntf-dot{flex:0 0 10px;width:10px;height:10px;border-radius:50%;background:#3AAE2A;margin-top:7px}
.ntf-dot.read{background:transparent;border:1.5px solid #DBE0E3}
.ntf-body{display:flex;flex-direction:column;gap:2px;min-width:0}
.ntf-text{font-size:14px;white-space:pre-line;overflow-wrap:anywhere}
.ntf-time{font-size:12px;opacity:.7}
.ntf-now{display:block;padding:10px 4px;min-height:44px;color:inherit;text-decoration:none;border-inline-start:3px solid #83BA26;padding-inline-start:10px}
.ntf-now.red{border-color:#C62828}
.ntf-now.amber{border-color:#B26A00}
.ntf-now.green{border-color:#006225}
.guide summary{font-weight:600;font-size:16px;cursor:pointer;min-height:44px;display:flex;align-items:center}
.guide-list .fold{margin-bottom:10px}
.guide-body{padding:2px 2px 8px}
.guide-body .list li{line-height:1.8}
.steps{margin:0;padding-inline-start:20px}
.steps li{margin-bottom:8px;line-height:1.8}

.login-help{margin-top:14px;text-align:center;display:flex;flex-direction:column;align-items:center;gap:6px}
.login-help p{margin:0;max-width:280px;line-height:1.7}
