/* ==========================================================================
   NIKO CAFE MANAGEMENT SYSTEM - PURE CSS3 STYLESHEET
   Exact preservation of the warm artisan espresso & cream design system
   ========================================================================== */

:root {
  --bg-cream: #FAF7F2;
  --bg-surface: #FFFFFF;
  --bg-soft: #F5EFEB;
  --bg-hover: #F2ECE4;
  --bg-receipt: #FFFDFB;
  --bg-floor: #F4EDE4;
  --bg-floor-border: #E8DDD1;

  --border-main: #E8DFD5;
  --border-soft: #F0E8DE;
  --border-subtle: #F7F2EB;
  --border-dashed: #E0D5C7;

  --text-primary: #2C1810;
  --text-espresso: #4A2E1B;
  --text-espresso-dark: #382315;
  --text-brown-deep: #543825;
  --text-brown-mid: #614D3E;
  --text-muted: #7A6A5C;
  --text-light: #8C7A6B;
  --text-faint: #9C8975;

  --accent-olive: #5C6B47;
  --accent-olive-dark: #495537;
  --accent-gold: #C4975A;
  --accent-terracotta: #C84B31;

  --emerald-50: #ECFDF5;
  --emerald-100: #D1FAE5;
  --emerald-200: #A7F3D0;
  --emerald-500: #10B981;
  --emerald-600: #059669;
  --emerald-700: #047857;
  --emerald-800: #065F46;
  --emerald-900: #064E3B;

  --amber-50: #FFFBEB;
  --amber-100: #FEF3C7;
  --amber-200: #FDE68A;
  --amber-300: #FCD34D;
  --amber-500: #F59E0B;
  --amber-600: #D97706;
  --amber-700: #B45309;
  --amber-800: #92400E;
  --amber-900: #78350F;

  --rose-50: #FFF1F2;
  --rose-100: #FFE4E6;
  --rose-200: #FECDD3;
  --rose-300: #FDA4AF;
  --rose-500: #F43F5E;
  --rose-700: #BE123C;
  --rose-800: #9F1239;

  --red-50: #FEF2F2;
  --red-200: #FECACA;
  --red-600: #DC2626;
  --red-700: #B91C1C;
  --red-800: #991B1B;

  --sky-50: #F0F9FF;
  --sky-200: #BAE6FD;
  --sky-300: #7DD3FC;
  --sky-500: #0EA5E9;
  --sky-600: #0284C7;
  --sky-700: #0369A1;

  --blue-50: #EFF6FF;
  --blue-700: #1D4ED8;

  --purple-50: #FAF5FF;
  --purple-200: #E9D5FF;
  --purple-500: #A855F7;
  --purple-600: #9333EA;
  --purple-700: #7E22CE;
  --purple-800: #6B21A8;

  --stone-100: #F5F5F4;
  --stone-200: #E7E5E4;
  --stone-300: #D6D3D1;
  --stone-600: #57534E;
  --stone-700: #44403C;
  --stone-800: #292524;

  --font-sans: 'Vazirmatn', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'Plus Jakarta Sans', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  --shadow-2xs: 0 1px 2px rgba(44, 24, 16, 0.04);
  --shadow-xs: 0 1px 3px rgba(44, 24, 16, 0.06), 0 1px 2px rgba(44, 24, 16, 0.04);
  --shadow-md: 0 4px 12px rgba(44, 24, 16, 0.08);
  --shadow-lg: 0 10px 25px rgba(44, 24, 16, 0.14);
  --shadow-xl: 0 20px 35px rgba(44, 24, 16, 0.18);
  --shadow-2xl: 0 25px 50px rgba(44, 24, 16, 0.25);
}

*, *::before, *::after {
  box-sizing: border-box;
  border-color: var(--border-main);
}

html, body {
  margin: 0;
  padding: 0;
}

body.app-body {
  background-color: var(--bg-cream);
  color: var(--text-primary);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  direction: rtl;
  min-height: 100vh;
}

body.app-body ::selection {
  background-color: var(--text-espresso);
  color: #FFFFFF;
}

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

button {
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
  color: inherit;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

/* Custom delicate scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-soft);
}
::-webkit-scrollbar-thumb {
  background: #C4B5A5;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-faint);
}

/* Utilities */
.font-mono { font-family: var(--font-mono); }
.tabular-nums { font-variant-numeric: tabular-nums; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.dir-ltr { direction: ltr; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* Animations */
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}
@keyframes bounce {
  0%, 100% { transform: translateY(-10%); animation-timing-function: cubic-bezier(0.8,0,1,1); }
  50% { transform: translateY(0); animation-timing-function: cubic-bezier(0,0,0.2,1); }
}
@keyframes ping {
  75%, 100% { transform: scale(2); opacity: 0; }
}
@keyframes modalZoomIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes toastSlideIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-spin { animation: spin 1s linear infinite; }
.animate-pulse { animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }
.animate-bounce { animation: bounce 1s infinite; }
.animate-ping { animation: ping 1.2s cubic-bezier(0, 0, 0.2, 1) infinite; }
.animate-modal { animation: modalZoomIn 0.2s ease-out; }

/* Common Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 0.75rem;
  transition: all 0.18s ease;
  white-space: nowrap;
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn-primary {
  background-color: var(--text-espresso);
  color: #FFFFFF;
  padding: 0.55rem 1rem;
  box-shadow: var(--shadow-xs);
}
.btn-primary:hover:not(:disabled) {
  background-color: var(--text-espresso-dark);
}
.btn-secondary {
  background-color: var(--bg-cream);
  color: var(--text-espresso);
  border: 1px solid var(--border-main);
  padding: 0.5rem 0.9rem;
}
.btn-secondary:hover:not(:disabled) {
  background-color: var(--bg-hover);
}
.btn-emerald {
  background-color: var(--emerald-700);
  color: #FFFFFF;
  padding: 0.55rem 1rem;
  box-shadow: var(--shadow-xs);
}
.btn-emerald:hover:not(:disabled) {
  background-color: var(--emerald-800);
}
.btn-olive {
  background-color: var(--accent-olive);
  color: #FFFFFF;
  padding: 0.42rem 0.75rem;
  box-shadow: var(--shadow-xs);
}
.btn-olive:hover:not(:disabled) {
  background-color: var(--accent-olive-dark);
}
.btn-danger {
  background-color: var(--red-700);
  color: #FFFFFF;
  padding: 0.55rem 1rem;
}
.btn-danger:hover:not(:disabled) {
  background-color: var(--red-800);
}
.btn-ghost {
  color: var(--text-muted);
  padding: 0.5rem 0.75rem;
  font-weight: 600;
}
.btn-ghost:hover:not(:disabled) {
  color: var(--text-primary);
}
.btn-outline-white {
  background-color: #FFFFFF;
  color: var(--text-espresso);
  border: 1px solid var(--border-main);
  padding: 0.5rem 0.9rem;
}
.btn-outline-white:hover:not(:disabled) {
  background-color: var(--bg-hover);
}

/* Forms */
.form-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-brown-deep);
  margin-bottom: 0.35rem;
}
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 0.55rem 0.75rem;
  font-size: 0.75rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border-main);
  background-color: #FFFFFF;
  color: var(--text-primary);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--text-espresso);
  box-shadow: 0 0 0 1px var(--text-espresso);
}
.form-input-lg {
  padding: 0.65rem 0.875rem;
  font-size: 0.875rem;
}

/* ==========================================================================
   LOGIN VIEW
   ========================================================================== */
.login-page {
  min-height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-cream);
}

.login-showcase {
  display: none;
  position: relative;
  overflow: hidden;
  background-color: var(--text-primary);
}

