/* Barakah Wealth 1.0.0: app layer on top of soft-glass.css + pps-base.css 1.2.2 (Soft Pebble).
   Accent: calm sky blue with a mint and butter brand mark. 8px spacing steps; one dark button per screen. */
[data-pp="pebble"][data-pp-app="barakahwealth"] { --pp-acc-bg: #d2e2f6; --pp-acc-ink: #1f4a80; --sg-accent: #1f5a99; --sg-accent-soft: #d2e2f6;
  --pp-mark-bg: linear-gradient(135deg, #c4dbf4 0%, #cdebdc 55%, #f5e6a3 100%); --pp-mark-ink: #1c4677; --bw-good: #1e5a3b; --bw-bad: #8e2b3b; }
[data-pp="pebble"][data-pp-app="barakahwealth"][data-sg-theme="night"] { --bw-good: #9fe0bb; --bw-bad: #f6b4c0; }
.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 99; background: #fff; padding: 8px 16px; border-radius: 999px; }
.skip:focus { left: 8px; }
body { min-height: 100vh; font-variant-numeric: tabular-nums; }

/* top bar */
.bw-top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 16px; padding: 12px 24px; background: color-mix(in srgb, var(--sg-bg) 92%, transparent); }
.bw-top__grow { flex: 1; }
.bw-search { gap: 8px; }
.bw-bell { position: relative; }
.bw-bell__n { position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: #fbe1e5; color: #8e1f33; font-size: .6875rem; font-weight: 700; display: grid; place-items: center; }
.pp-bellpop { position: fixed; }
@media (max-width: 720px) { .bw-top { padding: 8px 12px; gap: 6px; } .bw-search .pp-kbd { display: none; } .bw-search { padding: 0 10px; } .bw-top .pp-btn--icon { width: 40px; } [data-pp="pebble"] .bw-top .pp-brand__name { font-size: 1.0625rem; } .bw-top .pp-mark { width: 32px; height: 32px; } .bw-top .pp-clock__time { font-size: 1rem; } }
html, body { overflow-x: hidden; }

/* frame */
.bw-shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); gap: 24px; padding: 8px 24px 64px; max-width: 1360px; margin: 0 auto; }
.bw-side { position: sticky; top: 80px; align-self: start; max-height: calc(100vh - 96px); overflow: auto; padding-bottom: 16px; }
.bw-main { min-width: 0; display: flex; flex-direction: column; gap: 24px; outline: none; }
.bw-tabbar { display: none; }
@media (max-width: 900px) {
  .bw-shell { grid-template-columns: minmax(0, 1fr); padding: 8px 16px 112px; }
  .bw-side { display: none; }
  .bw-tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); background: var(--sg-surface-solid); box-shadow: 0 -8px 24px rgba(30, 40, 55, .08); }
  .bw-tabbar a, .bw-tabbar button { display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 56px; justify-content: center; font: inherit; font-size: .75rem; color: var(--sg-ink-2); text-decoration: none; background: none; border: 0; border-radius: 16px; }
  .bw-tabbar [aria-current="page"] { color: var(--pp-acc-ink); background: var(--pp-acc-bg); font-weight: 700; }
}

