/* =============================================================================
   Smart Financial GPS — Styles
   Concept prototype palette (not official Bank al Etihad brand assets).
   ============================================================================= */
:root {
  --brand:        #FA6428;   /* Bank al Etihad brand orange (from bankaletihad.com) */
  --brand-dark:   #E0531A;
  --brand-light:  #FF9A5A;   /* gradient top / lighter orange */
  --brand-tint:   #FFF1E9;
  --ink:          #282D3C;   /* Bank al Etihad dark navy-charcoal text */
  --ink-soft:     #535150;   /* warm secondary gray */
  --line:         #E8E6E6;
  --bg:           #F4F3F2;   /* warm light surface */
  --card:         #ffffff;
  --card-2:       #FAF9F8;
  --teal:         #4E9E95;   /* Bank al Etihad advice/analytics teal */
  --teal-dark:    #3E8880;
  --teal-light:   #6FB5AD;
  --teal-tint:    #E8F3F1;
  --taupe:        #A89B8C;   /* investment/secondary tile tone */
  --dark-tile:    #3A3A3C;
  --good:         #0E8F5E;
  --good-tint:    #E6F5EE;
  --warn:         #2E6FA8;   /* protective "info" blue (distinct from brand orange) */
  --warn-tint:    #E9F1F9;
  --bad:          #C8102E;
  --bad-tint:     #FBE9EC;
  --navy:         #282D3C;    /* deep brand dark (phone frame) */
  --radius:       18px;
  --shadow:       0 10px 30px rgba(40,45,60,.09), 0 2px 8px rgba(40,45,60,.05);
  --font:         'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}
:root:not([data-theme="light"]) {
  @media (prefers-color-scheme: dark) {
    --ink:#f1efed; --ink-soft:#b2afac; --line:#302e30; --bg:#141315;
    --card:#1c1b1e; --card-2:#242227; --brand-tint:#2f1a0e; --navy:#1c1b1e;
    --good-tint:#10271d; --warn-tint:#14212e; --bad-tint:#2a1518; --teal-tint:#122725;
  }
}
:root[data-theme="dark"] {
  --ink:#f1efed; --ink-soft:#b2afac; --line:#302e30; --bg:#141315;
  --card:#1c1b1e; --card-2:#242227; --brand-tint:#2f1a0e; --navy:#1c1b1e;
  --good-tint:#10271d; --warn-tint:#14212e; --bad-tint:#2a1518; --teal-tint:#122725;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font); color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased; line-height: 1.45;
}
h1,h2,h3,h4 { margin: 0; font-weight: 700; letter-spacing: -0.01em; }
button { font-family: inherit; cursor: pointer; }
a { color: var(--brand); }

/* ---------- App layout ---------- */
.layout { display: grid; grid-template-columns: 360px 1fr; min-height: 100vh; }
@media (max-width: 1040px) { .layout { grid-template-columns: 1fr; } }

/* ---------- Control panel (left) ---------- */
.panel {
  background: var(--card); border-right: 1px solid var(--line);
  padding: 22px 20px 40px; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
@media (max-width: 1040px) { .panel { position: static; height: auto; border-right: none; border-bottom: 1px solid var(--line); } }
.brand-row { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.logo {
  width: 40px; height: 40px; border-radius: 11px;
  background: linear-gradient(135deg, var(--brand-light), var(--brand));
  color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 20px;
  box-shadow: 0 4px 14px rgba(250,100,40,.4);
}
.brand-row h1 { font-size: 18px; }
.brand-row .sub { font-size: 11.5px; color: var(--ink-soft); font-weight: 600; letter-spacing: .02em; }
.concept-tag {
  display: inline-block; margin: 14px 0 18px; font-size: 10.5px; font-weight: 700;
  color: var(--brand); background: var(--brand-tint); border: 1px solid rgba(200,16,46,.2);
  padding: 4px 9px; border-radius: 999px; letter-spacing: .04em;
}
.panel h3.section { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); margin: 22px 0 10px; }

/* persona chooser */
.persona-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.persona-btn {
  text-align: left; border: 1px solid var(--line); background: var(--card-2);
  border-radius: 13px; padding: 10px 11px; transition: .15s; color: var(--ink);
}
.persona-btn:hover { border-color: var(--brand); transform: translateY(-1px); }
.persona-btn.active { border-color: var(--brand); background: var(--brand-tint); box-shadow: 0 0 0 1px var(--brand) inset; }
.persona-btn .emoji { font-size: 18px; }
.persona-btn .pname { font-weight: 700; font-size: 12.5px; margin-top: 3px; }
.persona-btn .pwho { font-size: 10.5px; color: var(--ink-soft); }

/* sandbox sliders */
.slider-row { margin-bottom: 13px; }
.slider-row label { display: flex; justify-content: space-between; font-size: 12px; font-weight: 600; margin-bottom: 5px; }
.slider-row label b { color: var(--brand); font-variant-numeric: tabular-nums; }
input[type=range] { width: 100%; accent-color: var(--brand); }
.toggle-row { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; font-weight: 600; padding: 8px 0; }
.switch { position: relative; width: 42px; height: 24px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider-sw { position: absolute; inset: 0; background: var(--line); border-radius: 999px; transition: .2s; }
.slider-sw:before { content:''; position: absolute; height: 18px; width: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.switch input:checked + .slider-sw { background: var(--good); }
.switch input:checked + .slider-sw:before { transform: translateX(18px); }
.hint { font-size: 11px; color: var(--ink-soft); margin-top: 2px; }

/* ---------- Stage (right) ---------- */
.stage { padding: 28px 28px 60px; display: grid; grid-template-columns: 340px 1fr; gap: 26px; align-items: start; }
@media (max-width: 760px) { .stage { grid-template-columns: 1fr; } }

/* ---------- Phone ---------- */
.phone {
  width: 340px; background: var(--navy); border-radius: 38px; padding: 12px;
  box-shadow: var(--shadow); position: sticky; top: 24px;
}
.phone-screen { background: var(--bg); border-radius: 28px; overflow: hidden; height: 680px; display: flex; flex-direction: column; }
/* soft diagonal "wave" texture used on brand tiles (like the real app) */
.wave {
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 220' preserveAspectRatio='none'%3E%3Cpath d='M0,128 C110,86 290,172 400,118 L400,220 L0,220 Z' fill='white' fill-opacity='0.09'/%3E%3Cpath d='M0,162 C130,120 270,202 400,150 L400,220 L0,220 Z' fill='white' fill-opacity='0.06'/%3E%3C/svg%3E");
  background-size: cover; background-position: bottom;
}
.statusbar { height: 30px; display: flex; align-items: center; justify-content: space-between; padding: 0 18px; font-size: 13px; font-weight: 700; color: var(--ink); background: var(--card); }
.statusbar .sig { letter-spacing: 1px; }

.app-topbar { display: flex; align-items: center; gap: 10px; padding: 6px 16px 10px; background: var(--card); }
.app-topbar .avatar { width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--card-2); }
.tier-pill { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; background: var(--brand); color: #fff; font-size: 12px; font-weight: 700; padding: 6px 12px; border-radius: 999px; }
.top-ico { width: 30px; text-align: center; font-size: 16px; color: var(--ink); position: relative; }
.top-ico .dot { position: absolute; top: 0; right: 4px; width: 7px; height: 7px; background: var(--brand); border-radius: 50%; }

.tab-row { display: flex; gap: 6px; padding: 4px 12px 10px; background: var(--card); overflow-x: auto; border-bottom: 1px solid var(--line); }
.tab-row::-webkit-scrollbar { display: none; }
.tab-chip { font-size: 13px; font-weight: 700; color: var(--ink-soft); padding: 7px 13px; border-radius: 10px; white-space: nowrap; }
.tab-chip.on { background: var(--card-2); color: var(--ink); }

.app-scroll { flex: 1; overflow-y: auto; padding: 14px 14px 20px; background: var(--bg); }

/* signature balance card */
.balance-card { position: relative; border-radius: 20px; padding: 18px 18px 20px; color: #fff; text-align: center; overflow: hidden;
  background: linear-gradient(135deg, var(--brand-light) 0%, var(--brand) 55%, var(--brand-dark) 100%); box-shadow: 0 10px 24px rgba(250,100,40,.28); }
.balance-card .bc-label { font-size: 13px; opacity: .92; position: relative; }
.balance-card .bc-amt { font-size: 32px; font-weight: 800; letter-spacing: -0.02em; margin: 2px 0 10px; position: relative; }
.balance-card .bc-amt .cur { font-size: 20px; font-weight: 700; margin-right: 4px; }
.balance-card .bc-amt .fils { font-size: 20px; opacity: .9; }
.balance-card .bc-hide { position: relative; display: inline-flex; align-items: center; gap: 6px; background: rgba(0,0,0,.18); color: #fff; font-size: 12px; font-weight: 600; padding: 7px 14px; border-radius: 999px; }

.io-rows { background: var(--card); border-radius: 16px; margin-top: 12px; box-shadow: var(--shadow); overflow: hidden; }
.io { display: flex; align-items: center; gap: 10px; padding: 13px 15px; font-size: 13.5px; font-weight: 700; }
.io + .io { border-top: 1px solid var(--line); }
.io .io-ic { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; color: var(--brand); border: 1.5px solid var(--brand); }
.io .io-amt { margin-left: auto; font-variant-numeric: tabular-nums; }
.io .io-amt .fils { font-size: 11px; color: var(--ink-soft); }
.section-lbl { font-size: 12px; font-weight: 700; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .05em; margin: 16px 2px 8px; }

/* financial wellbeing score card */
.wb-card { display: flex; gap: 16px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 14px 16px; margin-top: 12px; }
.wb-ring { flex-shrink: 0; }
.wb-ring .wb-score { font-weight: 800; font-size: 36px; fill: var(--ink); font-family: inherit; }
.wb-ring .wb-of { font-size: 16px; fill: var(--ink-soft); font-weight: 600; }
.wb-txt { flex: 1; min-width: 0; }
.wb-h { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); }
.wb-band { font-size: 20px; font-weight: 800; margin-top: 2px; }
.wb-opp { font-size: 12px; color: var(--ink-soft); margin-top: 3px; }
.wb-opp b { color: var(--ink); }
.wb-bars { display: flex; gap: 5px; align-items: flex-end; height: 26px; margin-top: 9px; }
.wb-seg { width: 12px; height: 100%; background: var(--line); border-radius: 4px; display: flex; align-items: flex-end; overflow: hidden; }
.wb-seg span { display: block; width: 100%; border-radius: 4px; }

/* ---- multi-screen: Payment / Hub / Notifications ---- */
.scr-head { display: flex; align-items: center; gap: 10px; background: var(--navy); color: #fff; padding: 14px 16px; }
.scr-head .back-btn { background: transparent; border: none; color: #fff; font-size: 26px; line-height: 1; width: 32px; height: 32px; cursor: pointer; }
.scr-head .scr-title { flex: 1; text-align: center; font-size: 16px; font-weight: 800; }
.scr-head .scr-head-sp { width: 32px; }
.app-scroll.scr { padding: 0; }
.scr-list { background: var(--card); }
.scr-row { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-bottom: 1px solid var(--line); font-size: 14px; font-weight: 700; color: var(--ink); cursor: pointer; }
.scr-row:last-child { border-bottom: none; }
.scr-ic { width: 26px; text-align: center; font-size: 18px; }
.scr-l { flex: 1; }
.scr-ch { color: var(--ink-soft); font-size: 18px; }
.qr-btn { display: block; margin: 18px 16px; width: calc(100% - 32px); background: var(--brand); color: #fff; border: none; border-radius: 14px; padding: 15px; font-size: 15px; font-weight: 800; cursor: pointer; }
.hub-scroll { padding: 16px; }
.scr-sec { font-size: 13px; font-weight: 800; color: var(--ink-soft); margin: 14px 2px 10px; }
.hub-scroll .scr-sec:first-child { margin-top: 2px; }
.hub-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px 8px; }
.hubtile { text-align: center; }
.hubtile .app-tile { width: 54px; height: 54px; margin: 0 auto; border-radius: 15px; font-size: 24px; }
.hubtile-l { display: block; font-size: 10.5px; color: var(--ink); font-weight: 600; margin-top: 6px; line-height: 1.2; }
.notif { display: flex; gap: 13px; align-items: flex-start; background: var(--card); border-bottom: 1px solid var(--line); padding: 15px 16px; }
.notif-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 19px; flex-shrink: 0; }
.notif-ic.good { background: var(--good-tint); }
.notif-ic.teal { background: rgba(78,158,149,.15); }
.notif-ic.orange { background: var(--brand-tint); }
.notif-txt { flex: 1; }
.notif-t { font-size: 13.5px; font-weight: 700; color: var(--ink); line-height: 1.35; }
.notif-time { font-size: 11px; color: var(--ink-soft); margin-top: 3px; }
.tabbar .tab { cursor: pointer; }
.top-ico[data-nav] { cursor: pointer; }
.hubtile.nav { cursor: pointer; }

/* transactions screen */
.tx-search { padding: 14px 16px 6px; background: var(--card); }
.tx-search input { width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: 12px; padding: 11px 14px; font-size: 13px; background: var(--card-2); color: var(--ink); }
.fchips { display: flex; gap: 8px; padding: 8px 16px 12px; background: var(--card); border-bottom: 1px solid var(--line); }
.fchip { font-size: 12px; font-weight: 700; color: var(--ink-soft); background: var(--card-2); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; }
.fchip.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.tx-list { background: var(--card); }
.tx2 { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.tx2:last-child { border-bottom: none; }
.tx2-ic { width: 38px; height: 38px; border-radius: 11px; background: var(--card-2); display: grid; place-items: center; font-size: 18px; flex-shrink: 0; }
.tx2-m { flex: 1; min-width: 0; }
.tx2-d { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.tx2-c { font-size: 11px; color: var(--ink-soft); margin-top: 2px; }
.tx2-a { font-size: 14px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.tx2-a.pos { color: var(--good); }

/* cards screen */
.cards-scroll { padding: 16px; }
.bankcard { position: relative; border-radius: 20px; padding: 22px; color: #fff; min-height: 190px; background: linear-gradient(135deg, var(--brand-light), var(--brand) 55%, var(--brand-dark)); box-shadow: 0 12px 26px rgba(250,100,40,.3); display: flex; flex-direction: column; }
.bc-brand { font-size: 15px; font-weight: 800; }
.bc-num { font-size: 22px; font-weight: 700; letter-spacing: 2px; margin-top: auto; }
.bc-row { display: flex; justify-content: space-between; font-size: 14px; font-weight: 700; margin-top: 12px; }
.bc-frozen { position: absolute; inset: 0; background: rgba(30,34,48,.55); border-radius: 20px; display: grid; place-items: center; font-size: 16px; font-weight: 800; }
.tgl { width: 44px; height: 26px; border-radius: 999px; background: var(--line); position: relative; flex-shrink: 0; transition: .15s; }
.tgl::after { content: ''; position: absolute; width: 20px; height: 20px; border-radius: 50%; background: #fff; top: 3px; left: 3px; transition: .15s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.tgl.on { background: var(--good); }
.tgl.on::after { left: 21px; }

/* goals screen */
.goals-scroll { padding: 16px; }
.goal2 { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px; margin-bottom: 12px; box-shadow: var(--shadow); }
.goal2-top { display: flex; justify-content: space-between; align-items: baseline; }
.goal2-n { font-size: 15px; font-weight: 800; color: var(--ink); }
.goal2-p { font-size: 15px; font-weight: 800; color: var(--good); }
.goal2-bar { height: 10px; background: var(--line); border-radius: 6px; overflow: hidden; margin: 10px 0 8px; }
.goal2-bar div { height: 100%; background: var(--good); border-radius: 6px; }
.goal2-sub { font-size: 12.5px; color: var(--ink-soft); }
.goal-empty { text-align: center; color: var(--ink-soft); font-size: 14px; padding: 40px 20px; }

/* home see-all */
.mini-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 9px; }
.see-all { font-size: 11.5px; font-weight: 700; color: var(--brand); cursor: pointer; }
[dir="rtl"] .tgl::after { left: auto; right: 3px; }
[dir="rtl"] .tgl.on::after { right: 21px; left: auto; }

/* segment badges in the top bar */
.seg-pills { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.seg-pills .tier-pill { margin-left: 0; }
.seg-badge { font-size: 11px; font-weight: 700; background: var(--brand-tint); color: var(--brand); padding: 5px 9px; border-radius: 999px; white-space: nowrap; }

/* persona quick actions */
.qa-row { display: flex; gap: 8px; margin-top: 12px; }
.qa { flex: 1; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 4px; text-align: center; box-shadow: var(--shadow); }
.qa-ic { font-size: 18px; display: block; }
.qa-l { font-size: 9.5px; color: var(--ink-soft); font-weight: 600; display: block; margin-top: 4px; line-height: 1.1; }

/* persona suggestion / guidance cards */
.sugg { display: flex; gap: 11px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 13px; margin-bottom: 11px; box-shadow: var(--shadow); align-items: flex-start; }
.sugg .app-tile { flex-shrink: 0; }
.sugg-txt { flex: 1; }
.sugg-t { font-weight: 800; font-size: 13px; line-height: 1.25; }
.sugg-b { font-size: 11.5px; color: var(--ink-soft); margin-top: 4px; line-height: 1.4; }
.sugg-cta { margin-top: 9px; background: var(--brand-tint); color: var(--brand); border: none; border-radius: 9px; padding: 7px 12px; font-size: 11.5px; font-weight: 700; }

/* persona product/tool shortcuts grid */
.sc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 12px; }
.sc { text-align: center; }
.sc .app-tile { width: 46px; height: 46px; margin: 0 auto; border-radius: 14px; font-size: 20px; }
.sc-l { font-size: 9.5px; color: var(--ink); font-weight: 600; display: block; margin-top: 5px; line-height: 1.15; }

/* GPS card */
.gps-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; margin-bottom: 14px; border: 1px solid var(--line); margin-top: 4px; }
.gps-top { position: relative; display: flex; align-items: center; gap: 8px; padding: 13px 14px; color: #fff; overflow: hidden;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 120' preserveAspectRatio='none'%3E%3Cpath d='M0,70 C110,40 290,98 400,62 L400,120 L0,120 Z' fill='white' fill-opacity='0.10'/%3E%3Cpath d='M0,92 C130,64 270,112 400,84 L400,120 L0,120 Z' fill='white' fill-opacity='0.07'/%3E%3C/svg%3E") bottom/cover,
    linear-gradient(120deg, var(--teal-light), var(--teal) 55%, var(--teal-dark)); }
.gps-top .nav-ico { font-size: 15px; }
.gps-top .ttl { font-size: 12.5px; font-weight: 800; letter-spacing: .02em; }
.gps-top .badge { margin-left: auto; font-size: 10px; background: rgba(0,0,0,.18); padding: 3px 8px; border-radius: 999px; font-weight: 700; }
.gps-body { padding: 14px; }
.gps-body .insight { font-size: 15px; font-weight: 700; line-height: 1.3; }
.gps-body .sub { font-size: 12.5px; color: var(--ink-soft); margin-top: 6px; }
.action-btn {
  margin-top: 13px; width: 100%; background: var(--brand); color: #fff; border: none;
  border-radius: 12px; padding: 12px; font-size: 13.5px; font-weight: 700; transition: .15s;
}
.action-btn:hover { background: var(--brand-dark); }
.why-btn { margin-top: 9px; width: 100%; background: transparent; color: var(--ink-soft); border: 1px dashed var(--line); border-radius: 10px; padding: 8px; font-size: 11.5px; font-weight: 600; }
.why-box { margin-top: 10px; background: var(--card-2); border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; font-size: 11.5px; color: var(--ink-soft); }
.why-box ul { margin: 6px 0 0; padding-left: 16px; }
.why-box li { margin-bottom: 5px; }

/* product tile inside phone */
.product-tile { margin-top: 12px; border: 1px solid var(--line); border-radius: 13px; padding: 12px; background: var(--card-2); }
.product-tile.blocked { opacity: .9; }
.product-tile .pk { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; padding: 3px 7px; border-radius: 6px; display: inline-block; }
.pk.savings { background: var(--good-tint); color: var(--good); }
.pk.deposit { background: var(--good-tint); color: var(--good); }
.pk.wellbeing { background: var(--brand-tint); color: var(--brand); }
.pk.credit { background: var(--warn-tint); color: var(--warn); }
.pk.advisory { background: var(--warn-tint); color: var(--warn); }
.product-tile .pn { font-weight: 800; font-size: 13.5px; margin-top: 7px; }
.product-tile .pb { font-size: 11.5px; color: var(--ink-soft); margin-top: 3px; }
.blocked-note { margin-top: 8px; font-size: 11px; color: var(--warn); background: var(--warn-tint); border-radius: 8px; padding: 7px 9px; }

/* mini generic cards inside phone */
.mini { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 13px; margin-bottom: 12px; }
.mini h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); margin-bottom: 9px; }
.bar-row { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; font-size: 11.5px; }
.bar-row .bl { width: 74px; color: var(--ink-soft); }
.bar-track { flex: 1; height: 8px; background: var(--line); border-radius: 6px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 6px; }
.bar-row .bv { width: 56px; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.goal-wrap { font-size: 12px; }
.goal-meter { height: 11px; background: var(--line); border-radius: 7px; overflow: hidden; margin: 7px 0; }
.goal-meter .gf { height: 100%; background: var(--good); border-radius: 7px; }
.txn { display: flex; justify-content: space-between; font-size: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.txn:last-child { border-bottom: none; }
.txn .ta { font-variant-numeric: tabular-nums; font-weight: 600; }
.txn .ta.pos { color: var(--good); }

.tabbar { display: flex; justify-content: space-around; border-top: 1px solid var(--line); background: var(--card); padding: 9px 0 10px; }
.tabbar .tab { font-size: 10px; color: var(--ink-soft); text-align: center; }
.tabbar .tab.on { color: var(--brand); font-weight: 700; }
.tabbar .tab .ti { font-size: 17px; display: block; }

/* ---------- Explanation column ---------- */
.explain-col { display: grid; gap: 18px; }
.xcard { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; }
.xcard h2 { font-size: 15px; margin-bottom: 4px; }
.xcard .cap { font-size: 12px; color: var(--ink-soft); margin-bottom: 14px; }

/* pipeline steps */
.steps { display: grid; gap: 10px; }
.step { display: grid; grid-template-columns: 30px 1fr; gap: 12px; align-items: start; }
.step .sn { width: 28px; height: 28px; border-radius: 9px; background: var(--brand-tint); color: var(--brand); font-weight: 800; display: grid; place-items: center; font-size: 12px; }
.step .st { font-weight: 700; font-size: 13px; }
.step .sd { font-size: 12px; color: var(--ink-soft); margin-top: 2px; }
.step .sd b { color: var(--ink); font-weight: 600; }

/* persona ranking bars */
.rank { display: grid; gap: 7px; }
.rank-row { display: flex; align-items: center; gap: 9px; font-size: 12px; }
.rank-row .rl { width: 120px; display: flex; gap: 6px; align-items: center; }
.rank-row .rl.win { font-weight: 800; }
.rank-track { flex: 1; height: 9px; background: var(--line); border-radius: 6px; overflow: hidden; }
.rank-fill { height: 100%; background: var(--ink-soft); border-radius: 6px; }
.rank-fill.win { background: var(--brand); }
.rank-row .rv { width: 34px; text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-soft); }
/* Personas with no evidence right now recede, so the real blend stands out. */
.rank-row.zero { opacity: .42; }
.rank-row.zero .rl svg { color: var(--ink-soft); }

/* suitability checks */
.check { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; border-bottom: 1px solid var(--line); }
.check:last-child { border-bottom: none; }
.check .ci { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; color: #fff; flex-shrink: 0; margin-top: 1px; }
.ci.pass { background: var(--good); }
.ci.fail { background: var(--bad); }
.check .cl { font-weight: 700; font-size: 12.5px; }
.check .cn { font-size: 11.5px; color: var(--ink-soft); }

.gate-flag { display: inline-flex; gap: 6px; align-items: center; font-size: 12px; font-weight: 700; padding: 5px 11px; border-radius: 999px; }
.gate-flag.ok { background: var(--good-tint); color: var(--good); }
.gate-flag.no { background: var(--warn-tint); color: var(--warn); }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chip { font-size: 11px; background: var(--card-2); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; color: var(--ink-soft); font-weight: 600; }

/* persona detail */
.pd-head { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.pd-head .pe { font-size: 30px; }
.pd-head .pn { font-weight: 800; font-size: 16px; }
.pd-head .pb { font-size: 12px; color: var(--ink-soft); }
.quote { font-style: italic; color: var(--ink); background: var(--brand-tint); border-left: 3px solid var(--brand); padding: 10px 13px; border-radius: 0 10px 10px 0; font-size: 12.5px; margin: 12px 0; }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 6px 10px; font-size: 12px; margin-top: 4px; }
.kv .k { color: var(--ink-soft); font-weight: 600; }
.combo { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-top: 10px; }
.combo .cx { background: var(--card-2); border: 1px solid var(--line); border-radius: 11px; padding: 9px; }
.combo .cx b { color: var(--brand); font-size: 12px; }
.combo .cx p { font-size: 11px; color: var(--ink-soft); margin: 4px 0 0; }

/* journey */
.jtable { width: 100%; border-collapse: collapse; font-size: 11.5px; margin-top: 8px; }
.jtable th { text-align: left; color: var(--ink-soft); font-size: 10px; text-transform: uppercase; letter-spacing: .04em; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.jtable td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.jtable .stg { font-weight: 700; }
.feel { display: inline-block; width: 22px; height: 22px; border-radius: 6px; text-align: center; line-height: 22px; font-weight: 700; color: #fff; font-size: 11px; }

/* matrix */
.mtx { width: 100%; border-collapse: collapse; font-size: 11px; }
.mtx th { padding: 6px 4px; font-size: 9.5px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .02em; border-bottom: 1px solid var(--line); vertical-align: bottom; }
.mtx td { padding: 7px 4px; text-align: center; border-bottom: 1px solid var(--line); }
.mtx td.pl { text-align: left; font-weight: 700; }
.dot { display: inline-block; width: 16px; height: 16px; border-radius: 50%; }
.dot.primary { background: var(--brand); }
.dot.support { background: rgba(200,16,46,.35); }
.dot.low { background: var(--line); }
.mtx tr.hl td { background: var(--brand-tint); }

.footer-note { font-size: 11px; color: var(--ink-soft); margin-top: 8px; line-height: 1.5; }
.theme-btn { position: fixed; top: 16px; right: 18px; z-index: 50; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; font-size: 12px; font-weight: 600; color: var(--ink); box-shadow: var(--shadow); }
.lang-btn { position: fixed; top: 16px; right: 104px; z-index: 50; background: var(--brand); color: #fff; border: none; border-radius: 999px; padding: 8px 15px; font-size: 13px; font-weight: 800; box-shadow: var(--shadow); min-width: 42px; }

.appmode-btn { position: fixed; top: 16px; right: 170px; z-index: 50; background: var(--ink); color: #fff; border: none; border-radius: 999px; padding: 8px 15px; font-size: 12px; font-weight: 700; box-shadow: var(--shadow); }
.app-exit { display: none; position: fixed; top: 10px; right: 12px; z-index: 60; background: rgba(0,0,0,.45); color: #fff; border: none; border-radius: 999px; padding: 7px 13px; font-size: 12px; font-weight: 700; }

/* ---------- App Mode: full-screen phone, demo harness hidden ---------- */
html[data-app] .panel,
html[data-app] #explain,
html[data-app] #dashboardView,
html[data-app] .theme-btn,
html[data-app] .lang-btn,
html[data-app] .appmode-btn { display: none !important; }
html[data-app] body { background: var(--navy); }
html[data-app] .layout { display: block; grid-template-columns: none; min-height: 100vh; }
html[data-app] .stage,
html[data-app] #customerView { display: block !important; padding: 0; margin: 0; }
html[data-app] .phone { position: static; width: min(100vw, 430px); margin: 0 auto; padding: 0; border-radius: 0; box-shadow: none; background: transparent; min-height: 100vh; }
html[data-app] .phone-screen { height: 100vh; height: 100dvh; border-radius: 0; }
html[data-app] .app-exit { display: inline-flex; align-items: center; }

/* ---------- RTL (Arabic) ---------- */
[dir="rtl"] body { font-family: 'Cairo', 'Inter', 'Segoe UI', Tahoma, sans-serif; }
[dir="rtl"] .seg-pills { margin-left: 0; margin-right: auto; }
[dir="rtl"] .gps-top .badge { margin-left: 0; margin-right: auto; }
[dir="rtl"] .io .io-amt { margin-left: 0; margin-right: auto; }
[dir="rtl"] .fn-fill { left: auto; right: 0; border-radius: 0 8px 8px 0; }
[dir="rtl"] .up-gain { border-left: none; border-right: 2px solid var(--card); }
[dir="rtl"] .fn-val { margin-left: 0; margin-right: auto; }
[dir="rtl"] .lang-btn { right: auto; left: 104px; }
[dir="rtl"] .theme-btn { right: auto; left: 18px; }
[dir="rtl"] .panel { border-right: none; border-left: 1px solid var(--line); }
[dir="rtl"] .why-box ul, [dir="rtl"] .kpi-help, [dir="rtl"] .dash-cap { text-align: right; }

/* ---------- View switch ---------- */
.view-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: var(--card-2); border: 1px solid var(--line); border-radius: 12px; padding: 4px; margin: 4px 0 4px; }
.vs-btn { border: none; background: transparent; color: var(--ink-soft); font-weight: 700; font-size: 12px; padding: 9px 6px; border-radius: 9px; transition: .15s; }
.vs-btn.active { background: var(--brand); color: #fff; box-shadow: 0 2px 8px rgba(250,100,40,.3); }

/* ---------- Dashboard ---------- */
.dash { padding: 26px 28px 60px; max-width: 1100px; }
.dash-hero { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  margin-bottom: 18px; flex-wrap: wrap; overflow: hidden; color: #fff; border-radius: 20px; padding: 20px 22px;
  background: linear-gradient(120deg, var(--teal-light), var(--teal) 55%, var(--teal-dark)); box-shadow: 0 10px 24px rgba(78,158,149,.28); }
.dash-hero .dh-txt { position: relative; }
.dash-hero .dh-eyebrow { font-size: 11.5px; font-weight: 700; opacity: .9; letter-spacing: .03em; }
.dash-hero h2 { font-size: 22px; margin: 3px 0 4px; }
.dash-hero p { font-size: 12.5px; opacity: .92; margin: 0; }
.dash-total { position: relative; text-align: right; background: rgba(0,0,0,.16); border-radius: 14px; padding: 10px 16px; }
.dash-total b { display: block; font-size: 24px; font-weight: 800; line-height: 1; }
.dash-total span { font-size: 11px; opacity: .9; }

/* app-style squircle icon tile (wave-textured, like the real app grid) */
.app-tile { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 17px; flex-shrink: 0; color: #fff; position: relative; overflow: hidden; }
.app-tile.t-orange { background: linear-gradient(135deg, var(--brand-light), var(--brand-dark)); }
.app-tile.t-teal   { background: linear-gradient(135deg, var(--teal-light), var(--teal-dark)); }
.app-tile.t-taupe  { background: linear-gradient(135deg, #bcae9f, var(--taupe)); }
.kpi-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }

.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
@media (max-width: 860px) { .kpi-row { grid-template-columns: 1fr 1fr; } }
.kpi-tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 16px 14px; }
.kpi-label { font-size: 11.5px; color: var(--ink-soft); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.kpi-value { font-size: 32px; font-weight: 800; letter-spacing: -0.02em; margin: 6px 0 10px; color: var(--ink); }
.kpi-meter { position: relative; height: 8px; background: var(--line); border-radius: 6px; overflow: visible; }
.kpi-fill { height: 100%; border-radius: 6px; }
.kpi-fill.ok { background: var(--good); }
.kpi-fill.under { background: var(--warn); }
.kpi-target { position: absolute; top: -2px; width: 2px; height: 12px; background: var(--ink); opacity: .5; border-radius: 2px; }
.kpi-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 9px; font-size: 10.5px; color: var(--ink-soft); }
.tag { font-weight: 700; padding: 2px 7px; border-radius: 6px; font-size: 10px; }
.tag-ok { background: var(--good-tint); color: var(--good); }
.tag-warn { background: var(--warn-tint); color: var(--warn); }
.kpi-help { font-size: 10.5px; color: var(--ink-soft); margin-top: 9px; line-height: 1.4; }

.dash-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
@media (max-width: 860px) { .dash-2col { grid-template-columns: 1fr; } }
.dash-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; margin-bottom: 18px; }
.dash-card h3 { font-size: 14px; }
.dash-cap { font-size: 11.5px; color: var(--ink-soft); margin: 4px 0 14px; }

/* funnel */
.funnel { display: grid; gap: 11px; }
.fn-row { display: grid; grid-template-columns: 1fr; gap: 4px; }
.fn-label { font-size: 12px; font-weight: 600; }
.fn-bar { position: relative; height: 26px; background: var(--card-2); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; display: flex; align-items: center; }
.fn-fill { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, var(--brand-light), var(--brand)); border-radius: 8px 0 0 8px; }
.fn-val { position: relative; margin-left: auto; padding-right: 10px; font-size: 11.5px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink); }
.fn-pct { display: none; }

/* uplift */
.uplift { display: grid; gap: 9px; }
.up-row { display: grid; grid-template-columns: 120px 1fr 62px; gap: 10px; align-items: center; }
.up-row.sel .up-label { font-weight: 800; color: var(--brand); }
.up-label { font-size: 11.5px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-track { height: 16px; background: var(--card-2); border: 1px solid var(--line); border-radius: 7px; overflow: hidden; display: flex; }
.up-base { height: 100%; background: var(--ink-soft); opacity: .55; }
.up-gain { height: 100%; background: var(--good); border-left: 2px solid var(--card); }
.up-val { font-size: 11.5px; font-variant-numeric: tabular-nums; color: var(--ink-soft); text-align: right; }
.up-val b { color: var(--good); }
.lg { display: inline-block; width: 9px; height: 9px; border-radius: 3px; vertical-align: middle; }
.lg-base { background: var(--ink-soft); opacity: .55; }
.lg-gain { background: var(--good); }

/* cohort table */
.ct { width: 100%; border-collapse: collapse; font-size: 12px; }
.ct th { text-align: right; font-size: 10px; text-transform: uppercase; letter-spacing: .03em; color: var(--ink-soft); padding: 7px 8px; border-bottom: 1px solid var(--line); }
.ct th:first-child { text-align: left; }
.ct td { text-align: right; padding: 9px 8px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.ct td.ct-p { text-align: left; font-weight: 700; }
.ct tr.sel td { background: var(--brand-tint); }
.ct tbody tr:last-child td { border-bottom: none; }

/* integrity */
.integ { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 860px) { .integ { grid-template-columns: 1fr 1fr; } }
.ig { background: var(--card-2); border: 1px solid var(--line); border-radius: 13px; padding: 13px; }
.ig .app-tile { margin-bottom: 9px; }
.ig-v { font-size: 24px; font-weight: 800; color: var(--good); }
.ig-l { font-size: 11px; color: var(--ink-soft); margin-top: 5px; line-height: 1.35; }

/* =============================================================================
   ✦ FUTURISTIC DESIGN LAYER — sleek · animated · glassmorphic
   Layered on top of the Bank al Etihad brand system. Honours reduced-motion.
   ============================================================================= */
:root{
  --ease-out: cubic-bezier(.22,1,.36,1);
  --ease-smooth: cubic-bezier(.4,0,.2,1);
  --glass-blur: 14px;
  --glow-brand: 0 0 0 1px rgba(250,100,40,.16), 0 14px 34px -12px rgba(250,100,40,.55);
  --glow-teal:  0 0 0 1px rgba(78,158,149,.18), 0 14px 34px -12px rgba(78,158,149,.50);
}

/* ---- animated aurora backdrop (glows behind the phone & cards) ---- */
body::before{
  content:''; position:fixed; inset:0; z-index:0; pointer-events:none;
  opacity:.5; filter:blur(70px);
  background:
    radial-gradient(38% 50% at 18% 18%, rgba(250,100,40,.30), transparent 70%),
    radial-gradient(36% 46% at 86% 12%, rgba(78,158,149,.28), transparent 70%),
    radial-gradient(44% 56% at 62% 85%, rgba(255,154,90,.20), transparent 72%);
  animation: aurora 20s var(--ease-smooth) infinite alternate;
}
.layout{ position:relative; z-index:1; }
@keyframes aurora{
  0%{ transform:translate3d(0,0,0) scale(1); }
  50%{ transform:translate3d(2.5%,3%,0) scale(1.1); }
  100%{ transform:translate3d(-2%,-1.5%,0) scale(1.05); }
}

/* ---- smooth theme / colour transitions everywhere ---- */
body,.panel,.phone-screen,.app-scroll,.card,.xcard,.kpi-tile,.dash-card{
  transition: background-color .45s var(--ease-smooth), color .4s var(--ease-smooth), border-color .4s;
}

/* ---- glassmorphic cards with lift + glow on hover ---- */
.wb-card,.sugg,.mini,.goal2,.xcard,.kpi-tile,.dash-card,.ig{
  background: color-mix(in srgb, var(--card) 80%, transparent);
  backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  transition: transform .32s var(--ease-out), box-shadow .32s var(--ease-out), border-color .32s;
}
.sugg:hover,.goal2:hover,.wb-card:hover,.xcard:hover,.kpi-tile:hover,.dash-card:hover{
  transform: translateY(-3px);
  box-shadow: 0 20px 44px -18px rgba(40,45,60,.4);
  border-color: color-mix(in srgb, var(--brand) 32%, var(--line));
}

/* ---- tactile micro-interactions ---- */
.hubtile,.scr-row,.tx2,.persona-btn,.qr-btn,.sugg-cta,.vs-btn,.tabbar .tab,.top-ico[data-nav],.see-all,.fchip,.back-btn{
  transition: transform .18s var(--ease-out), background-color .2s, color .2s, box-shadow .2s;
}
.hubtile:active,.scr-row:active,.tx2:active,.qr-btn:active,.sugg-cta:active,.see-all:active,.back-btn:active{ transform: scale(.955); }
.scr-row:hover{ background: color-mix(in srgb, var(--brand) 6%, var(--card)); }
.tx2:hover{ background: color-mix(in srgb, var(--brand) 5%, transparent); }

/* ---- app icon tiles: glow, lift, light sweep ---- */
.app-tile{ transition: transform .26s var(--ease-out), box-shadow .26s var(--ease-out); }
.hubtile:hover .app-tile{ transform: translateY(-3px) scale(1.04); box-shadow: var(--glow-brand); }
.app-tile.t-teal{ }
.hubtile:hover .app-tile.t-teal{ box-shadow: var(--glow-teal); }
.app-tile::after{
  content:''; position:absolute; top:0; left:0; width:55%; height:100%;
  background:linear-gradient(100deg, transparent, rgba(255,255,255,.45), transparent);
  transform:translateX(-160%) skewX(-18deg);
}
.hubtile:hover .app-tile::after{ animation: sheen 1.1s var(--ease-out); }

/* ---- animated-gradient brand surfaces ---- */
.logo,.qr-btn,.lang-btn,.vs-btn.active{
  background-size: 220% 220%;
  animation: gradientShift 8s ease infinite;
}
.qr-btn{
  background-image: linear-gradient(135deg, var(--brand-light), var(--brand) 55%, var(--brand-dark));
  box-shadow: var(--glow-brand); position: relative; overflow: hidden;
}
.qr-btn::before{
  content:''; position:absolute; top:0; left:0; width:60%; height:100%;
  background:linear-gradient(100deg, transparent, rgba(255,255,255,.35), transparent);
  transform:translateX(-140%) skewX(-20deg); animation: sheen 4.5s ease-in-out 1.5s infinite;
}
@keyframes gradientShift{ 0%{background-position:0% 50%;} 50%{background-position:100% 50%;} 100%{background-position:0% 50%;} }
@keyframes sheen{ from{transform:translateX(-160%) skewX(-18deg);} to{transform:translateX(240%) skewX(-18deg);} }

/* ---- holographic bank card: moving gradient, float, light sweep ---- */
.bankcard{
  background-size: 200% 200% !important; overflow: hidden;
  animation: gradientShift 11s ease infinite, floatY 6s ease-in-out infinite;
  box-shadow: 0 18px 40px -14px rgba(250,100,40,.5), 0 0 0 1px rgba(255,255,255,.08) inset;
}
.bankcard::after{
  content:''; position:absolute; top:0; left:0; width:55%; height:100%;
  background:linear-gradient(100deg, transparent, rgba(255,255,255,.4), transparent);
  transform:translateX(-140%) skewX(-20deg); animation: sheen 6s ease-in-out infinite;
}
@keyframes floatY{ 0%,100%{ transform:translateY(0); } 50%{ transform:translateY(-5px); } }

/* ---- progress bars: grow-in + travelling shimmer ---- */
.goal2-bar div,.kpi-fill,.fn-fill,.rank-fill,.up-gain{
  transform-origin: left center; animation: growBar .9s var(--ease-out) both;
  position: relative; overflow: hidden;
}
.goal2-bar div::after,.kpi-fill::after,.fn-fill::after{
  content:''; position:absolute; inset:0;
  background:linear-gradient(90deg, transparent, rgba(255,255,255,.45), transparent);
  transform:translateX(-100%); animation: barSheen 2.4s ease-in-out .6s infinite;
}
@keyframes growBar{ from{ transform:scaleX(0); } to{ transform:scaleX(1); } }
@keyframes barSheen{ 0%{transform:translateX(-100%);} 60%,100%{transform:translateX(100%);} }
[dir="rtl"] .goal2-bar div,[dir="rtl"] .rank-fill{ transform-origin: right center; }

/* ---- wellbeing ring glow + bars grow up ---- */
.wb-ring{ filter: drop-shadow(0 0 7px rgba(250,100,40,.35)); }
.wb-seg span{ transform-origin: bottom; animation: growY .7s var(--ease-out) both; }
@keyframes growY{ from{ transform:scaleY(0); } to{ transform:scaleY(1); } }

/* ---- tab bar: glowing active icon ---- */
.tabbar .tab.on .ti{ transform: translateY(-2px); filter: drop-shadow(0 5px 9px rgba(250,100,40,.45)); transition: .22s var(--ease-out); }

/* ---- premium phone frame: soft neon halo ---- */
.phone{ box-shadow: var(--shadow), 0 34px 70px -24px rgba(250,100,40,.28), 0 0 0 1px rgba(255,255,255,.04); }

/* ---- floating top controls: glass + hover glow ---- */
.theme-btn,.appmode-btn{ backdrop-filter: blur(10px); transition: transform .2s var(--ease-out), box-shadow .2s; }
.theme-btn:hover,.appmode-btn:hover,.lang-btn:hover{ transform: translateY(-2px); box-shadow: var(--glow-brand); }

/* ---- persona chooser: glow on hover/active ---- */
.persona-btn{ transition: transform .18s var(--ease-out), border-color .2s, box-shadow .2s, background-color .2s; }
.persona-btn:hover{ box-shadow: 0 8px 20px -10px rgba(250,100,40,.5); }
.persona-btn.active{ box-shadow: 0 0 0 1px var(--brand) inset, 0 8px 22px -10px rgba(250,100,40,.55); }

/* ---- screen & card entrance animations ---- */
#phone > *{ animation: scrIn .42s var(--ease-out) both; }
@keyframes scrIn{ from{ opacity:0; transform:translateY(12px) scale(.994); } to{ opacity:1; transform:none; } }
#explain > *{ animation: scrIn .5s var(--ease-out) both; }
#explain > *:nth-child(2){ animation-delay:.06s; }
#explain > *:nth-child(3){ animation-delay:.12s; }
#explain > *:nth-child(4){ animation-delay:.18s; }

/* staggered list items inside a screen */
.hub-grid .hubtile,.tx-list .tx2,.scr-list .scr-row,.app-scroll .goal2,.app-scroll .sugg{
  animation: itemIn .46s var(--ease-out) both;
}
@keyframes itemIn{ from{ opacity:0; transform:translateY(9px); } to{ opacity:1; transform:none; } }
.hub-grid .hubtile:nth-child(2),.tx-list .tx2:nth-child(2),.scr-list .scr-row:nth-child(2),.app-scroll .goal2:nth-child(2),.app-scroll .sugg:nth-child(2){ animation-delay:.04s; }
.hub-grid .hubtile:nth-child(3),.tx-list .tx2:nth-child(3),.scr-list .scr-row:nth-child(3),.app-scroll .goal2:nth-child(3),.app-scroll .sugg:nth-child(3){ animation-delay:.08s; }
.hub-grid .hubtile:nth-child(4),.tx-list .tx2:nth-child(4),.scr-list .scr-row:nth-child(4){ animation-delay:.12s; }
.hub-grid .hubtile:nth-child(5),.tx-list .tx2:nth-child(5),.scr-list .scr-row:nth-child(5){ animation-delay:.16s; }
.hub-grid .hubtile:nth-child(6),.tx-list .tx2:nth-child(6),.scr-list .scr-row:nth-child(6){ animation-delay:.2s; }

/* ---- richer dark surfaces for the futuristic feel ---- */
:root[data-theme="dark"] body,
:root:not([data-theme="light"]) body{ }
@media (prefers-color-scheme: dark){ :root:not([data-theme="light"]){ --bg:#0e0d12; --card:#17161c; --card-2:#201e27; } }
:root[data-theme="dark"]{ --bg:#0e0d12; --card:#17161c; --card-2:#201e27; }

/* ---- respect reduced motion ---- */
@media (prefers-reduced-motion: reduce){
  *, *::before, *::after{
    animation-duration:.001ms !important; animation-iteration-count:1 !important;
    transition-duration:.01ms !important;
  }
  body::before{ animation:none; }
}

/* ============================================================================
   App / Console split — standalone Application page + Console cross-links
   ============================================================================ */
.solo-stage { position: relative; z-index: 1; min-height: 100vh; display: flex;
  flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 40px 16px; }
.solo-stage .phone { position: static; top: auto; }
.solo-note { font-size: 12px; font-weight: 600; letter-spacing: .03em; color: var(--ink-soft); margin: 0; }
.solo-link { font-size: 12.5px; font-weight: 700; color: var(--brand); text-decoration: none;
  border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 8px 14px;
  box-shadow: var(--shadow); transition: transform .18s var(--ease-out), box-shadow .18s; }
.solo-link:hover { transform: translateY(-1px); box-shadow: var(--glow-brand); }

.mirror-link { display: inline-flex; align-items: center; gap: 5px; margin: 16px 0 6px;
  font-size: 12.5px; font-weight: 700; color: var(--brand); text-decoration: none;
  border: 1px solid var(--line); background: var(--card-2); border-radius: 999px; padding: 8px 13px;
  transition: transform .18s var(--ease-out), box-shadow .18s; }
.mirror-link:hover { transform: translateY(-1px); box-shadow: var(--glow-brand); }
.mirror-note { font-size: 11.5px; color: var(--ink-soft); margin: 0 0 4px; line-height: 1.5; }

/* Application page — Bank al Etihad branded header */
.solo-brand { display: flex; align-items: center; gap: 12px; }
.solo-logo { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center;
  font-family: 'Cairo', sans-serif; font-weight: 800; font-size: 25px; color: #fff;
  background: linear-gradient(135deg, var(--brand), #ff8f63);
  box-shadow: 0 12px 26px -8px rgba(250,100,40,.6), inset 0 1px 0 rgba(255,255,255,.3); }
.solo-brand-txt { text-align: left; }
html[dir="rtl"] .solo-brand-txt { text-align: right; }
.solo-brand-name { font-size: 17px; font-weight: 800; color: var(--ink); letter-spacing: -.01em; line-height: 1.1; }
.solo-brand-sub { font-size: 12px; font-weight: 600; color: var(--ink-soft); margin-top: 2px; }
.solo-link:hover { background: var(--brand); color: #fff; border-color: var(--brand); }

/* ---------- Inline SVG icon integration ---------- */
.svg-ic, .emoji-fallback { display: inline-block; vertical-align: middle; }
.app-tile .svg-ic { color: #fff; }
.qa-ic { color: var(--brand); display: block; }
.io .io-ic.in  { color: var(--teal);  border-color: var(--teal); }
.io .io-ic.out { color: var(--brand); border-color: var(--brand); }
.notif-ic.good .svg-ic   { color: #0E8F5E; }
.notif-ic.teal .svg-ic   { color: var(--teal); }
.notif-ic.orange .svg-ic { color: var(--brand); }
.nav-ico .svg-ic { color: var(--brand); }
.scr-ic { color: var(--ink); }
.tabbar .tab .ti { line-height: 0; }
.bc-hide .svg-ic { vertical-align: -2px; }

/* ---------- Console: single integrated cockpit ---------- */
.console-main { position: relative; z-index: 1; min-width: 0; }
.console-sec { }
.console-sec + .console-sec { border-top: 1px dashed var(--line); }
.console-sec-h { font-size: 15px; font-weight: 800; color: var(--ink); letter-spacing: -.01em;
  padding: 22px 28px 2px; border-left: 3px solid var(--brand); margin: 10px 0 0 25px; }
html[dir="rtl"] .console-sec-h { border-left: none; border-right: 3px solid var(--brand); margin: 10px 25px 0 0; }
.console-main .dash { max-width: none; }

/* ---- Bank impact card ---- */
.bi-card h3 { color: var(--ink); }
.bi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
@media (max-width: 900px) { .bi-grid { grid-template-columns: repeat(2, 1fr); } }
.bi-tile { background: var(--card-2); border: 1px solid var(--line); border-radius: 14px; padding: 13px 14px; }
.bi-v { font-size: 22px; font-weight: 800; letter-spacing: -.02em; line-height: 1.05; }
.bi-v.teal { color: var(--teal); }
.bi-v.orange { color: var(--brand); }
.bi-l { font-size: 11.5px; font-weight: 600; color: var(--ink); margin-top: 4px; line-height: 1.25; }
.bi-s { font-size: 10.5px; color: var(--ink-soft); margin-top: 2px; }
.bi-byp { border-top: 1px solid var(--line); padding-top: 14px; }
.bi-byp-h { font-size: 12.5px; font-weight: 700; color: var(--ink); margin-bottom: 10px; }
.bi-row { display: grid; grid-template-columns: 150px 1fr 46px; align-items: center; gap: 10px; padding: 3px 0; }
.bi-row.sel .bi-row-l { color: var(--brand); font-weight: 700; }
.bi-row-l { font-size: 12px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bi-row-bar { height: 9px; background: var(--card-2); border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.bi-row-fill { height: 100%; background: linear-gradient(90deg, var(--teal), var(--brand)); border-radius: 999px; }
.bi-row.sel .bi-row-fill { background: var(--brand); }
.bi-row-v { font-size: 12px; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; color: var(--ink); }
html[dir="rtl"] .bi-row-v { text-align: left; }

/* ---------- Knowledge Hub (console) ---------- */
.kh-cat { margin-top: 16px; }
.kh-cat-h { font-size: 13px; font-weight: 800; color: var(--ink); margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.kh-count { font-size: 11px; font-weight: 700; color: var(--ink-soft); background: var(--card-2); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; }
.kh-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 1100px) { .kh-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 680px)  { .kh-grid { grid-template-columns: 1fr; } }
.kh-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 13px; position: relative;
  transition: transform .18s var(--ease-out), box-shadow .18s, border-color .18s; }
.kh-card.on { border-color: var(--brand); background: var(--brand-tint); box-shadow: var(--glow-brand); }
.kh-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.kh-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: var(--teal);
  background: rgba(78,158,149,.12); }
.kh-ic.on { color: var(--brand); background: rgba(250,100,40,.14); }
.kh-tag { font-size: 10px; font-weight: 800; padding: 2px 9px; border-radius: 999px; letter-spacing: .02em; }
.kh-growth, .kh-wealth, .kh-protect { background: rgba(78,158,149,.15); color: var(--teal); }
.kh-tool { background: var(--card-2); color: var(--ink-soft); border: 1px solid var(--line); }
.kh-credit { background: var(--brand-tint); color: var(--brand); }
.kh-advisory { background: rgba(188,174,159,.22); color: #8a7259; }
.kh-n { font-size: 13.5px; font-weight: 800; color: var(--ink); letter-spacing: -.01em; }
.kh-b { font-size: 11.5px; color: var(--ink-soft); line-height: 1.45; margin: 3px 0 8px; }
.kh-who { font-size: 13px; letter-spacing: 1px; opacity: .85; }
.kh-badge { margin-top: 9px; font-size: 11px; font-weight: 700; color: var(--brand); }
.kh-badge.held { color: var(--ink-soft); font-weight: 600; }

/* ---------- "More for you" product strip (app home) ---------- */
.fy-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.fy-row { display: flex; align-items: center; gap: 11px; background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 11px 12px; box-shadow: var(--shadow); }
.fy-m { min-width: 0; flex: 1; }
.fy-n { font-size: 13px; font-weight: 700; color: var(--ink); }
.fy-b { font-size: 11px; color: var(--ink-soft); line-height: 1.35; margin-top: 1px; }
.fy-ch { color: var(--ink-soft); font-size: 18px; flex-shrink: 0; }

/* ============================================================================
   CONSOLE REDESIGN v10 — section headers w/ SVG icon, 2-col reasoning,
   plain-language decision panel. (ASCII-only: safe to append.)
   ============================================================================ */

/* ---- section header: accent bar + inline SVG icon + label ---- */
.console-sec-h {
  display: flex; align-items: center; gap: 9px;
  padding: 22px 28px 12px; margin: 10px 0 0 0; border-left: none;
}
html[dir="rtl"] .console-sec-h { border-right: none; margin: 10px 0 0 0; padding: 22px 28px 12px; }
.console-sec-h::before {
  content: ''; width: 4px; height: 20px; border-radius: 999px; flex-shrink: 0;
  background: linear-gradient(180deg, var(--brand), var(--teal));
}
.console-sec-h svg { color: var(--brand); flex-shrink: 0; }

/* ---- reasoning: 2-up grid; wide table cards span the full row ---- */
.console-main .explain-col {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px; align-items: start;
}
.console-main .explain-col > .xcard:nth-child(5),
.console-main .explain-col > .xcard:nth-child(6) { grid-column: 1 / -1; }
.console-main .xcard { overflow-x: auto; }
@media (max-width: 900px) {
  .console-main .explain-col { grid-template-columns: 1fr; }
  .console-main .explain-col > .xcard { grid-column: auto; }
}

/* ---- decision panel: what the agent decided, in plain language ---- */
.dz-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px 22px;
}
.dz-hero { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.dz-emoji {
  width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center;
  font-size: 26px; flex-shrink: 0; color: #fff;
  background: linear-gradient(135deg, var(--brand), #ff8f63);
  box-shadow: 0 12px 26px -10px rgba(250,100,40,.55);
}
.dz-emoji svg { color: #fff; }
.dz-id { flex: 1; min-width: 160px; }
.dz-name { font-size: 20px; font-weight: 800; color: var(--ink); letter-spacing: -.015em; line-height: 1.1; }
.dz-sub { font-size: 12.5px; color: var(--ink-soft); margin-top: 3px; line-height: 1.4; }
.dz-stats { display: flex; gap: 10px; }
.dz-stat {
  text-align: center; background: var(--card-2); border: 1px solid var(--line);
  border-radius: 13px; padding: 9px 15px; min-width: 70px;
}
.dz-stat b { display: block; font-size: 21px; font-weight: 800; line-height: 1; letter-spacing: -.02em; }
.dz-stat span { display: block; font-size: 10px; font-weight: 600; color: var(--ink-soft); margin-top: 4px; text-transform: uppercase; letter-spacing: .04em; }
.dz-read { font-size: 14.5px; color: var(--ink); line-height: 1.55; margin: 15px 2px 2px; }

.dz-flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 16px 0 2px; }
@media (max-width: 760px) { .dz-flow { grid-template-columns: repeat(2, 1fr); } }
.dz-step {
  display: flex; align-items: center; gap: 11px; background: var(--card-2);
  border: 1px solid var(--line); border-radius: 14px; padding: 11px 13px; position: relative;
}
.dz-step-ic {
  width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; flex-shrink: 0;
  color: var(--teal); background: color-mix(in srgb, var(--teal) 14%, transparent);
}
.dz-step.muted .dz-step-ic { color: var(--ink-soft); background: var(--card); }
.dz-step-b { min-width: 0; }
.dz-step-t { font-size: 10px; font-weight: 700; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .05em; }
.dz-step-v { font-size: 13px; font-weight: 700; color: var(--ink); margin-top: 2px; line-height: 1.2; }
.dz-pill { display: inline-block; font-size: 11px; font-weight: 800; padding: 2px 9px; border-radius: 999px; margin-top: 2px; }
.dz-pill.ok { background: color-mix(in srgb, var(--good) 16%, transparent); color: var(--good); }
.dz-pill.no { background: color-mix(in srgb, var(--brand) 16%, transparent); color: var(--brand); }

.dz-out { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
@media (max-width: 760px) { .dz-out { grid-template-columns: 1fr; } }
.dz-outbox {
  background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 9%, transparent), transparent);
  border: 1px solid var(--line); border-radius: 14px; padding: 13px 15px;
}
.dz-outbox.teal { background: linear-gradient(135deg, color-mix(in srgb, var(--teal) 11%, transparent), transparent); }
.dz-lbl { display: block; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--brand); }
.dz-outbox.teal .dz-lbl { color: var(--teal); }
.dz-val { display: block; font-size: 14.5px; font-weight: 700; color: var(--ink); margin-top: 5px; line-height: 1.35; }
.dz-muted { color: var(--ink-soft); font-weight: 600; }
.dz-paused { text-align: left; font-size: 13px; color: var(--ink-soft); line-height: 1.5; }

/* ============================================================================
   APPLICATION COMPACT PASS v10 — sleeker phone home, tighter rhythm, shorter
   data density. Overrides earlier values (appended last = wins). ASCII-only.
   ============================================================================ */
.app-scroll { padding: 12px 13px 18px; }
.section-lbl { font-size: 11px; margin: 13px 2px 6px; letter-spacing: .06em; }

/* balance: a touch tighter, still the hero */
.balance-card { padding: 15px 16px 16px; border-radius: 18px; }
.balance-card .bc-amt { font-size: 28px; margin: 2px 0 7px; }
.balance-card .bc-amt .cur, .balance-card .bc-amt .fils { font-size: 18px; }
.balance-card .bc-hide { padding: 6px 12px; font-size: 11.5px; }

/* wellbeing + suggestion + goal cards: trim padding & gaps */
.wb-card { padding: 12px 14px; margin-top: 10px; gap: 13px; }
.sugg { padding: 11px; margin-bottom: 9px; gap: 10px; }
.sugg-cta { margin-top: 8px; padding: 6px 11px; }
.goal2 { padding: 13px; margin-bottom: 10px; }
.goal2-bar { margin: 8px 0 6px; height: 9px; }

/* mini stat cards (spending bars): denser */
.mini { padding: 11px 12px; margin-bottom: 10px; }
.mini h4 { margin-bottom: 7px; }
.bar-row { margin-bottom: 5px; }
.txn { padding: 5px 0; }

/* lists: tighter rows, slightly smaller leading icons */
.scr-row { padding: 13px 16px; gap: 12px; }
.tx2 { padding: 10px 14px; gap: 11px; }
.tx2-ic { width: 34px; height: 34px; }
.qa-row { margin-top: 10px; }
.qa { padding: 9px 4px; }

/* hub tiles: a hair smaller so the grid breathes */
.hubtile .app-tile { width: 50px; height: 50px; border-radius: 14px; font-size: 22px; }
.hubtile-l { margin-top: 5px; }

/* ============================================================================
   v10 SVG + REARRANGE PASS — persona icon chips, wellbeing persona + report
   link, full wellbeing report screen, console icon polish. ASCII-only.
   ============================================================================ */

/* chrome buttons w/ inline svg */
.theme-btn { display: inline-flex; align-items: center; gap: 6px; }
.theme-btn svg { color: currentColor; }

/* persona chooser: icon in a rounded brand chip */
.persona-btn .emoji {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  background: var(--brand-tint); color: var(--brand); margin-bottom: 3px;
}
.persona-btn .emoji svg { color: var(--brand); }
.persona-btn.active .emoji { background: var(--brand); color: #fff; }
.persona-btn.active .emoji svg { color: #fff; }

/* console reasoning: persona glyph -> brand-coloured svg */
.rank-row .rl svg { color: var(--brand); }
.mtx td.pl svg { color: var(--brand); vertical-align: middle; }
.mtx td.pl { white-space: nowrap; }
.pd-head .pe {
  width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center;
  background: var(--brand-tint); color: var(--brand); font-size: 0;
}
.pd-head .pe svg { color: var(--brand); }
.gps-top .badge { display: inline-flex; align-items: center; gap: 4px; }
.gps-top .badge svg { color: #fff; }
.kh-who { display: flex; flex-wrap: wrap; gap: 3px; align-items: center; }
.kh-who svg { color: var(--ink-soft); }
.blocked-note svg { color: var(--brand); vertical-align: middle; }

/* home wellbeing card: persona chip + bottom-right report link */
.wb-card { position: relative; }
.wb-persona {
  display: inline-flex; align-items: center; gap: 5px; margin-top: 6px;
  font-size: 11.5px; font-weight: 700; color: var(--brand);
  background: var(--brand-tint);
  border: 1px solid color-mix(in srgb, var(--brand) 22%, var(--line));
  border-radius: 999px; padding: 2px 10px 2px 7px;
}
.wb-persona svg { color: var(--brand); }
.wb-more {
  position: absolute; right: 12px; bottom: 10px; border: none; background: transparent;
  color: var(--brand); font-weight: 700; font-size: 11px; cursor: pointer; padding: 3px 4px;
}
html[dir="rtl"] .wb-more { right: auto; left: 12px; }
.wb-more:hover { text-decoration: underline; }

/* full wellbeing report screen */
.wbp-pad { padding: 14px 14px 22px; }
.wbp-hero {
  display: flex; align-items: center; gap: 12px; background: var(--card);
  border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 13px 14px;
}
.wbp-ic {
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; flex-shrink: 0;
  color: #fff; background: linear-gradient(135deg, var(--brand), #ff8f63);
  box-shadow: 0 10px 22px -10px rgba(250,100,40,.55);
}
.wbp-ic svg { color: #fff; }
.wbp-id { flex: 1; min-width: 0; }
.wbp-n { font-size: 17px; font-weight: 800; color: var(--ink); letter-spacing: -.01em; }
.wbp-s { font-size: 12px; color: var(--ink-soft); margin-top: 2px; line-height: 1.35; }
.wbp-conf { text-align: center; background: var(--card-2); border: 1px solid var(--line); border-radius: 12px; padding: 6px 11px; flex-shrink: 0; }
.wbp-conf b { display: block; font-size: 16px; font-weight: 800; color: var(--brand); line-height: 1; }
.wbp-conf span { font-size: 9px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .04em; }
.wbp-note { font-size: 12px; color: var(--ink-soft); line-height: 1.5; margin: 12px 3px; }

.wbr-card { display: flex; align-items: center; gap: 16px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 16px; }
.wbr-side { flex: 1; min-width: 0; }
.wbr-band { font-size: 22px; font-weight: 800; line-height: 1.1; }
.wbr-lbl { font-size: 10.5px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .05em; margin-top: 2px; }
.wbr-opp { font-size: 12.5px; color: var(--ink-soft); margin-top: 9px; }
.wbr-opp b { color: var(--ink); }

.wbb-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.wbb-l { width: 118px; font-size: 12px; color: var(--ink); flex-shrink: 0; display: flex; align-items: center; gap: 6px; }
.wbb-row.weak .wbb-l { color: var(--brand); font-weight: 700; }
.wbb-tag { font-size: 8.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; color: var(--brand); background: var(--brand-tint); border-radius: 999px; padding: 1px 6px; }
.wbb-track { flex: 1; height: 8px; background: var(--card-2); border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.wbb-fill { display: block; height: 100%; border-radius: 999px; }
.wbb-v { width: 26px; text-align: right; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink); }
html[dir="rtl"] .wbb-v { text-align: left; }

.wbg-row { display: flex; gap: 9px; align-items: flex-start; font-size: 12.5px; color: var(--ink); line-height: 1.45; padding: 5px 0; }
.wbg-dot { color: var(--brand); flex-shrink: 0; margin-top: 1px; }

/* ============================================================================
   v12 CONSOLE REARRANGE — dashboard-first, staggered entrance, smoother bars.
   ============================================================================ */
.console-sec { animation: secIn .5s var(--ease-out) both; animation-delay: calc(var(--i, 0) * .09s); }
@keyframes secIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* dashboard: smoother value changes + aligned tiles */
.bi-row-fill { transition: width .6s var(--ease-out); }
.bar-fill, .rank-fill, .goal-meter .gf, .gf { transition: width .55s var(--ease-out); }
.bi-grid { align-items: stretch; }
.bi-tile { display: flex; flex-direction: column; justify-content: center; }

/* the first section (dashboard) gets a touch more presence */
.console-sec:first-child .console-sec-h { padding-top: 16px; }

@media (prefers-reduced-motion: reduce) {
  .console-sec { animation: none; }
  .bi-row-fill, .bar-fill, .rank-fill, .gf { transition: none; }
}

/* ============================================================================
   v12 CONSENT — in-app consent card (persona icon) + "guidance on" pill.
   ============================================================================ */
.consent-card { border: 1px solid color-mix(in srgb, var(--brand) 22%, var(--line)); }
.consent-persona {
  display: flex; align-items: center; gap: 10px; background: var(--brand-tint);
  border: 1px solid color-mix(in srgb, var(--brand) 20%, var(--line));
  border-radius: 13px; padding: 10px 12px; margin-bottom: 11px;
}
.consent-persona .cp-ic {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex-shrink: 0;
  color: #fff; background: linear-gradient(135deg, var(--brand), #ff8f63);
  box-shadow: 0 8px 18px -8px rgba(250,100,40,.6);
}
.consent-persona .cp-ic svg { color: #fff; }
.cp-n { font-size: 14px; font-weight: 800; color: var(--ink); }
.cp-s { font-size: 11px; color: var(--ink-soft); margin-top: 1px; line-height: 1.35; }
.consent-list { list-style: none; margin: 11px 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.consent-list li { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink); }
.consent-list li svg { color: var(--brand); flex-shrink: 0; }
.consent-foot { font-size: 10.5px; color: var(--ink-soft); text-align: center; margin-top: 9px; letter-spacing: .01em; }
.gps-consent {
  margin-left: 6px; display: inline-grid; place-items: center; width: 24px; height: 24px;
  border-radius: 8px; border: none; cursor: pointer; color: #0E8F5E;
  background: rgba(14,143,94,.16);
}
.gps-consent svg { color: #0E8F5E; }
html[dir="rtl"] .gps-consent { margin-left: 0; margin-right: 6px; }

/* ============================================================================
   v23 DASHBOARD AS CONTROL SURFACE — persona rows are clickable to select
   that persona across the whole console.
   ============================================================================ */
.bi-row[data-persona], .up-row[data-persona] {
  cursor: pointer; border-radius: 9px;
  padding-left: 7px; padding-right: 7px; margin-left: -7px; margin-right: -7px;
  transition: background .16s var(--ease-out);
}
.bi-row[data-persona]:hover, .up-row[data-persona]:hover {
  background: color-mix(in srgb, var(--brand) 9%, transparent);
}
.ct tbody tr[data-persona] { cursor: pointer; }
.ct tbody tr[data-persona]:hover td { background: color-mix(in srgb, var(--brand) 8%, transparent); }
.ct tbody tr[data-persona]:hover td:first-child { box-shadow: inset 3px 0 0 var(--brand); }

/* ============================================================================
   v22 CONSOLE COCKPIT — tighter aligned rhythm, cleaner section dividers,
   and a scroll-reveal system (sections + staggered cards + bars draw in).
   Dashboard stays first; the rest flow below on one gutter.
   ============================================================================ */

/* --- rhythm & alignment: one 28px gutter, lighter breathing room --- */
.console-main .dash { padding: 18px 28px 26px; max-width: 1180px; }
.console-sec-h { padding: 20px 28px 10px; margin: 0; }
.console-sec:first-child .console-sec-h { padding-top: 18px; }

/* cleaner section separation: a soft inset hairline instead of a dashed rule */
.console-sec + .console-sec { border-top: none; }
.console-sec { position: relative; }
.console-sec + .console-sec::before {
  content: ''; position: absolute; left: 28px; right: 28px; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--line) 14%, var(--line) 86%, transparent);
}

/* sleeker header accent */
.console-sec-h::before { height: 18px; width: 4px; }
.console-sec-h svg { opacity: .92; }

/* --- scroll reveal: sections rise as they enter view (.reveal added by JS, so
      content stays visible if JS never runs) --- */
.console-sec.reveal { opacity: 0; transform: translateY(18px); }
.console-sec.reveal.in {
  opacity: 1; transform: none;
  transition: opacity .6s var(--ease-out), transform .6s var(--ease-out);
}

/* staggered children inside a revealed section */
.console-sec.reveal #dashboard > *,
.console-sec.reveal #decision > *,
.console-sec.reveal .explain-col > *,
.console-sec.reveal #knowledgeHub .kh-cat { opacity: 0; transform: translateY(14px); }
.console-sec.reveal.in #dashboard > *,
.console-sec.reveal.in #decision > *,
.console-sec.reveal.in .explain-col > *,
.console-sec.reveal.in #knowledgeHub .kh-cat {
  opacity: 1; transform: none;
  transition: opacity .5s var(--ease-out), transform .5s var(--ease-out);
}
.console-sec.reveal.in #dashboard > *:nth-child(1),
.console-sec.reveal.in #decision > *:nth-child(1),
.console-sec.reveal.in .explain-col > *:nth-child(1),
.console-sec.reveal.in #knowledgeHub .kh-cat:nth-child(1) { transition-delay: .04s; }
.console-sec.reveal.in #dashboard > *:nth-child(2),
.console-sec.reveal.in .explain-col > *:nth-child(2),
.console-sec.reveal.in #knowledgeHub .kh-cat:nth-child(2) { transition-delay: .10s; }
.console-sec.reveal.in #dashboard > *:nth-child(3),
.console-sec.reveal.in .explain-col > *:nth-child(3),
.console-sec.reveal.in #knowledgeHub .kh-cat:nth-child(3) { transition-delay: .16s; }
.console-sec.reveal.in #dashboard > *:nth-child(4),
.console-sec.reveal.in .explain-col > *:nth-child(4),
.console-sec.reveal.in #knowledgeHub .kh-cat:nth-child(4) { transition-delay: .22s; }
.console-sec.reveal.in #dashboard > *:nth-child(5),
.console-sec.reveal.in .explain-col > *:nth-child(5),
.console-sec.reveal.in #knowledgeHub .kh-cat:nth-child(5) { transition-delay: .28s; }
.console-sec.reveal.in #dashboard > *:nth-child(n+6),
.console-sec.reveal.in .explain-col > *:nth-child(n+6) { transition-delay: .34s; }

/* bars draw from zero when their section reveals (reuses existing width tweens) */
@media (prefers-reduced-motion: no-preference) {
  .console-sec.reveal:not(.in) .bi-row-fill,
  .console-sec.reveal:not(.in) .fn-fill,
  .console-sec.reveal:not(.in) .rank-fill,
  .console-sec.reveal:not(.in) .up-base,
  .console-sec.reveal:not(.in) .up-gain,
  .console-sec.reveal:not(.in) .wbb-fill { width: 0 !important; }
}

/* the old load-time entrance only applies as a fallback when JS didn't mark reveal */
.console-sec:not(.reveal) { animation: secIn .5s var(--ease-out) both; animation-delay: calc(var(--i, 0) * .09s); }
.console-sec.reveal { animation: none; }

@media (prefers-reduced-motion: reduce) {
  .console-sec.reveal, .console-sec.reveal.in,
  .console-sec.reveal #dashboard > *, .console-sec.reveal #decision > *,
  .console-sec.reveal .explain-col > *, .console-sec.reveal #knowledgeHub .kh-cat {
    opacity: 1 !important; transform: none !important; transition: none !important;
  }
}

/* ============================================================================
   v24 SANDBOX POLISH — custom brand range sliders (filled track + refined
   thumb) and softer toggle rows, to match the console's finish.
   ============================================================================ */
.slider-row { margin-bottom: 15px; }
.slider-row label { font-size: 11.5px; letter-spacing: .01em; margin-bottom: 7px; }
.slider-row label b { font-size: 12.5px; font-weight: 800; }

input[type=range].sb-range {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 20px; background: transparent; cursor: pointer; margin: 0;
}
/* WebKit / Blink: track fills to --p, thumb rides on top */
input[type=range].sb-range::-webkit-slider-runnable-track {
  height: 6px; border-radius: 999px; border: 1px solid var(--line);
  background: linear-gradient(90deg, var(--brand) var(--p, 0%), var(--card-2) var(--p, 0%));
}
input[type=range].sb-range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 16px; height: 16px; margin-top: -7px; border-radius: 50%;
  background: #fff; border: 2px solid var(--brand); box-shadow: var(--shadow);
  transition: transform .14s var(--ease-out), box-shadow .14s var(--ease-out);
}
input[type=range].sb-range:hover::-webkit-slider-thumb { transform: scale(1.14); }
input[type=range].sb-range:active::-webkit-slider-thumb {
  transform: scale(1.04); box-shadow: 0 0 0 5px color-mix(in srgb, var(--brand) 18%, transparent);
}
input[type=range].sb-range:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 26%, transparent);
}
/* Firefox: native progress fill + matching thumb */
input[type=range].sb-range::-moz-range-track { height: 6px; border-radius: 999px; background: var(--card-2); border: 1px solid var(--line); }
input[type=range].sb-range::-moz-range-progress { height: 6px; border-radius: 999px; background: var(--brand); }
input[type=range].sb-range::-moz-range-thumb {
  width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 2px solid var(--brand);
  box-shadow: var(--shadow); transition: transform .14s var(--ease-out);
}
input[type=range].sb-range:hover::-moz-range-thumb { transform: scale(1.14); }

/* toggle rows: a touch more room + a soft hover so they read as controls */
.toggle-row {
  border-radius: 9px; padding: 9px 8px; margin: 0 -8px;
  transition: background .16s var(--ease-out);
}
.toggle-row:hover { background: var(--card-2); }
.slider-sw:before { box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.switch input:focus-visible + .slider-sw { box-shadow: 0 0 0 3px color-mix(in srgb, var(--good) 30%, transparent); }
