

/* ══════════════════════════════════════
   ROOT
══════════════════════════════════════ */
:root {
  --bg:           #f0faf6;
  --bg2:          #e4f5ee;
  --white:        #ffffff;
  --surface:      #ffffff;
  --surface2:     #f5fbf8;
  --sea:          #2ab08a;
  --sea-mid:      #3cc9a0;
  --sea-light:    #d0f2e8;
  --sea-xlight:   #eafaf4;
  --sea-deep:     #1a7a60;
  --sea-border:   #b2e6d4;
  --text-h:       #0f2d22;
  --text-p:       #3d6657;
  --text-muted:   #8ab5a4;
  --border:       #d8efe6;
  --shadow-card:  0 4px 24px rgba(42,176,138,.10), 0 1px 4px rgba(0,0,0,.04);
  --shadow-btn:   0 4px 18px rgba(42,176,138,.30);
  --font-main:    'Plus Jakarta Sans', sans-serif;
  --font-serif:   'Instrument Serif', Georgia, serif;
  --sidebar-width: 230px;
  --navbar-h:     56px;
  --radius-sm:    7px;
  --radius-md:    10px;
  --radius-lg:    16px;
  --radius-xl:    22px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; font-family: var(--font-main); background: var(--bg); overflow: hidden; color: var(--text-h); }

/* ══════════════════════════════════════
   LOGIN SCENE
══════════════════════════════════════ */
.login-scene {
  min-height: 100vh;
  display: flex;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

.login-scene::before {
  content: '';
  position: absolute;
  width: 700px; height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(42,176,138,.13) 0%, transparent 65%);
  top: -200px; left: -200px;
  pointer-events: none;
}
.login-scene::after {
  content: '';
  position: absolute;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(42,176,138,.09) 0%, transparent 65%);
  bottom: -150px; right: 100px;
  pointer-events: none;
}

/* ── LEFT PANEL ── */
.login-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px 64px;
  position: relative;
  z-index: 1;
}

.left-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--sea-xlight);
  border: 1.5px solid var(--sea-border);
  border-radius: 40px;
  padding: 5px 14px 5px 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--sea-deep);
  letter-spacing: .4px;
  margin-bottom: 32px;
  width: fit-content;
  animation: fadeUp .55s ease both;
}
.badge-dot {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sea-mid), var(--sea-deep));
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; color: #fff;
}

.left-headline {
  font-family: var(--font-serif);
  font-size: clamp(36px, 4.5vw, 58px);
  font-weight: 400;
  line-height: 1.1;
  color: var(--text-h);
  letter-spacing: -1.5px;
  margin-bottom: 18px;
  animation: fadeUp .55s .08s ease both;
}
.left-headline strong {
  font-weight: 400;
  color: var(--sea);
  font-style: italic;
}

.left-desc {
  font-size: 14.5px;
  color: var(--text-p);
  line-height: 1.75;
  max-width: 360px;
  margin-bottom: 44px;
  font-weight: 400;
  animation: fadeUp .55s .14s ease both;
}

.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  max-width: 400px;
  animation: fadeUp .55s .2s ease both;
}
.feat-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: 0 2px 10px rgba(42,176,138,.06);
  transition: box-shadow .2s, border-color .2s;
}
.feat-card:hover { border-color: var(--sea-border); box-shadow: 0 4px 16px rgba(42,176,138,.12); }
.feat-icon {
  width: 34px; height: 34px;
  border-radius: 9px;
  background: var(--sea-xlight);
  border: 1px solid var(--sea-border);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  margin-bottom: 10px;
}
.feat-title { font-size: 12px; font-weight: 700; color: var(--text-h); margin-bottom: 3px; }
.feat-desc  { font-size: 11px; color: var(--text-muted); line-height: 1.5; }

.stats-row {
  display: flex;
  gap: 28px;
  margin-top: 36px;
  animation: fadeUp .55s .28s ease both;
}
.stat-num { font-family: var(--font-serif); font-size: 28px; color: var(--sea); font-weight: 400; letter-spacing: -1px; }
.stat-label { font-size: 11px; color: var(--text-muted); margin-top: 1px; letter-spacing: .3px; }

/* ── DIVIDER ── */
.scene-divider {
  width: 1px;
  margin: 40px 0;
  background: linear-gradient(to bottom, transparent, var(--border) 25%, var(--border) 75%, transparent);
  flex-shrink: 0;
  align-self: stretch;
}

