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

:root {
  /* Color Palette */
  --bg-primary: #050811;
  --bg-secondary: #0d1527;
  --bg-glass: rgba(13, 21, 39, 0.6);
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(255, 255, 255, 0.06);
  
  --color-primary: #3b82f6;      /* Electric Blue */
  --color-primary-glow: rgba(59, 130, 246, 0.3);
  --color-accent: #f59e0b;       /* Gold/Amber */
  --color-accent-glow: rgba(245, 158, 11, 0.3);
  --color-success: #10b981;      /* Emerald Green */
  --color-danger: #ef4444;       /* Ruby Red */
  
  --text-main: #f3f4f6;          /* Near White */
  --text-muted: #9ca3af;         /* Cool Grey */
  --text-dark: #4b5563;          /* Dark Grey */
  
  --border-light: rgba(255, 255, 255, 0.05);
  --border-primary: rgba(59, 130, 246, 0.15);
  --border-accent: rgba(245, 158, 11, 0.15);
  
  /* Dimensions & Settings */
  --sidebar-width: 260px;
  --border-radius: 12px;
  --transition-speed: 0.25s;
  --font-display: 'Outfit', sans-serif;
  --font-sans: 'Inter', sans-serif;
}

/* Reset and Core Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
}

::-webkit-scrollbar-thumb {
  background: rgba(59, 130, 246, 0.3);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(59, 130, 246, 0.5);
}

/* -------------------- LOGIN SCREEN -------------------- */
#login {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-primary);
}

#login.on {
  display: flex;
}

.login-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.login-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.18) saturate(1.2) blur(3px);
  transform: scale(1.02);
}

.login-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(59, 130, 246, 0.15), var(--bg-primary) 80%);
}

.login-card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 440px;
  padding: 40px;
  background: var(--bg-glass);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  backdrop-filter: blur(16px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 40px rgba(59, 130, 246, 0.1);
  animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-header {
  text-align: center;
  margin-bottom: 30px;
}

.logo-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  border-radius: 14px;
  font-size: 26px;
  margin-bottom: 12px;
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
}

.logo-text {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 2px;
  background: linear-gradient(90deg, #fff, var(--text-muted));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-sub {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--color-primary);
  margin-top: 4px;
}

.login-body h2 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 6px;
}

.login-body p {
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 24px;
}

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--color-primary);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--border-radius);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 13px;
  outline: none;
  transition: all var(--transition-speed);
}

.form-input:focus {
  border-color: var(--color-primary);
  background: rgba(59, 130, 246, 0.05);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.form-input::placeholder {
  color: var(--text-dark);
}

.btn-primary {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--color-primary), #1d4ed8);
  border: none;
  border-radius: var(--border-radius);
  color: #fff;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
  transition: all var(--transition-speed);
  margin-top: 10px;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
  background: linear-gradient(135deg, #2563eb, var(--color-primary));
}

.login-error {
  display: none;
  margin-top: 16px;
  padding: 12px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: var(--border-radius);
  color: #f87171;
  font-size: 12px;
  text-align: center;
}

.login-note {
  font-size: 11px;
  color: var(--text-dark);
  text-align: center;
  margin-top: 24px;
  line-height: 1.6;
}

/* -------------------- APP SHELL -------------------- */
#app {
  display: none;
  height: 100vh;
  flex-direction: row;
}

#app.on {
  display: flex;
}

/* -------------------- SIDEBAR -------------------- */
.sidebar {
  width: var(--sidebar-width);
  background-color: var(--bg-secondary);
  border-right: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  z-index: 100;
  position: relative;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar-header {
  padding: 24px 20px;
  border-bottom: 1px solid var(--border-light);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  border-radius: 9px;
  font-size: 18px;
}

.brand-text {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 1.5px;
}

.brand-sub {
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
}

.user-profile {
  margin: 16px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--color-primary), #1d4ed8);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
}

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

.user-name {
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  font-size: 10px;
  color: var(--text-muted);
}

.user-payment {
  font-size: 9px;
  color: var(--color-accent);
  font-weight: 600;
  margin-top: 2px;
}

.sidebar-menu {
  flex: 1;
  overflow-y: auto;
  padding: 16px 12px;
}

.menu-header {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-dark);
  margin: 16px 8px 6px;
}

.menu-header:first-child {
  margin-top: 0;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 14px;
  background: none;
  border: none;
  border-radius: var(--border-radius);
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: all var(--transition-speed);
  position: relative;
}

.menu-item:hover {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-main);
}

.menu-item.active {
  background: rgba(59, 130, 246, 0.08);
  color: var(--color-primary);
  font-weight: 600;
}

