/* Cyber Brother's CSC — Official Dynamic Portal Stylesheet (V9) */
:root{
  --bg-1:#dcfce7;
  --bg-2:#e0f2fe;
  --bg-3:#f0fdfa;
  --surface:#ffffff;
  --surface-soft:#f8fafc;
  --ink:#0f172a;
  --ink-2:#334155;
  --muted:#64748b;
  --border:#dbe5f1;
  --border-strong:#cbd5e1;
  --primary:#0d9488;
  --primary-dark:#0f766e;
  --blue:#2563eb;
  --blue-soft:#eff6ff;
  --emerald:#10b981;
  --emerald-soft:#ecfdf5;
  --amber:#f59e0b;
  --amber-soft:#fffbeb;
  --rose:#e11d48;
  --rose-soft:#fff1f2;
  --purple:#7c3aed;
  --purple-soft:#f5f3ff;
  --radius-xl:24px;
  --radius-lg:18px;
  --radius-md:13px;
  --radius-sm:10px;
  --shadow-sm:0 2px 8px rgba(15,23,42,.05);
  --shadow-md:0 10px 28px rgba(15,23,42,.08);
  --shadow-lg:0 18px 42px rgba(13,148,136,.14);
}

*,*::before,*::after{box-sizing:border-box}
html{scroll-behavior:smooth;-webkit-text-size-adjust:100%}
body{
  margin:0;
  min-height:100vh;
  font-family:'Segoe UI',system-ui,-apple-system,BlinkMacSystemFont,Roboto,'Helvetica Neue',Arial,sans-serif;
  color:var(--ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(16,185,129,.22), transparent 36%),
    radial-gradient(circle at 88% 12%, rgba(56,189,248,.22), transparent 38%),
    linear-gradient(160deg, var(--bg-1) 0%, var(--bg-2) 52%, var(--bg-3) 100%);
  background-attachment:fixed;
  line-height:1.5;
  padding-bottom:84px;
}

.tricolor-bar{
  height:4px;
  width:100%;
  background:linear-gradient(90deg,#f97316 0%,#f59e0b 28%,#0ea5e9 55%,#10b981 100%);
  position:sticky;
  top:0;
  z-index:60;
}

.frame{
  width:100%;
  max-width:980px;
  margin:0 auto;
  padding:0 16px;
}

/* Header */
.site-header{
  position:sticky;
  top:4px;
  z-index:50;
  background:rgba(255,255,255,.92);
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
  border-bottom:1px solid rgba(203,213,225,.75);
  box-shadow:0 4px 18px rgba(15,23,42,.05);
}
.head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding-top:11px;
  padding-bottom:11px;
}
.brand{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
}
.logo-wrap{
  flex-shrink:0;
  background:#fff;
  border:1px solid var(--border);
  border-radius:12px;
  padding:4px 6px;
  box-shadow:var(--shadow-sm);
  display:flex;
  align-items:center;
  justify-content:center;
}
.logo-wrap img{
  display:block;
  width:52px;
  height:34px;
  object-fit:contain;
  border-radius:6px;
}
.brand-text{
  display:flex;
  flex-direction:column;
  min-width:0;
}
.brand-text strong{
  font-size:1.05rem;
  font-weight:800;
  letter-spacing:.02em;
  color:#0f172a;
  line-height:1.2;
}
.brand-text small{
  font-size:.7rem;
  font-weight:700;
  letter-spacing:.08em;
  color:var(--primary-dark);
  text-transform:uppercase;
}

.btn-logout{
  flex-shrink:0;
  appearance:none;
  border:1.5px solid #fecdd3;
  background:#fff1f2;
  color:#be123c;
  font-weight:700;
  font-size:.84rem;
  padding:8px 14px;
  border-radius:999px;
  cursor:pointer;
  transition:all .18s ease;
}
.btn-logout:hover{
  background:#e11d48;
  color:#fff;
  border-color:#e11d48;
  transform:translateY(-1px);
}
.btn-logout[hidden]{display:none !important}

