@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

:root {
  --brand-orange: #f47b08;
  --brand-orange-hover: #e06d04;
  --brand-orange-light: #fff3e6;
  --brand-orange-glow: rgba(244, 123, 8, 0.25);

  --navy: #131726;
  --navy-surface: #1a1f33;
  --navy-border: #282f4c;
  --navy-text: #e2e5f0;
  --navy-muted: #858da3;

  --ink: #181c26;
  --text-secondary: #585f70;
  --muted: #8890a0;
  --line: #e4e7ed;
  --bg-dashboard: #f3f5f8;
  --bg-customer: #fafbfd;
  --surface: #ffffff;

  --green: #1ca557;
  --green-light: #e6f7ee;
  --green-border: #a4e1bc;

  --red: #e7363a;
  --red-light: #feecee;
  --red-border: #f8afb1;

  --yellow: #f59e0b;
  --yellow-light: #fef7e6;
  --yellow-border: #fbd68b;

  --blue: #2563eb;
  --blue-light: #eff6ff;

  --shadow-sm: 0 2px 6px rgba(18, 22, 33, 0.04);
  --shadow-md: 0 8px 24px rgba(18, 22, 33, 0.06);
  --shadow-lg: 0 16px 40px rgba(18, 22, 33, 0.1);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-pill: 999px;
  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================
   RESET & BASE STYLES
   ========================================================== */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg-customer);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: transparent;
  transition: var(--transition);
}

img {
  max-width: 100%;
  display: block;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 800;
  letter-spacing: -0.8px;
  line-height: 1.25;
  margin-bottom: 8px;
}

h2 {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.4px;
  margin-bottom: 6px;
}

h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
}

.muted {
  color: var(--muted);
}

.font-normal {
  font-weight: normal;
}

.font-xs {
  font-size: 12px;
}

.center {
  text-align: center;
}

.grow {
  flex: 1;
  min-width: 0;
}

.eyebrow {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.6px;
  color: var(--brand-orange);
  text-transform: uppercase;
  margin-bottom: 4px;
}

/* ==========================================================
   BUTTONS & BADGES
   ========================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--brand-orange);
  color: #fff;
  border: 1px solid var(--brand-orange);
  border-radius: var(--radius-md);
  padding: 10px 18px;
  font-weight: 600;
  font-size: 13px;
  box-shadow: 0 4px 14px var(--brand-orange-glow);
  cursor: pointer;
  transition: var(--transition);
}

.btn:hover {
  background: var(--brand-orange-hover);
  border-color: var(--brand-orange-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(244, 123, 8, 0.35);
}

.btn:active {
  transform: translateY(0);
}

.btn-small {
  padding: 7px 13px;
  font-size: 12px;
  border-radius: var(--radius-sm);
}

.btn-outline {
  background: #fff;
  color: var(--ink);
  border-color: var(--line);
  box-shadow: var(--shadow-sm);
}

.btn-outline:hover {
  background: var(--brand-orange-light);
  border-color: var(--brand-orange);
  color: var(--brand-orange);
}

.btn-block {
  width: 100%;
  margin-top: 14px;
}

.btn-success {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
  box-shadow: 0 4px 14px rgba(28, 165, 87, 0.25);
}

.btn-success:hover {
  background: #158b48;
  border-color: #158b48;
}

.btn-danger {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
  box-shadow: 0 4px 14px rgba(231, 54, 58, 0.25);
}

.btn-outline-danger {
  background: #fff;
  color: var(--red);
  border-color: var(--red-border);
}

.btn-outline-danger:hover {
  background: var(--red-light);
  color: var(--red);
}

.status {
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius-pill);
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: -0.2px;
  white-space: nowrap;
}

.status-cooking {
  color: #b45309;
  background: var(--yellow-light);
  border: 1px solid var(--yellow-border);
}

.status-ready {
  color: #15803d;
  background: var(--green-light);
  border: 1px solid var(--green-border);
}

.status-pending {
  color: #9a6500;
  background: #fff9e6;
  border: 1px solid #fedc88;
}

.status-new {
  color: #dc2626;
  background: var(--red-light);
  border: 1px solid var(--red-border);
}

.status-urgent {
  color: #b91c1c;
  background: #fee2e2;
  border: 1px solid #fca5a5;
  font-weight: 800;
}

.badge-pill {
  font-size: 11px;
  font-weight: 600;
  color: var(--brand-orange);
  background: var(--brand-orange-light);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

/* ==========================================================
   CUSTOMER TOPBAR
   ========================================================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 72px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(16px, 4vw, 56px);
  gap: 20px;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.6px;
  color: var(--ink);
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand-orange), #ff9838);
  color: #fff;
  box-shadow: 0 4px 12px var(--brand-orange-glow);
}

.table-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f4f6f9;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  font-size: 12px;
}

.table-chip .chip-status {
  color: var(--muted);
  font-size: 11px;
  border-left: 1px solid var(--line);
  padding-left: 8px;
}

.dot,
.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.dot.green,
.live-dot {
  background: var(--green);
}

.live-dot.pulse {
  animation: pulse-green 1.8s infinite;
}

@keyframes pulse-green {
  0% {
    box-shadow: 0 0 0 0 rgba(28, 165, 87, 0.6);
  }

  70% {
    box-shadow: 0 0 0 8px rgba(28, 165, 87, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(28, 165, 87, 0);
  }
}

.top-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-weight: 600;
  color: var(--text-secondary);
}

.top-links a {
  position: relative;
  padding: 6px 0;
}

.top-links a:hover {
  color: var(--brand-orange);
}

.top-links a.active {
  color: var(--brand-orange);
}

.top-links a.active::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--brand-orange);
  border-radius: 2px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.workspace-switch-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  background: var(--navy);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 3px 10px rgba(19, 23, 38, 0.2);
}

.workspace-switch-btn:hover {
  background: var(--navy-surface);
  transform: translateY(-1px);
}

.btn-cart {
  position: relative;
  padding: 8px 16px;
}

.cart-count {
  background: #fff;
  color: var(--brand-orange);
  border-radius: 12px;
  padding: 1px 7px;
  font-size: 11px;
  font-weight: 800;
  margin-left: 4px;
}

/* ==========================================================
   CUSTOMER MAIN LAYOUT
   ========================================================== */
.customer-main {
  max-width: 1360px;
  margin: auto;
  padding: 32px clamp(16px, 4vw, 56px) 120px;
}