.menu-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  background-color: var(--color-primary);
  border-radius: 0 4px 4px 0;
}

.menu-item svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.menu-badge {
  margin-left: auto;
  background-color: var(--color-primary);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
}

.menu-badge.accent {
  background-color: var(--color-accent);
  color: var(--bg-primary);
}

.sidebar-alerts {
  padding: 0 16px 12px;
}

.sidebar-alert-card {
  background: rgba(245, 158, 11, 0.05);
  border: 1px solid rgba(245, 158, 11, 0.15);
  border-radius: var(--border-radius);
  padding: 10px 12px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all var(--transition-speed);
}

.sidebar-alert-card:hover {
  background: rgba(245, 158, 11, 0.1);
  transform: translateY(-1px);
}

.alert-label {
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-accent);
  margin-bottom: 2px;
}

.alert-title {
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.alert-action {
  font-size: 10px;
  color: #fff;
  font-weight: 500;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.sidebar-footer {
  padding: 14px;
  border-top: 1px solid var(--border-light);
}

.btn-signout {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  background: none;
  border: none;
  border-radius: var(--border-radius);
  color: var(--text-dark);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-speed);
}

.btn-signout:hover {
  background: rgba(239, 68, 68, 0.08);
  color: var(--color-danger);
}

.btn-signout svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

/* -------------------- MAIN CONTAINER -------------------- */
.main-content {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.page {
  display: none;
  flex: 1;
  overflow-y: auto;
  height: 100%;
  padding-bottom: 60px;
}

.page.on {
  display: block;
}

/* -------------------- PAGE HEADER -------------------- */
.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  margin-bottom: 12px;
  transition: all var(--transition-speed);
}

.btn-back:hover {
  background: rgba(59, 130, 246, 0.08);
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.page-header {
  padding: 32px 40px 24px;
  border-bottom: 1px solid var(--border-light);
  background: linear-gradient(180deg, var(--bg-secondary) 0%, transparent 100%);
  position: relative;
}

.page-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
}

.header-tag {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--color-primary);
  margin-bottom: 6px;
}

.header-title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 800;
  line-height: 1.1;
}

.header-title span {
  color: var(--color-accent);
}

.header-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* -------------------- HOME PAGE -------------------- */
.hero {
  position: relative;
  height: 300px;
  overflow: hidden;
  margin: 20px 40px;
  border-radius: 20px;
  border: 1px solid var(--border-light);
}

.hero-bg {
  position: absolute;
  inset: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  filter: brightness(0.35);
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--bg-primary) 20%, rgba(5, 8, 17, 0.4) 60%, transparent);
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px;
  max-width: 550px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  padding: 6px 14px;
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 30px;
  margin-bottom: 16px;
}

.badge-dot {
  width: 6px;
  height: 6px;
  background-color: var(--color-primary);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--color-primary);
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.5; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.5; }
}

.hero-badge span {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--color-primary);
}

.hero-title {
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 10px;
}

.hero-title span.accent {
  color: var(--color-accent);
}

.hero-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Quick Actions */
.quick-actions {
  display: flex;
  gap: 12px;
  padding: 0 40px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.qa-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius);
  color: var(--text-main);
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
  transition: all var(--transition-speed);
}

.qa-btn:hover {
  background: rgba(59, 130, 246, 0.08);
  border-color: var(--color-primary);
  transform: translateY(-1px);
}

.qa-btn.accent {
  background: linear-gradient(135deg, var(--color-accent), #d97706);
  border: none;
  color: var(--bg-primary);
}

.qa-btn.accent:hover {
  background: linear-gradient(135deg, #fbbf24, var(--color-accent));
}

.qa-btn svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

/* Stats Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 0 40px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius);
  padding: 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
}

.stat-num {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, #fff, var(--color-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-lbl {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  margin-top: 8px;
}

/* Dashboard Bottom Grid */
.dash-bottom-grid {
  display: grid;
  grid-template-columns: 1.8fr 1.2fr;
  gap: 20px;
  padding: 0 40px;
  margin-bottom: 20px;
}

.panel-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius);
  padding: 24px;
}

.panel-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.panel-title span {
  font-size: 10px;
  font-weight: 600;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Transformations slider/strip */
.transformations-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.tc-card {
  position: relative;
  aspect-ratio: 3/4;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--border-light);
  transition: transform 0.25s;
}

.tc-card:hover {
  transform: scale(1.02);
  border-color: var(--color-primary);
}

.tc-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  filter: brightness(0.8) contrast(1.05);
}

