/* ═══════════════════════════════════════════
   Rudra Billing v2 — Public App CSS
   ═══════════════════════════════════════════ */
*{box-sizing:border-box;margin:0;padding:0}
html,body{min-height:100%}
body{overflow-x:hidden}
/* Only lock body scroll when the SPA dashboard is active; everywhere else
   (landing, sign-in, sign-up, trial, pricing) we want a normal scrollable page */
body.ma-app-active{overflow:hidden;height:100vh}
:root{
  --brand:#1a56db;--brand-d:#1239a5;--brand-bg:#dbeafe;
  --dark:#0f172a;--dark2:#1e293b;
  --surf:#fff;--surf2:#f8fafc;--surf3:#f1f5f9;
  --bdr:#e2e8f0;--text:#1e293b;--muted:#64748b;--hint:#94a3b8;
  --green:#16a34a;--green-bg:#dcfce7;
  --red:#dc2626;--red-bg:#fee2e2;
  --amber:#d97706;--amber-bg:#fef3c7;
  --r:10px;--rl:14px;
}


#ma-shell{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;font-size:14px;color:var(--text);min-height:100vh;display:flex;flex-direction:column;background:var(--surf);transition:opacity .2s ease}
body.ma-app-active #ma-shell{height:100vh;min-height:100vh;overflow:hidden}


