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

:root {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;

  /* High-Tech Vibrant Theme */
  --color-background: #F4F7FB;
  --color-darkest: #0F172A;
  --color-lightest: #FFFFFF;
  --color-surface-soft: rgba(255, 255, 255, 0.7);
  --color-surface-hover: rgba(255, 255, 255, 0.95);
  
  --color-text-primary: #1E293B;
  --color-text-secondary: #64748B;
  --color-border: #E2E8F0;
  
  /* Vibrant Gradients */
  --accent-primary: #6366F1;
  --accent-gradient: linear-gradient(135deg, #6366F1 0%, #A855F7 100%);
  --accent-glow: rgba(99, 102, 241, 0.25);

  --sidebar-bg: rgba(255, 255, 255, 0.85);
  --sidebar-active-surface: #EEF2FF;
  --sidebar-icon: #94A3B8;
  --sidebar-icon-active: #6366F1;
  
  --glass-shadow: 0 12px 32px rgba(15, 23, 42, 0.04);
  --card-shadow: 0 8px 24px rgba(15, 23, 42, 0.03);

  --space-1: 6px; --space-2: 12px; --space-3: 16px;
  --space-4: 20px; --space-5: 32px; --space-6: 48px;

  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 32px;
  --radius-round: 60px;

  --motion-fast: 200ms;
  --motion-ui: 300ms;
  --motion-standard: 400ms;
  --motion-easing: cubic-bezier(0.16, 1, 0.3, 1);
}

/* PHASE 5: Luxury Dark Mode (Obsidian & Gold) */
[data-theme="dark"] {
  --color-background: #0B0E14; /* Obsidian Deep */
  --color-darkest: #F8FAFC; /* Inverted for text readability */
  --color-lightest: #151A22; /* Obsidian Surface */
  --color-surface-soft: rgba(21, 26, 34, 0.7);
  --color-surface-hover: rgba(30, 38, 49, 0.95);
  
  --color-text-primary: #E2E8F0;
  --color-text-secondary: #94A3B8;
  --color-border: #2A313C;
  
  --accent-primary: #D4AF37; /* Luxury Gold */
  --accent-gradient: linear-gradient(135deg, #FCD34D 0%, #B45309 100%);
  --accent-glow: rgba(212, 175, 55, 0.15);

  --sidebar-bg: rgba(15, 19, 26, 0.85);
  --sidebar-active-surface: rgba(212, 175, 55, 0.1);
  --sidebar-icon: #64748B;
  --sidebar-icon-active: #D4AF37;
  
  --glass-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  --card-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* Global transitions for theme switching */
body, .sidebar, .bento-card, .item-card, .nav-btn, .global-sidebar-item {
  transition: background-color var(--motion-standard) var(--motion-easing),
              border-color var(--motion-standard) var(--motion-easing),
              color var(--motion-standard) var(--motion-easing),
              box-shadow var(--motion-standard) var(--motion-easing);
}

body {
  margin: 0; padding: 0;
  background-color: var(--color-background);
  background-image: 
    radial-gradient(circle at 10% 10%, rgba(99, 102, 241, 0.06), transparent 40%),
    radial-gradient(circle at 90% 90%, rgba(168, 85, 247, 0.06), transparent 40%);
  color: var(--color-text-primary);
  min-height: 100vh;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4, h5, h6 { font-family: 'Outfit', sans-serif; font-weight: 600; letter-spacing: -0.5px; }

/* Global App Container */
.app-root {
  width: 100vw; height: 100vh;
  position: relative;
  display: flex;
}

/* Sidebar Root (Glassmorphic) */
.global-sidebar {
  position: fixed;
  left: var(--space-4);
  top: 50%;
  transform: translateY(-50%);
  background-color: var(--sidebar-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.6);
  box-shadow: var(--glass-shadow);
  display: flex; flex-direction: column;
  padding: var(--space-3);
  gap: var(--space-1);
  width: max-content;
  max-width: 80px;
  border-radius: var(--radius-round);
  transition: max-width var(--motion-standard) var(--motion-easing), border-radius var(--motion-standard), opacity 0.3s ease, transform 0.3s ease;
  overflow: hidden;
  z-index: 100;
}

.app-root.sidebar-hidden .global-sidebar {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%) translateX(-150px);
}

.global-sidebar:hover {
  max-width: 280px;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
}

.global-sidebar-list {
  display: flex; flex-direction: column; gap: var(--space-1);
  list-style: none; margin: 0; padding: 0;
  max-height: calc(100vh - 120px);
  overflow-y: auto; scrollbar-width: none;
}
.global-sidebar-list::-webkit-scrollbar { display: none; }

.global-sidebar-item {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 0fr);
  align-items: center;
  height: 48px; min-height: 48px;
  border-radius: 24px;
  transition: all var(--motion-ui) var(--motion-easing);
  cursor: pointer; padding: 0; border: none; background: transparent;
  color: var(--color-text-secondary);
  font-family: inherit; font-size: 15px; font-weight: 600; text-align: left;
}

.global-sidebar:hover .global-sidebar-item {
  grid-template-columns: 48px minmax(0, 1fr);
}
.global-sidebar-item:hover {
  background-color: rgba(99,102,241,0.05);
  color: var(--accent-primary);
}
.global-sidebar-item[aria-current="page"] {
  background: var(--accent-gradient);
  color: var(--color-lightest);
  box-shadow: 0 8px 20px var(--accent-glow);
}
.global-sidebar-item[aria-current="page"] .sidebar-icon {
  color: var(--color-lightest);
}

.sidebar-icon-container {
  display: flex; align-items: center; justify-content: center;
  width: 48px; height: 48px;
}
.sidebar-icon {
  width: 22px; height: 22px;
  transition: color var(--motion-standard);
}

.sidebar-label {
  white-space: nowrap; opacity: 0;
  transition: opacity var(--motion-fast);
  padding-right: var(--space-4);
}
.global-sidebar:hover .sidebar-label { opacity: 1; transition-delay: 50ms; }

/* Main Content Area */
.app-content {
  flex-grow: 1;
  padding: 120px var(--space-6) var(--space-6) var(--space-6); /* Removed sidebar offset */
  overflow-y: auto; /* Faz 18: Enable scrolling so table items fit */
  display: flex; flex-direction: column; gap: var(--space-5);
  transition: padding-left 0.3s ease;
}

.app-root.sidebar-hidden .app-content {
  padding-left: var(--space-6);
}
  scrollbar-width: none;
}
.app-content::-webkit-scrollbar { display: none; }

/* Views */
.view-section {
  display: none;
  animation: fadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.view-section.active { display: flex; flex-direction: column; height: 100%; }

@keyframes fadeUp {
  0% { opacity: 0; transform: translateY(30px) scale(0.98); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* True Bento Grid (Phase 2) */
.bento-dashboard {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: minmax(150px, auto);
  gap: var(--space-5);
  margin-bottom: var(--space-5);
}

.bento-card {
  background: var(--color-surface-soft);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--card-shadow);
  display: flex; flex-direction: column; justify-content: center;
  position: relative; overflow: hidden;
}
.bento-card::before {
  content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 4px;
  background: var(--accent-gradient);
  opacity: 0; transition: opacity var(--motion-standard);
}
.bento-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}
.bento-card:hover::before { opacity: 1; }

.span-1x1 { grid-column: span 1; grid-row: span 1; }
.span-1x2 { grid-column: span 1; grid-row: span 2; }
.span-2x1 { grid-column: span 2; grid-row: span 1; }
.span-2x2 { grid-column: span 2; grid-row: span 2; }
.span-4x1 { grid-column: span 4; grid-row: span 1; }
.span-4x2 { grid-column: span 4; grid-row: span 2; }
.span-3x1 { grid-column: span 3; grid-row: span 1; }

.bento-card h3 {
  margin: 0 0 12px 0; font-size: 16px; font-weight: 600;
  color: var(--color-text-secondary); display: flex; align-items: center; gap: 8px;
}
.bento-card h3 i { color: var(--accent-primary); width: 18px; height: 18px; }

.bento-stat-large {
  font-family: 'Outfit', sans-serif; font-size: 64px; font-weight: 700;
  letter-spacing: -2px; color: var(--color-darkest); line-height: 1; margin-bottom: 8px;
}
.bento-stat-medium {
  font-family: 'Outfit', sans-serif; font-size: 36px; font-weight: 700;
  letter-spacing: -1px; color: var(--color-darkest); line-height: 1; margin-bottom: 8px;
}
.bento-subtitle { font-size: 14px; color: var(--color-text-secondary); }

/* Header */
.top-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: var(--space-2);
}
.page-title {
  font-size: 40px; font-weight: 700; letter-spacing: -1.5px;
  color: var(--color-darkest); margin: 0;
}

/* Table / Grid for Products */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-4);
  margin-top: var(--space-4);
}