.tc-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(5, 8, 17, 0.9) 0%, transparent 60%);
}

.tc-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px;
  z-index: 2;
}

.tc-result {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--color-accent);
}

.tc-duration {
  font-size: 10px;
  color: var(--text-muted);
}

/* Quotes section */
.quote-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: linear-gradient(135deg, rgba(13, 21, 39, 0.8) 0%, rgba(59, 130, 246, 0.05) 100%);
  border-left: 3px solid var(--color-primary);
}

.quote-text {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  font-style: italic;
  color: var(--text-main);
  margin-bottom: 12px;
}

.quote-author {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--color-primary);
}

/* -------------------- GENERAL PAGE LIST ROWS -------------------- */
.container-wrap {
  padding: 24px 40px;
  max-width: 960px;
}

.list-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius);
  margin-bottom: 10px;
  transition: all var(--transition-speed);
}

.list-row:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-primary);
}

.list-row.clickable {
  cursor: pointer;
}

.list-row.clickable:hover {
  transform: translateX(4px);
}

.list-row.locked {
  opacity: 0.45;
}

.lr-index {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  color: var(--color-primary);
  min-width: 32px;
}

.lr-thumb {
  width: 90px;
  aspect-ratio: 16/9;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lr-thumb img, .lr-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lr-play-btn {
  position: absolute;
  width: 30px;
  height: 30px;
  background: linear-gradient(135deg, var(--color-primary), #1d4ed8);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.lr-play-btn svg {
  width: 10px;
  height: 10px;
  fill: #fff;
  margin-left: 2px;
}

.lr-icon {
  width: 44px;
  height: 44px;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid var(--border-primary);
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.lr-body {
  flex: 1;
  min-width: 0;
}

.lr-meta {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--color-primary);
  margin-bottom: 2px;
}

.lr-title {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lr-subtitle {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.lr-subtitle svg {
  width: 12px;
  height: 12px;
  fill: currentColor;
}

.lr-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.badge-status {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.badge-status.success {
  background: rgba(16, 185, 129, 0.12);
  color: var(--color-success);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-status.warning {
  background: rgba(245, 158, 11, 0.12);
  color: var(--color-accent);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.badge-status.muted {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  border: 1px solid var(--border-light);
}

.btn-small {
  padding: 6px 14px;
  background: linear-gradient(135deg, var(--color-primary), #1d4ed8);
  border: none;
  border-radius: 6px;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-speed);
}

.btn-small:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3);
}

/* Empty states */
.empty-state {
  text-align: center;
  padding: 60px 40px;
  background: rgba(255, 255, 255, 0.01);
  border: 1px dashed var(--border-light);
  border-radius: var(--border-radius);
  color: var(--text-muted);
}

.empty-state h3 {
  font-family: var(--font-display);
  font-size: 16px;
  color: #fff;
  margin-bottom: 6px;
}

.empty-state p {
  font-size: 12px;
}

/* -------------------- NUTRITION / MEALS GRID -------------------- */
.meals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.meal-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition-speed);
}

.meal-card:hover {
  transform: translateY(-4px);
  border-color: var(--color-primary);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.meal-card-img {
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  position: relative;
  background-color: var(--bg-primary);
}

.meal-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.meal-card:hover .meal-card-img img {
  transform: scale(1.04);
}

.meal-card-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
}

.meal-card-body {
  padding: 16px;
}

.meal-card-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.meal-card-calories {
  font-size: 11px;
  color: var(--color-accent);
  font-weight: 700;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.meal-card-macros {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.macro-tag {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 8px;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 20px;
  color: var(--color-primary);
}

/* -------------------- MEAL PLAN / BILLING -------------------- */
.meal-plan-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius);
  padding: 28px;
  margin-bottom: 20px;
}

.meal-plan-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.meal-plan-icon {
  width: 52px;
  height: 52px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.meal-plan-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
}

.meal-plan-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.btn-open-plan {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  background: linear-gradient(135deg, var(--color-success), #047857);
  border: none;
  border-radius: var(--border-radius);
  color: #fff;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.25);
  transition: all var(--transition-speed);
}

.btn-open-plan:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35);
}

.btn-open-plan svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.meal-plan-note {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 14px;
  line-height: 1.6;
}

.billing-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.billing-icon {
  width: 44px;
  height: 44px;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid var(--border-primary);
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.billing-meta {
  flex: 1;
}

.billing-label {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--color-primary);
  margin-bottom: 2px;
}

.billing-date {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
}

.billing-note {
  font-size: 11px;
  color: var(--text-muted);
}

/* -------------------- AI CHATBOT -------------------- */
.chatbot-container {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 120px);
  padding: 24px 40px;
}

.chatbot-wrapper {
  flex: 1;
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius);
  background: var(--bg-secondary);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  min-height: 400px;
}