.hero {
  min-height: 380px;
  border-radius: 24px;
  background: linear-gradient(135deg, #fff3e6 0%, #ffeedb 100%);
  border: 1px solid #fedfbe;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  position: relative;
  overflow: hidden;
  margin-bottom: 44px;
  box-shadow: var(--shadow-md);
}

.hero-copy {
  padding: 56px clamp(24px, 4vw, 64px);
  align-self: center;
  z-index: 2;
}

.hero-copy h1 {
  font-size: clamp(32px, 3.8vw, 48px);
  margin: 12px 0 16px;
}

.hero-copy h1 em {
  font-style: normal;
  color: var(--brand-orange);
}

.hero-copy p {
  color: #63616a;
  max-width: 480px;
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 28px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.btn-hero {
  padding: 13px 24px;
  font-size: 14px;
}

.btn-hero-outline {
  background: transparent;
  color: var(--ink);
  border: 1px solid rgba(0, 0, 0, 0.15);
  box-shadow: none;
}

.btn-hero-outline:hover {
  background: rgba(255, 255, 255, 0.7);
  border-color: var(--brand-orange);
  color: var(--brand-orange);
}

.hero-art {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  clip-path: ellipse(90% 95% at 75% 50%);
}

.hero-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-badge {
  position: absolute;
  bottom: 24px;
  right: 32%;
  background: #fff;
  border-radius: 14px;
  padding: 12px 18px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.04);
  z-index: 3;
}

.hero-badge .badge-star {
  display: block;
  font-size: 16px;
  font-weight: 800;
  color: var(--brand-orange);
}

.hero-badge small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 20px;
}

.section-head h2 {
  font-size: 26px;
  margin: 4px 0 0;
}

.searchbox {
  display: flex;
  gap: 10px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  padding: 10px 16px;
  border-radius: var(--radius-md);
  width: 300px;
  color: var(--muted);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.searchbox:focus-within {
  border-color: var(--brand-orange);
  box-shadow: 0 0 0 3px var(--brand-orange-glow);
}

.searchbox input {
  border: none;
  outline: none;
  width: 100%;
  background: transparent;
  color: var(--ink);
}

.menu-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 28px;
}

.category-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: sticky;
  top: 96px;
  align-self: start;
}

.category {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 13px;
  border: 1px solid transparent;
}

.category:hover {
  background: #fff;
  border-color: var(--line);
  color: var(--brand-orange);
}

.category.active {
  background: var(--brand-orange-light);
  color: var(--brand-orange);
  border-color: #fedfbe;
  font-weight: 700;
}

.food-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.food-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

.food-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: #d2d7e2;
}

.food-image {
  height: 180px;
  position: relative;
  background: #f1f3f7;
  overflow: hidden;
}

.food-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.food-card:hover .food-image img {
  transform: scale(1.05);
}

.tag {
  position: absolute;
  left: 12px;
  top: 12px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(6px);
  color: var(--brand-orange);
  border-radius: var(--radius-sm);
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.add-btn {
  position: absolute;
  right: 12px;
  bottom: 12px;
  border-radius: 12px;
  background: var(--brand-orange);
  color: #fff;
  font-size: 20px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 14px var(--brand-orange-glow);
}

.add-btn:hover {
  background: var(--brand-orange-hover);
  transform: scale(1.1);
}

.food-info {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.food-head-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
}

.food-head-row h3 {
  font-size: 15px;
  font-weight: 700;
  margin: 0;
}

.food-info p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
  min-height: 40px;
  margin-bottom: 14px;
}

.food-foot-row {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.food-foot-row .price {
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
}

.btn-add-text {
  padding: 6px 12px;
  font-size: 11px;
  background: var(--brand-orange-light);
  color: var(--brand-orange);
  border: 1px solid #fedfbe;
  box-shadow: none;
}

.btn-add-text:hover {
  background: var(--brand-orange);
  color: #fff;
}

.rating {
  font-size: 11px;
  font-weight: 700;
  color: #e59316;
}

/* ==========================================================
   FLOATING CART (FIX: ẨN KHI 0 MÓN, TỰ ĐỘNG HIỆN KHI CÓ MÓN)
   ========================================================== */
.floating-cart {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  border: 1px solid var(--line);
  box-shadow: 0 16px 48px rgba(19, 23, 38, 0.16);
  border-radius: var(--radius-pill);
  padding: 10px 14px 10px 20px;
  display: flex;
  align-items: center;
  gap: 28px;
  z-index: 40;
  min-width: 360px;
  justify-content: space-between;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
}

.floating-cart.has-items {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.cart-floating-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cart-icon-bubble {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--brand-orange-light);
  color: var(--brand-orange);
  display: grid;
  place-items: center;
}

.cart-icon-bubble .cart-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--brand-orange);
  color: #fff;
}

.cart-floating-meta b {
  display: block;
  font-size: 13px;
}

.cart-floating-meta small {
  display: block;
  color: var(--brand-orange);
  font-weight: 800;
  font-size: 14px;
}

.btn-floating-checkout {
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  font-size: 13px;
}

/* ==========================================================
   DASHBOARD / WORKSPACE (STAFF, KITCHEN, ADMIN)
   ========================================================== */
.dashboard-body {
  background: var(--bg-dashboard);
  color: var(--ink);
}

.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 250px;
  background: var(--navy);
  color: var(--navy-text);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  z-index: 30;
  border-right: 1px solid var(--navy-border);
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
}

.sidebar-brand {
  color: #fff;
  padding: 0 8px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 18px;
  font-weight: 800;
  border-bottom: 1px solid var(--navy-border);
  margin-bottom: 18px;
}

.side-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.6px;
  color: var(--navy-muted);
  padding: 12px 10px 6px;
}

.sidebar>a:not(.brand) {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-md);
  color: #a4adca;
  font-size: 13px;
  font-weight: 600;
  margin: 2px 0;
  transition: var(--transition);
}

.sidebar>a:not(.brand):hover {
  background: var(--navy-surface);
  color: #fff;
}

.sidebar>a.active {
  background: var(--brand-orange);
  color: #fff;
  box-shadow: 0 4px 16px var(--brand-orange-glow);
}

.sidebar>a.active svg {
  stroke: #fff;
}

.nav-badge {
  margin-left: auto;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
}

.kitchen-counter {
  background: #e7363a;
}

.client-view-link {
  color: #7b85a3 !important;
  border: 1px dashed var(--navy-border);
}

.side-bottom {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding: 16px 8px 0;
  border-top: 1px solid var(--navy-border);
}

.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f7ba7e, #e2803b);
  color: #4a2106;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 13px;
}

.side-bottom b {
  display: block;
  font-size: 13px;
  color: #fff;
}

.side-bottom small {
  display: block;
  color: var(--navy-muted);
  font-size: 11px;
}

.dashboard-main {
  margin-left: 250px;
  padding: 32px clamp(20px, 3.5vw, 48px) 60px;
  min-height: 100vh;
}

.dash-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 28px;
}

.dash-header h1 {
  font-size: 28px;
  margin: 4px 0 6px;
}

.dash-header p {
  color: var(--muted);
  margin: 0;
}

.header-action-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-primary-tool {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--brand-orange);
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 9px 15px;
  font-weight: 600;
  font-size: 12px;
  box-shadow: 0 4px 12px var(--brand-orange-glow);
}

.btn-primary-tool:hover {
  background: var(--brand-orange-hover);
}