/* Awwwards Level Item Card UX */
.item-card {
  background: var(--color-lightest);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 16px;
  display: flex; align-items: center; gap: 16px;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: default;
  box-shadow: 0 4px 12px rgba(15,23,42,0.02);
  position: relative;
  overflow: hidden;
}
.item-card::before {
  content: ''; position: absolute; top: 0; left: 0; width: 4px; height: 100%;
  background: transparent; transition: all 0.3s;
}
.item-card:hover {
  border-color: rgba(99,102,241,0.2);
}
.item-card:hover::before {
  background: var(--accent-gradient);
}
.item-card img, .ux-img-placeholder {
  width: 80px; height: 80px; border-radius: 12px; object-fit: cover;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  flex-shrink: 0;
}
.ux-img-placeholder {
  background: var(--color-surface-soft); display: flex; align-items: center; justify-content: center;
  color: var(--accent-primary);
}
.item-card-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.item-card-title {
  font-weight: 700; font-size: 16px; color: var(--color-darkest);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-family: 'Outfit', sans-serif;
}
.item-card-price { font-size: 15px; font-weight: 700; color: var(--accent-primary); }
.item-card-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.ux-badge {
  font-size: 11px; padding: 4px 8px; border-radius: 20px;
  display: inline-flex; align-items: center; gap: 4px; font-weight: 600;
}
.ux-badge i { width: 12px; height: 12px; }
.badge-gray { background: #F1F5F9; color: #475569; }
.badge-light { background: #F8FAFC; color: #64748B; border: 1px solid #E2E8F0; }
.badge-red { background: #FEF2F2; color: #EF4444; }
.badge-indigo { background: #EEF2FF; color: #4F46E5; }

.item-card-actions { display: flex; gap: 8px; margin-left: auto; align-items: center; }
.ux-action-btn {
  width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.2s ease; border: none;
}
.btn-edit { background: var(--color-surface-soft); color: var(--color-darkest); border: 1px solid var(--color-border); }
.btn-edit:hover { background: #E2E8F0; }
.btn-delete { background: #FEF2F2; color: #EF4444; }
.btn-delete:hover { background: #FEE2E2; }
.btn-recover { background: #ECFDF5; color: #10B981; }
.btn-recover:hover { background: #D1FAE5; }

/* Category Dividers in Grid */
.grid-category-divider {
  grid-column: 1 / -1;
  margin: 32px 0 16px 0; padding-bottom: 8px;
  border-bottom: 2px solid var(--color-border);
  display: flex; align-items: center; justify-content: space-between;
}
.grid-category-divider span:first-child {
  font-family: 'Outfit', sans-serif; font-size: 20px; font-weight: 800; color: var(--color-darkest);
  letter-spacing: -0.5px;
}
.grid-category-count {
  background: var(--color-surface-soft); color: var(--color-text-secondary);
  font-size: 13px; font-weight: 600; padding: 4px 12px; border-radius: 20px;
}

/* Buttons */
.btn-primary {
  background: var(--accent-gradient);
  color: #FFF;
  border: none;
  padding: 14px 28px;
  border-radius: var(--radius-round);
  font-size: 15px; font-weight: 600;
  cursor: pointer; transition: all var(--motion-ui);
  display: flex; align-items: center; gap: 8px;
  box-shadow: 0 8px 20px var(--accent-glow);
}
.btn-primary:hover {
}

/* Modals */
.modal-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15,23,42,0.4); backdrop-filter: blur(12px);
  z-index: 1000; display: none; align-items: center; justify-content: center;
}
.modal-overlay.active { display: flex; animation: fadeIn var(--motion-standard); }
.modal-content {
  background: var(--color-lightest);
  border: 1px solid rgba(255,255,255,0.8);
  border-radius: var(--radius-lg);
  padding: var(--space-6); width: 100%; max-width: 550px;
  box-shadow: 0 25px 50px -12px rgba(15,23,42,0.25);
}

/* Form Controls */
.form-control {
  width: 100%; padding: 16px 20px;
  background: #F8FAFC;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-darkest); font-family: inherit; font-size: 15px;
  margin-bottom: var(--space-4); transition: all var(--motion-fast);
}
.form-control:focus {
  outline: none; border-color: var(--accent-primary);
  background: var(--color-lightest);
  box-shadow: 0 0 0 4px rgba(99,102,241,0.1);
}

/* Filter Strip */
.filter-strip {
    display: flex; justify-content: space-between; align-items: center;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-round);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: var(--space-5);
    border: 1px solid rgba(255, 255, 255, 0.5);
    /* PHASE 3: Sticky Floating Action Bar */
    position: sticky;
    top: 90px; /* Below the top navigation bar */
    z-index: 50;
}

/* Kanban Orders (Phase 6) */
.kanban-board {
  display: flex; gap: var(--space-5); height: 100%; overflow-x: auto;
}
.kanban-col {
  flex: 1; min-width: 320px; background: rgba(255,255,255,0.5);
  border-radius: var(--radius-lg); border: 1px dashed var(--color-border);
  padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-3);
}
.kanban-header { font-family: 'Outfit', sans-serif; font-size: 15px; font-weight: 700; color: var(--color-darkest); text-transform: uppercase; letter-spacing: 1px; }
.kanban-card {
  background: var(--color-lightest); padding: var(--space-4);
  border-radius: var(--radius-md); box-shadow: 0 4px 12px rgba(15,23,42,0.03);
  cursor: grab; transition: transform var(--motion-fast);
}
.kanban-card:hover { }

@keyframes fadeIn {
  from { opacity: 0; backdrop-filter: blur(0px); }
  to { opacity: 1; backdrop-filter: blur(12px); }
}

/* Top Navigation Recovered */
.top-navigation-row {
  position: fixed;
  top: var(--space-4);
  left: var(--space-4); right: var(--space-4); /* Removed 120px offset */
  height: 64px;
  background: var(--color-lightest);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-round);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--space-2);
  box-shadow: var(--card-shadow);
  z-index: 90;
  transition: left 0.3s ease;
}

.app-root.sidebar-hidden .top-navigation-row {
  left: var(--space-4);
}
.top-subpage-capsule {
  display: flex; align-items: center; gap: 4px;
  background: #F1F5F9; border-radius: var(--radius-round);
  padding: 4px;
}
.subpage-tab {
  background: transparent; border: none;
  padding: 10px 20px; border-radius: 20px;
  font-family: 'Outfit', sans-serif; font-size: 14px; font-weight: 600;
  color: var(--color-text-secondary); cursor: pointer;
  transition: all 0.3s;
}
.subpage-tab.active, .subpage-tab:hover {
  background: var(--color-lightest); color: var(--accent-primary);
  box-shadow: 0 4px 10px rgba(15,23,42,0.05);
}
.user-light-capsule {
  display: flex; align-items: center; gap: 12px;
  padding-right: 12px;
}
.capsule-btn {
  background: transparent; border: none; cursor: pointer; color: var(--color-text-secondary);
}
.capsule-profile-btn {
  background: transparent; border: none; display: flex; align-items: center; gap: 12px; cursor: pointer;
}
.user-inner-avatar-light {
  width: 40px; height: 40px; border-radius: 50%;
}

/* --- LOGIN SCREEN ANIMATIONS --- */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-10px); }
    20%, 40%, 60%, 80% { transform: translateX(10px); }
}
.error-shake {
    animation: shake 0.6s cubic-bezier(.36,.07,.19,.97) both;
    border-color: #ef4444 !important;
}