/* ── RIGHT PANEL ── */
.login-right {
  width: 460px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;   /* 🔥 move up */
  padding: 40px 10px 05px;       /* add top space */
  position: relative;
  z-index: 1;
}

.form-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px 36px 36px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
  animation: fadeUp .55s .05s ease both;
}

.form-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--sea-mid), var(--sea), var(--sea-deep));
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.form-card::after {
  content: '';
  position: absolute;
  bottom: -60px; right: -60px;
  width: 180px; height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(42,176,138,.07), transparent 65%);
  pointer-events: none;
}

/* ── BRAND ROW ── */
.brand-row {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 32px;
}

.brand-logo-img {
  width: 48px; height: 48px;
  border-radius: 12px;
  object-fit: contain;
  background: #fff;
  border: 1.5px solid var(--sea-border);
  box-shadow: 0 2px 10px rgba(42,176,138,.12);
  padding: 2px;
  flex-shrink: 0;
}

.brand-logo-fallback {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--sea-mid), var(--sea-deep));
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 17px; font-weight: 800; color: #fff;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(42,176,138,.28);
}

.brand-info { flex: 1; }
.brand-name {
  font-size: 16px; font-weight: 800; color: var(--text-h);
  letter-spacing: -.3px; line-height: 1.2;
}
.brand-sub {
  font-size: 10.5px; color: var(--text-muted);
  letter-spacing: 1.2px; text-transform: uppercase; margin-top: 2px; font-weight: 500;
}

.brand-badge {
  background: var(--sea-xlight);
  border: 1px solid var(--sea-border);
  color: var(--sea-deep);
  font-size: 9.5px; font-weight: 700;
  letter-spacing: .8px; text-transform: uppercase;
  padding: 3px 9px; border-radius: 20px;
}

/* ── FORM HEADER ── */
.form-header { margin-bottom: 26px; }
.form-title { font-size: 22px; font-weight: 800; color: var(--text-h); letter-spacing: -.5px; margin-bottom: 5px; }
.form-sub { font-size: 13px; color: var(--text-muted); font-weight: 400; }

.form-sep {
  height: 1px;
  background: linear-gradient(90deg, var(--border), transparent);
  margin-bottom: 26px;
}

/* ── FIELDS ── */
.field { margin-bottom: 16px; }

.field-label {
  display: block;
  font-size: 11.5px; font-weight: 700;
  color: var(--text-p); letter-spacing: .5px;
  margin-bottom: 7px; transition: color .2s;
}
.field:focus-within .field-label { color: var(--sea-deep); }

.field-wrap { position: relative; display: flex; align-items: center; }

.field-icon {
  position: absolute; left: 13px;
  color: var(--text-muted);
  display: flex; align-items: center;
  pointer-events: none; transition: color .2s; z-index: 1;
}
.field:focus-within .field-icon { color: var(--sea); }

.field input {
  width: 100%;
  padding: 12px 40px 12px 40px;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  color: var(--text-h);
  font-family: var(--font-main);
  font-size: 13.5px; font-weight: 500;
  outline: none;
  transition: border .2s, background .2s, box-shadow .2s;
}
.field input::placeholder { color: var(--text-muted); font-weight: 400; }
.field input:focus {
  border-color: var(--sea);
  background: var(--white);
  box-shadow: 0 0 0 3.5px rgba(42,176,138,.12);
}

.toggle-pass {
  position: absolute; right: 12px;
  background: none; border: none; cursor: pointer;
  color: var(--text-muted);
  display: flex; align-items: center; padding: 4px;
  transition: color .2s; border-radius: 6px;
}
.toggle-pass:hover { color: var(--sea); }

/* ── EXTRAS ROW ── */
.extras-row {
  display: flex; align-items: center; justify-content: space-between;
  margin: 6px 0 20px;
}
.remember {
  display: flex; align-items: center; gap: 7px;
  cursor: pointer; font-size: 12px; color: var(--text-p);
  user-select: none; font-weight: 500;
}
.remember input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--sea); cursor: pointer; }
.forgot { font-size: 12px; color: var(--sea); text-decoration: none; font-weight: 600; transition: color .2s; }
.forgot:hover { color: var(--sea-deep); }