/* ==========================================================
   KDS SPECIFIC STYLES (MÀN HÌNH BẾP TIÊU CHUẨN CÔNG NGHIỆP)
   ========================================================== */
.kds-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: #fff;
  padding: 20px 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
}

.kds-title-group {
  display: flex;
  align-items: center;
  gap: 16px;
}

.kds-brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: #e6f7ee;
  color: var(--green);
  border-radius: var(--radius-md);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.5px;
}

.kds-page-title {
  font-size: 24px;
  font-weight: 800;
  margin: 0 0 4px;
}

.kds-page-sub {
  color: var(--muted);
  font-size: 12px;
  margin: 0;
}

.kds-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}

.kds-clock-box {
  background: #f4f6fa;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 8px 16px;
  text-align: right;
}

.kds-clock-label {
  display: block;
  font-size: 9px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 1px;
}

.kds-digital-clock {
  font-size: 18px;
  font-family: 'Consolas', 'Courier New', monospace;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: 1px;
}

.kds-control-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.kds-btn-tool {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 9px 13px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.kds-btn-tool:hover {
  background: #f4f6fa;
  border-color: #cbd2e0;
}

.kds-filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.kitchen-tabs {
  display: flex;
  gap: 8px;
}

.kitchen-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 9px 16px;
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 13px;
  box-shadow: var(--shadow-sm);
}

.kitchen-tabs button.active {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}

.tab-badge {
  background: #f0f2f7;
  color: var(--ink);
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  font-size: 11px;
}

.kitchen-tabs button.active .tab-badge {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.tab-badge.new-badge {
  background: #feecee;
  color: var(--red);
}

.tab-badge.cooking-badge {
  background: #fef7e6;
  color: #b45309;
}

.tab-badge.ready-badge {
  background: #e6f7ee;
  color: var(--green);
}

.kds-station-filter {
  display: flex;
  align-items: center;
  gap: 10px;
}

.kds-station-filter select {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 9px 14px;
  font-size: 12px;
  font-weight: 600;
  outline: none;
}

/* KDS CARDS GRID (SỬA LỖI NÚT LỆCH HÀNG BẰNG FLEXBOX) */
.kitchen-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}

.kitchen-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  position: relative;
  transition: var(--transition);
}

.kitchen-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.kitchen-card.urgency-warning {
  border-top: 4px solid var(--yellow);
}

.kitchen-card.urgency-urgent {
  border-top: 4px solid var(--red);
  box-shadow: 0 4px 18px rgba(231, 54, 58, 0.12);
}

.kitchen-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.card-meta-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.card-table-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-table-title b {
  font-size: 16px;
  color: var(--ink);
}

.order-code {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.type-pill {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  background: #f0f2f7;
  color: var(--text-secondary);
  border-radius: var(--radius-pill);
}

.card-time-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
}

.time-created {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
}

.time-elapsed {
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}

.badge-normal {
  background: var(--green-light);
  color: var(--green);
}

.badge-warning {
  background: var(--yellow-light);
  color: #b45309;
}

.badge-urgent {
  background: var(--red-light);
  color: var(--red);
  animation: pulse-red-badge 2s infinite;
}

@keyframes pulse-red-badge {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.7;
  }
}

.kds-order-note {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff8eb;
  border: 1px dashed #fbd68b;
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-size: 11px;
  color: #92400e;
  margin: 10px 0;
  font-weight: 600;
}

.kitchen-items-list {
  flex: 1;
  min-height: 110px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 0;
}

.kitchen-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 6px;
  border-bottom: 1px solid #f4f5f8;
  font-size: 13px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  user-select: none;
  transition: var(--transition);
}

.kitchen-item:hover {
  background: #f8f9fc;
}

.kitchen-item.item-done {
  opacity: 0.5;
  background: #f5f6f8;
}

.kitchen-item.item-done .item-name {
  text-decoration: line-through;
}

.item-checkbox-wrap {
  position: relative;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.kds-item-checkbox {
  opacity: 0;
  position: absolute;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}

.item-check-custom {
  width: 18px;
  height: 18px;
  border: 2px solid #cbd2e0;
  border-radius: 5px;
  display: block;
  transition: var(--transition);
}

.kds-item-checkbox:checked+.item-check-custom {
  background: var(--green);
  border-color: var(--green);
}

.kds-item-checkbox:checked+.item-check-custom::after {
  content: "✓";
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  display: grid;
  place-items: center;
  height: 100%;
}

.item-name {
  font-weight: 600;
  color: var(--ink);
}

.item-note {
  display: block;
  font-size: 11px;
  color: var(--brand-orange);
  margin-top: 2px;
}

.item-qty {
  font-size: 13px;
  background: #f1f3f7;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  color: var(--ink);
}

/* NÚT THAO TÁC CỦA CARD (LUÔN CĂN ĐỀU DƯỚI ĐÁY) */
.kitchen-actions {
  margin-top: auto;
  padding-top: 14px;
}

.btn-kds {
  width: 100%;
  padding: 11px 16px;
  font-size: 13px;
  font-weight: 700;
  border-radius: var(--radius-md);
}

.btn-start-cooking {
  background: var(--brand-orange);
  border-color: var(--brand-orange);
  color: #fff;
  box-shadow: 0 4px 14px var(--brand-orange-glow);
}

.btn-start-cooking:hover {
  background: var(--brand-orange-hover);
}

.btn-ready-cooking {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
}

.btn-ready-cooking:hover {
  background: #1d4ed8;
}

.btn-done-cooking {
  background: #e6f7ee;
  border-color: var(--green-border);
  color: var(--green);
  box-shadow: none;
  cursor: default;
}

/* UNAVAILABLE FOOD PANEL */
.unavailable-panel {
  margin-top: 28px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.unavailable-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.unavailable-head h2 {
  margin: 0 0 4px;
}

.unavailable-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.unavailable-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  background: #f8f9fc;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.un-info b {
  display: block;
  font-size: 14px;
  margin-bottom: 4px;
}

/* ==========================================================
   KDS DARK MODE (CHẾ ĐỘ TỐI BẾP CHUYÊN NGHIỆP)
   ========================================================== */
body.kds-dark {
  background: #0d1117;
  color: #e6edf3;
}

body.kds-dark .kds-topbar,
body.kds-dark .kitchen-card,
body.kds-dark .unavailable-panel,
body.kds-dark .panel {
  background: #161b22;
  border-color: #30363d;
  color: #e6edf3;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

body.kds-dark .kds-digital-clock,
body.kds-dark .card-table-title b,
body.kds-dark .item-name,
body.kds-dark h1,
body.kds-dark h2,
body.kds-dark h3 {
  color: #ffffff;
}

body.kds-dark .kds-clock-box,
body.kds-dark .kds-btn-tool,
body.kds-dark .kitchen-tabs button,
body.kds-dark .kds-station-filter select,
body.kds-dark .unavailable-row {
  background: #21262d;
  border-color: #363b42;
  color: #c9d1d9;
}

body.kds-dark .kitchen-tabs button.active {
  background: var(--brand-orange);
  color: #fff;
  border-color: var(--brand-orange);
}

body.kds-dark .kitchen-item {
  border-bottom-color: #21262d;
}

body.kds-dark .kitchen-item:hover {
  background: #21262d;
}

body.kds-dark .kitchen-item.item-done {
  background: #191e26;
  opacity: 0.4;
}

body.kds-dark .item-qty {
  background: #30363d;
  color: #f0f6fc;
}

body.kds-dark .kds-order-note {
  background: rgba(146, 64, 14, 0.2);
  border-color: #d97706;
  color: #fde68a;
}

/* ==========================================================
   STAFF PAGE (SƠ ĐỒ BÀN)
   ========================================================== */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  position: relative;
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.stat-card>span {
  display: block;
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 8px;
}

.stat-card>b {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.6px;
  display: block;
}

.stat-card small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 11px;
}

.stat-card small.positive {
  color: var(--green);
  font-weight: 600;
}

.stat-card small.urgent-text {
  color: var(--red);
  font-weight: 600;
}

.floor-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
}