/* Hero Banner (PanWeb-inspired fresh mint/sky official card) */
.hero{
  margin-top:18px;
  padding:26px 24px 22px;
  border-radius:var(--radius-xl);
  background:linear-gradient(135deg,#d1fae5 0%,#bae6fd 55%,#e0e7ff 100%);
  border:1px solid rgba(255,255,255,.85);
  box-shadow:var(--shadow-lg);
  position:relative;
  overflow:hidden;
}
.hero::after{
  content:'';
  position:absolute;
  top:-48px;
  right:-48px;
  width:190px;
  height:190px;
  border-radius:50%;
  background:radial-gradient(circle,rgba(255,255,255,.55),transparent 70%);
  pointer-events:none;
}
.hero-top{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:12px;
}
.hero-badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:5px 12px;
  border-radius:999px;
  background:rgba(255,255,255,.82);
  color:#0f766e;
  font-size:.72rem;
  font-weight:800;
  letter-spacing:.06em;
  border:1px solid rgba(13,148,136,.2);
}
.mode-pill{
  display:inline-flex;
  align-items:center;
  gap:7px;
  padding:5px 12px;
  border-radius:999px;
  background:#0f172a;
  color:#ecfdf5;
  font-size:.75rem;
  font-weight:700;
}
.mode-pill::before{
  content:'';
  width:8px;
  height:8px;
  border-radius:50%;
  background:#34d399;
  box-shadow:0 0 0 3px rgba(52,211,153,.28);
}
.hero h1{
  margin:0 0 8px;
  font-size:clamp(1.55rem,4.5vw,2.25rem);
  font-weight:900;
  line-height:1.18;
  color:#0f172a;
  letter-spacing:-.02em;
}
.hero-accent{
  color:#047857;
  display:inline;
}
.hero-sub{
  margin:0 0 18px;
  font-size:.96rem;
  color:#1e3a5f;
  max-width:650px;
  font-weight:500;
}
.hero-stats{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:10px;
  padding-top:14px;
  border-top:1px solid rgba(15,23,42,.1);
}
.stat-item{
  display:flex;
  flex-direction:column;
}
.stat-item b{
  font-size:1.2rem;
  font-weight:900;
  color:#0f172a;
  line-height:1.2;
}
.stat-item span{
  font-size:.78rem;
  font-weight:600;
  color:#334155;
}

/* Compact hero once user is signed in so workspace starts immediately */
body.logged-in .hero{
  padding:14px 18px;
  border-radius:var(--radius-lg);
}
body.logged-in .hero h1,
body.logged-in .hero-sub,
body.logged-in .hero-stats{
  display:none;
}
body.logged-in .hero-top{
  margin-bottom:0;
}

/* Notice banner */
#notice{
  margin:14px 0 0;
  font-weight:700;
  font-size:.92rem;
  border-radius:var(--radius-md);
  transition:all .2s ease;
}
#notice:not(:empty){
  padding:13px 16px;
  background:#fff1f2;
  color:#be123c;
  border:1.5px solid #fda4af;
  box-shadow:var(--shadow-sm);
}

/* Portal Tabs Navigation */
.portal-nav{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
  margin:16px 0;
  padding:6px;
  background:rgba(255,255,255,.88);
  border:1px solid var(--border);
  border-radius:16px;
  box-shadow:var(--shadow-sm);
}
.portal-nav[hidden]{display:none !important}
.portal-nav button{
  appearance:none;
  border:0;
  background:transparent;
  color:var(--ink-2);
  font-size:.95rem;
  font-weight:700;
  padding:11px 14px;
  border-radius:12px;
  cursor:pointer;
  transition:all .18s ease;
}
.portal-nav button:hover{
  background:#f1f5f9;
  color:var(--ink);
}
.portal-nav button.active{
  background:linear-gradient(135deg,#0d9488 0%,#2563eb 100%);
  color:#fff;
  box-shadow:0 6px 16px rgba(13,148,136,.28);
}

/* Main Panel */
#panel{
  margin-top:16px;
}

/* Login Card (PanWeb clean white card style, Google Sign-In ONLY) */
.login-card{
  background:var(--surface);
  border-radius:var(--radius-xl);
  border:1px solid rgba(255,255,255,.9);
  box-shadow:var(--shadow-md);
  padding:28px 24px 26px;
  text-align:center;
  max-width:520px;
  margin:0 auto;
}
.login-pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 18px;
  border-radius:999px;
  background:linear-gradient(135deg,#fb923c 0%,#f59e0b 100%);
  color:#fff;
  font-size:.82rem;
  font-weight:800;
  box-shadow:0 6px 18px rgba(245,158,11,.32);
  margin-bottom:18px;
}
.login-card h2{
  margin:0 0 6px;
  font-size:1.65rem;
  font-weight:900;
  color:#0f172a;
}
.login-sub{
  margin:0 0 18px;
  color:var(--muted);
  font-size:.95rem;
}

/* CRITICAL FIX: Protect Google Sign-In rendered button from broken SVG/sizing */
.google-btn-wrap{
  display:flex;
  justify-content:center;
  align-items:center;
  min-height:52px;
  margin:18px auto 16px;
  padding:8px;
  background:#f8fafc;
  border:1px dashed #cbd5e1;
  border-radius:16px;
}
#google-signin{
  display:flex !important;
  justify-content:center !important;
  align-items:center !important;
  width:auto !important;
  max-width:100% !important;
}
#google-signin iframe{
  max-width:100% !important;
  min-height:40px !important;
}
#google-signin svg{
  width:20px !important;
  height:20px !important;
  max-width:24px !important;
  max-height:24px !important;
}
.login-safe{
  margin:14px 0 0;
  padding:10px 14px;
  border-radius:12px;
  background:#ecfdf5;
  border:1px solid #a7f3d0;
  color:#065f46;
  font-size:.82rem;
  font-weight:600;
}
.login-help{
  margin:14px 0 0;
  font-size:.86rem;
  color:var(--ink-2);
  font-weight:600;
}
.login-help a{
  color:#059669;
  font-weight:800;
  text-decoration:none;
}
.login-help a:hover{text-decoration:underline}

