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

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

:root {
  --green-dark: #052e16;
  --green-mid: #14532d;
  --green-bright: #16a34a;
  --green-light: #4ade80;
  --accent: #f59e0b;
  --accent2: #ef4444;
  --bg: #f0fdf4;
  --white: #ffffff;
  --text: #0f1f14;
  --muted: #5a7065;
  --border: #bbf7d0;
  --sidebar-w: 240px;
  --shadow: 0 1px 3px rgba(5, 46, 22, 0.06), 0 4px 16px rgba(5, 46, 22, 0.08);
  --shadow-lg: 0 8px 32px rgba(5, 46, 22, 0.12), 0 2px 8px rgba(5, 46, 22, 0.06);
  --radius: 14px;
  --radius-sm: 9px;
  --radius-lg: 20px;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.brand-stack {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.15;
}

.brand-name {
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.3px;
}

.brand-powered {
  font-size: 10px;
  opacity: 0.65;
  letter-spacing: 0.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-powered-accent {
  font-weight: 700;
  opacity: 1;
}

/* ===== SCREEN SYSTEM ===== */
.screen {
  display: none !important;
}

.screen.active {
  display: block !important;
}

/* ===== LOADER ===== */
#loader {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, var(--green-dark) 0%, #0d3320 50%, #052e16 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  color: white;
  gap: 20px;
}

#loader::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(22, 163, 74, 0.18) 0%, transparent 70%);
  animation: loaderPulse 3s ease-in-out infinite;
}

@keyframes loaderPulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 0.6;
  }

  50% {
    transform: scale(1.15);
    opacity: 1;
  }
}

#loader .logo {
  font-size: 52px;
  filter: drop-shadow(0 0 24px rgba(74, 222, 128, 0.4));
  position: relative;
  z-index: 1;
}

#loader h1 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
  position: relative;
  z-index: 1;
}

#loader .brand-powered {
  opacity: 0.65;
  color: rgba(187, 247, 208, 0.9);
  position: relative;
  z-index: 1;
}

#loader p {
  font-size: 13px;
  opacity: 0.5;
  position: relative;
  z-index: 1;
  letter-spacing: 0.5px;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(255, 255, 255, 0.15);
  border-top-color: rgba(74, 222, 128, 0.9);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
  position: relative;
  z-index: 1;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ===== GLOBAL BUSY OVERLAY ===== */
#busyOverlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(5, 46, 22, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9998;
  padding: 18px;
}

#busyOverlay.open {
  display: flex;
}

.busy-card {
  width: 100%;
  max-width: 400px;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(187, 247, 208, 0.8);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 64px rgba(5, 46, 22, 0.22);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.busy-spin {
  width: 38px;
  height: 38px;
  border: 3px solid rgba(22, 163, 74, 0.15);
  border-top-color: var(--green-bright);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
  flex: 0 0 auto;
}

.busy-ttl {
  font-size: 14px;
  font-weight: 700;
  color: var(--green-dark);
  margin-bottom: 3px;
  letter-spacing: -0.2px;
}

.busy-sub {
  font-size: 12px;
  color: var(--muted);
}

/* ===== LEDGER ===== */
.ledger-sum {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.ledger-sum .ls-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  background: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: var(--shadow);
}

.ledger-sum .ls-lbl {
  font-size: 10px;
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  margin-bottom: 5px;
}

.ledger-sum .ls-val {
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.3px;
}

.ledger-sum .ls-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  font-size: 15px;
}

@media(max-width:640px) {
  .ledger-sum {
    grid-template-columns: 1fr;
  }
}

/* ===== LOGIN SCREEN ===== */
#loginScreen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(ellipse 900px 700px at 15% 15%, rgba(22, 163, 74, 0.12) 0%, transparent 65%),
    radial-gradient(ellipse 700px 500px at 85% 80%, rgba(245, 158, 11, 0.08) 0%, transparent 65%),
    linear-gradient(160deg, #e8f5ea 0%, #f0fdf4 50%, #ecfdf5 100%);
  background-attachment: fixed;
}

#loginScreen.active {
  display: flex !important;
}

.login-shell {
  width: 100%;
  max-width: 440px;
}

#loginBox {
  --loginA: var(--green-dark);
  --loginB: var(--green-bright);
  --loginRing: rgba(22, 163, 74, 0.2);
  --loginSoft: rgba(22, 163, 74, 0.12);
  width: 100%;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 32px 80px rgba(5, 46, 22, 0.16), 0 4px 16px rgba(5, 46, 22, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

#loginBox.mode-admin {
  --loginA: #052e16;
  --loginB: #16a34a;
  --loginRing: rgba(22, 163, 74, 0.22);
  --loginSoft: rgba(22, 163, 74, 0.12);
}