/* --- LUXURY TOGGLE SWITCH (Active/Passive) --- */
.luxury-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.luxury-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.luxury-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: var(--color-border);
  transition: .4s;
  border-radius: 24px;
}

.luxury-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

input:checked + .luxury-slider {
  background: var(--accent-gradient);
}

input:checked + .luxury-slider:before {
  transform: translateX(20px);
}

.item-inactive {
  opacity: 0.5;
  filter: grayscale(0.5);
  transition: all 0.3s ease;
}

/* --- FAZ 7: RESPONSIVE (MOBIL UYUM) --- */
@media (max-width: 1024px) {
    /* Sol menü daralsın */
    .global-sidebar { width: 80px; }
    .global-sidebar-item { grid-template-columns: 48px 0; justify-content: center; }
    .global-sidebar:hover .global-sidebar-item { grid-template-columns: 48px 0; }
    .sidebar-label, .global-sidebar:hover .sidebar-label { display: none; }
    
    /* Tablo kapsayıcısı yana kaysın (Scroll) */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
        margin-bottom: 24px;
    }
    
    /* Tablo daha kompakt olsun */
    .data-table th, .data-table td {
        padding: 12px;
        font-size: 13px;
    }
    
    /* Kontrol çubuğu alt alta dizilsin */
    .controls-bar {
        flex-direction: column;
        align-items: stretch !important;
        gap: 16px;
    }
    .controls-bar > div:last-child {
        flex-direction: column;
        align-items: stretch !important;
        width: 100%;
    }
    .controls-bar > div:last-child > div { width: 100% !important; }
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 9999;
  pointer-events: none;
}
.toast {
  background: var(--color-surface-soft);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--color-border);
  box-shadow: 0 12px 32px rgba(15,23,42,0.15);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--color-darkest);
  font-weight: 500;
  font-size: 14px;
  pointer-events: auto;
  max-width: 320px;
}
.toast.toast-success { border-left: 4px solid #10B981; }
.toast.toast-error { border-left: 4px solid #EF4444; }
.toast.toast-info { border-left: 4px solid var(--accent-primary); }
.toast-icon { width: 20px; height: 20px; flex-shrink: 0; }
.toast-success .toast-icon { color: #10B981; }
.toast-error .toast-icon { color: #EF4444; }
.toast-info .toast-icon { color: var(--accent-primary); }


/* --- HORIZONTAL CATEGORY BAR --- */
.category-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
}
.category-nav::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Edge */
}

.cat-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 100px;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-text);
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.cat-btn:hover {
    border-color: var(--color-darkest);
}

.cat-btn.active {
    background: var(--color-darkest);
    color: white;
    border-color: var(--color-darkest);
}

/* --- BENTO MODAL & INPUT STYLES --- */
.bento-modal {
    border-radius: 24px !important;
    background: var(--color-lightest) !important;
    border: 1px solid rgba(255, 255, 255, 0.8) !important;
    box-shadow: 0 40px 80px rgba(15, 23, 42, 0.1) !important;
}

.bento-input-group {
    background: var(--color-surface-soft);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 20px;
    transition: all 0.3s ease;
}

.bento-input-group:hover {
    border-color: rgba(15, 23, 42, 0.1);
}

.bento-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.bento-input {
    background: var(--color-lightest) !important;
    border: 1px solid transparent !important;
    border-radius: 12px !important;
    padding: 14px 16px !important;
    font-size: 14px !important;
    color: var(--color-darkest) !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02) !important;
    transition: all 0.3s ease !important;
}