.filter-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.select-wrapper select,
.filter-row select,
.filter-row input {
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 600;
  background: #fff;
  outline: none;
}

.legend {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin: 12px 0 20px;
  font-size: 12px;
  color: var(--text-secondary);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 7px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.legend-dot.available {
  background: var(--green) !important;
}

.legend-dot.occupied {
  background: var(--red) !important;
}

.legend-dot.reserved {
  background: var(--yellow) !important;
}

.legend-dot.cleaning {
  background: #8b92a2 !important;
}

.floor-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  background: #f8f9fb;
  border: 1px dashed #cfd4df;
  padding: 24px;
  border-radius: var(--radius-lg);
}

.table-tile {
  min-height: 115px;
  border: 1px solid;
  border-radius: var(--radius-lg);
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: left;
  transition: var(--transition);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.table-tile:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: var(--shadow-md);
}

.table-tile.available {
  background: #eaf8f0 !important;
  border-color: #a4e1bc !important;
  color: #116838 !important;
}

.table-tile.occupied {
  background: #feeff0 !important;
  border-color: #f8afb1 !important;
  color: #a5181c !important;
}

.table-tile.reserved {
  background: #fef8eb !important;
  border-color: #fbd68b !important;
  color: #925307 !important;
}

.table-tile.cleaning {
  background: #f1f3f7 !important;
  border-color: #cbd0dc !important;
  color: #4a5162 !important;
}

.table-tile-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.table-tile b {
  font-size: 18px;
  font-weight: 800;
}

.seat-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  background: rgba(0, 0, 0, 0.06);
  border-radius: var(--radius-pill);
}

.table-status-label {
  font-size: 12px;
  font-weight: 700;
  margin-top: 4px;
}

.view-order-hint {
  font-size: 11px;
  font-weight: 700;
  color: var(--brand-orange);
  text-decoration: underline;
  margin-top: 4px;
}

/* ==========================================================
   TABLE ORDER DETAIL & PAYMENT
   ========================================================== */
.back-nav-row {
  margin-bottom: 10px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--brand-orange);
}

.title-with-badge .heading-badge-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.title-with-badge h1 {
  margin: 0;
}

.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.panel-title h2 {
  margin: 0;
}

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.9fr);
  gap: 24px;
  align-items: start;
}

.order-food-list {
  display: flex;
  flex-direction: column;
}

.order-food {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid #f2f3f7;
}

.food-icon-box {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: var(--brand-orange-light);
  color: var(--brand-orange);
  display: grid;
  place-items: center;
}

.food-info-text b {
  display: block;
  font-size: 14px;
}

.food-info-text small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 2px;
}

.food-amount {
  font-size: 14px;
  font-weight: 700;
  margin-left: 14px;
}

.bill-summary-box {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 2px dashed var(--line);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 13px;
  color: var(--text-secondary);
}

.summary-row.total {
  font-size: 17px;
  font-weight: 800;
  color: var(--ink);
  padding-top: 12px;
  margin-top: 6px;
  border-top: 1px solid var(--line);
}

.summary-row.total b {
  color: var(--brand-orange);
}

.button-row {
  display: flex;
  gap: 12px;
  margin-top: 22px;
}

.button-row>* {
  flex: 1;
}

.info-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid #f4f5f8;
  font-size: 13px;
}

.info-row span {
  color: var(--muted);
}

hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 18px 0;
}

/* ==========================================================
   TRACKING STEPPER
   ========================================================== */
.tracking-panel {
  max-width: 860px;
  margin: auto;
}

.tracking-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.tracking-top h2 {
  font-size: 24px;
  margin: 4px 0 0;
}

.tracking-status-badge {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stepper {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 36px 0 44px;
  position: relative;
}

.stepper::before {
  content: "";
  height: 3px;
  background: var(--line);
  position: absolute;
  left: 12%;
  right: 12%;
  top: 20px;
  z-index: 1;
}

.step {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 8px;
  position: relative;
  text-align: center;
  font-size: 12px;
  z-index: 2;
}

.step-icon {
  display: grid;
  place-items: center;
  border: 3px solid #e1e4ea;
  background: #fff;
  color: #9aa1b0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-weight: 800;
  transition: var(--transition);
}

.step.done .step-icon {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.step.current .step-icon {
  border-color: var(--brand-orange);
  color: var(--brand-orange);
  background: #fff;
  box-shadow: 0 0 0 5px var(--brand-orange-glow);
}

.step b {
  font-size: 13px;
}

.step small {
  color: var(--muted);
  font-size: 11px;
}

.tracking-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 24px 0 14px;
}

.line-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid #f2f3f7;
}

.help-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8f9fc;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-top: 24px;
}

/* ==========================================================
   ADMIN BAR CHART & PROGRESS BARS
   ========================================================== */
.admin-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.95fr;
  gap: 20px;
}

.bar-chart {
  height: 230px;
  display: flex;
  align-items: flex-end;
  gap: 12px;
  padding: 30px 10px 0;
  border-bottom: 1px solid var(--line);
  background: repeating-linear-gradient(to top, transparent 0, transparent 48px, #f2f4f8 49px);
}

.bar-wrap {
  height: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  position: relative;
  cursor: pointer;
}

.bar {
  width: 80%;
  min-width: 8px;
  max-width: 28px;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(0deg, var(--brand-orange), #ffb26a);
  transition: transform 0.2s, background 0.2s;
}

.bar-wrap:hover .bar {
  background: linear-gradient(0deg, #d86400, #f47b08);
  transform: scaleY(1.04);
}

.bar-value-pop {
  position: absolute;
  top: -24px;
  background: var(--navy);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 6px;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
  transition: var(--transition);
}

.bar-wrap:hover .bar-value-pop {
  opacity: 1;
  transform: translateY(0);
}

.rank-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rank-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
}

.rank-number {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--brand-orange-light);
  color: var(--brand-orange);
  font-weight: 800;
  display: grid;
  place-items: center;
  font-size: 13px;
}

.rank-text-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 6px;
}