.error-msg {
  font-size: 12px; color: #d95050;
  min-height: 18px; margin-bottom: 10px;
  display: flex; align-items: center; gap: 5px; font-weight: 500;
}

/* ── BUTTON ── */
.btn-login {
  width: 100%; padding: 14px; border: none; border-radius: 11px;
  background: linear-gradient(135deg, var(--sea-mid) 0%, var(--sea) 50%, var(--sea-deep) 100%);
  color: #fff; font-family: var(--font-main);
  font-size: 14px; font-weight: 700; letter-spacing: .2px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  position: relative; overflow: hidden;
  box-shadow: var(--shadow-btn);
  transition: transform .18s, box-shadow .18s;
}
.btn-login::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,.14) 0%, transparent 60%);
  pointer-events: none;
}
.btn-login:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(42,176,138,.38); }
.btn-login:active { transform: translateY(0); }
.btn-arrow { font-size: 16px; transition: transform .2s; }
.btn-login:hover .btn-arrow { transform: translateX(4px); }

.loader {
  display: none; width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,.4); border-top-color: #fff;
  border-radius: 50%; animation: spin .65s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.form-foot {
  margin-top: 24px; text-align: center;
  font-size: 11.5px; color: var(--text-muted); line-height: 1.7;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.form-foot-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--sea-border); }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ══════════════════════════════════════
   APP SHELL
══════════════════════════════════════ */
.app-shell { display: flex; height: 100vh; width: 100vw; overflow: hidden; }

.sidebar {
  width: var(--sidebar-width); flex-shrink: 0;
  background: var(--white); height: 100%;
  display: flex; flex-direction: column;
  border-right: 1.5px solid var(--border);
  box-shadow: 3px 0 20px rgba(42,176,138,.05);
  overflow: hidden; position: relative; z-index: 100;
  transition: transform .28s ease;
}
.sidebar::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2.5px;
  background: linear-gradient(90deg, var(--sea-mid), var(--sea), var(--sea-deep));
}

.sidebar-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 18px 14px 14px; border-bottom: 1px solid var(--border); margin-top: 2.5px;
}
.sidebar-brand-logo {
  width: 34px; height: 34px; border-radius: 9px;
  object-fit: contain; border: 1px solid var(--sea-border);
  background: var(--white); padding: 1px; flex-shrink: 0;
}
.sidebar-brand-fallback {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(135deg, var(--sea-mid), var(--sea-deep));
  display: none; align-items: center; justify-content: center;
  color: white; font-size: 12px; font-weight: 800; flex-shrink: 0;
}
.brand-title   { font-size: 12.5px; font-weight: 700; color: var(--text-h); }
.brand-tagline { font-size: 9.5px; color: var(--text-muted); letter-spacing: .4px; text-transform: uppercase; margin-top: 1px; }

.sidebar-nav { flex: 1; overflow-y: auto; padding: 10px 9px; scrollbar-width: none; }
.sidebar-nav::-webkit-scrollbar { display: none; }

.nav-section-label {
  font-size: 9.5px; font-weight: 700; color: var(--text-muted);
  letter-spacing: 1.2px; text-transform: uppercase;
  padding: 6px 8px 4px; margin-top: 4px;
}

.nav-parent {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 8.5px 10px; border: none; background: transparent;
  border-radius: var(--radius-md); cursor: pointer; text-align: left;
  font-family: var(--font-main); font-size: 12.5px; font-weight: 600;
  color: var(--text-p); transition: background .16s, color .16s; margin-bottom: 1px;
}
.nav-parent:hover { background: var(--sea-xlight); color: var(--sea-deep); }
.nav-parent.open  { background: var(--sea-xlight); color: var(--sea); }

.nav-parent-icon {
  width: 29px; height: 29px; border-radius: var(--radius-sm);
  background: var(--bg); display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: background .16s;
}
.nav-parent:hover .nav-parent-icon,
.nav-parent.open  .nav-parent-icon { background: var(--sea-light); }

.nav-parent-label { flex: 1; }
.nav-chevron { font-size: 11px; color: var(--text-muted); transition: transform .25s, color .16s; }
.nav-parent.open .nav-chevron { transform: rotate(90deg); color: var(--sea); }