.login-showcase-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.75;
}

.login-showcase-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, #2C1810, rgba(44, 24, 16, 0.4), transparent);
}

.login-showcase-content {
  position: relative;
  z-index: 10;
  margin-top: auto;
  padding: 3rem;
  color: #FFFFFF;
}

.login-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  background-color: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  color: var(--bg-cream);
  font-size: 0.75rem;
  font-weight: 500;
  margin-bottom: 1rem;
}

.login-showcase-title {
  font-size: 2.25rem;
  font-weight: 900;
  letter-spacing: -0.025em;
  margin: 0 0 0.75rem 0;
}

.login-showcase-desc {
  font-size: 0.875rem;
  color: #E7E5E4;
  max-width: 28rem;
  line-height: 1.7;
  font-weight: 300;
  margin: 0;
}

.login-stats {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.75rem;
  color: #D6D3D1;
}

.login-stat-val {
  display: block;
  font-weight: 700;
  color: #FFFFFF;
  font-size: 1rem;
}

.login-stat-lbl {
  font-size: 0.6875rem;
  color: #D6D3D1;
}

.login-stat-divider {
  width: 1px;
  height: 2rem;
  background-color: rgba(255, 255, 255, 0.15);
}

.login-form-col {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.login-form-inner {
  width: 100%;
  max-width: 28rem;
}

.login-mobile-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.login-mobile-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  background-color: var(--text-espresso);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-card {
  background-color: #FFFFFF;
  border-radius: 1rem;
  border: 1px solid var(--border-main);
  padding: 2rem;
  box-shadow: var(--shadow-xs);
}

.login-input-wrap {
  position: relative;
}

.login-input-icon {
  position: absolute;
  left: 0.75rem;
  top: 0.75rem;
  color: var(--text-light);
  pointer-events: none;
  width: 1rem;
  height: 1rem;
}

.login-input {
  padding-left: 2.5rem;
  padding-right: 0.875rem;
  background-color: rgba(250, 247, 242, 0.3);
  text-align: left;
  font-family: var(--font-mono);
}

.error-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  padding: 0.875rem;
  background-color: var(--red-50);
  color: var(--red-700);
  font-size: 0.75rem;
  border-radius: 0.75rem;
  border: 1px solid var(--red-200);
  margin-bottom: 1.25rem;
  line-height: 1.6;
}

.success-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.75rem;
  background-color: var(--emerald-50);
  color: var(--emerald-800);
  font-size: 0.75rem;
  border-radius: 0.75rem;
  border: 1px solid var(--emerald-200);
  line-height: 1.6;
}

/* ==========================================================================
   APP SHELL: SIDEBAR & TOP NAVBAR
   ========================================================================== */
.app-shell {
  min-height: 100vh;
  background-color: var(--bg-cream);
  color: var(--text-primary);
  display: flex;
}

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(2px);
  z-index: 40;
}

.sidebar {
  position: fixed;
  top: 0;
  bottom: 0;
  right: 0;
  z-index: 40;
  width: 16rem;
  background-color: var(--bg-cream);
  border-left: 1px solid var(--border-main);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease-in-out;
  transform: translateX(100%);
}

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

.sidebar-brand {
  padding: 1.25rem;
  border-bottom: 1px solid var(--border-main);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-brand-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sidebar-logo-box {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  background-color: var(--text-espresso);
  color: var(--bg-cream);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-xs);
}

.sidebar-brand-title {
  font-weight: 900;
  color: var(--text-primary);
  font-size: 1rem;
  letter-spacing: -0.02em;
  margin: 0;
}

.sidebar-brand-sub {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.1em;
  color: var(--text-light);
  text-transform: uppercase;
  margin: 0;
}

.sidebar-user-card {
  padding: 0.75rem;
  margin: 0.625rem 0.75rem;
  border-radius: 0.75rem;
  background-color: #FFFFFF;
  border: 1px solid rgba(232, 223, 213, 0.8);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sidebar-user-avatar {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 9999px;
  background-color: rgba(92, 107, 71, 0.15);
  color: var(--accent-olive);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.875rem;
  border-radius: 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-brown-mid);
  transition: all 0.15s ease;
  text-align: right;
}

.nav-item:hover {
  background-color: var(--bg-hover);
  color: var(--text-primary);
}

.nav-item.active {
  background-color: var(--text-espresso);
  color: #FFFFFF;
  box-shadow: var(--shadow-xs);
  font-weight: 700;
}

.nav-item-icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  color: var(--text-light);
}

.nav-item.active .nav-item-icon {
  color: var(--bg-cream);
}

.sidebar-footer {
  padding: 0.75rem;
  border-top: 1px solid var(--border-main);
}

.btn-logout {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--red-700);
  transition: background-color 0.15s;
}

.btn-logout:hover {
  background-color: var(--red-50);
}

.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  transition: all 0.3s ease;
}

.top-navbar {
  height: 4rem;
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border-main);
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 30;
}