#chatbot-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: none;
}

.chatbot-placeholder {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  text-align: center;
}

.chatbot-placeholder svg {
  width: 56px;
  height: 56px;
  fill: var(--color-primary);
  margin-bottom: 16px;
  opacity: 0.5;
}

.chatbot-placeholder h3 {
  font-family: var(--font-display);
  font-size: 18px;
  margin-bottom: 8px;
}

.chatbot-placeholder p {
  color: var(--text-muted);
  max-width: 320px;
  font-size: 12px;
  line-height: 1.6;
}

/* -------------------- STORIES GRID -------------------- */
.stories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.story-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition-speed);
}

.story-card:hover {
  transform: translateY(-4px);
  border-color: var(--color-primary);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.story-card-img {
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  background-color: var(--bg-primary);
  position: relative;
}

.story-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.story-card:hover .story-card-img img {
  transform: scale(1.03);
}

.story-card-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: rgba(59, 130, 246, 0.15);
}

.story-card-body {
  padding: 20px;
}

.story-card-date {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--color-primary);
  margin-bottom: 4px;
}

.story-card-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
}

.story-card-excerpt {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* -------------------- GENERAL OVERLAYS / MODALS -------------------- */
.overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(5, 8, 17, 0.9);
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.overlay.on {
  display: flex;
}

.modal-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  width: 100%;
  max-width: 800px;
  animation: modalIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  font-size: 16px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-speed);
  z-index: 10;
}

.modal-close:hover {
  background: rgba(239, 68, 68, 0.1);
  color: var(--color-danger);
  border-color: rgba(239, 68, 68, 0.2);
}

.modal-video-container {
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
}

.modal-video-container video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.modal-title-bar {
  padding: 16px 20px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  border-top: 1px solid var(--border-light);
}

/* -------------------- FORM SUBMISSION MODAL -------------------- */
.form-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(5, 8, 17, 0.95);
  backdrop-filter: blur(8px);
  overflow-y: auto;
  padding: 40px 20px;
}

.form-overlay.on {
  display: block;
}

.form-container {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 40px;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  animation: modalIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.form-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 4px;
}

.form-week-tag {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--color-primary);
  margin-bottom: 24px;
}

.form-divider {
  height: 1px;
  background: var(--border-light);
  margin: 20px 0;
}

.form-question {
  margin-bottom: 24px;
}

.form-question-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 10px;
}

.form-select {
  width: 100%;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius);
  color: var(--text-main);
  outline: none;
  font-family: var(--font-sans);
  font-size: 13px;
}

.form-select option {
  background-color: var(--bg-secondary);
}

.form-select:focus {
  border-color: var(--color-primary);
}

.form-checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  cursor: pointer;
}

.form-checkbox-row input {
  width: 16px;
  height: 16px;
  accent-color: var(--color-primary);
  cursor: pointer;
}

.form-checkbox-row label {
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
}

.form-checkbox-row input:checked + label {
  color: #fff;
  font-weight: 500;
}

.btn-form-submit {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--color-primary), #1d4ed8);
  color: #fff;
  border: none;
  border-radius: var(--border-radius);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.25);
  transition: all var(--transition-speed);
}

.btn-form-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.35);
}

.form-success-state {
  display: none;
  text-align: center;
  padding: 40px 0;
}

.form-success-state h3 {
  font-family: var(--font-display);
  font-size: 26px;
  color: var(--color-success);
  margin-bottom: 8px;
}

.form-success-state p {
  color: var(--text-muted);
  font-size: 13px;
  max-width: 320px;
  margin: 0 auto;
}

/* -------------------- MEAL DETAIL OVERLAY -------------------- */
.meal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(5, 8, 17, 0.95);
  backdrop-filter: blur(8px);
  overflow-y: auto;
  padding: 40px 20px;
}

.meal-overlay.on {
  display: block;
}

.meal-modal-box {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  animation: modalIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.meal-detail-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  filter: brightness(0.85);
}

.meal-detail-body {
  padding: 30px;
}

.meal-detail-name {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 16px;
}

.meal-detail-macros-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}

.macro-detail-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-light);
  padding: 10px;
  border-radius: var(--border-radius);
  text-align: center;
}

.macro-detail-val {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--color-accent);
}

.macro-detail-lbl {
  font-size: 8px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 2px;
}

.meal-detail-section {
  margin-bottom: 20px;
}