/* ────────────────────────────────────
   LANDING
──────────────────────────────────── */
.ma-land{background:var(--dark);color:#fff;min-height:100vh}
.ma-nav{display:flex;align-items:center;padding:16px 40px;border-bottom:1px solid rgba(255,255,255,.08);gap:16px}
.ma-nav-logo{display:flex;align-items:center;gap:10px;font-size:19px;font-weight:800;text-decoration:none;color:#fff}
.ma-logo-box{width:36px;height:36px;background:var(--brand);border-radius:9px;display:flex;align-items:center;justify-content:center;font-size:17px;font-weight:900;color:#fff}
.ma-nav-logo span{color:#60a5fa}
.ma-nav-links{margin-left:auto;display:flex;gap:8px}
.btn-outline-w{padding:8px 20px;border:1px solid rgba(255,255,255,.2);border-radius:8px;color:#fff;cursor:pointer;background:transparent;font-size:13px;font-weight:600;transition:all .15s}
.btn-outline-w:hover{background:rgba(255,255,255,.1)}
.btn-brand{padding:9px 20px;background:var(--brand);border:none;border-radius:8px;color:#fff;cursor:pointer;font-size:13px;font-weight:700;transition:all .15s}
.btn-brand:hover{background:var(--brand-d)}

.ma-hero{padding:72px 40px 52px;text-align:center;max-width:780px;margin:0 auto}
.ma-hero h1{font-size:46px;font-weight:900;line-height:1.12;margin-bottom:18px;color:#fff;letter-spacing:-1px}
.ma-hero h1 span{color:#60a5fa}
.ma-hero p{font-size:17px;color:#94a3b8;margin-bottom:36px;line-height:1.75;max-width:600px;margin-left:auto;margin-right:auto}
.ma-hero-btns{display:flex;gap:12px;justify-content:center;flex-wrap:wrap}
.btn-hero-p{padding:15px 36px;background:var(--brand);border:none;border-radius:10px;color:#fff;font-size:15px;font-weight:800;cursor:pointer;transition:all .15s}
.btn-hero-p:hover{background:var(--brand-d);transform:translateY(-1px)}
.btn-hero-o{padding:15px 36px;border:1px solid rgba(255,255,255,.25);border-radius:10px;color:#fff;background:transparent;font-size:15px;font-weight:700;cursor:pointer;transition:all .15s}
.btn-hero-o:hover{background:rgba(255,255,255,.08)}

.ma-stats-strip{display:flex;justify-content:center;gap:56px;padding:28px 40px;border-top:1px solid rgba(255,255,255,.07);border-bottom:1px solid rgba(255,255,255,.07);margin:0 0 52px}
.ma-stat-s .n{font-size:30px;font-weight:900;color:#60a5fa;text-align:center}
.ma-stat-s .l{font-size:12px;color:#64748b;text-align:center;margin-top:3px}

.ma-feats{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;padding:0 40px 60px;max-width:1000px;margin:0 auto}
.ma-feat{background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.08);border-radius:12px;padding:22px}
.ma-feat-icon{font-size:26px;margin-bottom:10px;display:flex;align-items:center;justify-content:center;width:48px;height:48px;border-radius:12px;background:var(--brand-bg, rgba(99,102,241,.08));color:var(--brand);}
.ma-feat h3{font-size:14px;font-weight:700;color:#f1f5f9;margin-bottom:6px}
.ma-feat p{font-size:12px;color:#94a3b8;line-height:1.65}

/* ────────────────────────────────────
   AUTH
──────────────────────────────────── */
.ma-auth{background:var(--surf2);min-height:100vh;display:flex;align-items:center;justify-content:center;padding:28px}
.ma-auth-wrap{width:100%;max-width:430px}
.ma-back-btn{display:flex;align-items:center;gap:6px;color:var(--muted);font-size:13px;cursor:pointer;margin-bottom:18px;background:none;border:none;padding:0}
.ma-back-btn:hover{color:var(--text)}
.ma-auth-card{background:var(--surf);border:1px solid var(--bdr);border-radius:var(--rl);padding:34px;box-shadow:0 2px 16px rgba(0,0,0,.06)}
.ma-auth-logo{display:flex;align-items:center;gap:8px;margin-bottom:24px;justify-content:center}
.ma-auth-logo-txt{font-size:18px;font-weight:800;color:var(--text)}
.ma-auth-logo-txt span{color:var(--brand)}
.ma-auth-tabs{display:flex;border-bottom:1px solid var(--bdr);margin-bottom:22px}
.ma-auth-tab{flex:1;padding:10px;text-align:center;cursor:pointer;font-size:13px;color:var(--muted);border-bottom:2.5px solid transparent;transition:all .12s;font-weight:500}
.ma-auth-tab.on{color:var(--brand);border-bottom-color:var(--brand);font-weight:700}
.ma-auth-title{font-size:20px;font-weight:800;margin-bottom:3px}
.ma-auth-sub{font-size:13px;color:var(--muted);margin-bottom:20px}
.ma-auth-hint{text-align:center;font-size:12px;color:var(--hint);margin-top:13px}

/* ────────────────────────────────────
   SETUP WIZARD
──────────────────────────────────── */
.ma-setup{background:var(--surf2);min-height:100vh;display:flex;align-items:center;justify-content:center;padding:28px}
.ma-setup-card{background:var(--surf);border:1px solid var(--bdr);border-radius:var(--rl);padding:34px;width:100%;max-width:520px;box-shadow:0 2px 16px rgba(0,0,0,.06)}
.ma-steps{display:flex;gap:6px;margin-bottom:26px}
.ma-step-dot{flex:1;height:4px;border-radius:2px;background:var(--bdr);transition:background .3s}
.ma-step-dot.done{background:var(--brand)}
.ma-setup-ttl{font-size:20px;font-weight:800;margin-bottom:4px}
.ma-setup-sub{font-size:13px;color:var(--muted);margin-bottom:20px}
.ma-setup-step{display:none}.ma-setup-step.on{display:block}

/* ────────────────────────────────────
   FORM ELEMENTS
──────────────────────────────────── */
.fg{margin-bottom:14px}
.fg label{display:block;font-size:11px;font-weight:700;color:var(--muted);text-transform:uppercase;letter-spacing:.5px;margin-bottom:5px}
.fg input,.fg select,.fg textarea{width:100%;padding:9px 12px;border:1.5px solid var(--bdr);border-radius:8px;font-size:14px;color:var(--text);background:var(--surf);outline:none;font-family:inherit;transition:border-color .12s}
.fg input:focus,.fg select:focus,.fg textarea:focus{border-color:var(--brand);box-shadow:0 0 0 3px rgba(26,86,219,.1)}
.fg input[readonly]{background:var(--surf2)!important;color:var(--hint)!important;cursor:default!important;border-color:var(--bdr)!important;user-select:none!important;pointer-events:none}
.fg input[readonly]:focus{border-color:var(--bdr)!important;box-shadow:none!important;outline:none!important}
#b-invno,#pu-billno{background:var(--surf2)!important;color:var(--hint)!important;cursor:default!important;pointer-events:none!important;user-select:none!important}
.fg-2{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.fg-3{display:grid;grid-template-columns:1fr 1fr 1fr;gap:10px}

/* ────────────────────────────────────
   BUTTONS
──────────────────────────────────── */
.btn-full{width:100%;padding:11px;background:var(--brand);color:#fff;border:none;border-radius:9px;font-size:14px;font-weight:700;cursor:pointer;transition:background .15s}
.btn-full:hover{background:var(--brand-d)}
.ma-btn{padding:8px 16px;border:1.5px solid var(--bdr);border-radius:8px;background:var(--surf);color:var(--text);font-size:13px;font-weight:600;cursor:pointer;transition:all .12s;font-family:inherit}
.ma-btn:hover{background:var(--surf3)}
.ma-btn.p{background:var(--brand);color:#fff;border-color:var(--brand)}.ma-btn.p:hover{background:var(--brand-d)}
.ma-btn.e{background:#fef3c7;color:#92400e;border-color:#fde68a}.ma-btn.e:hover{background:#fde68a}
.ma-btn.s{background:var(--green-bg);color:var(--green);border-color:var(--green-bg)}
.ma-btn.d{background:var(--red-bg);color:var(--red);border-color:var(--red-bg)}
.ma-btn.dl{background:#f0fdf4;color:#16a34a;border-color:#bbf7d0}.ma-btn.dl:hover{background:#dcfce7}
.ma-btn.sm{padding:5px 11px;font-size:12px;border-radius:6px}

/* ────────────────────────────────────
   APP SHELL
──────────────────────────────────── */
.ma-app{display:flex;flex-direction:column;min-height:100vh}
.ma-topbar{height:56px;background:var(--surf);border-bottom:1.5px solid var(--bdr);display:flex;align-items:center;padding:0 22px;gap:12px;position:sticky;top:0;z-index:80}
.ma-topbar-logo{display:flex;align-items:center;gap:9px}
.ma-topbar-biz{font-size:14px;font-weight:800}
.ma-topbar-type{font-size:11px;color:var(--hint)}
.ma-topbar-clock{position:absolute;left:50%;transform:translateX(-50%);display:flex;flex-direction:column;align-items:center;pointer-events:none;user-select:none}
.ma-clock-time{font-size:17px;font-weight:800;letter-spacing:.5px;color:var(--fg);line-height:1.1;font-variant-numeric:tabular-nums}
.ma-clock-ampm{font-size:11px;font-weight:700;color:var(--accent);letter-spacing:.5px;vertical-align:middle;margin-left:2px}
.ma-clock-meta{display:flex;align-items:center;gap:5px;margin-top:1px}
.ma-clock-day{font-size:11px;font-weight:700;color:var(--accent);text-transform:uppercase;letter-spacing:.6px}
.ma-clock-sep{font-size:11px;color:var(--hint)}
.ma-clock-date{font-size:11px;color:var(--muted);font-weight:500}
.ma-topbar-right{margin-left:auto;display:flex;align-items:center;gap:10px}
.ma-gst-tag{font-size:11px;background:var(--brand-bg);color:#1d4ed8;padding:3px 10px;border-radius:20px;font-weight:700}
.ma-topbar-user{font-size:12px;color:var(--muted)}

.ma-body{display:flex;flex:1;min-height:0;overflow:hidden}

/* ────────────────────────────────────
   SIDEBAR
──────────────────────────────────── */
.ma-sidebar{width:215px;background:var(--surf);border-right:1.5px solid var(--bdr);padding:10px 0;flex-shrink:0;overflow-y:auto;height:100%;min-height:0}
.ma-nav-grp{font-size:10px;font-weight:700;color:var(--hint);text-transform:uppercase;letter-spacing:.7px;padding:10px 16px 3px}
.ma-nav-lnk{display:flex;align-items:center;gap:9px;padding:8px 12px;border-radius:8px;cursor:pointer;font-size:13px;color:var(--muted);margin:1px 8px;transition:all .1s;text-decoration:none}
.ma-nav-lnk:hover{background:var(--surf3);color:var(--text)}
.ma-nav-lnk.on{background:var(--brand-bg);color:var(--brand);font-weight:700}
.ma-nav-icon{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;flex-shrink:0}
.ma-nav-badge{margin-left:auto;background:var(--red-bg);color:var(--red);font-size:10px;font-weight:700;padding:1px 6px;border-radius:10px}

/* ────────────────────────────────────
   PAGES
──────────────────────────────────── */
.ma-main{flex:1;padding:22px;background:var(--surf2);overflow-y:auto;min-height:0;height:100%}
.ma-pg{display:none}.ma-pg.on{display:block}
.ma-pg-hdr{margin-bottom:20px}
.ma-pg-title{font-size:20px;font-weight:800}
.ma-pg-sub{font-size:13px;color:var(--muted);margin-top:2px}

/* ────────────────────────────────────
   STATS CARDS
──────────────────────────────────── */
.ma-dash-filter-bar{display:flex;gap:6px;margin-bottom:12px}
.ma-dash-fpill{padding:5px 14px;border-radius:20px;border:1.5px solid var(--bdr);background:var(--surf);color:var(--muted);font-size:12px;font-weight:600;cursor:pointer;transition:all .12s;font-family:inherit}
.ma-dash-fpill:hover{background:var(--surf3);color:var(--text)}
.ma-dash-fpill.active{background:var(--brand);color:#fff;border-color:var(--brand)}
.ma-today-bar{display:flex;align-items:center;gap:0;background:var(--surf);border:1.5px solid var(--brand);border-radius:var(--rl);padding:10px 16px;margin-bottom:14px;flex-wrap:wrap;gap:4px 0}
.ma-today-lbl{font-size:11px;font-weight:800;color:var(--brand);text-transform:uppercase;letter-spacing:.5px;margin-right:14px;white-space:nowrap}
.ma-today-item{display:flex;flex-direction:column;align-items:center;padding:0 14px}
.ma-today-key{font-size:10px;color:var(--muted);font-weight:700;text-transform:uppercase;letter-spacing:.3px;white-space:nowrap}
.ma-today-val{font-size:16px;font-weight:900;color:var(--text);white-space:nowrap}
.ma-today-sep{width:1px;background:var(--bdr);height:32px;align-self:center}
.ma-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:13px;margin-bottom:20px}
.ma-sc{background:var(--surf);border:1.5px solid var(--bdr);border-radius:var(--rl);padding:15px 17px}
.ma-sc-lbl{font-size:11px;color:var(--hint);font-weight:700;text-transform:uppercase;letter-spacing:.4px;margin-bottom:7px}
.ma-sc-val{font-size:22px;font-weight:900}
.ma-sc-badge{display:inline-block;font-size:10px;font-weight:700;padding:2px 8px;border-radius:10px;margin-top:6px}
.bg-g{background:var(--green-bg);color:var(--green)}
.bg-b{background:var(--brand-bg);color:#1d4ed8}
.bg-a{background:var(--amber-bg);color:var(--amber)}
.bg-r{background:var(--red-bg);color:var(--red)}

/* ────────────────────────────────────
   CARDS & TABLES
──────────────────────────────────── */
.ma-card{background:var(--surf);border:1.5px solid var(--bdr);border-radius:var(--rl);overflow:hidden;margin-bottom:16px}
.ma-bill-box{overflow:visible!important}
.ma-card-hdr{padding:13px 17px;border-bottom:1px solid var(--bdr);display:flex;align-items:center;gap:10px}
.ma-card-title{font-size:13px;font-weight:700}
.ma-card-body{padding:16px 17px}
.ma-tbl{width:100%;border-collapse:collapse}
.ma-tbl th{font-size:10px;text-transform:uppercase;letter-spacing:.5px;color:var(--hint);font-weight:700;padding:9px 14px;text-align:left;background:var(--surf2);border-bottom:1px solid var(--bdr)}
.ma-tbl td{padding:10px 14px;font-size:13px;border-bottom:1px solid var(--surf3);vertical-align:middle}
.ma-tbl tr:last-child td{border-bottom:none}
.ma-tbl tbody tr:hover td{background:var(--surf2)}
.pill{display:inline-block;font-size:10px;font-weight:700;padding:2px 8px;border-radius:10px}
.p-g{background:var(--green-bg);color:var(--green)}
.p-r{background:var(--red-bg);color:var(--red)}
.p-a{background:var(--amber-bg);color:var(--amber)}
.p-b{background:var(--brand-bg);color:#1d4ed8}
.p-gr{background:var(--surf3);color:var(--muted)}

/* ────────────────────────────────────
   BILLING
──────────────────────────────────── */
.ma-bill-box{background:var(--surf);border:1.5px solid var(--bdr);border-radius:var(--rl);padding:20px;margin-bottom:16px}
.ma-bill-top{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-bottom:18px}
.ma-bill-hdr{display:grid;grid-template-columns:2.5fr .6fr .6fr 1fr .7fr 1.1fr 1fr 30px;gap:7px;font-size:10px;text-transform:uppercase;letter-spacing:.5px;color:var(--hint);font-weight:700;padding:7px 0;border-bottom:1.5px solid var(--bdr);margin-bottom:8px}
.ma-bill-row{display:grid;grid-template-columns:2.5fr .6fr .6fr 1fr .7fr 1.1fr 1fr 30px;gap:7px;align-items:start;margin-bottom:8px}
.ma-bill-row input,.ma-bill-row select{padding:7px 9px;border:1.5px solid var(--bdr);border-radius:7px;font-size:12px;width:100%;background:var(--surf);color:var(--text);outline:none}
.ma-bill-row input:focus,.ma-bill-row select:focus{border-color:var(--brand)}
/* Warranty cell wrapper */
.ma-warr-wrap{display:block;width:100%}
.ma-warr-wrap select{display:block;width:100%;font-size:12px;padding:7px 9px;border:1.5px solid var(--bdr);border-radius:7px;background:var(--surf);color:var(--text);outline:none;cursor:pointer}
.ma-warr-wrap select:focus{border-color:var(--brand)}
.ma-warr-custom{display:block;width:100%!important;font-size:12px!important;padding:7px 9px!important;border:1.5px solid var(--brand)!important;border-radius:7px!important;background:#f0f7ff!important;color:var(--text)!important;outline:none!important;margin-top:5px!important;box-sizing:border-box!important}
.ma-del-btn{width:28px;height:28px;background:var(--red-bg);color:var(--red);border:none;border-radius:6px;cursor:pointer;font-size:13px;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.ma-bill-totals{border-top:1.5px solid var(--bdr);padding-top:14px;display:flex;flex-direction:column;align-items:flex-end;gap:6px;margin-top:10px}
.ma-tot-row{display:flex;gap:48px;font-size:13px;min-width:260px;justify-content:flex-end}
.ma-tot-lbl{color:var(--muted)}
.ma-tot-grand{font-size:17px;font-weight:900;border-top:1.5px solid var(--bdr);padding-top:10px;margin-top:4px}

/* ────────────────────────────────────
   IMEI SECTION
──────────────────────────────────── */
.ma-imei-box{background:#fffbeb;border:1.5px solid #fde68a;border-radius:10px;padding:14px 16px;margin:12px 0}
.ma-imei-title{font-size:12px;font-weight:800;color:#92400e;margin-bottom:12px;display:flex;align-items:center;gap:7px}
.ma-imei-product{margin-bottom:14px}
.ma-imei-product-name{font-size:13px;font-weight:700;margin-bottom:7px;color:var(--text)}
.ma-imei-product-name small{color:var(--muted);font-weight:500}
.ma-imei-tags{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:7px;min-height:20px}
.ma-imei-tag{display:flex;align-items:center;gap:5px;background:#fff;border:1.5px solid #fde68a;border-radius:20px;padding:4px 11px;font-size:11px;font-weight:700;font-family:monospace;color:#92400e}
.ma-imei-tag button{background:none;border:none;cursor:pointer;color:var(--red);font-size:13px;padding:0;line-height:1;margin-left:2px}
.ma-imei-input-row{display:flex;gap:8px;align-items:center}
.ma-imei-input{flex:1;padding:8px 11px;border:1.5px solid #fbbf24;border-radius:8px;font-size:13px;background:#fff;font-family:monospace;letter-spacing:1px;outline:none}
.ma-imei-input:focus{border-color:var(--brand);box-shadow:0 0 0 3px rgba(26,86,219,.1)}
.ma-imei-warn{font-size:11px;color:var(--amber);font-weight:700;margin-top:5px}
.ma-imei-err{display:none;background:var(--red-bg);color:var(--red);font-size:13px;font-weight:700;padding:10px 14px;border-radius:8px;margin-top:10px}
.ma-imei-slots{display:flex;flex-direction:column;gap:8px;margin-top:4px}
.ma-imei-slot{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.ma-imei-slot-label{font-size:11px;font-weight:700;color:var(--muted);min-width:44px}
.ma-imei-select{flex:1;max-width:320px;padding:7px 10px;border:1.5px solid #fbbf24;border-radius:8px;font-size:13px;font-family:monospace;background:#fff;color:var(--text);cursor:pointer;outline:none}
.ma-imei-select:focus{border-color:var(--brand);box-shadow:0 0 0 3px rgba(26,86,219,.1)}
.ma-imei-chosen{font-size:11px;font-weight:700;color:var(--green);font-family:monospace}
.ma-imei-no-stock{font-size:11px;color:var(--red);font-weight:700}

/* ────────────────────────────────────
   QUICK ACTIONS
──────────────────────────────────── */
.ma-qa{display:flex;gap:9px;margin-bottom:20px;flex-wrap:wrap}
.ma-qa-btn{display:flex;align-items:center;gap:7px;padding:10px 16px;background:var(--surf);border:1.5px solid var(--bdr);border-radius:10px;cursor:pointer;font-size:13px;font-weight:600;color:var(--text);transition:all .12s}
.ma-qa-btn:hover{border-color:var(--brand);color:var(--brand);background:var(--brand-bg)}

/* ────────────────────────────────────
   MISC
──────────────────────────────────── */
.ma-search-row{display:flex;gap:10px;margin-bottom:15px;align-items:center}
.ma-search-inp{flex:1;padding:9px 13px;border:1.5px solid var(--bdr);border-radius:9px;font-size:13px;background:var(--surf);color:var(--text);outline:none}
.ma-search-inp:focus{border-color:var(--brand)}
.ma-two{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.ma-action-row{display:flex;gap:9px;flex-wrap:wrap}
.ma-empty{text-align:center;padding:36px 20px;color:var(--hint)}
.ma-empty .ei{font-size:38px;margin-bottom:10px}
.ma-stock-bar{width:76px;height:5px;border-radius:3px;background:var(--bdr);overflow:hidden}
.ma-stock-fill{height:100%;border-radius:3px}
.ma-chart-bars{display:flex;align-items:flex-end;gap:7px;height:120px;padding:0 2px}
.ma-bar-wrap{flex:1;display:flex;flex-direction:column;align-items:center;gap:3px;height:100%;justify-content:flex-end}
.ma-bar{width:100%;background:var(--brand-bg);border-radius:4px 4px 0 0;min-height:3px}
.ma-bar.cur{background:var(--brand)}
.ma-bar-lbl{font-size:10px;color:var(--hint)}
.ma-bar-val{font-size:10px;color:var(--hint)}

/* MODAL */
.ma-modal-bg{position:fixed;inset:0;background:rgba(0,0,0,.4);display:flex;align-items:center;justify-content:center;z-index:9999;padding:20px}
.ma-modal{background:var(--surf);border-radius:var(--rl);padding:26px 28px;width:100%;max-width:580px;border:1.5px solid var(--bdr);max-height:90vh;overflow-y:auto}
.ma-modal-title{font-size:17px;font-weight:800;margin-bottom:18px}
.ma-modal-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:20px}

/* NOTICE */
.ma-notice{padding:11px 15px;border-radius:8px;font-size:13px;font-weight:600;margin-bottom:10px;animation:slideIn .25s ease;line-height:1.45}
.ma-notice.ok{background:var(--green-bg);color:var(--green)}
.ma-notice.err{background:var(--red-bg);color:var(--red)}
#auth-notices:empty{display:none}
#auth-notices{margin-bottom:4px}
@keyframes slideIn{from{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:none}}

/* ════════════════════════════════════════════
   RESPONSIVE — TABLET (≤ 1024px) & MOBILE (≤ 640px)
   Three breakpoints:
   1024px  = tablet landscape / small laptop
    768px  = tablet portrait
    640px  = large phone
    480px  = standard phone
════════════════════════════════════════════ */

/* ── Hamburger button (hidden on desktop) ── */
.ma-hamburger{
  display:none!important;
  flex-direction:column;justify-content:center;align-items:center;
  width:40px;height:40px;gap:5px;
  background:none;border:1.5px solid var(--bdr);border-radius:8px;
  cursor:pointer;padding:0;flex-shrink:0;margin-right:4px;
  transition:background .12s;
}
.ma-hamburger:hover{background:var(--surf3)}
.ma-hamburger span{display:block;width:18px;height:2px;background:var(--text);border-radius:2px;transition:all .2s}
@media screen and (max-width:768px){
  .ma-hamburger{display:flex!important}
}

/* ── Sidebar close button (hidden on desktop) ── */
.ma-sidebar-header{display:none}
.ma-sidebar-close{display:none}

/* ── Sidebar overlay backdrop ── */
.ma-sidebar-overlay{display:none;position:fixed;inset:0;background:rgba(0,0,0,.45);z-index:199;backdrop-filter:blur(1px)}
.ma-sidebar-overlay.open{display:block}

/* Logout text — hide on very small screens */
.ma-logout-txt{display:inline}

/* ════ TABLET LANDSCAPE ≤ 1024px ════ */
@media(max-width:1024px){
  /* sidebar narrower */
  .ma-sidebar{width:185px}
  /* hero text */
  .ma-hero h1{font-size:38px}
  /* stats: 2×2 grid */
  .ma-stats{grid-template-columns:repeat(2,1fr)}
  /* feature grid 2-col */
  .ma-feats{grid-template-columns:repeat(2,1fr);padding:0 24px 48px}
  /* stats strip tighter */
  .ma-stats-strip{gap:32px}
  /* main padding */
  .ma-main{padding:18px}
  /* billing top grid */
  .ma-bill-top{grid-template-columns:1fr 1fr}
}

/* ════ TABLET PORTRAIT ≤ 768px ════ */
@media screen and (max-width:768px){
  /* ── Show hamburger, hide sidebar by default ── */
  .ma-sidebar-header{
    display:flex!important;align-items:center;justify-content:space-between;
    padding:14px 16px 10px;border-bottom:1.5px solid var(--bdr);margin-bottom:6px;
  }
  .ma-sidebar-close{
    display:flex!important;align-items:center;justify-content:center;
    width:32px;height:32px;border-radius:8px;border:1.5px solid var(--bdr);
    background:none;cursor:pointer;color:var(--muted);transition:all .12s;
  }
  .ma-sidebar-close:hover{background:var(--surf3);color:var(--text)}

  /* ── Sidebar becomes a slide-in drawer ── */
  .ma-sidebar{
    position:fixed!important;top:0!important;left:0!important;height:100vh!important;z-index:200!important;
    width:260px!important;transform:translateX(-100%)!important;
    transition:transform .25s cubic-bezier(.4,0,.2,1)!important;
    box-shadow:4px 0 24px rgba(0,0,0,.12)!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    padding-bottom:calc(74px + env(safe-area-inset-bottom, 0px))!important;
    -webkit-overflow-scrolling:touch!important;
  }
  .ma-sidebar.open{transform:translateX(0)!important}

  /* ── Topbar adjustments ── */
  .ma-topbar{padding:0 14px!important;height:52px!important}
  .ma-topbar-biz{font-size:13px}
  .ma-topbar-type{display:none!important}
  .ma-gst-tag{display:none!important}
  .ma-topbar-user{display:none!important}
  .ma-logout-txt{display:none!important}

  /* ── Main content full width ── */
  .ma-body{flex-direction:column!important;overflow-y:visible!important;min-height:0;flex:1}
  .ma-main{padding:14px;height:auto;min-height:0;overflow-y:visible}

  /* ── Hero section ── */
  .ma-hero h1{font-size:30px;letter-spacing:-.5px}
  .ma-hero{padding:40px 20px 30px}
  .ma-hero p{font-size:15px}
  .ma-nav{padding:12px 16px}
  .ma-nav-links{gap:6px}
  .btn-outline-w,.btn-brand{padding:7px 14px;font-size:12px}

  /* ── Stats strip ── */
  .ma-stats-strip{gap:20px;padding:18px 16px;flex-wrap:wrap;justify-content:center}
  .ma-stat-s .n{font-size:22px}

  /* ── Feature grid ── */
  .ma-feats{grid-template-columns:repeat(2,1fr);padding:0 16px 36px;gap:12px}
  .ma-feat{padding:16px}

  /* ── Dashboard stats ── */
  .ma-stats{grid-template-columns:repeat(2,1fr);gap:10px}
  .ma-sc-val{font-size:18px}

  /* ── Two-column layout → single ── */
  .ma-two{grid-template-columns:1fr}
  .fg-2{grid-template-columns:1fr 1fr}

  /* ── Billing form ── */
  .ma-bill-top{grid-template-columns:1fr}
  .ma-bill-hdr{display:none}  /* hide header row; data labels implicit */
  .ma-bill-row{
    grid-template-columns:1fr 1fr;
    gap:8px;padding:10px;background:var(--surf);
    border:1.5px solid var(--bdr);border-radius:10px;margin-bottom:10px;
  }
  .ma-bill-row>select{grid-column:1/-1}
  .ma-bill-row .ma-warr-wrap{grid-column:1/-1}
  .ma-bill-row>*:nth-child(5){display:none}  /* hide amount col, show in total */

  /* ── Tables — horizontal scroll ── */
  .ma-card{overflow-x:auto}
  .ma-tbl{min-width:520px}

  /* ── Quick action buttons — wrap neatly ── */
  .ma-qa{gap:7px}
  .ma-qa-btn{padding:8px 12px;font-size:12px}

  /* ── Page header ── */
  .ma-pg-title{font-size:17px}
  .ma-pg-hdr{margin-bottom:14px}

  /* ── Search row ── */
  .ma-search-row{flex-wrap:wrap}
  .ma-search-inp{min-width:0;flex:1}

  /* ── Bill totals ── */
  .ma-tot-row{gap:24px;min-width:200px}

  /* ── Data IO page ── */
  .ma-dio-grid{grid-template-columns:1fr}
  .ma-dio-format-cards{flex-wrap:wrap}
  .ma-dio-section{padding:16px}
}

/* ════ PHONE ≤ 480px ════ */
@media(max-width:480px){
  .btn-trial{display: none;}
  .btn-brand{padding: 9px 15px;}
  .ma-nav{gap:3px;}
  /* ── Hero ── */
  .ma-hero h1{font-size:25px}
  .ma-hero p{font-size:14px}
  .btn-hero-p,.btn-hero-o{padding:12px 22px;font-size:14px}

  /* ── Feature grid single col ── */
  .ma-feats{grid-template-columns:1fr;gap:10px}
  .ma-feat{padding:14px;display:flex;align-items:flex-start;gap:12px}
  .ma-feat-icon{flex-shrink:0;margin-bottom:0;width:40px;height:40px}
  .ma-feat h3{margin-bottom:3px}

  /* ── Stats strip 2×2 ── */
  .ma-stats-strip{display:grid;grid-template-columns:1fr 1fr;gap:12px 24px;padding:16px}

  /* ── Stats cards single col ── */
  .ma-stats{grid-template-columns:1fr 1fr}
  .ma-sc{padding:12px 13px}
  .ma-sc-val{font-size:17px}

  /* ── Form grids ── */
  .fg-2{grid-template-columns:1fr}
  .fg-3{grid-template-columns:1fr}

  /* ── Auth card ── */
  .ma-auth-card{padding:22px 18px}
  .ma-setup-card{padding:22px 18px}
  .ma-auth{padding:16px}
  .ma-setup{padding:16px}

  /* ── Main padding ── */
  .ma-main{padding:10px}

  /* ── Topbar ── */
  .ma-topbar{padding:0 10px;gap:8px}
  .ma-topbar-clock{display:none}

  /* ── Modal ── */
  .ma-modal{padding:18px 16px;margin:8px}

  /* ── Bill row single col ── */
  .ma-bill-row{grid-template-columns:1fr 1fr;gap:6px}

  /* ── Quick actions 2-per-row ── */
  .ma-qa{display:grid;grid-template-columns:1fr 1fr;gap:7px}
  .ma-qa-btn{justify-content:center}

  /* ── Search row ── */
  .ma-search-row{flex-direction:column;align-items:stretch}
  .ma-search-inp{width:100%}

  /* ── Bill totals ── */
  .ma-bill-totals{align-items:stretch}
  .ma-tot-row{justify-content:space-between;gap:12px;min-width:0}

  /* ── Data IO ── */
  .ma-dio-format-cards{flex-direction:row;gap:8px}
  .ma-dio-fmt{flex:1;min-width:60px;padding:10px 8px;font-size:11px}
  .ma-dio-sec-hdr{flex-direction:column;gap:10px}

  /* ── Tables scroll hint ── */
  .ma-card::before{
    content:'← Scroll to see more →';
    display:block;font-size:10px;color:var(--hint);
    padding:4px 14px;text-align:center;
  }
  .ma-tbl{min-width:460px}
}

/* ════ VERY SMALL PHONES ≤ 360px ════ */
@media(max-width:360px){
  .ma-hero h1{font-size:22px}
  .ma-stats{grid-template-columns:1fr}
  .ma-qa{grid-template-columns:1fr}
  .ma-dio-format-cards{flex-direction:column}
  .ma-dio-fmt{flex-direction:row;min-width:0;padding:10px 14px}
  .ma-feats{padding:0 10px 28px}
}

/* ─── Logo Upload UI ─── */
.ma-logo-upload-box {
  background: var(--surf2);
  border: 2px dashed var(--border);
  border-radius: 10px;
  padding: 16px;
  transition: border-color .2s;
}
.ma-logo-upload-box:hover { border-color: var(--brand); }
.ma-logo-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--brand);
  color: #fff;
  border-radius: 8px;
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s;
  user-select: none;
}
.ma-logo-upload-btn:hover { background: var(--brand-dark, #1740a0); }

/* ─── Purchase Bill notices ─── */
#pu-notices { margin-bottom: 6px; }

/* ─── Purchase bill table header search ─── */
#pu-search {
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  font-size: 13px;
  background: var(--surf);
  color: var(--text);
}

/* ════════════════════════════════════════════
   DATA & BACKUP PAGE
════════════════════════════════════════════ */
.ma-dio-section{background:var(--surf);border:1.5px solid var(--bdr);border-radius:14px;padding:24px 26px;margin-bottom:20px}
.ma-dio-sec-hdr{display:flex;align-items:flex-start;gap:14px;margin-bottom:20px}
.ma-dio-sec-icon{width:44px;height:44px;border-radius:12px;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.ma-dio-sec-title{font-size:16px;font-weight:700;color:var(--text);margin-bottom:3px}
.ma-dio-sec-sub{font-size:13px;color:var(--muted);line-height:1.5}
.ma-dio-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin-bottom:18px}
@media(max-width:600px){.ma-dio-grid{grid-template-columns:1fr}}
.ma-dio-label{display:block;font-size:12px;font-weight:700;color:var(--muted);text-transform:uppercase;letter-spacing:.05em;margin-bottom:9px}
.ma-dio-chips{display:flex;flex-wrap:wrap;gap:7px}
.ma-dio-chip{padding:6px 14px;border-radius:20px;border:1.5px solid var(--bdr);font-size:12.5px;font-weight:600;cursor:pointer;color:var(--muted);transition:all .12s}
.ma-dio-chip.on{border-color:var(--brand);color:var(--brand);background:var(--brand-bg,rgba(99,102,241,.08))}
.ma-dio-chip:hover:not(.on){border-color:var(--brand);color:var(--brand)}
.ma-dio-format-cards{display:flex;gap:10px}
.ma-dio-fmt{display:flex;flex-direction:column;align-items:center;gap:6px;padding:12px 16px;border:1.5px solid var(--bdr);border-radius:12px;cursor:pointer;font-size:12px;font-weight:600;color:var(--muted);transition:all .12s;min-width:72px;text-align:center}
.ma-dio-fmt.on{border-color:var(--brand);color:var(--brand);background:var(--brand-bg,rgba(99,102,241,.08))}
.ma-dio-fmt:hover:not(.on){border-color:var(--brand);color:var(--brand)}

/* Import drop zone */
.ma-dio-import-zone{border:2px dashed var(--bdr);border-radius:12px;padding:30px 20px;display:flex;flex-direction:column;align-items:center;gap:10px;text-align:center;transition:all .15s;cursor:default}
.ma-dio-import-zone.drag-over{border-color:var(--brand);background:var(--brand-bg,rgba(99,102,241,.06))}
.ma-dio-drop-txt{font-size:13.5px;color:var(--muted)}

/* Import preview */
.ma-dio-preview{margin-top:18px;background:var(--surf2);border-radius:10px;padding:16px 18px}
.ma-dio-preview-title{font-size:13.5px;font-weight:700;color:var(--text);margin-bottom:12px}
.ma-dio-preview-stats{display:flex;flex-wrap:wrap;gap:8px}
.ma-dio-stat-pill{display:flex;align-items:center;gap:7px;padding:5px 12px;background:var(--brand-bg,rgba(99,102,241,.08));border:1px solid var(--brand);border-radius:20px;font-size:12px;color:var(--brand)}
.ma-dio-stat-n{font-weight:800;font-size:14px}

/* Backup info */
.ma-dio-backup-info{display:flex;flex-direction:column;gap:8px;margin-bottom:18px}
.ma-dio-bk-item{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--muted)}
.ma-dio-bk-item svg{color:var(--green);flex-shrink:0}

/* ════════════════════════════════════════════
   PRICING / SUBSCRIPTION SCREEN
════════════════════════════════════════════ */
.ma-pricing-screen{
  min-height:100vh;
  background:linear-gradient(135deg,#0f172a 0%,#1e3a5f 50%,#0f172a 100%);
  display:flex;align-items:flex-start;justify-content:center;
  padding:40px 20px 60px;overflow-y:auto;
}
.ma-pricing-wrap{width:100%;max-width:960px}

.ma-pricing-header{text-align:center;margin-bottom:40px}
.ma-pricing-title{font-size:32px;font-weight:900;color:#fff;margin-bottom:10px;letter-spacing:-.5px}
.ma-pricing-sub{font-size:16px;color:#94a3b8;margin:0}

.ma-pricing-badge{
  display:inline-block;padding:6px 18px;border-radius:20px;
  font-size:13px;font-weight:700;margin-bottom:16px;
  background:rgba(99,102,241,.2);color:#a5b4fc;border:1px solid rgba(99,102,241,.4);
}
.ma-pricing-badge.expired{
  background:rgba(220,38,38,.15);color:#fca5a5;border-color:rgba(220,38,38,.3);
}

/* ── Plan grid ── */
.ma-plans-grid{
  display:grid;grid-template-columns:repeat(3,1fr);gap:20px;margin-bottom:32px;
  align-items:stretch;
}
@media(max-width:768px){.ma-plans-grid{grid-template-columns:1fr;max-width:400px;margin:0 auto 32px}}
@media(max-width:480px){.ma-pricing-title{font-size:24px}}

/* (Legacy dark-themed .ma-plan-card / .ma-plan-features / .ma-plan-popular
   styles previously here have been removed. The active definitions live
   farther down — they target the white-card layout used today.) */

.ma-plan-btn{
  width:100%;padding:14px 18px;border:none;border-radius:11px;
  font-size:15px;font-weight:700;letter-spacing:.2px;cursor:pointer;
  background:linear-gradient(135deg,var(--brand),var(--brand-d));
  color:#fff;
  box-shadow:0 6px 18px rgba(26,86,219,.25);
  transition:transform .15s,box-shadow .15s,background .2s;
}
.ma-plan-btn:hover{
  transform:translateY(-1px);
  box-shadow:0 8px 24px rgba(26,86,219,.35);
}
.ma-plan-btn:active{transform:translateY(0)}
.ma-plan-btn:disabled{opacity:.6;cursor:wait;transform:none;box-shadow:none}

/* ── Footer trust badges ── */
.ma-pricing-footer{text-align:center}
.ma-pricing-trust{
  display:flex;gap:20px;justify-content:center;flex-wrap:wrap;margin-bottom:4px;
}
.ma-pricing-trust span{
  display:flex;align-items:center;gap:6px;
  font-size:12px;color:#64748b;
}
.ma-pricing-trust span svg{color:#4ade80}

/* ── Subscription badge in topbar ── */
.ma-sub-badge{
  font-size:11px;font-weight:700;padding:3px 10px;border-radius:20px;cursor:default;
}
.ma-sub-badge.active{background:#dcfce7;color:#16a34a}
.ma-sub-badge.expiring{background:#fef3c7;color:#d97706;cursor:pointer}
.ma-sub-badge.expiring:hover{background:#fde68a}

/* ════════════════════════════════════════════
   TRIAL BADGE ON SIGNUP SCREEN
════════════════════════════════════════════ */
.ma-trial-badge-top{
  background:linear-gradient(135deg,#f59e0b,#f97316);
  color:#fff;font-weight:800;font-size:13px;
  padding:6px 18px;border-radius:20px;
  display:inline-block;margin:0 auto 12px;
  text-align:center;letter-spacing:.3px;
}

/* ════════════════════════════════════════════
   SUBSCRIPTION PAGE — ACTIVE CARD
════════════════════════════════════════════ */
.ma-sub-active-card{
  display:flex;justify-content:space-between;align-items:center;
  background:linear-gradient(135deg,var(--brand) 0%,#7c3aed 100%);
  border-radius:18px;padding:28px 32px;color:#fff;
  margin-bottom:16px;gap:16px;flex-wrap:wrap;
  box-shadow:0 8px 32px rgba(99,102,241,.28);
}
.ma-sub-ac-left{flex:1;min-width:160px}
.ma-sub-ac-label{font-size:11px;opacity:.9;font-weight:700;margin-bottom:8px;letter-spacing:.8px;text-transform:uppercase;display:flex;align-items:center;gap:5px}
.ma-sub-ac-name{font-size:22px;font-weight:800;margin-bottom:6px;line-height:1.2}
.ma-sub-ac-dates{font-size:12px;opacity:.8;margin-bottom:16px;letter-spacing:.2px}
.ma-sub-upgrade-btn{
  display:inline-flex;align-items:center;gap:6px;
  background:rgba(255,255,255,0.15);border:1.5px solid rgba(255,255,255,0.35);
  color:#fff;border-radius:8px;padding:8px 16px;font-size:12px;font-weight:700;
  cursor:pointer;font-family:inherit;transition:background .15s,transform .1s;
  backdrop-filter:blur(4px);
}
.ma-sub-upgrade-btn:hover{background:rgba(255,255,255,0.25);transform:translateY(-1px)}
.ma-sub-ac-right{display:flex;align-items:center}
.ma-sub-days-ring{position:relative;width:84px;height:84px}
.ma-sub-ring-txt{
  position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);
  text-align:center;color:#fff;
}
.ma-sub-ring-txt span{font-size:22px;font-weight:800;line-height:1;display:block}
.ma-sub-ring-txt small{font-size:9px;opacity:.8;text-transform:uppercase;letter-spacing:.5px;white-space:nowrap}

/* No active plan notice */
.ma-sub-no-active{
  background:var(--surface);border:2px dashed var(--border);
  border-radius:16px;padding:36px 28px;text-align:center;margin-bottom:16px;
}
.ma-sub-no-icon{font-size:42px;margin-bottom:10px;line-height:1}
.ma-sub-no-title{font-weight:800;font-size:18px;margin-bottom:6px;color:var(--text)}
.ma-sub-no-desc{color:var(--muted);font-size:13px;margin-bottom:20px;max-width:340px;margin-left:auto;margin-right:auto;line-height:1.6}
.ma-sub-no-btn{
  display:inline-flex;align-items:center;gap:8px;
  background:var(--brand);color:#fff;border:none;border-radius:10px;
  padding:12px 28px;font-size:14px;font-weight:700;cursor:pointer;
  font-family:inherit;transition:background .15s,transform .1s;box-shadow:0 4px 14px rgba(99,102,241,.3);
}
.ma-sub-no-btn:hover{background:var(--brand-d);transform:translateY(-1px)}

/* ════════════════════════════════════════════
   SUBSCRIPTION TIMELINE BAR
════════════════════════════════════════════ */
.ma-sub-timeline-wrap{
  background:var(--surface);border:1px solid var(--border);
  border-radius:14px;padding:20px 24px;margin-bottom:16px;
}
.ma-sub-tl-hdr{font-weight:700;font-size:13px;margin-bottom:14px;color:var(--text);display:flex;align-items:center;gap:7px}
.ma-sub-tl-bar-wrap{}
.ma-sub-tl-bar{
  height:10px;background:var(--border);border-radius:99px;overflow:hidden;margin-bottom:10px;
}
.ma-sub-tl-fill{
  height:100%;background:var(--brand);border-radius:99px;
  transition:width .6s cubic-bezier(.4,0,.2,1);
}
.ma-sub-tl-labels{
  display:flex;justify-content:space-between;align-items:center;
  font-size:11px;color:var(--muted);
}
.ma-sub-tl-pct-val{font-weight:700;color:var(--brand);font-size:12px}

/* ════════════════════════════════════════════
   SUBSCRIPTION HISTORY LIST
════════════════════════════════════════════ */
.ma-sub-history-list{padding:4px 0}
.ma-sub-hist-item{
  display:flex;gap:14px;align-items:flex-start;
  padding:16px 0;border-bottom:1px solid var(--border);
  transition:background .12s;
}
.ma-sub-hist-item:last-child{border-bottom:none}
.ma-sub-hist-item.current{
  background:linear-gradient(90deg,rgba(99,102,241,.06) 0%,transparent 100%);
  margin:0 -20px;padding:16px 20px;border-radius:10px;border-bottom:none;
  margin-bottom:1px;
}
.ma-sub-hist-icon{
  font-size:20px;line-height:1;margin-top:3px;min-width:32px;text-align:center;
  background:var(--surf2);border-radius:8px;padding:6px;width:32px;height:32px;
  display:flex;align-items:center;justify-content:center;font-size:15px;flex-shrink:0;
}
.ma-sub-hist-item.current .ma-sub-hist-icon{background:rgba(99,102,241,.12);color:var(--brand)}
.ma-sub-hist-body{flex:1}
.ma-sub-hist-name{font-weight:700;font-size:14px;color:var(--text);display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:4px}
.ma-sub-hist-dates{font-size:12px;color:var(--muted);margin-bottom:3px;display:flex;align-items:center;gap:5px}
.ma-sub-hist-rem{font-size:12px;color:var(--brand);font-weight:600;margin-top:2px}
.ma-sub-hist-order{font-size:11px;color:var(--muted);margin-top:2px}

/* History status badges */
.ma-sub-hist-badge{
  font-size:10px;font-weight:700;padding:3px 9px;border-radius:20px;text-transform:uppercase;letter-spacing:.4px;
}
.ma-sub-hist-badge.active{background:#dcfce7;color:#16a34a}
.ma-sub-hist-badge.expired{background:#fee2e2;color:#dc2626}
.ma-sub-hist-badge.cancelled{background:#f1f5f9;color:#64748b}
.ma-sub-hist-badge.pending{background:#fef3c7;color:#d97706}

/* ── Keyboard Shortcut Toggle ── */
.ma-shortcut-toggle{position:relative;display:inline-block;width:44px;height:24px;flex-shrink:0}
.ma-shortcut-toggle input{opacity:0;width:0;height:0}
.ma-shortcut-slider{position:absolute;cursor:pointer;inset:0;background:var(--border);border-radius:24px;transition:.25s}
.ma-shortcut-slider:before{content:'';position:absolute;width:18px;height:18px;left:3px;bottom:3px;background:#fff;border-radius:50%;transition:.25s;box-shadow:0 1px 3px rgba(0,0,0,.2)}
.ma-shortcut-toggle input:checked+.ma-shortcut-slider{background:var(--brand)}
.ma-shortcut-toggle input:checked+.ma-shortcut-slider:before{transform:translateX(20px)}

/* ── Item Enable/Disable Toggle Switch ── */
.ma-item-toggle{position:relative;display:inline-block;width:42px;height:24px;flex-shrink:0;vertical-align:middle}
.ma-item-toggle input{opacity:0;width:0;height:0;position:absolute}
.ma-item-slider{position:absolute;cursor:pointer;inset:0;background:#cbd5e1;border-radius:34px;transition:.22s}
.ma-item-slider:before{content:'';position:absolute;width:18px;height:18px;left:3px;bottom:3px;background:#fff;border-radius:50%;transition:.22s;box-shadow:0 1px 4px rgba(0,0,0,.25)}
.ma-item-toggle input:checked+.ma-item-slider{background:var(--brand)}
.ma-item-toggle input:checked+.ma-item-slider:before{transform:translateX(18px)}
.ma-item-toggle input:focus+.ma-item-slider{outline:2px solid var(--brand);outline-offset:2px}

/* ── Shortcut Reference Chart ── */
.ma-shortcut-grid{display:flex;flex-direction:column;gap:4px}
.ma-sk-row{display:flex;align-items:center;gap:12px;padding:7px 10px;border-radius:8px;background:var(--surf2);transition:background .15s}
.ma-sk-row:hover{background:var(--surf3,#e8eaf0)}
.ma-sk-badge{display:flex;align-items:center;gap:3px;min-width:120px;flex-shrink:0}
.ma-sk-badge kbd{display:inline-flex;align-items:center;justify-content:center;background:var(--surface);border:1px solid var(--border);border-bottom-width:2px;border-radius:5px;font-size:11px;font-weight:700;font-family:inherit;color:var(--text);padding:2px 6px;min-width:22px;line-height:1.4;box-shadow:0 1px 2px rgba(0,0,0,.07)}
.ma-sk-desc{font-size:13px;color:var(--text);font-weight:500}

/* ── Invoice / Purchase Gap Reuse Chips ── */
.ma-gap-label{font-size:11px;font-weight:700;color:var(--muted);text-transform:uppercase;letter-spacing:.4px;margin-bottom:5px}
.ma-gap-chips{display:flex;flex-wrap:wrap;gap:5px}
.ma-gap-chip{
  display:inline-flex;align-items:center;gap:4px;
  padding:4px 10px;border-radius:20px;font-size:12px;font-weight:600;cursor:pointer;
  background:var(--surf2);color:var(--text);border:1.5px solid var(--border);
  transition:all .15s;user-select:none;
}
.ma-gap-chip:hover{border-color:var(--brand);color:var(--brand);background:rgba(99,102,241,.07)}
.ma-gap-chip.on{background:var(--brand);color:#fff;border-color:var(--brand);box-shadow:0 2px 8px rgba(99,102,241,.25)}

/* ── Pagination ── */
.ma-pagination{display:flex;align-items:center;justify-content:center;gap:5px;padding:14px 0 4px;flex-wrap:wrap}
.ma-pagination .ma-pg-info{font-size:12px;color:var(--muted);margin:0 8px;white-space:nowrap}
.ma-pagination button{min-width:34px;height:34px;padding:0 10px;border-radius:8px;border:1.5px solid var(--bdr);background:var(--surf);color:var(--text);font-size:13px;font-weight:600;cursor:pointer;transition:all .15s;display:inline-flex;align-items:center;justify-content:center}
.ma-pagination button:hover:not(:disabled){border-color:var(--brand);color:var(--brand);background:rgba(99,102,241,.07)}
.ma-pagination button.active{background:var(--brand);color:#fff;border-color:var(--brand);box-shadow:0 2px 8px rgba(99,102,241,.25)}
.ma-pagination button:disabled{opacity:.35;cursor:not-allowed}

/* ── Settings Two-Column Grid ── */
.ma-settings-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:20px;
  align-items:start;
}
@media(max-width:860px){
  .ma-settings-grid{grid-template-columns:1fr}
}
.ma-settings-col{display:flex;flex-direction:column}
.ma-settings-card{padding:22px 22px 18px}
.ma-settings-card-hdr{
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom:16px;
  padding-bottom:14px;
  border-bottom:1px solid var(--border);
}
.ma-settings-card-icon{font-size:22px;line-height:1;flex-shrink:0}
.ma-settings-card-title{font-size:14px;font-weight:700;color:var(--text);line-height:1.3}
.ma-settings-card-sub{font-size:12px;color:var(--muted);margin-top:2px}

/* ── Customer / Supplier combo-box ── */
.ma-combo-wrap{position:relative;width:100%}
.ma-combo-input-row{display:flex;gap:0}
.ma-combo-input-row input{flex:1;border-radius:7px 0 0 7px!important;border-right:none!important;min-width:0}
.ma-combo-arrow{display:flex;align-items:center;justify-content:center;padding:0 10px;background:var(--surf2);border:1.5px solid var(--bdr);border-left:none;border-radius:0 7px 7px 0;cursor:pointer;color:var(--muted);transition:background .15s;flex-shrink:0;font-size:13px}
.ma-combo-arrow:hover{background:var(--surf3);color:var(--brand)}
.ma-combo-drop{position:absolute;top:calc(100% + 4px);left:0;right:0;background:var(--surf);border:1.5px solid var(--brand);border-radius:8px;box-shadow:0 6px 24px rgba(0,0,0,.12);z-index:999;max-height:220px;overflow:hidden;display:none;flex-direction:column}
.ma-combo-drop.open{display:flex}
.ma-combo-search{padding:8px 10px;border:none;border-bottom:1.5px solid var(--bdr);background:var(--surf2);font-size:12px;color:var(--text);outline:none;border-radius:8px 8px 0 0;width:100%;box-sizing:border-box}
.ma-combo-list{overflow-y:auto;max-height:168px}
.ma-combo-opt{padding:9px 12px;font-size:13px;cursor:pointer;display:flex;align-items:flex-start;gap:8px;border-bottom:1px solid var(--bdr)}
.ma-combo-opt:last-child{border-bottom:none}
.ma-combo-opt:hover,.ma-combo-opt.hi{background:var(--brand-bg,#eff6ff)}
.ma-combo-opt-name{font-weight:600;color:var(--text);line-height:1.3}
.ma-combo-opt-sub{font-size:11px;color:var(--muted);margin-top:2px}
.ma-combo-empty{padding:12px;font-size:12px;color:var(--muted);text-align:center}

/* ════════════════════════════════════════════
   MOBILE RESPONSIVE — FULL USER CONTROL PANEL
   Extended fixes for all pages & components
════════════════════════════════════════════ */

/* ── Bill row: item field always full-width on mobile ── */
@media(max-width:768px){
  /* Item combo-wrap spans full row width */
  .ma-bill-row>div:first-child{grid-column:1/-1}

  /* HSN + Qty side by side */
  .ma-bill-row input[id^="bi-h"],
  .ma-bill-row input[id^="bi-q"],
  .ma-bill-row input[id^="pu-h"],
  .ma-bill-row input[id^="pu-q"]{width:100%}

  /* Warranty wrapper spans full row on mobile */
  .ma-bill-row .ma-warr-wrap{grid-column:1/-1;width:100%}

  /* Amount field and delete side by side */
  .ma-bill-row input[id^="bi-a"],
  .ma-bill-row input[id^="pu-a"]{flex:1}

  /* Delete button — bigger tap target */
  .ma-del-btn{
    min-width:36px;min-height:36px;
    border-radius:8px;font-size:15px;
    display:flex;align-items:center;justify-content:center;
  }

  /* Bill box padding reduced */
  .ma-bill-box{padding:14px 12px}

  /* Action row — wrap & full-width buttons */
  .ma-action-row{flex-direction:column;gap:8px}
  .ma-action-row .ma-btn{width:100%;justify-content:center;text-align:center}

  /* GST report 4-col → 2-col */
  .ma-stats[style*="repeat(4"]{grid-template-columns:repeat(2,1fr)!important}

  /* Page sub header wrapping */
  .ma-pg-sub{font-size:12px;line-height:1.5}

  /* Stamp row text wrapping */
  #b-stamp-row,#pu-stamp-row{flex-wrap:wrap}
  #b-stamp-hint,#pu-stamp-hint{display:block;margin-top:3px}

  /* IMEI section mobile fixes */
  .ma-imei-input-row{flex-direction:column}
  .ma-imei-input-row .ma-btn{width:100%}
  .ma-imei-slot{flex-direction:column;align-items:stretch}
  .ma-imei-select{max-width:100%}

  /* Combo drop — prevent clipping */
  .ma-combo-wrap{overflow:visible!important}
  .ma-combo-drop{min-width:260px}

  /* Bill totals — full width on mobile */
  .ma-bill-totals{align-items:stretch}
  .ma-tot-row{justify-content:space-between;min-width:0;width:100%}

  /* Notes + discount row */
  .ma-bill-box>[style*="display:flex"][style*="gap:16px"]{flex-direction:column;gap:10px}
  .ma-bill-box>[style*="display:flex"][style*="gap:16px"] .fg{min-width:0!important;max-width:100%!important;flex:1 1 auto}

  /* Quick action buttons — 3-per-row grid on tablet */
  .ma-qa{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
  .ma-qa-btn{justify-content:center;padding:9px 8px;font-size:12px}

  /* Search row spacing */
  .ma-search-row{gap:8px}
  .ma-search-inp{font-size:14px}

  /* Dashboard two-column chart area */
  .ma-chart-bars{height:100px}

  /* Modal — centered sheet with max height */
  .ma-modal-bg{align-items:flex-end;padding:0}
  .ma-modal{
    border-radius:18px 18px 0 0;
    max-width:100%;
    width:100%;
    max-height:85vh;
    padding:22px 18px 28px;
    margin:0;
  }
  .ma-modal::before{
    content:'';display:block;
    width:36px;height:4px;
    background:var(--bdr);border-radius:2px;
    margin:0 auto 18px;
  }
  .ma-modal-actions{flex-direction:column-reverse;gap:8px}
  .ma-modal-actions .ma-btn{width:100%;justify-content:center}

  /* Tables in cards — hide scroll hint on tablet */
  .ma-card::before{display:none}
  .ma-tbl{min-width:480px}

  /* Pagination smaller on mobile */
  .ma-pagination button{min-width:30px;height:30px;font-size:12px}
}

/* ════ PHONE ≤ 480px ════ */
@media(max-width:480px){
  /* Bill row → fully stacked single column */
  .ma-bill-row{
    grid-template-columns:1fr!important;
    gap:7px;
    padding:12px;
  }
  .ma-bill-row>*{width:100%!important;grid-column:1/-1!important}
  .ma-bill-row>select{grid-column:1/-1!important;width:100%!important}
  .ma-bill-row .ma-warr-wrap{grid-column:1/-1!important;width:100%!important}

  /* Show previously-hidden amount column */
  .ma-bill-row>*:nth-child(5){display:block!important}

  /* Delete button full-width on phone */
  .ma-del-btn{
    width:100%;border-radius:8px;
    padding:7px;font-size:13px;
    background:var(--red-bg,#fee2e2);color:var(--red,#dc2626);
    border:1.5px solid var(--red-bg,#fee2e2);
  }
  .ma-del-btn:hover{background:var(--red,#dc2626);color:#fff}

  /* Quick actions — 2-per-row */
  .ma-qa{grid-template-columns:1fr 1fr}

  /* Bill box tighter */
  .ma-bill-box{padding:12px 10px;border-radius:10px}

  /* Page header */
  .ma-pg-hdr{margin-bottom:12px}
  .ma-pg-title{font-size:16px}

  /* Topbar tighter */
  .ma-topbar-logo img{display:none}
  .ma-topbar-biz{font-size:12px;max-width:130px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

  /* Stats — 1×2 on very small */
  .ma-sc{padding:11px 12px}
  .ma-sc-val{font-size:16px}
  .ma-sc-lbl{font-size:11px}

  /* GST/PL 4-col forced to 2×2 */
  .ma-stats[style*="repeat(4"]{grid-template-columns:1fr 1fr!important}

  /* Settings grid */
  .ma-settings-card{padding:16px 14px 14px}
  .ma-settings-card-hdr{gap:10px;margin-bottom:12px;padding-bottom:10px}

  /* fg-2 fields → stack */
  .fg-2{grid-template-columns:1fr!important}

  /* IMEI tags wrapping */
  .ma-imei-tags{gap:5px}
  .ma-imei-tag{font-size:10px;padding:3px 9px}

  /* Combo drop wider on phone */
  .ma-combo-drop{min-width:calc(100vw - 32px);left:0;right:auto}

  /* Bill actions */
  .ma-action-row{gap:7px}
  .ma-action-row .ma-btn{padding:10px 14px;font-size:13px}

  /* Modal full bottom sheet */
  .ma-modal{max-height:92vh;padding:18px 16px 24px}

  /* Table hint visible again on phone */
  .ma-card::before{
    display:block;
    font-size:10px;color:var(--hint);
    padding:4px 14px;text-align:center;
  }

  /* Purchase invoice action buttons */
  #pg-purchase .ma-action-row .ma-btn:last-child{margin-left:0!important;margin-top:0}

  /* Pagination */
  .ma-pagination{gap:3px}
  .ma-pagination .ma-pg-info{display:none}
}

/* ════ VERY SMALL ≤ 360px ════ */
@media(max-width:360px){
  .ma-topbar{padding:0 8px;gap:6px}
  .ma-qa{grid-template-columns:1fr}
  .ma-bill-box{padding:10px 8px}
  .ma-main{padding:8px}
  .ma-pg-title{font-size:15px}
  .ma-stats[style*="repeat(4"]{grid-template-columns:1fr!important}
  .ma-modal{padding:16px 12px 20px}
}

/* ── Smooth dropdown on mobile touch ── */
@media(hover:none){
  .ma-combo-opt:active{background:var(--brand-bg,#eff6ff)}
  .ma-qa-btn:active,.ma-btn:active{opacity:.8;transform:scale(.98)}
  .ma-nav-lnk:active{background:var(--surf3)}
}

/* ── Prevent horizontal overflow on body ── */
@media(max-width:768px){
  body{overflow-x:hidden}
  .ma-main{overflow-x:hidden;padding-bottom:calc(env(safe-area-inset-bottom) + 32px)}
  #bill-rows,#pu-bill-rows{overflow:visible}
}

/* ── Safe area for notched phones ── */
@supports(padding-bottom:env(safe-area-inset-bottom)){
  @media(max-width:768px){
    /* sidebar padding-bottom already set inline above */
    .ma-topbar{padding-top:env(safe-area-inset-top)}
  }
}

/* ══════════════════════════════════════════════════════════
   COMPREHENSIVE MOBILE RESPONSIVE — USER CONTROL PANEL
   Full coverage: Dashboard · Invoices · Stock · Customers ·
   Purchase · GST · P&L · Expenses · Settings · Data & Backup
   ══════════════════════════════════════════════════════════ */

/* ── iOS/Android: prevent auto-zoom on input focus (min 16px) ── */
@media(max-width:768px){
  input,select,textarea{font-size:16px!important}
  .ma-combo-search{font-size:15px!important}
  .ma-bill-row input,.ma-bill-row select{font-size:14px!important}
}

/* ══════════════════════════════════════════════════════════
   TOPBAR  ≤ 768px
   ══════════════════════════════════════════════════════════ */
@media(max-width:768px){
  .ma-topbar-right{gap:6px}
  .ma-topbar-right .ma-btn{padding:6px 10px;font-size:12px}

  /* biz name ellipsis on overflow */
  .ma-topbar-biz{
    max-width:140px;
    overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  }
}

/* ══════════════════════════════════════════════════════════
   PAGE HEADER with action buttons  ≤ 768px
   ══════════════════════════════════════════════════════════ */
@media(max-width:768px){
  .ma-pg-hdr{
    display:flex;flex-wrap:wrap;align-items:center;gap:8px;
    margin-bottom:14px;
  }
  .ma-pg-hdr .ma-btn{margin-left:auto;white-space:nowrap}
  .ma-pg-sub{width:100%;margin-top:0}
}

/* ══════════════════════════════════════════════════════════
   DASHBOARD  ≤ 768px
   ══════════════════════════════════════════════════════════ */
@media(max-width:768px){
  /* Quick action pills — 2×2 grid */
  .ma-qa{display:grid;grid-template-columns:repeat(2,1fr);gap:8px}
  .ma-qa-btn{
    justify-content:center;text-align:center;
    padding:10px 8px;font-size:13px;
    border-radius:10px;
  }

  /* Stats cards — 2 per row */
  .ma-stats{grid-template-columns:1fr 1fr!important;gap:10px}
  .ma-sc{padding:12px 13px}
  .ma-sc-val{font-size:18px}
  .ma-sc-lbl{font-size:11px}
  .ma-sc-badge{font-size:10px;padding:2px 7px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;display:block}

  /* Two-column chart + recent invoices → stack */
  .ma-two{grid-template-columns:1fr}

  /* Chart bar height */
  .ma-chart-bars{height:90px}
}

@media(max-width:480px){
  /* Quick actions — 2 per row on phone */
  .ma-qa{grid-template-columns:1fr 1fr}
  .ma-qa-btn{font-size:12px;padding:9px 6px}

  /* Stats — still 2-col on phone, text smaller */
  .ma-stats{grid-template-columns:1fr 1fr!important}
  .ma-sc-val{font-size:16px}
}

@media(max-width:360px){
  /* Stats single column on very small phones */
  .ma-stats{grid-template-columns:1fr!important}
  .ma-qa{grid-template-columns:1fr}
}

/* ══════════════════════════════════════════════════════════
   TABLES — per-page min-width tuning  ≤ 768px
   ══════════════════════════════════════════════════════════ */
@media(max-width:768px){
  /* Customers — 7 cols */
  #pg-customers .ma-tbl{min-width:620px}
  /* Stock — 9 cols */
  #pg-stock .ma-tbl{min-width:700px}
  /* Sale invoices — 6 cols */
  #pg-invoices .ma-tbl{min-width:540px}
  /* Purchase invoices — 6 cols */
  #pg-purchase-invoices .ma-tbl{min-width:540px}
  /* GST slab/invoice tables */
  #pg-gst .ma-tbl{min-width:500px}
  /* P&L table */
  #pg-pl .ma-tbl{min-width:360px}
  /* Expenses table — 5 cols */
  #pg-expenses .ma-tbl{min-width:460px}

  /* Scroll hint bar shown on all tables */
  .ma-card{overflow-x:auto;-webkit-overflow-scrolling:touch}
}

/* ══════════════════════════════════════════════════════════
   SEARCH ROWS  ≤ 480px
   ══════════════════════════════════════════════════════════ */
@media(max-width:480px){
  .ma-search-row{flex-direction:column;gap:8px}
  .ma-search-row .ma-btn{width:100%;justify-content:center}
  .ma-search-inp{width:100%;box-sizing:border-box}
}

/* ══════════════════════════════════════════════════════════
   GST REPORT PAGE  ≤ 768px
   ══════════════════════════════════════════════════════════ */
@media(max-width:768px){
  #pg-gst>[style*="display:flex"]{
    flex-direction:column;align-items:stretch!important;gap:10px!important
  }
  #pg-gst .fg{margin:0!important;width:100%}
  #pg-gst .fg input{width:100%;box-sizing:border-box}
  #pg-gst .ma-btn{width:100%;justify-content:center}
}

/* ══════════════════════════════════════════════════════════
   PROFIT & LOSS PAGE  ≤ 480px
   ══════════════════════════════════════════════════════════ */
@media(max-width:480px){
  #pg-pl .ma-stats{grid-template-columns:1fr 1fr!important}
  #pg-pl .ma-sc-val{font-size:15px}
}

/* ══════════════════════════════════════════════════════════
   EXPENSES PAGE  ≤ 768px
   ══════════════════════════════════════════════════════════ */
@media(max-width:768px){
  #pg-expenses .ma-bill-box{max-width:100%!important}
  #pg-expenses .fg-2{grid-template-columns:1fr}
  #pg-expenses .ma-btn{width:100%;margin-top:4px;justify-content:center}
}

/* ══════════════════════════════════════════════════════════
   SETTINGS PAGE  ≤ 768px
   ══════════════════════════════════════════════════════════ */
@media(max-width:768px){
  /* Main settings 2-col → 1-col */
  .ma-settings-grid{grid-template-columns:1fr!important}

  /* Password section grid override (inline style) */
  #pg-settings>[style*="margin-top:28px"] .ma-settings-grid{
    grid-template-columns:1fr!important
  }

  /* Settings cards — tighter padding */
  .ma-settings-card{padding:16px 14px 14px}
  .ma-settings-card-hdr{gap:10px;margin-bottom:12px;padding-bottom:10px}
  .ma-settings-card-icon{font-size:18px}
  .ma-settings-card-title{font-size:13px}

  /* FG grids inside settings → single column */
  .ma-settings-card .fg-2{grid-template-columns:1fr}
  .ma-settings-card .fg-3{grid-template-columns:1fr}

  /* Logo upload box */
  .ma-logo-upload-box{padding:12px}
  .ma-logo-upload-btn{width:100%;justify-content:center;box-sizing:border-box}

  /* Save button full width */
  #pg-settings .ma-btn.p{width:100%;justify-content:center}

  /* Keyboard shortcut section */
  .ma-shortcut-grid{gap:6px}
  .ma-sk-row{flex-direction:column;align-items:flex-start;gap:4px;padding:6px 0}
  .ma-sk-badge{flex-wrap:wrap;gap:3px}
  .ma-sk-badge kbd{font-size:10px;padding:2px 5px}
  .ma-sk-desc{font-size:12px}

  /* Toggle switch position */
  .ma-settings-card-hdr .ma-shortcut-toggle{flex-shrink:0}
}

@media(max-width:480px){
  /* Password field full width */
  #chpw-new,#chpw-confirm{font-size:15px}

  /* Password rules cards — smaller text */
  .chpw-rule{padding:8px 10px!important;gap:8px!important}
  .chpw-rule-icon{font-size:15px!important;min-width:20px!important}
  #chpw-rules>[div]>div>div:first-child{font-size:12px!important}
  #chpw-rules>[div]>div>div:last-child{font-size:10px!important}

  /* Change password button */
  #chpw-btn{font-size:13px!important;padding:10px!important}
}

/* ══════════════════════════════════════════════════════════
   DATA & BACKUP PAGE  ≤ 768px
   ══════════════════════════════════════════════════════════ */
@media(max-width:768px){
  .ma-dio-section{padding:14px 14px}
  .ma-dio-sec-hdr{flex-direction:column;gap:10px}
  .ma-dio-sec-icon{width:36px;height:36px}
  .ma-dio-grid{grid-template-columns:1fr}
  .ma-dio-chips{flex-wrap:wrap;gap:6px}
  .ma-dio-chip{font-size:12px;padding:5px 12px}
  .ma-dio-format-cards{flex-wrap:wrap;gap:8px}
  .ma-dio-fmt{flex:1 1 calc(50% - 8px);min-width:80px}
}

@media(max-width:480px){
  .ma-dio-fmt{flex:1 1 calc(33% - 8px);min-width:70px;font-size:11px;padding:9px 6px}
}

/* ══════════════════════════════════════════════════════════
   CARD HEADERS with flex buttons  ≤ 480px
   ══════════════════════════════════════════════════════════ */
@media(max-width:480px){
  .ma-card-hdr{flex-wrap:wrap;gap:6px}
  .ma-card-hdr .ma-btn{font-size:11px;padding:5px 10px}
}

/* ══════════════════════════════════════════════════════════
   MODAL BOTTOM SHEET — complete on mobile  ≤ 480px
   ══════════════════════════════════════════════════════════ */
@media(max-width:480px){
  .ma-modal-bg{align-items:flex-end!important;padding:0!important}
  .ma-modal{
    border-radius:20px 20px 0 0!important;
    max-width:100%!important;width:100%!important;
    max-height:90vh!important;
    padding:20px 16px 28px!important;
    margin:0!important;
    overflow-y:auto;
  }
  /* Drag handle */
  .ma-modal::before{
    content:'';display:block;
    width:36px;height:4px;
    background:var(--bdr);border-radius:2px;
    margin:0 auto 16px;
  }
  .ma-modal-actions{flex-direction:column-reverse;gap:8px}
  .ma-modal-actions .ma-btn{width:100%!important;justify-content:center}

  /* Form grids inside modals → single column */
  .ma-modal .fg-2{grid-template-columns:1fr!important}
  .ma-modal .fg-3{grid-template-columns:1fr!important}
}

/* ══════════════════════════════════════════════════════════
   BILL / PURCHASE INVOICE FORM  ≤ 480px
   ══════════════════════════════════════════════════════════ */
@media(max-width:480px){
  /* Bill top section stack */
  .ma-bill-top{grid-template-columns:1fr!important}

  /* Action row full-width buttons */
  .ma-action-row{flex-direction:column;gap:8px}
  .ma-action-row .ma-btn{
    width:100%!important;justify-content:center;
    padding:11px 14px;font-size:13px;
  }

  /* Notes / discount inline row → stacked */
  .ma-bill-box>[style*="display:flex"]{flex-direction:column!important;gap:10px!important}

  /* Bill totals — full width, label + value spread */
  .ma-bill-totals{align-items:stretch!important}
  .ma-tot-row{
    justify-content:space-between!important;
    gap:8px!important;min-width:0!important;
    width:100%!important;
  }
  .ma-tot-grand{font-size:15px}

  /* Print/save buttons in purchase page */
  #pg-purchase .ma-bill-box>[style*="display:flex;gap"] .ma-btn{
    flex:1 1 auto;justify-content:center;
  }
}

/* ══════════════════════════════════════════════════════════
   COMBO DROPDOWN  ≤ 480px
   ══════════════════════════════════════════════════════════ */
@media(max-width:480px){
  .ma-combo-drop{
    min-width:calc(100vw - 24px)!important;
    left:0!important;right:auto!important;
    max-height:50vh;
  }
  .ma-combo-list{max-height:calc(50vh - 50px)}
  .ma-combo-search{font-size:15px!important;padding:10px 12px}
  .ma-combo-opt{padding:11px 12px}
  .ma-combo-opt-name{font-size:14px}
  .ma-combo-opt-sub{font-size:11px}
}

/* ══════════════════════════════════════════════════════════
   PAGINATION  ≤ 480px
   ══════════════════════════════════════════════════════════ */
@media(max-width:480px){
  .ma-pagination{gap:3px;flex-wrap:wrap;justify-content:center}
  .ma-pagination button{min-width:32px;height:32px;font-size:12px}
  .ma-pg-info{display:none}
}

/* ══════════════════════════════════════════════════════════
   IMEI SECTION  ≤ 480px
   ══════════════════════════════════════════════════════════ */
@media(max-width:480px){
  .ma-imei-input-row{flex-direction:column;gap:8px}
  .ma-imei-input-row .ma-btn{width:100%;justify-content:center}
  .ma-imei-tags{gap:5px;flex-wrap:wrap}
  .ma-imei-tag{font-size:11px;padding:4px 10px}
}

/* ══════════════════════════════════════════════════════════
   HORIZONTAL SCROLL HINT on tables  ≤ 480px
   ══════════════════════════════════════════════════════════ */
@media(max-width:480px){
  .ma-card::before{
    content:'← Scroll →';
    display:block;font-size:10px;color:var(--hint);
    padding:5px 14px;text-align:center;letter-spacing:.5px;
  }
}

/* ══════════════════════════════════════════════════════════
   PREVENT HORIZONTAL OVERFLOW  ≤ 768px
   ══════════════════════════════════════════════════════════ */
@media(max-width:768px){
  html,body{overflow-x:hidden;max-width:100vw}
  .ma-main{overflow-x:hidden;max-width:100%}
  .ma-pg{max-width:100%;overflow-x:hidden}
  *{box-sizing:border-box}
}

/* ══════════════════════════════════════════════════════════
   TOUCH DEVICE — larger tap targets & active states
   ══════════════════════════════════════════════════════════ */
@media(hover:none) and (pointer:coarse){
  .ma-btn{min-height:40px}
  .ma-qa-btn{min-height:44px}
  .ma-nav-lnk{min-height:42px}
  .ma-combo-opt{min-height:44px}
  .ma-del-btn{min-width:40px;min-height:40px}
  .ma-tbl td{padding:11px 14px}

  /* Active states for touch feedback */
  .ma-btn:active{opacity:.8;transform:scale(.98)}
  .ma-qa-btn:active{opacity:.8;transform:scale(.98)}
  .ma-combo-opt:active{background:var(--brand-bg,#eff6ff)}
  .ma-nav-lnk:active{background:var(--surf3)}
}

/* ══════════════════════════════════════════════════════════
   PENDING PAYMENTS PAGE
   ══════════════════════════════════════════════════════════ */
#pg-pending-payment .ma-pg-title { color: var(--ma-danger, #dc3545); }

/* Customer row – click effect */
#pp-cust-tbody tr { transition: background .15s; }
#pp-cust-tbody tr:hover { background: var(--surf2, #f8f9fa); cursor: default; }

/* Amount – negative (pending) */
.pp-neg { color: var(--ma-danger, #dc3545); font-weight: 700; }
/* Amount – positive (cleared) */
.pp-pos { color: var(--ma-success, #28a745); font-weight: 700; }

/* Back button row */
#pp-invoice-view .ma-search-row { gap: 10px; margin-bottom: 10px; }

/* ══════════════════════════════════════════════════════════
   MOBILE SCROLL FIX — ensure all sections fully visible
   Fixes: sidebar items clipped, main content bottom cutoff
   ══════════════════════════════════════════════════════════ */
@media screen and (max-width:768px){
  /* Let the page scroll naturally on mobile */
  html,body{
    height:auto!important;
    min-height:100%!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
  }
  #ma-shell{
    height:auto!important;
    min-height:100vh!important;
    overflow:visible!important;
  }
  .ma-body{
    overflow:visible!important;
    flex:1!important;
    min-height:0!important;
  }
  .ma-main{
    overflow-y:visible!important;
    height:auto!important;
    min-height:0!important;
    /* extra bottom clearance so content isn't hidden behind browser chrome */
    padding-bottom:80px!important;
  }
  /* Sidebar drawer: fixed, full height, internally scrollable */
  .ma-sidebar{
    position:fixed!important;
    top:0!important;left:0!important;
    height:100%!important;
    height:100dvh!important; /* dynamic viewport height - accounts for browser chrome */
    overflow-y:auto!important;
    overflow-x:hidden!important;
    -webkit-overflow-scrolling:touch!important;
    padding-bottom:calc(74px + env(safe-area-inset-bottom, 0px))!important;
  }
}

/* ════════════════════════════════════════════════════════════════
   SUBSCRIPTION / PRICING / PLAN-GATE  (added v2.6 — plan flow)
   ════════════════════════════════════════════════════════════════ */

/* Landing page button additions */
.btn-ghost{padding:9px 20px;background:transparent;border:1.5px solid var(--bdr);border-radius:8px;color:#e2e8f0;cursor:pointer;font-size:13px;font-weight:600;transition:all .15s}
.btn-ghost:hover{border-color:var(--brand);color:var(--brand)}
.btn-hero-s{padding:15px 36px;background:#fff;border:1.5px solid var(--bdr);border-radius:10px;color:var(--text);font-size:15px;font-weight:700;cursor:pointer;transition:all .15s}
.btn-hero-s:hover{border-color:var(--brand);color:var(--brand)}
.ma-nav-links{display:flex;gap:10px;align-items:center}

/* Pricing / plan-gate page wrapper */
.ma-pricing{min-height:100vh;background:linear-gradient(135deg,#f8fafc 0%,#eff6ff 100%);padding:40px 20px;overflow-y:auto}
.ma-pricing-wrap{max-width:560px;margin:0 auto}
/* Wider wrapper when showing the 3-plan grid */
#ma-pricing .ma-pricing-wrap{max-width:1140px}
.ma-pricing-head{text-align:center;margin-bottom:32px}
.ma-pricing-title{font-size:32px;font-weight:800;letter-spacing:-.5px;margin:14px 0 6px;color:var(--text)}
.ma-pricing-sub{font-size:15px;color:var(--muted);margin:0 auto 18px;max-width:480px;line-height:1.5}
.ma-plan-grid{display:flex;justify-content:center;gap:18px;flex-wrap:wrap}
.ma-plan-card{
  background:#fff;border:1.5px solid var(--bdr);border-radius:18px;
  padding:30px 26px 26px;width:100%;max-width:440px;
  box-shadow:0 6px 22px rgba(15,23,42,.05);
  position:relative;transition:transform .18s,box-shadow .18s;
  display:flex;flex-direction:column;            /* flex column so the button can pin to bottom */
}
.ma-plan-card.popular{border-color:var(--brand);box-shadow:0 10px 32px rgba(26,86,219,.15)}
.ma-plan-card:hover{transform:translateY(-2px);box-shadow:0 12px 36px rgba(26,86,219,.18)}
.ma-plan-badge{position:absolute;top:-12px;right:24px;background:linear-gradient(135deg,#f59e0b,#dc2626);color:#fff;font-size:11px;font-weight:800;padding:5px 12px;border-radius:999px;letter-spacing:.4px;text-transform:uppercase}
.ma-plan-name{font-size:22px;font-weight:800;color:var(--text);margin-bottom:10px;white-space:nowrap}
.ma-plan-price{display:flex;align-items:baseline;gap:6px;margin-bottom:6px}
.ma-plan-amt{font-size:42px;font-weight:900;color:var(--brand);letter-spacing:-1px;line-height:1}
.ma-plan-period{font-size:14px;color:var(--muted);font-weight:600}
.ma-plan-tag{font-size:12px;color:#16a34a;font-weight:700;background:#f0fdf4;display:inline-block;padding:4px 10px;border-radius:6px;margin-bottom:18px;align-self:flex-start}
.ma-plan-feats{list-style:none;padding:0;margin:0 0 22px;font-size:14px;color:var(--text);line-height:1.7;flex:1 1 auto}
.ma-plan-feats li{padding:4px 0;color:#334155}
.ma-plan-feats li strong{color:var(--text);font-weight:700}
/* Strong override for the purchase button — the legacy .ma-plan-btn rule
   uses a translucent-white background which becomes invisible on the
   new pricing-card's white background. We force a solid brand gradient. */
.ma-plan-card .ma-plan-btn,
.ma-plan-card .btn-full.ma-plan-btn{
  width:100%!important;
  padding:15px 18px!important;
  font-size:16px!important;
  font-weight:700!important;
  letter-spacing:.2px!important;
  border:none!important;
  border-radius:11px!important;
  cursor:pointer!important;
  background:linear-gradient(135deg,var(--brand),var(--brand-d))!important;
  color:#fff!important;
  box-shadow:0 6px 18px rgba(26,86,219,.25)!important;
  transition:transform .15s,box-shadow .15s,background .2s!important;
  margin-top:auto!important;                     /* pin button to bottom of card */
}
.ma-plan-card .ma-plan-btn:hover{
  transform:translateY(-1px)!important;
  box-shadow:0 8px 24px rgba(26,86,219,.35)!important;
}
.ma-plan-card .ma-plan-btn:active{transform:translateY(0)!important}
.ma-plan-card .ma-plan-btn:disabled{
  opacity:.6!important;cursor:wait!important;transform:none!important;
}
.ma-plan-secure{margin-top:12px;text-align:center;font-size:12px;color:var(--muted)}
.ma-pricing-foot{text-align:center;margin-top:32px;padding:24px;background:#fff;border:1px solid var(--bdr);border-radius:12px}

/* 3-plan grid override — replaces the simpler version I appended earlier */
.ma-plan-grid-3{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:22px;
  align-items:stretch;                            /* all cards stretch to tallest */
  max-width:1080px;
  margin:0 auto;
}
.ma-plan-grid-3 .ma-plan-card{
  max-width:none;                                  /* let the grid control width */
  padding:28px 22px 24px;
}
.ma-plan-grid-3 .ma-plan-name{font-size:20px}     /* slightly smaller so it never wraps */
.ma-plan-grid-3 .ma-plan-amt{font-size:36px}
.ma-plan-grid-3 .ma-plan-feats{font-size:13.5px;margin-bottom:18px}

@media (max-width:880px){
  .ma-plan-grid-3{grid-template-columns:1fr;max-width:440px}
  .ma-plan-grid-3 .ma-plan-name{font-size:22px}
  .ma-plan-grid-3 .ma-plan-amt{font-size:42px}
}

@media (max-width:480px){
  .ma-pricing{padding:24px 14px}
  .ma-pricing-title{font-size:26px}
  .ma-plan-card{padding:24px 22px}
  .ma-plan-amt{font-size:36px}
}

/* My Subscription page */
.ma-sub-grid{display:grid;grid-template-columns:1.2fr 1fr;gap:18px}
@media (max-width:760px){.ma-sub-grid{grid-template-columns:1fr}}
.ma-sub-card{background:#fff;border:1px solid var(--bdr);border-radius:14px;padding:24px;box-shadow:0 1px 3px rgba(15,23,42,.04)}
.ma-sub-card.primary{background:linear-gradient(135deg,#eff6ff 0%,#fff 60%);border-color:#bfdbfe}
.ma-sub-card.warn{text-align:center;padding:40px 24px;border-color:#fbbf24;background:#fffbeb}
.ma-sub-plan-name{font-size:24px;font-weight:800;color:var(--text);margin-bottom:8px;display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.ma-sub-trial-tag{font-size:11px;font-weight:700;background:#fde68a;color:#92400e;padding:3px 9px;border-radius:6px;letter-spacing:.3px;text-transform:uppercase}
.ma-sub-status-row{display:flex;align-items:center;gap:12px;margin-bottom:18px;flex-wrap:wrap}
.ma-sub-badge{display:inline-block;padding:3px 10px;border-radius:999px;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.4px}
.ma-sub-badge.active{background:#dcfce7;color:#15803d}
.ma-sub-badge.expired{background:#fee2e2;color:#b91c1c}
.ma-sub-badge.cancelled{background:#f1f5f9;color:#64748b}
.ma-sub-badge.pending{background:#fef3c7;color:#92400e}
.ma-sub-days{display:flex;align-items:baseline;gap:8px;margin:14px 0 10px}
.ma-sub-days-num{font-size:48px;font-weight:900;color:var(--brand);letter-spacing:-1.5px;line-height:1}
.ma-sub-days-num.warn{color:#dc2626}
.ma-sub-days-lbl{font-size:14px;color:var(--muted);font-weight:600}
.ma-sub-progress{height:8px;background:#e2e8f0;border-radius:4px;overflow:hidden;margin-top:6px}
.ma-sub-progress-bar{height:100%;background:linear-gradient(90deg,#10b981,#059669);transition:width .4s}
.ma-sub-progress-bar.warn{background:linear-gradient(90deg,#f59e0b,#dc2626)}
.ma-sub-section-ttl{font-size:13px;font-weight:700;color:#64748b;text-transform:uppercase;letter-spacing:.06em;margin-bottom:14px}
.ma-sub-deet{width:100%;font-size:14px;border-collapse:collapse}
.ma-sub-deet th{text-align:left;padding:8px 0;color:var(--muted);font-weight:500;width:140px;font-size:13px}
.ma-sub-deet td{padding:8px 0;color:var(--text);font-weight:600}
.ma-sub-history{width:100%;border-collapse:collapse;font-size:13px}
.ma-sub-history th{text-align:left;padding:10px 12px;background:#f8fafc;border-bottom:1px solid var(--bdr);font-weight:700;color:#475569;font-size:12px;text-transform:uppercase;letter-spacing:.04em}
.ma-sub-history td{padding:10px 12px;border-bottom:1px solid #f1f5f9;color:var(--text)}
.ma-sub-history tr:last-child td{border-bottom:0}

/* ─── Trial & 3-plan layout additions ─── */
.btn-trial{padding:8px 16px;border-radius:8px;border:1.5px solid #059669;background:transparent;color:#059669;font-size:13px;font-weight:700;cursor:pointer;transition:.15s}
.btn-trial:hover{background:#059669;color:#fff}
.btn-hero-trial{padding:14px 28px;border-radius:10px;font-size:15px;font-weight:700;cursor:pointer;border:2px solid #059669;background:transparent;color:#059669;transition:.18s}
.btn-hero-trial:hover{background:#059669;color:#fff;transform:translateY(-1px)}

/* When the pricing screen shows 3 plans, give it a wider container */
#ma-pricing .ma-pricing-wrap{max-width:1140px}

.ma-plan-grid-3{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:22px;
  align-items:stretch;
  margin-top:8px;
}
.ma-plan-grid-3 .ma-plan-card{
  display:flex;
  flex-direction:column;
  max-width:none;
  width:auto;
  padding:32px 26px 28px;
  margin:0;
}
.ma-plan-grid-3 .ma-plan-card.popular{
  border-width:2px;
  border-color:var(--brand);
  box-shadow:0 14px 40px rgba(26,86,219,.18);
  position:relative;
}
.ma-plan-grid-3 .ma-plan-name{font-size:20px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ma-plan-grid-3 .ma-plan-amt{font-size:36px}
.ma-plan-grid-3 .ma-plan-tag{font-size:11px;padding:3px 9px;white-space:nowrap}
.ma-plan-grid-3 .ma-plan-feats{flex:1 1 auto;margin-bottom:18px;font-size:13.5px;line-height:1.65}
.ma-plan-grid-3 .ma-plan-feats li{padding:3px 0}
.ma-plan-grid-3 .ma-plan-card .ma-plan-btn{
  margin-top:auto;
  font-size:14px!important;
  padding:13px 14px!important;
  white-space:nowrap;
}
.ma-plan-grid-3 .ma-plan-secure{margin-top:10px;font-size:11px}

@media(max-width:880px){
  .ma-plan-grid-3{grid-template-columns:1fr;max-width:480px;margin:0 auto}
  .ma-plan-grid-3 .ma-plan-name{font-size:22px;white-space:normal}
}

.ma-plan-btn.featured{background:linear-gradient(135deg,#2563eb,#7c3aed)!important;box-shadow:0 6px 20px rgba(99,102,241,.35)!important}
.ma-plan-btn.featured:hover{box-shadow:0 8px 28px rgba(99,102,241,.5)!important}

/* ════════════════════════════════════════════
   LANDING PAGE — DEEP-DIVE SECTIONS
═══════════════════════════════════════════ */
.ma-deep{padding:80px 24px;background:#fff}
.ma-deep.alt{background:linear-gradient(180deg,#f8fafc,#fff)}
.ma-deep-row{max-width:1100px;margin:0 auto;display:grid;grid-template-columns:1fr 1fr;gap:60px;align-items:center}
.ma-deep-row.reverse .ma-deep-text{order:2}
.ma-deep-row.reverse .ma-deep-mock{order:1}
.ma-deep-tag{display:inline-block;padding:5px 12px;border-radius:999px;background:#dbeafe;color:#1d4ed8;font-size:12px;font-weight:700;letter-spacing:.3px;margin-bottom:14px}
.ma-deep-text h2{font-size:30px;font-weight:800;letter-spacing:-.5px;line-height:1.2;margin:0 0 14px;color:var(--text)}
.ma-deep-text > p{font-size:16px;color:#475569;line-height:1.65;margin:0 0 22px}
.ma-deep-list{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:12px}
.ma-deep-list li{padding-left:24px;position:relative;font-size:14.5px;color:#334155;line-height:1.55}
.ma-deep-list li::before{content:"✓";position:absolute;left:0;top:0;color:#16a34a;font-weight:900;font-size:15px}
.ma-deep-list li strong{color:var(--text);font-weight:700}
.ma-deep-mock{display:flex;justify-content:center}

/* Mock visual cards */
.ma-mock-card{
  width:100%;max-width:380px;background:#fff;border:1.5px solid var(--bdr);border-radius:14px;
  padding:20px;box-shadow:0 12px 36px rgba(15,23,42,.08);font-size:13.5px
}
.ma-mock-row{display:flex;justify-content:space-between;align-items:center;padding:6px 0;font-weight:700}
.ma-mock-row.sub{font-weight:500;color:var(--muted);font-size:12px;padding:2px 0 12px;border-bottom:1px dashed #e2e8f0;margin-bottom:8px}
.ma-mock-line{display:flex;justify-content:space-between;padding:5px 0;color:#334155}
.ma-mock-tot{display:flex;justify-content:space-between;padding:6px 0;border-top:1px dashed #e2e8f0;color:#475569;font-weight:600}
.ma-mock-tot.grand{font-weight:900;font-size:15px;color:var(--text);border-top:2px solid var(--text);margin-top:4px}
.ma-mock-stock{display:grid;grid-template-columns:1fr 110px 36px;gap:10px;align-items:center;padding:6px 0;font-size:13px}
.ma-mock-stock .bar{display:block;height:6px;background:#e2e8f0;border-radius:3px;overflow:hidden}
.ma-mock-stock .bar > span{display:block;height:100%;border-radius:3px}
.ma-mock-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:10px 0 14px}
.ma-mock-grid .lbl{font-size:11px;color:var(--muted);font-weight:600}
.ma-mock-grid .num{font-size:17px;font-weight:800;margin-top:2px}

/* HOW IT WORKS */
.ma-howto{padding:70px 24px 60px;background:#f8fafc}
.ma-howto-title{text-align:center;font-size:30px;font-weight:800;letter-spacing:-.5px;margin:0 0 36px;color:var(--text)}
.ma-howto-grid{max-width:1080px;margin:0 auto;display:grid;grid-template-columns:repeat(3,1fr);gap:22px}
.ma-howto-card{background:#fff;border:1.5px solid var(--bdr);border-radius:16px;padding:30px 24px;text-align:center;box-shadow:0 4px 14px rgba(15,23,42,.04)}
.ma-howto-num{width:48px;height:48px;border-radius:50%;background:linear-gradient(135deg,var(--brand),var(--brand-d));color:#fff;font-weight:900;font-size:22px;display:flex;align-items:center;justify-content:center;margin:0 auto 14px}
.ma-howto-card h3{font-size:18px;font-weight:800;margin:0 0 8px;color:var(--text)}
.ma-howto-card p{font-size:14px;color:#475569;line-height:1.6;margin:0}

/* FAQ */
.ma-faq{padding:60px 24px;max-width:780px;margin:0 auto}
.ma-faq-title{text-align:center;font-size:28px;font-weight:800;letter-spacing:-.5px;margin:0 0 28px;color:#fff;}
.ma-faq-q{background:#fff;border:1.5px solid var(--bdr);border-radius:12px;padding:0;margin-bottom:10px;overflow:hidden;transition:.15s}
.ma-faq-q:hover{border-color:var(--brand)}
.ma-faq-q summary{padding:16px 20px;cursor:pointer;font-weight:700;font-size:15px;color:var(--text);list-style:none;display:flex;justify-content:space-between;align-items:center}
.ma-faq-q summary::-webkit-details-marker{display:none}
.ma-faq-q summary::after{content:"+";font-size:22px;font-weight:300;color:var(--muted);transition:.2s}
.ma-faq-q[open] summary::after{transform:rotate(45deg)}
.ma-faq-q p{margin:0;padding:0 20px 18px;font-size:14px;color:#475569;line-height:1.65}

/* FINAL CTA */
.ma-final-cta{padding:70px 24px;text-align:center;background:linear-gradient(135deg,#1a56db 0%,#5b21b6 100%);color:#fff}
.ma-final-cta h2{font-size:34px;font-weight:800;letter-spacing:-.5px;margin:0 0 8px}
.ma-final-cta > p{font-size:16px;opacity:.92;margin:0 0 24px}
.ma-final-cta-btns{display:flex;gap:14px;justify-content:center;flex-wrap:wrap}
.ma-final-cta .btn-hero-p,.ma-final-cta .btn-hero-trial{padding:14px 26px;border-radius:10px;font-size:15px;font-weight:700;cursor:pointer}
.ma-final-cta .btn-hero-p{background:#fff;color:var(--brand);border:none}
.ma-final-cta .btn-hero-p:hover{transform:translateY(-1px);box-shadow:0 8px 24px rgba(0,0,0,.2)}
.ma-final-cta .btn-hero-trial{background:transparent;border:2px solid #fff;color:#fff}
.ma-final-cta .btn-hero-trial:hover{background:#fff;color:#1a56db}

@media (max-width:760px){
  .ma-deep{padding:50px 18px}
  .ma-deep-row{grid-template-columns:1fr;gap:32px}
  .ma-deep-row.reverse .ma-deep-text{order:1}
  .ma-deep-row.reverse .ma-deep-mock{order:2}
  .ma-deep-text h2{font-size:24px}
  .ma-howto-grid{grid-template-columns:1fr;max-width:440px}
  .ma-howto-title,.ma-faq-title{font-size:24px}
  .ma-final-cta h2{font-size:26px}
}

/* ════════════════════════════════════════════
   MOBILE BOTTOM NAVIGATION BAR
   Only visible on screens ≤ 768px
════════════════════════════════════════════ */
.ma-bottom-nav{
  display:none; /* hidden on desktop */
}

@media screen and (max-width:768px){
  /* Show the bar */
  .ma-bottom-nav{
    display:flex;
    align-items:center;
    justify-content:space-around;
    position:fixed;
    bottom:0;
    left:0;
    right:0;
    height:62px;
    background:var(--surf);
    border-top:1.5px solid var(--bdr);
    z-index:300;
    padding:0 4px;
    padding-bottom:env(safe-area-inset-bottom);
    box-shadow:0 -4px 20px rgba(0,0,0,.08);
  }

  /* Add bottom padding to main content so it's not hidden behind nav */
  .ma-main{
    padding-bottom:calc(74px + env(safe-area-inset-bottom))!important;
  }

  /* Each tab button */
  .ma-bn-item{
    flex:1;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:3px;
    background:none;
    border:none;
    cursor:pointer;
    padding:6px 0 4px;
    color:var(--muted);
    transition:color .15s;
    -webkit-tap-highlight-color:transparent;
    outline:none;
    min-width:0;
  }

  .ma-bn-item:active{
    transform:scale(.94);
  }

  .ma-bn-item.active{
    color:var(--brand);
  }

  .ma-bn-icon{
    display:flex;
    align-items:center;
    justify-content:center;
    width:28px;
    height:28px;
    border-radius:8px;
    transition:background .15s;
  }

  .ma-bn-item.active .ma-bn-icon{
    background:rgba(99,102,241,.1);
  }

  .ma-bn-label{
    font-size:10px;
    font-weight:600;
    letter-spacing:.2px;
    line-height:1;
  }

  /* Centre FAB (+) button */
  .ma-bn-fab{
    flex-shrink:0;
    width:52px;
    height:52px;
    border-radius:50%;
    background:var(--brand);
    border:none;
    cursor:pointer;
    display:flex;
    align-items:center;
    justify-content:center;
    color:#fff;
    margin-bottom:10px;
    box-shadow:0 4px 18px rgba(99,102,241,.45);
    transition:transform .15s, box-shadow .15s;
    -webkit-tap-highlight-color:transparent;
    outline:none;
    position:relative;
    z-index:1;
  }

  .ma-bn-fab:active{
    transform:scale(.92);
    box-shadow:0 2px 10px rgba(99,102,241,.3);
  }
}
