*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
:root{
  --navy:#0f2044;--navy2:#0a1830;--green:#1d9e75;--green2:#0f6e56;--green-light:#e8f8f2;
  --red:#ef4444;--amber:#f59e0b;--blue:#3b82f6;--purple:#8b5cf6;
  --bg:#f4f6f9;--card:#fff;--border:#e5e7eb;
  --text:#111827;--text2:#4b5563;--text3:#9ca3af;
  --sidebar:256px;--r:12px;
}
body{font-family:'Inter',sans-serif;background:var(--bg);color:var(--text);display:flex;min-height:100vh;font-size:14px;line-height:1.5}

/* ── LOADING OVERLAY ── */
#loading-overlay{position:fixed;inset:0;background:var(--navy);z-index:9999;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;transition:opacity .4s}
#loading-overlay.hidden{opacity:0;pointer-events:none}
.loading-spinner{width:40px;height:40px;border:3px solid rgba(255,255,255,.2);border-top-color:#fff;border-radius:50%;animation:spin .7s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
#loading-overlay span{color:rgba(255,255,255,.7);font-size:14px;font-weight:500}

/* ── SIDEBAR ── */
.sidebar{width:var(--sidebar);background:var(--navy);display:flex;flex-direction:column;position:fixed;top:0;left:0;bottom:0;z-index:100;overflow-y:auto;transition:transform .25s ease}
.logo{display:flex;align-items:center;gap:12px;padding:20px 16px 18px;border-bottom:1px solid rgba(255,255,255,.08)}
.logo-icon{width:36px;height:36px;border-radius:10px;background:var(--green);display:flex;align-items:center;justify-content:center;flex-shrink:0}
.logo-icon svg{width:18px;height:18px;stroke:#fff;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.logo-text{font-size:13px;font-weight:600;color:#fff;line-height:1.2}
.logo-sub{font-size:11px;color:rgba(255,255,255,.35);margin-top:1px}
nav{flex:1;padding:10px 8px}
.nav-item{display:flex;align-items:center;gap:10px;padding:9px 12px;border-radius:8px;cursor:pointer;font-size:13px;color:rgba(255,255,255,.5);transition:all .15s;margin-bottom:1px;user-select:none}
.nav-item:hover{background:rgba(255,255,255,.07);color:rgba(255,255,255,.85)}
.nav-item.active{background:rgba(255,255,255,.13);color:#fff;font-weight:500}
.nav-item svg{width:16px;height:16px;fill:none;stroke-width:1.8;flex-shrink:0;opacity:.7}
.nav-item.active svg{opacity:1}
.nbadge{margin-left:auto;font-size:10px;font-weight:600;padding:2px 7px;border-radius:20px;background:rgba(255,255,255,.1);color:rgba(255,255,255,.45)}
.nbadge-red{background:rgba(239,68,68,.25);color:#fca5a5}
.sidebar-footer{padding:14px 10px;border-top:1px solid rgba(255,255,255,.08)}
.user-row{display:flex;align-items:center;gap:10px;padding:6px 8px}
.user-av{width:32px;height:32px;border-radius:50%;background:var(--green);display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:700;color:#fff;flex-shrink:0}
.user-name{font-size:12px;color:rgba(255,255,255,.8);font-weight:500}
.user-role{font-size:11px;color:rgba(255,255,255,.3)}
.sidebar-overlay{display:none;position:fixed;inset:0;background:rgba(0,0,0,.5);z-index:99}

/* ── MAIN ── */
.main{margin-left:var(--sidebar);flex:1;display:flex;flex-direction:column;min-width:0}
.topbar{display:flex;align-items:center;justify-content:space-between;padding:14px 28px;background:#fff;border-bottom:1px solid var(--border);position:sticky;top:0;z-index:50}
.topbar h1{font-size:22px;font-weight:800;color:#0F172A;letter-spacing:-0.03em}
.topbar p{font-size:10px;color:#94A3B8;margin-top:2px;text-transform:uppercase;letter-spacing:0.07em;font-weight:600}
.topbar-right{display:flex;align-items:center;gap:10px}
.hamburger{display:none;background:none;border:1px solid var(--border);border-radius:8px;width:36px;height:36px;cursor:pointer;font-size:18px;align-items:center;justify-content:center;color:var(--text2)}
.btn{display:inline-flex;align-items:center;gap:6px;padding:8px 16px;border-radius:8px;font-size:13px;font-weight:500;cursor:pointer;border:none;font-family:inherit;transition:all .15s}
.btn svg{width:13px;height:13px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.btn-sm{padding:6px 12px;font-size:12px}
.btn-primary{background:var(--green);color:#fff}.btn-primary:hover{background:var(--green2)}
.btn-secondary{background:#fff;color:var(--text2);border:1px solid var(--border)}.btn-secondary:hover{background:var(--bg)}

/* ── PAGES ── */
.page{display:none;padding:22px 28px 60px;flex:1}
.page.active{display:block;}
@keyframes fadeUp{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}
.eyebrow{font-size:11px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--text3);margin-bottom:4px}
.page-heading{font-size:20px;font-weight:700;margin-bottom:18px}

/* ── CARDS ── */
.card{background:var(--card);border:1px solid #E2E8F0;border-radius:14px;padding:20px;overflow:hidden;box-shadow:0 4px 16px rgba(0,0,0,.07)}

/* ── STAT GRID ── */
.sg4{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:20px}
.sg5{display:grid;grid-template-columns:repeat(5,1fr);gap:14px;margin-bottom:20px}
.stat{background:var(--card);border:1px solid var(--border);border-radius:var(--r);padding:18px}
.stat-icon{width:40px;height:40px;border-radius:10px;display:flex;align-items:center;justify-content:center;margin-bottom:12px}
.stat-icon svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.stat-val{font-size:26px;font-weight:700;line-height:1}
.stat-lbl{font-size:11px;font-weight:500;color:var(--text3);text-transform:uppercase;letter-spacing:.05em;margin-top:5px}
.stat-sub{font-size:11px;color:var(--text3);margin-top:3px}

/* ── CHART LAYOUTS ── */
.g2{display:grid;grid-template-columns:1.4fr 1fr;gap:18px;margin-bottom:18px}
.g2e{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-bottom:18px}
.chart-title{font-size:15px;font-weight:700;color:#0F172A;letter-spacing:-0.02em;margin-bottom:3px}
.chart-sub{font-size:10px;color:#94A3B8;font-weight:500;margin-bottom:14px;background:none}
.ch{position:relative;overflow:hidden}

/* ── TABLE ── */
.tbl-wrap{background:var(--card);border:1px solid var(--border);border-radius:var(--r);overflow:hidden;margin-bottom:18px}
.tbl-wrap table{width:100%;border-collapse:collapse}
.tbl-bar{display:flex;align-items:center;justify-content:space-between;padding:14px 18px;border-bottom:1px solid var(--border);flex-wrap:wrap;gap:10px}
.tbl-title{font-size:14px;font-weight:600}
.filters{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.search-wrap{position:relative}
.search-wrap svg{position:absolute;left:9px;top:50%;transform:translateY(-50%);width:13px;height:13px;stroke:var(--text3);fill:none;stroke-width:2;pointer-events:none}
input.search{padding:7px 10px 7px 30px;border:1px solid var(--border);border-radius:8px;font-size:13px;font-family:inherit;outline:none;width:210px}
input.search:focus{border-color:var(--green)}
select.sel{padding:7px 10px;border:1px solid var(--border);border-radius:8px;font-size:12px;font-family:inherit;background:#fff;outline:none;cursor:pointer}
select.sel:focus{border-color:var(--green)}
table{width:100%;border-collapse:collapse}
th{font-size:11px;font-weight:600;color:var(--text3);text-transform:uppercase;letter-spacing:.05em;padding:10px 14px;text-align:left;background:var(--bg);border-bottom:1px solid var(--border);white-space:nowrap;cursor:pointer;user-select:none}
th:hover{color:var(--text2)}
td{padding:11px 14px;font-size:13px;color:var(--text2);border-bottom:1px solid #f3f4f6;vertical-align:middle}
tbody tr{cursor:pointer;transition:background .1s}
tbody tr:hover{background:#fafafa}
tbody tr:last-child td{border-bottom:none}
.pgn{display:flex;align-items:center;justify-content:space-between;padding:11px 18px;border-top:1px solid var(--border);font-size:12px;color:var(--text3)}
.pgn-btns{display:flex;align-items:center;gap:4px}
.pbtn{width:30px;height:30px;border-radius:6px;border:1px solid var(--border);background:#fff;font-size:12px;cursor:pointer;display:flex;align-items:center;justify-content:center;color:var(--text2);font-family:inherit}
.pbtn:hover{background:var(--bg)}.pbtn.active{background:var(--green);color:#fff;border-color:var(--green)}.pbtn:disabled{opacity:.35;cursor:not-allowed}

/* ── BADGES ── */
.badge{display:inline-flex;align-items:center;padding:4px 12px;border-radius:999px;font-size:11px;font-weight:600}
.b-approved{background:#d1fae5;color:#065f46}
.b-failed{background:#fee2e2;color:#991b1b}
.b-pending{background:#fef3c7;color:#92400e}
.b-cancelled{background:#f1f5f9;color:#475569}
.b-issued{background:#dbeafe;color:#1e40af}
.b-under-process{background:#ede9fe;color:#5b21b6}
.b-available{background:#d1fae5;color:#065f46}
.b-busy{background:#fef3c7;color:#92400e}
.b-off{background:#f1f5f9;color:#475569}

/* ── MODAL ── */
.overlay{display:none;position:fixed;inset:0;background:rgba(0,0,0,.45);z-index:200;align-items:center;justify-content:center;padding:20px}
.overlay.open{display:flex}
.modal{background:#fff;border-radius:16px;width:100%;max-width:660px;max-height:88vh;overflow-y:auto;box-shadow:0 24px 64px rgba(0,0,0,.18)}
.modal-head{display:flex;align-items:flex-start;justify-content:space-between;padding:22px 24px 18px;border-bottom:1px solid var(--border)}
.modal-head-title{font-size:16px;font-weight:700}
.modal-close{width:28px;height:28px;border-radius:6px;border:none;background:var(--bg);cursor:pointer;font-size:16px;color:var(--text3)}
.modal-close:hover{background:var(--border)}
.modal-body{padding:22px 24px}
.dg{display:grid;grid-template-columns:1fr 1fr;gap:18px}
.dg .fw{grid-column:1/-1}
.df label{font-size:11px;font-weight:600;color:var(--text3);text-transform:uppercase;letter-spacing:.05em;display:block;margin-bottom:4px}
.df .v{font-size:13px;color:var(--text);font-weight:500}
.df .v.mono{font-family:monospace;font-size:12px}
.divider{border:none;border-top:1px solid var(--border);margin:16px 0}
.field-error{font-size:11px;color:#dc2626;margin-top:4px;display:none}
.field-error.show{display:block}
input.input-error,select.input-error{border-color:#dc2626!important}

/* ── LOCATIONS ── */
.loc-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:14px;margin-bottom:20px}
.loc-card{background:var(--card);border:1px solid var(--border);border-radius:var(--r);padding:18px;cursor:pointer;transition:all .15s;position:relative;overflow:hidden}
.loc-card:hover{box-shadow:0 4px 16px rgba(0,0,0,.08);transform:translateY(-1px)}
.loc-top{height:3px;position:absolute;top:0;left:0;right:0}
.loc-name{font-size:14px;font-weight:600;margin-top:8px;margin-bottom:3px}
.loc-meta{font-size:12px;color:var(--text3);margin-bottom:10px}
.loc-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:12px;padding-top:12px;border-top:1px solid var(--border)}
.lsv{font-size:17px;font-weight:700;line-height:1}
.lsl{font-size:10px;color:var(--text3);margin-top:2px}
.bar{height:5px;background:#e5e7eb;border-radius:3px;overflow:hidden;margin:8px 0 4px}
.bar-fill{height:100%;border-radius:3px}

/* ── TECHNICIANS ── */
.tech-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(215px,1fr));gap:14px}
.tech-card{background:var(--card);border:1px solid var(--border);border-radius:var(--r);padding:18px;transition:box-shadow .15s}
.tech-card:hover{box-shadow:0 4px 16px rgba(0,0,0,.08)}
.tech-av{width:44px;height:44px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:15px;font-weight:700;color:#fff;margin-bottom:10px}
.tech-name{font-size:14px;font-weight:600;margin-bottom:2px}
.tech-role{font-size:12px;color:var(--text3);margin-bottom:10px}
.tech-info{font-size:12px;color:var(--text2);display:flex;align-items:center;gap:6px;margin-bottom:5px}
.tech-info svg{width:12px;height:12px;stroke:var(--text3);fill:none;stroke-width:2;flex-shrink:0}
.tech-foot{display:flex;align-items:center;justify-content:space-between;margin-top:12px;padding-top:10px;border-top:1px solid var(--border)}

/* ── PERFORMANCE TABLE ── */
.perf-tbl{width:100%;border-collapse:collapse}
.perf-tbl th{font-size:11px;font-weight:600;color:var(--text3);text-transform:uppercase;letter-spacing:.05em;padding:10px 14px;text-align:left;background:var(--bg);border-bottom:1px solid var(--border);white-space:nowrap;cursor:pointer;user-select:none}
.perf-tbl td{padding:13px 14px;border-bottom:1px solid #f3f4f6;vertical-align:middle}
.perf-tbl tbody tr:hover{background:#fafafa}
.rank{width:26px;height:26px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;font-size:11px;font-weight:700}
.r1{background:#fef3c7;color:#92400e}.r2{background:#f1f5f9;color:#334155}.r3{background:#fdf4ff;color:#7e22ce}.rx{background:var(--bg);color:var(--text3)}
.eff{display:inline-flex;align-items:center;justify-content:center;width:44px;height:26px;border-radius:20px;font-size:11px;font-weight:700}
.ea{background:#d1fae5;color:#065f46}.eb{background:#dbeafe;color:#1e40af}.ec{background:#fef3c7;color:#92400e}.ed{background:#fee2e2;color:#991b1b}
.mini-bar{display:flex;align-items:center;gap:8px}
.mini-bg{flex:1;height:6px;background:#f3f4f6;border-radius:3px;overflow:hidden;min-width:60px}
.mini-fill{height:100%;border-radius:3px}
.tav{width:32px;height:32px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;font-size:11px;font-weight:700;color:#fff;flex-shrink:0}

/* ── FAILED INSPECTIONS ── */
.fi-section-bar{width:4px;height:24px;border-radius:2px;flex-shrink:0}
.chip{display:flex;align-items:center;gap:8px;background:var(--card);border:1px solid var(--border);border-radius:10px;padding:10px 16px}
.chip-val{font-size:20px;font-weight:700;line-height:1}
.chip-lbl{font-size:11px;color:var(--text3);margin-top:2px}
.chips{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:18px}

/* ── DASHBOARD LOC PILLS ── */
.loc-pills{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:18px}

/* ── REPORTS ── */
.rpt-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:14px;margin-bottom:24px}
.rpt-card{background:var(--card);border:1px solid var(--border);border-radius:var(--r);padding:20px;cursor:pointer;transition:all .15s;position:relative;overflow:hidden}
.rpt-card:hover{box-shadow:0 6px 20px rgba(0,0,0,.1);transform:translateY(-2px);border-color:var(--green)}
.rpt-card-icon{width:44px;height:44px;border-radius:12px;display:flex;align-items:center;justify-content:center;margin-bottom:14px;flex-shrink:0}
.rpt-card-icon svg{width:20px;height:20px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.rpt-card-title{font-size:14px;font-weight:600;margin-bottom:5px}
.rpt-card-desc{font-size:12px;color:var(--text3);line-height:1.5;margin-bottom:12px}
.rpt-card-meta{font-size:11px;color:var(--text3);display:flex;align-items:center;gap:6px}
.rpt-card-meta svg{width:11px;height:11px;stroke:var(--text3);fill:none;stroke-width:2}
.rpt-preview{background:var(--card);border:1px solid var(--border);border-radius:var(--r);overflow:hidden}
.rpt-preview-head{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;border-bottom:1px solid var(--border)}
.rpt-preview-title{font-size:15px;font-weight:700}
.rpt-preview-sub{font-size:12px;color:var(--text3);margin-top:2px}
.rpt-filters{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.rpt-section{padding:20px;border-bottom:1px solid var(--border)}
.rpt-section:last-child{border-bottom:none}
.rpt-section-title{font-size:12px;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--text3);margin-bottom:14px}
.rpt-kpi-row{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:0}
.rpt-kpi{background:var(--bg);border-radius:10px;padding:14px;text-align:center}
.rpt-kpi-val{font-size:22px;font-weight:700;line-height:1}
.rpt-kpi-lbl{font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:.05em;color:var(--text3);margin-top:4px}
.rpt-table-wrap{overflow-x:auto}
.rpt-tbl{width:100%;border-collapse:collapse}
.rpt-tbl th{font-size:11px;font-weight:600;color:var(--text3);text-transform:uppercase;letter-spacing:.05em;padding:9px 14px;text-align:left;background:var(--bg);border-bottom:1px solid var(--border)}
.rpt-tbl td{padding:10px 14px;font-size:13px;border-bottom:1px solid #f3f4f6}
.rpt-tbl tbody tr:last-child td{border-bottom:none}
.rpt-bar-row{display:flex;align-items:center;gap:10px;margin-bottom:10px}
.rpt-bar-label{font-size:12px;color:var(--text2);width:120px;flex-shrink:0;text-align:right}
.rpt-bar-track{flex:1;height:8px;background:#f3f4f6;border-radius:4px;overflow:hidden}
.rpt-bar-fill{height:100%;border-radius:4px;transition:width .5s}
.rpt-bar-val{font-size:12px;font-weight:600;color:var(--text2);width:50px;flex-shrink:0}
.print-btn{background:var(--navy);color:#fff;border:none;padding:8px 16px;border-radius:8px;font-size:13px;font-weight:500;cursor:pointer;display:inline-flex;align-items:center;gap:6px;font-family:inherit}
.print-btn:hover{background:var(--navy2)}
.print-btn svg{width:13px;height:13px;stroke:currentColor;fill:none;stroke-width:2}
.export-btn{background:#fff;color:var(--text2);border:1px solid var(--border);padding:7px 14px;border-radius:8px;font-size:12px;font-weight:500;cursor:pointer;display:inline-flex;align-items:center;gap:5px;font-family:inherit;transition:all .15s}
.export-btn:hover{background:var(--bg)}
.export-btn svg{width:12px;height:12px;stroke:currentColor;fill:none;stroke-width:2}
.rpt-card-footer{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin-top:10px}
.rpt-tag{display:inline-flex;align-items:center;padding:2px 8px;border-radius:20px;font-size:10px;font-weight:600;letter-spacing:.03em}
.rpt-tag-blue{background:#dbeafe;color:#1e40af}
.rpt-tag-green{background:#d1fae5;color:#065f46}
.rpt-tag-orange{background:#ffedd5;color:#9a3412}
.rpt-tag-amber{background:#fef3c7;color:#92400e}
.rpt-tag-red{background:#fee2e2;color:#991b1b}
.rpt-tag-purple{background:#ede9fe;color:#5b21b6}
.rpt-tag-gray{background:#f1f5f9;color:#475569}
.rpt-card-highlight{border-color:#d1d5db;box-shadow:0 1px 6px rgba(0,0,0,.06)}
.rpt-card-highlight:hover{border-color:var(--green);box-shadow:0 6px 20px rgba(29,158,117,.12)}
.rpt-insight{background:#f8fffe;border:1px solid #d1fae5;border-radius:10px;padding:14px 16px;font-size:13px;color:var(--text2);line-height:1.7;margin-bottom:16px}
.rpt-alert{background:#fff7ed;border:1px solid #fed7aa;border-radius:10px;padding:12px 16px;font-size:13px;color:#9a3412;margin-bottom:10px;display:flex;align-items:flex-start;gap:10px}
.rpt-alert-icon{font-size:16px;flex-shrink:0;margin-top:1px}

/* ── MISC ── */
::-webkit-scrollbar{width:5px;height:5px}
::-webkit-scrollbar-thumb{background:#d1d5db;border-radius:3px}
.req-tab{background:none;border:none;padding:6px 14px;border-radius:7px;font-size:12px;font-weight:600;cursor:pointer;font-family:inherit;color:var(--text3);transition:all .15s}
.req-tab:hover{background:var(--bg);color:var(--text)}
.req-tab-active{background:#fff;box-shadow:0 1px 4px rgba(0,0,0,.1);color:var(--text)}
.sg5{display:grid;grid-template-columns:repeat(5,1fr);gap:14px}
@keyframes slideInToast{from{opacity:0;transform:translateX(20px)}to{opacity:1;transform:translateX(0)}}

/* ── PRINT ── */
@media print{
  .sidebar,.topbar,.rpt-grid,.rpt-controls,.nbadge,.nbadge-red,
  .btn,.export-btn,.print-btn,#toast-container,.overlay{display:none!important}
  .main{margin-left:0}
  .page{padding:0}
  .page.active{display:block}
  .rpt-preview{border:none;box-shadow:none}
  body{background:#fff;color:#000}
  .card,.stat,.tbl-wrap{border:1px solid #ddd;box-shadow:none}
  table{width:100%}
}

/* ── MOBILE (≤768px) ── */
@media (max-width:768px){
  .sidebar{transform:translateX(-100%)}
  .sidebar.mobile-open{transform:translateX(0)}
  .sidebar-overlay.mobile-open{display:block}
  .main{margin-left:0}
  .hamburger{display:flex}

  .topbar{padding:12px 16px}
  .topbar h1{font-size:15px}

  .page{padding:16px 16px 60px}

  .sg4{grid-template-columns:repeat(2,1fr)}
  .sg5{grid-template-columns:repeat(2,1fr)}
  .g2{grid-template-columns:1fr}
  .g2e{grid-template-columns:1fr}

  .tbl-wrap{overflow-x:auto}
  .tbl-wrap table{min-width:600px}

  .overlay{padding:0}
  .modal{border-radius:0;max-height:100vh;height:100vh;max-width:100%}

  .rpt-kpi-row{grid-template-columns:repeat(2,1fr)}
  .loc-grid{grid-template-columns:1fr}
  .tech-grid{grid-template-columns:repeat(2,1fr)}
  .dg{grid-template-columns:1fr}
  .dg .fw{grid-column:1}
}

@media (max-width:480px){
  .sg4,.sg5{grid-template-columns:1fr 1fr}
  .tech-grid{grid-template-columns:1fr}
  .rpt-kpi-row{grid-template-columns:1fr 1fr}
}

/* ── Mobile: New Permit Request form ─────────────────────────────────── */
@media (max-width:768px){
  /* Force single-column layout inside the form */
  .req-form-grid{grid-template-columns:1fr !important}
  .req-form-grid > div[style*="grid-column"]{grid-column:1 !important}

  /* 44px minimum touch targets on all inputs and buttons */
  .modal input,.modal select,.modal textarea{min-height:44px;font-size:16px!important}
  .modal .btn,.modal button:not(.modal-close){min-height:44px;padding-top:10px;padding-bottom:10px}

  /* Ensure modal body is scrollable */
  .modal-body{padding:16px;overflow-y:auto}
  .modal{overflow-y:hidden}
}

/* ── Portal status pulsing dot ───────────────────────────────────────── */
@keyframes portalPulse {
  0%,100% { opacity:1; transform:scale(1); }
  50%      { opacity:.45; transform:scale(1.5); }
}
@keyframes portalDotPulse {
  0%,100% { box-shadow:0 0 0 0 rgba(59,130,246,.5); }
  50%      { box-shadow:0 0 0 6px rgba(59,130,246,0); }
}

/* ── Overdue warning banner ──────────────────────────────────────────── */
#stale-warning {
  display:flex;
  align-items:center;
  gap:8px;
  background:#fffbeb;
  border:1px solid #fcd34d;
  border-radius:8px;
  padding:10px 14px;
  margin-bottom:12px;
}

/* ── Conditional permit fields ───────────────────────────────────────── */
#req-conditional-fields .df {
  display:flex;
  flex-direction:column;
  gap:4px;
}
#req-conditional-fields label {
  font-size:12px;
  font-weight:600;
  color:var(--text2);
}

/* ── File input styling ──────────────────────────────────────────────── */
input[type="file"] {
  font-family: inherit;
  color: var(--text1);
  cursor: pointer;
}
input[type="file"]::-webkit-file-upload-button {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 5px 12px;
  border-radius: 5px;
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  margin-right: 8px;
}
