/* ==========================================================================
   RestoApp Admin Portal - Complete Unified CSS Architecture (Zero Omissions)
   ========================================================================== */

/* Local icon font; UI text uses the native system stack for a smaller, faster first paint. */
@font-face {
  font-family: 'Material Symbols Outlined';
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url('../fonts/material-symbols-outlined-400.ttf') format('truetype');
}

/* Production responsive and accessibility hardening */
button, [role="button"], .btn-modern-primary, .btn-modern-secondary, .admin-back-btn,
.bottom-nav-item, .drawer-tile, .sidebar-signout-btn, .alert-close-btn {
  min-height: 40px;
}

button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid #22d3ee !important;
  outline-offset: 2px !important;
}

.admin-main, .admin-content-area, .admin-content-area > *, .dashboard-grid > *, .kpi-grid > * {
  min-width: 0;
}

.header-page-title, .card-header-title, .card-header-desc, .kpi-label, .kpi-value {
  overflow-wrap: anywhere;
}

@media (max-width: 768px) {
  button, [role="button"], .btn-modern-primary, .btn-modern-secondary, .admin-back-btn,
  .bottom-nav-item, .drawer-tile, .sidebar-signout-btn, .alert-close-btn {
    min-height: 48px;
  }
  input:not([type="checkbox"]):not([type="radio"]), select, textarea {
    min-height: 48px;
    font-size: 16px !important;
  }
  .admin-content-area {
    padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  }
  .admin-bottom-nav {
    height: calc(64px + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

.material-symbols-outlined {
  font-family: 'Material Symbols Outlined', sans-serif !important;
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'liga';
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.material-symbols-outlined.fill {
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

:root {
  --font-primary: 'Inter', 'Noto Sans Devanagari', 'Nirmala UI', 'Mangal', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', 'Noto Sans Devanagari', 'Nirmala UI', 'Mangal', system-ui, -apple-system, sans-serif;

  /* Color Tokens */
  --color-canvas: #f8fafc;
  --color-surface: #ffffff;
  --color-sidebar: #0f172a;
  --color-sidebar-border: rgba(255, 255, 255, 0.08);
  
  --color-primary: #4f46e5;
  --color-primary-dark: #3730a3;
  --color-primary-light: #eef2ff;
  
  --color-text-main: #0f172a;
  --color-text-muted: #64748b;
  --color-text-light: #94a3b8;
  
  --color-border: #e2e8f0;
  --color-border-subtle: #f1f5f9;
  
  --color-success: #16a34a;
  --color-success-bg: #f0fdf4;
  --color-success-border: #bbf7d0;
  
  --color-warning: #f59e0b;
  --color-warning-bg: #fffbeb;
  --color-warning-border: #fde68a;
  
  --color-danger: #dc2626;
  --color-danger-bg: #fef2f2;
  --color-danger-border: #fecaca;
  
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.02);
  --shadow-card: 0 2px 8px -2px rgba(15, 23, 42, 0.06), 0 1px 4px -1px rgba(15, 23, 42, 0.04);
  --shadow-card-hover: 0 12px 24px -6px rgba(79, 70, 229, 0.16), 0 4px 12px -2px rgba(15, 23, 42, 0.06);
}

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

body {
  font-family: var(--font-primary);
  background-color: var(--color-canvas);
  color: var(--color-text-main);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}

/* Anchor tags: kill default blue underline */
a {
  color: inherit;
  text-decoration: none;
}
a:hover {
  text-decoration: none;
}

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

input, select, textarea {
  font-family: inherit;
}

/* ==========================================================================
   Layout Shell (Desktop & Mobile)
   ========================================================================== */
.admin-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
  width: 100%;
}

.admin-sidebar {
  width: 260px;
  background-color: var(--color-sidebar);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid var(--color-sidebar-border);
  height: 100vh;
  position: sticky;
  top: 0;
  z-index: 30;
  overflow-y: auto;
}

.admin-main {
  min-width: 0;
  min-height: 100vh;
  background-color: var(--color-canvas);
  display: flex;
  flex-direction: column;
}

.admin-header {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  padding: 1rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 20;
}

.admin-content-area {
  padding: 1.25rem 1.75rem 3rem 1.75rem;
  flex: 1;
}

.admin-notices-area {
  position: fixed;
  top: 1rem;
  right: 1.5rem;
  z-index: 1200;
  width: min(420px, calc(100vw - 2rem));
  padding: 0;
  pointer-events: none;
}

.admin-toast {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .75rem;
  width: 100%;
  padding: .9rem 1rem;
  border: 1px solid;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, .18);
  color: #0f172a;
  pointer-events: auto;
  animation: admin-toast-enter .22s ease-out both;
}

.admin-toast + .admin-toast { margin-top: .65rem; }
.admin-toast-content { display: flex; align-items: flex-start; gap: .7rem; min-width: 0; }
.admin-toast-message { padding-top: .08rem; font-size: .875rem; line-height: 1.4; font-weight: 650; overflow-wrap: anywhere; }
.admin-toast-icon { flex: 0 0 auto; font-size: 1.3rem; }
.alert-notice { border-color: #a7f3d0; background: #ecfdf5; color: #065f46; }
.alert-error { border-color: #fecaca; background: #fff1f2; color: #9f1239; }
.admin-toast .alert-close-btn {
  flex: 0 0 32px;
  width: 32px;
  min-height: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: currentColor;
  opacity: .7;
}
.admin-toast .alert-close-btn:hover { background: rgba(15, 23, 42, .08); opacity: 1; }
.admin-toast .alert-close-btn .material-symbols-outlined { font-size: 1.1rem; }

@keyframes admin-toast-enter {
  from { opacity: 0; transform: translateY(-8px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 767px) {
  .admin-notices-area { top: .75rem; right: 1rem; left: 1rem; width: auto; }
  .admin-toast { padding: .8rem .85rem; }
  .admin-toast .alert-close-btn { min-height: 36px; width: 36px; height: 36px; }
}

/* ==========================================================================
   Sidebar Elements
   ========================================================================== */
.sidebar-brand-wrapper {
  padding: 1.25rem;
  border-bottom: 1px solid var(--color-sidebar-border);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sidebar-brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #0d9488, #059669);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.4);
  flex-shrink: 0;
  overflow: hidden;
}

.sidebar-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 10px;
  background: #ffffff;
  padding: 3px;
  display: block;
}

.sidebar-brand-info {
  overflow: hidden;
}

.sidebar-restaurant-title {
  font-size: 14px;
  font-weight: 800;
  color: #f8fafc;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
}

.sidebar-suite-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
}

.sidebar-nav-list {
  padding: 0.75rem 0.625rem;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.sidebar-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  color: #cbd5e1;
  transition: all 0.15s ease;
}

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

.sidebar-nav-link.active {
  font-weight: 700;
  color: #ffffff;
  background: linear-gradient(90deg, #0d9488, #0f766e);
  box-shadow: 0 2px 8px rgba(13, 148, 136, 0.3);
}

.sidebar-footer-wrapper {
  padding: 0.75rem 0.625rem;
  border-top: 1px solid var(--color-sidebar-border);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar-pos-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(13, 148, 136, 0.12);
  color: #2dd4bf;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  transition: all 0.15s ease;
}

.sidebar-pos-button:hover {
  background: rgba(13, 148, 136, 0.2);
}

.sidebar-user-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
}

.sidebar-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #1e293b;
  color: #2dd4bf;
  font-weight: 800;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sidebar-user-name {
  font-size: 12px;
  font-weight: 700;
  color: #f8fafc;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user-email {
  font-size: 10px;
  font-weight: 500;
  color: #64748b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-signout-btn {
  color: #94a3b8;
  display: flex;
  align-items: center;
  padding: 4px;
  border-radius: 6px;
  transition: color 0.15s ease;
}

.sidebar-signout-btn:hover {
  color: #f43f5e;
}

/* ==========================================================================
   Header Elements
   ========================================================================== */
.header-brand-block {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1 1 auto;
}

.header-brand-block > div { min-width: 0; }
.header-actions { flex: 0 0 auto; }

.admin-back-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #0f172a;
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.admin-back-btn:active {
  transform: scale(0.92);
  background: #f1f5f9;
}

.header-page-title {
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.header-page-subtitle {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  margin-top: 1px;
}

.header-mobile-pos-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 8px;
  background: #f0fdfa;
  color: #0d9488;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid #ccfbf1;
}

.header-live-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 9999px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #047857;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ==========================================================================
   Card Architecture
   ========================================================================== */
.card-premium {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 1.25rem;
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.card-premium:hover {
  border-color: rgba(13, 148, 136, 0.35);
  box-shadow: var(--shadow-card-hover);
}

.card-compact {
  padding: 1.25rem 1.5rem;
}

.card-table-wrapper {
  padding: 0;
  overflow: hidden;
}

.card-header-bar {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.card-header-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--color-text-main);
}

.card-header-desc {
  font-size: 12px;
  color: var(--color-text-muted);
  margin: 2px 0 0 0;
}

.card-counter-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--color-primary);
  background: var(--color-primary-light);
  padding: 4px 12px;
  border-radius: 9999px;
  white-space: nowrap;
}

.card-counter-badge-muted {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  background: #f1f5f9;
  padding: 4px 12px;
  border-radius: 9999px;
  white-space: nowrap;
}

/* Bento Cards Specific */
.bento-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
}
.bento-card:hover .bento-arrow {
  transform: translateX(4px);
}
.bento-arrow {
  transition: transform 0.2s ease;
}

/* KPI Hero Cards */
.kpi-hero {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 1.25rem;
  padding: 1.35rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: all 0.25s ease;
}

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

.kpi-hero-primary {
  background: linear-gradient(135deg, #0f766e 0%, #0d9488 60%, #14b8a6 100%);
  color: #ffffff !important;
  border: 1px solid rgba(20, 184, 166, 0.3);
}

.kpi-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kpi-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
}

.kpi-hero-primary .kpi-label {
  color: rgba(255, 255, 255, 0.85);
}

.kpi-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--color-text-main);
  letter-spacing: -0.02em;
  line-height: 1;
  margin-top: 1rem;
}

