:root{
  --blue:#1657d9;--nav:#071426;--bg:#f4f7fb;--card:#fff;--line:#d8e2ef;--text:#0f172a;--muted:#64748b;--red:#dc2626;--green:#16a34a;--orange:#ea580c;
  --sidebar:260px;
}
*{box-sizing:border-box}
html,body{margin:0;width:100%;min-height:100%;overflow-x:hidden}
body{font-family:Arial,Helvetica,sans-serif;background:var(--bg);color:var(--text);font-size:15px;line-height:1.35}
.app{min-height:100vh;background:var(--bg)}
.sidebar{width:var(--sidebar);background:var(--nav);color:#fff;position:fixed;left:0;top:0;bottom:0;z-index:1000;overflow-y:auto;overflow-x:hidden;box-shadow:6px 0 18px rgba(2,8,23,.10)}
.brand{padding:22px 24px;border-bottom:1px solid rgba(255,255,255,.12)}
.brand h2{margin:0;font-size:24px;line-height:1.15;word-break:normal}.brand small{display:block;margin-top:8px;color:#cbd5e1}.nav{padding:14px 0 25px}.nav a{display:block;color:#dbeafe;text-decoration:none;padding:11px 24px;font-size:16px;white-space:nowrap}.nav a:hover,.nav a.active{background:rgba(255,255,255,.11);color:#fff}.main{margin-left:var(--sidebar);width:calc(100vw - var(--sidebar));min-height:100vh;padding:22px 24px 35px;overflow-x:hidden}.topbar{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin:0 0 18px;padding:8px 0 16px;border-bottom:1px solid var(--line);background:var(--bg)}.topbar h1{margin:0;font-size:28px;line-height:1.15;word-break:normal}.topbar small{color:var(--muted)}.actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.btn{display:inline-block;border:0;border-radius:8px;background:var(--blue);color:#fff;padding:9px 14px;text-decoration:none;font-weight:700;cursor:pointer;white-space:nowrap}.btn.secondary{background:#eef2ff;color:#1e3a8a}.btn.danger{background:var(--red)}.btn.gray{background:#e2e8f0;color:#0f172a}.btn.small{padding:5px 9px;font-size:12px;border-radius:6px}.inline-form{display:inline-block;margin:0}.inline-form button{vertical-align:middle}
.grid{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:18px;width:100%;max-width:1500px}.card{background:var(--card);border:1px solid var(--line);border-radius:14px;padding:18px;box-shadow:0 2px 4px rgba(15,23,42,.04);min-width:0;overflow-x:auto}.card h2{margin-top:0}.col-3{grid-column:span 3}.col-4{grid-column:span 4}.col-5{grid-column:span 5}.col-6{grid-column:span 6}.col-7{grid-column:span 7}.col-8{grid-column:span 8}.col-12{grid-column:span 12}.metric{font-size:25px;font-weight:800;margin-top:8px}.muted{color:var(--muted)}.green{color:var(--green)}.red{color:var(--red)}.orange{color:var(--orange)}label{display:block;font-weight:700;margin:12px 0 6px}input,select,textarea{width:100%;max-width:100%;padding:10px 11px;border:1px solid #cbd5e1;border-radius:8px;background:#fff;font-size:14px}textarea{min-height:80px;resize:vertical}table{width:100%;border-collapse:collapse;margin-top:8px;min-width:560px}th,td{text-align:left;border-bottom:1px solid var(--line);padding:10px;vertical-align:top}th{background:#f8fafc;font-size:13px}.notice{border-radius:10px;padding:12px 14px;margin-bottom:16px}.notice.success{background:#dcfce7;color:#166534;border:1px solid #86efac}.notice.error{background:#fee2e2;color:#991b1b;border:1px solid #fecaca}.notice.warning{background:#fef3c7;color:#92400e;border:1px solid #fcd34d}.badge{display:inline-block;padding:4px 8px;border-radius:999px;background:#e0f2fe;color:#075985;font-size:12px;font-weight:700}.filters{display:flex;gap:10px;align-items:end;flex-wrap:wrap;margin-bottom:10px}.filters>div{min-width:180px}.login-wrap,.install-wrap{min-height:100vh;background:linear-gradient(135deg,#051735,#1663e6);display:flex;align-items:center;justify-content:center;padding:30px}.login-card,.install-card{background:#fff;border-radius:15px;padding:24px;max-width:470px;width:100%;box-shadow:0 20px 70px rgba(0,0,0,.22)}.install-card{max-width:980px}.install-card h1,.login-card h1{margin-top:0}.footer-note{font-size:12px;color:var(--muted);margin-top:12px}.summary-row{display:flex;justify-content:space-between;gap:15px;margin:7px 0;padding-bottom:7px;border-bottom:1px dashed #e2e8f0}.print-only{display:none}
@media(max-width:1200px){:root{--sidebar:235px}.nav a{font-size:15px;padding-left:20px}.brand{padding-left:20px}.main{padding:18px}.grid{gap:14px}.col-3{grid-column:span 6}.col-4,.col-5,.col-6,.col-7,.col-8{grid-column:span 12}}
@media(max-width:900px){.sidebar{position:relative;width:100%;height:auto;box-shadow:none}.nav{display:flex;overflow-x:auto;padding:8px}.nav a{padding:10px 12px}.app{display:block}.main{margin-left:0;width:100%;padding:14px}.topbar{position:relative;display:block}.topbar .actions{margin-top:10px}.grid{display:block}.card{margin-bottom:15px}.col-3,.col-4,.col-5,.col-6,.col-7,.col-8,.col-12{grid-column:span 12}table{min-width:650px}}
@media print{.sidebar,.topbar .actions,.btn,.no-print{display:none!important}.main{margin:0;width:100%;padding:0}.card{box-shadow:none;border:1px solid #ccc}.print-only{display:block}}
/* v10 employee professional page */
.form-grid{display:grid;gap:12px;grid-template-columns:1fr}.form-grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}.avatar{width:46px;height:46px;border-radius:50%;object-fit:cover;border:1px solid var(--line);background:#f8fafc;display:inline-flex;align-items:center;justify-content:center;font-weight:800;color:#1e3a8a}.avatar-placeholder{background:#dbeafe}.file-hint{font-size:12px;margin-top:6px;color:var(--muted)}
@media(max-width:900px){.form-grid.two{grid-template-columns:1fr}.avatar{width:42px;height:42px}}

/* v11 employees tab improvements */
.page-tabs{display:flex;gap:10px;margin:0 0 14px;flex-wrap:wrap}
.info-box{background:#eef6ff;border:1px solid #bfdbfe;border-radius:12px;padding:14px;line-height:1.5;color:#0f172a;margin-bottom:14px}
.clean-list{margin:0;padding-left:20px;line-height:1.8;color:#334155}
.table-wrap{width:100%;overflow:auto}

/* v13 professional sale/profit report */
.sales-page{max-width:1320px;width:100%;}
.sales-page .card{overflow:visible;}
.sales-page table{min-width:0;font-size:13px;}
.report-header{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:12px;padding:14px 16px;}
.report-header h2{margin:0 0 4px;font-size:22px}.report-header p{margin:0;font-size:13px}
.filter-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 10px;}
.filter-tabs .tab{display:inline-flex;align-items:center;justify-content:center;padding:9px 13px;border:1px solid var(--line);border-radius:999px;background:#fff;color:#1e293b;text-decoration:none;font-weight:800;font-size:13px;box-shadow:0 1px 3px rgba(15,23,42,.04)}
.filter-tabs .tab.active{background:var(--blue);color:#fff;border-color:var(--blue)}
.compact-filter{background:#fff;border:1px solid var(--line);border-radius:14px;padding:10px 14px;margin-bottom:14px;}
.compact-filter label{margin:0 0 4px;font-size:12px}.compact-filter input{height:38px}.compact-filter .btn{height:38px;margin-top:20px}
.sales-grid{gap:12px;max-width:1320px}.sales-grid .card{border-radius:12px;padding:14px;}
.report-title-card{background:linear-gradient(135deg,#ffffff,#f8fbff)}.report-title-line{display:flex;justify-content:space-between;align-items:center;gap:20px}.report-title-line h2{margin:0;font-size:22px}.report-title-line p{margin:4px 0 0}.big-profit{font-size:30px;font-weight:900;white-space:nowrap}.kpi{min-height:95px}.kpi .metric{font-size:23px}.small-kpi .metric{font-size:20px}.small-kpi small{color:var(--muted);font-size:12px}.chart-card h2,.compact-summary h2{font-size:18px;margin-bottom:4px}.profit-chart{display:flex;align-items:flex-end;gap:12px;height:245px;padding:10px 4px 0;border:1px solid #eef2f7;border-radius:12px;background:#fbfdff;overflow:hidden}.bar-col{flex:1;min-width:0;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;height:100%}.bar-value{font-size:11px;font-weight:800;margin-bottom:6px;white-space:nowrap}.bar-track{height:160px;width:100%;display:flex;align-items:flex-end;justify-content:center;border-bottom:1px solid #cbd5e1}.bar{width:32px;border-radius:8px 8px 0 0;min-height:8px;box-shadow:0 6px 12px rgba(15,23,42,.10)}.bar.profit{background:#16a34a}.bar.loss{background:#dc2626}.bar-label{font-size:12px;color:var(--muted);font-weight:800;margin-top:8px;white-space:nowrap}.compact-summary .summary-row{font-size:13px;margin:5px 0;padding-bottom:5px}.summary-row.total{font-size:15px;border-top:2px solid #e2e8f0;padding-top:9px;margin-top:9px}.mini-progress{height:7px;background:#eef2f7;border-radius:999px;overflow:hidden;margin:-1px 0 7px}.mini-progress span{display:block;height:100%;background:#1657d9;border-radius:999px}.formula-box{background:#f8fafc;border:1px dashed #cbd5e1;border-radius:12px;padding:14px;line-height:1.8;font-size:16px;text-align:center}.sales-page .badge{font-size:10px;padding:2px 6px}
@media(max-width:1200px){.sales-grid .col-3{grid-column:span 6}.sales-grid .col-4{grid-column:span 6}.sales-grid .col-8{grid-column:span 12}.profit-chart{height:230px}.bar-track{height:145px}.big-profit{font-size:26px}}
@media(max-width:900px){.report-header,.report-title-line{display:block}.big-profit{margin-top:10px}.filter-tabs .tab{flex:1}.sales-page .card{overflow:visible}.sales-grid .card{margin-bottom:12px}.profit-chart{gap:6px}.bar{width:24px}.bar-value{font-size:10px}.compact-filter .btn{margin-top:5px}}
@media print{.sales-page{max-width:100%}.filter-tabs,.compact-filter,.report-header.no-print{display:none!important}.sales-grid{display:grid;grid-template-columns:repeat(12,1fr);gap:8px}.sales-grid .card{break-inside:avoid;padding:10px}.profit-chart{height:190px}.bar-track{height:115px}.big-profit{font-size:24px}}

/* v14 Universal device responsive fixes: desktop, laptop, tablet, mobile */
.mobile-menu-btn,.sidebar-overlay{display:none}
img,svg,video,canvas{max-width:100%;height:auto}
.table-wrap{max-width:100%}
.card>table{display:block;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
.main{max-width:calc(100vw - var(--sidebar))}
.grid{margin-left:0;margin-right:0}

@media(max-width:900px){
  :root{--mobile-top:58px;--sidebar:270px}
  html,body{width:100%;max-width:100%;overflow-x:hidden!important}
  body.sidebar-open{overflow:hidden}
  .mobile-menu-btn{display:flex;position:fixed;top:10px;left:10px;width:44px;height:44px;z-index:1301;align-items:center;justify-content:center;border:0;border-radius:12px;background:#071426;color:#fff;font-size:28px;font-weight:900;box-shadow:0 6px 18px rgba(2,8,23,.25);cursor:pointer;line-height:1}
  .sidebar-overlay{display:none;position:fixed;inset:0;background:rgba(2,8,23,.52);z-index:1199;backdrop-filter:blur(1px)}
  body.sidebar-open .sidebar-overlay{display:block}
  .sidebar{position:fixed!important;left:-290px!important;top:0!important;bottom:0!important;width:270px!important;height:100vh!important;z-index:1300;overflow-y:auto!important;overflow-x:hidden!important;box-shadow:12px 0 30px rgba(2,8,23,.32);transition:left .22s ease;background:var(--nav)}
  body.sidebar-open .sidebar{left:0!important}
  .brand{padding:68px 18px 18px}.brand h2{font-size:22px}.brand small{font-size:12px}
  .nav{display:block!important;padding:8px 0 24px!important;overflow:visible!important}.nav a{display:block!important;width:100%;padding:13px 20px!important;font-size:16px!important;white-space:normal!important;border-bottom:1px solid rgba(255,255,255,.06)}
  .app{display:block;width:100%;max-width:100%;overflow-x:hidden;background:var(--bg)}
  .main{margin-left:0!important;width:100%!important;max-width:100%!important;min-width:0!important;padding:72px 12px 24px!important;overflow-x:hidden!important}
  .topbar{position:fixed!important;top:0;left:0;right:0;z-index:1100;min-height:62px;margin:0!important;padding:11px 12px 10px 66px!important;background:rgba(244,247,251,.98)!important;border-bottom:1px solid var(--line);box-shadow:0 2px 10px rgba(15,23,42,.08);display:flex!important;align-items:center!important;justify-content:space-between!important;gap:8px!important}
  .topbar h1{font-size:19px!important;line-height:1.1;margin:0;max-width:60vw;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.topbar small{display:none}.actions{margin:0!important;gap:6px}.actions .btn{padding:8px 10px!important;font-size:13px!important;border-radius:9px}
  .grid,.sales-grid{display:grid!important;grid-template-columns:1fr!important;gap:12px!important;width:100%!important;max-width:100%!important}.col-3,.col-4,.col-5,.col-6,.col-7,.col-8,.col-12{grid-column:1 / -1!important}
  .card{width:100%!important;max-width:100%!important;min-width:0!important;margin:0 0 12px!important;padding:14px!important;border-radius:12px!important;overflow:hidden!important}.card h2{font-size:20px!important;margin-bottom:10px}.metric{font-size:22px!important}.kpi{min-height:auto!important}
  input,select,textarea{font-size:16px!important;min-height:42px}label{font-size:14px}.btn{min-height:38px}
  .filters,.compact-filter{display:grid!important;grid-template-columns:1fr!important;gap:8px!important;padding:12px!important}.filters>div{min-width:0!important}.compact-filter .btn{margin-top:0!important;width:100%}
  table{display:block!important;width:100%!important;min-width:0!important;overflow-x:auto!important;-webkit-overflow-scrolling:touch;white-space:nowrap}th,td{font-size:13px!important;padding:9px 8px!important}
  .report-header,.report-title-line{display:block!important}.report-header{padding:13px!important}.report-header h2,.report-title-line h2{font-size:20px!important}.big-profit{font-size:25px!important;margin-top:8px;white-space:normal}.filter-tabs{display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important}.filter-tabs .tab{width:100%;font-size:12px!important;padding:9px 6px!important}.profit-chart{height:210px!important;gap:5px!important;overflow-x:auto!important;align-items:flex-end}.bar{width:20px!important}.bar-track{height:125px!important}.bar-value{font-size:10px!important}.bar-label{font-size:10px!important}
  .form-grid.two{grid-template-columns:1fr!important}.summary-row{font-size:13px;gap:8px}.summary-row span,.summary-row b{word-break:break-word}.page-tabs{display:grid!important;grid-template-columns:1fr!important}.page-tabs .btn{width:100%;text-align:center}
}

@media(max-width:480px){
  .main{padding-left:10px!important;padding-right:10px!important}.topbar h1{max-width:52vw;font-size:18px!important}.brand h2{font-size:20px}.card{padding:12px!important}.filter-tabs{grid-template-columns:1fr!important}.sales-page table{font-size:12px}.summary-row{display:block}.summary-row b{display:block;margin-top:3px}.profit-chart{height:190px!important}.bar{width:18px!important}.actions .btn{padding:7px 9px!important;font-size:12px!important}
}

@media(min-width:901px){
  .sidebar{left:0!important}.main{margin-left:var(--sidebar)!important;width:calc(100vw - var(--sidebar))!important}.card{scrollbar-width:thin}.sales-page{max-width:100%}.sales-grid{max-width:100%}
}

/* v15 user management fix */
.users-page .card{overflow:visible}
.green-badge{background:#dcfce7!important;color:#166534!important}
.red-badge{background:#fee2e2!important;color:#991b1b!important}
.users-page input[style*="display:none"]{display:none!important}
@media(max-width:900px){.users-page .card{overflow:auto}.users-page table{min-width:620px}}

/* v17 user tab permissions */
.permission-box{margin-top:16px;padding:14px;border:1px solid var(--line);border-radius:12px;background:#f8fbff}
.permission-box h3{margin:0 0 6px;font-size:17px}
.permission-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:10px}
.checkline{display:flex;align-items:center;gap:8px;margin:0;padding:9px 10px;border:1px solid #dbe5f2;border-radius:10px;background:#fff;font-weight:700;cursor:pointer}
.checkline input{width:auto;margin:0;accent-color:var(--blue)}
.checkline.disabled{opacity:.75;background:#eef2ff;cursor:not-allowed}
.green-badge{background:#dcfce7;color:#166534}.red-badge{background:#fee2e2;color:#991b1b}
@media(max-width:900px){.permission-grid{grid-template-columns:1fr}.users-page .card{overflow:visible}}

/* v20 branch access permissions */
.branch-permission-box{margin-top:14px;border:1px solid var(--line);border-radius:12px;padding:14px;background:#fbfdff}
.branch-permission-box h3{margin:0 0 6px}
.branch-limited-note{background:#fff7ed;border:1px solid #fed7aa;color:#9a3412;border-radius:12px;padding:12px 14px;margin-bottom:14px}

/* v24 safe desktop/mobile layout polish */
.main{min-width:0;}
.collection-page{max-width:1280px;width:100%;}
.collection-page .card{overflow:visible;}
@media(min-width:901px){
  .sales-page{max-width:1280px;width:100%;}
  .sales-grid{max-width:1280px;}
  .collection-page .col-5{grid-column:span 5;}
  .collection-page .col-7{grid-column:span 7;}
  .collection-page .col-3{grid-column:span 3;}
}
@media(max-width:900px){
  .collection-page .card,.sales-page .card{overflow-x:auto;}
  .collection-page table,.sales-page table{min-width:560px;}
}

/* v29 partial branch receive */
.receive-cell{min-width:280px;max-width:360px}.receive-branch-form{display:grid;grid-template-columns:1fr;gap:6px}.receive-branch-form label{font-size:11px;margin:2px 0 0;color:#475569}.receive-branch-form input,.receive-branch-form select{padding:7px 8px;font-size:12px;border-radius:7px}.receive-branch-form .btn{margin-top:4px;width:max-content}.collection-page .table-wrap table th:last-child,.collection-page .table-wrap table td:last-child{min-width:300px}
@media(max-width:900px){.receive-cell{min-width:260px}.receive-branch-form input,.receive-branch-form select{font-size:13px}.collection-page .table-wrap table th:last-child,.collection-page .table-wrap table td:last-child{min-width:280px}}

/* v30: Accept payment dialog instead of long inline form */
.branch-status-table th,.branch-status-table td{vertical-align:top}.receive-cell{min-width:145px}.receive-cell .btn{display:inline-block;margin-bottom:6px}.receive-modal{border:0;border-radius:18px;padding:0;max-width:620px;width:calc(100% - 28px);box-shadow:0 24px 80px rgba(2,8,23,.35);overflow:hidden}.receive-modal::backdrop{background:rgba(2,8,23,.55)}.receive-dialog-form{padding:0;margin:0;background:#fff}.modal-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding:18px 20px;border-bottom:1px solid var(--line);background:#f8fafc}.modal-head h3{margin:0;font-size:22px}.modal-head p{margin:5px 0 0;color:var(--muted)}.modal-close{border:0;background:#e2e8f0;border-radius:10px;width:36px;height:36px;font-size:24px;line-height:1;cursor:pointer}.modal-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;padding:16px 20px;background:#fbfdff;border-bottom:1px solid #eef2f7}.modal-summary div{border:1px solid var(--line);border-radius:12px;padding:10px;background:#fff}.modal-summary span{display:block;font-size:12px;color:var(--muted);margin-bottom:4px}.modal-summary b{font-size:16px}.receive-dialog-form>label,.receive-dialog-form>.footer-note,.receive-dialog-form>input,.receive-dialog-form>select,.receive-dialog-form>.form-grid,.receive-dialog-form>.modal-actions{margin-left:20px;margin-right:20px}.modal-actions{display:flex;justify-content:flex-end;gap:10px;padding:16px 0 20px}.receive-dialog-form input,.receive-dialog-form select{font-size:15px}@media(max-width:700px){.modal-summary{grid-template-columns:1fr}.modal-head h3{font-size:19px}.modal-actions{justify-content:stretch}.modal-actions .btn{flex:1;text-align:center}}

/* v31 smart branch status table + accept payment modal */
.branch-status-table{min-width:980px;border-spacing:0}
.branch-status-table th{font-size:12px;color:#334155;text-transform:none;letter-spacing:.01em;background:#f8fafc;white-space:normal}
.branch-status-table td{padding:13px 10px;vertical-align:middle}
.branch-status-table tr:hover td{background:#fbfdff}
.receive-cell{min-width:150px;width:160px;text-align:left}.receive-open-btn{width:100%;text-align:center;margin:0 0 7px}.receive-pending-btn{width:100%;text-align:center;margin:0!important;background:#eef2ff;color:#1e3a8a}.receive-cell .footer-note{display:none}
.receive-modal{position:fixed!important;inset:0!important;z-index:5000!important;background:rgba(2,8,23,.55)!important;align-items:center!important;justify-content:center!important;padding:18px!important;overflow:auto!important}.receive-dialog-form{background:#fff!important;width:min(640px,96vw)!important;border-radius:18px!important;box-shadow:0 24px 80px rgba(2,8,23,.35)!important;overflow:hidden!important;margin:auto!important}.modal-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding:18px 20px;border-bottom:1px solid var(--line);background:#f8fafc}.modal-head h3{margin:0;font-size:22px}.modal-head p{margin:5px 0 0;color:var(--muted)}.modal-close{border:0;background:#e2e8f0;border-radius:10px;width:36px;height:36px;font-size:24px;line-height:1;cursor:pointer}.modal-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;padding:16px 20px;background:#fbfdff;border-bottom:1px solid #eef2f7}.modal-summary div{border:1px solid var(--line);border-radius:12px;padding:10px;background:#fff}.modal-summary span{display:block;font-size:12px;color:var(--muted);margin-bottom:4px}.modal-summary b{font-size:16px}.receive-dialog-form>label,.receive-dialog-form>.footer-note,.receive-dialog-form>input,.receive-dialog-form>select,.receive-dialog-form>.form-grid,.receive-dialog-form>.modal-actions{margin-left:20px;margin-right:20px}.modal-actions{display:flex;justify-content:flex-end;gap:10px;padding:16px 0 20px}.receive-dialog-form input,.receive-dialog-form select{font-size:15px}body.modal-open{overflow:hidden}
.collection-page .card.col-12:has(.branch-status-table){padding:18px}.collection-page .card.col-12:has(.branch-status-table) h2{margin-bottom:6px}.collection-page .card.col-12:has(.branch-status-table) p.muted{margin-top:0;margin-bottom:16px}
@media(max-width:900px){.branch-status-table{min-width:900px}.modal-summary{grid-template-columns:1fr}.modal-head h3{font-size:19px}.modal-actions{justify-content:stretch}.modal-actions .btn{flex:1;text-align:center}.receive-dialog-form{width:min(560px,96vw)!important}}

/* v32: Center Accept Payment modal over full page */
.receive-modal{
  position:fixed!important;
  top:0!important;
  left:0!important;
  right:auto!important;
  bottom:auto!important;
  width:100vw!important;
  height:100vh!important;
  max-width:none!important;
  max-height:none!important;
  margin:0!important;
  padding:24px!important;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
  background:rgba(2,8,23,.62)!important;
  z-index:99999!important;
  align-items:center!important;
  justify-content:center!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
}
.receive-modal[style*="display: flex"],
.receive-modal.is-open{display:flex!important}
.receive-dialog-form{
  width:min(640px,calc(100vw - 32px))!important;
  max-height:calc(100vh - 48px)!important;
  overflow-y:auto!important;
  margin:0 auto!important;
  border-radius:18px!important;
  background:#fff!important;
  box-shadow:0 28px 90px rgba(0,0,0,.45)!important;
}
body.modal-open{overflow:hidden!important}
@media(max-width:700px){
  .receive-modal{padding:12px!important;align-items:flex-start!important;padding-top:72px!important;}
  .receive-dialog-form{width:calc(100vw - 24px)!important;max-height:calc(100vh - 92px)!important;border-radius:14px!important;}
  .modal-head{padding:14px 15px!important}.modal-summary{padding:12px 15px!important}.receive-dialog-form>label,.receive-dialog-form>.footer-note,.receive-dialog-form>input,.receive-dialog-form>select,.receive-dialog-form>.form-grid,.receive-dialog-form>.modal-actions{margin-left:15px!important;margin-right:15px!important}
}


/* v33 forced centered modal: fixes cache/parent-container problems */
html.modal-open, body.modal-open{overflow:hidden!important;}
body .receive-modal.is-open{
  display:grid!important;
  position:fixed!important;
  top:0!important;right:0!important;bottom:0!important;left:0!important;
  width:100vw!important;height:100vh!important;height:100dvh!important;
  max-width:none!important;max-height:none!important;
  margin:0!important;padding:22px!important;
  border:0!important;border-radius:0!important;
  background:rgba(2,8,23,.62)!important;
  z-index:2147483000!important;
  place-items:center!important;
  overflow:auto!important;
  box-sizing:border-box!important;
}
body .receive-modal.is-open .receive-dialog-form{
  width:min(640px,calc(100vw - 44px))!important;
  max-width:640px!important;
  max-height:calc(100dvh - 44px)!important;
  margin:0!important;
  background:#fff!important;
  border-radius:18px!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  box-shadow:0 28px 90px rgba(0,0,0,.45)!important;
}
@media(max-width:700px){
  body .receive-modal.is-open{padding:12px!important;place-items:start center!important;}
  body .receive-modal.is-open .receive-dialog-form{width:calc(100vw - 24px)!important;max-height:calc(100dvh - 24px)!important;border-radius:14px!important;}
}