.navbar-start {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.hamburger-btn {
  padding: 0.5rem;
  color: var(--text-muted);
  border-radius: 0.75rem;
  transition: background-color 0.15s, color 0.15s;
}
.hamburger-btn:hover {
  color: var(--text-primary);
  background-color: var(--bg-cream);
}

.navbar-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.navbar-subtitle {
  display: none;
  font-size: 0.6875rem;
  color: var(--text-muted);
  margin: 0;
}

.navbar-end {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.navbar-clock {
  display: none;
  flex-direction: column;
  text-align: left;
}

.navbar-quick-ai {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.42rem 0.75rem;
  background-color: rgba(92, 107, 71, 0.1);
  color: var(--accent-olive);
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 0.75rem;
  transition: background-color 0.15s;
}
.navbar-quick-ai:hover {
  background-color: rgba(92, 107, 71, 0.2);
}

.navbar-divider {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  border-right: 1px solid var(--border-main);
  padding-right: 0.65rem;
  margin-right: 0.15rem;
}

.icon-btn {
  padding: 0.5rem;
  color: var(--text-muted);
  border-radius: 0.75rem;
  transition: background-color 0.15s, color 0.15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.icon-btn:hover {
  color: var(--text-espresso);
  background-color: var(--bg-cream);
}

.main-content {
  flex: 1;
  padding-bottom: 3rem;
}

/* ==========================================================================
   COMMON CARDS, GRIDS, TABLES, TABS
   ========================================================================== */
.page-container {
  padding: 1rem;
  max-width: 80rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.page-container-narrow {
  padding: 1rem;
  max-width: 64rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.card {
  background-color: #FFFFFF;
  border-radius: 1rem;
  border: 1px solid var(--border-main);
  box-shadow: var(--shadow-xs);
}

.card-padded {
  padding: 1.25rem;
}

.header-card {
  background-color: #FFFFFF;
  border-radius: 1rem;
  border: 1px solid var(--border-main);
  padding: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  box-shadow: var(--shadow-xs);
}

.kpi-grid-4 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.kpi-grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.grid-2-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.grid-3-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.grid-12 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.kpi-card {
  background-color: #FFFFFF;
  border-radius: 1rem;
  border: 1px solid var(--border-main);
  padding: 1.25rem;
  box-shadow: var(--shadow-xs);
}

.kpi-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.kpi-icon-box {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.kpi-footer {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--bg-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.6875rem;
  color: var(--text-muted);
}

/* Segmented Filter Tabs */
.filter-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.search-box {
  position: relative;
  width: 100%;
}

.search-input {
  width: 100%;
  padding: 0.625rem 2.5rem 0.625rem 1rem;
  background-color: #FFFFFF;
  font-size: 0.75rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border-main);
}
.search-input:focus {
  outline: none;
  border-color: var(--text-espresso);
}

.search-icon {
  position: absolute;
  right: 0.875rem;
  top: 0.75rem;
  color: var(--text-light);
  width: 1rem;
  height: 1rem;
  pointer-events: none;
}

.segmented-tabs {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem;
  background-color: #FFFFFF;
  border-radius: 0.75rem;
  border: 1px solid var(--border-main);
  overflow-x: auto;
  max-width: 100%;
}

.segmented-tabs-cream {
  background-color: var(--bg-cream);
}

.seg-tab {
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 0.5rem;
  color: var(--text-brown-mid);
  white-space: nowrap;
  transition: all 0.15s;
}
.seg-tab:hover {
  background-color: var(--bg-cream);
  color: var(--text-primary);
}
.seg-tab.active {
  background-color: var(--text-espresso);
  color: #FFFFFF;
  box-shadow: var(--shadow-xs);
}

.pill-tabs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
}

.pill-tab {
  padding: 0.4rem 0.875rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 0.75rem;
  white-space: nowrap;
  background-color: #FFFFFF;
  color: var(--text-brown-mid);
  border: 1px solid var(--border-main);
  transition: all 0.15s;
}
.pill-tab:hover {
  background-color: var(--bg-cream);
}
.pill-tab.active {
  background-color: var(--text-espresso);
  color: #FFFFFF;
  border-color: var(--text-espresso);
  box-shadow: var(--shadow-xs);
}

/* Data Tables */
.table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  text-align: right;
  font-size: 0.75rem;
  border-collapse: collapse;
}

.data-table thead tr {
  border-bottom: 1px solid var(--border-soft);
  color: var(--text-muted);
}

.data-table thead.cream-head tr {
  background-color: var(--bg-cream);
  border-bottom: 1px solid var(--border-main);
}

.data-table th {
  padding: 0.75rem 1rem;
  font-weight: 600;
  white-space: nowrap;
}

.data-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.data-table tbody tr:hover {
  background-color: rgba(250, 247, 242, 0.5);
}

/* Status Badges */
.status-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 0.375rem;
  font-size: 0.625rem;
  font-weight: 700;
}
.badge-emerald { background-color: var(--emerald-50); color: var(--emerald-800); }
.badge-amber { background-color: var(--amber-50); color: var(--amber-800); }
.badge-amber-border { background-color: var(--amber-100); color: var(--amber-900); border: 1px solid var(--amber-300); }
.badge-red { background-color: var(--red-50); color: var(--red-800); }
.badge-stone { background-color: var(--stone-100); color: var(--stone-600); }
.badge-purple { background-color: var(--purple-50); color: var(--purple-800); border: 1px solid var(--purple-200); }
.badge-sky { background-color: var(--sky-50); color: var(--sky-700); }

/* ==========================================================================
   DASHBOARD VIEW
   ========================================================================== */
.welcome-banner {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  background-color: var(--text-espresso);
  color: #FFFFFF;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  box-shadow: var(--shadow-xs);
}

.welcome-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  background-color: rgba(255, 255, 255, 0.12);
  font-size: 0.75rem;
  color: var(--bg-cream);
  margin-bottom: 0.75rem;
}

.welcome-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.btn-welcome-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  background-color: var(--bg-cream);
  color: var(--text-espresso);
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 0.75rem;
  box-shadow: var(--shadow-xs);
}
.btn-welcome-primary:hover {
  background-color: #FFFFFF;
}

.btn-welcome-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  background-color: rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 0.75rem;
}
.btn-welcome-secondary:hover {
  background-color: rgba(255, 255, 255, 0.22);
}

.mini-tables-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  padding-top: 0.5rem;
}

.mini-table-btn {
  position: relative;
  padding: 0.625rem;
  border-radius: 1rem;
  border: 1px solid rgba(140, 98, 57, 0.4);
  background-color: var(--bg-cream);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  box-shadow: var(--shadow-xs);
  transition: transform 0.15s ease;
}
.mini-table-btn:hover {
  transform: scale(1.04);
}