.kpi-hero-primary .kpi-value {
  color: #ffffff;
}

.kpi-subtext {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-muted);
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.kpi-hero-primary .kpi-subtext {
  color: rgba(255, 255, 255, 0.85);
}

.kpi-icon-glass {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

/* Icon Badges */
.icon-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  flex-shrink: 0;
}

.icon-box-sm {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.icon-box-teal   { background: #f0fdfa; color: #0d9488; }
.icon-box-blue   { background: #eff6ff; color: #2563eb; }
.icon-box-purple { background: #faf5ff; color: #7c3aed; }
.icon-box-amber  { background: #fffbeb; color: #d97706; }
.icon-box-emerald{ background: #ecfdf5; color: #059669; }
.icon-box-rose   { background: #fff1f2; color: #e11d48; }

/* Status Badges */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.status-in-stock {
  background: var(--color-success-bg);
  color: var(--color-success);
  border: 1px solid var(--color-success-border);
}

.status-low-stock, .status-sold-out {
  background: var(--color-danger-bg);
  color: var(--color-danger);
  border: 1px solid var(--color-danger-border);
}

.status-occupied {
  background: var(--color-warning-bg);
  color: var(--color-warning);
  border: 1px solid var(--color-warning-border);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: currentColor;
}

.pulse-dot {
  animation: pulseDot 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

/* ==========================================================================
   Menu & Dishes System
   ========================================================================== */
.dish-modern-card {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: 1.25rem;
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.dish-modern-card:hover {
  border-color: rgba(13, 148, 136, 0.4);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}

.type-indicator {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
}
.type-veg { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.type-nonveg { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }

/* Filter Pill Bar */
.filter-pills-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.filter-pills-bar::-webkit-scrollbar { display: none; }

.filter-pill {
  padding: 8px 16px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid var(--color-border);
  background: #ffffff;
  color: var(--color-text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  user-select: none;
}
.filter-pill:hover {
  background: #f1f5f9;
  color: var(--color-text-main);
}
.filter-pill.active {
  background: var(--color-primary);
  color: #ffffff;
  border-color: var(--color-primary);
  box-shadow: 0 2px 8px rgba(13, 148, 136, 0.25);
}

/* Modern Search Input */
.search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}
.search-wrapper input {
  width: 100%;
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 10px 14px 10px 38px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-main);
  transition: all 0.2s ease;
}
.search-wrapper input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.12);
}
.search-wrapper .search-icon {
  position: absolute;
  left: 12px;
  color: var(--color-text-light);
  font-size: 18px;
  pointer-events: none;
}

/* ==========================================================================
   Table Components
   ========================================================================== */
.table-container {
  overflow-x: auto;
  width: 100%;
}

.table-modern {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}

.table-modern thead {
  background: #f8fafc;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.table-modern th {
  padding: 12px 18px;
}

.table-modern td {
  padding: 14px 18px;
  border-bottom: 1px solid #f1f5f9;
}

.table-modern tr:hover td {
  background: #fcfdfe;
}

/* Mobile Data Cards */
.mobile-card-list {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mobile-data-card {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow-sm);
}

.mobile-data-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.mobile-data-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid var(--color-border-subtle);
  font-size: 12px;
}

@media (max-width: 768px) {
  .simple-invoice-admin-mobile-list {
    padding: 8px;
    gap: 8px;
  }

  .simple-invoice-admin-mobile-card {
    padding: 10px 12px;
    gap: 8px;
    border-radius: 12px;
  }

  .simple-invoice-admin-mobile-card .mobile-data-card-header {
    align-items: flex-start;
  }

  .simple-invoice-admin-mobile-card .card-header-title {
    font-size: 14px;
    line-height: 18px;
  }

  .simple-invoice-admin-mobile-card .card-header-desc {
    font-size: 10px;
    line-height: 14px;
  }

  .simple-invoice-admin-mobile-card .status-pill {
    padding: 3px 8px;
    font-size: 9px;
  }

  .simple-invoice-admin-mobile-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
    gap: 7px 14px;
  }

  .simple-invoice-admin-mobile-grid > div {
    min-width: 0;
  }

  .simple-invoice-admin-mobile-grid span,
  .simple-invoice-admin-mobile-grid small {
    display: block;
    color: #94a3b8;
    font-size: 9px;
    line-height: 12px;
    font-weight: 700;
    text-transform: uppercase;
  }

  .simple-invoice-admin-mobile-grid small {
    color: #64748b;
    font-size: 10px;
    text-transform: none;
  }

  .simple-invoice-admin-mobile-grid strong {
    display: block;
    color: #1e293b;
    font-size: 12px;
    line-height: 16px;
    overflow-wrap: anywhere;
  }

  .simple-invoice-admin-mobile-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(64px, 1fr));
    gap: 4px;
    padding-top: 7px;
  }

  .simple-invoice-admin-mobile-actions form {
    min-width: 0;
  }

  .simple-invoice-admin-mobile-actions .btn-modern-secondary {
    width: 100%;
    min-width: 0;
    min-height: 38px;
    padding: 5px 3px;
    gap: 3px;
    border-radius: 8px;
    font-size: 10px;
    box-shadow: none;
  }

  .simple-invoice-admin-mobile-actions .material-symbols-outlined {
    font-size: 17px;
  }
}

/* ==========================================================================
   Form Controls
   ========================================================================== */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
}

.form-input, .form-select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--color-border);
  background: #f8fafc;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-main);
  transition: all 0.2s ease;
}