.bento-input:focus {
    border-color: var(--accent-primary) !important;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1) !important;
    background: white !important;
}

/* --- BENTO DATA TABLE --- */
.bento-table-card {
    background: var(--color-lightest);
    border-radius: 24px;
    border: 1px solid var(--color-border);
    padding: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
}

.data-table tr {
    transition: all 0.2s ease;
}
.data-table tbody tr:hover {
    transform: scale(1.005);
    background: var(--color-surface-soft) !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border-radius: 12px;
    z-index: 10;
    position: relative;
}

.pill-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.2px;
    white-space: nowrap;
}
.pill-active { background: rgba(16, 185, 129, 0.1); color: #10B981; }
.pill-inactive { background: rgba(239, 68, 68, 0.1); color: #EF4444; }
.pill-neutral { background: rgba(15, 23, 42, 0.05); color: var(--color-text-secondary); }
.pill-accent { background: rgba(99, 102, 241, 0.1); color: var(--accent-primary); }

/* --- BENTO SEARCH --- */
.bento-search-input {
    width: 240px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.bento-search-input:focus {
    width: 280px !important;
    background: white !important;
    border-color: var(--accent-primary) !important;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1) !important;
}

/* Bento Grid Mobile Fallback */
@media (max-width: 768px) {
    .bento-dashboard {
        grid-template-columns: 1fr !important;
        gap: 16px;
    }
    .span-1x2, .span-1x1, .span-2x1, .span-2x2, .span-3x1, .span-4x1, .span-4x2 {
        grid-column: span 1 !important;
        grid-row: auto !important;
    }
    .top-navigation-row {
        grid-template-columns: 1fr !important;
        gap: 16px;
        padding: 16px;
    }
    .user-light-capsule {
        justify-self: start !important;
        margin-right: 0 !important;
    }
}

/* --- MISSING ITEM MODAL OVERLAY STYLES --- */
.item-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.item-modal-overlay.active {
    display: flex !important;
    opacity: 1;
}

.item-modal-content {
    background: var(--color-surface);
    width: 100%;
    max-width: 600px;
    border-radius: 24px;
    box-shadow: 0 24px 48px rgba(0,0,0,0.15);
}

/* ALLERGEN TOGGLE BUTTONS */
.allergen-toggle-btn {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 100px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.allergen-toggle-btn:hover {
    background: var(--color-border);
    color: var(--color-darkest);
}
.allergen-toggle-btn.active {
    background: rgba(99,102,241,0.1);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}