.mini-table-wood {
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  border: 1px solid #5A3825;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

.wood-grad-oak { background: linear-gradient(135deg, #B88654, #9E6E3D, #7D532B); }
.wood-grad-occupied { background: linear-gradient(135deg, #A87442, #8C5D30, #6E4620); }
.wood-grad-kitchen { background: linear-gradient(135deg, #B5824C, #996A36, #7A5023); }
.wood-grad-ready { background: linear-gradient(135deg, #BA8956, #A0703D, #80552B); }
.wood-grad-reserved { background: linear-gradient(135deg, #8E5B32, #754722, #5C3415); }

.mini-badge {
  margin-top: 0.5rem;
  font-size: 0.5625rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  color: #FFFFFF;
}

.legend-bar {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--bg-soft);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.legend-dot {
  display: inline-block;
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 9999px;
}

.top-product-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.top-product-thumb {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  background-color: var(--bg-cream);
  border: 1px solid var(--border-main);
  overflow: hidden;
  flex-shrink: 0;
}

.low-stock-alert {
  margin-top: 1rem;
  padding: 0.75rem;
  background-color: rgba(255, 251, 235, 0.8);
  border: 1px solid var(--amber-200);
  border-radius: 0.75rem;
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  font-size: 0.75rem;
  color: var(--amber-900);
  line-height: 1.6;
}

/* ==========================================================================
   TABLE MANAGEMENT & ARCHITECTURAL REALISTIC FLOOR PLAN
   ========================================================================== */
.floor-legend-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 1rem;
  background-color: var(--bg-cream);
  border-radius: 0.75rem;
  border: 1px solid rgba(232, 223, 213, 0.8);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.floor-scroll-wrap {
  position: relative;
  overflow-x: auto;
  border-radius: 1rem;
  border: 4px solid rgba(74, 46, 27, 0.2);
  box-shadow: var(--shadow-2xl);
  background-color: var(--bg-floor-border);
}

.floor-canvas {
  position: relative;
  background-color: var(--bg-floor);
  min-width: 540px;
  padding: 1rem;
  min-height: 580px;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  user-select: none;
}

.floor-parquet {
  position: absolute;
  inset: 0;
  opacity: 0.7;
  background-image:
    repeating-linear-gradient(45deg, #EFE6DC 0, #EFE6DC 20px, #E8DDD1 20px, #E8DDD1 40px),
    repeating-linear-gradient(-45deg, #F5EDE3 0, #F5EDE3 20px, #ECE0D4 20px, #ECE0D4 40px);
  background-blend-mode: multiply;
}

.floor-parquet.edit-cursor {
  cursor: crosshair;
}

.floor-sunlight {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 8rem;
  background: linear-gradient(to right, rgba(254, 243, 199, 0.4), transparent);
  pointer-events: none;
}

.floor-zone-label {
  position: absolute;
  pointer-events: none;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.floor-terrace-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 28%;
  width: 6px;
  background-color: rgba(140, 98, 57, 0.3);
  border-right: 1px dashed rgba(92, 107, 71, 0.5);
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  padding: 2rem 0;
}

.terrace-tree {
  width: 1.75rem;
  height: 1.75rem;
  margin-right: -0.75rem;
  border-radius: 9999px;
  background-color: rgba(6, 95, 70, 0.85);
  border: 2px solid #022C22;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  box-shadow: var(--shadow-xs);
}

.bar-counter {
  position: absolute;
  top: 0.75rem;
  left: 1.5rem;
  z-index: 10;
  pointer-events: none;
  display: none;
  align-items: center;
  gap: 1rem;
  background-color: #3E2314;
  color: var(--bg-cream);
  padding: 0.5rem 0.875rem;
  border-radius: 1rem;
  border: 2px solid var(--text-brown-deep);
  box-shadow: var(--shadow-lg);
}

.bar-counter-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 0.75rem;
  background-color: #2A150A;
  border: 1px solid #6F4E37;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FBBF24;
}

.bar-stool {
  width: 0.875rem;
  height: 0.875rem;
  border-radius: 9999px;
  background-color: #8C5D30;
  border: 1px solid #2A150A;
}

.entrance-rug {
  position: absolute;
  bottom: 0.75rem;
  left: 1.5rem;
  pointer-events: none;
  padding: 0.375rem 0.875rem;
  border-radius: 0.75rem;
  background-color: var(--text-espresso);
  color: var(--bg-cream);
  border: 1px solid #6F4E37;
  font-size: 0.625rem;
  font-weight: 700;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.edit-mode-banner {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 30;
  padding: 0.5rem 1rem;
  background-color: var(--text-espresso);
  color: #FFFFFF;
  font-size: 0.75rem;
  border-radius: 0.75rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(251, 191, 36, 0.5);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Realistic Wooden Cafe Table & Chairs */
.realistic-table-wrap {
  position: absolute;
  z-index: 10;
  cursor: pointer;
  user-select: none;
  transform: translate(-50%, -50%);
  transition: transform 0.2s ease, filter 0.2s ease;
}
.realistic-table-wrap:hover {
  transform: translate(-50%, -50%) scale(1.04);
}
.realistic-table-wrap.selected {
  transform: translate(-50%, -50%) scale(1.08);
  z-index: 20;
}
.realistic-table-wrap.dragged {
  transform: translate(-50%, -50%) scale(1.1);
  z-index: 30;
  outline: 4px solid var(--amber-500);
  border-radius: 1rem;
}

.realistic-table-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem;
}

.table-wood-top {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 0.25rem;
  overflow: hidden;
  border: 2px solid #6A4423;
  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, 0.3),
    inset 0 -2px 4px rgba(0, 0, 0, 0.4),
    0 4px 6px rgba(0, 0, 0, 0.25);
  transition: all 0.2s ease;
  width: 3.75rem;
  height: 3.5rem;
  border-radius: 0.75rem;
}

.table-wood-top.shape-circle {
  border-radius: 9999px;
}
.table-wood-top.shape-circle.seats-2 {
  width: 3rem;
  height: 3rem;
}
.table-wood-top.shape-circle.seats-4 {
  width: 3.5rem;
  height: 3.5rem;
}
.table-wood-top.shape-rectangle,
.table-wood-top.seats-6 {
  width: 5rem;
  height: 3.5rem;
}
.table-wood-top.seats-8 {
  width: 6.5rem;
  height: 3.5rem;
}

.wood-planks {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.2;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
}
.plank-dark { width: 100%; height: 1px; background-color: #000000; }
.plank-light { width: 100%; height: 1px; background-color: rgba(255, 255, 255, 0.4); }

.brass-rim {
  position: absolute;
  inset: 2px;
  border-radius: 9999px;
  border: 1px solid rgba(212, 175, 55, 0.4);
  pointer-events: none;
}

.table-top-bar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10;
  pointer-events: none;
  padding: 0 2px;
}

.table-status-chip {
  font-size: 7px;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 9999px;
  color: #FFFFFF;
}

.table-seat-chip {
  font-size: 7px;
  font-family: var(--font-mono);
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
}

.table-centerpiece {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
  pointer-events: none;
  margin: auto 0;
}

.table-number-medallion {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 9999px;
  background: linear-gradient(to bottom, #FFF5E6, #E5CCA0);
  border: 1px solid #8C6239;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 900;
  color: #3D2110;
  line-height: 1;
}

.table-props-row {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  margin-top: 2px;
}

.table-vase {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  background-color: rgba(4, 120, 87, 0.85);
  border: 1px solid #064E3B;
  display: flex;
  align-items: center;
  justify-content: center;
}
.table-vase-candle {
  width: 0.25rem;
  height: 0.25rem;
  border-radius: 9999px;
  background-color: #FCD34D;
}

.table-cup {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  background-color: #FFFFFF;
  border: 1px solid #8C6239;
  display: flex;
  align-items: center;
  justify-content: center;
}
.table-cup-coffee {
  width: 0.25rem;
  height: 0.25rem;
  border-radius: 9999px;
  background-color: #3D2110;
}

.table-reserved-tag {
  font-size: 7px;
  font-weight: 700;
  color: #E5CCA0;
  background-color: #3D2110;
  padding: 0 4px;
  border-radius: 3px;
}

.table-bottom-bar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  pointer-events: none;
}

.table-elapsed-chip {
  font-size: 7px;
  font-family: var(--font-mono);
  font-weight: 700;
  color: #FFFFFF;
  background-color: rgba(0, 0, 0, 0.55);
  padding: 1px 4px;
  border-radius: 4px;
}

.table-label-chip {
  font-size: 7px;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
  max-width: 52px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selection-ring {
  position: absolute;
  inset: 0;
  border-radius: 0.75rem;
  border: 2px solid #FFFFFF;
  box-shadow: 0 0 0 2px var(--text-espresso);
  pointer-events: none;
}

/* Realistic Wooden Chairs */
.chair-wrap {
  position: absolute;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.chair-back {
  background-color: #613E22;
  border: 1px solid #442813;
  display: flex;
  align-items: center;
  justify-content: center;
}
.chair-seat {
  background-color: #8A5B35;
}
.chair-vip .chair-back {
  background-color: #442813;
  border-color: #2E1A0B;
}
.chair-vip .chair-seat {
  background-color: #2C1810;
}

/* ==========================================================================
   POS VIEW
   ========================================================================== */
.pos-layout {
  padding: 1rem;
  max-width: 80rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-height: calc(100vh - 5rem);
}

.pos-catalog {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

.pos-product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.875rem;
  overflow-y: auto;
  max-height: 620px;
  padding: 2px;
}

.pos-product-card {
  background-color: #FFFFFF;
  border-radius: 1rem;
  border: 1px solid var(--border-main);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.2s ease;
}
.pos-product-card:hover {
  border-color: var(--text-espresso);
  box-shadow: var(--shadow-md);
}

.pos-product-img-wrap {
  position: relative;
  aspect-ratio: 4 / 3;
  background-color: var(--bg-cream);
  overflow: hidden;
}
.pos-product-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.pos-product-card:hover .pos-product-img {
  transform: scale(1.05);
}

.prep-time-badge {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  padding: 0.15rem 0.5rem;
  background-color: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  border-radius: 0.375rem;
  font-size: 0.625rem;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-family: var(--font-mono);
}

.pos-product-plus {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 0.5rem;
  background-color: var(--bg-cream);
  color: var(--text-espresso);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}
.pos-product-card:hover .pos-product-plus {
  background-color: var(--text-espresso);
  color: #FFFFFF;
}

.pos-cart-panel {
  width: 100%;
  background-color: #FFFFFF;
  border-radius: 1rem;
  border: 1px solid var(--border-main);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-xs);
  overflow: hidden;
}

.cart-items-scroll {
  padding: 0.75rem;
  flex: 1;
  overflow-y: auto;
  max-height: 380px;
}

.cart-item-row {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--bg-soft);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.625rem;
  font-size: 0.75rem;
}
.cart-item-row:last-child {
  border-bottom: none;
}

.qty-stepper {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  flex-shrink: 0;
  background-color: var(--bg-cream);
  padding: 0.25rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border-main);
}
.qty-btn {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 0.5rem;
  background-color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
}
.qty-btn:hover {
  background-color: var(--border-main);
}

/* ==========================================================================
   KITCHEN DISPLAY (KDS)
   ========================================================================== */
.kds-ticket {
  background-color: #FFFFFF;
  border-radius: 1rem;
  border: 1px solid var(--border-main);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s;
}
.kds-ticket.ready {
  border-color: var(--sky-300);
  box-shadow: 0 0 0 2px var(--sky-200);
}
.kds-ticket.late {
  border-color: var(--rose-300);
  box-shadow: 0 0 0 2px var(--rose-200);
}

.kds-ticket-header {
  padding: 1rem;
  border-bottom: 1px solid var(--border-main);
  background-color: var(--bg-cream);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.kds-ticket.ready .kds-ticket-header {
  background-color: rgba(240, 249, 255, 0.75);
  border-bottom-color: var(--sky-200);
}

/* ==========================================================================
   MENU & GALLERY PICKER
   ========================================================================== */
.menu-card {
  background-color: #FFFFFF;
  border-radius: 1rem;
  border: 1px solid var(--border-main);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s;
}
.menu-card.unavailable {
  border-color: var(--stone-300);
  opacity: 0.65;
}
.menu-card-img-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  background-color: var(--bg-cream);
  overflow: hidden;
}
.menu-financial-grid {
  margin-top: 0.875rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--bg-soft);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  text-align: center;
  font-size: 0.6875rem;
}
.menu-financial-cell {
  background-color: var(--bg-cream);
  padding: 0.375rem;
  border-radius: 0.5rem;
}

.preset-gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.375rem;
  max-height: 6rem;
  overflow-y: auto;
  padding: 0.25rem;
  background-color: var(--bg-cream);
  border-radius: 0.75rem;
  border: 1px solid var(--border-main);
}
.preset-gallery-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.25rem;
  border-radius: 0.5rem;
  border: 1px solid transparent;
  transition: all 0.15s;
}
.preset-gallery-btn:hover {
  background-color: rgba(255, 255, 255, 0.85);
}
.preset-gallery-btn.active {
  border-color: var(--text-espresso);
  background-color: #FFFFFF;
  box-shadow: 0 0 0 1px var(--text-espresso);
}

/* ==========================================================================
   AI AGENT CHAT VIEW
   ========================================================================== */
.ai-container {
  padding: 1rem;
  max-width: 64rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 5rem);
}

.ai-messages-box {
  flex: 1;
  background-color: #FFFFFF;
  border-radius: 1rem;
  border: 1px solid var(--border-main);
  padding: 1rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: var(--shadow-xs);
}

.ai-msg-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}
.ai-msg-row.from-ai { justify-content: flex-start; }
.ai-msg-row.from-user { justify-content: flex-end; }

.ai-bubble {
  max-width: 85%;
  border-radius: 1rem;
  padding: 1rem;
  font-size: 0.75rem;
  line-height: 1.75;
}
.ai-bubble.from-ai {
  background-color: var(--bg-cream);
  border: 1px solid var(--border-main);
  color: var(--text-primary);
}
.ai-bubble.from-user {
  background-color: var(--text-espresso);
  color: #FFFFFF;
}

.ai-quick-bar {
  padding: 0.75rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
}

.ai-quick-chip {
  padding: 0.375rem 0.75rem;
  background-color: #FFFFFF;
  color: var(--text-brown-deep);
  border: 1px solid var(--border-main);
  border-radius: 0.75rem;
  font-size: 0.6875rem;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: var(--shadow-2xs);
  transition: all 0.15s;
}
.ai-quick-chip:hover {
  background-color: var(--bg-cream);
  color: var(--text-espresso);
}

.ai-input-form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background-color: #FFFFFF;
  padding: 0.5rem;
  border-radius: 1rem;
  border: 1px solid var(--border-main);
  box-shadow: var(--shadow-xs);
}

/* ==========================================================================
   MODALS & THERMAL RECEIPT
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(3px);
  padding: 1rem;
}

.modal-box {
  background-color: #FFFFFF;
  border-radius: 1rem;
  box-shadow: var(--shadow-2xl);
  width: 100%;
  border: 1px solid var(--border-main);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  animation: modalZoomIn 0.2s ease-out;
}
.modal-sm { max-width: 24rem; }
.modal-md { max-width: 28rem; }
.modal-lg { max-width: 32rem; }

.modal-header {
  padding: 1rem 1.25rem;
  background-color: var(--bg-cream);
  border-bottom: 1px solid var(--border-main);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-body-scroll {
  padding: 1.25rem 1.5rem;
  overflow-y: auto;
}

.modal-footer {
  padding: 1rem 1.25rem;
  background-color: var(--bg-cream);
  border-top: 1px solid var(--border-main);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.receipt-paper {
  width: 100%;
  max-width: 340px;
  border: 1px dashed #D6C7B7;
  padding: 1.25rem;
  border-radius: 0.75rem;
  background-color: var(--bg-receipt);
  color: var(--text-primary);
  font-size: 0.75rem;
  margin: 0 auto;
}

.receipt-item-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  align-items: start;
}

/* Toast Notifications */
.toast-root {
  position: fixed;
  bottom: 1.25rem;
  left: 1.25rem;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast-item {
  pointer-events: auto;
  background-color: var(--text-primary);
  color: #FFFFFF;
  border-right: 4px solid var(--accent-gold);
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  animation: toastSlideIn 0.2s ease-out;
}
.toast-item.error { border-right-color: var(--red-600); }
.toast-item.success { border-right-color: var(--emerald-500); }

/* Status & Wood Badge Colors */
.bg-emerald { background-color: var(--emerald-600); color: #FFFFFF; }
.bg-terracotta { background-color: var(--accent-terracotta); color: #FFFFFF; }
.bg-amber { background-color: var(--amber-600); color: #FFFFFF; }
.bg-sky { background-color: var(--sky-600); color: #FFFFFF; }
.bg-purple { background-color: var(--purple-700); color: #FFFFFF; }
.bg-rose { background-color: var(--rose-500); color: #FFFFFF; }

.table-wood-top.wood-grad-oak { background: linear-gradient(135deg, #B88654, #9E6E3D, #7D532B); }
.table-wood-top.wood-grad-occupied { background: linear-gradient(135deg, #A87442, #8C5D30, #6E4620); }
.table-wood-top.wood-grad-kitchen { background: linear-gradient(135deg, #B5824C, #996A36, #7A5023); }
.table-wood-top.wood-grad-ready { background: linear-gradient(135deg, #BA8956, #A0703D, #80552B); }
.table-wood-top.wood-grad-reserved { background: linear-gradient(135deg, #8E5B32, #754722, #5C3415); }

/* Chair Positions (Mobile Default -> Enhanced on sm: 640px+) */
.chair-2-left { left: -0.5rem; top: 50%; transform: translateY(-50%); width: 0.75rem; height: 1.25rem; }
.chair-2-left .chair-back { width: 0.625rem; height: 1rem; border-radius: 0.375rem 0 0 0.375rem; }
.chair-2-left .chair-seat { width: 0.375rem; height: 0.75rem; border-radius: 0.25rem 0 0 0.25rem; }

.chair-2-right { right: -0.5rem; top: 50%; transform: translateY(-50%); width: 0.75rem; height: 1.25rem; }
.chair-2-right .chair-back { width: 0.625rem; height: 1rem; border-radius: 0 0.375rem 0.375rem 0; }
.chair-2-right .chair-seat { width: 0.375rem; height: 0.75rem; border-radius: 0 0.25rem 0.25rem 0; }

.chair-4c-top { top: -0.5rem; left: 50%; transform: translateX(-50%); }
.chair-4c-bottom { bottom: -0.5rem; left: 50%; transform: translateX(-50%); }
.chair-4c-top .chair-back, .chair-4c-bottom .chair-back { width: 1rem; height: 0.625rem; }
.chair-4c-top .chair-back { border-radius: 0.375rem 0.375rem 0 0; align-items: flex-start; }
.chair-4c-bottom .chair-back { border-radius: 0 0 0.375rem 0.375rem; align-items: flex-end; }
.chair-4c-top .chair-seat, .chair-4c-bottom .chair-seat { width: 0.75rem; height: 0.375rem; }
.chair-4c-top .chair-seat { border-radius: 0.25rem 0.25rem 0 0; }
.chair-4c-bottom .chair-seat { border-radius: 0 0 0.25rem 0.25rem; }

.chair-4c-left { left: -0.5rem; top: 50%; transform: translateY(-50%); }
.chair-4c-right { right: -0.5rem; top: 50%; transform: translateY(-50%); }
.chair-4c-left .chair-back, .chair-4c-right .chair-back { width: 0.625rem; height: 1rem; }
.chair-4c-left .chair-back { border-radius: 0.375rem 0 0 0.375rem; justify-content: flex-start; }
.chair-4c-right .chair-back { border-radius: 0 0.375rem 0.375rem 0; justify-content: flex-end; }
.chair-4c-left .chair-seat, .chair-4c-right .chair-seat { width: 0.375rem; height: 0.75rem; }
.chair-4c-left .chair-seat { border-radius: 0.25rem 0 0 0.25rem; }
.chair-4c-right .chair-seat { border-radius: 0 0.25rem 0.25rem 0; }

.chair-4-tl { top: -0.5rem; left: 25%; transform: translateX(-50%); }
.chair-4-tr { top: -0.5rem; right: 25%; transform: translateX(50%); }
.chair-4-bl { bottom: -0.5rem; left: 25%; transform: translateX(-50%); }
.chair-4-br { bottom: -0.5rem; right: 25%; transform: translateX(50%); }
.chair-4-tl .chair-back, .chair-4-tr .chair-back, .chair-4-bl .chair-back, .chair-4-br .chair-back { width: 0.875rem; height: 0.625rem; }
.chair-4-tl .chair-back, .chair-4-tr .chair-back { border-radius: 0.375rem 0.375rem 0 0; align-items: flex-start; }
.chair-4-bl .chair-back, .chair-4-br .chair-back { border-radius: 0 0 0.375rem 0.375rem; align-items: flex-end; }
.chair-4-tl .chair-seat, .chair-4-tr .chair-seat, .chair-4-bl .chair-seat, .chair-4-br .chair-seat { width: 0.625rem; height: 0.375rem; }

.chair-6-t1 { top: -0.5rem; left: 20%; transform: translateX(-50%); }
.chair-6-t2 { top: -0.5rem; left: 50%; transform: translateX(-50%); }
.chair-6-t3 { top: -0.5rem; right: 20%; transform: translateX(50%); }
.chair-6-b1 { bottom: -0.5rem; left: 20%; transform: translateX(-50%); }
.chair-6-b2 { bottom: -0.5rem; left: 50%; transform: translateX(-50%); }
.chair-6-b3 { bottom: -0.5rem; right: 20%; transform: translateX(50%); }
.chair-6-t1 .chair-back, .chair-6-t2 .chair-back, .chair-6-t3 .chair-back,
.chair-6-b1 .chair-back, .chair-6-b2 .chair-back, .chair-6-b3 .chair-back { width: 0.75rem; height: 0.5rem; }
.chair-6-t1 .chair-back, .chair-6-t2 .chair-back, .chair-6-t3 .chair-back { border-radius: 0.375rem 0.375rem 0 0; align-items: flex-start; }
.chair-6-b1 .chair-back, .chair-6-b2 .chair-back, .chair-6-b3 .chair-back { border-radius: 0 0 0.375rem 0.375rem; align-items: flex-end; }
.chair-6-t1 .chair-seat, .chair-6-t2 .chair-seat, .chair-6-t3 .chair-seat,
.chair-6-b1 .chair-seat, .chair-6-b2 .chair-seat, .chair-6-b3 .chair-seat { width: 0.5rem; height: 0.25rem; }

.chair-8-t1 { top: -0.625rem; left: 22%; transform: translateX(-50%); }
.chair-8-t2 { top: -0.625rem; left: 50%; transform: translateX(-50%); }
.chair-8-t3 { top: -0.625rem; right: 22%; transform: translateX(50%); }
.chair-8-b1 { bottom: -0.625rem; left: 22%; transform: translateX(-50%); }
.chair-8-b2 { bottom: -0.625rem; left: 50%; transform: translateX(-50%); }
.chair-8-b3 { bottom: -0.625rem; right: 22%; transform: translateX(50%); }
.chair-8-left { left: -0.625rem; top: 50%; transform: translateY(-50%); }
.chair-8-right { right: -0.625rem; top: 50%; transform: translateY(-50%); }
.chair-8-t1 .chair-back, .chair-8-t2 .chair-back, .chair-8-t3 .chair-back,
.chair-8-b1 .chair-back, .chair-8-b2 .chair-back, .chair-8-b3 .chair-back { width: 1rem; height: 0.625rem; }
.chair-8-t1 .chair-back, .chair-8-t2 .chair-back, .chair-8-t3 .chair-back { border-radius: 0.5rem 0.5rem 0 0; align-items: flex-start; }
.chair-8-b1 .chair-back, .chair-8-b2 .chair-back, .chair-8-b3 .chair-back { border-radius: 0 0 0.5rem 0.5rem; align-items: flex-end; }
.chair-8-t1 .chair-seat, .chair-8-t2 .chair-seat, .chair-8-t3 .chair-seat,
.chair-8-b1 .chair-seat, .chair-8-b2 .chair-seat, .chair-8-b3 .chair-seat { width: 0.75rem; height: 0.375rem; }
.chair-8-left .chair-back, .chair-8-right .chair-back { width: 0.625rem; height: 1rem; }
.chair-8-left .chair-back { border-radius: 0.5rem 0 0 0.5rem; justify-content: flex-start; }
.chair-8-right .chair-back { border-radius: 0 0.5rem 0.5rem 0; justify-content: flex-end; }
.chair-8-left .chair-seat, .chair-8-right .chair-seat { width: 0.375rem; height: 0.75rem; }

/* View-Specific Components & Layout Utilities */
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }
.shrink-0 { flex-shrink: 0; }
.min-w-0 { min-width: 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; }
.justify-start { justify-content: flex-start; }
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: 1fr; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.col-span-2 { grid-column: span 2; }
.col-span-4 { grid-column: span 4; }
.col-span-6 { grid-column: span 6; }
.block { display: block; }
.overflow-hidden { overflow: hidden; }
.overflow-y-auto { overflow-y: auto; }
.max-h-48 { max-height: 12rem; }
.uppercase { text-transform: uppercase; }
.tracking-widest { letter-spacing: 0.1em; }
.pos-product-card.unavailable { opacity: 0.6; cursor: not-allowed; }

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

.space-y-1 > * + * { margin-top: 0.25rem; }
.space-y-1-5 > * + * { margin-top: 0.375rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-3-5 > * + * { margin-top: 0.875rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-5 > * + * { margin-top: 1.25rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }

.w-full { width: 100%; }
.w-fit { width: fit-content; }
.w-20 { width: 5rem; }
.w-28 { width: 7rem; }

.p-2 { padding: 0.5rem; }
.p-2-5 { padding: 0.625rem; }
.p-3 { padding: 0.75rem; }
.p-3-5 { padding: 0.875rem; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }
.p-12 { padding: 3rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-1-5 { padding-top: 0.375rem; padding-bottom: 0.375rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }

.mt-0-5 { margin-top: 0.125rem; }
.mt-1 { margin-top: 0.25rem; }
.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-5 { margin-bottom: 1.25rem; }
.mb-6 { margin-bottom: 1.5rem; }
.pt-1 { padding-top: 0.25rem; }
.pt-2 { padding-top: 0.5rem; }
.pt-3 { padding-top: 0.75rem; }
.pt-4 { padding-top: 1rem; }
.pb-2 { padding-bottom: 0.5rem; }
.pb-3 { padding-bottom: 0.75rem; }
.pb-4 { padding-bottom: 1rem; }

.border { border: 1px solid var(--border-main); }
.border-t { border-top: 1px solid var(--border-main); }
.border-b { border-bottom: 1px solid var(--border-main); }
.border-soft { border-color: var(--bg-soft); }
.border-dashed { border-style: dashed; }
.divide-y > * + * { border-top: 1px solid var(--bg-soft); }

.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; }

.bg-white { background-color: #FFFFFF; }
.bg-cream { background-color: var(--bg-cream); }
.bg-cream-soft { background-color: rgba(250, 247, 242, 0.55); }
.bg-receipt { background-color: var(--bg-receipt); }
.bg-emerald-soft { background-color: var(--emerald-50); border-color: var(--emerald-200); }
.bg-amber-soft { background-color: var(--amber-50); border-color: var(--amber-200); }
.bg-blue-soft { background-color: var(--blue-50); }
.bg-purple-soft { background-color: var(--purple-50); }
.bg-rose-soft { background-color: var(--rose-50); }
.bg-red-soft { background-color: var(--red-50); border-color: var(--red-200); }
.bg-hover-cream:hover { background-color: rgba(250, 247, 242, 0.65); }

.text-9 { font-size: 9px; }
.text-10 { font-size: 0.625rem; }
.text-11 { font-size: 0.6875rem; }
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }

.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-black { font-weight: 900; }
.italic { font-style: italic; }
.leading-snug { line-height: 1.375; }
.leading-relaxed { line-height: 1.65; }
.leading-none { line-height: 1; }
.whitespace-nowrap { white-space: nowrap; }
.whitespace-pre-wrap { white-space: pre-wrap; }

.text-primary { color: var(--text-primary); }
.text-espresso { color: var(--text-espresso); }
.text-brown-deep { color: var(--text-brown-deep); }
.text-muted { color: var(--text-muted); }
.text-light { color: var(--text-light); }
.text-faint { color: var(--text-faint); }
.text-emerald { color: var(--emerald-700); }
.text-emerald-dark { color: var(--emerald-900); }
.text-amber { color: var(--amber-700); }
.text-amber-dark { color: var(--amber-900); }
.text-rose { color: var(--rose-700); }
.text-red { color: var(--red-700); }
.text-sky { color: var(--sky-700); }
.text-blue { color: var(--blue-700); }
.text-purple { color: var(--purple-700); }
.text-white { color: #FFFFFF; }
.text-stone { color: var(--stone-300); }

.hover-card { transition: border-color 0.15s, box-shadow 0.15s; cursor: pointer; }
.hover-card:hover { border-color: var(--text-espresso); box-shadow: var(--shadow-md); }
.hover-underline:hover { text-decoration: underline; }

.spinner {
  width: 2rem;
  height: 2rem;
  border: 2px solid var(--text-espresso);
  border-top-color: transparent;
  border-radius: 9999px;
  animation: spin 1s linear infinite;
}

.loading-box {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 360px;
}

.empty-state-box {
  background-color: #FFFFFF;
  border-radius: 1rem;
  border: 1px dashed var(--border-main);
  padding: 3rem 1.5rem;
  text-align: center;
  color: var(--text-light);
}

.avatar-circle {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  background-color: rgba(92, 107, 71, 0.15);
  color: var(--accent-olive);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.avatar-circle-lg {
  width: 3rem;
  height: 3rem;
  border-radius: 9999px;
  background-color: var(--text-espresso);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
}

.avatar-box {
  width: 3rem;
  height: 3rem;
  border-radius: 1rem;
  background-color: var(--bg-cream);
  border: 1px solid var(--border-main);
  color: var(--text-espresso);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.modal-icon-box {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  background-color: rgba(74, 46, 27, 0.1);
  color: var(--text-espresso);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.header-table-badge {
  width: 3rem;
  height: 3rem;
  border-radius: 1rem;
  background-color: var(--text-espresso);
  color: #FFFFFF;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  flex-shrink: 0;
}

.receipt-brand-circle {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  background-color: var(--text-espresso);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.5rem auto;
}

.kds-live-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  background-color: var(--emerald-500);
  display: inline-block;
  animation: pulse 1.6s infinite;
}

.kds-timer-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 0.5rem;
  background-color: #FFFFFF;
  color: var(--text-brown-deep);
  border: 1px solid var(--border-main);
}
.kds-timer-late {
  background-color: var(--rose-100);
  color: var(--rose-800);
  border-color: var(--rose-200);
  animation: pulse 1.5s infinite;
}

.kds-item-qty {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 0.5rem;
  background-color: rgba(74, 46, 27, 0.1);
  color: var(--text-espresso);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.kds-note-pill {
  font-size: 0.625rem;
  color: var(--amber-800);
  background-color: var(--amber-50);
  padding: 0.15rem 0.5rem;
  border-radius: 0.375rem;
  display: inline-block;
  margin-top: 0.25rem;
  font-weight: 600;
}

.kds-ready-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--sky-700);
  background-color: var(--sky-50);
  padding: 0.25rem 0.625rem;
  border-radius: 0.75rem;
}

.option-choice-btn {
  width: 100%;
  padding: 0.625rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border-main);
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: right;
  font-size: 0.75rem;
  color: var(--text-primary);
  background-color: #FFFFFF;
  transition: all 0.15s;
}
.option-choice-btn.chosen {
  border-color: var(--text-espresso);
  background-color: rgba(74, 46, 27, 0.06);
  color: var(--text-espresso);
  font-weight: 700;
}

.unavailable-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-weight: 700;
  font-size: 0.75rem;
}

.img-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-thumb {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  object-fit: cover;
  border: 1px solid var(--border-main);
  flex-shrink: 0;
}

.recipe-tag {
  background-color: var(--bg-hover);
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
}

.loyalty-tag {
  padding: 0.15rem 0.5rem;
  border-radius: 0.5rem;
  background-color: var(--bg-cream);
  border: 1px solid var(--border-main);
  color: var(--text-primary);
}

.ai-avatar-bot {
  width: 2rem;
  height: 2rem;
  border-radius: 0.75rem;
  background-color: var(--text-espresso);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 0.25rem;
}
.ai-avatar-user {
  width: 2rem;
  height: 2rem;
  border-radius: 0.75rem;
  background-color: var(--accent-olive);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 0.25rem;
}

.account-username-box {
  padding: 0.75rem;
  background-color: rgba(255, 251, 235, 0.75);
  border: 1px solid rgba(253, 230, 138, 0.85);
  border-radius: 0.75rem;
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS (sm: 640px, md: 768px, lg: 1024px, xl: 1280px)
   ========================================================================== */
@media (min-width: 640px) {
  .login-form-col { padding: 3rem; }
  .navbar-subtitle { display: block; }
  .btn-label-sm { display: inline !important; }
  .kpi-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .kpi-grid-3 { grid-template-columns: repeat(3, 1fr); }
  .mini-tables-grid { grid-template-columns: repeat(5, 1fr); }
  .welcome-banner { padding: 2rem; }
  .filter-bar { flex-direction: row; }
  .search-box { width: 20rem; }
  .pos-product-grid { grid-template-columns: repeat(3, 1fr); }
  .preset-gallery-grid { grid-template-columns: repeat(6, 1fr); }
  .floor-canvas { min-width: 0; padding: 1.5rem; min-height: 740px; }
  .floor-sunlight { width: 11rem; }
  .bar-counter { display: flex; }
  .mobile-floor-hint { display: none; }
  .sm-grid-2 { grid-template-columns: repeat(2, 1fr); }
  .sm-col-span-2 { grid-column: span 2; }

  /* Table responsive desktop sizing */
  .table-wood-top {
    width: 6.5rem;
    height: 6rem;
    border-radius: 1rem;
    padding: 0.5rem;
  }
  .table-wood-top.shape-circle.seats-2 { width: 5rem; height: 5rem; }
  .table-wood-top.shape-circle.seats-4 { width: 6rem; height: 6rem; }
  .table-wood-top.shape-rectangle,
  .table-wood-top.seats-6 { width: 9rem; height: 6rem; }
  .table-wood-top.seats-8 { width: 12rem; height: 6rem; }
  .table-status-chip { font-size: 9px; padding: 1px 6px; }
  .table-seat-chip { font-size: 9px; }
  .table-number-medallion { width: 2rem; height: 2rem; font-size: 0.875rem; }
  .table-vase, .table-cup { width: 0.625rem; height: 0.625rem; }
  .table-elapsed-chip { font-size: 9px; padding: 1px 6px; }
  .table-label-chip { font-size: 9px; max-width: 80px; }
  .selection-ring { border-radius: 1rem; }
  .realistic-table-inner { padding: 0.5rem; }

  /* Chair responsive desktop sizing */
  .chair-2-left { left: -0.875rem; width: 1.25rem; height: 1.75rem; }
  .chair-2-left .chair-back { width: 1rem; height: 1.5rem; }
  .chair-2-left .chair-seat { width: 0.625rem; height: 1.125rem; }
  .chair-2-right { right: -0.875rem; width: 1.25rem; height: 1.75rem; }
  .chair-2-right .chair-back { width: 1rem; height: 1.5rem; }
  .chair-2-right .chair-seat { width: 0.625rem; height: 1.125rem; }

  .chair-4c-top { top: -0.875rem; }
  .chair-4c-bottom { bottom: -0.875rem; }
  .chair-4c-top .chair-back, .chair-4c-bottom .chair-back { width: 1.75rem; height: 1rem; }
  .chair-4c-top .chair-seat, .chair-4c-bottom .chair-seat { width: 1.25rem; height: 0.625rem; }
  .chair-4c-left { left: -0.875rem; }
  .chair-4c-right { right: -0.875rem; }
  .chair-4c-left .chair-back, .chair-4c-right .chair-back { width: 1rem; height: 1.75rem; }
  .chair-4c-left .chair-seat, .chair-4c-right .chair-seat { width: 0.625rem; height: 1.25rem; }

  .chair-4-tl, .chair-4-tr { top: -0.875rem; }
  .chair-4-bl, .chair-4-br { bottom: -0.875rem; }
  .chair-4-tl .chair-back, .chair-4-tr .chair-back, .chair-4-bl .chair-back, .chair-4-br .chair-back { width: 1.5rem; height: 1rem; }
  .chair-4-tl .chair-seat, .chair-4-tr .chair-seat, .chair-4-bl .chair-seat, .chair-4-br .chair-seat { width: 1.125rem; height: 0.625rem; }

  .chair-6-t1, .chair-6-t2, .chair-6-t3 { top: -0.875rem; }
  .chair-6-b1, .chair-6-b2, .chair-6-b3 { bottom: -0.875rem; }
  .chair-6-t1 .chair-back, .chair-6-t2 .chair-back, .chair-6-t3 .chair-back,
  .chair-6-b1 .chair-back, .chair-6-b2 .chair-back, .chair-6-b3 .chair-back { width: 1.5rem; height: 1rem; }
  .chair-6-t1 .chair-seat, .chair-6-t2 .chair-seat, .chair-6-t3 .chair-seat,
  .chair-6-b1 .chair-seat, .chair-6-b2 .chair-seat, .chair-6-b3 .chair-seat { width: 1.125rem; height: 0.625rem; }

  .chair-8-t1, .chair-8-t2, .chair-8-t3 { top: -1rem; }
  .chair-8-b1, .chair-8-b2, .chair-8-b3 { bottom: -1rem; }
  .chair-8-left { left: -1rem; }
  .chair-8-right { right: -1rem; }
  .chair-8-t1 .chair-back, .chair-8-t2 .chair-back, .chair-8-t3 .chair-back,
  .chair-8-b1 .chair-back, .chair-8-b2 .chair-back, .chair-8-b3 .chair-back { width: 1.75rem; height: 1.125rem; }
  .chair-8-t1 .chair-seat, .chair-8-t2 .chair-seat, .chair-8-t3 .chair-seat,
  .chair-8-b1 .chair-seat, .chair-8-b2 .chair-seat, .chair-8-b3 .chair-seat { width: 1.25rem; height: 0.75rem; }
  .chair-8-left .chair-back, .chair-8-right .chair-back { width: 1.125rem; height: 1.75rem; }
  .chair-8-left .chair-seat, .chair-8-right .chair-seat { width: 0.75rem; height: 1.25rem; }

  .ai-bubble { max-width: 75%; }
  .ai-messages-box { padding: 1.5rem; }
}

@media (min-width: 768px) {
  .navbar-clock { display: flex; }
  .btn-label-md { display: inline !important; }
  .welcome-banner { flex-direction: row; align-items: center; }
  .grid-2-col { grid-template-columns: repeat(2, 1fr); }
  .grid-3-col { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .login-page { flex-direction: row; }
  .login-showcase { display: flex; width: 50%; }
  .login-mobile-logo { display: none; }
  .sidebar { transform: translateX(0); }
  .sidebar-close-btn { display: none; }
  .hamburger-btn { display: none; }
  .main-wrapper { margin-right: 16rem; }
  .top-navbar { padding: 0 2rem; }
  .page-container { padding: 2rem; }
  .page-container-narrow { padding: 2rem; }
  .kpi-grid-4 { grid-template-columns: repeat(4, 1fr); }
  .grid-12 { grid-template-columns: repeat(12, 1fr); }
  .col-span-7 { grid-column: span 7; }
  .col-span-5 { grid-column: span 5; }
  .grid-3-col { grid-template-columns: repeat(3, 1fr); }
  .pos-layout { padding: 1.5rem; flex-direction: row; }
  .pos-cart-panel { width: 24rem; flex-shrink: 0; }
  .ai-container { padding: 2rem; height: calc(100vh - 6rem); }
}

@media (min-width: 1280px) {
  .login-showcase { width: 58.333333%; }
  .pos-product-grid { grid-template-columns: repeat(4, 1fr); }
}

/* Print Styles for Cafe Thermal Receipts */
@media print {
  body * {
    visibility: hidden;
  }
  #printable-receipt, #printable-receipt * {
    visibility: visible;
  }
  #printable-receipt {
    position: absolute;
    left: 0;
    top: 0;
    width: 80mm;
    max-width: 80mm;
    margin: 0 auto;
    padding: 10px;
    background: #FFFFFF !important;
    color: #000000 !important;
    border: none !important;
  }
  .no-print {
    display: none !important;
  }
}