.meal-detail-section-title {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--color-primary);
  margin-bottom: 6px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-light);
}

.meal-detail-text {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  white-space: pre-wrap;
}

/* -------------------- STORY DETAIL OVERLAY -------------------- */
.story-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(5, 8, 17, 0.95);
  backdrop-filter: blur(8px);
  overflow-y: auto;
  padding: 40px 20px;
}

.story-overlay.on {
  display: block;
}

.story-modal-box {
  width: 100%;
  max-width: 740px;
  margin: 0 auto;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  animation: modalIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.story-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 4px;
  background-color: var(--border-light);
}

.story-detail-media {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background-color: var(--bg-primary);
  display: block;
}

.story-detail-body {
  padding: 30px;
}

.story-detail-date {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--color-primary);
  margin-bottom: 4px;
}

.story-detail-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 16px;
}

.story-detail-content {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* Mobile Hamburger Menu */
.burger-menu {
  display: none;
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 300;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-light);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-direction: column;
  gap: 4px;
}

.burger-line {
  width: 18px;
  height: 2px;
  background-color: var(--text-main);
  border-radius: 1px;
}

.sidebar-mask {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 99;
  backdrop-filter: blur(2px);
}

/* -------------------- RESPONSIVE DESIGN -------------------- */
@media (max-width: 860px) {
  .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    z-index: 200;
    width: var(--sidebar-width);
  }
  
  .sidebar.open {
    transform: translateX(0);
  }
  
  .sidebar-mask.open {
    display: block;
  }
  
  .burger-menu {
    display: flex;
  }
  
  #app {
    display: block;
  }
  
  .main-content {
    height: 100vh;
  }
  
  .page-header {
    padding: 24px 20px 16px 70px;
  }
  
  .hero {
    margin: 16px 20px;
    height: 240px;
  }
  
  .hero-content {
    padding: 24px;
  }
  
  .quick-actions, .stats-grid, .dash-bottom-grid, .container-wrap {
    padding: 0 20px;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .dash-bottom-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .transformations-strip {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
}

.btn-guide-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: var(--color-accent);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 20px;
  cursor: pointer;
  transition: all var(--transition-speed);
}

.btn-guide-pill:hover {
  background: var(--color-accent);
  color: var(--bg-primary);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
  transform: translateY(-1px);
}

/* Tables style for My Orders */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  background: var(--bg-secondary);
}
table {
  width: 100%;
  border-collapse: collapse;
}
th {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  padding: 10px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
  background: rgba(255, 255, 255, 0.015);
}
td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
  font-size: 12px;
  vertical-align: middle;
}
tr:last-child td {
  border-bottom: none;
}
tr:hover td {
  background-color: rgba(255, 255, 255, 0.01);
}
.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}
.badge-status.success {
  background: rgba(16, 185, 129, 0.1);
  color: var(--color-success);
}
.badge-status.muted {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
}

/* Client Login Extensions */
.btn-secondary {
  width: 100%;
  margin-top: 10px;
  padding: 12px;
  background: none;
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--color-white);
  border-radius: var(--border-radius);
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  transition: all var(--transition-speed);
}
.btn-secondary:hover {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.2);
}
.login-success {
  display: none;
}

/* Chatbot & Store layout optimizations */
#page-chatbot.on, #page-store.on {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  padding-bottom: 0;
}

#page-chatbot .chatbot-container, #page-store .chatbot-container {
  flex: 1;
  height: auto;
  padding: 24px 40px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Mobile Screen Sizing Adjustments */
@media (max-width: 480px) {
  #login {
    padding: 12px;
  }
  .login-card {
    padding: 24px 16px;
    border-radius: 12px;
  }
  .login-header {
    margin-bottom: 20px;
  }
  .login-header h2 {
    font-size: 18px;
  }
  .login-header p {
    font-size: 11px;
  }
  .page-header {
    padding: 20px 16px 12px 64px;
  }
  .page-header h1 {
    font-size: 20px;
  }
  .hero {
    margin: 12px 16px;
    height: 180px;
  }
  .hero-content {
    padding: 16px;
  }
  .hero-content h2 {
    font-size: 18px;
  }
  .quick-actions, .stats-grid, .dash-bottom-grid, .container-wrap {
    padding: 0 16px;
  }
  .chatbot-container, #page-store .chatbot-container {
    padding: 16px !important;
  }
  .list-row {
    padding: 12px;
    gap: 8px;
  }
  .lr-thumb {
    width: 72px;
  }
  .lr-title {
    font-size: 12px;
  }
  .lr-subtitle {
    font-size: 10px;
  }
}