.progress-track {
  width: 100%;
  height: 7px;
  background: #f0f2f7;
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brand-orange), #ffb26a);
  border-radius: var(--radius-pill);
}

.inventory-icon-box {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: #f5f6fa;
  color: var(--brand-orange);
  display: grid;
  place-items: center;
}

.inventory-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid #f2f3f7;
}

/* ==========================================================
   PAYMENT PAGE MOCK
   ========================================================== */
.qr-mock-box {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 14px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.qr-code-art {
  width: 90px;
  height: 90px;
  background: #f8f9fc;
  border: 1px solid #cfd4df;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--navy);
}

.qr-info-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 12px;
}

.qr-amount {
  margin-top: 4px;
  color: var(--brand-orange);
}

.badge-recommend {
  background: var(--green-light);
  color: var(--green);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
}

.payment-option {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 14px;
  cursor: pointer;
}

.payment-option:has(input:checked) {
  border-color: var(--brand-orange);
  background: #fffaf5;
}

.payment-option input {
  margin-top: 3px;
  accent-color: var(--brand-orange);
}

/* ==========================================================
   TOAST NOTIFICATION
   ========================================================== */
.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  background: var(--navy);
  color: #fff;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  transform: translateY(16px);
  transition: var(--transition);
  z-index: 9999;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

[hidden] {
  display: none !important;
}

/* ==========================================================
   RESPONSIVE DESIGN BREAKPOINTS
   ========================================================== */
@media (max-width: 1100px) {
  .food-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sidebar {
    width: 220px;
  }

  .dashboard-main {
    margin-left: 220px;
  }

  .kitchen-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .floor-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .admin-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .topbar {
    height: auto;
    padding: 14px 16px;
    flex-wrap: wrap;
  }

  .top-links {
    order: 3;
    width: 100%;
    justify-content: space-around;
    padding-top: 10px;
    border-top: 1px solid var(--line);
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .hero-art {
    min-height: 220px;
    clip-path: none;
  }

  .hero-badge {
    right: 20px;
    bottom: 20px;
  }

  .menu-layout {
    grid-template-columns: 1fr;
  }

  .category-list {
    position: static;
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 8px;
  }

  .category {
    white-space: nowrap;
  }

  .sidebar {
    position: static;
    width: auto;
    height: auto;
    flex-direction: row;
    overflow-x: auto;
    padding: 12px;
  }

  .side-label,
  .side-bottom {
    display: none;
  }

  .dashboard-main {
    margin-left: 0;
    padding: 20px 14px;
  }

  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .kitchen-grid {
    grid-template-columns: 1fr;
  }

  .floor-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .two-col {
    grid-template-columns: 1fr;
  }

  .floating-cart {
    width: calc(100% - 32px);
    min-width: 0;
  }
}


/* ==========================================================
   DEDICATED STAFF LOGIN PAGE STYLES
   ========================================================== */
.login-page-body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 50% 15%, #1f273d 0%, #0d121e 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Be Vietnam Pro', -apple-system, sans-serif;
}

.login-page-wrapper {
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
}

.login-card-container {
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
  max-width: 440px;
  width: 100%;
  padding: 38px 34px;
  box-sizing: border-box;
  animation: fadeInLogin 0.35s ease-out;
}

@keyframes fadeInLogin {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.login-brand-header {
  text-align: center;
  margin-bottom: 22px;
}

.login-brand-badge {
  display: inline-block;
  padding: 4px 14px;
  background: var(--brand-orange-light);
  color: var(--brand-orange);
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 12px;
}

.login-brand-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 6px;
}

.login-brand-logo .brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--brand-orange);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 12px rgba(244, 123, 8, 0.35);
}

.login-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--ink);
  margin: 0;
  letter-spacing: -0.4px;
}

.login-subtitle {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
  line-height: 1.5;
}

.login-cred-callout {
  background: #f0f7ff;
  border: 1px solid #bae0fd;
  border-radius: 14px;
  padding: 12px 16px;
  margin-bottom: 20px;
}

.cred-callout-header {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #0369a1;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 8px;
}

.cred-callout-body {
  display: flex;
  gap: 10px;
}

.cred-chip {
  background: #ffffff;
  border: 1px solid #7dd3fc;
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 13px;
  color: #0c4a6e;
  font-weight: 500;
}

.cred-chip strong {
  color: #0284c7;
  font-weight: 800;
  font-size: 14px;
}

.login-error-alert {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.login-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}

.login-form-group label {
  font-size: 13px;
  font-weight: 700;
  color: #374151;
}

.login-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.login-input-wrap .input-icon {
  position: absolute;
  left: 14px;
  color: #9ca3af;
  pointer-events: none;
  display: flex;
}

.login-input-wrap input {
  width: 100%;
  height: 48px;
  padding: 0 44px 0 44px;
  border: 1.5px solid #d1d5db;
  border-radius: 12px;
  font-size: 15px;
  font-family: inherit;
  font-weight: 600;
  color: #111827;
  background: #f9fafb;
  transition: var(--transition);
  box-sizing: border-box;
}

.login-input-wrap input:focus {
  outline: none;
  border-color: var(--brand-orange);
  background: #ffffff;
  box-shadow: 0 0 0 4px var(--brand-orange-glow);
}

.btn-toggle-eye {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  padding: 6px;
  display: flex;
  border-radius: 6px;
  transition: color 0.15s;
}

.btn-toggle-eye:hover {
  color: var(--ink);
}

.login-form-extras {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
}

.remember-check {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: #4b5563;
  font-weight: 500;
}