/* Catalog Search Bar */
.catalog-toolbar{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius-lg);
  padding:14px 16px;
  box-shadow:var(--shadow-sm);
  margin-bottom:18px;
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:12px;
}
.catalog-search{
  flex:1 1 240px;
  width:100%;
  padding:12px 16px 12px 42px;
  border-radius:12px;
  border:1.5px solid var(--border-strong);
  font-size:.95rem;
  font-family:inherit;
  color:var(--ink);
  background:#f8fafc url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%2364748b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E") no-repeat 14px center;
  transition:all .18s ease;
}
.catalog-search:focus{
  outline:none;
  border-color:var(--primary);
  background-color:#fff;
  box-shadow:0 0 0 4px rgba(13,148,136,.14);
}
.catalog-count{
  font-size:.82rem;
  font-weight:800;
  color:var(--primary-dark);
  background:var(--emerald-soft);
  border:1px solid #a7f3d0;
  padding:6px 12px;
  border-radius:999px;
  white-space:nowrap;
}

/* Color-Coded Category Sections */
.dept-section{
  --accent:#0d9488;
  --accent-bg:#f0fdfa;
  --accent-border:#99f6e4;
  background:var(--surface);
  border:1px solid var(--border);
  border-top:4px solid var(--accent);
  border-radius:var(--radius-lg);
  padding:18px;
  margin-bottom:18px;
  box-shadow:var(--shadow-sm);
  transition:box-shadow .2s ease;
}
.dept-section:hover{box-shadow:var(--shadow-md)}
.dept-section[data-cat-idx="0"]{--accent:#2563eb;--accent-bg:#eff6ff;--accent-border:#bfdbfe}
.dept-section[data-cat-idx="1"]{--accent:#7c3aed;--accent-bg:#f5f3ff;--accent-border:#ddd6fe}
.dept-section[data-cat-idx="2"]{--accent:#0d9488;--accent-bg:#f0fdfa;--accent-border:#99f6e4}
.dept-section[data-cat-idx="3"]{--accent:#059669;--accent-bg:#ecfdf5;--accent-border:#a7f3d0}
.dept-section[data-cat-idx="4"]{--accent:#d97706;--accent-bg:#fffbeb;--accent-border:#fde68a}
.dept-section[data-cat-idx="5"]{--accent:#e11d48;--accent-bg:#fff1f2;--accent-border:#fecdd3}
.dept-section[data-cat-idx="6"]{--accent:#0284c7;--accent-bg:#f0f9ff;--accent-border:#bae6fd}
.dept-section[data-cat-idx="7"]{--accent:#16a34a;--accent-bg:#f0fdf4;--accent-border:#bbf7d0}
.dept-section[data-cat-idx="8"]{--accent:#4f46e5;--accent-bg:#eef2ff;--accent-border:#c7d2fe}
.dept-section[data-cat-idx="9"]{--accent:#0891b2;--accent-bg:#ecfeff;--accent-border:#a5f3fc}
.dept-section[data-cat-idx="10"]{--accent:#ea580c;--accent-bg:#fff7ed;--accent-border:#fed7aa}
.dept-section[data-cat-idx="11"]{--accent:#9333ea;--accent-bg:#faf5ff;--accent-border:#e9d5ff}

.dept-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:14px;
}
.dept-head h3{
  margin:0;
  font-size:1.05rem;
  font-weight:800;
  color:var(--ink);
  display:flex;
  align-items:center;
  gap:10px;
}
.dept-head h3::before{
  content:'';
  width:10px;
  height:10px;
  border-radius:50%;
  background:var(--accent);
  box-shadow:0 0 0 4px var(--accent-bg);
  flex-shrink:0;
}
.dept-count{
  font-size:.75rem;
  font-weight:800;
  color:var(--accent);
  background:var(--accent-bg);
  border:1px solid var(--accent-border);
  padding:3px 10px;
  border-radius:999px;
}

.tiles{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(230px,1fr));
  gap:11px;
}
.tile{
  appearance:none;
  position:relative;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  width:100%;
  text-align:left;
  padding:14px 38px 14px 16px;
  border-radius:var(--radius-md);
  border:1.5px solid var(--border);
  border-left:4px solid var(--accent, var(--primary));
  background:linear-gradient(180deg,#ffffff 0%,#f8fafc 100%);
  color:var(--ink);
  font-size:.93rem;
  font-weight:700;
  font-family:inherit;
  cursor:pointer;
  transition:all .18s ease;
  box-shadow:0 2px 5px rgba(15,23,42,.03);
}
.tile::after{
  content:'→';
  position:absolute;
  right:14px;
  top:50%;
  transform:translateY(-50%);
  color:var(--accent, var(--primary));
  font-weight:900;
  font-size:1.05rem;
  transition:transform .18s ease;
}
.tile:hover{
  background:var(--accent-bg, #f0fdfa);
  border-color:var(--accent, var(--primary));
  transform:translateY(-2px);
  box-shadow:0 8px 18px rgba(15,23,42,.08);
}
.tile:hover::after{
  transform:translate(3px,-50%);
}
.tile:active{transform:translateY(0)}

/* Generic Headings & Action Bar */
#panel > h2, .page-head h2{
  margin:14px 0 12px;
  font-size:1.45rem;
  font-weight:900;
  color:#0f172a;
  letter-spacing:-.015em;
}
.action-bar{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:10px;
  margin-bottom:12px;
}

/* Visual 3-Step Progress Stepper */
.stepper{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:8px;
  margin:12px 0 18px;
}
.step-pill{
  display:flex;
  align-items:center;
  gap:8px;
  padding:10px 12px;
  border-radius:12px;
  background:#fff;
  border:1.5px solid var(--border);
  color:var(--muted);
  font-size:.82rem;
  font-weight:700;
}
.step-pill b{
  width:22px;
  height:22px;
  border-radius:50%;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:#e2e8f0;
  color:#475569;
  font-size:.76rem;
  flex-shrink:0;
}
.step-pill.active{
  background:var(--blue-soft);
  border-color:#60a5fa;
  color:#1d4ed8;
}
.step-pill.active b{
  background:#2563eb;
  color:#fff;
}
.step-pill.done{
  background:var(--emerald-soft);
  border-color:#6ee7b7;
  color:#047857;
}
.step-pill.done b{
  background:#10b981;
  color:#fff;
}

/* Cards & Boxes */
.box{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius-lg);
  padding:20px;
  margin-bottom:16px;
  box-shadow:var(--shadow-sm);
}
.box h3{
  margin:0 0 10px;
  font-size:1.1rem;
  font-weight:800;
  color:#0f172a;
}
.box p{
  margin:0 0 10px;
  color:var(--ink-2);
  font-size:.93rem;
}
.box p:last-child{margin-bottom:0}
.box ul{
  margin:10px 0 0;
  padding:0;
  list-style:none;
  display:grid;
  gap:10px;
}
.box ul li{
  padding:12px 14px;
  background:#f8fafc;
  border:1px solid var(--border);
  border-radius:12px;
  font-size:.9rem;
}
.box ul li small{
  display:block;
  margin-top:3px;
  color:var(--muted);
  font-size:.82rem;
}

/* Fee Highlight Banner */
.fee-banner{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  background:linear-gradient(135deg,#ecfdf5 0%,#e0f2fe 100%);
  border:1.5px solid #6ee7b7;
  color:#065f46;
  font-weight:800;
  padding:14px 18px;
}

/* Forms & Inputs */
.fields{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
  gap:14px;
  margin-bottom:18px;
}
.field{
  display:flex;
  flex-direction:column;
  gap:6px;
  margin-bottom:14px;
}
.fields .field{margin-bottom:0}
.field label{
  font-size:.86rem;
  font-weight:700;
  color:#1e293b;
}
.field input[type="text"],
.field input[type="tel"],
.field input[type="date"],
.field input[type="time"],
.field input[type="number"],
.field select{
  width:100%;
  padding:11px 14px;
  border-radius:12px;
  border:1.5px solid var(--border-strong);
  background:#fff;
  color:var(--ink);
  font-size:.95rem;
  font-family:inherit;
  transition:all .18s ease;
}
.field input:focus,
.field select:focus{
  outline:none;
  border-color:var(--primary);
  box-shadow:0 0 0 4px rgba(13,148,136,.15);
}
.field select:disabled{
  background:#f1f5f9;
  color:var(--muted);
  cursor:not-allowed;
}
.field input[type="file"]{
  width:100%;
  padding:12px;
  border:2px dashed #94a3b8;
  border-radius:12px;
  background:#f8fafc;
  color:var(--ink-2);
  font-size:.88rem;
  cursor:pointer;
  transition:all .18s ease;
}
.field input[type="file"]:hover{
  border-color:var(--primary);
  background:#f0fdfa;
}

/* Checkboxes */
.check{
  display:flex;
  align-items:flex-start;
  gap:10px;
  padding:13px 15px;
  border-radius:12px;
  background:#eff6ff;
  border:1.5px solid #bfdbfe;
  color:#1e3a8a;
  font-size:.88rem;
  font-weight:600;
  margin:12px 0 16px;
  cursor:pointer;
}
.check input[type="checkbox"]{
  width:18px;
  height:18px;
  margin-top:2px;
  accent-color:var(--primary);
  flex-shrink:0;
}

/* Buttons */
button[data-action],
form button{
  appearance:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:11px 20px;
  border-radius:12px;
  border:0;
  font-family:inherit;
  font-size:.93rem;
  font-weight:800;
  cursor:pointer;
  transition:all .18s ease;
}
button[data-action]:disabled,
form button:disabled{
  opacity:.6;
  cursor:wait;
}

/* Primary vibrant CTA buttons (PanWeb mint-emerald gradient!) */
form button,
button[data-action="submit"],
button[data-action="checkout"],
button[data-action="receipt"]{
  background:linear-gradient(135deg,#10b981 0%,#0d9488 55%,#0284c7 100%);
  color:#fff;
  box-shadow:0 8px 20px rgba(13,148,136,.28);
}
form button:hover,
button[data-action="submit"]:hover,
button[data-action="checkout"]:hover,
button[data-action="receipt"]:hover{
  transform:translateY(-1px);
  box-shadow:0 10px 24px rgba(13,148,136,.36);
}
button[data-action="submit"]{
  width:100%;
  padding:14px 24px;
  font-size:1rem;
  margin-top:8px;
}

/* Secondary & Action Buttons */
button[data-action="catalog"],
button[data-action="requests"]{
  background:#fff;
  color:#0f172a;
  border:1.5px solid var(--border-strong);
  box-shadow:var(--shadow-sm);
  padding:9px 16px;
  font-size:.86rem;
}
button[data-action="catalog"]:hover,
button[data-action="requests"]:hover{
  background:#f1f5f9;
  border-color:#94a3b8;
}
button[data-action="edit-draft"]{
  background:#eff6ff;
  color:#1d4ed8;
  border:1.5px solid #93c5fd;
  padding:9px 16px;
  font-size:.86rem;
}
button[data-action="edit-draft"]:hover{
  background:#2563eb;
  color:#fff;
  border-color:#2563eb;
}
button[data-action="upload"],
button[data-action="detail"],
button[data-action="download"]{
  background:linear-gradient(135deg,#2563eb 0%,#0284c7 100%);
  color:#fff;
  box-shadow:0 5px 14px rgba(37,99,235,.22);
  padding:10px 18px;
  font-size:.88rem;
}
button[data-action="upload"]:hover,
button[data-action="detail"]:hover,
button[data-action="download"]:hover{
  transform:translateY(-1px);
  box-shadow:0 8px 18px rgba(37,99,235,.32);
}

/* ============================================================
   3rd Image Fix: Official Dynamic Application Summary & Details Preview
   ============================================================ */
.app-summary{
  background:linear-gradient(135deg,#0f172a 0%,#1e3a5f 60%,#0f766e 100%);
  color:#fff;
  border:0;
  border-radius:var(--radius-xl);
  padding:22px;
  box-shadow:var(--shadow-lg);
}
.app-summary-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(160px,1fr));
  gap:12px;
  margin-top:6px;
}
.summary-chip{
  background:rgba(255,255,255,.11);
  border:1px solid rgba(255,255,255,.18);
  border-radius:14px;
  padding:12px 14px;
}
.summary-chip span{
  display:block;
  font-size:.72rem;
  font-weight:700;
  letter-spacing:.06em;
  text-transform:uppercase;
  color:#bae6fd;
  margin-bottom:4px;
}
.summary-chip strong{
  font-size:1.04rem;
  font-weight:800;
  color:#fff;
  word-break:break-all;
}
.summary-id{
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  font-size:.82rem !important;
  font-weight:600 !important;
  color:#e2e8f0 !important;
}

/* Status Badges */
.status-badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:4px 12px;
  border-radius:999px;
  font-size:.78rem;
  font-weight:800;
  letter-spacing:.02em;
}
.status-draft{background:#dbeafe;color:#1d4ed8}
.status-quote_pending{background:#fef3c7;color:#b45309}
.status-payment_due{background:#f3e8ff;color:#6d28d9}
.status-reference_submitted{background:#e0e7ff;color:#3730a3}
.status-paid{background:#d1fae5;color:#047857}
.status-received{background:#ccfbf1;color:#0f766e}
.status-canceled{background:#f1f5f9;color:#475569}

/* Structured Details Card (replaces ugly raw <dl> in IMG_1673) */
.details-card{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius-lg);
  padding:20px;
  margin-bottom:16px;
  box-shadow:var(--shadow-sm);
}
.details-card-head{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding-bottom:12px;
  margin-bottom:14px;
  border-bottom:1.5px solid #f1f5f9;
}
.details-card-head h3{
  margin:0;
  font-size:1.05rem;
  font-weight:800;
  color:#0f172a;
}
dl.details-grid{
  margin:0;
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:10px;
}
.detail-item{
  background:#f8fafc;
  border:1px solid #e2e8f0;
  border-radius:12px;
  padding:11px 14px;
  transition:border-color .15s ease;
}
.detail-item:hover{
  border-color:#99f6e4;
  background:#f0fdfa;
}
.detail-item dt{
  font-size:.74rem;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.04em;
  color:var(--muted);
  margin:0 0 4px;
}
.detail-item dd{
  margin:0;
  font-size:.96rem;
  font-weight:700;
  color:#0f172a;
  word-break:break-word;
}

/* Document Upload Cards */
.doc-card{
  border-left:4px solid #0284c7;
}
.doc-card.doc-uploaded{
  border-left-color:#10b981;
  background:linear-gradient(180deg,#ffffff 0%,#ecfdf5 100%);
}
.doc-card-head{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  margin-bottom:6px;
}
.doc-pill{
  display:inline-flex;
  align-items:center;
  padding:3px 10px;
  border-radius:999px;
  font-size:.74rem;
  font-weight:800;
}
.doc-pill.req{background:#fef3c7;color:#b45309;border:1px solid #fde68a}
.doc-pill.opt{background:#e0f2fe;color:#0369a1;border:1px solid #bae6fd}
.doc-pill.done{background:#d1fae5;color:#047857;border:1px solid #6ee7b7}

/* Request List Cards */
.req-card{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  border-left:4px solid var(--primary);
}
.req-card-info{
  display:flex;
  flex-direction:column;
  gap:6px;
}
.req-card-info strong{
  font-size:1.02rem;
  color:#0f172a;
}
.req-meta{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
  margin:0 !important;
}

/* Private Document Rows */
.row{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:12px 14px;
  background:#f8fafc;
  border:1px solid var(--border);
  border-radius:12px;
  margin-bottom:10px;
}
.row span{
  font-weight:700;
  color:#0f172a;
  font-size:.92rem;
}

/* Links */
a{color:#0284c7;font-weight:600}
a:hover{color:#0369a1}
.ext-link-wrap a{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:7px 14px;
  border-radius:999px;
  background:#eff6ff;
  border:1px solid #bfdbfe;
  color:#1d4ed8;
  text-decoration:none;
  font-size:.84rem;
  font-weight:700;
}
.ext-link-wrap a:hover{
  background:#2563eb;
  color:#fff;
  border-color:#2563eb;
}

/* Checkout & UPI */
.upi-app{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:10px 16px;
  border-radius:12px;
  background:linear-gradient(135deg,#0f172a 0%,#1e3a8a 100%);
  color:#fff !important;
  text-decoration:none;
  font-size:.88rem;
  font-weight:800;
  box-shadow:0 4px 12px rgba(15,23,42,.18);
  transition:transform .16s ease;
}
.upi-app:hover{transform:translateY(-1px)}
.qr{
  display:block;
  max-width:250px;
  width:100%;
  height:auto;
  margin:14px auto;
  padding:12px;
  background:#fff;
  border:2px solid var(--border);
  border-radius:18px;
  box-shadow:var(--shadow-md);
}
.small{
  font-size:.84rem;
  color:var(--muted);
}

/* Footer */
.site-footer{
  margin-top:28px;
  padding:18px 20px;
  border-radius:var(--radius-lg);
  background:rgba(255,255,255,.85);
  border:1px solid var(--border);
  text-align:center;
  font-size:.86rem;
  color:var(--ink-2);
}
.footer-brand{
  margin-bottom:6px;
  color:#0f172a;
}
.footer-links{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:8px;
}
.footer-links a{
  color:#0f766e;
  text-decoration:none;
  font-weight:700;
}
.footer-links a:hover{text-decoration:underline}

/* Floating WhatsApp Help Button (like PanWeb) */
.wa-float{
  position:fixed;
  right:18px;
  bottom:18px;
  z-index:70;
  width:56px;
  height:56px;
  border-radius:50%;
  background:linear-gradient(135deg,#25d366 0%,#128c7e 100%);
  color:#fff !important;
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow:0 10px 26px rgba(18,140,126,.42);
  transition:transform .2s ease, box-shadow .2s ease;
}
.wa-float:hover{
  transform:scale(1.07);
  box-shadow:0 14px 32px rgba(18,140,126,.52);
}

/* Responsive adjustments */
@media (max-width:600px){
  .hero{padding:20px 16px 18px}
  .hero-stats{gap:6px}
  .stat-item b{font-size:1.05rem}
  .stat-item span{font-size:.72rem}
  .stepper{grid-template-columns:1fr;gap:6px}
  .tiles{grid-template-columns:1fr}
  .box,.details-card,.dept-section{padding:15px}
  .login-card{padding:22px 16px}
  .brand-text strong{font-size:.94rem}
  .brand-text small{font-size:.63rem}
}

/* Important Notice & No-Upload Info Banners */
.warn-banner{
  background:linear-gradient(135deg,#fffbeb 0%,#fff1f2 100%);
  border:1.5px solid #f59e0b;
  border-left:5px solid #e11d48;
  color:#9f1239;
  font-weight:700;
  font-size:.92rem;
  line-height:1.55;
}
.warn-banner strong{
  display:block;
  color:#be123c;
  font-size:.96rem;
  margin-bottom:4px;
}
.info-banner{
  background:linear-gradient(135deg,#eff6ff 0%,#f0fdfa 100%);
  border:1.5px solid #93c5fd;
  border-left:5px solid #0284c7;
  color:#0c4a6e;
  font-weight:700;
}

/* Anti-select protection (form fields remain fully editable) */
body{
  -webkit-user-select:none;
  -moz-user-select:none;
  user-select:none;
  -webkit-touch-callout:none;
}
input,textarea,select,option{
  -webkit-user-select:text;
  -moz-user-select:text;
  user-select:text;
  -webkit-touch-callout:default;
}

/* =========================================================
   V13: Left Sidebar, Icon Dashboard, LIVE Badges & Wallet UI
   ========================================================= */
.head-left,.head-right{
  display:flex;
  align-items:center;
  gap:10px;
}
.menu-toggle{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:40px;
  height:40px;
  border-radius:11px;
  border:1px solid var(--border);
  background:var(--surface);
  color:var(--ink);
  font-size:19px;
  font-weight:700;
  cursor:pointer;
  padding:0;
  box-shadow:var(--shadow-sm);
}
.menu-toggle:hover{background:var(--surface-soft);border-color:var(--primary)}

.wallet-pill{
  display:inline-flex;
  align-items:center;
  gap:7px;
  padding:7px 14px;
  border-radius:999px;
  border:1px solid rgba(16,185,129,.35);
  background:linear-gradient(135deg,#ecfdf5 0%,#e0f2fe 100%);
  color:#065f46;
  font-size:13px;
  font-weight:700;
  cursor:pointer;
  box-shadow:var(--shadow-sm);
  transition:transform .16s ease,box-shadow .16s ease;
}
.wallet-pill:hover{transform:translateY(-1px);box-shadow:0 6px 16px rgba(13,148,136,.16)}
.wallet-pill strong{color:#0f172a;font-size:14px}

.app-shell{
  display:flex;
  align-items:flex-start;
  max-width:1380px;
  margin:0 auto;
  width:100%;
  position:relative;
}
body:not(.logged-in) .app-shell{
  display:block;
  max-width:1120px;
}
.app-main{
  flex:1;
  min-width:0;
}

.portal-sidebar{
  width:272px;
  flex:0 0 272px;
  position:sticky;
  top:78px;
  margin:18px 0 18px 18px;
  background:linear-gradient(180deg,#1e1b4b 0%,#0f172a 100%);
  color:#e2e8f0;
  border-radius:20px;
  padding:16px 14px;
  box-shadow:0 18px 42px rgba(15,23,42,.22);
  max-height:calc(100vh - 96px);
  overflow-y:auto;
  z-index:45;
}
.portal-sidebar::-webkit-scrollbar{width:5px}
.portal-sidebar::-webkit-scrollbar-thumb{background:rgba(148,163,184,.35);border-radius:999px}

.sb-brand{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:4px 6px 12px;
  border-bottom:1px solid rgba(148,163,184,.18);
  margin-bottom:12px;
}
.sb-brand-title{display:flex;align-items:center;gap:9px}
.sb-brand-icon{
  width:34px;height:34px;border-radius:10px;
  background:linear-gradient(135deg,#0ea5e9 0%,#10b981 100%);
  display:inline-flex;align-items:center;justify-content:center;
  font-size:18px;color:#fff;flex-shrink:0;
}
.sb-brand strong{display:block;font-size:14px;color:#fff;letter-spacing:.2px}
.sb-brand small{display:block;font-size:11px;color:#94a3b8}
.sb-close{
  display:none;
  background:rgba(255,255,255,.1);
  border:none;color:#fff;width:30px;height:30px;border-radius:8px;
  font-size:16px;cursor:pointer;padding:0;
}

.sb-wallet-card{
  background:linear-gradient(135deg,rgba(16,185,129,.22) 0%,rgba(37,99,235,.26) 100%);
  border:1px solid rgba(148,163,184,.24);
  border-radius:14px;
  padding:12px;
  margin-bottom:14px;
}
.sb-wallet-top{display:flex;align-items:center;justify-content:space-between;font-size:11px;color:#cbd5e1;text-transform:uppercase;letter-spacing:.6px;font-weight:700}
.sb-wallet-amt{font-size:24px;font-weight:800;color:#fff;margin:4px 0 10px;letter-spacing:-.3px}
.sb-wallet-btn{
  width:100%;
  border:none;
  border-radius:10px;
  padding:8px 10px;
  background:linear-gradient(135deg,#10b981 0%,#0d9488 100%);
  color:#fff;
  font-size:12.5px;
  font-weight:700;
  cursor:pointer;
}
.sb-wallet-btn:hover{filter:brightness(1.06)}

.sb-group-label{
  font-size:10.5px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.9px;
  color:#94a3b8;
  padding:10px 8px 6px;
}
.sb-item{
  width:100%;
  display:flex;
  align-items:center;
  gap:10px;
  padding:9px 10px;
  margin-bottom:4px;
  border:none;
  border-radius:11px;
  background:transparent;
  color:#e2e8f0;
  font-size:13.5px;
  font-weight:600;
  text-align:left;
  cursor:pointer;
  transition:background .15s ease,color .15s ease,transform .15s ease;
}
.sb-item:hover{background:rgba(255,255,255,.1);color:#fff;transform:translateX(2px)}
.sb-item.active{
  background:linear-gradient(135deg,#2563eb 0%,#0d9488 100%);
  color:#fff;
  box-shadow:0 6px 18px rgba(37,99,235,.32);
}
.sb-ico{font-size:16px;width:22px;text-align:center;flex-shrink:0}
.sb-text{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sb-badge-live{
  background:#10b981;
  color:#fff;
  font-size:9.5px;
  font-weight:800;
  padding:2px 6px;
  border-radius:999px;
  letter-spacing:.5px;
  flex-shrink:0;
}
.sb-badge-count{
  background:rgba(148,163,184,.2);
  color:#cbd5e1;
  font-size:11px;
  font-weight:700;
  padding:1px 7px;
  border-radius:999px;
  flex-shrink:0;
}
.sb-foot{
  margin-top:12px;
  padding-top:12px;
  border-top:1px solid rgba(148,163,184,.18);
  font-size:12px;
  color:#94a3b8;
}
.sb-foot a{color:#38bdf8;text-decoration:none;font-weight:700}

.sidebar-backdrop{
  position:fixed;
  inset:0;
  background:rgba(15,23,42,.52);
  backdrop-filter:blur(2px);
  z-index:55;
}

/* Dashboard Icon Tiles & LIVE Instant Cards */
.tile{
  display:flex;
  align-items:center;
  gap:11px;
  text-align:left;
}
.tile-ico{
  width:38px;
  height:38px;
  border-radius:11px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:19px;
  background:linear-gradient(135deg,rgba(13,148,136,.12) 0%,rgba(37,99,235,.12) 100%);
  flex-shrink:0;
}
.tile-body{
  display:flex;
  flex-direction:column;
  gap:2px;
  min-width:0;
  flex:1;
}
.tile-name{font-weight:700;line-height:1.25}
.tile-meta{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin-top:2px}
.live-pill{
  display:inline-flex;
  align-items:center;
  gap:4px;
  font-size:10px;
  font-weight:800;
  padding:2px 7px;
  border-radius:999px;
  background:#dcfce7;
  color:#15803d;
  border:1px solid #86efac;
  letter-spacing:.5px;
}
.fee-mini{
  font-size:11px;
  font-weight:700;
  color:#0f766e;
  background:#f0fdfa;
  border:1px solid #99f6e4;
  padding:1px 7px;
  border-radius:999px;
}
.dept-section[data-dept="Instant Digital Services"]{
  background:linear-gradient(135deg,#fff7ed 0%,#eff6ff 55%,#ecfdf5 100%);
  border:1.5px solid #93c5fd;
  box-shadow:0 12px 28px rgba(37,99,235,.1);
}
.dept-section[data-dept="Instant Digital Services"] .tile{
  background:#fff;
  border:1.5px solid #bfdbfe;
  box-shadow:0 6px 16px rgba(37,99,235,.08);
}
.dept-section[data-dept="Instant Digital Services"] .tile-ico{
  background:linear-gradient(135deg,#2563eb 0%,#0d9488 100%);
  color:#fff;
}

/* Customer Wallet Screen & Checkout Wallet Pay Box */
.wallet-hero-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(190px,1fr));
  gap:14px;
  margin-bottom:18px;
}
.wallet-stat-card{
  border-radius:16px;
  padding:16px 18px;
  background:#fff;
  border:1px solid var(--border);
  box-shadow:var(--shadow-sm);
}
.wallet-stat-card.primary{
  background:linear-gradient(135deg,#0f766e 0%,#2563eb 100%);
  color:#fff;
  border:none;
}
.wallet-stat-card span{
  display:block;
  font-size:12px;
  font-weight:700;
  opacity:.85;
  text-transform:uppercase;
  letter-spacing:.5px;
}
.wallet-stat-card strong{
  display:block;
  font-size:28px;
  font-weight:800;
  margin-top:4px;
}
.quick-amounts{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:10px 0 14px;
}
.amt-chip{
  border:1.5px solid var(--border-strong);
  background:#f8fafc;
  color:var(--ink);
  border-radius:999px;
  padding:6px 14px;
  font-size:13px;
  font-weight:700;
  cursor:pointer;
}
.amt-chip:hover{border-color:var(--primary);background:#f0fdfa;color:#0f766e}

.wallet-pay-box{
  background:linear-gradient(135deg,#ecfdf5 0%,#eff6ff 100%);
  border:1.5px solid #34d399;
}
.wallet-pay-box h3{margin-top:0;color:#065f46}
.wallet-pay-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}
.btn-wallet-pay{
  background:linear-gradient(135deg,#059669 0%,#0d9488 100%) !important;
  color:#fff !important;
  font-weight:800 !important;
  border:none !important;
  padding:11px 18px !important;
  border-radius:12px !important;
  cursor:pointer;
}

@media (max-width: 960px){
  .app-shell{display:block}
  .portal-sidebar{
    position:fixed;
    top:0;
    left:0;
    bottom:0;
    margin:0;
    border-radius:0 20px 20px 0;
    max-height:100vh;
    width:280px;
    transform:translateX(-110%);
    transition:transform .24s ease;
    z-index:70;
  }
  .portal-sidebar.open{transform:translateX(0)}
  .sb-close{display:inline-flex;align-items:center;justify-content:center}
}
@media (min-width: 961px){
  .menu-toggle{display:none !important}
  .sidebar-backdrop{display:none !important}
}