#loginBox.mode-client {
  --loginA: #1e3a8a;
  --loginB: #0284c7;
  --loginRing: rgba(2, 132, 199, 0.22);
  --loginSoft: rgba(30, 58, 138, 0.10);
}

.login-hero {
  position: relative;
  padding: 44px 36px 34px;
  color: #fff;
  background: linear-gradient(140deg, var(--loginA) 0%, var(--loginB) 100%);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  overflow: hidden;
}

.login-hero::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -20%;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  pointer-events: none;
}

.login-hero::after {
  content: '';
  position: absolute;
  bottom: -30px;
  left: 0;
  right: 0;
  height: 60px;
  background: rgba(255, 255, 255, 0.92);
  filter: blur(16px);
  border-radius: 50%;
  transform: scaleX(1.2);
}

.login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  position: relative;
  z-index: 2;
}

.login-brand-icon {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.18);
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(12px);
}

.login-logo-sub {
  font-size: 11px;
  opacity: 0.8;
  letter-spacing: 0.8px;
  margin-top: 4px;
}

.login-hero-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.6px;
  line-height: 1.2;
  position: relative;
  z-index: 2;
}

.login-hero-sub {
  font-size: 13px;
  opacity: 0.85;
  line-height: 1.6;
  max-width: 300px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
  font-weight: 500;
}

.login-card {
  padding: 0 32px 38px;
  background: transparent;
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.tab-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px;
  border-radius: 18px;
  position: relative;
  margin-top: -22px;
  z-index: 10;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.08);
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.tab-btn {
  flex: 1;
  padding: 11px 16px;
  border: none;
  background: transparent;
  border-radius: 14px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  letter-spacing: -0.1px;
}

.tab-btn:hover {
  color: var(--text);
  background: var(--bg);
}

.tab-btn.active {
  background: linear-gradient(135deg, var(--loginA), var(--loginB));
  color: #fff;
  box-shadow: 0 6px 18px var(--loginSoft);
}

.lform {
  display: none;
  animation: formFadeIn 0.35s ease forwards;
}

@keyframes formFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.lform.active {
  display: block;
}

.fgroup {
  margin-bottom: 18px;
}

.fgroup label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.9px;
}

.inp-wrap {
  position: relative;
}

.inp-wrap i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 14px;
  transition: color 0.25s ease;
  pointer-events: none;
}

.inp-wrap input {
  width: 100%;
  padding: 14px 14px 14px 46px;
  border: 1.5px solid #e2e8e5;
  border-radius: 14px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  background: rgba(240, 253, 244, 0.5);
  outline: none;
  transition: all 0.25s ease;
}

.inp-wrap input::placeholder {
  color: #94a3b8;
  font-weight: 400;
}

.inp-wrap input:focus {
  background: #fff;
  border-color: var(--loginB, var(--green-bright));
  box-shadow: 0 0 0 4px var(--loginRing);
}

.inp-wrap:focus-within i {
  color: var(--loginB, var(--green-bright));
}

.btn-login {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, var(--loginA), var(--loginB));
  color: white;
  border: none;
  border-radius: 14px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
  box-shadow: 0 8px 24px var(--loginSoft);
  letter-spacing: -0.2px;
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px var(--loginRing);
  filter: brightness(1.06);
}

.btn-login:active {
  transform: translateY(0);
}

.btn-login:disabled {
  opacity: 0.55;
  transform: none;
  cursor: not-allowed;
  box-shadow: none;
}

.err-box {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13px;
  margin-top: 12px;
  display: none;
  font-weight: 600;
  animation: errShake 0.4s ease;
  align-items: center;
  gap: 8px;
}

@keyframes errShake {

  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-4px);
  }

  75% {
    transform: translateX(4px);
  }
}

/* ===== ADMIN LAYOUT ===== */
#adminScreen {
  display: none;
  min-height: 100vh;
}

#adminScreen.active {
  display: flex !important;
  flex-direction: row;
}

