@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* LEGACY CACHE GUARD */
.lnd-nav, .lnd-hero, .lnd-stats, .lnd-cats, .lnd-steps, .lnd-why-grid, .lnd-price, .lnd-faq, .lnd-test-grid, .lnd-cta-band, .lnd-foot, .lnd-section {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  height: 0 !important;
  overflow: hidden !important;
}
body:has(.lnd-hero), body:has(.lnd-nav) {
  opacity: 0 !important;
}

/* ==========================================================================
   KANCHAN ONLINE CENTER — MODERN FINTECH & CSC RETAILER PORTAL DESIGN SYSTEM
   Brand Palette inspired by official KOC Emblem: Deep Navy, Crimson Ribbon & Gold
   ========================================================================== */

:root {
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  /* Primary Brand Tokens (KOC Official Identity) */
  --brand: #0f2744;               /* KOC Deep Navy Slate */
  --brand-dark: #081728;          /* Midnight Navy */
  --brand-light: #eef5ff;         /* Ice Blue Wash */
  --brand-primary: #1d4ed8;       /* Royal Blue */
  --brand-primary-hover: #1e40af;
  --brand-crimson: #a8202d;       /* KOC Ribbon Crimson */
  --brand-crimson-dark: #80121d;
  --brand-crimson-light: #fef2f2;
  --brand-gold: #f59e0b;          /* KOC Star & Badge Gold */
  --brand-gold-dark: #d97706;
  --brand-gold-light: #fffbeb;
  
  /* Neutral Slate Scale */
  --ink: #0f172a;                 /* Slate 900 */
  --ink-secondary: #334155;       /* Slate 700 */
  --muted: #64748b;               /* Slate 500 */
  --muted-light: #94a3b8;         /* Slate 400 */
  --line: #e2e8f0;                /* Slate 200 */
  --line-subtle: #f1f5f9;         /* Slate 100 */
  --bg: #f8fafc;                  /* Slate 50 Page Background */
  --card: #ffffff;                /* Pure White */
  --side: #090e1a;                /* Deep Midnight Black-Navy */
  --side-ink: #cbd5e1;
  --side-active: #1e293b;
  
  /* Semantic Badges */
  --green: #059669;
  --green-bg: #ecfdf5;
  --green-border: #a7f3d0;
  --blue: #2563eb;
  --blue-bg: #eff6ff;
  --blue-border: #bfdbfe;
  --amber: #d97706;
  --amber-bg: #fffbeb;
  --amber-border: #fde68a;
  --red: #dc2626;
  --red-bg: #fef2f2;
  --red-border: #fecaca;
  
  /* Elevation & Geometry */
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --shadow-xs: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
  --shadow-sm: 0 2px 4px 0 rgba(15, 23, 42, 0.05);
  --shadow: 0 4px 14px -1px rgba(15, 23, 42, 0.07), 0 2px 6px -2px rgba(15, 23, 42, 0.03);
  --shadow-md: 0 10px 22px -3px rgba(15, 23, 42, 0.08), 0 4px 8px -4px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 20px 32px -6px rgba(15, 23, 42, 0.12), 0 8px 14px -6px rgba(15, 23, 42, 0.05);
  --shadow-glow: 0 0 25px -4px rgba(37, 99, 235, 0.3);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--brand-primary);
  text-decoration: none;
  transition: color 0.18s ease;
}
a:hover {
  color: var(--brand-primary-hover);
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  outline: none;
}

/* --------------------------------------------------------------------------
   BUTTONS & CONTROLS
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 11px 22px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14.5px;
  letter-spacing: -0.1px;
  box-shadow: 0 2px 6px rgba(29, 78, 216, 0.25);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none !important;
}

.btn:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  transform: translateY(-1.5px);
  box-shadow: 0 6px 18px rgba(29, 78, 216, 0.35);
  color: #ffffff !important;
}

.btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(29, 78, 216, 0.2);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

.btn.ghost {
  background: #ffffff;
  color: var(--ink-secondary) !important;
  border: 1.5px solid var(--line);
  box-shadow: var(--shadow-xs);
}

.btn.ghost:hover {
  background: var(--line-subtle);
  border-color: var(--muted-light);
  color: var(--ink) !important;
  box-shadow: var(--shadow-sm);
}

.btn.small {
  padding: 8px 15px;
  font-size: 13px;
  border-radius: 8px;
}

.btn.block {
  width: 100%;
}

.btn.crimson {
  background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
  box-shadow: 0 2px 6px rgba(185, 28, 28, 0.25);
}
.btn.crimson:hover {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  box-shadow: 0 6px 18px rgba(185, 28, 28, 0.35);
}

/* --------------------------------------------------------------------------
   AUTHENTICATION & LOGIN (RETAILER & ADMIN)
   -------------------------------------------------------------------------- */
.auth-wrap, .login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  background-color: #f8fafc;
  background-image: 
    radial-gradient(rgba(15, 39, 68, 0.04) 1px, transparent 1px),
    radial-gradient(circle at 50% 0%, rgba(29, 78, 216, 0.08) 0%, transparent 55%),
    radial-gradient(circle at 90% 85%, rgba(245, 158, 11, 0.07) 0%, transparent 50%),
    radial-gradient(circle at 10% 85%, rgba(168, 32, 45, 0.05) 0%, transparent 50%);
  background-size: 24px 24px, 100% 100%, 100% 100%, 100% 100%;
}