/* big numbers fit their column */
.pp-stats .pp-num { font-size: clamp(1.75rem, 2.4vw, 2.75rem); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pp-stat .pp-chip { white-space: normal; }
/* page parts */
.bw-help { margin-left: auto; }
.bw-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.bw-subnav { display: flex; gap: 8px; flex-wrap: wrap; }
.bw-subnav a { min-height: 44px; display: inline-flex; align-items: center; padding: 0 16px; border-radius: 999px; background: #fff; color: var(--sg-ink); text-decoration: none; font-size: .9375rem; }
.bw-subnav a[aria-current="page"] { background: var(--pp-tint-chip); color: var(--pp-tint-ink); font-weight: 700; }
.bw-num { font-family: var(--pp-dots); font-weight: 700; font-variant-numeric: tabular-nums; }
.bw-pos { color: var(--bw-good); } .bw-neg { color: var(--bw-bad); }
.bw-table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.bw-table th { text-align: left; font-weight: 600; font-size: .8125rem; color: var(--sg-ink-2); padding: 8px; border-bottom: 1px solid rgba(0, 0, 0, .08); }
.bw-table td { padding: 10px 8px; border-bottom: 1px solid rgba(0, 0, 0, .05); vertical-align: top; }
.bw-table td.n, .bw-table th.n { text-align: right; white-space: nowrap; }
.bw-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.bw-note { font-size: .875rem; color: var(--sg-ink-2); max-width: 70ch; margin: 8px 0 0; }
.bw-src { font-size: .8125rem; color: var(--sg-ink-2); }
.bw-src a { color: inherit; }
.bw-empty { padding: 16px; border-radius: 20px; background: rgba(255, 255, 255, .6); color: var(--sg-ink-2); }

/* forms */
.bw-form { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); align-items: end; }
.bw-form label { display: flex; flex-direction: column; gap: 6px; font-size: .875rem; font-weight: 600; color: var(--sg-ink); }
.bw-form label small { font-weight: 400; color: var(--sg-ink-2); }
.bw-form input, .bw-form select, .bw-form textarea { min-height: 48px; padding: 10px 16px; border-radius: 16px; border: 1px solid #d6dae0; background: #fff; font: inherit; font-weight: 400; color: var(--sg-ink); width: 100%; }
.bw-form textarea { min-height: 120px; border-radius: 16px; resize: vertical; }
.bw-form input:focus-visible, .bw-form select:focus-visible, .bw-form textarea:focus-visible { outline: 2px solid var(--sg-accent); outline-offset: 1px; }
.bw-form .bw-check { flex-direction: row; align-items: center; gap: 12px; font-weight: 500; min-height: 48px; }
.bw-form .bw-check input { width: 22px; min-height: 22px; height: 22px; }
.bw-form .bw-wide { grid-column: 1 / -1; }
.bw-form .bw-actions { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; }
[data-sg-theme="night"] .bw-form input, [data-sg-theme="night"] .bw-form select, [data-sg-theme="night"] .bw-form textarea { background: var(--sg-surface-2); border-color: #3b4048; }
button[disabled], .pp-btn[aria-busy="true"] { opacity: .55; cursor: progress; }

/* rows with a value at the end */
.bw-val { margin-left: auto; text-align: right; white-space: nowrap; font-weight: 600; }
.pp-li .pp-btn { min-height: 40px; }

/* bars (goals, progress) */
.bw-bar { height: 10px; border-radius: 999px; background: rgba(31, 34, 38, .08); overflow: hidden; }
.bw-bar > i { display: block; height: 100%; border-radius: 999px; background: #8fbbe8; }

/* charts */
.bw-chart { width: 100%; height: 180px; display: block; }
.bw-chart path.line { fill: none; stroke: #1f5a99; stroke-width: 2; }
.bw-chart path.area { fill: rgba(143, 187, 232, .25); stroke: none; }
.bw-chart line.base { stroke: rgba(31, 34, 38, .25); stroke-dasharray: 4 4; }
.bw-chart text { font-size: 11px; fill: var(--sg-ink-2); }

/* banner (outage) and toast */
.bw-banner { position: sticky; top: 0; z-index: 60; padding: 10px 24px; background: #fbe3cc; color: #6b3300; font-size: .875rem; display: flex; gap: 12px; align-items: center; }
.bw-banner button { margin-left: auto; }
.bw-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 80; max-width: min(560px, calc(100vw - 32px)); padding: 12px 20px; border-radius: 999px; background: var(--pp-ink-dark); color: #fff; font-size: .9375rem; box-shadow: var(--sg-shadow-lift); }
.bw-toast.is-bad { background: #8e1f33; }
@media (max-width: 900px) { .bw-toast { bottom: 96px; border-radius: 20px; } }

/* knowledge / help reading */
.bw-read { max-width: 72ch; line-height: 1.6; }
.bw-read pre { white-space: pre-wrap; font-family: var(--sg-font); font-size: .9375rem; line-height: 1.6; margin: 0; }
.bw-read h3 { font-size: 1.25rem; margin: 24px 0 8px; }
.bw-read p, .bw-read li { max-width: 72ch; }

/* login */
.bw-login { max-width: 440px; margin: 10vh auto 0; }

/* print: the filing pack */
@media print {
  .bw-top, .bw-side, .bw-tabbar, .bw-banner, .no-print, .bw-help { display: none !important; }
  .bw-shell { display: block; padding: 0; } body { background: #fff; } .pp-panel, .pp-phead { background: #fff !important; padding: 8px 0; }
}
@media (max-width: 720px) { .pp-stats .pp-num { font-size: 1.375rem; } }
.pp-li select { max-width: 100%; flex: 1 1 100%; min-height: 44px; text-overflow: ellipsis; }
.pp-li { min-width: 0; } .pp-li__grow span, .pp-li__grow b { overflow-wrap: anywhere; }
.pp-stat .pp-chip { max-width: 100%; }