.form-input:focus, .form-select:focus {
  outline: none;
  background: #ffffff;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.12);
}

/* Buttons */
.simple-invoice-admin-page-header {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.simple-invoice-admin-page-title {
  min-width: 0;
}

.simple-invoice-admin-page-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
}

.simple-invoice-admin-page-actions .btn-modern-primary,
.simple-invoice-admin-page-actions .btn-modern-secondary {
  white-space: nowrap;
}

@media (min-width: 768px) {
  .simple-invoice-admin-page-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .simple-invoice-admin-page-title h1 {
    white-space: nowrap;
  }

  .simple-invoice-admin-page-actions {
    flex: 0 0 auto;
    flex-wrap: nowrap;
    margin-left: auto;
  }
}

.btn-modern-primary {
  background: var(--color-primary);
  color: #ffffff;
  border: none;
  font-weight: 700;
  font-size: 13px;
  padding: 10px 18px;
  border-radius: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 2px 6px rgba(13, 148, 136, 0.25);
  transition: all 0.15s ease;
  text-decoration: none;
}

.btn-modern-primary:hover {
  background: var(--color-primary-dark);
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.35);
  transform: translateY(-1px);
}

.btn-modern-primary:active {
  transform: scale(0.98);
}

.btn-modern-secondary {
  background: #ffffff;
  color: var(--color-text-main);
  border: 1px solid var(--color-border);
  font-weight: 600;
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: var(--shadow-sm);
  transition: all 0.15s ease;
  text-decoration: none;
}

.btn-modern-secondary:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

/* Visibility Utilities */
.hidden {
  display: none !important;
}

/* Logo Upload Component */
.logo-upload-container {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.25rem;
  background: #f8fafc;
  border: 1.5px dashed var(--color-border);
  border-radius: 14px;
  transition: all 0.2s ease;
}

.logo-upload-container:hover {
  border-color: var(--color-primary);
  background: #f1f5f9;
}

.logo-preview-box {
  width: 88px;
  height: 88px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
}

.logo-preview-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 6px;
  display: block;
}

.logo-preview-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--color-text-light);
}

.logo-upload-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
  flex: 1;
}

.btn-modern-danger-sm {
  background: #fff1f2;
  color: #e11d48;
  border: 1px solid #fecdd3;
  font-weight: 600;
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.btn-modern-danger-sm:hover {
  background: #ffe4e6;
}

/* Modern Toggle Switch */
.switch-box {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 26px;
  flex-shrink: 0;
  cursor: pointer;
}

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

.switch-slider {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #cbd5e1;
  border-radius: 26px;
  transition: 0.2s ease;
}

.switch-knob {
  position: absolute;
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  transition: 0.2s ease;
}

.switch-input:checked + .switch-slider {
  background-color: #0d9488;
}

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

/* ==========================================================================
   Hardware & Capacity
   ========================================================================== */
.progress-track {
  width: 100%;
  background: #f1f5f9;
  height: 6px;
  border-radius: 9999px;
  overflow: hidden;
}

.progress-fill {
  background: linear-gradient(90deg, #0d9488, #10b981);
  height: 100%;
  border-radius: 9999px;
}

.hardware-tile {
  padding: 1rem;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid var(--color-border);
  text-align: center;
}

.hardware-number {
  font-size: 26px;
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1;
}

.hardware-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--color-text-main);
  margin-top: 4px;
  text-transform: uppercase;
}

.hardware-sub {
  font-size: 10px;
  color: var(--color-text-light);
}

/* ==========================================================================
   Dining Floor Plan
   ========================================================================== */
.dining-floor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--color-border);
  flex-wrap: wrap;
  gap: 8px;
}

.table-box {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.table-box-occupied {
  background: #fffbeb;
  border-color: #fde68a;
}

.table-box-billed {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.table-box-name {
  font-size: 15px;
  font-weight: 800;
  color: var(--color-text-main);
}

.table-box-cap {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-muted);
}

/* ==========================================================================
   Settings
   ========================================================================== */
.setting-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 1.25rem;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid var(--color-border);
}

.setting-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--color-text-main);
  cursor: pointer;
  display: block;
}

.setting-desc {
  font-size: 12px;
  color: var(--color-text-muted);
  margin: 4px 0 0 0;
  line-height: 1.4;
}

/* Outlets Card */
.outlet-code-badge {
  font-weight: 800;
  color: var(--color-text-main);
  background: #f1f5f9;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  display: inline-block;
}

.outlet-verified-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  gap: 2px;
}

/* ==========================================================================
   Hourly Sales Bar Chart
   ========================================================================== */
.chart-bar-container {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  overflow-x: auto;
  height: 140px;
  padding-bottom: 8px;
  padding-top: 16px;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.chart-bar-container::-webkit-scrollbar { display: none; }

.chart-bar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  min-width: 32px;
  height: 100%;
  justify-content: flex-end;
}

.chart-slot {
  width: 100%;
  height: 90px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background-color: #f1f5f9;
  border-radius: 6px;
  padding: 2px;
}