.auth-card {
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 20px 45px -10px rgba(15, 39, 68, 0.09), 0 4px 14px rgba(15, 23, 42, 0.03);
  border: 1px solid rgba(226, 232, 240, 0.95);
  width: 100%;
  max-width: 440px;
  padding: 38px 34px;
  position: relative;
  overflow: hidden;
}

.auth-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #1d4ed8 0%, #f59e0b 50%, #a8202d 100%);
}

.auth-brand {
  text-align: center;
  margin-bottom: 12px;
}

.auth-logo {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 14px;
  display: block;
  background: #ffffff;
  padding: 2px;
  border: 2.5px solid var(--brand-gold);
  box-shadow: 0 8px 24px rgba(15, 39, 68, 0.18);
  transition: transform 0.25s ease;
}
.auth-logo:hover {
  transform: scale(1.04) rotate(2deg);
}

.auth-brand .logo {
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--ink);
  line-height: 1.2;
}

.auth-brand p {
  color: var(--muted);
  font-size: 13.5px;
  margin-top: 4px;
}

.tabs {
  display: flex;
  gap: 6px;
  margin: 22px 0 20px;
  background: var(--line-subtle);
  padding: 4px;
  border-radius: 12px;
}

.tabs button {
  flex: 1;
  padding: 10px;
  background: transparent;
  border-radius: 9px;
  font-weight: 600;
  font-size: 14px;
  color: var(--muted);
  transition: all 0.18s ease;
}

.tabs button.active {
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.tabs button:hover:not(.active) {
  color: var(--ink);
}

/* --------------------------------------------------------------------------
   FORMS & INPUTS
   -------------------------------------------------------------------------- */
.field {
  margin-bottom: 16px;
}

.field label, .form label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 13.5px;
  color: var(--ink-secondary);
}

.field input, .field select, .field textarea, .input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  font-family: inherit;
  font-size: 14.5px;
  color: var(--ink);
  background: #ffffff;
  transition: all 0.18s ease;
}

.field input:focus, .field select:focus, .field textarea:focus, .input:focus {
  outline: none;
  border-color: var(--brand-primary);
  background: #ffffff;
  box-shadow: 0 0 0 3.5px rgba(29, 78, 216, 0.12);
}

.field input::placeholder, .input::placeholder {
  color: var(--muted-light);
}

.field .hint {
  font-size: 12px;
  color: var(--muted);
  margin-top: 5px;
}

.notice {
  background: var(--amber-bg);
  border: 1px solid var(--amber-border);
  color: #92400e;
  padding: 13px 16px;
  border-radius: 12px;
  font-size: 13.5px;
  margin-bottom: 18px;
  line-height: 1.5;
  display: flex;
  align-items: center;
  gap: 10px;
}
.notice.red { background: var(--red-bg); border-color: var(--red-border); color: #991b1b; }
.notice.blue { background: var(--blue-bg); border-color: var(--blue-border); color: #1e40af; }

/* --------------------------------------------------------------------------
   RETAILER APP SHELL (SIDEBAR & TOPBAR)
   -------------------------------------------------------------------------- */
.shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 252px;
  background: var(--side);
  color: var(--side-ink);
  position: fixed;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  z-index: 60;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.side-brand {
  padding: 18px 20px;
  font-size: 17px;
  font-weight: 800;
  color: #ffffff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  align-items: center;
  gap: 12px;
  line-height: 1.2;
}

.side-brand img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  background: #ffffff;
  padding: 1.5px;
  border: 1.5px solid var(--brand-gold);
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.side-brand span {
  font-weight: 800;
  letter-spacing: -0.2px;
}

.side-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 10px;
}

.side-nav .nav-head {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: #64748b;
  padding: 14px 12px 6px;
}

.side-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--side-ink);
  font-weight: 500;
  font-size: 14px;
  margin-bottom: 2px;
  transition: all 0.16s ease;
}

.side-nav a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
}

.side-nav a.active {
  background: linear-gradient(135deg, rgba(29, 78, 216, 0.85) 0%, rgba(30, 64, 175, 0.95) 100%);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(29, 78, 216, 0.25);
}

.side-nav a .ico {
  width: 20px;
  text-align: center;
  font-size: 16px;
}

.side-foot {
  padding: 16px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 12px;
  color: #64748b;
  line-height: 1.5;
}

.side-foot a {
  color: #94a3b8;
  display: inline-block;
  margin-top: 4px;
}
.side-foot a:hover {
  color: #ffffff;
}

.main {
  flex: 1;
  margin-left: 252px;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 28px;
}

.hamburger {
  display: none;
  background: none;
  border: none;
  font-size: 22px;
  color: var(--ink);
}

.topbar .spacer {
  flex: 1;
}

.wallet-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  color: #1e40af;
  font-weight: 700;
  font-size: 14px;
  padding: 7px 16px;
  border-radius: var(--radius-full);
  border: 1px solid #bfdbfe;
  box-shadow: var(--shadow-xs);
  transition: all 0.18s ease;
}
.wallet-chip:hover {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  transform: translateY(-1px);
}

.profile-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 5px 12px 5px 5px;
  box-shadow: var(--shadow-xs);
  color: var(--ink);
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, #0f2744 0%, #1d4ed8 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
}

.content {
  padding: 28px;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  flex: 1;
}

.page-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.6px;
  color: var(--ink);
  margin-bottom: 4px;
}

.page-sub {
  color: var(--muted);
  margin-bottom: 24px;
  font-size: 14px;
}

/* --------------------------------------------------------------------------
   GRIDS, CARDS & STATS
   -------------------------------------------------------------------------- */