.nav-submenu { overflow: hidden; max-height: 0; transition: max-height .28s ease, opacity .2s; opacity: 0; padding-left: 14px; }
.nav-submenu.open { max-height: 500px; opacity: 1; }

.nav-sub-item {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px; border-radius: var(--radius-sm);
  cursor: pointer; font-size: 12px; font-weight: 500; color: var(--text-p);
  transition: background .14s, color .14s, padding-left .14s;
  margin-bottom: 1px; border: none; background: transparent;
  width: 100%; text-align: left; font-family: var(--font-main);
}
.nav-sub-item::before {
  content: ''; width: 5px; height: 5px; border-radius: 50%;
  border: 1.5px solid var(--text-muted); flex-shrink: 0;
  transition: background .14s, border-color .14s;
}
.nav-sub-item:hover { background: var(--sea-xlight); color: var(--sea-deep); padding-left: 14px; }
.nav-sub-item:hover::before { border-color: var(--sea); background: var(--sea); }

.sidebar-footer { padding: 9px 9px 12px; border-top: 1px solid var(--border); }
.sidebar-user {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px; border-radius: var(--radius-md);
  cursor: pointer; transition: background .16s;
}
.sidebar-user:hover { background: var(--sea-xlight); }
.user-avatar {
  width: 31px; height: 31px; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--sea-light), var(--sea-border));
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: var(--sea-deep); flex-shrink: 0;
}
.user-name-small { font-size: 12px; font-weight: 600; color: var(--text-p); }
.online-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--sea); margin-left: auto;
  box-shadow: 0 0 0 2px white, 0 0 0 3.5px var(--sea-light);
}

.right-side { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-width: 0; }

.navbar {
  height: var(--navbar-h); background: var(--white);
  border-bottom: 1.5px solid var(--border);
  box-shadow: 0 2px 8px rgba(42,176,138,.05);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 18px; flex-shrink: 0;
}
.navbar-left { display: flex; align-items: center; gap: 10px; }
.btn-hamburger {
  background: none; border: none; cursor: pointer;
  padding: 6px; border-radius: var(--radius-sm);
  display: flex; flex-direction: column; gap: 5px; transition: background .16s;
}
.btn-hamburger:hover { background: var(--sea-xlight); }
.btn-hamburger span { display: block; width: 18px; height: 2px; background: var(--sea); border-radius: 2px; }
.navbar-title { font-size: 14px; font-weight: 700; color: var(--text-h); }
.cart-btn {
  display: flex; align-items: center; gap: 6px;
  cursor: pointer; font-size: 14px; color: var(--text-p);
  padding: 6px 12px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--sea-border); background: var(--sea-xlight); transition: background .16s;
}
.cart-btn:hover { background: var(--sea-light); }
#cartCount { background: var(--sea); color: white; padding: 1px 7px; border-radius: 20px; font-size: 11px; font-weight: 700; }

.content-area { flex: 1; overflow: hidden; position: relative; background: var(--bg); }
#items { display: flex; flex-wrap: wrap; padding: 14px; height: 100%; overflow-y: auto; }
#pageFrame { width: 100%; height: 100%; border: none; display: none; position: absolute; top: 0; left: 0; }

.card {
  width: 170px; margin: 9px;
  background: var(--white); padding: 14px; border-radius: var(--radius-lg);
  box-shadow: 0 2px 10px rgba(42,176,138,.07), 0 1px 3px rgba(0,0,0,.04);
  border: 1px solid var(--border); transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(42,176,138,.13); }
.card h4 { font-size: 13px; font-weight: 700; color: var(--text-h); margin-bottom: 4px; }
.card p  { font-size: 13px; color: var(--sea); font-weight: 600; margin-bottom: 10px; }
.card button {
  width: 100%; background: linear-gradient(135deg, var(--sea-mid), var(--sea-deep));
  color: white; border: none; padding: 7px; border-radius: var(--radius-sm);
  cursor: pointer; font-family: var(--font-main); font-size: 12px; font-weight: 600; transition: opacity .16s;
}
.card button:hover { opacity: .87; }