.sidebar {
  width: var(--sidebar-w);
  background: linear-gradient(180deg, #052e16 0%, #061f10 100%);
  color: white;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
  overflow-x: hidden;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  scrollbar-width: none;
}

.sidebar::-webkit-scrollbar {
  display: none;
}

.sb-logo {
  padding: 20px 16px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sb-logo>div {
  min-width: 0;
}

.sb-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--green-bright), #22c55e);
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex: 0 0 auto;
  box-shadow: 0 4px 14px rgba(22, 163, 74, 0.4);
}

.sb-text {
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.3px;
}

.sb-sub {
  font-size: 10px;
  opacity: 0.4;
  letter-spacing: 0.8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.nav-sec {
  padding: 16px 16px 6px;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1.8px;
  opacity: 0.35;
  font-weight: 700;
}

.nav-a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  margin: 1px 10px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.65);
  transition: all 0.2s ease;
  user-select: none;
  letter-spacing: -0.1px;
}

.nav-a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.95);
}

.nav-a.active {
  background: linear-gradient(135deg, rgba(22, 163, 74, 0.28) 0%, rgba(22, 163, 74, 0.16) 100%);
  color: #4ade80;
  font-weight: 700;
  border: 1px solid rgba(74, 222, 128, 0.18);
}

.nav-a i {
  width: 16px;
  text-align: center;
  font-size: 12px;
  opacity: 0.85;
}

.nav-badge {
  margin-left: auto;
  background: var(--accent);
  color: white;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 20px;
  letter-spacing: 0.3px;
}

.sb-foot {
  margin-top: auto;
  padding: 14px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 10px;
  opacity: 0.35;
  letter-spacing: 0.3px;
}

.admin-main {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(187, 247, 208, 0.5);
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 12px rgba(5, 46, 22, 0.06);
}

.menu-tog {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 20px;
  color: var(--text);
  padding: 4px;
}

.page-ttl {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: var(--green-dark);
}

.admin-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border: 1px solid #bbf7d0;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: var(--green-dark);
}

.credit-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, #eef2ff, #eff6ff);
  border: 1px solid #c7d2fe;
  color: #1e40af;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: -0.1px;
  box-shadow: 0 4px 14px rgba(30, 64, 175, 0.08);
  white-space: nowrap;
}

.credit-chip i {
  font-size: 11px;
}

.credit-chip-lbl {
  font-size: 10px;
  font-weight: 700;
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.credit-chip-val {
  font-size: 13px;
  font-weight: 800;
  color: inherit;
}

.credit-chip--dark {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

@media(max-width:420px) {
  #cCreditChipMobile {
    padding: 6px 10px;
    gap: 6px;
  }

  #cCreditChipMobile .credit-chip-lbl {
    display: none;
  }
}

.admin-dot {
  width: 7px;
  height: 7px;
  background: var(--green-light);
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(74, 222, 128, 0.8);
  animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

.btn-logout {
  padding: 7px 14px;
  background: white;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  color: var(--muted);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-logout:hover {
  border-color: var(--accent2);
  color: var(--accent2);
  background: #fef2f2;
}

.acontent {
  padding: 24px;
  flex: 1;
}

.apage {
  display: none;
}

.apage.active {
  display: block;
}

/* ===== CLIENT LAYOUT ===== */
#clientScreen {
  display: none;
}

#clientScreen.active {
  display: block !important;
}

.client-shell {
  min-height: 100vh;
}

#clientScreen .c-sidebar {
  display: none;
}

#clientScreen .c-desktop-topbar {
  display: none;
}

#clientScreen .client-main {
  margin-left: 0;
}

@media(min-width:901px) {
  #clientScreen .client-shell {
    display: flex;
  }

  #clientScreen .c-sidebar {
    display: flex;
  }

  #clientScreen .c-topnav,
  #clientScreen .bottom-nav {
    display: none;
  }

  #clientScreen .c-desktop-topbar {
    display: flex;
  }

  #clientScreen .c-content {
    max-width: none;
    margin: 0;
    padding: 24px;
    padding-bottom: 24px;
    flex: 1;
  }

  #clientScreen .client-main {
    margin-left: var(--sidebar-w);
  }
}

.c-topnav {
  background: linear-gradient(135deg, var(--green-dark), #0d3320);
  color: white;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(5, 46, 22, 0.3);
}

.c-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 800;
  min-width: 0;
}

.c-topnav .brand-name {
  color: white;
}

.c-topnav .brand-powered {
  color: rgba(187, 247, 208, 0.75);
  font-size: 10px;
}

.c-topnav .brand-stack {
  max-width: 200px;
}

.c-content {
  padding: 16px;
  padding-bottom: 80px;
  max-width: 540px;
  margin: 0 auto;
}