.grid { display: grid; gap: 18px; }
.grid.c2 { grid-template-columns: repeat(2, 1fr); }
.grid.c3 { grid-template-columns: repeat(3, 1fr); }
.grid.c4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--ink);
}

.stat {
  display: flex;
  align-items: center;
  gap: 16px;
}

.stat .ico {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.stat .num {
  font-size: 23px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.5px;
}

.stat .lbl {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  margin-top: 2px;
}

.cat-card {
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: left;
  width: 100%;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.cat-card:hover {
  transform: translateY(-4px);
  border-color: #cbd5e1;
  box-shadow: var(--shadow-lg);
}

.cat-card .emoji {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--line-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin-bottom: 12px;
}

.cat-card h3 {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
}

.cat-card p {
  color: var(--muted);
  font-size: 13px;
  flex: 1;
}

.cat-card .count {
  margin-top: 12px;
  font-size: 12.5px;
  color: var(--brand-primary);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
}

.svc-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 6px;
  border-bottom: 1px solid var(--line);
}
.svc-row:last-child {
  border-bottom: none;
}

.svc-row .info {
  flex: 1;
  min-width: 0;
}
.svc-row .info b {
  font-size: 15px;
  color: var(--ink);
}
.svc-row .info p {
  color: var(--muted);
  font-size: 13px;
  margin-top: 2px;
}

.tag {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}
.tag.instant {
  background: var(--blue-bg);
  color: var(--blue);
  border: 1px solid var(--blue-border);
}
.tag.manual {
  background: var(--green-bg);
  color: var(--green);
  border: 1px solid var(--green-border);
}

.fee {
  font-weight: 800;
  color: var(--brand);
  font-size: 15px;
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   TABLES
   -------------------------------------------------------------------------- */
.table-wrap {
  overflow-x: auto;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th, td {
  text-align: left;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

th {
  background: #f8fafc;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
}

tr:hover td {
  background: #fafcff;
}
tr:last-child td {
  border-bottom: none;
}

.dr { color: var(--red); font-weight: 700; }
.cr { color: var(--green); font-weight: 700; }

.status {
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 11px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.status.SUCCESS { background: var(--green-bg); color: var(--green); border: 1px solid var(--green-border); }
.status.PENDING { background: var(--amber-bg); color: var(--amber); border: 1px solid var(--amber-border); }
.status.FAILED  { background: var(--red-bg); color: var(--red); border: 1px solid var(--red-border); }

/* --------------------------------------------------------------------------
   PROMOS & LEADERBOARD
   -------------------------------------------------------------------------- */
.promos {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 4px 2px 14px;
  scroll-snap-type: x mandatory;
}

.promo {
  min-width: 260px;
  scroll-snap-align: start;
  border-radius: var(--radius);
  padding: 20px 22px;
  color: #ffffff;
  font-weight: 700;
  background: linear-gradient(135deg, #0f2744 0%, #1e40af 100%);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.promo.alt {
  background: linear-gradient(135deg, #881337 0%, #b91c1c 100%);
}

.promo small {
  display: block;
  font-weight: 400;
  opacity: 0.88;
  margin-top: 6px;
  font-size: 13px;
}

.lb-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 8px;
  border-bottom: 1px solid var(--line);
}
.lb-rank {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--line-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  flex-shrink: 0;
}
.lb-rank.r1 { background: #fef08a; color: #854d0e; }
.lb-rank.r2 { background: #e2e8f0; color: #475569; }
.lb-rank.r3 { background: #fed7aa; color: #9a3412; }

/* --------------------------------------------------------------------------
   MISCELLANEOUS WIDGETS
   -------------------------------------------------------------------------- */
.searchbar {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}
.searchbar input {
  flex: 1;
  padding: 12px 16px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  font-family: inherit;
  font-size: 14.5px;
}
.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 10px 0;
}
.chip {
  border: 1.5px solid var(--line);
  background: #ffffff;
  border-radius: var(--radius-full);
  padding: 7px 15px;
  font-weight: 600;
  font-size: 13px;
  color: var(--ink-secondary);
  cursor: pointer;
  transition: all 0.16s ease;
}
.chip:hover, .chip.sel {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
  background: var(--brand-light);
}

.result-box {
  background: #f8fafc;
  border: 1.5px dashed #cbd5e1;
  border-radius: 12px;
  padding: 20px;
  margin-top: 20px;
}
.result-box dl {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 8px 14px;
  font-size: 14px;
}
.result-box dt { color: var(--muted); }
.result-box dd { font-weight: 600; color: var(--ink); }

.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(90px);
  background: #0f172a;
  color: #ffffff;
  padding: 13px 24px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 250;
  max-width: 90vw;
  display: flex;
  align-items: center;
  gap: 10px;
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.err { background: #991b1b; }
.toast.ok { background: #065f46; }

.spin-wheel {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  margin: 0 auto 20px;
  background: conic-gradient(#1d4ed8 0 36deg, #f59e0b 36deg 72deg, #a8202d 72deg 108deg, #10b981 108deg 144deg, #8b5cf6 144deg 180deg, #1d4ed8 180deg 216deg, #f59e0b 216deg 252deg, #a8202d 252deg 288deg, #10b981 288deg 324deg, #8b5cf6 324deg 360deg);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.22);
}
.spin-wheel::after {
  content: "🎁";
  font-size: 54px;
  background: #ffffff;
  width: 114px;
  height: 114px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* --------------------------------------------------------------------------
   PUBLIC LANDING PAGE STYLES
   -------------------------------------------------------------------------- */
.lnd-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  transition: all 0.2s ease;
}

.lnd-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.lnd-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none !important;
}

.brand-badge {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  background: #ffffff;
  padding: 1px;
  border: 2px solid var(--brand-gold);
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(15, 39, 68, 0.15);
}

.brand-text {
  font-size: 19px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.4px;
  line-height: 1.2;
}

.brand-text span {
  color: var(--brand-crimson);
}

.lnd-links {
  display: flex;
  gap: 24px;
  margin-left: 20px;
}

.lnd-links a {
  color: var(--ink-secondary);
  font-weight: 600;
  font-size: 14.5px;
  transition: color 0.16s ease;
}
.lnd-links a:hover {
  color: var(--brand-primary);
}

.lnd-nav .spacer {
  flex: 1;
}

/* Hero Section */
.lnd-hero {
  background: radial-gradient(circle at 50% 15%, rgba(37, 99, 235, 0.22) 0%, transparent 60%),
              radial-gradient(circle at 12% 70%, rgba(168, 32, 45, 0.18) 0%, transparent 50%),
              linear-gradient(135deg, #090e1a 0%, #0f172a 55%, #1e293b 100%);
  color: #ffffff;
  padding: 85px 24px 80px;
  text-align: center;
  position: relative;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  color: #f1f5f9;
  backdrop-filter: blur(8px);
  margin-bottom: 22px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.3);
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.lnd-hero h1 {
  font-size: 46px;
  font-weight: 800;
  max-width: 820px;
  margin: 0 auto 18px;
  line-height: 1.18;
  letter-spacing: -1px;
}

.lnd-hero h1 em {
  font-style: normal;
  background: linear-gradient(135deg, #60a5fa 0%, #93c5fd 50%, #fbcfe8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.lnd-hero p {
  color: #94a3b8;
  max-width: 660px;
  margin: 0 auto 34px;
  font-size: 17px;
  line-height: 1.6;
}

.lnd-cta {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-trust-bar {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 36px;
  font-size: 13.5px;
  color: #cbd5e1;
}

.hero-trust-bar span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Stats Row */
.lnd-stats {
  max-width: 1040px;
  margin: -38px auto 0;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  position: relative;
  z-index: 10;
}

.lnd-stat {
  background: #ffffff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 22px 18px;
  text-align: center;
  border: 1px solid var(--line);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.lnd-stat:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.lnd-stat b {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #0f2744 0%, #1d4ed8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: block;
}

.lnd-stat small {
  color: var(--muted);
  display: block;
  margin-top: 4px;
  font-size: 13px;
  font-weight: 600;
}

/* Sections */
.lnd-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 76px 24px;
}

.lnd-section h2 {
  font-size: 32px;
  font-weight: 800;
  text-align: center;
  margin-bottom: 8px;
  letter-spacing: -0.6px;
  color: var(--ink);
}

.lnd-section .sub {
  text-align: center;
  color: var(--muted);
  max-width: 660px;
  margin: 0 auto 40px;
  font-size: 16px;
}

.lnd-cats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 18px;
}

/* How It Works Steps */
.lnd-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.lnd-step {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 24px;
  box-shadow: var(--shadow);
  text-align: center;
  position: relative;
  transition: all 0.2s ease;
}

.lnd-step:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.lnd-step .n {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: linear-gradient(135deg, #0f2744 0%, #1d4ed8 100%);
  color: #ffffff;
  font-size: 20px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  box-shadow: 0 4px 12px rgba(29, 78, 216, 0.25);
}

.lnd-step h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--ink);
}

/* Why Choose Us Grid */
.lnd-why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.lnd-why-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 22px;
  box-shadow: var(--shadow);
  transition: all 0.22s ease;
}

.lnd-why-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

.lnd-why-card .ico {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background: var(--brand-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 16px;
}

.lnd-why-card h3 {
  font-size: 17.5px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--ink);
}

.lnd-why-card p {
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.55;
}

/* Pricing Table Container */
.lnd-price {
  background: #ffffff;
  border-radius: 18px;
  padding: 10px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

/* FAQ Details */
.lnd-faq details {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 22px;
  margin-bottom: 12px;
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  transition: all 0.18s ease;
}

.lnd-faq details:hover {
  border-color: #cbd5e1;
  box-shadow: var(--shadow-sm);
}

.lnd-faq summary {
  font-weight: 700;
  font-size: 16px;
  color: var(--ink);
  outline: none;
}

.lnd-faq p {
  color: var(--muted);
  margin-top: 10px;
  font-size: 14.5px;
  line-height: 1.6;
}

/* Testimonials */
.lnd-test-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.lnd-test-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s ease;
}

.lnd-test-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.rating-stars {
  color: var(--brand-gold);
  font-size: 15px;
  margin-bottom: 12px;
}

.lnd-test-quote {
  color: var(--ink-secondary);
  font-size: 14.5px;
  line-height: 1.6;
  margin-bottom: 20px;
}

.lnd-test-author {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--line-subtle);
}

.lnd-test-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0f2744 0%, #1d4ed8 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
}

.lnd-test-info b {
  font-size: 14.5px;
  color: var(--ink);
  display: block;
}

.lnd-test-info small {
  color: var(--muted);
  font-size: 12.5px;
}

/* Contact Grid */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.contact-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 20px;
  box-shadow: var(--shadow);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: all 0.2s ease;
}

.contact-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

.contact-card .ico {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--brand-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 14px;
}

.contact-card h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--ink);
}

.contact-card p {
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.55;
}

.live-pulse {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--green);
  background: var(--green-bg);
  border: 1px solid var(--green-border);
  padding: 3px 9px;
  border-radius: var(--radius-full);
  margin-top: 8px;
}

/* CTA Band */
.lnd-cta-band {
  background: radial-gradient(circle at 80% 20%, rgba(245, 158, 11, 0.2) 0%, transparent 50%),
              linear-gradient(135deg, #0f2744 0%, #1e40af 60%, #881337 100%);
  color: #ffffff;
  text-align: center;
  padding: 65px 24px;
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.lnd-cta-band h2 {
  font-size: 34px;
  font-weight: 800;
  margin-bottom: 10px;
  letter-spacing: -0.6px;
}

.lnd-cta-band p {
  opacity: 0.9;
  font-size: 16.5px;
  margin-bottom: 26px;
  max-width: 580px;
  margin-left: auto;
  margin-right: auto;
}

/* Footer */
.lnd-foot {
  background: #090e1a;
  color: #94a3b8;
  padding: 60px 24px 28px;
  margin-top: 70px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.lnd-foot-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 36px;
}

.lnd-foot h4 {
  color: #ffffff;
  margin-bottom: 16px;
  font-size: 15.5px;
  font-weight: 700;
}

.lnd-foot a {
  color: #94a3b8;
  font-size: 14px;
  display: block;
  margin-bottom: 9px;
  transition: color 0.16s ease;
}
.lnd-foot a:hover {
  color: #ffffff;
}

.lnd-copy {
  max-width: 1200px;
  margin: 40px auto 0;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12.5px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  color: #64748b;
}

/* --------------------------------------------------------------------------
   ADMIN PANEL STYLES
   -------------------------------------------------------------------------- */
.adm-side {
  width: 240px;
  background: #090e1a;
  color: #cbd5e1;
  position: fixed;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  z-index: 50;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.adm-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px;
  font-size: 17px;
  font-weight: 800;
  color: #ffffff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.adm-logo:hover { text-decoration: none; }
.adm-logo img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  background: #ffffff;
  padding: 1px;
  border: 1.5px solid var(--brand-gold);
}

.adm-side nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 10px;
}

.adm-side nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  color: #94a3b8;
  font-weight: 500;
  font-size: 14px;
  margin-bottom: 2px;
  transition: all 0.16s ease;
}

.adm-side nav a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  text-decoration: none;
}

.adm-side nav a.active {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(29, 78, 216, 0.25);
}

.adm-side-foot {
  padding: 16px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 13px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.adm-side-foot a { color: #64748b; }
.adm-side-foot a:hover { color: #ffffff; }

.adm-main {
  margin-left: 240px;
  min-height: 100vh;
}

.adm-top {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  padding: 12px 28px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 40;
}

.adm-top b { font-size: 15px; color: var(--ink); }
.adm-user { color: var(--muted); font-size: 13px; flex: 1; }
.adm-content { padding: 28px; max-width: 1200px; }

.adm-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(90px);
  color: #ffffff;
  padding: 13px 24px;
  border-radius: 12px;
  font-weight: 600;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 250;
}
.adm-toast.show { transform: translateX(-50%) translateY(0); }

/* --------------------------------------------------------------------------
   RESPONSIVE QUERIES
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .lnd-why-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: repeat(2, 1fr); }
  .lnd-steps { grid-template-columns: 1fr; }
  .lnd-test-grid { grid-template-columns: 1fr; }
  .grid.c4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: none; box-shadow: 0 0 60px rgba(0, 0, 0, 0.4); }
  .main { margin-left: 0; }
  .hamburger { display: block; }
  .content { padding: 20px 16px; }
  .adm-side { transform: translateX(-100%); }
  .adm-main { margin-left: 0; }
  .lnd-links { display: none; }
  .lnd-hero h1 { font-size: 32px; }
  .lnd-stats { grid-template-columns: repeat(2, 1fr); margin-top: -24px; }
  .lnd-foot-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  .grid.c2, .grid.c3, .grid.c4 { grid-template-columns: 1fr; }
  .lnd-stats { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .lnd-why-grid { grid-template-columns: 1fr; }
  .lnd-foot-inner { grid-template-columns: 1fr; }
  .profile-chip .pname { display: none; }
  .result-box dl { grid-template-columns: 120px 1fr; }
}


/* Customer & Admin Desktop Tables & Footer Polish */
.footer-note {
  padding: 20px 32px;
  font-size: 13px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  background: #ffffff;
  margin-top: auto;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}
.footer-note a {
  color: var(--brand-primary);
  text-decoration: underline;
  font-weight: 600;
}

@media (min-width: 1024px) {
  .tbl th, .tbl td {
    padding: 10px 10px;
    font-size: 13px;
  }
}


/* ==========================================================================
   MOBILE RESPONSIVENESS & TOUCH ADAPTATION (CUSTOMER PORTAL & ADMIN PANEL)
   ========================================================================== */

html, body {
  overflow-x: hidden !important;
  max-width: 100vw !important;
  margin: 0;
  padding: 0;
}

*, *::before, *::after {
  box-sizing: border-box;
}

.table-wrap {
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
  max-width: 100% !important;
  width: 100% !important;
}

.tabs-bar {
  overflow-x: auto !important;
  white-space: nowrap !important;
  -webkit-overflow-scrolling: touch !important;
  display: flex !important;
  gap: 8px !important;
  padding-bottom: 6px !important;
}

/* Admin Mobile Hamburger & Overlay */
.adm-hamburger {
  display: none;
  background: #f1f5f9;
  border: 1px solid var(--line);
  font-size: 20px;
  cursor: pointer;
  color: var(--ink);
  padding: 6px 12px;
  border-radius: 8px;
  line-height: 1;
}

.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  z-index: 55;
  display: none;
}
.sidebar-overlay.active {
  display: block;
}

@media (max-width: 900px) {
  .adm-hamburger {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
  }
  .adm-top {
    padding: 10px 14px !important;
    justify-content: space-between !important;
    gap: 10px !important;
    position: sticky;
    top: 0;
    z-index: 40;
  }
  .adm-main {
    margin-left: 0 !important;
    padding: 16px 12px !important;
    max-width: 100vw !important;
    width: 100% !important;
    overflow-x: hidden !important;
  }
  .adm-side {
    position: fixed !important;
    top: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 270px !important;
    z-index: 100 !important;
    transform: translateX(-100%) !important;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  }
  .adm-side.open {
    transform: translateX(0) !important;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5) !important;
  }
  .adm-stats {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }
  .adm-stat-card {
    padding: 14px 12px !important;
  }
  .adm-stat-val {
    font-size: 20px !important;
  }

  /* Customer Portal Layout */
  .main {
    margin-left: 0 !important;
    max-width: 100vw !important;
    width: 100% !important;
    overflow-x: hidden !important;
  }
  .topbar {
    padding: 10px 14px !important;
  }
  .content {
    padding: 16px 12px !important;
    max-width: 100vw !important;
    width: 100% !important;
    overflow-x: hidden !important;
  }
  .sidebar {
    position: fixed !important;
    top: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 270px !important;
    z-index: 100 !important;
    transform: translateX(-100%) !important;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  }
  .sidebar.open {
    transform: translateX(0) !important;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5) !important;
  }

  /* Customer Profile & Chips */
  .profile-chip .pname {
    display: none !important;
  }
  .wallet-chip {
    padding: 6px 10px !important;
    font-size: 13px !important;
  }

  /* Responsive Forms & Modals */
  .modal-card {
    max-width: 95% !important;
    padding: 20px 16px !important;
    margin: 12px auto !important;
  }
  .row {
    flex-wrap: wrap !important;
    gap: 8px !important;
  }
  .input, select.input {
    max-width: 100% !important;
    width: 100% !important;
  }

  /* Grid Collapse on Mobile */
  .grid.c2, .grid.c3, .grid.c4 {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  /* Document Cards Responsive */
  .doc-card {
    padding: 16px !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
  }
  .doc-card > div {
    width: 100% !important;
  }
  .doc-card a.btn {
    flex: 1 !important;
    text-align: center !important;
    justify-content: center !important;
  }

  /* Footer Note */
  .footer-note {
    padding: 16px 12px !important;
    font-size: 12px !important;
    flex-direction: column !important;
    text-align: center !important;
  }
}

@media (max-width: 520px) {
  .adm-stats {
    grid-template-columns: 1fr !important;
  }
  .page-title {
    font-size: 20px !important;
  }
}


/* ==========================================================================
   MULTI-DEVICE MOBILE RESPONSIVE UPGRADE (ZERO-WOBBLE, PIXEL-PERFECT)
   ========================================================================== */

/* Universal Overflow & Body Guard */
html, body {
  overflow-x: hidden !important;
  max-width: 100vw !important;
}

/* Base button text wrapping */
.btn {
  white-space: normal !important;
  word-break: break-word !important;
}
.btn.block {
  width: 100% !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  text-align: center !important;
  box-sizing: border-box !important;
}

/* Floating Island Header Mobile Polish */
@media (max-width: 768px) {
  body:has(.koc-island-nav), body.public-page {
    padding-top: 68px !important;
    padding-bottom: 0 !important;
  }
  body:has(.shell), body:has(.adm-main), body.portal-body, body.admin-body {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-top: 0 !important;
  }
  .koc-island-nav {
    top: 8px !important;
    left: 8px !important;
    right: 8px !important;
    width: auto !important;
    max-width: calc(100% - 16px) !important;
    transform: none !important;
    padding: 6px 10px !important;
    border-radius: 16px !important;
    box-sizing: border-box !important;
  }
  .koc-island-inner {
    gap: 8px !important;
  }
  .koc-nav-pills {
    display: none !important;
  }
  .koc-phone-link {
    display: none !important;
  }
  .koc-logo {
    gap: 8px !important;
    min-width: 0 !important;
    flex-shrink: 1 !important;
  }
  .koc-logo img {
    width: 32px !important;
    height: 32px !important;
    flex-shrink: 0 !important;
  }
  .koc-logo-text {
    font-size: 13px !important;
    line-height: 1.15 !important;
    white-space: nowrap !important;
  }
  .koc-logo-text span {
    font-size: 9px !important;
    display: block !important;
    letter-spacing: 0.02em !important;
  }
  .koc-island-actions {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    flex-shrink: 0 !important;
  }
  .koc-login-btn {
    padding: 5px 10px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
    border-radius: 9999px !important;
  }
  .btn-text-portal, .btn-text-user, .btn-text-citizen {
    display: none !important;
  }
  .mobile-menu-btn {
    display: flex !important;
    padding: 6px 8px !important;
    background: #f1f5f9 !important;
    border-radius: 8px !important;
    border: 1px solid #e2e8f0 !important;
    cursor: pointer !important;
    flex-direction: column !important;
    gap: 3.5px !important;
    min-width: 32px !important;
    justify-content: center !important;
    align-items: center !important;
  }
  .mobile-menu-btn span {
    display: block !important;
    width: 16px !important;
    height: 2px !important;
    background: #0b1528 !important;
    border-radius: 2px !important;
  }
  .koc-bottom-dock {
    display: none !important;
  }
  .koc-mobile-drawer {
    top: 68px !important;
    left: 8px !important;
    right: 8px !important;
    padding: 16px !important;
    border-radius: 16px !important;
  }
}

/* Customer Portal Mobile Polish */
@media (max-width: 768px) {
  .topbar {
    padding: 10px 14px !important;
    gap: 8px !important;
  }
  .wallet-chip {
    padding: 5px 10px !important;
    font-size: 12.5px !important;
    white-space: nowrap !important;
  }
  .profile-chip {
    padding: 3px 6px !important;
    gap: 6px !important;
  }
  .profile-chip .pname {
    display: none !important;
  }
  .avatar {
    width: 28px !important;
    height: 28px !important;
    font-size: 12px !important;
    border-radius: 8px !important;
  }
  .content {
    padding: 16px 12px !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
  }
  .page-title {
    font-size: 19px !important;
    line-height: 1.25 !important;
  }
  .page-sub {
    font-size: 12.5px !important;
    line-height: 1.4 !important;
  }
  .portal-hero, .customer-hero, .citizen-hero {
    padding: 18px 14px !important;
    border-radius: 16px !important;
    gap: 12px !important;
  }
  .hero-user {
    gap: 12px !important;
    width: 100% !important;
  }
  .hero-avatar {
    width: 44px !important;
    height: 44px !important;
    font-size: 18px !important;
    flex-shrink: 0 !important;
  }
  .hero-info {
    min-width: 0 !important;
    flex: 1 !important;
  }
  .hero-info h2 {
    font-size: 16.5px !important;
    line-height: 1.25 !important;
    word-break: break-word !important;
  }
  .hero-badges {
    gap: 6px !important;
    margin-top: 6px !important;
  }
  .hero-badge {
    font-size: 11px !important;
    padding: 3px 7px !important;
  }
  .card {
    padding: 16px 14px !important;
    border-radius: 14px !important;
  }
  .wallet-action-row {
    flex-direction: column !important;
    gap: 10px !important;
  }
  .wallet-action-row input, .wallet-action-row .input {
    max-width: 100% !important;
    width: 100% !important;
  }
  .wallet-action-row button, .wallet-action-row .btn {
    width: 100% !important;
  }
  .wallet-chips {
    gap: 6px !important;
    flex-wrap: wrap !important;
  }
  .w-chip {
    padding: 6px 10px !important;
    font-size: 12px !important;
  }
  .delivery-stats-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }
  .delivery-stats-grid > div {
    padding: 12px 6px !important;
  }
  .delivery-stats-grid small {
    font-size: 11px !important;
    line-height: 1.2 !important;
  }
  .docs-top-bar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
  }
  .docs-top-bar .btn-request-new {
    width: 100% !important;
    text-align: center !important;
    justify-content: center !important;
  }
  .doc-card {
    padding: 14px 12px !important;
    border-radius: 14px !important;
    gap: 12px !important;
  }
  .doc-actions {
    flex-direction: column !important;
    width: 100% !important;
    gap: 8px !important;
  }
  .doc-actions a, .doc-actions button {
    width: 100% !important;
    justify-content: center !important;
  }
}

/* Admin Panel Mobile Polish */
@media (max-width: 768px) {
  .adm-top {
    padding: 10px 14px !important;
    justify-content: space-between !important;
  }
  .adm-top b {
    font-size: 14px !important;
  }
  .adm-user {
    display: none !important;
  }
  .adm-content {
    padding: 16px 12px !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
  }
  .adm-stat-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
  }
  .adm-stat-card {
    padding: 12px 10px !important;
    gap: 10px !important;
  }
  .adm-stat-icon {
    width: 36px !important;
    height: 36px !important;
    font-size: 18px !important;
  }
  .adm-stat-val {
    font-size: 18px !important;
  }
  .adm-stat-lbl {
    font-size: 11px !important;
  }
  #filter-bar, .filter-bar-responsive {
    flex-direction: column !important;
    gap: 8px !important;
  }
  #filter-bar input, #filter-bar select, #filter-bar button,
  .filter-bar-responsive input, .filter-bar-responsive select, .filter-bar-responsive button {
    max-width: 100% !important;
    width: 100% !important;
  }
}

