/* Portal additions on top of style.css (kept separate so style.css stays identical to the NdayaOS original).
   Only things style.css lacks: no-JavaScript navigation, focus rings, a warning notice, timeline, and a few helpers. */
.skip { position: absolute; left: 8px; top: 8px; transform: translateY(-200%); background: var(--gold); color: #0A0A0A; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { transform: none; }
[dir=rtl] .skip { left: auto; right: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.field input[type=password], .field input[type=search], .field input[type=date] {
  width: 100%; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 10px; padding: 9px 12px; color: var(--text); font-size: 13.5px; font-family: inherit;
}
.field input[type=password]:focus { outline: none; border-color: rgba(201,168,76,0.5); }
.field + .field, .field + .form-actions { margin-top: 14px; }
.field select, .field textarea { width: 100%; }
.card.narrow, .narrow { max-width: 520px; }
.card h1 { font-size: 20px; font-weight: 600; margin: 0 0 12px; }
.card p:last-child { margin-bottom: 0; }
a:not(.btn):not(.nav-link):not(.topbar-btn):not(.brand-name) { color: var(--gold); }
a:not(.btn):not(.nav-link):not(.topbar-btn):hover { color: var(--gold-light); }
.flash-warning { background: rgba(245,158,11,0.08); border: 1px solid rgba(245,158,11,0.25); color: var(--warning); }
.brand-mono { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: rgba(201,168,76,0.15); color: var(--gold); font-weight: 700; font-size: 16px; }
.nav-sub { padding-left: 38px; font-size: 12.5px; }
.nav-link .nav-label { overflow: hidden; text-overflow: ellipsis; flex: 1 1 auto; min-width: 0; }
.topbar-btn { text-decoration: none; }
.topbar-actions form { margin: 0; }
.inline-form { display: inline-flex; gap: 6px; align-items: center; margin: 0; flex-wrap: wrap; }
.inline-form select, .inline-form input[type=password], .inline-form input[type=text] { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 8px; color: var(--text); font-size: 13px; padding: 6px 8px; font-family: inherit; }
.link-btn { background: none; border: none; color: var(--text); cursor: pointer; font-size: 13.5px; text-align: left; padding: 0; }
.link-btn:hover { color: var(--gold); }
.list-plain { list-style: none; margin: 0; padding: 0; }
.list-plain li { padding: 12px 0; border-top: 1px solid rgba(36,36,36,0.7); }
.list-plain li:first-child { border-top: none; padding-top: 0; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 0 0 16px; }
.amount { font-size: 28px; font-weight: 600; color: var(--gold); margin: 6px 0 10px; }
.timeline { list-style: none; margin: 14px 0; padding: 0 0 0 4px; border-left: 2px solid var(--border); }
.timeline li { position: relative; padding: 6px 0 6px 18px; color: var(--text-muted); font-size: 13.5px; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 11px; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 2px solid var(--border); }
.timeline li.done { color: var(--text); }
.timeline li.done::before { background: var(--gold); border-color: var(--gold); }
.timeline li.current { color: var(--gold); font-weight: 600; }
.auth-wordmark { font-family: Georgia, 'Times New Roman', serif; color: #fff; letter-spacing: .22em; font-size: 20px; margin: 0 0 10px; }
.auth-wordmark span { color: var(--gold); }
.auth-card h1 { font-size: 18px; font-weight: 600; margin: 0 0 6px; }
.auth-card .body > p { font-size: 13px; color: var(--text-secondary); margin: 0 0 4px; }
.auth-card a { color: var(--gold); }
.auth-card .flash { margin: 0 0 14px; }
.auth-card .field-hint { margin-top: 4px; }
.auth-foot { text-align: center; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--text-muted); padding: 14px 0 0; }
.page-footer { text-align: center; color: var(--text-muted); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; padding: 20px 0 28px; }
.stat-card a { display: block; }
@media (max-width: 900px) {
  /* style.css turns the sidebar into a fixed overlay that needs JavaScript to open; without scripts it becomes a plain nav block instead */
  .shell { flex-direction: column; }
  .sidebar { position: static !important; width: 100% !important; height: auto; border-right: none; border-bottom: 1px solid var(--border); }
  .sidebar-head { height: 54px; }
  .sidebar-nav { display: flex; flex-wrap: wrap; gap: 2px 6px; padding: 8px 10px; overflow: visible; }
  .nav-group { margin: 0; display: flex; flex-wrap: wrap; gap: 2px 4px; }
  .nav-group-label { display: none; }
  .nav-sub { padding-left: 10px; }
  .sidebar-foot { display: none; }
  .topbar { padding: 0 14px; height: 56px; position: static; }
  .content { padding: 16px 14px; }
  .topbar-btn-wide .user-label { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
.field input[type=file] { width: 100%; background: var(--bg-secondary); border: 1px dashed var(--border); border-radius: 10px; padding: 10px 12px; color: var(--text-secondary); font-size: 13px; }
.field input[type=checkbox] { width: auto; margin-right: 8px; }
.mono-gold { color: var(--gold); font-weight: 600; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

/* Staff control room */
.section-title { font-size: 14px; font-weight: 600; margin: 8px 0 12px; }
.card h3 { font-size: 13px; font-weight: 600; margin: 20px 0 10px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .04em; }
.stat-card .stat-value { word-break: break-word; }

/* Workspace switcher (sidebar) */
.workspace-switch { padding: 12px 16px 4px; border-bottom: 1px solid rgba(201,168,76,0.15); margin-bottom: 4px; }
.workspace-switch .nav-group-label { display: block; margin-bottom: 6px; }
.workspace-row { display: flex; gap: 6px; }
.workspace-row select { flex: 1; min-width: 0; background: var(--card); color: var(--text); border: 1px solid rgba(201,168,76,0.35); border-radius: 8px; padding: 6px 8px; font-size: 13px; }
.ws-chip { display: inline-block; margin-left: 10px; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 500; color: var(--gold); border: 1px solid rgba(201,168,76,0.4); vertical-align: middle; }

/* Client overview */
a.stat-card.stat-link { display: block; color: inherit; text-decoration: none; transition: border-color .15s; }
a.stat-card.stat-link:hover, a.stat-card.stat-link:focus-visible { border-color: rgba(201,168,76,0.45); }
.stat-na { color: var(--text-secondary); }
.stat-note { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.next-journey { border-color: rgba(201,168,76,0.3); }
.nj-when { color: var(--gold); font-weight: 600; font-size: 15px; margin-bottom: 4px; }
.nj-route { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.attention-list, .activity-list { list-style: none; margin: 0; padding: 0; }
.attention-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0 10px 12px; border-bottom: 1px solid rgba(255,255,255,0.06); border-left: 3px solid rgba(201,168,76,0.5); margin-bottom: 6px; }
.attention-list li.attention-danger { border-left-color: #d9534f; }
.attention-list li.attention-warning { border-left-color: #e0a84a; }
.activity-list li { padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.06); font-size: 13.5px; }
.activity-list li.unread { font-weight: 600; }
.activity-list li:last-child { border-bottom: 0; }
@media (max-width: 900px) { .grid-2col { grid-template-columns: 1fr; } .page-header .actions { flex-wrap: wrap; } .attention-list li { flex-direction: column; align-items: flex-start; } }

/* Date and time dropdowns */
.when-picker { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.when-picker select { width: auto; flex: 0 0 auto; }
.when-picker select:first-child { flex: 1 1 200px; min-width: 0; }
.when-sep { color: var(--text-secondary); font-weight: 600; }
.when-time { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; }

/* "What do you need?" choice */
.choice-field { border: 0; padding: 0; margin: 0 0 16px; }
.choice-field legend { font-size: 13px; font-weight: 600; margin-bottom: 8px; padding: 0; }
.choice-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choice-field .choice-card { display: flex; margin: 0; gap: 10px; align-items: flex-start; padding: 14px; border: 1px solid var(--border, rgba(255,255,255,0.1)); border-radius: 10px; cursor: pointer; background: var(--bg-secondary, transparent); }
.choice-field .choice-card input { margin-top: 3px; accent-color: var(--gold); width: auto; }
.choice-card > span { display: flex; flex-direction: column; gap: 3px; font-size: 13.5px; }
.choice-card:has(input:checked) { border-color: rgba(201,168,76,0.6); background: rgba(201,168,76,0.06); }
@media (max-width: 700px) { .choice-row { grid-template-columns: 1fr; } }
#service_id { margin-bottom: 2px; }
.choice-field + .field { margin-bottom: 14px; }
.flash .blockers { margin: 8px 0; padding-left: 18px; }
.flash .blockers li { margin: 4px 0; color: var(--text); }
.flash .blockers a { margin-left: 6px; }
/* Partner overview: label / value rows */
.kv { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 7px 0; border-bottom: 1px solid rgba(255,255,255,0.06); font-size: 13.5px; }
.kv > span:first-child { color: var(--text-secondary); }
.kv:last-of-type { border-bottom: 0; }
.text-gold { color: var(--gold); }
.card h3 { font-size: 14px; margin: 14px 0 6px; }

/* BD partner terms and referral link (2026-11-02) */
.terms-list { margin: 0; padding-left: 1.3em; display: grid; gap: 10px; line-height: 1.55; }
.terms-list li { padding-left: 4px; }
.check-row { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.check-row input { margin-top: 4px; width: 18px; height: 18px; flex: 0 0 auto; accent-color: var(--gold, #C9A84C); }
.referral-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0 4px; }
.referral-row input { flex: 1 1 280px; min-width: 0; font-family: ui-monospace, Menlo, Consolas, monospace; }
.mt-16 { margin-top: 16px; }

/* Two-step sign-in */
.qr-box { display: inline-block; background: #fff; padding: 8px; border-radius: 8px; margin: 6px 0 4px; line-height: 0; }
.qr-box svg { display: block; width: 220px; height: 220px; max-width: 70vw; max-height: 70vw; }
.setup-key { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 1.05rem; letter-spacing: .06em; word-break: break-all; color: var(--gold, #C9A84C); }
.two-step-setup h2 { font-size: 1rem; margin: 18px 0 6px; }
.two-step-setup h2:first-child { margin-top: 0; }
.recovery-codes { columns: 2; column-gap: 32px; padding-left: 1.4em; margin: 12px 0; }
.recovery-codes li { margin: 4px 0; }
.recovery-codes code { font-size: 1.05rem; letter-spacing: .05em; }
.link-button { background: none; border: 0; padding: 0; color: var(--gold, #C9A84C); text-decoration: underline; cursor: pointer; font: inherit; }
.auth-card .link-button { width: auto; margin-top: 0; background: none; color: var(--gold, #C9A84C); padding: 0; font-weight: 400; font-size: 12px; border-radius: 0; }
.auth-card .link-button:hover { background: none; color: var(--gold-light, #E0C374); }

/* Language menu (portal) */
.lang-menu { position: relative; }
.lang-menu summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; padding: 8px 10px; color: var(--text-secondary, #CFCBC0); font-size: 12px; letter-spacing: .08em; font-weight: 600; border-radius: 999px; user-select: none; }
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary svg { width: 18px; height: 18px; }
.lang-menu summary:hover, .lang-menu[open] summary { color: var(--gold, #C9A84C); }
.lang-menu ul { position: absolute; top: calc(100% + 6px); inset-inline-end: 0; min-width: 160px; margin: 0; padding: 6px; list-style: none; background: #121110; border: 1px solid rgba(201,168,76,.35); border-radius: 12px; box-shadow: 0 18px 40px rgba(0,0,0,.5); z-index: 1200; }
.lang-menu li a { display: block; padding: 8px 12px; border-radius: 8px; color: #EDEBE4; font-size: 14px; text-decoration: none; }
.lang-menu li a:hover { background: rgba(201,168,76,.1); color: var(--gold, #C9A84C); }
.lang-menu li a[aria-current] { color: var(--gold, #C9A84C); font-weight: 600; }
.auth-card { position: relative; }
.auth-lang { position: absolute; top: 10px; inset-inline-end: 10px; z-index: 5; }

/* Right-to-left (Arabic): mirror the few things CSS flexbox does not mirror by itself */
[dir=rtl] .sidebar { border-right: none; border-left: 1px solid var(--border); }
[dir=rtl] .timeline { padding: 0 4px 0 0; border-left: none; border-right: 2px solid var(--border); }
[dir=rtl] .timeline li { padding: 6px 18px 6px 0; }
[dir=rtl] .timeline li::before { left: auto; right: -7px; }
[dir=rtl] .kv span + strong, [dir=rtl] td, [dir=rtl] th { text-align: right; }
@media (max-width: 980px) {
  [dir=rtl] .sidebar { left: auto; right: 0; }
}
.plain-list { margin: 0; padding-left: 1.2em; display: grid; gap: 8px; line-height: 1.5; }
[dir=rtl] .plain-list { padding-left: 0; padding-right: 1.2em; }
.card-head-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.mail-list li { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--border); }
.mail-actions { display: flex; gap: 6px; flex: 0 0 auto; }
.inline-form { display: inline; }

/* Install-the-app prompt (phones only) */
.install-banner { position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 70;
  display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 14px; border-radius: 14px;
  background: #121212; color: #fff; border: 1px solid rgba(201,168,76,.45); box-shadow: 0 10px 30px rgba(0,0,0,.45); }
.install-banner[hidden] { display: none; }
.shell.has-tabbar ~ .install-banner { bottom: calc(76px + env(safe-area-inset-bottom)); }
.install-icon { width: 44px; height: 44px; border-radius: 10px; flex: none; }
.install-text { flex: 1 1 auto; min-width: 0; font-size: 13px; line-height: 1.35; color: #c8c8c8; }
.install-text strong { display: block; color: #fff; font-size: 14px; margin-bottom: 2px; }
.install-share { display: inline-flex; vertical-align: -3px; color: var(--gold); margin-inline-end: 4px; }
.install-actions { display: flex; flex-direction: column; align-items: stretch; gap: 6px; flex: none; }
.install-close { background: none; border: 0; color: #9CA3AF; font: inherit; font-size: 12.5px; padding: 6px 4px; cursor: pointer; }
.install-close:focus-visible { outline: 2px solid var(--gold); border-radius: 6px; }
body.has-install-banner .auth-wrap { padding-bottom: 110px; }
@media (min-width: 769px) { .install-banner { display: none !important; } }

/* Ndaya Identity (Founder screens) */
.secret-once { display: inline-block; padding: 10px 14px; background: #0A0A0A; color: #C9A84C; border-radius: 6px; font-size: 15px; letter-spacing: .5px; word-break: break-all; user-select: all; }
.inline-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0 14px; }
.inline-form input[type=password], .inline-form input[type=email] { max-width: 280px; }