.cart-popup {
  position: fixed; right: 16px; bottom: 16px;
  background: var(--white); padding: 16px; width: 240px;
  border-radius: var(--radius-lg); box-shadow: 0 8px 32px rgba(0,0,0,.12);
  border: 1.5px solid var(--border); display: none; font-family: var(--font-main);
}
.cart-popup h3 { font-size: 14px; font-weight: 700; color: var(--text-h); margin-bottom: 10px; }
.cart-popup button {
  width: 100%; background: linear-gradient(135deg, var(--sea-mid), var(--sea-deep));
  color: white; border: none; padding: 9px; border-radius: var(--radius-sm);
  cursor: pointer; font-family: var(--font-main); font-size: 13px; font-weight: 600; margin-top: 10px;
}

.vch-overlay {
  position: fixed; inset: 0; background: rgba(15,45,34,.25);
  display: none; justify-content: center; align-items: center;
  z-index: 1000; backdrop-filter: blur(4px);
}
.vch-popup {
  background: var(--white); border-radius: var(--radius-lg);
  padding: 28px 24px 22px; width: 340px;
  box-shadow: 0 16px 48px rgba(42,176,138,.15);
  border: 1.5px solid var(--sea-border); animation: popIn .2s ease;
}
@keyframes popIn { from { transform: scale(.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.vch-popup h3 { font-size: 15px; font-weight: 700; color: var(--text-h); margin-bottom: 14px; border-bottom: 1px solid var(--border); padding-bottom: 10px; }
.vch-list { display: flex; flex-direction: column; gap: 7px; max-height: 280px; overflow-y: auto; margin-bottom: 14px; }
.vch-item {
  padding: 11px 14px; background: var(--sea-xlight); border: 1.5px solid var(--sea-border);
  border-radius: var(--radius-md); cursor: pointer;
  font-family: var(--font-main); font-size: 13px; font-weight: 600;
  color: var(--sea-deep); text-align: left; transition: all .16s;
}
.vch-item:hover { background: var(--sea-light); border-color: var(--sea); transform: translateX(3px); }
.vch-cancel {
  width: 100%; padding: 9px; background: var(--bg); color: var(--text-p);
  border: 1.5px solid var(--border); border-radius: var(--radius-md);
  cursor: pointer; font-family: var(--font-main); font-size: 13px; font-weight: 600; transition: background .16s;
}
.vch-cancel:hover { background: var(--border); }

.drawer-overlay { display: none; position: fixed; inset: 0; background: rgba(10,40,22,.28); z-index: 500; backdrop-filter: blur(3px); }
.drawer-overlay.open { display: block; }
.mobile-drawer {
  position: fixed; top: 0; left: 0; width: 268px; height: 100%;
  background: var(--white); z-index: 600;
  display: flex; flex-direction: column;
  transform: translateX(-100%);
  transition: transform .27s cubic-bezier(.4,0,.2,1);
  box-shadow: 4px 0 28px rgba(42,176,138,.1); overflow: hidden;
}
.mobile-drawer::before { content: ''; position: absolute; top:0; left:0; right:0; height:2.5px; background: linear-gradient(90deg, var(--sea-mid), var(--sea), var(--sea-deep)); }
.drawer-overlay.open .mobile-drawer { transform: translateX(0); }
.drawer-brand { display: flex; align-items: center; gap: 10px; padding: 18px 14px 14px; border-bottom: 1px solid var(--border); margin-top: 2.5px; }
.drawer-close {
  margin-left: auto; background: var(--bg); border: 1px solid var(--border);
  width: 28px; height: 28px; border-radius: var(--radius-sm);
  cursor: pointer; font-size: 15px; color: var(--text-p);
  display: flex; align-items: center; justify-content: center; transition: background .16s;
}
.drawer-close:hover { background: var(--sea-light); color: var(--sea-deep); }
.drawer-nav { flex: 1; overflow-y: auto; padding: 10px 9px; scrollbar-width: none; }
.drawer-nav::-webkit-scrollbar { display: none; }
.drawer-footer { padding: 9px 9px 12px; border-top: 1px solid var(--border); }

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--sea-border); border-radius: 4px; }

@media (max-width: 960px) {
  .login-left, .scene-divider { display: none; }
  .login-right { width: 100%; padding: 40px 24px; }
  .login-scene { align-items: center; justify-content: center; }
}
@media (max-width: 700px) {
  .sidebar { display: none !important; }
  .card { width: calc(50% - 16px); margin: 6px 8px; }
}
@media (max-width: 360px) { .card { width: calc(100% - 16px); } }