.btn-login-submit {
  height: 50px;
  background: linear-gradient(135deg, #f47b08 0%, #ea580c 100%);
  color: #ffffff;
  border: none;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 5px 18px rgba(244, 123, 8, 0.38);
  margin-top: 4px;
}

.btn-login-submit:hover {
  background: linear-gradient(135deg, #e06d04 0%, #c2410c 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(244, 123, 8, 0.48);
}

.login-card-footer {
  margin-top: 24px;
  text-align: center;
  font-size: 11px;
  color: #9ca3af;
}

/* ==========================================================
   NEW TABLE TILE STYLES: EMPTY VS OCCUPIED
   ========================================================== */
.table-tile {
  min-height: 120px;
  border-radius: 16px;
  padding: 16px;
  text-decoration: none;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  position: relative;
  box-sizing: border-box;
}

/* Bàn chưa có khách: Chỉ hiển thị số bàn */
.table-tile.table-empty {
  background: #ffffff;
  border: 1.5px dashed #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.table-tile.table-empty:hover {
  border-color: var(--brand-orange);
  background: #fffdfa;
  transform: translateY(-3px) scale(1.02);
  box-shadow: var(--shadow-md);
}

.table-empty-body {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.table-number-only {
  font-size: 22px;
  font-weight: 800;
  color: #1e293b;
  letter-spacing: -0.4px;
}

/* Bàn có khách: Hiển thị số tiền & số khách */
.table-tile.table-occupied {
  background: linear-gradient(145deg, #fff5f5 0%, #feecef 100%);
  border: 1.5px solid #fca5a5;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.table-tile.table-occupied:hover {
  border-color: #ef4444;
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 10px 25px rgba(239, 68, 68, 0.16);
}

.table-tile-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.table-name {
  font-size: 18px;
  font-weight: 800;
  color: #991b1b;
  letter-spacing: -0.3px;
}

.table-guest-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  background: #ffe4e6;
  color: #be123c;
  border-radius: 999px;
  border: 1px solid rgba(190, 18, 60, 0.15);
}

.table-tile-bottom {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 14px;
  background: rgba(255, 255, 255, 0.75);
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(252, 165, 165, 0.5);
}

.table-amount-label {
  font-size: 11px;
  font-weight: 700;
  color: #9f1239;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.85;
}

.table-amount-value {
  font-size: 19px;
  font-weight: 800;
  color: #b91c1c;
  letter-spacing: -0.3px;
}

.legend-dot.empty {
  background: #94a3b8 !important;
  border: 1px solid #64748b;
}

.legend-dot.occupied {
  background: #ef4444 !important;
}


/* ==========================================================
   SMARTDINE AUTH & ROLE-BASED ACCESS CONTROL (RBAC) STYLES
   ========================================================== */

/* Flash Alerts */
.flash-alert {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  font-weight: 500;
  font-size: 14px;
  animation: slideInDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-sm);
}

.flash-alert.flash-error {
  background: var(--red-light);
  color: #b91c1c;
  border: 1px solid var(--red-border);
}

.flash-alert.flash-success {
  background: var(--green-light);
  color: #15803d;
  border: 1px solid var(--green-border);
}

.login-success-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--green-light);
  color: #15803d;
  border: 1px solid var(--green-border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 18px;
}

/* Preset Buttons on Login Page */
.login-roles-guide {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 22px;
}

.roles-guide-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.roles-preset-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

@media (max-width: 540px) {
  .roles-preset-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.role-preset-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 6px;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

.role-preset-btn:hover {
  border-color: var(--brand-orange);
  background: var(--brand-orange-light);
  transform: translateY(-2px);
}

.role-preset-btn.active {
  border-color: var(--brand-orange);
  background: #fff8f0;
  box-shadow: 0 0 0 2px var(--brand-orange-glow);
}

.preset-role-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.preset-role-badge.role-admin {
  background: #fee2e2;
  color: #b91c1c;
}

.preset-role-badge.role-shift-manager {
  background: #e0e7ff;
  color: #4338ca;
}

.preset-role-badge.role-staff {
  background: #dcfce7;
  color: #15803d;
}

.preset-role-badge.role-kitchen {
  background: #fef3c7;
  color: #b45309;
}

.preset-role-badge.role-demo {
  background: #e0e7ff;
  color: #4338ca;
}

.preset-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}

.preset-cred {
  font-size: 10px;
  color: var(--muted);
  font-family: monospace;
}

.role-hint {
  font-size: 12px;
  color: var(--text-secondary);
}

/* Sidebar Profile Avatars & Badges */
.avatar.avatar-role-admin {
  background: linear-gradient(135deg, #ef4444, #dc2626) !important;
  color: #ffffff !important;
}

.avatar.avatar-role-shift_manager {
  background: linear-gradient(135deg, #6366f1, #4f46e5) !important;
  color: #ffffff !important;
}

.avatar.avatar-role-staff {
  background: linear-gradient(135deg, #10b981, #059669) !important;
  color: #ffffff !important;
}

.avatar.avatar-role-kitchen {
  background: linear-gradient(135deg, #f59e0b, #d97706) !important;
  color: #ffffff !important;
}

.user-info-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}

.user-fullname {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 13px;
  color: var(--navy-text);
}

.user-role-line {
  display: flex;
  align-items: center;
}

.btn-sidebar-logout {
  color: var(--navy-muted);
  padding: 7px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.btn-sidebar-logout:hover {
  background: rgba(231, 54, 58, 0.15);
  color: #f87171;
}

.role-badge-count {
  background: rgba(244, 123, 8, 0.15);
  color: var(--brand-orange);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  margin-left: auto;
}

/* Role Badges */
.role-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.role-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

.role-badge.role-admin {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
}

.role-badge.role-admin .role-dot {
  background: #dc2626;
}

.role-badge.role-staff {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
}

.role-badge.role-staff .role-dot {
  background: #16a34a;
}

.role-badge.role-kitchen {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

.role-badge.role-kitchen .role-dot {
  background: #d97706;
}

.role-badge.role-shift-manager {
  background: #e0e7ff;
  color: #4338ca;
  border: 1px solid #c7d2fe;
}

.role-badge.role-shift-manager .role-dot {
  background: #4f46e5;
}

/* Status Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
}

.status-indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}

.status-badge.status-active {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.status-badge.status-active .status-indicator {
  background: #22c55e;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2);
}

.status-badge.status-inactive {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.status-badge.status-inactive .status-indicator {
  background: #ef4444;
}

/* User Management Grid & Panel */
.stat-badge-admin {
  background: #fee2e2;
  color: #b91c1c;
}

.stat-badge-staff {
  background: #dcfce7;
  color: #15803d;
}

.stat-badge-kitchen {
  background: #fef3c7;
  color: #b45309;
}

.stat-badge-shift-manager {
  background: #e0e7ff;
  color: #4338ca;
}

.users-panel {
  padding: 24px;
}

.users-panel-header {
  margin-bottom: 20px;
}

.user-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #f8fafc;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  margin-bottom: 20px;
}

.search-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  flex: 1;
  min-width: 260px;
  transition: var(--transition);
}

.search-input-wrap:focus-within {
  border-color: var(--brand-orange);
  box-shadow: 0 0 0 3px var(--brand-orange-glow);
}

.search-input-wrap svg {
  color: var(--muted);
}

.search-input-wrap input {
  border: none;
  outline: none;
  width: 100%;
  font-size: 13px;
  color: var(--ink);
  background: transparent;
}

.filter-controls-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-controls-group select {
  font-size: 13px;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
}

/* User Table */
.users-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}

.users-table th {
  background: #f8fafc;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 12px 16px;
  border-bottom: 1.5px solid var(--line);
  text-align: left;
}

.users-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  transition: var(--transition);
}

.users-table tbody tr:hover td {
  background: #fcfdfe;
}

.users-table tr.row-inactive td {
  opacity: 0.75;
  background: #fafafb;
}

.user-code-badge {
  font-size: 11px;
  font-weight: 700;
  font-family: monospace;
  color: var(--text-secondary);
  background: #f1f5f9;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}

.user-profile-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-profile-meta {
  display: flex;
  flex-direction: column;
}

.user-profile-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 6px;
}

.user-profile-username {
  font-size: 12px;
  color: var(--muted);
  font-family: monospace;
}

.badge-self {
  font-size: 10px;
  font-weight: 700;
  color: #2563eb;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  padding: 1px 6px;
  border-radius: 999px;
  text-transform: uppercase;
}

.contact-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.contact-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  font-weight: 500;
}

.last-login-text {
  font-size: 12px;
  color: var(--text-secondary);
}

.action-buttons-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-icon {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}

.btn-icon:hover {
  border-color: var(--ink);
  color: var(--ink);
  transform: translateY(-1px);
}

.btn-edit-user:hover {
  background: var(--blue-light);
  border-color: #93c5fd;
  color: var(--blue);
}

.btn-reset-pw:hover {
  background: var(--yellow-light);
  border-color: var(--yellow-border);
  color: var(--yellow);
}

.btn-toggle-lock {
  color: #d97706;
}

.btn-toggle-lock:hover {
  background: #fef3c7;
  border-color: #fde68a;
  color: #b45309;
}

.btn-toggle-unlock {
  color: #16a34a;
}

.btn-toggle-unlock:hover {
  background: #dcfce7;
  border-color: #86efac;
  color: #15803d;
}

.btn-delete-user:hover {
  background: var(--red-light);
  border-color: var(--red-border);
  color: var(--red);
}

.empty-state-table {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
  color: var(--muted);
}

.empty-state-table h4 {
  margin: 12px 0 4px;
  color: var(--ink);
}

/* Modals */
.custom-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
  animation: fadeIn 0.2s ease-out;
}