@media(max-width:900px) {
  .c-content {
    max-width: none;
    margin: 0;
    width: 100%;
  }
}

.c-page {
  display: none;
}

.c-page.active {
  display: block;
}

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(187, 247, 208, 0.6);
  display: flex;
  z-index: 100;
  box-shadow: 0 -4px 20px rgba(5, 46, 22, 0.08);
  padding: 4px 8px;
  gap: 4px;
}

.bn-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 4px;
  cursor: pointer;
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
  transition: all 0.2s ease;
  border: none;
  background: none;
  font-family: inherit;
  border-radius: 10px;
  letter-spacing: 0.2px;
  text-transform: uppercase;
}

.bn-item i {
  font-size: 18px;
  margin-bottom: 3px;
}

.bn-item.active {
  color: var(--green-bright);
  background: rgba(22, 163, 74, 0.08);
}

/* ===== SHARED COMPONENTS ===== */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(187, 247, 208, 0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.stat-icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  margin-bottom: 12px;
}

.s-green .stat-icon {
  background: linear-gradient(135deg, #dcfce7, #bbf7d0);
  color: var(--green-mid);
}

.s-orange .stat-icon {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #92400e;
}

.s-red .stat-icon {
  background: linear-gradient(135deg, #fee2e2, #fecaca);
  color: #9b1c1c;
}

.s-blue .stat-icon {
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
  color: #1e40af;
}

.stat-val {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 4px;
  letter-spacing: -0.8px;
  color: var(--text);
}

.stat-lbl {
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0.2px;
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  border: 1px solid rgba(187, 247, 208, 0.3);
}

.card-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 10px;
  flex-wrap: wrap;
}

.card-ttl {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.2px;
}

.card-acts {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.tbl-wrap {
  overflow-x: auto;
  border-radius: var(--radius-sm);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th {
  text-align: left;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--muted);
  padding: 10px 12px;
  border-bottom: 1.5px solid var(--border);
  background: rgba(240, 253, 244, 0.6);
}

th:first-child {
  border-radius: 8px 0 0 0;
}

th:last-child {
  border-radius: 0 8px 0 0;
}

td {
  padding: 12px;
  border-bottom: 1px solid rgba(187, 247, 208, 0.4);
  font-size: 13px;
  vertical-align: middle;
}

tr:last-child td {
  border-bottom: none;
}

tbody tr:hover td {
  background: rgba(240, 253, 244, 0.8);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.bg {
  background: #dcfce7;
  color: #14532d;
}

.bo {
  background: #fef3c7;
  color: #92400e;
}

.br {
  background: #fee2e2;
  color: #9b1c1c;
}

.bb {
  background: #dbeafe;
  color: #1e3a8a;
}

.bgr {
  background: #f4f4f5;
  color: #52525b;
}

.btn {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  letter-spacing: -0.1px;
}

.btn-p {
  background: linear-gradient(135deg, var(--green-mid), var(--green-bright));
  color: white;
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.25);
}

.btn-p:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(22, 163, 74, 0.32);
}

.btn-s {
  background: white;
  color: var(--text);
  border: 1.5px solid var(--border);
}

.btn-s:hover {
  border-color: var(--green-bright);
  color: var(--green-bright);
  background: #f0fdf4;
}

.btn-sm {
  padding: 5px 10px;
  font-size: 11px;
}

.btn-ico {
  padding: 7px;
  border-radius: 8px;
}

.btn-full {
  width: 100%;
  justify-content: center;
  padding: 13px;
}

.search-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
  background: #f8fdf9;
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  border: 1.5px solid var(--border);
  transition: all 0.2s ease;
}

.search-wrap:focus-within {
  border-color: var(--green-bright);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
  background: white;
}

.search-wrap i {
  color: var(--muted);
  font-size: 12px;
}

.search-wrap input {
  border: none;
  background: none;
  outline: none;
  font-family: inherit;
  font-size: 13px;
  color: var(--text);
  width: 140px;
}

.pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 4px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted);
}

