/* public/css/app.css — ASYS v1.0 complete stylesheet */

/* ── Fonts & Reset ─────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Sora:wght@300;400;600;700;800&family=JetBrains+Mono:wght@400;700&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body { font-family: 'Sora', system-ui, sans-serif; background: #F0F4F8; color: #0F172A; -webkit-font-smoothing: antialiased; display: flex; flex-direction: column; min-height: 100vh; padding-bottom: env(safe-area-inset-bottom, 0px); }
a { text-decoration: none; }
img { max-width: 100%; }
input, select, textarea, button { font-family: inherit; font-size: inherit; }
button { cursor: pointer; transition: opacity .15s, transform .1s, background .15s; }
button:active { transform: scale(.97); }
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 3px; }

/* ── Keyframes ──────────────────────────────────────────────────────────────── */
@keyframes fadeUp    { from { opacity:0; transform:translateY(14px) } to { opacity:1; transform:translateY(0) } }
@keyframes fadeIn    { from { opacity:0 } to { opacity:1 } }
@keyframes slideDown { from { opacity:0; transform:translateY(-8px)  } to { opacity:1; transform:translateY(0) } }
@keyframes slideIn   { from { opacity:0; transform:translateX(110%)  } to { opacity:1; transform:translateX(0) } }
@keyframes blink     { 0%,100%{ opacity:1 } 50%{ opacity:.5 } }
@keyframes pulse-ring{ 0%{ box-shadow:0 0 0 0 rgba(220,38,38,.4) } 70%{ box-shadow:0 0 0 8px rgba(220,38,38,0) } 100%{ box-shadow:0 0 0 0 rgba(220,38,38,0) } }
@keyframes spin      { to { transform: rotate(360deg) } }

/* ── Responsive helpers ─────────────────────────────────────────────────────── */
.hide-mob  { display: block }
.mob-only  { display: none  }
.mob-full  { width: auto    }

@media (max-width: 768px) {
  .hide-mob  { display: none !important }
  .mob-only  { display: block !important }
  .mob-full  { width: 100% !important }
}

/* ── Login ──────────────────────────────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  background: #04090F;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  position: relative; overflow: hidden;
}
.login-bg-grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(#ffffff05 1px, transparent 1px),
    linear-gradient(90deg, #ffffff05 1px, transparent 1px);
  background-size: 44px 44px;
}
.login-card {
  position: relative;
  background: rgba(10,16,28,.97);
  border: 1px solid #1E293B;
  border-radius: 20px;
  padding: 42px 44px;
  width: 100%; max-width: 430px;
  box-shadow: 0 40px 100px #000000AA;
  animation: fadeUp .45s ease;
}
@media (max-width: 480px) { .login-card { padding: 28px 20px; } }

.login-card__brand  { text-align: center; margin-bottom: 28px; }
.login-card__logo   { width:46px; height:46px; border-radius:12px; margin:0 auto 12px; background:linear-gradient(135deg,#1a6fd4,#19b857); display:flex; align-items:center; justify-content:center; font-size:20px; color:#fff; font-weight:900; box-shadow:0 0 28px rgba(26,111,212,.25); }
.login-card__app    { color:#F8FAFC; font-size:20px; font-weight:800; letter-spacing:-0.4px; }
.login-card__sub    { color:#475569; font-size:12px; margin-top:3px; }

/* demo section removed — production UI only */

