
*{box-sizing:border-box}
:root{
  --navy:#081426;
  --navy2:#0d1b32;
  --navy3:#152846;
  --blue:#4f7cff;
  --blue2:#365ee8;
  --cyan:#22d3ee;
  --indigo:#6366f1;
  --orange:#ff8a3d;
  --orange2:#ffb067;
  --bg:#f4f7fc;
  --surface:#ffffff;
  --surface2:#f8fafc;
  --text:#101828;
  --muted:#667085;
  --border:#e5eaf2;
  --border2:#d6deea;
  --danger:#dc2626;
  --success:#16a34a;
  --warning:#d97706;
  --shadow:0 8px 24px rgba(31,50,81,.065);
  --shadow-lg:0 22px 60px rgba(18,35,63,.16);
  --radius:16px;
  --radius-sm:10px;
}
html,body{
  margin:0;padding:0;min-height:100%;
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;
  background:
    radial-gradient(circle at 76% 0%,rgba(99,102,241,.10),transparent 25%),
    radial-gradient(circle at 8% 76%,rgba(34,211,238,.055),transparent 22%),
    linear-gradient(135deg,#f7f9fd 0%,#f3f6fb 52%,#f7f8fc 100%);
  color:var(--text);
  -webkit-font-smoothing:antialiased;
}
body{letter-spacing:-.01em}
button,input,select,textarea{font:inherit}
button{cursor:pointer}
.hidden{display:none!important}

/* ---------- LOGIN / SETUP ---------- */
.login-screen{
  min-height:100vh;display:flex;align-items:center;justify-content:center;padding:24px;
  background:
    radial-gradient(circle at 15% 20%,rgba(37,99,235,.16),transparent 28%),
    radial-gradient(circle at 85% 80%,rgba(249,115,22,.12),transparent 26%),
    linear-gradient(145deg,#f8fbff,#eef3fb);
}
.login-card{
  width:min(440px,100%);
  background:rgba(255,255,255,.88);
  backdrop-filter:blur(22px);
  -webkit-backdrop-filter:blur(22px);
  border:1px solid rgba(255,255,255,.9);
  border-radius:28px;
  padding:34px;
  box-shadow:0 30px 90px rgba(15,23,42,.14);
  position:relative;
  overflow:hidden;
}
.login-card:before{
  content:"";position:absolute;left:0;right:0;top:0;height:4px;
  background:linear-gradient(90deg,var(--blue),var(--cyan),var(--orange));
}
.login-card h1{margin:12px 0 6px;font-size:31px;letter-spacing:-.04em}
.login-card p,.support-note,.stat-note{color:var(--muted)}
.login-card input{width:100%;margin-top:12px}
.login-card .btn{margin-top:16px}

/* ---------- BRAND ---------- */
.brand{font-weight:800;color:var(--blue);font-size:22px;letter-spacing:-.02em}
.brand-logo{display:flex;align-items:center;line-height:1.1}
.brand-image{display:block;width:min(100%,240px);height:auto;object-fit:contain}
.login-card .brand-logo{justify-content:center;margin-bottom:8px}
.login-card .brand-image{width:245px;max-height:245px}
.setup-card .brand-logo{margin-bottom:4px}
.setup-logo{width:250px;max-height:240px;object-fit:contain}

/* ---------- APP SHELL ---------- */
.app-shell{min-height:100vh;display:flex}
.sidebar{
  position:fixed;left:0;top:0;bottom:0;width:286px;
  background:
    radial-gradient(circle at 12% 0%,rgba(79,124,255,.22),transparent 30%),
    radial-gradient(circle at 95% 88%,rgba(34,211,238,.08),transparent 25%),
    linear-gradient(155deg,#081426 0%,#0b1930 52%,#0b1426 100%);
  color:#fff;padding:18px 15px 14px;
  display:flex;flex-direction:column;overflow:hidden;
  border-right:1px solid rgba(255,255,255,.07);
  box-shadow:12px 0 40px rgba(15,23,42,.10);
}
.sidebar:after{
  content:"";position:absolute;left:18px;right:18px;top:112px;height:1px;
  background:linear-gradient(90deg,transparent,rgba(255,255,255,.14),transparent);
}
.sidebar>.brand{color:#fff;font-size:24px;margin:2px 8px 16px}
.sidebar>.brand-logo{justify-content:center;margin:0 0 20px}
.sidebar .brand-image{width:185px;max-height:165px}
.org-name{
  color:#9aa8bd;margin:0 8px 22px;font-size:12px;
  text-transform:uppercase;letter-spacing:.12em;font-weight:800;
  text-align:center;
}
#nav{
  border-top:1px solid rgba(255,255,255,.08);
  padding-top:15px;flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;padding-right:3px;
  scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.18) transparent;
}
#nav button{
  display:block;width:100%;text-align:left;border:1px solid transparent;
  background:transparent;color:#c9d4e5;padding:9px 12px;border-radius:11px;margin:3px 0;
  font-weight:700;transition:.18s ease;position:relative;
}
#nav button:hover{
  background:rgba(255,255,255,.055);color:#fff;transform:translateX(2px);
}
#nav button.active{
  color:#fff;
  background:linear-gradient(90deg,rgba(79,124,255,.28),rgba(99,102,241,.11));
  border-color:rgba(96,165,250,.18);
  box-shadow:inset 3px 0 0 #67e8f9,0 6px 18px rgba(0,0,0,.10);
}
.side-user{
  position:static;flex:0 0 auto;margin-top:12px;padding:15px 10px 2px;
  border-top:1px solid rgba(255,255,255,.08);color:#fff;background:transparent;
}
.side-user small{display:block;color:#9aa8bd;margin:3px 0 8px}
.link-btn{border:0;background:transparent;color:#8fc3ff;padding:0;font-weight:700}

/* ---------- MAIN / TOPBAR ---------- */
.main{margin-left:286px;width:calc(100% - 286px);padding:28px 34px 55px}
.topbar{
  display:flex;align-items:center;justify-content:space-between;gap:20px;
  border-bottom:1px solid var(--border);padding:2px 0 17px;margin-bottom:21px;
}
.topbar h1{margin:0;font-size:32px;line-height:1.05;letter-spacing:-.045em}
.topbar p{margin:7px 0 0;color:var(--muted);font-size:15px}
.top-actions{display:flex;align-items:center;gap:10px}
.badge{
  background:linear-gradient(135deg,#eef4ff,#e9f8ff);
  color:#1d4ed8;border:1px solid #d9e7ff;border-radius:999px;
  padding:8px 13px;font-weight:800;box-shadow:0 5px 15px rgba(37,99,235,.06);
}

/* ---------- BUTTONS ---------- */
.btn{
  border:1px solid transparent;border-radius:11px;padding:8px 13px;
  font-weight:800;letter-spacing:-.01em;transition:.18s ease;
}
.btn:hover{transform:translateY(-1px)}
.btn.primary{
  background:linear-gradient(135deg,var(--blue),#3b82f6);
  color:#fff;box-shadow:0 6px 15px rgba(54,94,232,.20);
}
.btn.primary:hover{background:linear-gradient(135deg,var(--blue2),var(--blue))}
.btn.secondary{background:#fff;color:#344054;border-color:var(--border2)}
.btn.secondary:hover{background:#f8fafc;border-color:#c8d3e2}
.btn.danger{background:#dc2626;color:#fff;box-shadow:0 7px 15px rgba(220,38,38,.13)}
.btn.success{background:#16a34a;color:#fff}
.btn.small{padding:6px 9px;font-size:11px;border-radius:8px}
.btn.full{width:100%;margin-top:16px}
.login-spinner{display:inline-block;width:16px;height:16px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;vertical-align:-3px;margin-right:7px;animation:vpLoginSpin .7s linear infinite}
.btn[aria-busy="true"]{cursor:wait;opacity:.85}
@keyframes vpLoginSpin{to{transform:rotate(360deg)}}


/* ---------- FORMS ---------- */
input,select,textarea{
  width:100%;border:1px solid var(--border2);background:#fff;border-radius:12px;
  padding:9px 12px;color:var(--text);outline:none;
  transition:border-color .18s,box-shadow .18s,background .18s;
}
input:hover,select:hover,textarea:hover{border-color:#c2cddd}
input:focus,select:focus,textarea:focus{
  border-color:#5b8def;
  box-shadow:0 0 0 4px rgba(37,99,235,.10);
  background:#fcfdff;
}
textarea{min-height:100px;resize:vertical}
.field{display:flex;flex-direction:column;gap:7px}
.field label{font-weight:800;color:#344054;font-size:13px}
.grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.form-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:20px}

/* ---------- CARDS / DASHBOARD ---------- */
.cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:17px;margin-bottom:23px}
.card,.panel{
  background:rgba(255,255,255,.92);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:17px 18px;
  box-shadow:var(--shadow);
}
.card{
  position:relative;overflow:hidden;
  transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease;
}
.card:before{
  content:"";position:absolute;left:0;top:0;bottom:0;width:3px;
  background:linear-gradient(180deg,var(--blue),var(--cyan));
  opacity:.85;
}
.card:hover{transform:translateY(-3px);box-shadow:0 18px 38px rgba(15,23,42,.09);border-color:#d8e2ef}
.card p{margin:0 0 9px;color:#667085;font-size:14px;font-weight:700}
.card h2{margin:0;font-size:27px;letter-spacing:-.04em}
.panel{margin-top:18px}
.panel h2{margin:0 0 8px;letter-spacing:-.025em}
.panel h3{margin-top:22px}
.toolbar{display:flex;justify-content:flex-end;gap:10px;margin-bottom:15px;align-items:stretch}
.empty{padding:45px 20px;text-align:center;color:var(--muted)}
.kpi-click{
  width:100%;text-align:left;border:1px solid var(--border);cursor:pointer;font:inherit;
  transition:transform .18s,box-shadow .18s,border-color .18s;background:#fff;
}
.kpi-click:hover{transform:translateY(-3px);box-shadow:0 12px 30px rgba(37,99,235,.10);border-color:#cddbf0}
.kpi-click:focus{outline:3px solid rgba(37,99,235,.18);outline-offset:2px}
.kpi-click small{display:block;margin-top:8px;color:#7b8799;font-size:12px}

/* ---------- TABLES ---------- */
.table-wrap{overflow:auto;border:1px solid var(--border);border-radius:14px}
.table{width:100%;border-collapse:separate;border-spacing:0;min-width:700px}
.table th,.table td{text-align:left;padding:10px 11px;border-bottom:1px solid #edf0f5;vertical-align:middle}
.table th{
  color:#667085;font-size:12px;text-transform:uppercase;letter-spacing:.055em;
  background:#f8fafc;font-weight:850;
}
.table th:first-child{border-top-left-radius:13px}
.table th:last-child{border-top-right-radius:13px}
.table tbody tr{background:#fff;transition:background .15s}
.table tbody tr:hover{background:#f8fbff}
.table tbody tr:last-child td{border-bottom:0}
.actions{display:flex;gap:7px;flex-wrap:wrap}
.status{
  display:inline-flex;align-items:center;padding:5px 9px;border-radius:999px;
  font-size:12px;font-weight:800;background:#dcfce7;color:#166534;border:1px solid #bbf7d0;
}
.status.expired{color:#991b1b;background:#fee2e2;border-color:#fecaca}

/* ---------- PIPELINE / CHIPS ---------- */
.pipeline{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;margin:18px 0}
.pipeline .stage{background:#fff;border:1px solid var(--border);border-radius:14px;padding:16px;box-shadow:0 5px 16px rgba(15,23,42,.04)}
.pipeline .stage b{display:block;font-size:22px;margin-top:5px}
.mini-note{font-size:12px;color:var(--muted)}
.kpi-inline{display:flex;gap:8px;flex-wrap:wrap}
.chip{display:inline-flex;padding:5px 9px;border-radius:999px;background:#eef4ff;color:#3730a3;font-size:12px;font-weight:800}
.lead-score{display:inline-flex;align-items:center;justify-content:center;min-width:44px;padding:5px 9px;border-radius:999px;font-size:12px;font-weight:850}
.lead-hot{background:#fee2e2;color:#b91c1c}.lead-warm{background:#ffedd5;color:#c2410c}
.lead-cool{background:#fef3c7;color:#92400e}.lead-cold{background:#e2e8f0;color:#475569}
.quote-win{background:#dcfce7;color:#166534}

/* ---------- MODALS ---------- */
.modal{
  position:fixed;inset:0;background:rgba(2,8,23,.62);
  backdrop-filter:blur(5px);-webkit-backdrop-filter:blur(5px);
  display:flex;align-items:center;justify-content:center;padding:20px;z-index:1000;
}
.modal-card{
  position:relative;width:min(900px,100%);max-height:calc(100dvh - 32px);overflow:auto;background:#fff;
  border:1px solid rgba(255,255,255,.8);border-radius:22px;padding:24px;
  box-shadow:var(--shadow-lg);box-sizing:border-box;overscroll-behavior:contain;
}
.modal-global-actions{position:absolute;top:14px;right:14px;z-index:30;display:flex;align-items:center;gap:7px}
.modal-global-close,.modal-global-back{border:1px solid var(--border);background:#f8fafc;color:#344054;border-radius:10px;height:40px;cursor:pointer;font:inherit;font-weight:800}
.modal-global-close{width:40px;font-size:18px}
.modal-global-back{padding:0 12px;font-size:13px}
.modal-global-close:hover,.modal-global-back:hover{background:#eef2f7}
.modal-head-actions{display:flex;align-items:center;gap:8px;flex:0 0 auto}
/* Give every modal a predictable top safe area so the global Back/Close controls never overlap a title. */
.modal-card{padding-top:58px}
.modal-card>.modal-head:first-child{margin-top:-2px}

.modal-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:20px}
.modal-head h2{margin:0;letter-spacing:-.03em}
.modal-head p{margin:5px 0 0;color:var(--muted)}
.close{
  border:1px solid var(--border);background:#f8fafc;color:#344054;border-radius:10px;
  width:38px;height:38px;font-size:18px;transition:.15s
}
.close:hover{background:#eef2f7;transform:rotate(3deg)}
.modal-card>.cards{grid-template-columns:repeat(4,minmax(0,1fr))}

/* ---------- FILES ---------- */
.file-list{display:grid;gap:10px;margin-top:16px}
.file-item{
  display:flex;justify-content:space-between;align-items:center;gap:15px;
  border:1px solid var(--border);padding:10px 11px;border-radius:10px;background:#fbfcfe
}

/* ---------- RTO ---------- */
/* ---------- SCANNER ---------- */
.scanner-drop{
  border:2px dashed #cbd7e8;text-align:center;padding:24px;border-radius:15px;
  background:linear-gradient(180deg,#fbfdff,#f7faff);
}
.progress{height:10px;background:#e8edf5;border-radius:999px;overflow:hidden}
.progress span{display:block;height:100%;background:linear-gradient(90deg,var(--blue),var(--cyan));transition:width .2s ease}
.scan-text{min-height:180px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace}
#scannerResult .field input{background:#fff}

/* ---------- PROFILE / MESSAGES ---------- */
.profile-message{margin:12px 0;padding:11px 14px;border-radius:11px;font-size:14px;border:1px solid #dbe4f0}
.profile-message.success{background:#ecfdf3;border-color:#bbf7d0;color:#166534}
.profile-message.error{background:#fef2f2;border-color:#fecaca;color:#991b1b}
.profile-message.hidden{display:none}
.support-note{margin-top:16px;text-align:center;font-size:13px}
.support-note a,.support-link{color:var(--blue);font-weight:800;text-decoration:none}
.support-note a:hover,.support-link:hover{text-decoration:underline}
.search{min-width:250px}
.grid3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}

/* ---------- SCROLLBARS ---------- */
::-webkit-scrollbar{width:10px;height:10px}
::-webkit-scrollbar-track{background:transparent}
::-webkit-scrollbar-thumb{background:#cbd5e1;border-radius:999px;border:2px solid transparent;background-clip:padding-box}
::-webkit-scrollbar-thumb:hover{background:#94a3b8;border:2px solid transparent;background-clip:padding-box}

/* ---------- RESPONSIVE ---------- */
@media(max-width:1050px){
  .sidebar{width:230px}.main{margin-left:230px;width:calc(100% - 230px);padding:22px}
  .cards{grid-template-columns:repeat(2,minmax(0,1fr))}
  .pipeline{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:760px){
  .sidebar{position:relative;width:100%;height:auto;min-height:0;padding:16px}
  .app-shell{display:block}.main{margin-left:0;width:100%;padding:18px}
  .side-user{position:static;margin-top:16px}
  .topbar{align-items:flex-start;flex-direction:column}
  .topbar h1{font-size:29px}
  .grid,.cards,.grid3{grid-template-columns:1fr}
  .check-grid{grid-template-columns:1fr}
  .pipeline{grid-template-columns:1fr}
  .modal-card>.cards{grid-template-columns:repeat(2,minmax(0,1fr))}
  .toolbar{flex-wrap:wrap}
  .toolbar .btn{width:auto}
  .sidebar .brand-image{width:150px}
  .login-card .brand-image,.setup-logo{width:220px}
}

/* ===== VAHAN PRO 2026 — Premium UI Layer ===== */
.sidebar>.brand-logo{
  background:rgba(255,255,255,.97);
  border:1px solid rgba(255,255,255,.78);
  border-radius:16px;
  padding:8px 10px;
  box-shadow:0 12px 28px rgba(0,0,0,.18);
}
.sidebar .brand-image{
  width:185px;
  max-height:150px;
}
.sidebar .org-name{
  color:#a9b8cf;
  margin-top:10px;
  margin-bottom:16px;
  letter-spacing:.15em;
}
.main{
  background:
    radial-gradient(circle at 92% 4%,rgba(99,102,241,.055),transparent 20%),
    transparent;
}
.topbar .badge{
  background:linear-gradient(135deg,#f2f6ff,#eefaff);
  border-color:#dbe7ff;
  color:#365ee8;
}
.card,.panel{
  background:linear-gradient(145deg,rgba(255,255,255,.98),rgba(251,253,255,.94));
  box-shadow:0 7px 22px rgba(32,51,82,.055);
}
.card{
  padding:16px 17px;
}
.card:before{
  width:3px;
  background:linear-gradient(180deg,#4f7cff,#22d3ee);
}
.card:hover{
  transform:translateY(-2px);
  box-shadow:0 14px 30px rgba(32,51,82,.085);
}
.card p{font-size:13px;margin-bottom:7px}
.card h2{font-size:26px}
.kpi-click{min-height:0}
.kpi-click small{margin-top:6px}
.panel{padding:18px}
.table th{
  padding:9px 10px;
  background:linear-gradient(180deg,#f8faff,#f4f7fb);
}
.table td{padding:9px 10px}
.table tbody tr:hover{background:#f7faff}
.btn.primary{
  background:linear-gradient(135deg,#4f7cff 0%,#6366f1 58%,#22a6d5 125%);
}
.btn.primary:hover{
  background:linear-gradient(135deg,#416ff0 0%,#575be9 58%,#1698c7 125%);
}
.btn.secondary{
  background:linear-gradient(180deg,#fff,#f8fafc);
}
input,select,textarea{
  border-radius:10px;
}
.toolbar{
  gap:8px;
  margin-bottom:12px;
}
.toolbar>.search,.toolbar>input{min-height:40px}
.toolbar>select{min-height:40px}
.toolbar>.rto-new-btn{
  min-width:130px;
  min-height:40px;
}
.rto-table th,.rto-table td{
  padding:7px 7px;
}
.rto-table .actions .btn{
  padding:5px 7px;
  font-size:11px;
}
.modal-card{
  border-radius:18px;
  padding:20px;
}
.modal-head{margin-bottom:16px}
.pipeline .stage{padding:13px}
.pipeline .stage b{font-size:20px}
.sidebar .side-user{
  padding-top:12px;
}
#nav::-webkit-scrollbar{width:7px}
#nav::-webkit-scrollbar-thumb{
  background:rgba(148,163,184,.28);
  border:1px solid transparent;
}
@media(max-width:760px){
  .sidebar>.brand-logo{max-width:250px;margin-left:auto;margin-right:auto}
  .sidebar .brand-image{width:155px}
}

.receipt-preview-panel{background:linear-gradient(145deg,#f8fbff,#f3f7ff)}
.receipt-calc{display:grid;gap:5px}
.receipt-calc>div{display:flex;justify-content:space-between;padding:6px 0;border-bottom:1px dashed #dbe4f0}
.receipt-calc .grand{font-size:18px;border-top:2px solid #4f7cff;border-bottom:0;padding-top:10px}
.company-details-panel{border:1px solid #d9e4f5;background:linear-gradient(145deg,#ffffff,#f5f9ff)}
.panel-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:18px}
.status-pill{font-size:10px;font-weight:800;letter-spacing:.08em;padding:8px 10px;border-radius:999px;background:linear-gradient(90deg,#e8f1ff,#e9fbff);color:#1d4ed8;border:1px solid #cfe0ff;white-space:nowrap}
.company-details-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.company-details-grid .field-wide{grid-column:1/-1}
.company-details-grid textarea{width:100%;resize:vertical}
.company-preview{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-top:18px;padding:14px;border-radius:12px;background:#eef5ff;border:1px solid #d9e6f8}
.company-preview>div{display:flex;flex-direction:column;gap:5px;min-width:0}.company-preview b{font-size:10px;text-transform:uppercase;letter-spacing:.06em;color:#71809a}.company-preview span{font-size:12px;color:#1e3150;word-break:break-word}
@media(max-width:900px){.company-details-grid{grid-template-columns:1fr}.company-details-grid .field-wide{grid-column:auto}.company-preview{grid-template-columns:1fr 1fr}.panel-head{flex-direction:column}}


/* ===== FINAL AUTH + RESPONSIVE PATCH ===== */
.forgot-link{display:block;width:100%;border:0;background:transparent;color:var(--blue);font-weight:800;font-size:13px;padding:11px 4px 2px;text-align:center;cursor:pointer}
.forgot-link:hover{text-decoration:underline}
#loginMessage{margin-top:12px;text-align:center}
.login-card form{width:100%}
@media(max-width:760px){
  .login-screen{padding:14px;align-items:flex-start;padding-top:22px;overflow:auto}
  .login-card{padding:24px 18px;border-radius:22px}
  .login-card h1{font-size:27px}
  .login-card .brand-image,.setup-logo{width:min(210px,80vw);max-height:190px}
  .sidebar{padding:12px;overflow:visible}
  .sidebar>.brand-logo{margin-bottom:10px}
  .sidebar .org-name{margin-bottom:10px}
  #nav{display:flex;gap:6px;overflow-x:auto;overflow-y:hidden;padding:8px 2px;white-space:nowrap;border-top:1px solid rgba(255,255,255,.08)}
  #nav button{width:auto;min-width:max-content;margin:0;padding:9px 11px}
  .side-user{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
  .side-user small{margin:0}
  .main{padding:14px 12px 35px}
  .top-actions{width:100%;justify-content:space-between;flex-wrap:wrap}
  .top-actions .btn{flex:1;min-width:150px}
  .table-wrap{-webkit-overflow-scrolling:touch}
  .modal{padding:10px}
  .modal-card{padding:16px;border-radius:16px;max-height:94vh}
}
@media(min-width:761px) and (max-width:1050px){
  .sidebar{width:230px}.main{margin-left:230px;width:calc(100% - 230px)}
}

.profile-message.info{background:#eff6ff;border-color:#bfdbfe;color:#1d4ed8}

/* ============================================================
   VAHAN PRO — RTO FINAL LAYOUT
   Uses the same normal toolbar/button treatment as Insurance.
   No fixed tall buttons, no global toolbar overrides.
   ============================================================ */

/* Toolbar: compact controls, wrapping only when the viewport needs it. */
.rto-toolbar{
  display:flex !important;
  align-items:center !important;
  justify-content:flex-end !important;
  flex-wrap:wrap !important;
  gap:8px !important;
  width:100% !important;
  min-width:0 !important;
}

.rto-toolbar > input,
.rto-toolbar > .search{
  flex:1 1 280px !important;
  min-width:240px !important;
  width:auto !important;
}

.rto-toolbar > select{
  flex:0 1 165px !important;
  min-width:150px !important;
  width:auto !important;
}

.rto-toolbar > .btn{
  flex:0 0 auto !important;
  width:auto !important;
  min-width:0 !important;
  white-space:nowrap !important;
}

/* Keep the action buttons at the same natural height as Insurance. */
.rto-toolbar > .btn{
  padding:8px 13px !important;
  line-height:1.1 !important;
}
.rto-toolbar > .rto-new-btn{
  min-width:130px !important;
}

/* RTO table fits the panel on desktop instead of forcing the whole panel sideways. */
.rto-table{
  width:100% !important;
  min-width:980px !important;
  table-layout:auto !important;
  height:auto !important;
}
.rto-table thead,
.rto-table tbody,
.rto-table tr{
  height:auto !important;
}
.rto-table th,
.rto-table td{
  padding:8px 9px !important;
  vertical-align:top !important;
  line-height:1.25 !important;
}
.rto-table th:nth-child(1),
.rto-table td:nth-child(1){min-width:190px}
.rto-table th:nth-child(2),
.rto-table td:nth-child(2){min-width:145px}
.rto-table th:nth-child(3),
.rto-table td:nth-child(3){min-width:105px}
.rto-table th:nth-child(4),
.rto-table td:nth-child(4){min-width:105px}
.rto-table th:nth-child(5),
.rto-table td:nth-child(5),
.rto-table th:nth-child(6),
.rto-table td:nth-child(6),
.rto-table th:nth-child(7),
.rto-table td:nth-child(7){min-width:105px}
.rto-table th:nth-child(8),
.rto-table td:nth-child(8),
.rto-table th:nth-child(9),
.rto-table td:nth-child(9){min-width:95px}
.rto-table th:nth-child(10),
.rto-table td:nth-child(10){min-width:125px}
.rto-table td{
  overflow-wrap:normal;
}
.rto-table td:nth-child(5),
.rto-table td:nth-child(6),
.rto-table td:nth-child(7){
  white-space:nowrap;
}
.rto-table .actions{
  display:flex !important;
  align-items:center !important;
  gap:5px !important;
  flex-wrap:wrap !important;
  white-space:normal !important;
}
.rto-table .actions .btn{
  padding:5px 7px !important;
  font-size:11px !important;
}

/* On smaller desktops, let only the toolbar wrap naturally. */
@media(max-width:1100px){
  .rto-toolbar > input,
  .rto-toolbar > .search{
    flex-basis:260px !important;
  }
  .rto-toolbar > select{
    flex-basis:155px !important;
  }
}

@media(max-width:760px){
  .rto-toolbar > input,
  .rto-toolbar > .search,
  .rto-toolbar > select,
  .rto-toolbar > .btn{
    width:100% !important;
    flex:1 1 100% !important;
    min-width:0 !important;
  }
  .rto-table{
    min-width:900px !important;
    table-layout:auto !important;
  }
}


/* Dashboard cloud sync bar */
.cloud-sync-panel{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:18px 0 22px;padding:14px 18px;}
.cloud-sync-panel h3{margin:0 0 3px;}
.cloud-sync-panel .stat-note{margin:0;}
.cloud-sync-panel .btn{flex:0 0 auto;white-space:nowrap;}
@media(max-width:700px){.cloud-sync-panel{align-items:stretch;flex-direction:column}.cloud-sync-panel .btn{width:100%;}}


/* FINAL CLOUD SYNC RELIABILITY PATCH */
[data-cloud-sync].sync-busy{opacity:.78;cursor:wait;pointer-events:none}
[data-cloud-sync]:disabled{cursor:wait}

/* ============================================================
   VAHAN PRO — MOBILE APP EXPERIENCE v5
   Phone: compact app shell + bottom navigation + touch targets
   Tablet: adaptive rail + 2-column workspace
   Desktop: existing layout remains unchanged
   ============================================================ */
@media (max-width: 760px){
  html,body{width:100%;overflow-x:hidden;-webkit-tap-highlight-color:transparent}
  body{padding-bottom:0}
  .app-shell{display:block;min-height:100dvh;width:100%}

  /* Compact app header */
  .sidebar{
    position:fixed;z-index:900;left:0;right:0;top:0;bottom:auto;
    width:100%;height:68px;min-height:68px;padding:8px 12px;
    display:flex;flex-direction:row;align-items:center;justify-content:space-between;
    border-right:0;border-bottom:1px solid rgba(255,255,255,.10);
    box-shadow:0 8px 28px rgba(2,8,23,.20);
    overflow:visible;
  }
  .sidebar:after{display:none}
  .sidebar>.brand-logo{margin:0!important;padding:0!important;background:transparent!important;border:0!important;box-shadow:none!important;max-width:none}
  .sidebar .brand-image{width:108px!important;height:50px!important;max-height:50px!important;object-fit:contain}
  .org-name{display:none!important}
  .side-user{display:flex!important;align-items:center;gap:7px;margin:0!important;padding:0!important;border:0!important;font-size:11px;white-space:nowrap}
  .side-user #sideUserName{max-width:105px;overflow:hidden;text-overflow:ellipsis;font-weight:800}
  .side-user small{display:none!important}
  .side-user .link-btn{font-size:11px;padding:7px 9px;border-radius:999px;background:rgba(255,255,255,.10)}

  /* Bottom app navigation */
  #nav{
    position:fixed;z-index:950;left:0;right:0;bottom:0;height:76px;
    display:flex!important;align-items:stretch;gap:4px;
    overflow-x:auto!important;overflow-y:hidden!important;
    padding:7px 7px calc(7px + env(safe-area-inset-bottom))!important;
    margin:0!important;border:0!important;
    background:rgba(8,20,38,.97);
    box-shadow:0 -10px 30px rgba(2,8,23,.18);
    backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);
    scrollbar-width:none;
  }
  #nav::-webkit-scrollbar{display:none}
  #nav button{
    flex:0 0 76px;width:76px;min-width:76px;height:60px;
    margin:0!important;padding:7px 4px!important;border-radius:13px!important;
    display:flex!important;align-items:center;justify-content:center;text-align:center;
    font-size:10px!important;line-height:1.15!important;font-weight:800!important;
    white-space:normal!important;color:#b8c6da!important;
  }
  #nav button.active{color:#fff!important;background:linear-gradient(180deg,rgba(79,124,255,.34),rgba(34,211,238,.12))!important;box-shadow:inset 0 2px 0 rgba(103,232,249,.85),0 5px 16px rgba(0,0,0,.15)!important}
  #nav button:active{transform:scale(.96)!important}

  .main{
    margin:0!important;width:100%!important;max-width:100%!important;
    padding:84px 12px 94px!important;
  }
  .topbar{
    position:relative;display:flex!important;flex-direction:column!important;align-items:stretch!important;
    gap:11px!important;padding:0 2px 14px!important;margin-bottom:14px!important;
    border-bottom:1px solid rgba(214,222,234,.85)!important;
  }
  .topbar h1{font-size:27px!important;letter-spacing:-.045em!important}
  .topbar p{font-size:13px!important;margin-top:5px!important}
  .top-actions{display:grid!important;grid-template-columns:1fr auto;gap:8px!important;width:100%!important}
  .top-actions .badge{min-width:0;overflow:hidden;text-overflow:ellipsis;padding:9px 12px;font-size:12px;text-align:center}
  .top-actions .btn{min-height:44px!important;padding:10px 13px!important;font-size:13px!important;white-space:nowrap}

  .page{width:100%;min-width:0}
  .cards{grid-template-columns:1fr!important;gap:11px!important;margin-bottom:13px!important}
  .card,.panel{border-radius:18px!important;padding:16px!important;box-shadow:0 7px 22px rgba(31,50,81,.065)!important}
  .card{min-height:108px}
  .card p{font-size:13px!important;margin-bottom:8px!important}
  .card h2{font-size:29px!important}
  .card:before{width:3px!important}
  .card:hover{transform:none!important;box-shadow:0 7px 22px rgba(31,50,81,.065)!important}

  .cloud-sync-panel{margin:13px 0!important;padding:15px!important;gap:10px!important;border-radius:18px!important}
  .cloud-sync-panel h3{font-size:18px;margin:0 0 3px}
  .cloud-sync-panel .stat-note{font-size:12px}
  .cloud-sync-panel .btn{width:100%!important;min-height:46px!important;border-radius:13px!important;font-size:14px!important}

  .toolbar{display:grid!important;grid-template-columns:1fr!important;gap:8px!important;margin-bottom:12px!important}
  .toolbar>*{width:100%!important;min-width:0!important;min-height:44px!important}
  .rto-toolbar{display:grid!important;grid-template-columns:1fr!important;gap:8px!important}
  .rto-toolbar>*{width:100%!important;min-width:0!important;min-height:44px!important}

  input,select,textarea{font-size:16px!important;min-height:44px}
  textarea{min-height:110px}
  .btn{min-height:42px}
  .btn.small{min-height:36px}
  .form-actions{display:grid!important;grid-template-columns:1fr!important;gap:8px!important}
  .grid,.grid3,.company-details-grid{grid-template-columns:1fr!important;gap:11px!important}
  .pipeline{grid-template-columns:1fr!important;gap:10px!important}

  .panel h2{font-size:21px!important}
  .panel h3{font-size:17px}
  .table-wrap{border-radius:13px!important;-webkit-overflow-scrolling:touch;box-shadow:inset 0 0 0 1px rgba(229,234,242,.35)}
  .table{min-width:720px!important}
  .table th,.table td{padding:10px 9px!important;font-size:12px}

  .modal{padding:8px!important;align-items:flex-end!important}
  .modal-card{width:100%!important;max-height:92dvh!important;border-radius:22px 22px 12px 12px!important;padding:58px 17px 17px!important}
  .modal-global-actions{top:10px;right:12px}
  .modal-global-back,.modal-global-close{height:40px}
  .modal-head{position:sticky;top:-58px;background:#fff;z-index:2;padding:3px 0 12px;margin-bottom:12px!important}
  .modal-card>.cards{grid-template-columns:1fr!important}
  .close{width:42px;height:42px;flex:0 0 42px}

  /* Touch-friendly action groups */
  .actions{gap:6px!important}
  .actions .btn{min-height:38px!important}

  /* Keep horizontal data tables inside their own card, never the page */
  .rto-table{min-width:850px!important}
  .rto-table th,.rto-table td{font-size:11px!important}

  /* Customer / company preview grids */
  .company-preview{grid-template-columns:1fr 1fr!important;gap:8px!important}
  .file-item{align-items:flex-start;flex-direction:column}
}

@media (max-width: 390px){
  .sidebar .brand-image{width:96px!important}
  .side-user #sideUserName{max-width:82px}
  .top-actions{grid-template-columns:1fr}
  .top-actions .badge{width:100%}
  #nav button{flex-basis:70px;min-width:70px;width:70px;font-size:9.5px!important}
  .main{padding-left:10px!important;padding-right:10px!important}
}

/* Tablet: app-like compact rail without sacrificing desktop productivity */
@media (min-width:761px) and (max-width:1050px){
  .sidebar{width:220px;padding:15px 11px}
  .sidebar .brand-image{width:155px;max-height:140px}
  .main{margin-left:220px;width:calc(100% - 220px);padding:22px 20px 45px}
  .topbar h1{font-size:29px}
  .cards{grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}
  .card{min-height:112px}
  .toolbar{flex-wrap:wrap}
  .toolbar>*{min-height:42px}
  .panel{padding:15px}
}

/* Large tablets / landscape touch screens */
@media (min-width:1051px) and (max-width:1280px){
  .sidebar{width:250px}
  .main{margin-left:250px;width:calc(100% - 250px);padding:24px 26px 50px}
  .cards{gap:13px}
}

/* Reduce motion for users who request it */
@media (prefers-reduced-motion:reduce){
  *,*:before,*:after{scroll-behavior:auto!important;transition:none!important;animation:none!important}
}

/* ============================================================
   VAHAN PRO — MOBILE APP UI v6
   Inspired by modern insurance-agent mobile UX: clear hierarchy,
   quick actions, compact KPI grid, bottom navigation and a More sheet.
   ============================================================ */
.mobile-header{display:none}

@media(max-width:760px){
  body{background:#f7f9fd;color:#152238}
  .mobile-header{
    display:flex;position:fixed;z-index:940;top:0;left:0;right:0;height:78px;
    align-items:center;gap:10px;padding:9px 13px 9px 11px;
    background:rgba(255,255,255,.97);border-bottom:1px solid #edf0f5;
    box-shadow:0 5px 22px rgba(27,49,83,.08);backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px)
  }
  .mobile-avatar{width:50px;height:50px;flex:0 0 50px;border-radius:50%;padding:4px;background:#eef4ff;border:1px solid #dfe8f7;display:grid;place-items:center;overflow:hidden}
  .mobile-avatar img{width:100%;height:100%;object-fit:contain;border-radius:50%}
  .mobile-user{min-width:0;flex:1}
  .mobile-greeting{font-size:11px;color:#8490a3;line-height:1.15;margin-bottom:3px}
  .mobile-user-name{font-size:17px;font-weight:850;letter-spacing:-.02em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#0f1728}
  .mobile-header-actions{display:flex;gap:7px}
  .mobile-icon-btn{width:42px;height:42px;border-radius:50%;border:1px solid #dfe5ef;background:#fff;color:#1d477f;font-size:18px;font-weight:800;box-shadow:0 4px 12px rgba(30,60,100,.07);display:grid;place-items:center}
  .mobile-icon-btn:active{transform:scale(.94)}

  .main{padding:96px 12px 98px!important}
  .topbar{padding:0 4px 13px!important;margin-bottom:12px!important;border-bottom:0!important}
  .topbar>div:first-child{display:none}
  .top-actions{display:grid!important;grid-template-columns:1fr auto!important;gap:8px!important}
  .top-actions .badge{display:none}
  .top-actions .btn{width:100%;min-height:46px!important;border-radius:14px!important;font-size:14px!important;box-shadow:0 8px 20px rgba(57,104,218,.18)}

  .mobile-dashboard-intro{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin:0 2px 14px;padding:2px 2px 0}
  .mobile-dashboard-intro .eyebrow{font-size:10px;letter-spacing:.13em;font-weight:900;color:#5876a4}
  .mobile-dashboard-intro h2{font-size:23px;line-height:1.08;margin:4px 0 4px;letter-spacing:-.04em;color:#17283f}
  .mobile-dashboard-intro p{font-size:12px;line-height:1.4;color:#7b8798;margin:0;max-width:250px}
  .mobile-sync-mini{border:0;background:#153e87;color:#fff;border-radius:999px;padding:10px 12px;font-weight:800;font-size:12px;white-space:nowrap;box-shadow:0 8px 18px rgba(21,62,135,.18)}

  .mobile-quick-actions{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;margin:0 0 15px}
  .mobile-quick-actions button{min-width:0;border:1px solid #e8edf5;background:#fff;border-radius:15px;padding:10px 5px 9px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;box-shadow:0 5px 16px rgba(35,57,90,.055);color:#18355c}
  .mobile-quick-actions button:active{transform:translateY(1px)}
  .mobile-quick-actions span{width:32px;height:32px;border-radius:50%;display:grid;place-items:center;background:#eef4ff;font-size:16px}
  .mobile-quick-actions b{font-size:10px;line-height:1.15;text-align:center}
  .mobile-quick-actions small{font-size:8px;color:#8a96a8;line-height:1.05;text-align:center}

  .cards{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:9px!important;margin:0 0 13px!important}
  .card{min-height:96px!important;padding:13px 12px!important;border-radius:16px!important;background:#fff!important;border:1px solid #e8edf5!important;box-shadow:0 5px 17px rgba(31,50,81,.05)!important}
  .card p{font-size:11px!important;line-height:1.2!important;margin:0 0 7px!important;color:#738097!important;font-weight:750!important}
  .card h2{font-size:22px!important;line-height:1.1!important;letter-spacing:-.04em!important;color:#16253c!important}
  .card:before{width:3px!important;border-radius:4px!important}

  .cloud-sync-panel{margin:2px 0 13px!important;padding:14px!important;border-radius:17px!important;background:#f1f6ff!important;border:1px solid #dfe9fb!important;box-shadow:none!important;gap:10px!important}
  .cloud-sync-panel h3{font-size:16px!important}
  .cloud-sync-panel .stat-note{font-size:11px!important}
  .cloud-sync-panel .btn{min-height:43px!important;border-radius:12px!important;font-size:13px!important}

  .panel{border-radius:18px!important;padding:14px!important;background:#fff!important;border:1px solid #e9edf4!important;box-shadow:0 6px 18px rgba(31,50,81,.045)!important}
  .panel h2{font-size:19px!important;letter-spacing:-.03em!important}
  .section-head-mobile{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px}
  .section-head-mobile h2{margin:0!important}
  .text-link-mobile{border:0;background:transparent;color:#1d56a0;font-size:12px;font-weight:800;padding:5px}

  .table-wrap{overflow-x:auto!important;max-width:100%!important;border:1px solid #edf0f4!important}
  .table{min-width:650px!important}

  #nav{height:78px!important;padding:7px 7px calc(7px + env(safe-area-inset-bottom))!important;background:rgba(255,255,255,.98)!important;border-top:1px solid #e8edf3!important;box-shadow:0 -8px 26px rgba(25,46,78,.09)!important;backdrop-filter:blur(18px)!important;-webkit-backdrop-filter:blur(18px)!important}
  #nav button{flex:1 1 0!important;width:auto!important;min-width:0!important;height:62px!important;border-radius:15px!important;color:#6e7888!important;background:transparent!important;box-shadow:none!important;font-size:10px!important;font-weight:800!important;gap:3px!important}
  #nav button .nav-icon{display:grid;place-items:center;font-size:19px;line-height:1;height:27px}
  #nav button.active{color:#174d9d!important;background:#eaf2ff!important;box-shadow:none!important}
  #nav button:active{transform:scale(.96)!important}

  .modal{padding:8px!important;align-items:flex-end!important;background:rgba(12,24,42,.35)!important}
  .modal-card{width:100%!important;max-height:91dvh!important;border-radius:24px 24px 12px 12px!important;padding:58px 16px 16px!important}
  .modal-global-actions{top:10px;right:11px}
  .modal-global-back,.modal-global-close{height:40px}
  .mobile-more-sheet{width:100%}
  .mobile-menu-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;max-height:58dvh;overflow:auto;padding:2px 0 8px}
  .mobile-menu-item{display:grid;grid-template-columns:34px 1fr 16px;align-items:center;gap:7px;text-align:left;border:1px solid #e9edf4;background:#f9fbfe;border-radius:14px;padding:11px 9px;color:#17345b}
  .mobile-menu-item>span{width:30px;height:30px;display:grid;place-items:center;background:#edf3ff;border-radius:50%;font-size:16px}
  .mobile-menu-item b{font-size:11px;line-height:1.2}
  .mobile-menu-item small{font-size:18px;color:#8290a4}
  .mobile-logout{width:100%;margin-top:4px;min-height:44px;border:1px solid #ffd7d7;background:#fff4f4;color:#c83b3b;border-radius:13px;font-weight:800}

  /* Tables, forms and pages keep the app feel without losing information. */
  .toolbar{gap:7px!important}
  .toolbar>*{border-radius:12px!important}
  .btn{border-radius:12px!important;font-weight:800!important}
  .actions .btn{border-radius:10px!important}
}

@media(max-width:390px){
  .mobile-header{padding-left:8px;padding-right:8px}
  .mobile-avatar{width:46px;height:46px;flex-basis:46px}
  .mobile-user-name{font-size:15px}
  .mobile-icon-btn{width:38px;height:38px}
  .mobile-quick-actions{gap:5px}
  .mobile-quick-actions b{font-size:9px}
  .mobile-quick-actions small{display:none}
  .cards{gap:7px!important}
  .card{padding:12px 10px!important;min-height:90px!important}
  .card h2{font-size:20px!important}
}


/* ============================================================
   VAHAN PRO v7 — DESKTOP / TABLET PRODUCT POLISH
   ============================================================ */
.mobile-dashboard-intro{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin:2px 0 18px;padding:2px 0}
.mobile-dashboard-intro .eyebrow{display:inline-block;font-size:11px;letter-spacing:.14em;font-weight:900;color:#5876a4;text-transform:uppercase}
.mobile-dashboard-intro h2{font-size:30px;line-height:1.05;margin:7px 0 5px;letter-spacing:-.045em;color:#12213a}
.mobile-dashboard-intro p{font-size:15px;color:#718096;margin:0;max-width:720px}
.mobile-sync-mini{border:1px solid #dbe5f4;background:#fff;color:#183b73;border-radius:12px;padding:10px 14px;font-weight:850;white-space:nowrap;box-shadow:0 5px 16px rgba(31,50,81,.06)}
.mobile-quick-actions{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:0 0 18px}
.mobile-quick-actions button{min-width:0;border:1px solid #dfe7f2;background:linear-gradient(180deg,#fff,#f9fbff);border-radius:14px;padding:13px 14px;text-align:left;display:grid;grid-template-columns:38px 1fr;grid-template-rows:auto auto;column-gap:10px;align-items:center;box-shadow:0 6px 18px rgba(31,50,81,.045);color:#17345b}
.mobile-quick-actions button>span{grid-row:1 / span 2;width:38px;height:38px;border-radius:12px;display:grid;place-items:center;background:#edf3ff;font-size:19px}
.mobile-quick-actions button b{font-size:14px;line-height:1.15}
.mobile-quick-actions button small{font-size:11px;color:#8290a4;line-height:1.15}
.mobile-quick-actions button:hover{transform:translateY(-1px);border-color:#c9d9f1;box-shadow:0 10px 24px rgba(31,50,81,.07)}
.policy-duration-hint{justify-content:flex-end}
.auto-fill-note{min-height:40px;border:1px dashed #cbd8ea;border-radius:12px;background:#f7faff;color:#557092;display:flex;align-items:center;padding:0 12px;font-size:12px;font-weight:750}
.drive-panel{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:12px}
.drive-panel .form-actions{grid-column:1 / -1;justify-content:flex-start;margin-top:4px}
.drive-status{display:inline-flex;align-items:center;gap:7px;border:1px solid #e5eaf2;background:#f8fafc;border-radius:999px;padding:8px 11px;font-size:12px;font-weight:800;color:#667085;white-space:nowrap}
.drive-status.connected{background:#ecfdf3;border-color:#bbf7d0;color:#166534}
.drive-dot{width:9px;height:9px;border-radius:50%;display:inline-block;background:#94a3b8;box-shadow:0 0 0 3px #eef2f7}
.drive-status.connected .drive-dot,.drive-dot.on{background:#16a34a;box-shadow:0 0 0 3px #dcfce7}
.drive-dot:not(.on){background:#dc2626;box-shadow:0 0 0 3px #fee2e2}
.drive-inline .btn{min-width:108px;justify-content:center}
.drive-inline{min-height:42px;border:1px solid #e5eaf2;border-radius:12px;padding:0 10px;display:flex;align-items:center;gap:9px;background:#fbfcfe;color:#667085;font-weight:750}
.drive-inline .btn{margin-left:auto}
.file-picker{display:inline-flex;align-items:center;justify-content:center;position:relative;overflow:hidden}
.file-picker input{position:absolute;inset:0;opacity:0;cursor:pointer;width:100%;height:100%}
.drive-settings .panel-head{margin-bottom:14px}

@media(max-width:1100px) and (min-width:761px){
  .mobile-quick-actions{grid-template-columns:repeat(2,minmax(0,1fr))}
  .mobile-dashboard-intro h2{font-size:27px}
}
@media(max-width:760px){
  .drive-panel{display:block}
  .drive-panel .drive-status{margin-top:8px}
  .drive-panel .form-actions{display:grid;grid-template-columns:1fr 1fr;margin-top:12px}
  .drive-panel .form-actions .file-picker{grid-column:1 / -1}
  .mobile-quick-actions{grid-template-columns:repeat(4,minmax(0,1fr))}
  .mobile-dashboard-intro{display:flex}
  .mobile-dashboard-intro h2{font-size:23px}
  .mobile-dashboard-intro p{font-size:12px}
}

.create-account-link{display:block;width:100%;border:0;background:transparent;color:#315fe7;font-weight:850;padding:9px 6px 2px;text-align:center}
.create-account-link:hover{text-decoration:underline}

/* Locked optional modules remain visible but cannot be used until enabled. */
.module-locked{opacity:.62;filter:saturate(.55);position:relative}
.module-locked:hover{opacity:.78}

/* v14: New Policy is available only on Insurance page */
.top-new-policy{display:none}
@media(max-width:760px){
  .top-actions{grid-template-columns:1fr!important}
  .top-new-policy{width:100%!important}
  .mobile-quick-actions{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:8px!important}
  .mobile-quick-actions button{min-height:92px!important;padding:9px 5px!important}
  .mobile-quick-actions b{font-size:11px!important;line-height:1.18!important;white-space:normal!important;overflow-wrap:anywhere!important}
  .mobile-quick-actions small{font-size:8px!important;line-height:1.1!important;white-space:normal!important;overflow-wrap:anywhere!important}
}
@media(max-width:390px){
  .mobile-quick-actions{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:6px!important}
  .mobile-quick-actions button{min-height:88px!important;padding:8px 4px!important}
  .mobile-quick-actions b{font-size:10px!important}
}


/* ============================================================
   VAHAN PRO v15 — ROBUST MOBILE / TABLET LAYOUT
   Fixes quick-action text overflow and bottom navigation overflow
   on devices whose CSS viewport is wider than 760px.
   ============================================================ */
@media (max-width:1100px){
  .mobile-header{display:flex!important}
  .main{padding:96px 12px 98px!important}

  /* Dashboard quick actions: 3 clean columns */
  .mobile-quick-actions{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:8px!important;
  }
  .mobile-quick-actions button{
    min-width:0!important;
    min-height:96px!important;
    padding:10px 7px!important;
    overflow:hidden!important;
    text-align:center!important;
  }
  .mobile-quick-actions button b,
  .mobile-quick-actions button small{
    max-width:100%!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
    word-break:normal!important;
    text-align:center!important;
  }
  .mobile-quick-actions button b{font-size:12px!important;line-height:1.15!important}
  .mobile-quick-actions button small{font-size:9px!important;line-height:1.1!important}

  /* Bottom navigation: only the 5 mobile destinations are visible. */
  #nav{
    position:fixed!important;
    z-index:980!important;
    left:0!important;right:0!important;bottom:0!important;
    height:78px!important;
    display:flex!important;
    align-items:stretch!important;
    padding:7px 7px calc(7px + env(safe-area-inset-bottom))!important;
    background:rgba(255,255,255,.98)!important;
    border-top:1px solid #e8edf3!important;
    box-shadow:0 -8px 26px rgba(25,46,78,.09)!important;
    backdrop-filter:blur(18px)!important;
    -webkit-backdrop-filter:blur(18px)!important;
    overflow:hidden!important;
  }
  #nav button{
    flex:1 1 0!important;
    width:auto!important;
    min-width:0!important;
    max-width:none!important;
    height:62px!important;
    padding:4px 2px!important;
    margin:0!important;
    border-radius:15px!important;
    color:#6e7888!important;
    background:transparent!important;
    box-shadow:none!important;
    font-size:10px!important;
    font-weight:800!important;
    line-height:1.05!important;
    gap:3px!important;
    white-space:normal!important;
    overflow:hidden!important;
    text-align:center!important;
  }
  #nav button .nav-icon{
    display:grid!important;
    place-items:center!important;
    font-size:19px!important;
    line-height:1!important;
    height:27px!important;
    flex:0 0 27px!important;
  }
  #nav button>span:last-child{
    display:block!important;
    max-width:100%!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
  }
  #nav button.active{color:#174d9d!important;background:#eaf2ff!important}

  /* Never show the full desktop sidebar navigation at this width. */
  .sidebar{display:none!important}
}

@media (max-width:390px){
  .mobile-quick-actions{gap:6px!important}
  .mobile-quick-actions button{min-height:90px!important;padding:8px 4px!important}
  .mobile-quick-actions button b{font-size:10px!important}
  .mobile-quick-actions button small{font-size:8px!important}
  #nav button{font-size:9px!important}
  #nav button .nav-icon{font-size:18px!important}
}

/* V16: customer-first actions */
.inline-actions{display:flex;gap:6px;flex-wrap:wrap;margin-top:7px;align-items:center}
.inline-actions .btn{white-space:nowrap}
@media(max-width:760px){.inline-actions{gap:5px}.inline-actions .btn{font-size:12px!important;padding:7px 9px!important;min-height:34px!important}}

/* V17 fixes: dashboard View all link, customer action placement, stable search focus */
.text-link-mobile{
  border:1px solid #d7e3f4;
  background:#ffffff;
  color:#1d56a0;
  font-size:13px;
  font-weight:800;
  line-height:1;
  padding:9px 13px;
  border-radius:10px;
  cursor:pointer;
  box-shadow:0 3px 10px rgba(31,50,81,.06);
}
.text-link-mobile:hover{background:#f4f8ff;border-color:#bcd0ea}
.table td:first-child .inline-actions{justify-content:flex-start}
.table td:first-child .inline-actions .btn{flex:0 0 auto}
@media(max-width:1100px){
  .section-head-mobile{display:flex;align-items:center;justify-content:space-between;gap:10px}
  .text-link-mobile{font-size:12px;padding:8px 11px}
}
@media(max-width:760px){
  .table td:first-child .inline-actions{gap:4px;margin-top:6px}
  .table td:first-child .inline-actions .btn{font-size:11px!important;padding:6px 8px!important;min-height:30px!important}
}


/* V25: compact RTO rows — prevent large vertical stretching and keep actions tidy. */
.rto-table .inline-actions{
  margin-top:6px !important;
  gap:4px !important;
  max-width:180px !important;
}
.rto-table .inline-actions .btn{
  min-height:30px !important;
  height:auto !important;
  line-height:1.1 !important;
  padding:6px 8px !important;
  white-space:nowrap !important;
}
.rto-table td:first-child{
  vertical-align:top !important;
}

/* V19 branding + reminder settings */
.reminder-template-grid .field-wide{grid-column:1/-1}
.reminder-template-grid textarea{min-height:92px;resize:vertical}
.reminder-template-grid .mini-note{margin-top:6px}
@media(max-width:700px){.reminder-template-grid .field-wide{grid-column:auto}}


/* V21: dashboard period selector */
.dashboard-filter{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:18px}
.dashboard-filter>div:first-child{display:flex;flex-direction:column;gap:4px}
.dashboard-filter-controls{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.dashboard-filter-controls select,.dashboard-filter-controls input{height:42px;border:1px solid #d7e3f4;border-radius:10px;padding:0 11px;background:#fff;color:#162642;font-weight:700;min-width:155px}
.dashboard-filter-controls input:disabled{opacity:.6;background:#f4f7fb}
@media(max-width:760px){.dashboard-filter{display:block}.dashboard-filter-controls{margin-top:12px;display:grid;grid-template-columns:1fr 1fr}.dashboard-filter-controls select{grid-column:1/-1;width:100%;min-width:0}.dashboard-filter-controls input{width:100%;min-width:0}.dashboard-filter-controls .mini-note{grid-column:1/-1}.dashboard-filter-controls select,.dashboard-filter-controls input{height:40px;font-size:13px}}

/* V23: compact dashboard period control */
.dashboard-period-inline{display:flex;align-items:center;justify-content:flex-end;gap:7px;margin:10px 0 18px;padding:5px 7px}
.dashboard-period-icon{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:8px;background:#eef5ff;color:#214c85;font-size:14px}
.dashboard-period-inline select{height:32px;min-width:136px;border:1px solid #d7e3f4;border-radius:8px;padding:0 9px;background:#fff;color:#162642;font-weight:800;font-size:12px;box-shadow:0 2px 8px rgba(26,58,102,.04)}
.dashboard-period-range{font-size:10px;color:#7b8ca7;font-weight:700;white-space:nowrap}
.dashboard-fy-chip{font-size:10px;color:#214c85;font-weight:800;background:#eef5ff;border-radius:999px;padding:5px 8px;white-space:nowrap}
.dashboard-custom-inline{display:flex;align-items:center;gap:5px}
.dashboard-custom-inline input{height:32px;width:118px;border:1px solid #d7e3f4;border-radius:8px;padding:0 8px;background:#fff;color:#162642;font-weight:700;font-size:11px}
.dashboard-custom-inline span{font-size:10px;color:#7b8ca7;font-weight:700}
@media(max-width:760px){
  .dashboard-period-inline{justify-content:flex-start;flex-wrap:wrap;gap:6px;margin:8px 0 14px;padding:4px 0}
  .dashboard-period-inline select{min-width:128px;height:34px;flex:0 1 150px}
  .dashboard-period-range{font-size:9px}
  .dashboard-fy-chip{font-size:9px}
  .dashboard-custom-inline{width:100%;}
  .dashboard-custom-inline input{flex:1;width:auto;max-width:none}
}

/* V26 — compact dashboard polish */
.dashboard-title-block{min-width:0}
.dashboard-header-tools{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}
.dashboard-period-compact{display:flex;align-items:center;gap:6px;min-height:38px;padding:3px 5px;border:1px solid #dbe5f4;border-radius:11px;background:rgba(255,255,255,.78);box-shadow:0 4px 14px rgba(31,50,81,.045)}
.dashboard-period-compact .dashboard-period-icon{width:26px;height:26px;font-size:13px}
.dashboard-period-compact select{height:30px;min-width:145px;border:1px solid #d7e3f4;border-radius:8px;padding:0 8px;background:#fff;color:#162642;font-weight:800;font-size:11px;outline:none}
.dashboard-period-compact .dashboard-period-range{font-size:9px}
.dashboard-period-compact .dashboard-fy-chip{font-size:9px;padding:4px 7px}
.dashboard-period-compact .dashboard-custom-inline input{height:28px;width:105px;font-size:10px}
.dashboard-quick-actions{grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;margin-bottom:14px}
.dashboard-quick-actions button{padding:10px 11px;min-height:62px;grid-template-columns:31px 1fr;column-gap:8px;border-radius:12px}
.dashboard-quick-actions button>span{width:31px;height:31px;font-size:16px;border-radius:10px}
.dashboard-quick-actions button b{font-size:12px}
.dashboard-quick-actions button small{font-size:9px}
.dashboard-kpis{grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin-bottom:16px}
.dashboard-kpis .card{padding:13px 14px;border-radius:14px}
.dashboard-kpis .card p{font-size:12px;margin-bottom:6px;line-height:1.15}
.dashboard-kpis .card h2{font-size:22px}
.dashboard-kpis .card small{font-size:10px;margin-top:5px}
.dashboard-kpis .card:hover{transform:translateY(-2px)}
@media(max-width:1200px) and (min-width:761px){
  .dashboard-quick-actions{grid-template-columns:repeat(3,minmax(0,1fr))}
  .dashboard-kpis{grid-template-columns:repeat(4,minmax(0,1fr))}
}
@media(max-width:760px){
  .mobile-dashboard-intro{align-items:flex-start;gap:8px;margin-bottom:11px}
  .mobile-dashboard-intro h2{font-size:22px}
  .dashboard-header-tools{width:auto;max-width:56%;align-items:flex-end;flex-direction:column;gap:5px}
  .dashboard-period-compact{max-width:100%;padding:2px 4px;gap:4px}
  .dashboard-period-compact select{min-width:105px;width:105px;height:29px;font-size:10px}
  .dashboard-period-compact .dashboard-period-range,.dashboard-period-compact .dashboard-fy-chip{display:none}
  .dashboard-period-compact .dashboard-custom-inline{position:absolute;right:8px;top:86px;background:#fff;padding:5px;border:1px solid #dbe5f4;border-radius:10px;box-shadow:0 8px 20px rgba(31,50,81,.10);z-index:5}
  .dashboard-quick-actions{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:6px!important}
  .dashboard-quick-actions button{min-height:78px!important;padding:8px 4px!important;grid-template-columns:1fr!important;display:flex!important;gap:3px!important}
  .dashboard-quick-actions button>span{width:29px;height:29px;font-size:15px}
  .dashboard-quick-actions button b{font-size:10px!important}
  .dashboard-quick-actions button small{font-size:8px!important}
  .dashboard-kpis{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
  .dashboard-kpis .card{padding:11px 10px!important;min-height:82px!important}
  .dashboard-kpis .card p{font-size:10px!important}
  .dashboard-kpis .card h2{font-size:19px!important}
}

/* V26.2 — mobile-first customer mobile ID lookup polish */
.customer-mobile-field{position:relative}
.customer-mobile-field input{letter-spacing:.02em}
.customer-mobile-hint{display:block;margin-top:5px;color:#7b8ca7;font-size:10px;font-weight:700;line-height:1.25}
@media(max-width:760px){
  .modal-card .customer-mobile-field{grid-column:1/-1!important}
  .modal-card .customer-mobile-field input{height:48px!important;font-size:16px!important;font-weight:800!important;padding:0 13px!important}
  .modal-card .customer-mobile-field label{font-size:13px!important}
  .customer-mobile-hint{font-size:9px;margin-top:4px}
  .modal-card .grid{grid-template-columns:1fr!important;gap:11px!important}
  .modal-card .field input,.modal-card .field select,.modal-card .field textarea{width:100%;box-sizing:border-box}
  .modal-card .form-actions{position:sticky;bottom:-16px;background:#fff;padding:12px 0 4px;z-index:3}
}

/* V26.3 Dealer module preview */
.dealer-kpis{grid-template-columns:repeat(5,minmax(0,1fr))}
.dealer-toolbar{align-items:center}
.dealer-live-calc{margin-top:4px;background:linear-gradient(135deg,#f8fbff,#ffffff);border:1px solid #dfe8f5}
.dealer-calc-line{display:flex;justify-content:space-between;padding:7px 0;border-bottom:1px solid #e8eef6}.dealer-calc-line.net{border-bottom:0;font-size:16px}
.dealer-calc-line strong{font-variant-numeric:tabular-nums}
@media(max-width:1100px) and (min-width:761px){.dealer-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:760px){.dealer-kpis{grid-template-columns:repeat(2,minmax(0,1fr))!important}.dealer-toolbar{display:grid;grid-template-columns:1fr 1fr}.dealer-toolbar .search{grid-column:1/-1;width:100%}.dealer-toolbar .btn{width:100%}.dealer-live-calc{padding:12px}}


/* V26.5 — searchable selects for long option lists */
.select-search-wrap{display:flex;flex-direction:column;gap:7px}
.select-search{width:100%;box-sizing:border-box;border:1px solid var(--border);border-radius:10px;background:#fbfcff;color:var(--text);padding:10px 12px;font:inherit;font-size:13px;outline:none}
.select-search:focus{border-color:#6ea8ff;box-shadow:0 0 0 3px rgba(37,99,235,.10);background:#fff}
.select-search::placeholder{color:#8a98ad}
@media(max-width:760px){.select-search{height:44px;font-size:15px}.select-search-wrap select{width:100%}}

/* V26.6 — searchable selects + dealer reminder/date UX */
.select-search-wrap{display:flex;flex-direction:column;gap:6px;width:100%}
.select-search-wrap select{width:100%;box-sizing:border-box}
.select-search{width:100%;box-sizing:border-box;border:1px solid var(--border);border-radius:10px;background:#fbfcff;color:var(--text);padding:9px 11px;font:inherit;font-size:12px;font-weight:700;outline:none;min-height:38px}
.select-search:focus{border-color:#6ea8ff;box-shadow:0 0 0 3px rgba(37,99,235,.10);background:#fff}
.select-search::placeholder{color:#8a98ad;font-weight:600}
.dealer-form-section{margin:12px 0 0;padding:14px;border:1px solid #e4ebf5;border-radius:16px;background:linear-gradient(135deg,#fbfdff,#fff)}
.dealer-form-section .section-kicker{font-weight:900;color:#1d3e6b;margin-bottom:10px;font-size:13px;letter-spacing:.02em}
.dealer-date-hint{display:block;color:#72839b;font-size:11px;font-weight:700;line-height:1.35;margin-top:-2px}
.dealer-form-section .field-wide{grid-column:1/-1}
.dealer-form-section .field input[readonly]{background:#f5f8fc;color:#5f7695;font-weight:800}
.dealer-live-calc{margin-top:12px}
@media(max-width:760px){
  .select-search{min-height:42px;font-size:14px}
  .dealer-form-section{padding:11px;margin-top:9px;border-radius:14px}
  .dealer-form-section .section-kicker{font-size:12px;margin-bottom:8px}
  .dealer-date-hint{font-size:10px}
  .dealer-form-section .grid{gap:10px!important}
  .dealer-form-section .field-wide{grid-column:1/-1!important}
}

/* V26.7.2 — searchable dropdown: search lives inside the opened dropdown */

.normal-select{width:100%;min-height:44px;padding:11px 14px;border:1px solid var(--border);border-radius:12px;background:#fff;color:var(--text);font:inherit;font-size:14px;font-weight:600;box-sizing:border-box;outline:none;appearance:auto}
.normal-select:focus{border-color:#6ea8ff;box-shadow:0 0 0 3px rgba(37,99,235,.10)}
@media(max-width:760px){.normal-select{min-height:46px;font-size:15px}}

.searchable-select{position:relative;width:100%}
.searchable-select-native{position:absolute!important;width:1px!important;height:1px!important;opacity:0!important;pointer-events:none!important;overflow:hidden!important}
.searchable-select-trigger{width:100%;min-height:44px;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:11px 14px;border:1px solid var(--border);border-radius:12px;background:#fff;color:var(--text);font:inherit;font-size:14px;font-weight:700;text-align:left;cursor:pointer;box-sizing:border-box}
.searchable-select-trigger:focus{outline:none;border-color:#6ea8ff;box-shadow:0 0 0 3px rgba(37,99,235,.10)}
.searchable-select-chevron{font-size:18px;line-height:1;opacity:.75;flex:none}
.searchable-select-menu{position:absolute;left:0;right:0;top:calc(100% + 6px);z-index:1000;padding:8px;border:1px solid var(--border);border-radius:14px;background:#fff;box-shadow:0 18px 40px rgba(15,35,65,.16);box-sizing:border-box}
.searchable-select-input{width:100%;min-height:40px;box-sizing:border-box;border:1px solid var(--border);border-radius:10px;background:#f8faff;color:var(--text);padding:9px 11px;font:inherit;font-size:13px;outline:none;margin-bottom:7px}
.searchable-select-input:focus{border-color:#6ea8ff;box-shadow:0 0 0 3px rgba(37,99,235,.10);background:#fff}
.searchable-select-options{max-height:230px;overflow:auto;display:flex;flex-direction:column;gap:2px}
.searchable-option{width:100%;border:0;background:transparent;color:var(--text);padding:10px 11px;border-radius:9px;text-align:left;font:inherit;font-size:13px;cursor:pointer}
.searchable-option:hover,.searchable-option:focus{background:#eef4ff;outline:none}
.searchable-option.hidden{display:none!important}
@media(max-width:760px){
  .searchable-select-trigger{min-height:46px;font-size:15px}
  .searchable-select-menu{max-height:60vh}
  .searchable-select-options{max-height:45vh}
  .searchable-select-input{min-height:44px;font-size:15px}
  .searchable-option{padding:12px;font-size:15px}
}

/* V26.7.2 — searchable dropdown: search lives inside the opened dropdown */
@media(max-width:760px){.searchable-select-trigger{min-height:46px;font-size:15px}.searchable-select-menu{max-height:60vh}.searchable-select-options{max-height:45vh}.searchable-select-input{min-height:44px;font-size:15px}.searchable-option{padding:12px;font-size:15px}}

.company-logo-row{display:flex;align-items:center;gap:14px;padding:12px;border:1px dashed #cddcf0;border-radius:12px;background:#f8fbff}
.company-logo-preview{width:72px;height:72px;border-radius:12px;border:1px solid #dbe5f2;background:#fff;display:flex;align-items:center;justify-content:center;overflow:hidden;flex:0 0 72px;color:#6f8099;font-size:10px;font-weight:800;text-align:center}
.company-logo-preview img{width:100%;height:100%;object-fit:contain}
.company-logo-controls{display:grid;gap:6px;min-width:0}
.company-logo-controls input[type=file]{max-width:100%;font-size:12px}
@media(max-width:700px){.company-logo-row{align-items:flex-start;flex-direction:column}.company-logo-preview{width:64px;height:64px;flex-basis:64px}}

.dashboard-kpis .kpi-title-row{display:flex;align-items:center;gap:8px;min-width:0;margin-bottom:6px}
.dashboard-kpis .kpi-title-row p{margin:0;min-width:0}
.dashboard-kpis .kpi-icon{width:28px;height:28px;flex:0 0 28px;display:inline-flex;align-items:center;justify-content:center;border-radius:9px;background:#eef5ff;border:1px solid #dce8f8;font-size:14px;line-height:1}
.dashboard-kpis .card h2{margin-top:0}
@media(max-width:760px){.dashboard-kpis .kpi-icon{width:25px;height:25px;flex-basis:25px;font-size:12px;border-radius:8px}.dashboard-kpis .kpi-title-row{gap:6px}}

/* Google Drive settings controls — explicit, always-visible action area */
.drive-control{min-height:48px;border:1px solid #dfe6ef;border-radius:12px;padding:7px 9px;display:flex;align-items:center;justify-content:space-between;gap:12px;background:#fff;box-sizing:border-box}
.drive-control.is-connected{border-color:#bbf7d0;background:#f0fdf4}
.drive-control.is-disconnected{border-color:#fecaca;background:#fff7f7}
.drive-state{display:flex;align-items:center;gap:10px;font-weight:850;color:#344054;min-width:0}
.drive-control.is-connected .drive-state{color:#166534}
.drive-control.is-disconnected .drive-state{color:#b91c1c}
.drive-control-actions{display:flex;align-items:center;justify-content:flex-end;flex:0 0 auto}
.drive-action-btn{display:inline-flex!important;align-items:center;justify-content:center;min-width:112px!important;height:38px!important;padding:8px 16px!important;line-height:1!important;white-space:nowrap!important;opacity:1!important;visibility:visible!important}
.drive-control.is-disconnected .drive-action-btn{background:#dc2626!important;border-color:#dc2626!important;color:#fff!important}
.drive-control.is-connected .drive-action-btn{background:#fff!important;border-color:#dc2626!important;color:#b91c1c!important}
@media(max-width:760px){.drive-control{width:100%;flex-wrap:wrap}.drive-control-actions{width:100%}.drive-action-btn{width:100%!important}.drive-state{width:100%}}


/* ============================================================
   V27 — VAHAN PRO SUPER ADMIN CONTROL CENTER
   ============================================================ */
.admin-hero{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:22px;border:1px solid #dce6f3;border-radius:18px;background:linear-gradient(135deg,#f8fbff,#fff);margin-bottom:16px}.admin-hero h2{margin:4px 0 6px}.admin-hero p{margin:0;color:#667085}.admin-eyebrow{font-size:11px;font-weight:900;letter-spacing:.12em;color:#64748b}.admin-kpis{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:10px;margin-bottom:16px}.admin-kpi{background:#fff;border:1px solid #e1e8f0;border-radius:14px;padding:13px;min-width:0}.admin-kpi span{display:inline-flex;width:28px;height:28px;align-items:center;justify-content:center;border-radius:9px;background:#f0f5ff;margin-bottom:8px}.admin-kpi b{display:block;font-size:20px;line-height:1.1}.admin-kpi small{display:block;color:#667085;margin-top:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.admin-companies-panel .panel-head{gap:12px}.admin-company-search{width:260px;max-width:100%;border:1px solid #d8e0eb;border-radius:10px;padding:10px 12px;font:inherit}.admin-company-list{display:grid;gap:10px}.admin-company-card{border:1px solid #e1e8f0;border-radius:15px;padding:15px;background:#fff}.admin-company-head{display:flex;justify-content:space-between;gap:10px;align-items:flex-start}.admin-company-head h3{margin:0 0 4px}.admin-company-head p{margin:0;color:#667085;font-size:13px}.admin-live-pill{font-size:10px;font-weight:900;padding:5px 8px;border-radius:999px;background:#ecfdf3;color:#15803d}.admin-company-stats{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:7px;margin:12px 0}.admin-company-stats span{padding:8px 9px;background:#f8fafc;border-radius:9px;font-size:12px;color:#667085}.admin-company-stats b{color:#111827;margin-right:3px}.admin-company-actions{display:flex;justify-content:flex-end}.admin-company-modal{max-width:1000px;width:100%;overflow:visible}.admin-company-modal.wide{max-width:1200px}.admin-utility-modal{min-width:0}.admin-support-actions{display:flex;justify-content:flex-end;margin-bottom:12px}.admin-recovery-row{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:13px 15px;border:1px solid #e1e8f0;border-radius:13px;background:#fff}.admin-recovery-row b{display:block}.admin-recovery-row small{display:block;color:#667085;margin-top:3px}.admin-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;padding-top:8px}.admin-form-grid label{display:flex;flex-direction:column;gap:7px;font-weight:800;color:#334155}.admin-form-grid label.full{grid-column:1/-1}.admin-form-grid input,.admin-form-grid select,.admin-form-grid textarea{width:100%;box-sizing:border-box;border:1px solid #d8e0eb;border-radius:10px;padding:11px 12px;font:inherit;background:#fff;color:#111827}.admin-form-grid textarea{min-height:130px;resize:vertical}.admin-form-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:16px;padding-top:14px;border-top:1px solid #e8edf3}.admin-form-actions .btn:disabled{opacity:.65;cursor:not-allowed}@media(max-width:700px){.admin-form-grid{grid-template-columns:1fr}.admin-form-grid label.full{grid-column:auto}.admin-form-actions{flex-direction:column}.admin-form-actions .btn{width:100%}}
.admin-utility-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-top:16px}.admin-utility-card{display:flex;align-items:center;justify-content:space-between;gap:14px}.admin-utility-card h2{margin:0 0 5px}.admin-module-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:16px 0}.admin-module-btn{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:13px 14px;border:1px solid #dfe6ef;background:#fff;border-radius:12px;text-align:left;font:inherit;font-weight:750;cursor:pointer}.admin-module-btn:hover{border-color:#9db7df;background:#f8fbff}.admin-module-btn span{color:#64748b;font-size:20px}.admin-company-tools{display:flex;gap:9px;justify-content:flex-end;border-top:1px solid #e8edf3;padding-top:14px}.admin-data-toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}.admin-data-toolbar input{flex:1;min-width:0;border:1px solid #d8e0eb;border-radius:10px;padding:10px 12px;font:inherit}.admin-loading{display:flex;align-items:center;justify-content:center;gap:10px;padding:30px;color:#667085}.spinner{width:16px;height:16px;border:2px solid #d8e0eb;border-top-color:#2563eb;border-radius:50%;animation:vpSpin .7s linear infinite}@keyframes vpSpin{to{transform:rotate(360deg)}}
@media(max-width:1100px){.admin-kpis{grid-template-columns:repeat(4,minmax(0,1fr))}.admin-company-stats{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:700px){.admin-utility-grid{grid-template-columns:1fr}.admin-utility-card{align-items:flex-start;flex-direction:column}.admin-utility-card .btn{width:100%}.admin-recovery-row{align-items:flex-start;flex-direction:column}.admin-recovery-row .btn{width:100%}.modal-head-actions .btn.small{padding:8px 10px}.admin-hero{padding:16px;align-items:flex-start}.admin-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.admin-company-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.admin-company-actions .btn{width:100%}.admin-company-modal{width:100%;max-height:none}.admin-module-grid{grid-template-columns:1fr}.admin-company-tools{flex-direction:column}.admin-company-tools .btn{width:100%}.admin-data-toolbar{flex-direction:column;align-items:stretch}.admin-company-search{width:100%}}

/* Admin support company picker: searchable dropdown stays inside the modal and never
   forces a page-level re-render while typing. */
.admin-form-modal .searchable-select{position:relative;width:100%}
.admin-form-modal .searchable-select-trigger{width:100%;min-height:46px;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:11px 12px;border:1px solid #d8e0eb;border-radius:10px;background:#fff;color:#111827;font:inherit;font-weight:600;cursor:pointer;text-align:left}
.admin-form-modal .searchable-select-menu{position:absolute;z-index:80;left:0;right:0;top:calc(100% + 6px);background:#fff;border:1px solid #d8e0eb;border-radius:12px;box-shadow:0 16px 40px rgba(15,23,42,.16);padding:8px;max-height:300px;overflow:auto}
.admin-form-modal .searchable-select-menu.hidden{display:none}
.admin-form-modal .searchable-select-input{width:100%;box-sizing:border-box;padding:10px 11px;border:1px solid #d8e0eb;border-radius:9px;margin-bottom:7px;font:inherit;outline:none}
.admin-form-modal .searchable-option{display:block;width:100%;padding:10px 11px;border:0;border-radius:8px;background:#fff;text-align:left;font:inherit;cursor:pointer}
.admin-form-modal .searchable-option:hover{background:#f1f5f9}