.pager .pager-btns {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.pager .pager-btns .btn {
  padding: 6px 12px;
  font-size: 12px;
}

/* ==== MODAL ==== */
.modal-ov {
  position: fixed;
  inset: 0;
  background: rgba(5, 46, 22, 0.5);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 16px;
}

.modal-ov.open {
  display: flex;
}

.modal {
  background: var(--white);
  border-radius: 22px;
  padding: 28px;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.22), 0 8px 32px rgba(5, 46, 22, 0.12);
  animation: mup 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid rgba(255, 255, 255, 0.8);
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.modal::-webkit-scrollbar {
  width: 4px;
}

.modal::-webkit-scrollbar-track {
  background: transparent;
}

.modal::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

.modal-lg {
  max-width: 700px;
}

.modal-bot {
  border-radius: 24px 24px 0 0;
  align-self: flex-end;
  width: 100%;
  max-width: 540px;
  max-height: 92vh;
}

@keyframes mup {
  from {
    transform: translateY(20px) scale(0.98);
    opacity: 0;
  }

  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

/* ==== FORGOT PASSWORD RESET FLOW ==== */
.forgot-link-container {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.forgot-pwd-link {
  font-size: 13px;
  color: var(--green-bright);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.forgot-pwd-link:hover {
  color: var(--green-dark);
  text-decoration: underline;
}

.reset-step {
  display: none;
}

.reset-step.active {
  display: block;
}

.reset-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 20px;
}

.otp-container {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 15px 0;
}

.otp-input {
  width: 45px;
  height: 48px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  text-align: center;
  font-size: 20px;
  font-weight: bold;
  color: var(--text);
  outline: none;
  transition: all 0.2s ease;
  background: #f8fdf9;
}

.otp-input:focus {
  border-color: var(--green-bright);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(26, 71, 42, 0.1);
}

.otp-input::-webkit-outer-spin-button,
.otp-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.m-hdr {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.m-ttl {
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.4px;
}

.m-close {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 9px;
  width: 34px;
  height: 34px;
  cursor: pointer;
  font-size: 18px;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.m-close:hover {
  background: #fee2e2;
  border-color: #fecaca;
  color: var(--accent2);
}

.m-handle {
  width: 40px;
  height: 4px;
  background: var(--border);
  border-radius: 4px;
  margin: 0 auto 18px;
}

.frow {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.frow.one {
  grid-template-columns: 1fr;
}

.fg label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.fg input,
.fg select,
.fg textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid #e2e8e5;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 13px;
  color: var(--text);
  background: #fafcfb;
  outline: none;
  transition: all 0.2s ease;
  font-weight: 500;
}

.fg input:focus,
.fg select:focus,
.fg textarea:focus {
  border-color: var(--green-bright);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.12);
  background: white;
}

.fg textarea {
  resize: vertical;
  min-height: 64px;
}

/* DEMAND */
.demand-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px;
  background: linear-gradient(135deg, #f8fdf9, #f0fdf4);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  border: 1px solid rgba(187, 247, 208, 0.5);
  transition: all 0.2s;
}

.demand-item:hover {
  border-color: var(--green-bright);
  transform: translateX(2px);
}

.demand-name {
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.2px;
}

.demand-qty {
  font-size: 22px;
  font-weight: 900;
  color: var(--green-bright);
  letter-spacing: -0.5px;
}

/* CLIENT ORDER */
.item-card {
  background: white;
  border-radius: var(--radius-sm);
  padding: 13px;
  margin-bottom: 9px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1.5px solid rgba(187, 247, 208, 0.4);
  transition: all 0.2s ease;
  box-shadow: 0 1px 4px rgba(5, 46, 22, 0.04);
}

.item-card.in-cart {
  border-color: var(--green-bright);
  background: linear-gradient(135deg, #f0fdf4, #ffffff);
  box-shadow: 0 4px 16px rgba(22, 163, 74, 0.12);
}

.item-emoji {
  font-size: 26px;
  width: 38px;
  text-align: center;
}

.item-info {
  flex: 1;
}

.item-name {
  font-weight: 700;
  font-size: 13px;
  color: var(--text);
  letter-spacing: -0.2px;
}

.item-price {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.qty-ctrl {
  display: flex;
  align-items: center;
  gap: 7px;
}

.qty-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--green-mid), var(--green-bright));
  color: white;
  transition: all 0.15s ease;
  box-shadow: 0 2px 8px rgba(22, 163, 74, 0.25);
}

.qty-btn:active {
  transform: scale(0.88);
}

.qty-inp {
  width: 46px;
  text-align: center;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 5px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  outline: none;
  background: white;
}

.qty-inp:focus {
  border-color: var(--green-bright);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}

.cart-bar {
  position: fixed;
  bottom: 68px;
  left: 10px;
  right: 10px;
  max-width: 520px;
  margin: 0 auto;
  background: linear-gradient(135deg, var(--green-dark), #0d3320);
  color: white;
  padding: 14px 20px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 8px 32px rgba(5, 46, 22, 0.4);
  z-index: 50;
  animation: mup 0.25s ease;
  border: 1px solid rgba(74, 222, 128, 0.15);
}

.cart-bar.hidden {
  display: none;
}

.btn-place {
  background: linear-gradient(135deg, var(--accent), #d97706);
  color: white;
  border: none;
  border-radius: 11px;
  padding: 10px 18px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
  transition: all 0.2s;
  letter-spacing: -0.1px;
}

.btn-place:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

/* CLIENT CARDS */
.balance-card {
  background: linear-gradient(135deg, var(--green-dark) 0%, #0d3320 50%, #14532d 100%);
  color: white;
  border-radius: 20px;
  padding: 24px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(5, 46, 22, 0.3);
}

.balance-card::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -10%;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
}

.balance-card::after {
  content: '';
  position: absolute;
  bottom: -40%;
  left: -5%;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: rgba(74, 222, 128, 0.08);
}

.bal-lbl {
  font-size: 11px;
  opacity: 0.65;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-weight: 600;
  position: relative;
  z-index: 1;
}

.bal-amt {
  font-size: 38px;
  font-weight: 900;
  margin: 6px 0 4px;
  letter-spacing: -1.5px;
  position: relative;
  z-index: 1;
}

.bal-sub {
  font-size: 11px;
  opacity: 0.5;
  position: relative;
  z-index: 1;
}

.mini-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.mini-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(187, 247, 208, 0.3);
  transition: transform 0.2s ease;
}

.mini-card:hover {
  transform: translateY(-1px);
}

.mini-icon {
  width: 34px;
  height: 34px;
  border-radius: 99px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  margin-bottom: 9px;
}

.mini-val {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

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

.order-row {
  padding: 13px;
  border-bottom: 1px solid rgba(187, 247, 208, 0.4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: background 0.15s ease;
}

.order-row:last-child {
  border-bottom: none;
}

.order-row:hover {
  background: rgba(240, 253, 244, 0.8);
}

.order-id {
  font-weight: 700;
  font-size: 13px;
  color: var(--green-bright);
  letter-spacing: -0.2px;
}

.order-dt {
  font-size: 11px;
  color: var(--muted);
}

.ledger-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  border-bottom: 1px solid rgba(187, 247, 208, 0.4);
  font-size: 13px;
}

.ledger-entry:last-child {
  border-bottom: none;
}

.le-d {
  color: var(--accent2);
  font-weight: 700;
}

.le-c {
  color: var(--green-bright);
  font-weight: 700;
}

/* TOAST */
.toast {
  position: fixed;
  bottom: 88px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  background: linear-gradient(135deg, var(--green-dark), #0d3320);
  color: white;
  padding: 12px 20px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 600;
  display: none;
  white-space: nowrap;
  box-shadow: 0 8px 28px rgba(5, 46, 22, 0.3);
  pointer-events: none;
  border: 1px solid rgba(74, 222, 128, 0.15);
  letter-spacing: -0.1px;
}

.toast.show {
  display: block;
  animation: tin 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes tin {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.empty {
  text-align: center;
  padding: 40px 32px;
  color: var(--muted);
}

.empty i {
  font-size: 36px;
  opacity: 0.2;
  display: block;
  margin-bottom: 12px;
}

/* RESPONSIVE */
@media(max-width:900px) {
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media(max-width:640px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .admin-main {
    margin-left: 0;
  }

  .menu-tog {
    display: flex;
  }

  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .frow {
    grid-template-columns: 1fr;
  }

  .topbar .admin-chip {
    display: none;
  }

  .acontent {
    padding: 16px;
  }
}

.odi-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: rgba(240, 253, 244, 0.7);
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
  font-size: 13px;
  border: 1px solid rgba(187, 247, 208, 0.4);
}

.inv-row {
  padding: 13px;
  border-bottom: 1px solid rgba(187, 247, 208, 0.4);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.inv-row:last-child {
  border-bottom: none;
}

/* ===== SITES ===== */
.site-card {
  background: white;
  border: 1.5px solid rgba(187, 247, 208, 0.5);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 9px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  transition: all 0.2s ease;
  box-shadow: 0 1px 4px rgba(5, 46, 22, 0.04);
}

.site-card:hover {
  border-color: var(--green-bright);
  box-shadow: 0 4px 16px rgba(22, 163, 74, 0.1);
}

.site-card.selected {
  border-color: var(--green-bright);
  background: linear-gradient(135deg, #f0fdf4, #ffffff);
  box-shadow: 0 4px 16px rgba(22, 163, 74, 0.12);
}

.site-card-icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--green-mid), var(--green-bright));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex: 0 0 auto;
  color: white;
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3);
}

.site-card-info {
  flex: 1;
  min-width: 0;
}

.site-card-name {
  font-weight: 700;
  font-size: 13px;
  color: var(--text);
  margin-bottom: 3px;
  letter-spacing: -0.2px;
}

.site-card-addr {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
}

.site-card-contact {
  font-size: 11px;
  color: var(--green-bright);
  font-weight: 600;
  margin-top: 4px;
}

.site-required-banner {
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  border: 1.5px solid #f59e0b;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 700;
  color: #78350f;
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 16px;
}

/* ===== SUBSCRIPTION NOTIFICATION BANNER ===== */
#subBanner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10001;
  transform: translateY(-110%);
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}

#subBanner.visible {
  transform: translateY(0);
  pointer-events: all;
}

.sub-banner-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px 12px 22px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

.sub-banner-inner::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.06;
  background: repeating-linear-gradient(-55deg,
      rgba(255, 255, 255, 0.4) 0px,
      rgba(255, 255, 255, 0.4) 1px,
      transparent 1px,
      transparent 12px);
  pointer-events: none;
}

#subBanner.sub-expired .sub-banner-inner {
  background: linear-gradient(135deg, #7f1d1d 0%, #991b1b 40%, #b91c1c 100%);
}

#subBanner.sub-warning .sub-banner-inner {
  background: linear-gradient(135deg, #78350f 0%, #92400e 40%, #b45309 100%);
}

#subBanner.sub-info .sub-banner-inner {
  background: linear-gradient(135deg, #1e1b4b 0%, #1e3a8a 40%, #1d4ed8 100%);
}

.sub-banner-icon {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  backdrop-filter: blur(6px);
  animation: sub-pulse 2.2s ease-in-out infinite;
}

@keyframes sub-pulse {

  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.3);
  }

  50% {
    transform: scale(1.08);
    box-shadow: 0 0 0 6px rgba(255, 255, 255, 0);
  }
}

.sub-banner-body {
  flex: 1;
  min-width: 0;
  color: white;
}

.sub-banner-title {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.1px;
  line-height: 1.3;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sub-banner-badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 2px 7px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.9);
  flex: 0 0 auto;
  backdrop-filter: blur(4px);
}