.chart-bar {
  width: 100%;
  background: linear-gradient(180deg, #14b8a6 0%, #0d9488 100%);
  border-top-left-radius: 6px;
  border-top-right-radius: 6px;
  transition: all 0.3s ease;
  cursor: pointer;
}
.chart-bar:hover {
  background: linear-gradient(180deg, #2dd4bf 0%, #0f766e 100%);
  transform: scaleY(1.05);
}

/* ==========================================================================
   Android Mobile Bottom Navigation & Drawer
   ========================================================================== */
.admin-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 68px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(226, 232, 240, 0.8);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 50;
  box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.05);
  padding: 0 0.5rem;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  height: 100%;
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
  gap: 3px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.bottom-nav-item:active {
  transform: scale(0.92);
}

.bottom-nav-item.active {
  color: var(--color-primary);
}

.bottom-nav-item.active .nav-icon-pill {
  background-color: var(--color-primary-light);
  color: var(--color-primary-dark);
}

.nav-icon-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 28px;
  border-radius: 14px;
  transition: all 0.2s ease;
}

.mobile-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
}
.mobile-drawer-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.mobile-drawer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #ffffff;
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  padding: 1.25rem;
  z-index: 101;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.15);
  max-height: 80vh;
  overflow-y: auto;
}
.mobile-drawer.open {
  transform: translateY(0);
}

.drawer-drag-handle {
  width: 40px;
  height: 4px;
  background-color: #cbd5e1;
  border-radius: 2px;
  margin: 0 auto 16px auto;
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--color-border);
}

.drawer-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 1.5rem;
}

.drawer-tile {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  text-decoration: none;
  color: #0f172a;
}

/* ==========================================================================
   Utilities (Colors, Typography, Flex, Grid)
   ========================================================================== */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-1 { flex: 1 1 0%; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.flex-wrap { flex-wrap: wrap; }

.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.col-span-1 { grid-column: span 1 / span 1; }
.col-span-2 { grid-column: span 2 / span 2; }
.col-span-3 { grid-column: span 3 / span 3; }
.col-span-4 { grid-column: span 4 / span 4; }
.col-span-full { grid-column: 1 / -1; }

.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-5 { gap: 1.25rem; }
.gap-6 { gap: 1.5rem; }

.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }

.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }

.text-teal-600 { color: #0d9488 !important; }
.text-teal-700 { color: #0f766e !important; }
.text-emerald-600 { color: #059669 !important; }
.text-emerald-700 { color: #047857 !important; }
.text-blue-600 { color: #2563eb !important; }
.text-purple-600 { color: #7c3aed !important; }
.text-amber-700 { color: #b45309 !important; }
.text-rose-600 { color: #e11d48 !important; }
.text-slate-400 { color: #94a3b8 !important; }
.text-slate-500 { color: #64748b !important; }
.text-slate-600 { color: #475569 !important; }
.text-slate-800 { color: #1e293b !important; }
.text-slate-900 { color: #0f172a !important; }
.text-white { color: #ffffff !important; }

.bg-slate-50 { background-color: #f8fafc !important; }
.bg-slate-100 { background-color: #f1f5f9 !important; }
.bg-white { background-color: #ffffff !important; }

.rounded-md { border-radius: 0.375rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-full { border-radius: 9999px; }

.border-t { border-top-width: 1px; border-top-style: solid; }
.border-b { border-bottom-width: 1px; border-bottom-style: solid; }
.border-slate-100 { border-color: #f1f5f9; }
.border-slate-200 { border-color: #e2e8f0; }

.w-full { width: 100%; }
.max-w-2xl { max-width: 42rem; }
.capitalize { text-transform: capitalize; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.cursor-pointer { cursor: pointer; }
.line-none { line-height: 1; }

.mt-0\.5 { margin-top: 0.125rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-1\.5 { margin-top: 0.375rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.ml-1 { margin-left: 0.25rem; }
.ml-2 { margin-left: 0.5rem; }

.p-0\.5 { padding: 0.125rem; }
.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.pt-2 { padding-top: 0.5rem; }
.pt-3 { padding-top: 0.75rem; }
.pt-4 { padding-top: 1rem; }

/* Responsive Breakpoints */
@media (max-width: 768px) {
  .admin-shell {
    grid-template-columns: 1fr;
    display: block;
    padding-bottom: 84px;
  }
  .admin-sidebar {
    display: none !important;
  }
  .admin-header {
    padding: 0.875rem 1rem;
    gap: 8px;
    min-width: 0;
  }
  .admin-content-area {
    padding: 1rem 1rem 3rem 1rem;
  }
  .desktop-only {
    display: none !important;
  }
  .header-actions { gap: 8px; }
  .header-mobile-pos-btn { padding: 6px 9px; }
  .header-live-badge { padding: 5px 9px; letter-spacing: .03em; }
}

@media (max-width: 420px) {
  .header-mobile-pos-btn span:last-child { display: none; }
  .header-mobile-pos-btn { width: 48px; justify-content: center; padding: 6px; }
  .header-page-title { font-size: 16px; line-height: 1.3; }
}

@media (max-width: 360px) {
  .header-mobile-pos-btn { display: none; }
  .header-page-title { font-size: 15px; }
}

@media (min-width: 769px) {
  .mobile-only {
    display: none !important;
  }
}

@media (min-width: 640px) {
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sm\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sm\:col-span-1 { grid-column: span 1 / span 1; }
  .sm\:col-span-2 { grid-column: span 2 / span 2; }
}
@media (min-width: 768px) {
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .lg\:grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
  .lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .lg\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .lg\:grid-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .lg\:col-span-1 { grid-column: span 1 / span 1; }
  .lg\:col-span-2 { grid-column: span 2 / span 2; }
}
@media (min-width: 1280px) {
  .xl\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .xl\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ==========================================================================
   Kitchen Display System (KDS) - Modern, Compact & Color-Coded
   ========================================================================== */

.kds-header-panel {
    background: #ffffff;
    border: 1px solid #dbe4f0;
    border-radius: 16px;
    padding: 12px 16px;
    box-shadow: 0 4px 18px rgba(15, 23, 42, .05);
    margin-bottom: 16px;
}

.kds-header-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.kds-title-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.kds-title-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: linear-gradient(135deg, #4f46e5, #2563eb);
    box-shadow: 0 3px 10px rgba(79, 70, 229, .24);
    flex-shrink: 0;
}

.kds-eyebrow {
    margin: 0;
    color: #64748b;
    font-size: 10px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.kds-page-title {
    margin: 0;
    color: #0f172a;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -.01em;
}

.kds-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.kds-sync-pill {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #047857;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.kds-pulse-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10b981;
    animation: kdsDotPulse 1.5s infinite;
}

@keyframes kdsDotPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.3); }
}

@keyframes kdsSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.animate-spin {
    animation: kdsSpin 0.8s linear infinite !important;
}

.kds-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0 11px;
    height: 33px;
    border-radius: 9px;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    border: 1px solid transparent;
}

.kds-action-btn strong {
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .75);
    color: currentColor;
    font-size: 9.5px;
}

.kds-action-emerald {
    background: #059669;
    color: #ffffff;
}
.kds-action-emerald:hover { background: #047857; }

.kds-action-amber {
    background: #fffbeb;
    color: #b45309;
    border-color: #fde68a;
}
.kds-action-amber:hover { background: #fef3c7; }

.kds-action-neutral {
    background: #f8fafc;
    color: #334155;
    border-color: #cbd5e1;
}
.kds-action-neutral:hover { background: #f1f5f9; }

/* Filter Bar & Semantic Color Pills */
.kds-filter-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    padding-top: 10px;
    margin-top: 10px;
    border-top: 1px solid #f1f5f9;
}

.kds-filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 12px;
    height: 31px;
    min-height: 31px;
    border-radius: 9999px;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    border: 1px solid transparent;
    user-select: none;
    box-sizing: border-box;
}

.kds-filter-count {
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9999px;
    font-size: 10px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* ALL */
.kds-filter-pill.kds-pill-all {
    background: #ffffff;
    border-color: #cbd5e1;
    color: #334155;
}
.kds-filter-pill.kds-pill-all:hover { background: #f8fafc; border-color: #94a3b8; }
.kds-filter-pill.kds-pill-all .kds-filter-count {
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #e2e8f0;
}
.kds-filter-pill.kds-pill-all:hover,
.kds-filter-pill.kds-pill-all.active {
    background: #ffffff !important;
    border-color: #cbd5e1 !important;
    color: #1e293b !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .06) !important;
}
.kds-filter-pill.kds-pill-all.active .kds-filter-count,
.kds-filter-pill.kds-pill-all:hover .kds-filter-count {
    background: #f1f5f9 !important;
    color: #1e293b !important;
    border-color: #cbd5e1 !important;
}

/* NEW */
.kds-filter-pill.kds-pill-new {
    background: #fffbeb;
    border-color: #fde68a;
    color: #b45309;
}
.kds-filter-pill.kds-pill-new:hover,
.kds-filter-pill.kds-pill-new.active {
    background: #fef3c7 !important;
    border-color: #fcd34d !important;
    color: #b45309 !important;
    box-shadow: 0 1px 3px rgba(245, 158, 11, .15) !important;
}
.kds-filter-pill.kds-pill-new .kds-filter-count,
.kds-filter-pill.kds-pill-new.active .kds-filter-count {
    background: #ffffff !important;
    color: #b45309 !important;
    border: 1px solid #fde68a !important;
}

/* COOKING / PREP */
.kds-filter-pill.kds-pill-cooking {
    background: #f0f9ff;
    border-color: #bae6fd;
    color: #0369a1;
}
.kds-filter-pill.kds-pill-cooking:hover,
.kds-filter-pill.kds-pill-cooking.active {
    background: #e0f2fe !important;
    border-color: #7dd3fc !important;
    color: #0369a1 !important;
    box-shadow: 0 1px 3px rgba(2, 132, 199, .15) !important;
}
.kds-filter-pill.kds-pill-cooking .kds-filter-count,
.kds-filter-pill.kds-pill-cooking.active .kds-filter-count {
    background: #ffffff !important;
    color: #0369a1 !important;
    border: 1px solid #bae6fd !important;
}

/* READY */
.kds-filter-pill.kds-pill-ready {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #047857;
}
.kds-filter-pill.kds-pill-ready:hover,
.kds-filter-pill.kds-pill-ready.active {
    background: #d1fae5 !important;
    border-color: #6ee7b7 !important;
    color: #047857 !important;
    box-shadow: 0 1px 3px rgba(16, 185, 129, .15) !important;
}
.kds-filter-pill.kds-pill-ready .kds-filter-count,
.kds-filter-pill.kds-pill-ready.active .kds-filter-count {
    background: #ffffff !important;
    color: #047857 !important;
    border: 1px solid #a7f3d0 !important;
}

/* DELAYED */
.kds-filter-pill.kds-pill-delayed {
    background: #fff1f2;
    border-color: #fecdd3;
    color: #be123c;
}
.kds-filter-pill.kds-pill-delayed:hover,
.kds-filter-pill.kds-pill-delayed.active {
    background: #ffe4e6 !important;
    border-color: #fda4af !important;
    color: #be123c !important;
    box-shadow: 0 1px 3px rgba(239, 68, 68, .15) !important;
}
.kds-filter-pill.kds-pill-delayed .kds-filter-count,
.kds-filter-pill.kds-pill-delayed.active .kds-filter-count {
    background: #ffffff !important;
    color: #be123c !important;
    border: 1px solid #fecdd3 !important;
}
.kds-filter-pill.kds-pill-delayed.active .kds-filter-count {
    background: rgba(255, 255, 255, .25);
    color: #ffffff;
    border-color: transparent;
}

/* Orders Grid (Stretch Equal Height) */
.kds-orders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr));
    align-items: stretch !important;
    gap: 16px;
    margin-top: 14px;
    padding-bottom: 48px;
}

/* Ticket Cards - Clean Neutral Border, No Colored Borders/Stripes */
.kds-card {
    min-width: 0;
    height: 100% !important;
    min-height: 250px !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 16px !important;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04) !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    position: relative;
    overflow: hidden;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.kds-card:hover {
    transform: translateY(-2px);
    border-color: #cbd5e1 !important;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.07) !important;
}

.kds-ticket-accent {
    display: none !important;
}

.kds-card-new,
.kds-card-prep,
.kds-card-ready,
.kds-card-served,
.kds-card-delayed {
    border-color: #e2e8f0 !important;
}

.kds-card-delayed::after {
    display: none !important;
    content: none !important;
}

.kds-card-header {
    padding: 10px 14px !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f1f5f9;
    background: #ffffff;
}

.kds-ticket-identity {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.kds-ticket-eyebrow {
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b;
    line-height: 1.2;
}

.kds-ticket-num {
    font-size: 14.5px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.01em;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kds-badge-status {
    padding: 2px 7px;
    border-radius: 9999px;
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 0.04em;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    line-height: 1.2;
    flex-shrink: 0;
}
.kds-badge-new {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
}
.kds-badge-prep {
    background: #f0f9ff;
    color: #0369a1;
    border: 1px solid #bae6fd;
}
.kds-badge-ready {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.kds-meta-row {
    padding: 6px 14px !important;
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
    border-bottom: 1px solid #f1f5f9;
}

.kds-table-tag {
    font-size: 10.5px;
    font-weight: 700;
    color: #1d4ed8;
    background: #eff6ff;
    border: 1px solid #dbeafe;
    padding: 1.5px 6px;
    border-radius: 5px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    max-width: 140px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kds-timer-row {
    padding: 6px 14px !important;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
    border-bottom: 1px solid #f1f5f9;
}

.kds-timer-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 700;
    color: #526077;
    font-variant-numeric: tabular-nums;
}
.kds-timer-chip.is-delayed {
    color: #dc2626 !important;
}

.kds-stale-tag {
    font-size: 9.5px;
    font-weight: 800;
    color: #b91c1c;
    background: #fee2e2;
    border: 1px solid #fecaca;
    padding: 1.5px 5px;
    border-radius: 4px;
    letter-spacing: 0.04em;
}

.kds-items-list {
    padding: 10px 14px !important;
    flex: 1 1 auto !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 6px;
    max-height: 220px !important;
    overflow-y: auto !important;
}

.kds-item-row {
    display: flex;
    flex-direction: column;
    gap: 2px;
    border-bottom: 1px dashed #e2e8f0;
    padding-bottom: 5px;
}
.kds-item-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.kds-item-qty {
    font-size: 11.5px;
    font-weight: 800;
    color: #4338ca;
    background: #eef2ff;
    padding: 1.5px 5px;
    border-radius: 5px;
    min-width: 26px;
    text-align: center;
    display: inline-block;
}

.kds-item-name {
    font-size: 12.5px;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.35;
}

.kds-item-note {
    font-size: 10.5px;
    font-weight: 600;
    color: #b91c1c;
    background: #fef2f2;
    border: 1px solid #fecaca;
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
    margin-top: 2px;
    margin-left: 32px;
}

.kds-card-footer {
    margin-top: auto !important;
    padding: 8px 10px 10px !important;
    border-top: 1px solid #f1f5f9;
    background: #f8fafc;
}

.btn-kds-prep,
.btn-kds-ready,
.btn-kds-served {
    min-height: 38px !important;
    height: 38px !important;
    border-radius: 10px !important;
    font-size: 11.5px !important;
    font-weight: 700 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
    width: 100% !important;
    box-shadow: none !important;
    border: none !important;
}

.btn-kds-prep {
    background: #0284c7 !important;
    color: #ffffff !important;
}
.btn-kds-prep:hover { background: #0369a1 !important; }

.btn-kds-ready {
    background: #059669 !important;
    color: #ffffff !important;
}
.btn-kds-ready:hover { background: #047857 !important; }

.btn-kds-served {
    background: #1e293b !important;
    color: #ffffff !important;
}
.btn-kds-served:hover { background: #0f172a !important; }


/* Modal Dialog System */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
}

.modal-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.modal-dialog {
  background: #ffffff;
  border-radius: var(--radius-xl);
  max-width: 540px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  transform: translateY(12px) scale(0.98);
  transition: transform 0.2s ease;
}

.modal-backdrop.open .modal-dialog {
  transform: translateY(0) scale(1);
}

.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--color-text-main);
}

.modal-close-btn {
  color: #94a3b8;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s;
}

.modal-close-btn:hover {
  color: #0f172a;
  background: #f1f5f9;
}

.modal-body {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  background: #f8fafc;
}

/* ==========================================================================
   Thermal Receipt Preview & Print Styles
   ========================================================================== */

.thermal-preview-stage {
  background: #1e293b;
  border-radius: var(--radius-xl);
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.4);
  position: relative;
  min-height: 520px;
}

.thermal-paper {
  background: #ffffff;
  color: #0f172a;
  font-family: 'Courier New', Courier, monospace;
  line-height: 1.35;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
  padding: 20px 16px;
  transition: width 0.25s ease, font-size 0.25s ease;
  position: relative;
}

.thermal-print-area,
.thermal-kot-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}

.thermal-preview-hidden {
  display: none !important;
}

.thermal-paper::before,
.thermal-paper::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 6px;
  background-size: 12px 6px;
}

.thermal-paper::before {
  top: -6px;
  background-image: radial-gradient(circle at 6px 6px, transparent 6px, #ffffff 6px);
}

.thermal-paper::after {
  bottom: -6px;
  background-image: radial-gradient(circle at 6px 0px, transparent 6px, #ffffff 6px);
}

.thermal-width-80 {
  width: 320px;
  font-size: 12px;
}

.thermal-width-58 {
  width: 240px;
  font-size: 10px;
}

.receipt-text-center {
  text-align: center;
}

.receipt-text-right {
  text-align: right;
}

.receipt-bold {
  font-weight: 800;
}

.receipt-divider {
  border-bottom: 1px dashed #475569;
  margin: 8px 0;
}

.receipt-double-divider {
  border-bottom: 2px solid #0f172a;
  margin: 8px 0;
}

.receipt-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 4px;
}

.thermal-upi-qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 12px 0 6px;
}

.thermal-upi-box {
  width: 90px;
  height: 90px;
  background: #f1f5f9;
  border: 2px solid #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 11px;
}

@media print {
  body * {
    visibility: hidden;
  }
  #thermal-print-area,
  #thermal-print-area * {
    visibility: visible;
  }
  #thermal-print-area {
    position: absolute;
    left: 0;
    top: 0;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  #thermal-print-area .thermal-paper {
    width: 100% !important;
    margin: 0 0 12px !important;
    padding: 10px !important;
    box-shadow: none !important;
    color: #000 !important;
    break-after: page;
  }
  #thermal-print-area .thermal-paper::before,
  #thermal-print-area .thermal-paper::after {
    display: none !important;
  }
}

/* ==========================================================================
   Admin Login Page Modern Styles
   ========================================================================== */

.admin-login-body {
  min-height: 100vh;
  background: radial-gradient(circle at 50% 0%, #0f172a 0%, #090d16 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: #0f172a;
}

.login-glass-card {
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.1);
  max-width: 420px;
  width: 100%;
  padding: 40px 32px;
  position: relative;
  overflow: hidden;
}

.login-glass-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, #0d9488, #14b8a6, #0284c7);
}

.login-logo-icon {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  background: linear-gradient(135deg, #0f766e, #0d9488);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  box-shadow: 0 10px 15px -3px rgba(13, 148, 136, 0.35);
}

.login-title {
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
  text-align: center;
  letter-spacing: -0.02em;
}

.login-subtitle {
  font-size: 13px;
  font-weight: 500;
  color: #64748b;
  text-align: center;
  margin-top: 4px;
  margin-bottom: 24px;
}

.login-input-box {
  position: relative;
  display: flex;
  align-items: center;
}

.login-input-box .login-icon {
  position: absolute;
  left: 14px;
  color: #94a3b8;
  font-size: 20px;
  pointer-events: none;
}

.login-input-box input {
  width: 100%;
  padding: 12px 14px 12px 42px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  color: #0f172a;
  transition: all 0.2s ease;
  outline: none;
}

.login-input-box input:focus {
  background: #ffffff;
  border-color: #0d9488;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

.btn-login-submit {
  width: 100%;
  background: linear-gradient(135deg, #0f766e 0%, #0d9488 100%);
  color: #ffffff !important;
  font-weight: 700;
  font-size: 14px;
  padding: 13px;
  border-radius: 12px;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 10px 15px -3px rgba(13, 148, 136, 0.35);
  transition: all 0.2s ease;
  margin-top: 10px;
}

.btn-login-submit:hover {
  background: linear-gradient(135deg, #115e59 0%, #0f766e 100%);
  transform: translateY(-1px);
  box-shadow: 0 14px 20px -3px rgba(13, 148, 136, 0.45);
}

.login-footer-switch {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #f1f5f9;
  text-align: center;
}

.login-footer-switch a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  transition: color 0.15s ease;
}

.login-footer-switch a:hover {
  color: #0d9488;
}

/* ==========================================================================
   Admin Reports & Analytics Styling
   ========================================================================== */

.report-tabs-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  padding: 8px;
  border-radius: var(--radius-xl);
  border: 1px solid #e2e8f0;
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
}

.report-tab-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-lg);
  font-size: 13.5px;
  font-weight: 600;
  color: #64748b;
  text-decoration: none;
  transition: all 0.18s ease;
  border: 1px solid transparent;
}

.report-tab-link:hover {
  color: #0d9488;
  background: #f0fdfa;
}

.report-tab-link.active {
  color: #ffffff;
  background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
  border-color: #0f766e;
  box-shadow: 0 4px 10px -2px rgba(13, 148, 136, 0.35);
}

.report-tab-link .material-symbols-outlined {
  font-size: 18px;
}

/* Financial P&L Cards & Statements */
.report-pnl-card {
  background: #ffffff;
  border-radius: var(--radius-xl);
  border: 1px solid #e2e8f0;
  box-shadow: var(--shadow-sm);
  padding: 24px;
}

.pnl-statement-table {
  width: 100%;
  border-collapse: collapse;
}

.pnl-statement-table th,
.pnl-statement-table td {
  padding: 12px 16px;
  font-size: 14px;
}

.pnl-section-header {
  background: #f8fafc;
  color: #1e293b;
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
}

.pnl-subtotal-row {
  background: #f1f5f9;
  font-weight: 700;
  color: #0f172a;
  border-top: 1px solid #cbd5e1;
  border-bottom: 2px solid #cbd5e1;
}

.pnl-grandtotal-row {
  background: #f0fdfa;
  font-weight: 800;
  font-size: 16px;
  border-top: 2px solid #0d9488;
  border-bottom: 2px solid #0d9488;
}

.badge-profit {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
  padding: 4px 10px;
  border-radius: 9999px;
  font-weight: 700;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-loss {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
  padding: 4px 10px;
  border-radius: 9999px;
  font-weight: 700;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-print-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  background: #f8fafc;
  color: #334155;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-lg);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}

.btn-print-action:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.print-report-header {
  display: none;
}

/* ==========================================================================
   Comprehensive Print / PDF Media Optimization
   ========================================================================== */
@media print {
  @page {
    size: A4 portrait;
    margin: 10mm 12mm 12mm 12mm;
  }

  *,
  *::before,
  *::after {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color-adjust: exact !important;
  }

  html,
  body {
    background: #ffffff !important;
    color: #0f172a !important;
    font-size: 9.5pt !important;
    line-height: 1.35 !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Force all grid / flex layout wrappers to plain static block flow */
  .admin-shell,
  .admin-main,
  .admin-content-area {
    display: block !important;
    position: static !important;
    width: 100% !important;
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
  }

  /* Hide navigation, forms, buttons, sidebars */
  .admin-sidebar,
  .admin-header,
  .admin-bottom-nav,
  .admin-notices-area,
  .report-tabs-bar,
  .no-print,
  .modal-backdrop,
  .drawer-backdrop,
  form,
  button,
  .btn-modern-primary,
  .btn-modern-secondary,
  .btn-print-action,
  .sidebar-pos-button,
  .header-mobile-pos-btn {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
  }

  /* Printable Header */
  .print-report-header {
    display: block !important;
    visibility: visible !important;
    width: 100% !important;
    margin-bottom: 16px !important;
    padding-bottom: 10px !important;
    border-bottom: 2px solid #0f172a !important;
  }

  .print-report-header h1 {
    font-size: 16pt !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    margin: 0 0 3px 0 !important;
  }

  .print-report-header p {
    font-size: 8.5pt !important;
    color: #475569 !important;
    margin: 0 0 2px 0 !important;
  }

  /* Printable Cards & Containers */
  .card-premium,
  .report-pnl-card {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 4px !important;
    box-shadow: none !important;
    margin-bottom: 14px !important;
    padding: 10px 12px !important;
    page-break-inside: avoid;
    break-inside: avoid;
    overflow: visible !important;
  }

  /* KPI Grid for Print */
  .grid {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    margin-bottom: 12px !important;
  }

  .grid > * {
    flex: 1 1 20% !important;
    min-width: 120px !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 4px !important;
    padding: 8px 10px !important;
    background: #f8fafc !important;
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .kpi-hero {
    background: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
  }

  .kpi-value {
    font-size: 13pt !important;
    font-weight: 800 !important;
    color: #0f172a !important;
  }

  .kpi-label {
    font-size: 7.5pt !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    color: #475569 !important;
  }

  .kpi-subtext {
    font-size: 7.5pt !important;
    color: #64748b !important;
  }

  .kpi-icon-glass,
  .icon-box {
    display: none !important;
  }

  /* Printable Tables */
  .table-container,
  .card-table-wrapper {
    overflow: visible !important;
    height: auto !important;
    max-height: none !important;
  }

  table.table-modern,
  table.pnl-statement-table {
    width: 100% !important;
    border-collapse: collapse !important;
    page-break-inside: auto;
  }

  table.table-modern tr,
  table.pnl-statement-table tr {
    page-break-inside: avoid;
    break-inside: avoid;
  }

  table.table-modern th,
  table.pnl-statement-table th {
    background: #f1f5f9 !important;
    color: #0f172a !important;
    font-weight: 700 !important;
    font-size: 8pt !important;
    border: 1px solid #cbd5e1 !important;
    padding: 5px 7px !important;
    text-transform: uppercase !important;
  }

  table.table-modern td,
  table.pnl-statement-table td {
    border: 1px solid #e2e8f0 !important;
    padding: 5px 7px !important;
    font-size: 8pt !important;
    color: #1e293b !important;
  }

  .pnl-section-header td {
    background: #f8fafc !important;
    font-weight: 800 !important;
    font-size: 8.5pt !important;
    border-top: 1.5px solid #0f172a !important;
    border-bottom: 1px solid #0f172a !important;
  }

  .pnl-subtotal-row td {
    background: #f1f5f9 !important;
    font-weight: 700 !important;
    border-top: 1px solid #94a3b8 !important;
    border-bottom: 1px solid #94a3b8 !important;
  }

  .pnl-grandtotal-row td {
    background: #e2e8f0 !important;
    font-weight: 800 !important;
    font-size: 9.5pt !important;
    border-top: 2px solid #0f172a !important;
    border-bottom: 2px solid #0f172a !important;
  }

  .badge,
  .badge-profit,
  .badge-loss {
    border: 1px solid #94a3b8 !important;
    background: transparent !important;
    color: #0f172a !important;
    font-weight: 700 !important;
    font-size: 7.5pt !important;
    padding: 2px 5px !important;
  }

  .chart-bar-container {
    display: none !important;
  }
}

/* ==========================================================================
   Role Permissions Management & Mobile Navigation Architecture
   ========================================================================== */

/* Role Navigation Carousel */
.role-nav-container {
  position: relative;
  margin-bottom: 1.25rem;
  padding: 4px;
  background: #f1f5f9;
  border: 1px solid var(--color-border);
  border-radius: 16px;
}

.role-nav-carousel {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 4px;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.role-nav-carousel::-webkit-scrollbar {
  display: none;
}

.role-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 12px;
  background: transparent;
  border: 1px solid transparent;
  color: #475569;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
  user-select: none;
  min-height: 44px;
}

.role-tab-btn:hover {
  background: #ffffff;
  color: #0f172a;
  border-color: #e2e8f0;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

.role-tab-btn.active {
  background: #ffffff;
  color: #0d9488;
  border-color: rgba(13, 148, 136, 0.3);
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(13, 148, 136, 0.12), 0 1px 3px rgba(15, 23, 42, 0.08);
}

.role-tab-icon {
  font-size: 18px;
  line-height: 1;
  color: inherit;
}

.role-tab-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 9999px;
  background: #e2e8f0;
  color: #475569;
  transition: all 0.2s ease;
}

.role-tab-btn.active .role-tab-badge {
  background: #f0fdfa;
  color: #0d9488;
  border: 1px solid rgba(13, 148, 136, 0.2);
}

/* Mobile Role Dropdown Selector */
.role-mobile-selector-wrap {
  display: none;
  margin-bottom: 1rem;
}

@media (max-width: 640px) {
  .role-mobile-selector-wrap {
    display: block;
  }

  /* Compact 2x2 Metric & KPI Cards on Mobile */
  .kpi-hero {
    padding: 0.85rem 0.9rem !important;
    border-radius: 1rem !important;
  }
  .kpi-header {
    margin-bottom: 0.25rem;
  }
  .kpi-label {
    font-size: 9.5px !important;
    letter-spacing: 0.04em !important;
    line-height: 1.25;
  }
  .kpi-value {
    font-size: 19px !important;
    margin-top: 0.4rem !important;
    line-height: 1.15;
    word-break: break-word;
  }
  .kpi-subtext {
    font-size: 10px !important;
    margin-top: 4px !important;
    line-height: 1.25;
  }
  .kpi-icon-glass,
  .kpi-hero .icon-box {
    width: 32px !important;
    height: 32px !important;
    border-radius: 8px !important;
  }
  .kpi-icon-glass .material-symbols-outlined,
  .kpi-hero .icon-box .material-symbols-outlined {
    font-size: 18px !important;
  }
  .card-compact {
    padding: 0.85rem 0.9rem !important;
  }
}

.role-mobile-select {
  width: 100%;
  height: 48px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Role Context Header Bar */
.role-context-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border-bottom: 1px solid var(--color-border);
  border-top-left-radius: 1.25rem;
  border-top-right-radius: 1.25rem;
}

.role-context-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.role-context-avatar {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: linear-gradient(135deg, #f0fdfa, #ccfbf1);
  color: #0d9488;
  border: 1px solid rgba(13, 148, 136, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(13, 148, 136, 0.15);
}

.role-context-title {
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.role-context-desc {
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
  line-height: 1.4;
}

.role-context-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .role-context-bar {
    padding: 1rem;
    flex-direction: column;
    align-items: stretch;
  }
  .role-context-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    gap: 8px;
  }
  .role-context-actions .btn-save-desktop {
    grid-column: span 2;
    width: 100%;
  }
}

/* Permission Module Cards */
.permission-module-card {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 1.25rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.permission-module-card:hover {
  border-color: rgba(13, 148, 136, 0.3);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

.permission-module-card.is-saas-locked {
  background: #fffdfa;
  border-color: #fed7aa;
}

.permission-module-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f1f5f9;
}

.permission-module-title-box {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.permission-module-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #f8fafc;
  color: #0d9488;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.permission-module-card.is-saas-locked .permission-module-icon {
  background: #fef3c7;
  color: #b45309;
  border-color: #fde68a;
}

.permission-module-name {
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.01em;
}

.permission-module-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.permission-count-chip {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 9999px;
  background: #f1f5f9;
  color: #475569;
}

.btn-module-toggle {
  font-size: 11px;
  font-weight: 700;
  color: #0d9488;
  padding: 4px 8px;
  border-radius: 6px;
  background: #f0fdfa;
  border: 1px solid #ccfbf1;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1;
}

.btn-module-toggle:hover {
  background: #0d9488;
  color: #ffffff;
}

.saas-locked-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 700;
  color: #b45309;
  background: #fef3c7;
  border: 1px solid #fde68a;
  padding: 3px 8px;
  border-radius: 9999px;
  white-space: nowrap;
}

/* Permission Item Row / Card */
.permission-items-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.permission-item-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  min-height: 48px;
  position: relative;
}

.permission-item-card:hover {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.04);
}

.permission-item-card.is-active {
  background: #f0fdfa;
  border-color: rgba(13, 148, 136, 0.4);
  box-shadow: 0 1px 3px rgba(13, 148, 136, 0.1);
}

.permission-item-card.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
  background: #f1f5f9;
  border-color: #e2e8f0;
}

.permission-checkbox-hidden {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.perm-custom-checkbox {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
  transition: all 0.15s ease;
  color: transparent;
}

.permission-item-card:hover .perm-custom-checkbox {
  border-color: #0d9488;
}

.permission-item-card.is-active .perm-custom-checkbox {
  background: #0d9488;
  border-color: #0d9488;
  color: #ffffff;
  box-shadow: 0 2px 4px rgba(13, 148, 136, 0.3);
}

.permission-item-card.is-disabled .perm-custom-checkbox {
  background: #e2e8f0;
  border-color: #cbd5e1;
  color: transparent;
}

.perm-checkbox-icon {
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
}

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

.permission-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
}

.permission-title-text {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
}

.permission-code-chip {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 10px;
  color: #64748b;
  background: rgba(226, 232, 240, 0.6);
  padding: 1px 5px;
  border-radius: 4px;
}

.permission-desc-text {
  font-size: 11.5px;
  color: #64748b;
  margin-top: 3px;
  line-height: 1.35;
}

/* Role Footer Bar */
.role-footer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 1.25rem 1.5rem;
  background: #f8fafc;
  border-top: 1px solid var(--color-border);
  border-bottom-left-radius: 1.25rem;
  border-bottom-right-radius: 1.25rem;
  margin-top: 1.5rem;
}

.role-footer-note {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
}

/* Sticky Mobile Save Bar */
.role-mobile-sticky-save {
  display: none;
}

@media (max-width: 768px) {
  .role-mobile-sticky-save {
    display: block;
    position: sticky;
    bottom: calc(68px + env(safe-area-inset-bottom, 0px));
    z-index: 45;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--color-border);
    border-radius: 14px;
    padding: 10px 14px;
    margin: 1rem 0;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.12);
  }
}