/* ── Nav ────────────────────────────────────────────────────────────────────── */
.topnav {
  background: #0B1220;
  display: flex; align-items: flex-end; justify-content: space-between;
  padding: 0 16px;
  padding-top: env(safe-area-inset-top, 0px);
  min-height: calc(54px + env(safe-area-inset-top, 0px));
  border-bottom: 1px solid #1E293B;
  position: sticky; top: 0; z-index: 200;
}
.topnav__brand      { display:flex; align-items:center; gap:10px; }
.topnav__logo       { width:28px; height:28px; border-radius:7px; background:linear-gradient(135deg,#1a6fd4,#19b857); display:flex; align-items:center; justify-content:center; color:#fff; font-size:13px; font-weight:900; flex-shrink:0; }
.topnav__app-name   { color:#F8FAFC; font-weight:900; font-size:16px; letter-spacing:.08em; text-transform:uppercase; text-shadow:0 1px 4px rgba(0,0,0,.3); }
.topnav__role-badge { background:#1E293B; color:#64748B; border-radius:20px; padding:2px 9px; font-size:10px; font-weight:700; }
.topnav__right      { display:flex; align-items:center; gap:10px; }
.topnav__user       { text-align:right; }
.topnav__user-name  { color:#F8FAFC; font-size:12px; font-weight:700; }
.topnav__user-meta  { display:flex; align-items:center; gap:4px; justify-content:flex-end; color:#475569; font-size:10px; font-family:'JetBrains Mono',monospace; }
.topnav__dot        { width:5px; height:5px; border-radius:50%; display:inline-block; }
.topnav__hamburger  { background:#1E293B; border:1px solid #334155; color:#94A3B8; border-radius:8px; padding:6px 13px; font-size:18px; line-height:1; }

/* Mobile menu */
.mob-menu           { background:#0B1220; border-bottom:1px solid #1E293B; padding:14px 16px; animation:slideDown .2s ease; position:fixed; top:calc(54px + env(safe-area-inset-top, 0px)); left:0; right:0; z-index:199; box-shadow:0 8px 24px rgba(0,0,0,.5); }
.mob-menu__user     { margin-bottom:12px; }
.mob-menu__user strong { display:block; color:#F8FAFC; font-size:13px; }
.mob-menu__user span   { color:#475569; font-size:11px; }

/* ── Page Wrap ──────────────────────────────────────────────────────────────── */
.app-main   { padding: 14px 16px; max-width: 100%; margin: 0 auto; animation: fadeUp .35s ease; }
.page-wrap  { }

/* ── Desktop / Tablet Full-Width Layout ─────────────────────────────────── */
@media (min-width: 769px) {
  .app-main {
    padding: 20px 32px;
    max-width: 1600px;
    margin: 0 auto;
  }
  .page-wrap {
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
  }
}
@media (min-width: 1280px) {
  .app-main {
    padding: 24px 48px;
  }
}
@media (min-width: 1600px) {
  .app-main {
    padding: 24px 64px;
  }
}

/* ── Buttons ────────────────────────────────────────────────────────────────── */
.btn          { display:inline-flex; align-items:center; justify-content:center; gap:6px; border-radius:9px; padding:9px 18px; font-weight:700; font-size:13px; border:none; white-space:nowrap; transition:all .15s; }
.btn--primary { background:#1a6fd4; color:#fff; }
.btn--primary:hover { opacity:.9; }
.btn--danger  { background:#DC2626; color:#fff; }
.btn--ghost   { background:#1E293B; border:1px solid #334155; color:#94A3B8; }
.btn--green   { background:#059669; color:#fff; }
.btn--red     { background:#991B1B; color:#fff; }
.btn--purple  { background:#1a6fd4; color:#fff; }
.btn--outline { background:#F1F5F9; color:#374151; border:1px solid #E2E8F0; }
.btn--full    { width:100%; }
.btn--lg      { padding:12px 22px; font-size:14px; }
.btn--sm      { padding:5px 12px; font-size:11px; border-radius:7px; }
.btn--icon    { padding:7px; border-radius:7px; }
.btn:disabled { opacity:.5; cursor:default; }

/* ── Forms ──────────────────────────────────────────────────────────────────── */
.form-group   { margin-bottom:14px; }
.form-label   { display:block; font-size:11px; font-weight:700; color:#374151; margin-bottom:5px; text-transform:uppercase; letter-spacing:.5px; }
.form-label__optional { font-weight:400; color:#9CA3AF; text-transform:none; letter-spacing:0; }
.req          { color:#DC2626; }
.form-input   { width:100%; border:1px solid #D1D5DB; border-radius:8px; padding:10px 12px; font-size:14px; color:#0F172A; background:#fff; transition:border-color .15s; }
.form-input:focus   { outline:none; border-color:#1a6fd4; box-shadow:0 0 0 3px rgba(26,111,212,.08); }
.form-input--mono   { font-family:'JetBrains Mono',monospace; font-weight:700; }
.form-select  { width:100%; border:1px solid #D1D5DB; border-radius:8px; padding:10px 12px; font-size:14px; color:#0F172A; background:#fff; appearance:none; background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2364748B' stroke-width='1.5' fill='none'/%3E%3C/svg%3E"); background-repeat:no-repeat; background-position:right 12px center; padding-right:36px; }
.form-textarea{ width:100%; border:1px solid #D1D5DB; border-radius:8px; padding:9px 12px; font-size:13px; color:#374151; resize:vertical; }
.form-textarea:focus { outline:none; border-color:#1a6fd4; }
.form-hint    { font-size:11px; color:#9CA3AF; margin-top:4px; }

/* ── Alerts ─────────────────────────────────────────────────────────────────── */
.alert        { border-radius:8px; padding:10px 14px; font-size:13px; font-weight:600; margin-bottom:12px; }
.alert--error { background:#FEF2F2; border:1px solid #FECACA; color:#DC2626; }
.alert--success { background:#ECFDF5; border:1px solid #A7F3D0; color:#059669; }
.alert--warn  { background:#FFFBEB; border:1px solid #FDE68A; color:#92400E; animation:blink 2s infinite; }
.alert--info  { background:#EFF6FF; border:1px solid #BFDBFE; color:#1a6fd4; }

/* ── Cards ──────────────────────────────────────────────────────────────────── */
.card         { background:#fff; border-radius:14px; padding:22px; border:1px solid #E2E8F0; box-shadow:0 1px 4px #0001; }
.card__title  { font-size:15px; font-weight:800; color:#0F172A; margin-bottom:3px; }
.card__sub    { font-size:12px; color:#94A3B8; margin-bottom:16px; }

/* ── Stat Cards ─────────────────────────────────────────────────────────────── */
.stat-row     { display:flex; gap:8px; margin-bottom:18px; flex-wrap:wrap; }
.stat-card    { background:#fff; border-radius:11px; padding:12px 16px; flex:1 1 80px; min-width:76px; border:1px solid #E2E8F0; box-shadow:0 1px 3px #0001; cursor:pointer; user-select:none; transition:all .15s; position:relative; }
.stat-card:hover   { transform:translateY(-1px); }
.stat-card.active  { background:color-mix(in srgb, var(--stat-color) 10%, white); border:2px solid var(--stat-color); box-shadow:0 4px 12px color-mix(in srgb, var(--stat-color) 20%, transparent); }
.stat-card.active::after { content:''; position:absolute; top:7px; right:8px; width:6px; height:6px; border-radius:50%; background:var(--stat-color); }
.stat-card--pulse  { animation:blink 2s infinite; }
.stat-card__value  { font-size:24px; font-weight:800; color:var(--stat-color); font-family:'JetBrains Mono',monospace; line-height:1; }
.stat-card__value--emoji { font-family:inherit; font-size:22px; font-weight:400; }
.stat-card__label  { font-size:10px; font-weight:700; color:#9CA3AF; margin-top:3px; text-transform:uppercase; letter-spacing:.7px; }
.stat-card__hint   { font-size:9px; color:#CBD5E1; margin-top:2px; }
.stat-card.active .stat-card__label { color:var(--stat-color); }
.stat-card.active .stat-card__hint  { color:var(--stat-color); }
.stat-card.active .stat-card__hint::before { content:'● '; }

/* ── Stat Card Interactive States ─────────────────────────────────────────────── */
.stat-card:hover    { transform:translateY(-2px); box-shadow:0 6px 16px rgba(0,0,0,0.1); }
.stat-card.active   { border:2px solid var(--stat-color); background:color-mix(in srgb, var(--stat-color) 8%, white); box-shadow:0 4px 14px color-mix(in srgb, var(--stat-color) 22%, transparent); transform:translateY(-2px); animation:none !important; }
.stat-card.active::after { content:'✓'; position:absolute; top:6px; right:7px; width:16px; height:16px; background:var(--stat-color); color:#fff; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:9px; font-weight:900; }
.stat-card:focus-visible { outline:2px solid var(--stat-color,#19b857); outline-offset:2px; }
@media (prefers-reduced-motion: reduce) { .stat-card, .stat-card.active { transition:none !important; transform:none !important; } }


/* ── Layout — Branch full-width on desktop ───────────────────────────────────── */
.two-col-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 14px;
  align-items: start;
}
.history-col { min-width: 0; }
.history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 8px;
  flex-wrap: wrap;
}

@media (min-width: 1400px) { .two-col-layout { grid-template-columns: 360px 1fr; } }
@media (max-width: 1100px) { .two-col-layout { grid-template-columns: 290px 1fr; } }
@media (max-width: 900px)  { .two-col-layout { grid-template-columns: 1fr; } }

/* ── Branch Dashboard Compact Enhancements ───────────────────────────────────── */

/* Stat cards row — compact horizontal scroll on mobile */
.stat-row {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.stat-row::-webkit-scrollbar { display: none; }

.stat-card {
  flex: 1 0 0;
  min-width: 68px;
  max-width: 130px;
  padding: 10px 12px;
  border-radius: 10px;
}
.stat-card__value { font-size: 22px; }
.stat-card__label { font-size: 9px; }
.stat-card__hint  { font-size: 8px; }

@media (max-width: 480px) {
  .stat-card { padding: 8px 10px; min-width: 60px; }
  .stat-card__value { font-size: 20px; }
}

/* Form card — tighter spacing */
.form-card { padding: 16px; }
.form-card .card__title { font-size: 14px; margin-bottom: 1px; }
.form-card .card__sub   { font-size: 11px; margin-bottom: 12px; }
.form-card .form-group  { margin-bottom: 10px; }
.form-card .form-input, .form-card .form-textarea { padding: 8px 10px; font-size: 13px; }
.form-card .form-textarea { rows: 2; }

/* Biz grid — compact */
.biz-grid {
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 6px;
}
.biz-btn { padding: 8px 6px; border-radius: 8px; }
.biz-btn strong { font-size: 11px; }
.biz-btn small  { font-size: 8px; margin-top: 1px; }

/* Type pills — smaller */
.type-pill { padding: 4px 10px; font-size: 11px; border-radius: 6px; }

/* Submit button */
.form-card .btn--full { padding: 10px; font-size: 13px; }

/* Request cards — tighter */
.req-card { padding: 12px; border-radius: 10px; }
.req-card__txn { font-size: 14px; }
.req-card__meta { font-size: 11px; margin-bottom: 4px; }
.req-card__time { font-size: 10px; margin-bottom: 4px; }

/* History toolbar */
.history-toolbar {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.history-search-wrap {
  flex: 1;
  min-width: 140px;
}
.history-perpage-wrap {
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Mobile-first branch layout tweaks ───────────────────────────────────────── */
@media (max-width: 900px) {
  /* On mobile, form goes on top, history below */
  .two-col-layout .form-card { order: 1; }
  .two-col-layout .history-col { order: 2; }
  
  /* Slightly wider form inputs on mobile */
  .biz-grid { grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); }
}

@media (max-width: 480px) {
  .app-main { padding: 10px 10px; }
  .form-card { padding: 12px; }
  .card { border-radius: 10px; }
  .history-toolbar { gap: 6px; }
  .history-perpage-label { font-size: 10px; }
  .history-perpage-select { font-size: 11px; padding: 4px 6px; }
  .req-card__badges { gap: 4px; }
  .biz-badge, .type-badge { font-size: 9px; padding: 1px 5px; }
  .status-pill { font-size: 10px; padding: 2px 7px; }
}

/* ── Filter bar (Ops) ────────────────────────────────────────────────────────── */
.filter-bar   { background:#fff; border-radius:10px; padding:11px 14px; border:1px solid #E2E8F0; margin-bottom:14px; display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
.filter-chip  { display:inline-flex; align-items:center; gap:6px; background:#EFF6FF; border:1px solid #BFDBFE; border-radius:7px; padding:4px 11px; font-size:12px; color:#1a6fd4; font-weight:700; }
.filter-chip button { background:none; border:none; color:#1a6fd4; font-size:14px; cursor:pointer; padding:0; margin-left:2px; }

/* ── Business / Type toggle buttons ─────────────────────────────────────────── */
.biz-grid     { display:grid; grid-template-columns:repeat(auto-fill,minmax(120px,1fr)); gap:8px; }
.biz-btn      { border:2px solid #E2E8F0; border-radius:10px; padding:10px 8px; background:#F8FAFC; cursor:pointer; text-align:left; transition:all .15s; }
.biz-btn strong { display:block; font-size:13px; font-weight:800; color:#374151; }
.biz-btn small  { display:block; font-size:9px; color:#9CA3AF; margin-top:2px; }
.biz-btn--active { border-color:var(--biz-color,#1a6fd4); background:var(--biz-bg,#EFF6FF); }
.biz-btn--active strong { color:var(--biz-color,#1a6fd4); }
.biz-btn--active small  { color:var(--biz-color,#1a6fd4); }

.type-pills   { display:flex; flex-wrap:wrap; gap:6px; }
.type-pill    { border:2px solid #E2E8F0; border-radius:7px; padding:5px 12px; font-size:12px; font-weight:700; background:#F8FAFC; color:#6B7280; cursor:pointer; transition:all .13s; }
.type-pill.active { border-color:var(--type-color); background:var(--type-bg); color:var(--type-color); }
.type-pill--mc-only { display:none; }
.biz-mc .type-pill--mc-only { display:inline-flex; }

/* ── Request Cards ───────────────────────────────────────────────────────────── */
.request-list { display:flex; flex-direction:column; gap:10px; }
.empty-state  { background:#fff; border-radius:12px; padding:34px; text-align:center; color:#9CA3AF; border:1px solid #E2E8F0; font-size:14px; }

.req-card     { background:#fff; border-radius:12px; padding:16px; border:1px solid #E2E8F0; box-shadow:0 1px 3px #0001; animation:slideDown .2s ease; transition:border-color .15s,box-shadow .15s,transform .1s; }
.req-card[data-request] { cursor:pointer; }
.req-card[data-request]:hover { border-color:#93C5FD; box-shadow:0 4px 12px #19b85720; transform:translateY(-1px); }
.req-card--breach { animation:pulse-ring 1.5s infinite; }
.req-card__top    { display:flex; align-items:flex-start; justify-content:space-between; gap:8px; margin-bottom:8px; }
.req-card__txn    { font-family:'JetBrains Mono',monospace; font-size:16px; font-weight:800; color:#1a6fd4; }
.req-card__time-sub { font-size:11px; color:#9CA3AF; margin-top:1px; }
.req-card__badges { display:flex; gap:5px; flex-wrap:wrap; justify-content:flex-end; }
.req-card__meta   { font-size:12px; color:#374151; margin-bottom:6px; }
.req-card__branch { font-weight:600; }
.req-card__dot    { color:#9CA3AF; padding:0 3px; }
.req-card__time   { font-size:11px; color:#9CA3AF; margin-bottom:6px; }
.req-card__remarks { font-size:11px; color:#6B7280; margin-top:6px; }
.req-card__resolver { font-size:11px; color:#6B7280; margin-top:5px; }
.req-card__resolve-remarks { font-style:italic; margin-top:2px; }
.req-card__actions { display:flex; gap:8px; margin-top:12px; }

/* ── Badges ─────────────────────────────────────────────────────────────────── */
.biz-badge  { display:inline-flex; align-items:center; border-radius:4px; padding:2px 7px; font-size:10px; font-weight:800; font-family:monospace; letter-spacing:.5px; text-transform:uppercase; white-space:nowrap; border:1px solid transparent; }
.type-badge { display:inline-flex; align-items:center; border-radius:4px; padding:2px 8px; font-size:11px; font-weight:700; font-family:monospace; letter-spacing:.3px; white-space:nowrap; border:1px solid; }

.status-pill                 { display:inline-flex; align-items:center; gap:4px; border-radius:20px; padding:2px 10px; font-size:11px; font-weight:700; }
.status-pill--pending        { background:#FFFBEB; color:#92400E; }
.status-pill--approved       { background:#ECFDF5; color:#065F46; }
.status-pill--rejected       { background:#FEF2F2; color:#991B1B; }

.filter-badge { background:#EFF6FF; color:#1a6fd4; border:1px solid #BFDBFE; border-radius:4px; padding:1px 8px; font-size:11px; font-weight:600; margin-left:6px; }

/* ── SLA Timer ───────────────────────────────────────────────────────────────── */
.sla-timer            { margin-top:6px; }
.sla-timer__label     { font-size:11px; font-family:'JetBrains Mono',monospace; font-weight:700; display:inline-block; border-radius:4px; padding:2px 7px; border:1px solid; }
.sla-timer__bar       { height:3px; border-radius:2px; background:#E5E7EB; overflow:hidden; margin-top:4px; }
.sla-timer__fill      { height:100%; width:0%; transition:width 1s linear; border-radius:2px; }
.sla-timer--ok   .sla-timer__label { background:#ECFDF5; color:#059669; border-color:#A7F3D033; }
.sla-timer--ok   .sla-timer__fill  { background:#059669; }
.sla-timer--warn .sla-timer__label { background:#FFFBEB; color:#D97706; border-color:#FDE68A33; animation:blink 1.2s infinite; }
.sla-timer--warn .sla-timer__fill  { background:#D97706; }
.sla-timer--over .sla-timer__label { background:#FEF2F2; color:#DC2626; border-color:#FECACA33; animation:blink 1.2s infinite; }
.sla-timer--over .sla-timer__fill  { background:#DC2626; }

.sla-result         { display:inline-flex; align-items:center; gap:6px; border-radius:4px; padding:2px 8px; font-size:11px; font-weight:700; border:1px solid; margin-top:6px; }
.sla-result--ok     { background:#ECFDF5; color:#065F46; border-color:#A7F3D0; }
.sla-result--over   { background:#FEF2F2; color:#991B1B; border-color:#FECACA; }
.sla-result__time   { font-size:10px; color:#9CA3AF; font-family:'JetBrains Mono',monospace; }

/* ── Modal ───────────────────────────────────────────────────────────────────── */
.modal-overlay  { position:fixed; inset:0; background:rgba(0,0,0,0.55); z-index:1000; display:flex; align-items:center; justify-content:center; padding:20px; backdrop-filter:blur(6px); -webkit-backdrop-filter:blur(6px); }
.modal-overlay[hidden] { display:none !important; }
.modal          { background:#fff; border-radius:20px; padding:28px; width:100%; max-width:520px; max-height:90vh; overflow-y:auto; box-shadow:0 32px 80px rgba(0,0,0,0.2), 0 0 0 1px rgba(0,0,0,0.05); animation:fadeUp .25s ease; position:relative; }
.modal__title   { font-size:19px; font-weight:800; color:#0F172A; margin-bottom:4px; }
.modal__sub     { font-size:12px; color:#64748B; margin-bottom:18px; }
.modal__header  { display:flex; align-items:center; justify-content:space-between; margin-bottom:16px; }
.modal__close   { width:34px; height:34px; display:flex; align-items:center; justify-content:center; background:#F1F5F9; border:none; border-radius:8px; font-size:16px; color:#64748B; cursor:pointer; flex-shrink:0; transition:background .15s; }
.modal__close:hover { background:#E2E8F0; color:#0F172A; }
.modal-detail   { background:#F8FAFC; border-radius:12px; padding:16px 18px; margin-bottom:16px; border:1px solid #E2E8F0; }
.modal-detail-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.modal-detail-item__label { font-size:10px; color:#94A3B8; font-weight:700; margin-bottom:2px; text-transform:uppercase; letter-spacing:.5px; }
.modal-detail-item__value { font-size:13px; color:#0F172A; }
.modal-ident    { background:#FFFBEB; border:1px solid #FDE68A; border-radius:12px; padding:14px 16px; margin-bottom:16px; }
.modal-ident__label { font-size:11px; color:#92400E; font-weight:700; letter-spacing:.6px; text-transform:uppercase; margin-bottom:8px; }
.modal-type-fix { background:#F5F3FF; border:1px solid #D1FAE5; border-radius:12px; padding:14px 16px; margin-bottom:16px; }
.modal-type-fix__label { font-size:11px; color:#1a6fd4; font-weight:700; margin-bottom:8px; text-transform:uppercase; letter-spacing:.5px; }
.type-fix-pills { display:flex; flex-wrap:wrap; gap:6px; }
.type-fix-pill  { border:2px solid #E2E8F0; border-radius:7px; padding:5px 12px; font-size:12px; font-weight:700; background:#F8FAFC; color:#6B7280; cursor:pointer; transition:all .13s; }
.type-fix-pill.selected { border-color:var(--type-color); background:var(--type-bg); color:var(--type-color); }
.type-fix-pill:disabled { opacity:.4; cursor:default; }
.modal-actions  { display:flex; gap:8px; margin-top:8px; }

/* ── Slim Approve/Reject Modal ───────────────────────────────────────────────── */
.modal--slim { max-width: 380px; padding: 0; }
.modal__header-slim {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid #F1F5F9;
}
.modal__icon-slim {
  width: 36px; height: 36px; flex-shrink: 0;
  border-radius: 10px; display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 800;
}
.modal__icon--approve { background: #ECFDF5; color: #059669; border: 1.5px solid #A7F3D0; }
.modal__icon--reject  { background: #FEF2F2; color: #DC2626; border: 1.5px solid #FECACA; }
.modal__title-slim  { font-size: 15px; font-weight: 800; color: #0F172A; line-height: 1.2; }
.modal__txn-slim    { font-size: 11px; color: #1a6fd4; font-family: 'JetBrains Mono', monospace; font-weight: 700; margin-top: 2px; }
.modal__close-slim  {
  margin-left: auto; flex-shrink: 0;
  width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
  background: #F1F5F9; border: none; border-radius: 7px; font-size: 13px;
  color: #64748B; cursor: pointer; transition: background .15s;
}
.modal__close-slim:hover { background: #E2E8F0; color: #0F172A; }
.modal__body-slim { padding: 16px 20px 20px; }

/* ── Ops Table — Compact ─────────────────────────────────────────────────────── */
.data-table-wrap  { background:#fff; border-radius:14px; border:1px solid #E2E8F0; overflow-x:auto; }
.data-table       { width:100%; min-width:900px; border-collapse:collapse; }
.data-table thead th { background:#F8FAFC; font-size:9.5px; font-weight:700; color:#6B7280; text-transform:uppercase; letter-spacing:.6px; padding:8px 11px; text-align:left; border-bottom:1px solid #E2E8F0; white-space:nowrap; }
.data-table tbody tr { border-bottom:1px solid #F1F5F9; transition:background .12s,box-shadow .12s; }
.data-table tbody tr:last-child { border-bottom:none; }
.data-table tbody tr[data-request] { cursor:pointer; }
.data-table tbody tr[data-request]:hover { background:#EFF6FF !important; box-shadow:inset 3px 0 0 #19b857; }
.data-table tbody tr.row--breach { background:#FFF5F5; }
.data-table tbody tr.row--pending { background:#FFFDF7; }
.data-table td  { padding:7px 11px; font-size:12px; vertical-align:middle; }
.td-mono        { font-family:'JetBrains Mono',monospace; font-weight:700; color:#1a6fd4; font-size:11px; }
.td-branch      { font-size:12px; font-weight:600; }
.td-branch-sub  { font-size:9.5px; color:#94A3B8; font-family:monospace; margin-top:1px; }
.td-staff       { font-size:11px; color:#374151; }
.td-resolver    { font-size:11px; color:#374151; }
.td-resolver-sub{ font-size:9.5px; color:#94A3B8; margin-top:1px; }
.td-time        { font-size:10px; color:#6B7280; white-space:nowrap; }
.td-time span   { display:block; }
.td-remarks     { font-size:11px; color:#6B7280; font-style:italic; max-width:150px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.td-empty       { color:#9CA3AF !important; }

/* ── Admin Tabs ──────────────────────────────────────────────────────────────── */
.admin-tabs     { display:flex; gap:2px; border-bottom:2px solid #E2E8F0; margin-bottom:22px; overflow-x:auto; }
.admin-tab-btn  { background:none; border:none; cursor:pointer; text-decoration:none; padding:10px 16px; font-size:13px; font-weight:700; color:#6B7280; border-bottom:2px solid transparent; margin-bottom:-2px; transition:all .15s; display:flex; align-items:center; gap:6px; white-space:nowrap; }
.admin-tab-btn.active { color:#1a6fd4; border-bottom-color:#1a6fd4; }

.admin-two-col  { display:grid; grid-template-columns:350px 1fr; gap:20px; align-items:start; }
@media (max-width:900px) { .admin-two-col { grid-template-columns:1fr; } }

/* ── Role badges in admin ────────────────────────────────────────────────────── */
.role-section-head { font-size:11px; font-weight:800; letter-spacing:.7px; text-transform:uppercase; margin-bottom:7px; display:flex; align-items:center; gap:5px; }
.role-dot          { width:7px; height:7px; border-radius:50%; display:inline-block; }

/* ── Account list rows ───────────────────────────────────────────────────────── */
.account-list       { background:#fff; border-radius:12px; border:1px solid #E2E8F0; overflow:hidden; margin-bottom:18px; }
.account-row        { display:flex; align-items:center; gap:10px; padding:11px 14px; border-bottom:1px solid #F1F5F9; background:#fff; flex-wrap:wrap; transition:background .1s; }
.account-row:last-child { border-bottom:none; }
.account-row.editing { background:#EFF6FF; }
.account-row__id    { font-family:'JetBrains Mono',monospace; font-size:12px; font-weight:700; color:#1a6fd4; min-width:90px; }
.account-row__name  { font-size:13px; color:#0F172A; font-weight:500; flex:1; min-width:110px; }
.account-row__region{ font-size:11px; color:#64748B; min-width:60px; }
.account-row__actions{ display:flex; gap:6px; margin-left:auto; }

/* ── Approval Type list ──────────────────────────────────────────────────────── */
.type-list-row { display:flex; align-items:center; gap:12px; padding:13px 16px; border-bottom:1px solid #F1F5F9; flex-wrap:wrap; }
.type-list-row:last-child { border-bottom:none; }
.type-list-row.editing { background:#EFF6FF; }
.type-list-row__actions { margin-left:auto; display:flex; gap:6px; }

.mc-badge  { font-size:9px; color:#0E7490; font-weight:700; background:#ECFEFF; border:1px solid #A5F3FC; border-radius:4px; padding:1px 6px; }

/* ── SLA Table ───────────────────────────────────────────────────────────────── */
.sla-table { background:#fff; border-radius:14px; border:1px solid #E2E8F0; overflow:hidden; max-width:720px; }
.sla-table thead th { background:#F8FAFC; font-size:10px; font-weight:700; color:#6B7280; text-transform:uppercase; letter-spacing:.6px; padding:10px 18px; text-align:left; border-bottom:1px solid #E2E8F0; }
.sla-table tbody td { padding:14px 18px; border-bottom:1px solid #F1F5F9; vertical-align:middle; }
.sla-table tbody tr:last-child td { border-bottom:none; }
.sla-input  { width:64px; border:1px solid #D1D5DB; border-radius:7px; padding:6px 9px; font-size:14px; font-family:'JetBrains Mono',monospace; font-weight:700; color:#0F172A; text-align:center; }
.sla-input.dirty { border-color:#1a6fd4; box-shadow:0 0 0 2px rgba(26,111,212,.08); }
.sla-seconds { font-family:'JetBrains Mono',monospace; font-size:11px; color:#9CA3AF; }

/* ── Routing cards ───────────────────────────────────────────────────────────── */
.routing-card         { background:#fff; border-radius:14px; border:1px solid #E2E8F0; padding:22px; margin-bottom:16px; box-shadow:0 1px 4px #0001; }
.routing-card__header { display:flex; align-items:center; justify-content:space-between; margin-bottom:16px; flex-wrap:wrap; gap:10px; }
.routing-card__approver { display:flex; align-items:center; gap:12px; }
.routing-card__avatar   { width:36px; height:36px; border-radius:10px; background:#1a6fd4; display:flex; align-items:center; justify-content:center; color:#fff; font-size:16px; flex-shrink:0; }
.routing-card__name     { font-size:14px; font-weight:800; color:#0F172A; }
.routing-card__meta     { font-size:11px; color:#94A3B8; font-family:'JetBrains Mono',monospace; }
.routing-card__controls { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.routing-type-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(150px,1fr)); gap:10px; }
.routing-tile         { border:2px solid #E2E8F0; border-radius:10px; padding:11px 13px; cursor:pointer; background:#F8FAFC; transition:all .13s; user-select:none; }
.routing-tile.on      { border-color:var(--type-color); background:var(--type-bg); }
.routing-tile__top    { display:flex; align-items:center; justify-content:space-between; margin-bottom:4px; }
.routing-tile__check  { width:18px; height:18px; border-radius:50%; background:#E2E8F0; display:flex; align-items:center; justify-content:center; font-size:10px; color:#fff; font-weight:900; transition:all .12s; }
.routing-tile.on .routing-tile__check { background:var(--type-color); }
.routing-tile__status { font-size:10px; color:#9CA3AF; margin-top:2px; }
.routing-tile.on .routing-tile__status { color:var(--type-color); }

/* ── Colour palette picker ───────────────────────────────────────────────────── */
.palette-grid   { display:flex; flex-wrap:wrap; gap:7px; }
.palette-swatch { width:28px; height:28px; border-radius:7px; border:3px solid transparent; cursor:pointer; transition:all .12s; }
.palette-swatch.selected { border-color:#0F172A; box-shadow:0 0 0 2px #fff, 0 0 0 4px var(--sw-color); }
.badge-preview  { display:flex; align-items:center; gap:8px; margin-top:10px; }
.badge-preview__sample { border-radius:4px; padding:2px 9px; font-size:11px; font-weight:700; font-family:monospace; border:1px solid; }
.badge-preview__hint   { font-size:11px; color:#9CA3AF; }

/* ── Toggle switch ───────────────────────────────────────────────────────────── */
.toggle-wrap    { display:flex; align-items:center; gap:10px; }
.toggle-switch  { width:36px; height:22px; border-radius:11px; background:#E2E8F0; border:none; cursor:pointer; position:relative; transition:background .2s; flex-shrink:0; }
.toggle-switch.on { background:#0E7490; }
.toggle-switch__thumb { position:absolute; top:3px; left:3px; width:16px; height:16px; border-radius:50%; background:#fff; transition:left .2s; display:block; }
.toggle-switch.on .toggle-switch__thumb { left:17px; }
.toggle-info__title { font-size:12px; font-weight:700; color:#374151; }
.toggle-info__sub   { font-size:11px; color:#9CA3AF; }

/* ── Approver view ───────────────────────────────────────────────────────────── */
.tab-row        { display:flex; gap:6px; margin-bottom:14px; overflow-x:auto; }
.tab-btn        { background:#fff; color:#374151; border:1px solid #E2E8F0; border-radius:8px; padding:7px 16px; font-size:13px; font-weight:600; white-space:nowrap; }
.tab-btn.active { background:#0B1220; color:#fff; border-color:#0B1220; }

.alert-stack    { display:flex; flex-direction:column; gap:6px; margin-bottom:12px; }
.sla-alert      { background:#FEF2F2; border:1px solid #FECACA; border-radius:8px; padding:10px 14px; font-size:13px; color:#991B1B; font-weight:600; display:flex; justify-content:space-between; align-items:center; animation:slideIn .3s ease; }
.sla-alert button { background:none; border:none; color:#DC2626; font-size:16px; cursor:pointer; }

/* ── Loading spinner ────────────────────────────────────────────────────────── */
.spinner { width:18px; height:18px; border:2px solid #E2E8F0; border-top-color:#1a6fd4; border-radius:50%; animation:spin .7s linear infinite; display:inline-block; }

/* ── 404 / Error pages ───────────────────────────────────────────────────────── */
.error-page { min-height:100vh; display:flex; align-items:center; justify-content:center; flex-direction:column; gap:16px; text-align:center; padding:20px; }
.error-page h1 { font-size:48px; font-weight:800; color:#E2E8F0; }
.error-page p  { font-size:16px; color:#64748B; }

/* ── Utilities ───────────────────────────────────────────────────────────────── */
.text-mono  { font-family:'JetBrains Mono',monospace; }
.text-muted { color:#9CA3AF; }
.text-sm    { font-size:12px; }
.text-xs    { font-size:10px; }
.mt-1  { margin-top:4px }
.mt-2  { margin-top:8px }
.mt-3  { margin-top:12px }
.mb-0  { margin-bottom:0 }
.flex  { display:flex }
.items-center { align-items:center }
.gap-2 { gap:8px }
.gap-3 { gap:12px }
.w-full{ width:100% }
.hidden{ display:none }

/* ── v5 additions ───────────────────────────────────────────────────────────── */

/* Fix: desktop shows ONLY table, mobile shows ONLY cards */
.data-table-wrap { display: block; }
.request-list.mob-only { display: none; }
@media (max-width: 768px) {
  .data-table-wrap { display: none !important; }
  .request-list.mob-only { display: flex !important; flex-direction: column; gap: 10px; }
}

/* FAILED/SLA-expired status */
.status-pill--failed    { background: #F5F3FF; color: #5B21B6; }
.status-pill--sla_expired { background: #F5F3FF; color: #5B21B6; }
.status-pill--sla-expired { background: #F5F3FF; color: #5B21B6; }
tr.row--failed          { background: #F0FDF4; }
tr.row--deleted         { background: #F9FAFB; opacity: 0.85; }

/* Pagination */
.pagination             { display:flex; align-items:center; gap:6px; flex-wrap:wrap; padding:14px 18px; border-top:1px solid #F1F5F9; background:#FAFBFC; border-radius:0 0 14px 14px; }
.pagination__info       { font-size:12px; color:#6B7280; margin-right:auto; }
.pagination__btn        { min-width:32px; height:32px; padding:0 10px; border:1px solid #E2E8F0; border-radius:6px; background:#fff; color:#374151; font-size:13px; font-weight:600; cursor:pointer; transition:all .15s; }
.pagination__btn:hover  { background:#EFF6FF; border-color:#BFDBFE; color:#1a6fd4; }
.pagination__btn.active { background:#1a6fd4; border-color:#1a6fd4; color:#fff; }
.pagination__btn:disabled { opacity:.35; cursor:default; }
.pagination__per-page   { display:flex; align-items:center; gap:6px; font-size:12px; color:#6B7280; margin-left:8px; }
.pagination__per-page select { border:1px solid #E2E8F0; border-radius:6px; padding:4px 8px; font-size:12px; background:#fff; }

/* Role radio cards — fix clickable area */
.role-radio-group       { display:flex; gap:8px; }
.role-radio-label       { flex:1; border:2px solid #E2E8F0; border-radius:8px; padding:10px 8px; text-align:center; cursor:pointer; font-size:12px; font-weight:700; color:#6B7280; transition:all .15s; user-select:none; }
.role-radio-label:hover { border-color:#93C5FD; background:#EFF6FF; color:#1a6fd4; }
.role-radio-label.selected { border-color:#1a6fd4; background:#EFF6FF; color:#1a6fd4; }
.role-radio-label input { position:absolute; opacity:0; width:0; height:0; }

/* Report page */
.report-filter-bar      { display:flex; flex-wrap:wrap; gap:8px; align-items:flex-end; background:#fff; border:1px solid #E2E8F0; border-radius:12px; padding:16px; margin-bottom:16px; }
.report-filter-bar .form-group { margin:0; flex:1 1 160px; }
.report-filter-bar .form-label { font-size:11px; }
.report-actions         { display:flex; gap:8px; align-items:center; margin-top:2px; }
.export-btn             { display:inline-flex; align-items:center; gap:6px; background:#059669; color:#fff; border:none; border-radius:8px; padding:8px 16px; font-size:13px; font-weight:700; cursor:pointer; }
.export-btn:hover       { background:#047857; }
.report-summary         { display:flex; gap:10px; flex-wrap:wrap; margin-bottom:14px; }
.report-summary__item   { background:#fff; border:1px solid #E2E8F0; border-radius:10px; padding:10px 18px; text-align:center; flex:1 1 100px; }
.report-summary__value  { font-size:22px; font-weight:800; color:#0F172A; }
.report-summary__label  { font-size:11px; color:#6B7280; margin-top:2px; }

/* ── Business Type Palette ─────────────────────────────────────────────────── */
.palette-swatch-biz { 
  width:28px; 
  height:28px; 
  border-radius:7px; 
  border:3px solid transparent; 
  cursor:pointer; 
  transition:all .12s; 
}
.palette-swatch-biz.selected { 
  border-color:#0F172A; 
  box-shadow:0 0 0 2px #fff, 0 0 0 4px var(--sw-color); 
}

/* ── User Profile Dropdown ─────────────────────────────────────────────────── */
.user-profile-dropdown { position: relative; }
.user-profile-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: #ffffff;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #0F172A;
}
.user-profile-btn:hover { background: #F8FAFC; }
.user-profile-icon { font-size: 18px; }
.user-profile-name { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-profile-arrow { font-size: 10px; color: #64748B; transition: transform 0.2s; }
.user-profile-btn.active .user-profile-arrow { transform: rotate(180deg); }

.user-profile-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  background: #ffffff;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  padding: 8px;
  z-index: 1000;
}
.user-profile-menu-header {
  padding: 12px 14px;
  border-bottom: 1px solid #E2E8F0;
  margin-bottom: 8px;
}
.user-profile-menu-name {
  font-size: 15px;
  font-weight: 700;
  color: #0F172A;
  margin-bottom: 4px;
}
.user-profile-menu-role {
  font-size: 12px;
  color: #64748B;
  text-transform: capitalize;
}
.user-profile-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  background: transparent;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  color: #475569;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s;
}
.user-profile-menu-item:hover {
  background: #F1F5F9;
  color: #0F172A;
}
.user-profile-menu-logout {
  color: #DC2626;
}
.user-profile-menu-logout:hover {
  background: #FEF2F2;
  color: #DC2626;
}

/* ── Modal ─────────────────────────────────────────────────────────────────── */
.modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(3px);
}
.modal-content {
  position: relative;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 32px 80px rgba(0,0,0,0.2), 0 0 0 1px rgba(0,0,0,0.05);
  width: 100%;
  max-width: 520px;
  animation: fadeUp 0.3s;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #E2E8F0;
}
.modal-title {
  font-size: 18px;
  font-weight: 700;
  color: #0F172A;
}
.modal-close {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #F1F5F9;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  color: #64748B;
  cursor: pointer;
  transition: background .15s;
}
.modal-close:hover {
  background: #E2E8F0;
  color: #0F172A;
}
.modal-content form {
  padding: 24px;
}

/* ── Pagination Hidden ─────────────────────────────────────────────────────── */
.pagination-hidden {
  display: none !important;
}

/* ── Pagination Buttons ────────────────────────────────────────────────────── */
.pagination-btn {
  min-width: 32px;
  height: 32px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border: 1px solid #E2E8F0;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s;
}
.pagination-btn:hover:not(.disabled) {
  background: #F8FAFC;
  border-color: #CBD5E1;
  color: #0F172A;
}
.pagination-btn.active {
  background: #1a6fd4;
  border-color: #1a6fd4;
  color: #ffffff;
}
.pagination-btn.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ── Profile Dropdown ──────────────────────────────────────────────────────── */
.profile-dropdown { position: relative; }

.profile-dropdown__trigger {
  display: flex; align-items: center; gap: 10px;
  padding: 5px 10px 5px 6px;
  border-radius: 12px;
  border: 1.5px solid #E2E8F0;
  background: #F8FAFC;
  cursor: pointer;
  transition: all .15s;
}
.profile-dropdown__trigger:hover {
  background: #EFF6FF;
  border-color: #BFDBFE;
  box-shadow: 0 2px 8px rgba(59,130,246,.08);
}
.profile-avatar {
  width: 30px; height: 30px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.profile-info { text-align: left; }
.profile-name  { font-size: 13px; font-weight: 700; color: #0F172A; line-height: 1.2; }
.profile-id    { font-size: 11px; color: #64748B; display: flex; align-items: center; gap: 4px; }
.profile-dot   { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.profile-chevron { color: #94A3B8; transition: transform .2s; flex-shrink: 0; }
.profile-dropdown__trigger[aria-expanded="true"] .profile-chevron { transform: rotate(180deg); }

/* ── Profile Dropdown Menu ─────────────────────────────────────────────── */
.profile-dropdown__menu {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 200;
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0,0,0,.14), 0 4px 16px rgba(0,0,0,.06);
  min-width: 260px;
  overflow: hidden;
  animation: menuDrop .18s cubic-bezier(.16,1,.3,1);
}

@keyframes menuDrop {
  from { opacity:0; transform: translateY(-8px) scale(.97); }
  to   { opacity:1; transform: translateY(0) scale(1); }
}

/* Header section */
.profile-menu__header {
  padding: 16px 16px 14px;
  background: #F8FAFC;
  display: flex; align-items: center; gap: 12px;
  border-bottom: 1px solid rgba(0,0,0,.06);
}
.profile-menu__avatar {
  width: 42px; height: 42px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.profile-menu__identity { min-width: 0; }
.profile-menu__name {
  font-weight: 800; font-size: 14px; color: #0F172A;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  letter-spacing: -.01em;
}
.profile-menu__meta {
  display: flex; align-items: center; gap: 6px; margin-top: 4px; flex-wrap: wrap;
}
.profile-menu__id-badge {
  font-size: 10.5px; font-weight: 700; color: #64748B;
  background: #F1F5F9; border: 1px solid #E2E8F0;
  padding: 1px 7px; border-radius: 6px; letter-spacing: .04em;
  font-family: 'JetBrains Mono', monospace;
}
.profile-menu__role-badge {
  font-size: 10px; font-weight: 700;
  border: 1px solid;
  padding: 1px 7px; border-radius: 6px;
  letter-spacing: .04em;
}

/* Section label */
.profile-menu__section-label {
  font-size: 10px; font-weight: 700; color: #94A3B8;
  letter-spacing: .08em; text-transform: uppercase;
  padding: 10px 16px 4px;
}

/* Divider */
.profile-menu__divider { height: 1px; background: #F1F5F9; margin: 4px 0; }

/* Menu items */
.profile-menu__item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  font-size: 13px; font-weight: 600; color: #374151;
  cursor: pointer; background: none; border: none;
  width: 100%; text-align: left; text-decoration: none;
  transition: background .12s;
  border-radius: 0;
}
.profile-menu__item:hover { background: #F8FAFC; color: #0F172A; }
.profile-menu__item--danger { color: #DC2626; }
.profile-menu__item--danger:hover { background: #FFF5F5; }

.profile-menu__item-icon {
  width: 28px; height: 28px; border-radius: 8px;
  background: #F1F5F9; border: 1px solid #E8ECF0;
  display: flex; align-items: center; justify-content: center;
  color: #64748B; flex-shrink: 0;
  transition: all .12s;
}
.profile-menu__item:hover .profile-menu__item-icon {
  background: #EFF6FF; border-color: #BFDBFE; color: #19b857;
}
.profile-menu__item--danger .profile-menu__item-icon {
  background: #FFF5F5; border-color: #FECACA; color: #EF4444;
}
.profile-menu__item-label { flex: 1; }
.profile-menu__item-arrow { color: #CBD5E1; flex-shrink: 0; }
.profile-menu__item:hover .profile-menu__item-arrow { color: #94A3B8; }

/* Notification indicator dot in menu */
.profile-menu__notif-indicator {
  width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
}
.profile-menu__notif-indicator.is-on    { background: #22C55E; box-shadow: 0 0 0 2px rgba(34,197,94,.2); }
.profile-menu__notif-indicator.is-off   { background: #CBD5E1; }
.profile-menu__notif-indicator.is-blocked { background: #EF4444; }

/* ── Notification Settings Modal Styles ───────────────────────────────── */
.notif-status-card {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; border-radius: 14px;
  border: 1.5px solid #E2E8F0; background: #F8FAFC;
  margin-bottom: 16px;
}
.notif-status-card.is-granted { border-color: #86EFAC; background: #F0FDF4; }
.notif-status-card.is-denied  { border-color: #FECACA; background: #FFF5F5; }
.notif-status-card.is-default { border-color: #FDE68A; background: #FFFBEB; }

.notif-status-card__icon {
  width: 40px; height: 40px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: #E2E8F0; color: #64748B; flex-shrink: 0;
}
.is-granted .notif-status-card__icon { background: #DCFCE7; color: #16A34A; }
.is-denied  .notif-status-card__icon { background: #FEE2E2; color: #DC2626; }
.is-default .notif-status-card__icon { background: #FEF3C7; color: #D97706; }

.notif-status-card__title { font-weight: 700; font-size: 14px; color: #0F172A; }
.notif-status-card__sub   { font-size: 12px; color: #64748B; margin-top: 2px; }
.notif-status-card__badge {
  margin-left: auto; font-size: 10px; font-weight: 700;
  padding: 3px 10px; border-radius: 20px; white-space: nowrap; flex-shrink: 0;
}
.is-granted .notif-status-card__badge { background: #DCFCE7; color: #15803D; }
.is-denied  .notif-status-card__badge { background: #FEE2E2; color: #DC2626; }
.is-default .notif-status-card__badge { background: #FEF3C7; color: #B45309; }

/* Toggle row */
.notif-toggle-row {
  display: flex; align-items: flex-start; gap: 16px;
  padding: 14px 0; border-top: 1px solid #F1F5F9; border-bottom: 1px solid #F1F5F9;
  margin-bottom: 14px;
}
.notif-toggle-row__info { flex: 1; }
.notif-toggle-row__label { font-weight: 700; font-size: 13.5px; color: #0F172A; }
.notif-toggle-row__sub   { font-size: 12px; color: #64748B; margin-top: 3px; line-height: 1.5; }

/* iOS-style toggle */
.notif-toggle {
  flex-shrink: 0; width: 46px; height: 26px;
  border-radius: 13px; border: none; cursor: pointer;
  background: #CBD5E1; position: relative; transition: background .2s;
  margin-top: 2px;
}
.notif-toggle.is-on { background: #22C55E; }
.notif-toggle.is-disabled { opacity: .5; cursor: not-allowed; }
.notif-toggle__knob {
  position: absolute; top: 3px; left: 3px;
  width: 20px; height: 20px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.2);
  transition: left .2s cubic-bezier(.34,1.56,.64,1);
}
.notif-toggle.is-on .notif-toggle__knob { left: 23px; }

/* Info box */
.notif-info-box {
  display: flex; align-items: flex-start; gap: 8px;
  background: #EFF6FF; border: 1px solid #BFDBFE;
  border-radius: 10px; padding: 10px 12px;
  font-size: 12px; color: #1a6fd4; font-weight: 500;
  line-height: 1.5; margin-bottom: 12px;
}

/* Blocked guide */
.notif-blocked-guide {
  background: #FFFBEB; border: 1px solid #FDE68A;
  border-radius: 12px; padding: 14px 16px; margin-bottom: 12px;
}
.notif-blocked-guide__title {
  font-weight: 700; font-size: 12.5px; color: #92400E; margin-bottom: 10px;
}
.notif-blocked-guide__step {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 12px; color: #78350F; margin-bottom: 7px;
  line-height: 1.5;
}
.notif-blocked-guide__num {
  flex-shrink: 0; width: 20px; height: 20px; border-radius: 50%;
  background: #F59E0B; color: #fff;
  font-weight: 800; font-size: 10px;
  display: flex; align-items: center; justify-content: center;
}

/* ── Copy Button ────────────────────────────────────────────────────────────── */
.copy-btn {
  padding: 3px 8px; border-radius: 6px;
  border: 1.5px solid #BFDBFE; background: #EFF6FF; color: #1a6fd4;
  font-size: 13px; font-weight: 700; cursor: pointer;
  transition: all .15s; line-height: 1; flex-shrink: 0;
}
.copy-btn:hover { background: #DBEAFE; border-color: #93C5FD; }
.copy-btn--sm { padding: 2px 6px; font-size: 11px; border-radius: 5px; }

.req-card__txn-wrap {
  display: flex; align-items: center; gap: 6px;
}

/* ── Delete Reason Modal ─────────────────────────────────────────────────────── */
#delete-reason-modal .modal { animation: slideUp .2s ease; }

/* ── Delete History Table ────────────────────────────────────────────────────── */
#delete-history-modal table th,
#delete-history-modal table td { border-bottom: 1px solid #F1F5F9; }
#delete-history-modal table tr:hover td { background: #F8FAFC; }
#delete-history-modal table tr:last-child td { border-bottom: none; }

/* ── Notification Toast animation ────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Modal Details advanced layout ──────────────────────────────────────────── */
.modal--details { border-radius: 18px; overflow: hidden; }
.modal--details .modal__footer {
  padding: 14px 24px; background: #F8FAFC; border-top: 1px solid #E2E8F0;
  display: flex; justify-content: flex-end;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ULTRA-MODERN RESPONSIVE MODAL SYSTEM
   ═══════════════════════════════════════════════════════════════════════════ */

/* Modern Modal Base */
.modal--modern {
  background: #FFFFFF;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.3), 0 0 0 1px rgba(0,0,0,0.05);
  width: 100%;
  max-width: 480px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  animation: modalSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalSlideUp {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Modern Header */
.modal__header-modern {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 24px 24px 20px;
  background: #FAFBFC;
  border-bottom: 1px solid #E5E7EB;
  flex-shrink: 0;
}

.modal__icon-modern {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.modal__icon--danger {
  background: #FEE2E2;
  color: #DC2626;
}

.modal__icon--primary {
  background: #EFF6FF;
  color: #1a6fd4;
}

.modal__icon--success {
  background: #ECFDF5;
  color: #059669;
}

.modal__title-modern {
  flex: 1;
  font-size: 20px;
  font-weight: 800;
  color: #0F172A;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.modal__close-modern {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: #64748B;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  flex-shrink: 0;
}

.modal__close-modern:hover {
  background: #F1F5F9;
  color: #0F172A;
}

/* Modern Body */
.modal__body-modern {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

/* Alert Box */
.alert-box {
  display: flex;
  gap: 14px;
  padding: 16px;
  border-radius: 14px;
  margin-bottom: 20px;
  border: 1.5px solid;
}

.alert-box--warning {
  background: #FFFBEB;
  border-color: #FDE68A;
}

.alert-box--error {
  background: #FEF2F2;
  border-color: #FECACA;
}

.alert-box--info {
  background: #EFF6FF;
  border-color: #BFDBFE;
}

.alert-box__icon {
  font-size: 22px;
  line-height: 1;
  flex-shrink: 0;
}

.alert-box__content {
  flex: 1;
}

.alert-box__title {
  font-weight: 700;
  font-size: 14px;
  color: #78350F;
  margin-bottom: 4px;
}

.alert-box--error .alert-box__title {
  color: #991B1B;
}

.alert-box--info .alert-box__title {
  color: #1a6fd4;
}

.alert-box__message {
  font-size: 13px;
  color: #92400E;
  line-height: 1.5;
}

.alert-box--error .alert-box__message {
  color: #7F1D1D;
}

.alert-box--info .alert-box__message {
  color: #1E3A8A;
}

/* Modern Form Elements */
.form-group-modern {
  margin-bottom: 20px;
}

.form-label-modern {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
}

.form-required {
  color: #DC2626;
  font-weight: 700;
}

.form-textarea-modern,
.form-input-modern {
  width: 100%;
  padding: 13px 16px;
  border: 2px solid #E5E7EB;
  border-radius: 12px;
  font-size: 14px;
  font-family: inherit;
  color: #1F2937;
  background: #FFFFFF;
  transition: all 0.2s;
  resize: vertical;
}

.form-textarea-modern:focus,
.form-input-modern:focus {
  border-color: #19b857;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
  outline: none;
}

.form-hint {
  font-size: 12px;
  color: #6B7280;
  margin-top: 6px;
  line-height: 1.4;
}

/* Modern Footer */
.modal__footer-modern {
  padding: 20px 24px;
  background: #F9FAFB;
  border-top: 1px solid #E5E7EB;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-shrink: 0;
}

/* Modern Buttons */
.btn-modern {
  padding: 11px 20px;
  border-radius: 11px;
  font-weight: 600;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  line-height: 1;
  white-space: nowrap;
}

.btn-modern:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-modern--primary {
  background: #1a6fd4;
  color: white;
}

.btn-modern--primary:hover:not(:disabled) {
  background: #1863bb;
}

.btn-modern--danger {
  background: #DC2626;
  color: white;
}

.btn-modern--danger:hover:not(:disabled) {
  background: #b91c1c;
}

.btn-modern--success {
  background: #059669;
  color: white;
}

.btn-modern--success:hover:not(:disabled) {
  background: #047857;
}

.btn-modern--ghost {
  background: transparent;
  color: #6B7280;
  border: 1.5px solid #E5E7EB;
}

.btn-modern--ghost:hover:not(:disabled) {
  background: #F9FAFB;
  border-color: #D1D5DB;
  color: #374151;
}

/* Spinner for loading states */
.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  display: inline-block;
  margin-right: 8px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Deleted Request Card Styling */
.req-card--deleted {
  background: #F9FAFB;
  border-color: #E5E7EB;
  opacity: 0.92;
}

.status-pill--deleted {
  background: #F3F4F6;
  color: #6B7280;
  border-color: #E5E7EB;
}

.req-card__deleted-info {
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 10px;
  padding: 12px;
  margin-top: 12px;
}

/* Mobile: modals slide up from bottom */
@media (max-width: 640px) {
  .modal--modern {
    max-width: 100%;
    max-height: 92vh;
    border-radius: 20px 20px 0 0;
  }
  
  .modal-overlay {
    align-items: flex-end;
    padding: 0;
  }

  /* Change password modal — centered on all screen sizes, never bottom-sheet */
  #change-pw-modal {
    align-items: center !important;
    padding: 16px;
  }
  #change-pw-modal .modal--modern {
    border-radius: 20px !important;
    max-width: 420px;
    width: 100%;
  }

  /* Notification settings modal — always centered, never a bottom sheet */
  #notif-settings-modal {
    align-items: center !important;
    padding: 16px !important;
  }
  #notif-settings-sheet {
    border-radius: 20px !important;
    max-width: calc(100vw - 32px) !important;
    width: 100%;
  }
  
  .modal__header-modern {
    padding: 20px 20px 16px;
  }
  
  .modal__body-modern {
    padding: 20px;
  }
  
  .modal__footer-modern {
    padding: 16px 20px;
    flex-direction: column-reverse;
  }
  
  .btn-modern {
    width: 100%;
    justify-content: center;
  }
  
  .modal__icon-modern {
    width: 44px;
    height: 44px;
  }
  
  .modal__title-modern {
    font-size: 18px;
  }
}

/* Desktop: always centered, never flex-end */
@media (min-width: 641px) {
  .modal-overlay {
    align-items: center !important;
    padding: 20px;
  }
  .modal--modern {
    max-width: 480px;
    border-radius: 24px;
  }
  #change-pw-modal {
    align-items: center !important;
    padding: 20px;
  }
  #change-pw-modal .modal--modern {
    max-width: 420px;
    border-radius: 20px !important;
  }
  /* Notification settings modal — always centered on desktop */
  #notif-settings-modal {
    align-items: center !important;
    padding: 20px !important;
  }
  #notif-settings-sheet {
    max-width: 460px;
    border-radius: 24px !important;
    width: 100%;
  }
}

/* Tablet */
@media (min-width: 641px) and (max-width: 768px) {
  .modal--modern {
    max-width: 90%;
  }
}

/* ── Mobile Card Toolbar (search + per-page for mob-only lists) ──────────────── */
.mob-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0 8px;
}
.mob-search {
  flex: 1;
  height: 36px;
  padding: 0 12px;
  border: 1.5px solid #E2E8F0;
  border-radius: 10px;
  font-size: 13px;
  background: #fff;
  color: #0F172A;
  outline: none;
}
.mob-search:focus { border-color: #1a6fd4; box-shadow: 0 0 0 3px rgba(29,78,216,.1); }
.mob-perpage-wrap { display: flex; align-items: center; gap: 5px; flex-shrink: 0; }
.mob-perpage-label { font-size: 11px; font-weight: 600; color: #6B7280; }
.mob-perpage-select {
  height: 36px;
  padding: 0 8px;
  border: 1.5px solid #E2E8F0;
  border-radius: 10px;
  font-size: 12px;
  background: #fff;
  color: #374151;
  cursor: pointer;
}
.mob-results-info {
  font-size: 11px;
  color: #6B7280;
  padding-bottom: 6px;
  min-height: 16px;
}
.mob-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 14px 0 4px;
  flex-wrap: wrap;
}
.mob-page-btn {
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border: 1.5px solid #E2E8F0;
  border-radius: 8px;
  background: #fff;
  color: #374151;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mob-page-btn.active {
  background: #1a6fd4;
  border-color: #1a6fd4;
  color: #fff;
}
.mob-page-btn:disabled { opacity: .4; cursor: default; }

/* ── Footer ──────────────────────────────────────────────────────────────────── */


/* ═══════════════════════════════════════════════════════════════════════════
   FOOTER — v1.0
   ═══════════════════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════════════════
   APP FOOTER — Professional 3-column layout
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Footer ──────────────────────────────────────────────────────────────── */
.app-footer {
  background: #080E1A;
  border-top: 1px solid rgba(255,255,255,.06);
  margin-top: auto;
}

/* ─── Hide elements when running as installed PWA (standalone mode) ─────── */
@media (display-mode: standalone) {
  .pwa-hide { display: none !important; }
}

/* ─── PWA Install Strip ──────────────────────────────────────────────────── */
.pwa-strip {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(99,102,241,.2);
  background: #0B1220;
}

/* Animated shimmer glow behind the strip */
.pwa-strip__glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 100% at 20% 50%, rgba(59,130,246,.12) 0%, transparent 70%),
    radial-gradient(ellipse 40% 80% at 80% 50%, rgba(99,102,241,.10) 0%, transparent 70%);
  pointer-events: none;
  animation: pwaGlowShift 6s ease-in-out infinite alternate;
}

@keyframes pwaGlowShift {
  from { opacity: .7; }
  to   { opacity: 1; }
}

.pwa-strip__inner {
  position: relative;
  max-width: 1400px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* App identity */
.pwa-strip__identity {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.pwa-strip__icon-wrap {
  position: relative;
  flex-shrink: 0;
}

.pwa-strip__icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  object-fit: contain;
  border: 1px solid rgba(99,102,241,.3);
  background: rgba(99,102,241,.1);
  box-shadow: 0 0 16px rgba(99,102,241,.25);
}

/* Pulsing ring around the icon */
.pwa-strip__icon-ping {
  position: absolute;
  inset: -3px;
  border-radius: 13px;
  border: 1.5px solid rgba(99,102,241,.5);
  animation: pingRing 2.4s ease-in-out infinite;
}

@keyframes pingRing {
  0%, 100% { opacity: .5; transform: scale(1); }
  50%       { opacity: 0; transform: scale(1.18); }
}

.pwa-strip__copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.pwa-strip__headline {
  font-size: 13px;
  font-weight: 800;
  color: #F1F5F9;
  letter-spacing: -.01em;
  line-height: 1;
}

.pwa-strip__tagline {
  font-size: 10.5px;
  color: rgba(255,255,255,.35);
  font-weight: 500;
  letter-spacing: .01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Action area */
.pwa-strip__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* THE INSTALL BUTTON */
.pwa-strip__install-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 20px;
  height: 38px;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: .02em;
  color: #fff;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  overflow: hidden;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  /* Layered gradient background */
  background: #1a6fd4;
  transition: transform .15s, box-shadow .15s, opacity .15s;
}

/* Shimmer sweep on the button */
.pwa-strip__install-btn::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.18), transparent);
  animation: btnShimmer 3s ease-in-out infinite;
}

@keyframes btnShimmer {
  0%   { left: -100%; }
  50%  { left: 150%; }
  100% { left: 150%; }
}

.pwa-strip__install-btn:hover {
  transform: translateY(-1px);
  box-shadow:
    0 0 0 1px rgba(99,102,241,.7),
    0 6px 24px rgba(79,70,229,.65),
    0 1px 0 rgba(255,255,255,.2) inset;
}

.pwa-strip__install-btn:active {
  transform: translateY(0) scale(.97);
  box-shadow:
    0 0 0 1px rgba(99,102,241,.4),
    0 2px 8px rgba(79,70,229,.4),
    0 1px 0 rgba(255,255,255,.1) inset;
}

.pwa-strip__install-btn:disabled {
  opacity: .6;
  cursor: not-allowed;
  transform: none;
  animation: none;
}

.pwa-strip__btn-icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.3));
}

.pwa-strip__btn-label {
  position: relative;
  z-index: 1;
}

/* Dismiss X button */
.pwa-strip__dismiss {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.04);
  color: rgba(255,255,255,.3);
  cursor: pointer;
  flex-shrink: 0;
  transition: all .15s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.pwa-strip__dismiss:hover  { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.15); color: rgba(255,255,255,.7); }
.pwa-strip__dismiss:active { background: rgba(255,255,255,.15); transform: scale(.93); }

/* ─── Main footer bar ────────────────────────────────────────────────────── */
.app-footer__inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 13px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.app-footer__brand {
  display: flex;
  align-items: center;
  gap: 9px;
}

.app-footer__logo {
  width: 26px;
  height: 26px;
  object-fit: contain;
  flex-shrink: 0;
  opacity: .7;
}

.app-footer__brand-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.app-footer__brand-name {
  font-size: 11px;
  font-weight: 900;
  color: rgba(255,255,255,.4);
  letter-spacing: .12em;
  text-transform: uppercase;
  line-height: 1;
}

.app-footer__brand-tagline {
  font-size: 9.5px;
  color: rgba(255,255,255,.18);
  font-weight: 500;
  letter-spacing: .02em;
}

.app-footer__status-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.app-footer__divider {
  color: rgba(255,255,255,.12);
  font-size: 12px;
}

.app-footer__status {
  display: flex;
  align-items: center;
  gap: 5px;
}

.app-footer__status-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #22C55E;
  box-shadow: 0 0 0 2px rgba(34,197,94,.2);
  animation: pulse-status 2.5s infinite;
}

@keyframes pulse-status {
  0%,100% { box-shadow: 0 0 0 2px rgba(34,197,94,.2); }
  50%      { box-shadow: 0 0 0 5px rgba(34,197,94,.06); }
}

.app-footer__status-text {
  font-size: 10.5px;
  font-weight: 700;
  color: rgba(34,197,94,.7);
}

.app-footer__meta-value {
  font-size: 10.5px;
  color: rgba(255,255,255,.18);
  font-weight: 500;
}

.app-footer__copy {
  font-size: 10px;
  color: rgba(255,255,255,.15);
  font-weight: 500;
}

/* ── Mobile ── */
@media (max-width: 640px) {
  .pwa-strip__inner   { padding: 10px 16px; gap: 10px; }
  .pwa-strip__tagline { display: none; }
  .pwa-strip__icon    { width: 32px; height: 32px; }
  .pwa-strip__install-btn { height: 36px; padding: 0 16px; font-size: 12px; }

  .app-footer__inner  { padding: 11px 16px; justify-content: center; gap: 10px; }
  .app-footer__brand  { display: none; }
  .app-footer__copy   { font-size: 9.5px; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   HISTORY TOOLBAR — Search + Per-page
   ═══════════════════════════════════════════════════════════════════════════ */

.history-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

/* Search box */
.history-search-wrap {
  flex: 1;
  min-width: 180px;
  position: relative;
  display: flex;
  align-items: center;
}

.history-search-icon {
  position: absolute;
  left: 10px;
  color: #94A3B8;
  pointer-events: none;
  flex-shrink: 0;
}

.history-search-input {
  width: 100%;
  height: 36px;
  padding: 0 32px 0 32px;
  border: 1.5px solid #E2E8F0;
  border-radius: 10px;
  font-size: 13px;
  color: #0F172A;
  background: #F8FAFC;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  font-family: inherit;
}

.history-search-input::placeholder { color: #94A3B8; }

.history-search-input:focus {
  border-color: #19b857;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(59,130,246,.12);
}

.history-search-clear {
  position: absolute;
  right: 8px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: none;
  background: #CBD5E1;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .12s;
  flex-shrink: 0;
}
.history-search-clear:hover { background: #94A3B8; }

/* Per-page selector */
.history-perpage-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.history-perpage-label {
  font-size: 12px;
  font-weight: 600;
  color: #64748B;
  white-space: nowrap;
}

.history-perpage-select {
  height: 36px;
  padding: 0 28px 0 10px;
  border: 1.5px solid #E2E8F0;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: #0F172A;
  background: #F8FAFC;
  cursor: pointer;
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  transition: border-color .15s;
}
.history-perpage-select:focus { border-color: #19b857; }

/* Results info */
.history-results-info {
  font-size: 12px;
  color: #64748B;
  margin-bottom: 8px;
  padding: 0 2px;
}

/* ── Pagination bar ─────────────────────────────────────────────────────── */
.history-pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid #F1F5F9;
  margin-top: 4px;
  flex-wrap: wrap;
}

.history-pagination-info {
  font-size: 12px;
  color: #64748B;
  font-weight: 500;
  white-space: nowrap;
}

.history-pagination-btns {
  display: flex;
  align-items: center;
  gap: 4px;
}

.h-page-btn {
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border-radius: 8px;
  border: 1.5px solid #E2E8F0;
  background: #fff;
  font-size: 12px;
  font-weight: 700;
  color: #374151;
  cursor: pointer;
  transition: all .12s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
}

.h-page-btn:hover:not(.h-page-btn--disabled):not(.h-page-btn--active) {
  background: #F1F5F9;
  border-color: #CBD5E1;
  color: #0F172A;
}

.h-page-btn--active {
  background: #19b857;
  border-color: #19b857;
  color: #fff;
  box-shadow: 0 2px 6px rgba(59,130,246,.3);
}

.h-page-btn--disabled {
  color: #CBD5E1;
  border-color: #F1F5F9;
  background: #F8FAFC;
  cursor: not-allowed;
}

.h-page-dots {
  font-size: 13px;
  color: #94A3B8;
  padding: 0 4px;
  line-height: 32px;
}

/* Empty search state */
.history-empty-search {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 32px 20px;
  color: #94A3B8;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}



.app-main {
  flex: 1;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .app-footer__copy,
  .app-footer__brand-maker { display: none; }
  .app-footer__inner { height: 48px; }
  .app-footer__center { display: none; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   LOGIN — Remember Me, Forgot Password, Footer, Success state
   ═══════════════════════════════════════════════════════════════════════════ */

/* Remember Me checkbox */
.login-remember {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.login-remember__cb {
  display: none; /* hidden, replaced by custom box */
}

.login-remember__box {
  width: 18px;
  height: 18px;
  border: 2px solid #CBD5E1;
  border-radius: 5px;
  background: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all .15s;
  color: transparent;
}

.login-remember__cb:checked + .login-remember__box {
  background: #19b857;
  border-color: #19b857;
  color: #FFFFFF;
}

.login-remember:hover .login-remember__box {
  border-color: #19b857;
}

.login-remember__label {
  font-size: 13px;
  color: #64748B;
  font-weight: 500;
}

/* Forgot password link */
.login-forgot {
  font-size: 13px;
  color: #19b857;
  text-decoration: none;
  font-weight: 600;
  transition: color .15s;
}

.login-forgot:hover {
  color: #1a6fd4;
  text-decoration: underline;
}

/* Login card footer */
.login-card__footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid #F1F5F9;
  font-size: 11px;
  color: #CBD5E1;
}

.login-card__footer-sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #CBD5E1;
}

/* Forgot password success state */
.login-success-state {
  text-align: center;
  padding: 8px 0 4px;
}

.login-success-state__icon {
  width: 64px;
  height: 64px;
  background: #ECFDF5;
  border: 2px solid #A7F3D0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.login-success-state__title {
  font-size: 18px;
  font-weight: 800;
  color: #1E293B;
  margin-bottom: 8px;
}

.login-success-state__body {
  font-size: 13px;
  color: #475569;
  margin-bottom: 8px;
  line-height: 1.5;
}

.login-success-state__hint {
  font-size: 12px;
  color: #94A3B8;
  line-height: 1.5;
}

/* Alert success */
.alert--success {
  background: #ECFDF5;
  border: 1.5px solid #A7F3D0;
  color: #065F46;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 500;
}

/* Spin animation for loading button */
@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* Form hint text */
.form-hint {
  font-size: 11px;
  color: #94A3B8;
  margin-top: 5px;
  line-height: 1.4;
}

/* ── Branch Dashboard — Live badge & compact additions ───────────────────────── */
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 700;
  color: #059669;
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  border-radius: 20px;
  padding: 3px 9px;
}
.live-badge__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #059669;
  display: inline-block;
  animation: blink 1.4s infinite;
}

/* ── Compact form card ───────────────────────────────────────────────────────── */
.form-card .form-label { font-size: 10px; margin-bottom: 4px; }
.form-card .btn--full  { margin-top: 4px; }

/* ── Request list compact on all sizes ───────────────────────────────────────── */
.request-list { gap: 8px; }
.req-card__deleted-info { margin-top: 6px; }

/* ── Touch-friendly mobile tap targets ───────────────────────────────────────── */
@media (max-width: 480px) {
  .btn--sm { padding: 6px 12px; font-size: 11px; }
  .type-pill { padding: 5px 10px; font-size: 11px; }
  .biz-btn { padding: 7px 6px; }
  .history-search-input { font-size: 13px; }
  .stat-card { min-width: 58px; }
}

/* ── Connection status badge (replaces old .live-badge) ─────────────────────── */
.conn-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 700;
  border-radius: 20px;
  padding: 3px 9px;
  border: 1px solid;
  transition: color .3s, background .3s, border-color .3s;
  /* LIVE (online) defaults */
  color: #059669;
  background: #ECFDF5;
  border-color: #A7F3D0;
}
.conn-badge--offline {
  color: #DC2626;
  background: #FEF2F2;
  border-color: #FECACA;
}
.conn-badge__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
  flex-shrink: 0;
  animation: conn-blink 1.4s infinite;
}
.conn-badge--offline .conn-badge__dot {
  animation: none;
}
@keyframes conn-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.35; }
}

/* ── Refresh button ──────────────────────────────────────────────────────────── */
.refresh-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid #E2E8F0;
  background: #F8FAFC;
  color: #64748B;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: background .15s, border-color .15s, color .15s, transform .2s;
}
.refresh-btn:hover {
  background: #EFF6FF;
  border-color: #BFDBFE;
  color: #1a6fd4;
}
.refresh-btn:active {
  transform: rotate(180deg);
  background: #DBEAFE;
}
.refresh-btn svg {
  pointer-events: none;
}
.refresh-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: #F1F5F9;
  border-color: #E2E8F0;
  color: #94A3B8;
}
.refresh-btn:disabled:active {
  transform: none;
}

/* ── Scroll-to-top floating button ──────────────────────────────────────────── */
#scroll-top-btn {
  position: fixed;
  bottom: 24px;
  right: 18px;
  z-index: 900;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #1a6fd4;
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(29,78,216,.35), 0 1px 4px rgba(0,0,0,.15);
  opacity: 0;
  transform: translateY(12px) scale(0.85);
  pointer-events: none;
  transition: opacity .25s ease, transform .25s cubic-bezier(.34,1.56,.64,1);
}
#scroll-top-btn.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
#scroll-top-btn:hover {
  background: #1a6fd4;
  transform: translateY(-2px) scale(1.07);
  box-shadow: 0 8px 24px rgba(29,78,216,.45);
}
#scroll-top-btn:active {
  transform: scale(0.95);
}
#scroll-top-btn svg {
  pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   ASYS v3 — GLOBAL RESPONSIVE SYSTEM
   Full-width, mobile-first across ALL views
   ═══════════════════════════════════════════════════════════════════════════════ */

/* ── Page shell — remove max-width cap, let content breathe ── */
.app-main {
  padding: 16px;
  max-width: 100%;
  box-sizing: border-box;
}
@media (min-width: 640px)  { .app-main { padding: 18px 24px; } }
@media (min-width: 1024px) { .app-main { padding: 22px 36px; } }
@media (min-width: 1400px) { .app-main { padding: 24px 56px; } }
@media (min-width: 1800px) { .app-main { padding: 26px 80px; } }

/* ── Page wrap — always full width ── */
.page-wrap { width: 100%; }

/* ── Stat row — horizontal scroll on small, grid on large ── */
.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
@media (max-width: 640px) {
  .stat-row {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 8px;
    padding-bottom: 4px;
  }
  .stat-row::-webkit-scrollbar { display: none; }
  .stat-card { flex: 0 0 auto; min-width: 80px; }
}

/* ── Stat card — slightly larger values ── */
.stat-card { padding: 12px 14px; }
.stat-card__value { font-size: clamp(22px, 5vw, 38px); }
.stat-card__label { font-size: 10px; }

/* ── Filter bar — wraps nicely on any width ── */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 10px 14px;
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  margin-bottom: 14px;
}
.filter-bar .form-input  { flex: 1 1 140px; min-width: 100px; }
.filter-bar .form-select { flex: 1 1 130px; min-width: 100px; }
@media (max-width: 480px) {
  .filter-bar { padding: 8px 10px; gap: 6px; }
  .filter-bar .form-input,
  .filter-bar .form-select { flex: 1 1 100%; }
}

/* ── Tab row — horizontal scroll, never wraps awkwardly ── */
.tab-row {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.tab-row::-webkit-scrollbar { display: none; }
.tab-btn { flex-shrink: 0; }

/* ── Admin tabs — horizontal scroll on mobile ── */
.admin-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid #E2E8F0;
  margin-bottom: 20px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.admin-tabs::-webkit-scrollbar { display: none; }
.admin-tab-btn { flex-shrink: 0; padding: 10px 14px; font-size: 12px; }
@media (min-width: 768px) { .admin-tab-btn { padding: 11px 18px; font-size: 13px; } }

/* ── Admin two-col — responsive grid ── */
.admin-two-col {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 20px;
  align-items: start;
}
@media (max-width: 1100px) { .admin-two-col { grid-template-columns: 300px 1fr; } }
@media (max-width: 860px)  { .admin-two-col { grid-template-columns: 1fr; } }

/* ── Branch two-col layout ── */
.two-col-layout {
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 14px;
  align-items: start;
}
@media (max-width: 1200px) { .two-col-layout { grid-template-columns: 290px 1fr; } }
@media (max-width: 900px)  { .two-col-layout { grid-template-columns: 1fr; } }

/* ── Tables — always wrap in scrollable div, never clip ── */
.data-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 12px;
  border: 1px solid #E2E8F0;
  background: #fff;
}
.data-table { min-width: 700px; }

/* ── Modal — full-width sheet on mobile ── */
@media (max-width: 600px) {
  .modal-overlay {
    padding: 0;
    align-items: flex-end;
  }
  .modal {
    border-radius: 20px 20px 0 0;
    max-height: 92vh;
    max-width: 100% !important;
    padding: 22px 18px 32px;
  }
  .modal--slim,
  .modal--modern { border-radius: 20px 20px 0 0; max-width: 100% !important; }
  .mbg { align-items: flex-end !important; padding: 0 !important; }
  .mdl { border-radius: 16px 16px 0 0 !important; max-width: 100% !important; }
}

/* ── Cards — full width on small screens ── */
.card { width: 100%; }

/* ── Form groups — comfortable spacing ── */
.form-group { margin-bottom: 14px; }
.form-input, .form-select { font-size: 14px; padding: 10px 12px; }
@media (max-width: 480px) {
  .form-input, .form-select { font-size: 16px; } /* prevent iOS zoom */
}

/* ── Buttons — touch-friendly ── */
.btn { min-height: 38px; }
.btn--sm { min-height: 30px; padding: 5px 12px; }
@media (max-width: 480px) {
  .btn { min-height: 42px; }
  .btn--sm { min-height: 34px; }
}

/* ── Utility: hide / show by breakpoint ── */
.hide-on-mobile  { display: block; }
.show-on-mobile  { display: none; }
@media (max-width: 640px) {
  .hide-on-mobile { display: none !important; }
  .show-on-mobile { display: block !important; }
}

/* ── Routing grid — wraps on small screens ── */
.routing-type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}
@media (max-width: 480px) {
  .routing-type-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
}

/* ── Report filter bar ── */
.report-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
}
.report-filter-bar .form-group { flex: 1 1 160px; margin: 0; min-width: 140px; }
@media (max-width: 640px) {
  .report-filter-bar .form-group { flex: 1 1 100%; }
  .report-actions { flex-wrap: wrap; gap: 6px; }
}

/* ── Report summary cards ── */
.report-summary { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.report-summary__item { flex: 1 1 100px; min-width: 80px; }

/* ── Account row — responsive on small screens ── */
.account-row { flex-wrap: wrap; gap: 8px; }
.account-row__actions { flex-shrink: 0; margin-left: 0; }
@media (min-width: 600px) { .account-row__actions { margin-left: auto; } }

/* ── SLA table — scrollable ── */
.sla-table { overflow-x: auto; max-width: 100%; }

/* ── Biz grid — more columns on wider screens ── */
.biz-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 8px;
}
@media (max-width: 400px) { .biz-grid { grid-template-columns: repeat(2, 1fr); } }

/* ── Type pills — wrap naturally ── */
.type-pills { display: flex; flex-wrap: wrap; gap: 6px; }

/* ── Request cards on mobile — full width, no table ── */
.data-table-wrap.desktop-only { display: block; }
.request-list.mobile-only     { display: none; }
@media (max-width: 768px) {
  .data-table-wrap.desktop-only { display: none !important; }
  .request-list.mobile-only     { display: flex !important; flex-direction: column; gap: 10px; }
}

/* ── Admin panel — proper padding on all sizes ── */
.admin-panel { width: 100%; }

/* ── Pagination — wraps on mobile ── */
.pagination {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 12px 16px;
}
.pagination__info { flex: 1 1 100%; font-size: 12px; }
@media (min-width: 500px) { .pagination__info { flex: 0 0 auto; } }

/* ── Routing card header — stacks on narrow screens ── */
.routing-card__header { flex-wrap: wrap; gap: 10px; }

/* ── Profile dropdown trigger — shrink on mobile ── */
@media (max-width: 380px) {
  .profile-info { display: none; }
  .profile-dropdown__trigger { padding: 5px 8px; }
}

/* ── topnav — compact on small screens ── */
@media (max-width: 380px) {
  .topnav { padding: 0 10px; }
  .topnav__app-name { font-size: 14px; }
}

/* ── ASYS Account role grid — responsive ── */
.asys-role-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
@media (max-width: 500px) { .asys-role-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; } }
@media (max-width: 360px) { .asys-role-grid { grid-template-columns: 1fr 1fr; } }

/* ── Account lists column — no overflow ── */
#acc-lists-col { min-width: 0; }

/* ── Role section in account panel — no horizontal overflow ── */
.acc-role-section { min-width: 0; overflow: hidden; }

/* ── Account row inner flex — wrap on narrow screens ── */
.account-row > div[style*="display:flex"] { flex-wrap: wrap; }
@media (max-width: 520px) {
  .acc-filterable .account-row__actions,
  .acc-filterable [style*="flex-shrink:0"] { flex-wrap: wrap; gap: 4px; }
}

/* ── Datalist regions — full width ── */
#acc-region-input { width: 100%; }

/* ── Sticky form card in account panel ── */
@media (max-width: 860px) {
  #branch-form.sticky-form { position: static; }
  .card[style*="position:sticky"] { position: static !important; }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   MASTER HUB — GLOBAL RESPONSIVE OVERRIDES
   ═══════════════════════════════════════════════════════════════════════════════ */

/* When Master Hub overrides app-main padding, keep it consistent */
.mh-main { min-width: 0; }

/* Stats grid in master hub */
.mh-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  padding: 16px 20px 0;
}
@media (max-width: 1400px) { .mh-stats { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 1100px) { .mh-stats { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 800px)  { .mh-stats { grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 12px 14px 0; } }
@media (max-width: 400px)  { .mh-stats { grid-template-columns: repeat(2, 1fr); gap: 6px; padding: 10px 10px 0; } }

/* Master hub table wrapper */
.mh-tw {
  padding: 14px 20px 28px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.mh-tbl { min-width: 560px; }
@media (max-width: 768px) {
  .mh-tw { padding: 10px 12px 20px; }
  .mh-tbl { min-width: 480px; }
}
@media (max-width: 480px) {
  .mh-tw { padding: 8px 8px 16px; }
  .mh-tbl { min-width: 420px; }
  .mh-tbl td, .mh-tbl th { padding: 8px 9px; }
}

/* Master hub sidebar — mobile pill bar */
@media (max-width: 768px) {
  .mh { flex-direction: column; }
  .mh-side {
    width: 100% !important;
    min-width: unset !important;
    height: auto !important;
    position: sticky;
    top: 54px;
    z-index: 150;
    flex-direction: row !important;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 8px 12px !important;
    gap: 4px;
    border-bottom: 1px solid #1E293B;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .mh-side::-webkit-scrollbar { display: none; }
  .mh-brand  { display: none !important; }
  .mh-ng     { display: flex !important; flex-direction: row !important; flex-wrap: nowrap !important; gap: 4px; padding: 0 !important; }
  .mh-ng.mh-bottom { margin-top: 0 !important; border-top: none !important; padding-top: 0 !important; }
  .mh-nl     { display: none !important; }
  .mh-ni {
    border-radius: 20px !important;
    border: 1px solid #334155 !important;
    border-left: 1px solid #334155 !important;
    padding: 6px 12px !important;
    font-size: 12px !important;
    white-space: nowrap;
    flex-shrink: 0;
  }
  .mh-ni.on { border-color: #38BDF8 !important; background: rgba(14,165,233,.15) !important; }
  .mh-bottom { margin-top: 0 !important; border-top: none !important; padding-top: 0 !important; }
  .mh-nbadge { display: none; }
  .mh-hd { padding: 12px 14px !important; flex-wrap: wrap !important; }
  .mh-hd h1 { font-size: 15px !important; }
  .mh-hd-act { gap: 6px; flex-wrap: wrap; }
  .mh-bar { padding: 10px 12px !important; gap: 6px !important; flex-wrap: wrap; }
  .mh-srch { max-width: 100% !important; flex: 1 1 100% !important; min-width: 0 !important; }
  .mh-sel  { flex: 1 1 120px !important; }
  .mh-cnt  { margin-left: 0 !important; width: 100%; }
  .fg2, .fg3 { grid-template-columns: 1fr !important; }
  .mbg { align-items: flex-end !important; padding: 0 !important; }
  .mdl { border-radius: 16px 16px 0 0 !important; max-width: 100% !important; max-height: 88vh; }
}
@media (max-width: 480px) {
  .mh-stats { grid-template-columns: repeat(2, 1fr) !important; gap: 6px !important; }
  .mh-sc .v { font-size: 20px !important; }
  .mh-hd { padding: 10px 10px !important; }
  .mh-bar { padding: 8px 10px !important; }
  .mh-tw  { padding: 6px 8px 16px !important; }
}
@media (max-width: 380px) {
  .mh-ni { padding: 5px 10px !important; font-size: 11px !important; }
}


/* ═══════════════════════════════════════════════════════════════════════════════
   ASYS v3 — TABLET ZONE FIXES (769px – 1100px)
   ═══════════════════════════════════════════════════════════════════════════════ */
@media (min-width: 769px) and (max-width: 1100px) {

  /* Filter bar selects don't overflow */
  .filter-bar .form-select { flex: 1 1 110px; min-width: 90px; }
  .filter-bar .form-input  { flex: 1 1 120px; }

  /* Admin tabs - tighten padding */
  .admin-tab-btn { padding: 9px 12px; font-size: 12px; }

  /* Branch form + history side by side but narrower form */
  .two-col-layout { grid-template-columns: 260px 1fr; }

  /* Admin two-col */
  .admin-two-col { grid-template-columns: 280px 1fr; gap: 16px; }

  /* Master hub sidebar stays vertical, smaller */
  .mh-side { width: 200px !important; min-width: 200px !important; }
  .mh-stats { grid-template-columns: repeat(3, 1fr); }
  .mh-hd h1 { font-size: 16px; }
  .mh-tw { padding: 12px 16px 24px; }
  .mh-bar { padding: 10px 16px; }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   ASYS v3 — SMALL MOBILE (≤480px) SPECIFIC FIXES
   ═══════════════════════════════════════════════════════════════════════════════ */
@media (max-width: 480px) {

  /* Stat cards: 2-col grid instead of horizontal scroll */
  .stat-row {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    overflow-x: visible;
  }
  .stat-card { min-width: 0; flex: none; }

  /* Admin tabs tighter */
  .admin-tab-btn { padding: 8px 10px; font-size: 11px; }

  /* Branch form full width, history below */
  .two-col-layout { grid-template-columns: 1fr; }

  /* Biz grid 2-col */
  .biz-grid { grid-template-columns: 1fr 1fr; }

  /* Type pills full width */
  .type-pills { gap: 5px; }
  .type-pill  { flex: 1 1 auto; text-align: center; }

  /* Cards - no horizontal padding waste */
  .card { padding: 14px 12px; }
  .req-card { padding: 12px 10px; }

  /* Routing cards stacked */
  .routing-card { padding: 14px 12px; }
  .routing-type-grid { grid-template-columns: 1fr 1fr; gap: 6px; }
  .routing-tile { padding: 8px 10px; }

  /* Admin panel padding */
  .admin-panel { padding: 0; }

  /* ASYS role grid - 3 cols still fine, just smaller text */
  .asys-role-card__desc { display: none; }
  .asys-role-card { padding: 8px 4px; }
  .asys-role-card__icon { font-size: 16px; }
  .asys-role-card__label { font-size: 10px; }

  /* Account rows - stack actions below */
  .account-row { padding: 10px 10px; gap: 6px; }

  /* SLA table scrollable */
  .sla-table { max-width: 100%; }

  /* Pagination compact */
  .pagination { padding: 10px 10px; gap: 4px; }
  .pagination__btn { min-width: 28px; height: 28px; font-size: 12px; }

  /* Modal sheet */
  .modal { padding: 18px 14px 28px; }
  .modal__title { font-size: 16px; }
  .modal-detail-grid { grid-template-columns: 1fr; gap: 8px; }

  /* Master hub small */
  .mh-sc { padding: 10px 10px; }
  .mh-sc .v { font-size: 18px; }
  .mh-hd-act .bp { display: none; } /* hide long add button on tiny screen, use FAB or scroll */
}

/* ═══════════════════════════════════════════════════════════════════════════════
   ASYS v3 — DATA TABLE IMPROVEMENTS (all screen sizes)
   ═══════════════════════════════════════════════════════════════════════════════ */

/* Table wrapper always scrollable */
.data-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #CBD5E1 transparent;
}
.data-table-wrap::-webkit-scrollbar { height: 4px; }
.data-table-wrap::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 3px; }

/* Table cells never cause layout overflow */
.data-table td { max-width: 200px; }
.td-remarks { max-width: 120px; }

/* Better table row hover */
.data-table tbody tr[data-request]:hover td { background: #EFF6FF; }

/* ═══════════════════════════════════════════════════════════════════════════════
   ASYS v3 — APPROVER VIEW RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════════ */

/* Pending table min-width smaller */
#approver-pending-table { min-width: 760px; }
#approver-history-table { min-width: 700px; }

/* Approver action buttons wrap on narrow table cells */
.approver-actions { display: flex; gap: 5px; flex-wrap: wrap; }
.approver-actions .btn { flex-shrink: 0; }

/* ═══════════════════════════════════════════════════════════════════════════════
   ASYS v3 — ADMIN VIEW RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════════ */

/* Admin requests table */
#admin-req-table { min-width: 900px; }

/* Admin panel sections */
.admin-panel { overflow-x: hidden; }

/* Tiers panel table */
.admin-panel[data-panel="tiers"] table { min-width: 600px; overflow-x: auto; display: block; }

/* Routing panel wraps on mobile */
@media (max-width: 640px) {
  .routing-card { padding: 14px 12px; }
  .routing-card__header { flex-direction: column; align-items: flex-start; }
  .routing-card__controls { width: 100%; justify-content: flex-end; }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   ASYS v3 — MASTER HUB ADDITIONAL FIXES
   ═══════════════════════════════════════════════════════════════════════════════ */

/* Master hub table action buttons */
.mh-tbl .abt { width: 32px; height: 32px; font-size: 15px; }

/* Form grid inside master hub modal — single col on very small */
@media (max-width: 400px) {
  .fg2, .fg3 { grid-template-columns: 1fr !important; }
}

/* Login section chip in master table — don't overflow */
.chip { max-width: 120px; overflow: hidden; text-overflow: ellipsis; }

/* Master hub header action button wraps on small */
.mh-hd-act { flex-wrap: wrap; gap: 6px; }
@media (max-width: 640px) {
  .mh-hd-act .bp { font-size: 12px; padding: 7px 12px; }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   ASYS v3 — BRANCH VIEW RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════════ */

/* Staff info banner wraps on mobile */
.staff-info-banner { flex-wrap: wrap !important; gap: 10px !important; }
@media (max-width: 480px) {
  .staff-info-banner { padding: 10px 12px !important; }
  .staff-info-banner > div[style*="width:1px"] { display: none; }
}

/* History col full width on mobile */
@media (max-width: 900px) {
  .history-col { width: 100%; }
  .history-header { flex-wrap: wrap; gap: 6px; }
}

/* Request list on mobile — better spacing */
@media (max-width: 480px) {
  .req-card__top { flex-wrap: wrap; gap: 6px; }
  .req-card__badges { justify-content: flex-start; }
  .req-card__actions { flex-wrap: wrap; }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   ASYS v3 — REPORT VIEW RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════════ */
.report-summary { flex-wrap: wrap; }
.report-summary__item { flex: 1 1 100px; min-width: 80px; }

@media (max-width: 640px) {
  .report-summary__item { flex: 1 1 calc(50% - 8px); }
  .report-filter-bar { flex-direction: column; gap: 8px; }
  .report-filter-bar .form-group { width: 100%; }
  .report-actions { flex-wrap: wrap; width: 100%; }
  .export-btn { flex: 1; justify-content: center; }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   ASYS v3 — SAFE AREA INSETS (notch / home bar)
   ═══════════════════════════════════════════════════════════════════════════════ */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .mob-menu { padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
  .modal    { padding-bottom: calc(28px + env(safe-area-inset-bottom)); }
  @media (max-width: 600px) {
    .modal { padding-bottom: calc(32px + env(safe-area-inset-bottom)); }
  }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   ATTACHMENT DROPZONE — Modern drag-drop + paste upload zone
   ═══════════════════════════════════════════════════════════════════════════════ */

.attach-zone {
  position: relative;
  border: 2px dashed #CBD5E1;
  border-radius: 14px;
  background: #F8FAFC;
  padding: 22px 16px 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s, box-shadow .2s;
  outline: none;
}
.attach-zone:hover,
.attach-zone:focus-visible {
  border-color: #1a6fd4;
  background: #EFF6FF;
  box-shadow: 0 0 0 3px rgba(26,111,212,.12);
}
.attach-zone--drag {
  border-color: #1a6fd4;
  background: #DBEAFE;
  box-shadow: 0 0 0 4px rgba(26,111,212,.18);
}
.attach-zone--has-files {
  border-style: solid;
  border-color: #93C5FD;
  background: #EFF6FF;
}
.attach-zone__icon {
  font-size: 28px;
  margin-bottom: 6px;
  display: block;
  line-height: 1;
  pointer-events: none;
}
.attach-zone__main {
  font-size: 13px;
  font-weight: 700;
  color: #1E3A8A;
  pointer-events: none;
}
.attach-zone__sub {
  font-size: 11px;
  color: #94A3B8;
  margin-top: 3px;
  pointer-events: none;
}
.attach-zone__input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.attach-zone__paste-hint {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  font-size: 10px;
  color: #64748B;
  background: #E2E8F0;
  border-radius: 20px;
  padding: 3px 9px;
  pointer-events: none;
}
.attach-previews {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.attach-thumb {
  position: relative;
  width: 76px;
  height: 76px;
  border-radius: 10px;
  overflow: hidden;
  border: 1.5px solid #E2E8F0;
  background: #fff;
  flex-shrink: 0;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 3px;
}
.attach-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.attach-thumb__name {
  font-size: 9px;
  color: #475569;
  text-align: center;
  padding: 0 4px;
  word-break: break-all;
  line-height: 1.3;
  max-height: 30px;
  overflow: hidden;
}
.attach-thumb__icon {
  font-size: 22px;
  line-height: 1;
}
.attach-thumb__remove {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(15,23,42,.65);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  z-index: 2;
  transition: background .15s;
}
.attach-thumb__remove:hover { background: #DC2626; }
.attach-thumb__remove svg { display: block; }
.attach-count-badge {
  position: absolute;
  bottom: 4px;
  right: 4px;
  background: #1a6fd4;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 20px;
  pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   REPORT — Approver & Branch Performance
   ═══════════════════════════════════════════════════════════════════════════════ */

.perf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.perf-card {
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  padding: 16px;
  border-top: 3px solid var(--pc-color, #1a6fd4);
}
.perf-card__val {
  font-size: 28px;
  font-weight: 900;
  color: var(--pc-color, #1a6fd4);
  line-height: 1;
}
.perf-card__lbl {
  font-size: 11px;
  color: #64748B;
  margin-top: 4px;
  font-weight: 600;
}
.perf-section { margin-bottom: 32px; }
.perf-section__title {
  font-size: 14px;
  font-weight: 800;
  color: #0F172A;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.perf-table-wrap {
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  overflow: auto;
}
.perf-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.perf-table th {
  background: #F8FAFC;
  font-size: 10px;
  font-weight: 800;
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid #E2E8F0;
  white-space: nowrap;
}
.perf-table td {
  padding: 10px 14px;
  border-bottom: 1px solid #F1F5F9;
  vertical-align: middle;
}
.perf-table tr:last-child td { border-bottom: none; }
.perf-table tr:hover td { background: #F8FAFC; }
.perf-bar-cell { min-width: 120px; }
.perf-bar {
  height: 7px;
  background: #E2E8F0;
  border-radius: 99px;
  overflow: hidden;
}
.perf-bar__fill {
  height: 100%;
  border-radius: 99px;
  background: var(--bar-color, #1a6fd4);
  transition: width .4s;
}
.perf-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 20px;
}
.perf-chart-wrap {
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 24px;
}
.perf-chart-title {
  font-size: 13px;
  font-weight: 800;
  color: #0F172A;
  margin-bottom: 14px;
}
.timeline-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.timeline-row__label {
  font-size: 11px;
  color: #475569;
  width: 80px;
  flex-shrink: 0;
  text-align: right;
  font-family: 'JetBrains Mono', monospace;
}
.timeline-row__bar-wrap {
  flex: 1;
  height: 18px;
  background: #F1F5F9;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}
.timeline-row__bar-fill {
  height: 100%;
  border-radius: 6px;
  display: flex;
  align-items: center;
  padding-left: 6px;
  font-size: 10px;
  font-weight: 800;
  color: #fff;
  min-width: 0;
  transition: width .4s;
  white-space: nowrap;
  overflow: hidden;
}
.timeline-row__count {
  font-size: 11px;
  font-weight: 800;
  color: #1E3A8A;
  width: 30px;
  text-align: right;
  flex-shrink: 0;
}
.pill-approved   { background: #059669; }
.pill-rejected   { background: #DC2626; }
.pill-expired    { background: #7C3AED; }
.pill-deleted    { background: #6B7280; }
.pill-pending    { background: #D97706; }
@media (max-width: 640px) {
  .perf-filter-bar { flex-direction: column; gap: 8px; }
  .perf-filter-bar .form-group { width: 100%; }
  .timeline-row__label { width: 58px; font-size: 10px; }
}