.sub-banner-sub {
  font-size: 11px;
  opacity: 0.8;
  line-height: 1.4;
  font-weight: 500;
}

.sub-banner-cta {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sub-banner-upgrade {
  padding: 7px 14px;
  background: rgba(255, 255, 255, 0.2);
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  border-radius: 9px;
  color: white;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
  backdrop-filter: blur(4px);
  white-space: nowrap;
}

.sub-banner-upgrade:hover {
  background: rgba(255, 255, 255, 0.35);
  transform: translateY(-1px);
}

.sub-banner-dismiss {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: white;
  font-size: 18px;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  transition: all 0.2s;
  line-height: 1;
}

.sub-banner-dismiss:hover {
  background: rgba(255, 255, 255, 0.28);
}

#subBannerSpacer {
  height: 0;
  transition: height 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.sub-progress-wrap {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.sub-progress-track {
  height: 100%;
  background: rgba(255, 255, 255, 0.55);
  animation: sub-track 2.5s linear infinite;
}

@keyframes sub-track {
  0% {
    transform: scaleX(0);
    transform-origin: left;
  }

  50% {
    transform: scaleX(1);
    transform-origin: left;
  }

  50.01% {
    transform: scaleX(1);
    transform-origin: right;
  }

  100% {
    transform: scaleX(0);
    transform-origin: right;
  }
}

#offlineBanner {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--accent);
  color: var(--green-dark);
  padding: 10px 16px;
  text-align: center;
  font-weight: 700;
  font-size: 13px;
  z-index: 11000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* ===== E-COMMERCE CLIENT PORTAL SHOPPING EXPERIENCE ===== */
.ecom-store-banner {
  background: linear-gradient(135deg, #052e16 0%, #14532d 100%);
  color: white;
  border-radius: 16px;
  padding: 16px 20px;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 8px 24px rgba(5, 46, 22, 0.25);
  position: relative;
  overflow: hidden;
}

.ecom-store-banner::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -10%;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
}

.ecom-store-tag {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-weight: 800;
  color: #86efac;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ecom-store-title {
  font-size: 18px;
  font-weight: 900;
  color: #ffffff;
  margin-top: 2px;
  letter-spacing: -0.3px;
}

.ecom-items-badge {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  color: #bbf7d0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ecom-sec-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.ecom-sec-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.ecom-date-preview {
  font-size: 11px;
  font-weight: 700;
  color: var(--green-bright);
  background: #f0fdf4;
  padding: 4px 10px;
  border-radius: 12px;
  border: 1px solid #bbf7d0;
}

/* Site Radio Grid */
.site-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}

.site-radio-card-modern {
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #ffffff;
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.site-radio-card-modern:hover {
  border-color: #86efac;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.08);
}

.site-radio-card-modern.active {
  border-color: var(--green-bright);
  background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
  box-shadow: 0 4px 16px rgba(22, 163, 74, 0.15);
}

.site-icon-box {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #f1f5f9;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex: 0 0 auto;
  transition: all 0.2s;
}

.site-radio-card-modern.active .site-icon-box {
  background: var(--green-bright);
  color: white;
  box-shadow: 0 3px 10px rgba(22, 163, 74, 0.3);
}

/* Quick Date Chips */
.date-chips-wrap {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.date-chip {
  flex: 1;
  min-width: 100px;
  border: 1.5px solid var(--border);
  background: #f8fafc;
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.2s ease;
  font-family: inherit;
  text-align: left;
}

.date-chip:hover {
  border-color: #86efac;
  background: #ffffff;
}

.date-chip.active {
  border-color: var(--green-bright);
  background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
  box-shadow: 0 4px 14px rgba(22, 163, 74, 0.12);
}

.date-chip.active strong {
  color: var(--green-dark);
}

.date-chip strong {
  display: block;
  font-size: 12px;
  color: var(--text);
}

.date-chip small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 1px;
}

/* Catalog Grid & Cards */
.ecom-catalog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.ecom-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

@media (max-width: 480px) {
  .ecom-product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
}

.ecom-card {
  background: #ffffff;
  border: 1.5px solid rgba(226, 232, 240, 0.8);
  border-radius: 16px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.ecom-card:hover {
  border-color: #86efac;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.ecom-card.in-cart {
  border-color: var(--green-bright);
  background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 60%);
  box-shadow: 0 6px 20px rgba(22, 163, 74, 0.12);
}

.ecom-thumb-box {
  width: 100%;
  height: 95px;
  border-radius: 12px;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  position: relative;
  overflow: hidden;
}

.ecom-thumb-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

.ecom-emoji-avatar {
  font-size: 38px;
}

.ecom-item-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ecom-price-pill {
  display: inline-block;
  font-size: 12px;
  font-weight: 900;
  color: var(--green-dark);
  margin-bottom: 10px;
}

.ecom-unit-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
}

/* Modern Add / Qty Control */
.ecom-btn-add {
  width: 100%;
  padding: 8px 0;
  border: 1.5px solid var(--green-bright);
  background: #f0fdf4;
  color: var(--green-dark);
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.ecom-btn-add:hover {
  background: var(--green-bright);
  color: white;
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.25);
}

.ecom-qty-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, var(--green-mid), var(--green-bright));
  color: white;
  border-radius: 10px;
  padding: 3px;
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.25);
}

.ecom-qty-btn {
  width: 28px;
  height: 28px;
  border: none;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border-radius: 7px;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.ecom-qty-btn:active {
  transform: scale(0.85);
  background: rgba(255, 255, 255, 0.4);
}

.ecom-qty-num {
  font-size: 13px;
  font-weight: 900;
  padding: 0 8px;
}

.cart-icon-bubble {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.cart-badge-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--accent);
  color: white;
  font-size: 10px;
  font-weight: 900;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* ===== SUBSCRIPTION BANNER STYLES ===== */
#subBanner.sub-warning {
  background: linear-gradient(135deg, #78350f, #b45309) !important;
  border-bottom: 2px solid #f59e0b !important;
}
#subBanner.sub-expired {
  background: linear-gradient(135deg, #7f1d1d, #b91c1c) !important;
  border-bottom: 2px solid #ef4444 !important;
}
#subBanner.sub-info {
  background: linear-gradient(135deg, #064e3b, #047857) !important;
  border-bottom: 2px solid #10b981 !important;
}