.custom-modal-dialog {
  background: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
  width: 100%;
  max-width: 620px;
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid var(--line);
  animation: zoomInModal 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.custom-modal-dialog.custom-modal-sm {
  max-width: 440px;
}

@keyframes zoomInModal {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.custom-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--line);
}

.modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}

.modal-icon-badge {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--brand-orange-light);
  color: var(--brand-orange);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.custom-modal-header h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
}

.custom-modal-header p {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.btn-close-modal {
  background: none;
  border: none;
  font-size: 18px;
  color: var(--muted);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: var(--transition);
}

.btn-close-modal:hover {
  background: #f1f5f9;
  color: var(--ink);
}

.modal-form {
  padding: 24px;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

@media (max-width: 600px) {
  .form-grid-2 {
    grid-template-columns: 1fr;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.form-group label .required {
  color: var(--red);
}

.form-group input,
.form-group select {
  padding: 10px 14px;
  font-size: 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  outline: none;
  background: #ffffff;
  color: var(--ink);
  transition: var(--transition);
  font-family: inherit;
}

.form-group input:focus,
.form-group select:focus {
  border-color: var(--brand-orange);
  box-shadow: 0 0 0 3px var(--brand-orange-glow);
}

.modal-actions-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.btn-danger {
  background: var(--red) !important;
  color: #ffffff !important;
  border: none !important;
}

.btn-danger:hover {
  background: #dc2626 !important;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3) !important;
}

/* ==========================================================
   SMARTDINE DISHES & CATEGORIES MANAGEMENT STYLES
   ========================================================== */

/* Tab navigation */
.dishes-nav-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 22px;
  border-bottom: 1.5px solid var(--line);
  padding-bottom: 12px;
}

.dishes-nav-tabs .tab-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  background: #ffffff;
  border: 1px solid var(--line);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
  transition: var(--transition);
}

.dishes-nav-tabs .tab-item:hover {
  border-color: var(--brand-orange);
  color: var(--brand-orange);
  background: var(--brand-orange-light);
}

.dishes-nav-tabs .tab-item.active {
  background: var(--navy);
  color: #ffffff;
  border-color: var(--navy);
  box-shadow: var(--shadow-sm);
}

.dishes-nav-tabs .tab-item.active svg {
  stroke: #ffffff;
}

/* Dishes table elements */
.dish-thumb-wrap {
  width: 54px;
  height: 54px;
  border-radius: 12px;
  overflow: hidden;
  background: #f1f5f9;
  border: 1px solid var(--line);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dish-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.dish-thumb-wrap:hover .dish-thumb-img {
  transform: scale(1.12);
}

.dish-title-cell {
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-width: 280px;
}

.dish-name-text {
  font-size: 14px;
  color: var(--ink);
  font-weight: 700;
}

.dish-desc-text {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dish-sub-rating {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}

.rating-badge {
  font-size: 11px;
  color: #d97706;
  font-weight: 700;
  background: #fef3c7;
  padding: 1px 6px;
  border-radius: 4px;
}

/* Category Pill */
.cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}

.cat-pill-icon {
  font-size: 13px;
  color: var(--brand-orange);
}

.cat-icon-box {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--brand-orange-light);
  color: var(--brand-orange);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
}

/* Kitchen station badges */
.station-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.station-badge.station-hot {
  background: #fff1f2;
  color: #e11d48;
  border: 1px solid #fecdd3;
}

.station-badge.station-soup {
  background: #fffbeb;
  color: #d97706;
  border: 1px solid #fde68a;
}

.station-badge.station-cold {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
}

.station-badge.station-bar {
  background: #f5f3ff;
  color: #7c3aed;
  border: 1px solid #ddd6fe;
}

/* Price Badge */
.dish-price-badge {
  font-size: 14px;
  font-weight: 800;
  color: #ea580c;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  padding: 3px 10px;
  border-radius: 8px;
  display: inline-block;
  white-space: nowrap;
  letter-spacing: -0.2px;
}

/* Tag chip */
.dish-tag-chip {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: #fdf2f8;
  color: #db2777;
  border: 1px solid #fbcfe8;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

/* Status warning */
.status-badge.status-warning {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}

.status-badge.status-warning .status-indicator {
  background: #f59e0b;
}

/* Image Upload Preview Box */
.image-upload-section {
  background: #f8fafc;
  border: 1.5px dashed #cbd5e1;
  border-radius: var(--radius-md);
  padding: 16px;
  margin-top: 8px;
  transition: var(--transition);
}

.image-upload-section:hover {
  border-color: var(--brand-orange);
  background: #fffdfa;
}

.image-upload-grid {
  display: flex;
  align-items: center;
  gap: 16px;
}

@media (max-width: 600px) {
  .image-upload-grid {
    flex-direction: column;
    align-items: flex-start;
  }
}

.image-preview-box {
  width: 90px;
  height: 90px;
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--line);
  position: relative;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

.image-preview-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(15, 23, 42, 0.7);
  color: #ffffff;
  font-size: 9px;
  text-align: center;
  padding: 2px 4px;
}

/* Customer menu out of stock card */
.food-card.dish-out-of-stock {
  opacity: 0.82;
  filter: grayscale(0.2);
}

.food-card.dish-out-of-stock .food-image img {
  filter: brightness(0.9);
}

/* ==========================================================
   VISUAL 2D FLOOR PLAN & VIEW MODE TOGGLE
   ========================================================== */
.view-mode-toggle {
  display: inline-flex;
  align-items: center;
  background: #f1f5f9;
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: 3px;
  gap: 3px;
}

.view-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 700;
  color: #64748b;
  border: none;
  background: transparent;
  border-radius: 24px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.view-toggle-btn svg {
  stroke: #64748b;
  transition: stroke 0.2s ease;
}

.view-toggle-btn:hover {
  color: var(--navy);
}

.view-toggle-btn.active {
  background: var(--navy);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.15);
}

.view-toggle-btn.active svg {
  stroke: #ffffff;
}

/* 2D Architectural Floor Canvas */
.visual-floor-container {
  position: relative;
  width: 100%;
  min-height: 560px;
  background-color: #f8fafc;
  background-image: radial-gradient(#cbd5e1 1.2px, transparent 1.2px);
  background-size: 24px 24px;
  border: 2px dashed #cbd5e1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-top: 14px;
}

/* Architectural Landmarks */
.arch-landmark {
  position: absolute;
  pointer-events: none;
  user-select: none;
  z-index: 1;
}

.landmark-cashier {
  position: absolute;
  transform: translate(-50%, -50%);
  padding: 8px 16px;
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #334155;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  z-index: 4;
  user-select: none;
  white-space: nowrap;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.landmark-cashier.draggable-cashier {
  cursor: grab !important;
  pointer-events: auto !important;
}

.landmark-cashier.draggable-cashier:active,
.landmark-cashier.draggable-cashier.is-dragging {
  cursor: grabbing !important;
  opacity: 0.92;
  z-index: 101 !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25) !important;
  transform: translate(-50%, -50%) scale(1.06) !important;
  border-color: var(--brand-orange) !important;
  background: #ffffff !important;
}

.table-resize-handle {
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 14px;
  height: 14px;
  cursor: se-resize !important;
  pointer-events: auto !important;
  opacity: 0.4;
  transition: opacity 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.table-resize-handle:hover,
.draggable-table-item:hover .table-resize-handle {
  opacity: 1;
}

.table-ctrl-bar {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-top: 3px;
  pointer-events: auto;
}

.btn-table-size,
.btn-toggle-shape {
  padding: 1px 5px;
  font-size: 10px;
  font-weight: 700;
  border-radius: 4px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #334155;
  cursor: pointer;
  line-height: 1.2;
}

.btn-table-size:hover,
.btn-toggle-shape:hover {
  background: #e2e8f0;
  border-color: #94a3b8;
}

.landmark-entrance {
  position: absolute;
  transform: translate(-50%, -50%);
  padding: 6px 14px;
  background: #0f172a;
  border: 1.5px solid #334155;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.25);
  font-size: 11px;
  font-weight: 800;
  color: #f8fafc;
  letter-spacing: 0.5px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  z-index: 5;
  user-select: none;
  white-space: nowrap;
  transition: box-shadow 0.2s ease, background 0.2s ease;
}

.landmark-entrance.draggable-entrance {
  cursor: grab !important;
  pointer-events: auto !important;
}

.landmark-entrance.draggable-entrance:active,
.landmark-entrance.draggable-entrance.is-dragging {
  cursor: grabbing !important;
  opacity: 0.92;
  z-index: 101 !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45) !important;
  transform: translate(-50%, -50%) scale(1.08) !important;
  background: #1e293b;
  border-color: var(--brand-orange);
}

.landmark-window {
  top: 0;
  left: 30%;
  right: 30%;
  height: 4px;
  background: #38bdf8;
  opacity: 0.6;
  border-radius: 2px;
}

/* Visual Table Tiles in 2D Space */
.visual-table-node {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  user-select: none;
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.18s ease;
  z-index: 2;
  box-sizing: border-box;
}

.visual-table-node:hover {
  transform: translate(-50%, -50%) scale(1.06);
  z-index: 10;
}

/* Shapes */
.visual-table-node.shape-square {
  border-radius: 14px;
}

.visual-table-node.shape-round {
  border-radius: 50%;
}

.visual-table-node.shape-rectangle {
  border-radius: 16px;
}

/* Status: Empty */
.visual-table-node.status-empty {
  background: #ffffff;
  border: 2px dashed #94a3b8;
  color: #1e293b;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.visual-table-node.status-empty:hover {
  border-color: var(--brand-orange);
  background: #fffdfa;
  box-shadow: 0 8px 18px rgba(249, 115, 22, 0.18);
}

.visual-table-node.status-empty .visual-table-code {
  font-size: 18px;
  font-weight: 800;
  color: #1e293b;
}

.visual-table-node.status-empty .visual-table-seats {
  font-size: 11px;
  color: #64748b;
  font-weight: 600;
}

/* Status: Occupied */
.visual-table-node.status-occupied {
  background: linear-gradient(145deg, #fff5f5 0%, #fee2e2 100%);
  border: 2px solid #ef4444;
  color: #991b1b;
  box-shadow: 0 6px 16px rgba(239, 68, 68, 0.2);
}

.visual-table-node.status-occupied:hover {
  border-color: #dc2626;
  box-shadow: 0 10px 24px rgba(239, 68, 68, 0.3);
}

.visual-table-node.status-occupied .visual-table-code {
  font-size: 17px;
  font-weight: 800;
  color: #991b1b;
}

.visual-table-node.status-occupied .visual-table-bill {
  font-size: 12px;
  font-weight: 800;
  color: #b91c1c;
  margin-top: 2px;
}

.visual-table-node.status-occupied .visual-table-items {
  font-size: 10px;
  font-weight: 700;
  color: #ef4444;
}

/* Status: Maintenance */
.visual-table-node.status-maintenance {
  background: #f1f5f9;
  border: 2px dashed #94a3b8;
  color: #64748b;
  opacity: 0.65;
  cursor: not-allowed;
}

/* Visual Chairs surrounding table */
.chair-dot {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #cbd5e1;
  border: 1.5px solid #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  pointer-events: none;
}

.visual-table-node.status-occupied .chair-dot {
  background: #fca5a5;
}

/* Admin Visual Editor Specifics */
.draggable-table-item {
  cursor: grab !important;
}

.draggable-table-item:active,
.draggable-table-item.is-dragging {
  cursor: grabbing !important;
  opacity: 0.85;
  z-index: 100 !important;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.22) !important;
  transform: translate(-50%, -50%) scale(1.08) !important;
}

.table-shape-selector {
  display: inline-flex;
  gap: 4px;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 8px;
}

.shape-opt-btn {
  padding: 4px 8px;
  font-size: 12px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
}

.shape-opt-btn.active {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}