/* Universal Smooth Table Scroll */
.table-wrap {
  width: 100% !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
  border-radius: 12px !important;
}
.table-wrap::-webkit-scrollbar {
  height: 5px;
}
.table-wrap::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}


/* ==========================================================================
   SUPER MOBILE FLEXBOX & OVERFLOW SHIELD (GUARANTEED NO HORIZONTAL BLOWOUT)
   ========================================================================== */
html, body {
  overflow-x: hidden !important;
  max-width: 100vw !important;
  width: 100% !important;
  position: relative !important;
}

*, *::before, *::after {
  box-sizing: border-box !important;
}

.shell, .adm-shell {
  min-width: 0 !important;
  max-width: 100vw !important;
  width: 100% !important;
  overflow-x: hidden !important;
}

.main, .adm-main {
  min-width: 0 !important;
  max-width: 100vw !important;
  width: 100% !important;
  overflow-x: hidden !important;
}

.content, .adm-content, #page {
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.card {
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

.table-wrap {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
  display: block !important;
  box-sizing: border-box !important;
}

.table-wrap table, .table-wrap .tbl {
  min-width: 600px !important;
}

@media (max-width: 768px) {
  body:has(.koc-island-nav), body.public-page {
    padding-top: 68px !important;
  }
  body:has(.shell), body:has(.adm-main), body.portal-body, body.admin-body, .shell, .main, .adm-main {
    padding-top: 0 !important;
    margin-top: 0 !important;
  }
  .topbar, .adm-top {
    padding: 8px 12px !important;
    gap: 8px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .topbar .wallet-chip {
    padding: 5px 8px !important;
    font-size: 12px !important;
    white-space: nowrap !important;
  }
  .topbar .profile-chip {
    padding: 2px 4px !important;
    gap: 4px !important;
  }
  .topbar .profile-chip .pname {
    display: none !important;
  }
  .topbar .avatar {
    width: 28px !important;
    height: 28px !important;
    font-size: 12px !important;
  }
  .content, .adm-content {
    padding: 14px 10px !important;
  }
  .btn-text-portal, .btn-text-user, .btn-text-citizen {
    display: none !important;
  }
  .hide-mobile-word {
    display: none !important;
  }
  .koc-island-nav {
    top: 8px !important;
    left: 8px !important;
    right: 8px !important;
    width: auto !important;
    max-width: calc(100% - 16px) !important;
    transform: none !important;
    padding: 6px 10px !important;
    border-radius: 16px !important;
    box-sizing: border-box !important;
  }
  .koc-nav-pills {
    display: none !important;
  }
  .koc-phone-link {
    display: none !important;
  }
  .koc-logo img {
    width: 32px !important;
    height: 32px !important;
  }
  .koc-logo-text {
    font-size: 13px !important;
    line-height: 1.15 !important;
  }
  .koc-logo-text span {
    font-size: 9px !important;
  }
  .koc-island-actions {
    gap: 6px !important;
  }
  .koc-login-btn {
    padding: 5px 9px !important;
    font-size: 11.5px !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
  }
  .mobile-menu-btn {
    display: flex !important;
    padding: 6px 8px !important;
  }
}

/* Mobile Responsive Enhancements for Subpages */
@media (max-width: 640px) {
  .svc-row {
    flex-wrap: wrap !important;
    gap: 8px !important;
    padding: 12px 4px !important;
  }
  .svc-row .info {
    flex: 1 1 100% !important;
    width: 100% !important;
    margin-bottom: 4px !important;
  }
  .svc-row > a.btn {
    font-size: 12px !important;
    padding: 6px 12px !important;
  }
  .auth-wrap, .login-wrap {
    padding: 16px 12px !important;
    align-items: flex-start !important;
    padding-top: 24px !important;
  }
  .auth-card, .login-card {
    padding: 26px 18px !important;
    border-radius: 20px !important;
    box-shadow: 0 10px 25px -5px rgba(15, 39, 68, 0.08) !important;
  }
  .auth-brand .logo {
    font-size: 20px !important;
  }
}

/* ==========================================================================
   FLOATING ISLAND HEADER WITH GLOWING ANIMATED BORDER
   ========================================================================== */
.koc-island-nav {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 1220px;
  z-index: 1000;
  border-radius: 9999px;
  padding: 2px !important;
  background: linear-gradient(115deg, #1e40af 0%, #3b82f6 20%, #d4af37 40%, #10b981 60%, #3b82f6 80%, #1e40af 100%) !important;
  background-size: 300% 300% !important;
  animation: islandGlowFlow 8s linear infinite !important;
  box-shadow: 0 10px 32px -5px rgba(30, 64, 175, 0.22), 0 0 20px rgba(59, 130, 246, 0.35) !important;
  box-sizing: border-box !important;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes islandGlowFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.koc-island-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(255, 255, 255, 0.94) !important;
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-radius: 9999px !important;
  padding: 7px 18px 7px 14px !important;
  width: 100%;
  box-sizing: border-box !important;
}

@media (min-width: 769px) and (max-width: 1040px) {
  .koc-phone-link {
    display: none !important;
  }
  .koc-nav-pills {
    gap: 2px !important;
    padding: 3px 5px !important;
  }
  .koc-nav-pills a {
    padding: 5px 8px !important;
    font-size: 12px !important;
  }
}

@media (max-width: 768px) {
  .koc-island-nav {
    top: 8px !important;
    left: 8px !important;
    right: 8px !important;
    width: auto !important;
    max-width: calc(100% - 16px) !important;
    transform: none !important;
    padding: 1.5px !important;
    border-radius: 18px !important;
    box-sizing: border-box !important;
    box-shadow: 0 6px 20px -3px rgba(30, 64, 175, 0.2), 0 0 14px rgba(59, 130, 246, 0.28) !important;
  }
  .koc-island-inner {
    border-radius: 17px !important;
    padding: 6px 10px !important;
    gap: 8px !important;
  }
}

/* ==========================================================================
   PORTAL & ADMIN DASHBOARD HEADER FLUSH TOP RESETS (ZERO WHITE SPACE)
   ========================================================================== */
body:has(.shell),
body:has(.adm-main),
body.portal-body,
body.admin-body {
  margin-top: 0 !important;
  padding-top: 0 !important;
}
.shell,
.adm-main,
.main {
  margin-top: 0 !important;
  padding-top: 0 !important;
}
.topbar,
.adm-top {
  margin-top: 0 !important;
  top: 0 !important;
}
