/**
 * InmoSaaS - Master Corporate Design System
 * Inspired by Linear, Stripe & Mercury (Taste, Web Design Guidelines & Awesome Design)
 */

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

/* ==========================================================================
   Design Tokens & CSS Variables
   ========================================================================== */
:root {
  /* Brand Accents */
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-focus: rgba(79, 70, 229, 0.25);
  --primary-subtle: rgba(79, 70, 229, 0.12);
  --primary-text: #6366f1;

  /* Semantic Feedback */
  --success: #10b981;
  --success-subtle: rgba(16, 185, 129, 0.12);
  --warning: #f59e0b;
  --warning-subtle: rgba(245, 158, 11, 0.12);
  --danger: #ef4444;
  --danger-subtle: rgba(239, 68, 68, 0.12);
  --info: #0ea5e9;
  --info-subtle: rgba(14, 165, 233, 0.12);

  /* Typography */
  --font-display: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Radius */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 220ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 300ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Layout Spacing */
  --sidebar-width: 256px;
  --header-height: 64px;
}

/* Dark Theme (Default) */
[data-theme="dark"] {
  --bg-page: #080c14;
  --bg-sidebar: #0d121f;
  --bg-surface: #121827;
  --bg-surface-elevated: #171f33;
  --bg-surface-glass: rgba(18, 24, 39, 0.75);
  --bg-input: #0e1422;
  --bg-input-focus: #141c2e;

  --border-color: #1e293b;
  --border-color-subtle: rgba(255, 255, 255, 0.07);
  --border-color-hover: #334155;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;
  --text-inverse: #0f172a;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.45);
  --shadow-glow: 0 0 24px rgba(79, 70, 229, 0.15);
}

/* Light Theme */
[data-theme="light"] {
  --bg-page: #f8fafc;
  --bg-sidebar: #ffffff;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #f1f5f9;
  --bg-surface-glass: rgba(255, 255, 255, 0.85);
  --bg-input: #ffffff;
  --bg-input-focus: #ffffff;

  --border-color: #e2e8f0;
  --border-color-subtle: rgba(0, 0, 0, 0.06);
  --border-color-hover: #cbd5e1;

  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-subtle: #94a3b8;
  --text-inverse: #ffffff;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.1);
  --shadow-glow: 0 0 24px rgba(79, 70, 229, 0.1);
}

/* ==========================================================================
   CSS Reset & Base
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text-main);
  background-color: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

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

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

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

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-subtle);
}

/* SVG Icon Base */
.icon {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

/* ==========================================================================
   Layout Architecture
   ========================================================================== */
.app-container {
  display: flex;
  min-height: 100vh;
  width: 100%;
  background-color: var(--bg-page);
  position: relative;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  z-index: 40;
  transition: transform var(--transition-base);
}

.sidebar-header {
  height: var(--header-height);
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.logo-badge {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--primary), #818cf8);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.35);
}

.logo-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.03em;
  color: var(--text-main);
}

.sidebar-content {
  flex: 1;
  padding: 1rem 0.75rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.nav-group-title {
  font-size: 0.675rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-subtle);
  padding: 0 0.65rem 0.4rem 0.65rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.825rem;
  transition: all var(--transition-fast);
  cursor: pointer;
  margin-bottom: 2px;
}

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

.nav-item.active {
  background-color: var(--primary-subtle);
  color: var(--primary-text);
  font-weight: 600;
}

.nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  opacity: 0.85;
}

.nav-item.active .nav-icon {
  opacity: 1;
  color: var(--primary);
}

.sidebar-footer {
  padding: 0.85rem;
  border-top: 1px solid var(--border-color);
  background-color: var(--bg-sidebar);
}

.tenant-pill {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 0.65rem;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.tenant-avatar {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #0ea5e9, #6366f1);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
}

.tenant-info {
  overflow: hidden;
  line-height: 1.2;
}

.tenant-name {
  font-weight: 600;
  font-size: 0.775rem;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tenant-role {
  font-size: 0.675rem;
  color: var(--text-muted);
}

/* Main Wrapper */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.app-container.mozo-fullscreen-layout {
  display: flex;
  width: 100vw;
  min-height: 100vh;
}

.app-container.mozo-fullscreen-layout .main-wrapper {
  margin-left: 0 !important;
  width: 100% !important;
  max-width: 100vw !important;
}

.app-container.mozo-fullscreen-layout .content-body {
  padding: 0.75rem 1rem !important;
}


/* Top Header */
.top-header {
  height: var(--header-height);
  background-color: var(--bg-surface-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.75rem;
  position: sticky;
  top: 0;
  z-index: 30;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.mobile-menu-btn {
  display: none;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.6rem;
  color: var(--text-main);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.mobile-menu-btn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9999;
  opacity: 0;
  transition: opacity var(--transition-smooth);
}

.sidebar-backdrop.active {
  display: block;
  opacity: 1;
}


.page-title-badge {
  line-height: 1.25;
}

.page-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
}

.page-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.theme-toggle-btn {
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.theme-toggle-btn:hover {
  color: var(--text-main);
  border-color: var(--border-color-hover);
}

.user-profile-menu {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.3rem 0.6rem;
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.user-profile-menu:hover {
  border-color: var(--border-color-hover);
  box-shadow: var(--shadow-sm);
}

.user-avatar-circle {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background-color: var(--primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.725rem;
}

.user-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.user-meta-name {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-main);
}

.user-meta-role {
  font-size: 0.65rem;
  color: var(--text-muted);
}

/* Content Body */
.content-body {
  flex: 1;
  padding: 1.75rem;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
}

/* ==========================================================================
   UI Components (Cards, Buttons, Inputs, Tables)
   ========================================================================== */

/* Cards */
.card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.card:hover {
  border-color: var(--border-color-hover);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
  gap: 0.75rem;
}

.card-title {
  font-size: 0.95rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--text-main);
}

.card-description {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

/* KPI Cards */
.kpi-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.15rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

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

.kpi-icon-box {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.kpi-icon-box.indigo { background-color: var(--primary-subtle); color: var(--primary-text); }
.kpi-icon-box.emerald { background-color: var(--success-subtle); color: var(--success); }
.kpi-icon-box.amber { background-color: var(--warning-subtle); color: var(--warning); }
.kpi-icon-box.cyan { background-color: var(--info-subtle); color: var(--info); }

.kpi-content {
  line-height: 1.25;
}

.kpi-label {
  font-size: 0.725rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.kpi-value {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-main);
  margin-top: 0.15rem;
}

.kpi-sub {
  font-size: 0.7rem;
  color: var(--text-subtle);
  margin-top: 0.15rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.55rem 1rem;
  font-size: 0.825rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 1px 3px rgba(79, 70, 229, 0.3);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.4);
}

.btn-secondary {
  background-color: var(--bg-surface-elevated);
  border-color: var(--border-color);
  color: var(--text-main);
}

.btn-secondary:hover {
  background-color: var(--bg-surface);
  border-color: var(--border-color-hover);
}

.btn-danger {
  background-color: var(--danger-subtle);
  border-color: rgba(239, 68, 68, 0.2);
  color: var(--danger);
}

.btn-danger:hover {
  background-color: var(--danger);
  color: #ffffff;
}

.btn-success {
  background-color: var(--success-subtle);
  border-color: rgba(16, 185, 129, 0.25);
  color: var(--success);
}

.btn-success:hover {
  background-color: var(--success);
  color: #ffffff;
}

.btn-warning {
  background-color: var(--warning-subtle);
  border-color: rgba(245, 158, 11, 0.25);
  color: var(--warning);
}

.btn-warning:hover {
  background-color: var(--warning);
  color: #ffffff;
}

.btn-sm {
  padding: 0.35rem 0.65rem;
  font-size: 0.775rem;
}

/* Form Controls */
.form-group {
  margin-bottom: 0.9rem;
}

.form-label {
  display: block;
  font-size: 0.775rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.35rem;
}

.form-control {
  width: 100%;
  padding: 0.55rem 0.8rem;
  font-size: 0.825rem;
  color: var(--text-main);
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  outline: none;
}

.form-control:focus {
  border-color: var(--primary);
  background-color: var(--bg-input-focus);
  box-shadow: 0 0 0 3px var(--primary-focus);
}

.form-helper {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.input-with-addon {
  display: flex;
  align-items: stretch;
}

.input-addon {
  padding: 0 0.75rem;
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  border-right: none;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.8rem;
  display: flex;
  align-items: center;
}

.input-with-addon .form-control {
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* Switches & Toggles */
.switch-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-color-subtle);
}

.switch-label-wrap {
  flex: 1;
  padding-right: 1rem;
}

.switch-title {
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--text-main);
}

.switch-desc {
  font-size: 0.725rem;
  color: var(--text-muted);
}

.switch {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 22px;
  flex-shrink: 0;
}

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

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: var(--border-color);
  transition: var(--transition-fast);
  border-radius: var(--radius-full);
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: var(--transition-fast);
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--primary);
}

input:checked + .slider:before {
  transform: translateX(16px);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1;
}

.badge-admin { background-color: rgba(99, 102, 241, 0.15); color: #818cf8; border: 1px solid rgba(99, 102, 241, 0.3); }
.badge-supervisor { background-color: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-agent { background-color: rgba(14, 165, 233, 0.15); color: #38bdf8; border: 1px solid rgba(14, 165, 233, 0.3); }

.badge-sector-ventas { background-color: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-sector-administracion { background-color: rgba(99, 102, 241, 0.15); color: #818cf8; border: 1px solid rgba(99, 102, 241, 0.3); }
.badge-sector-rrhh { background-color: rgba(236, 72, 153, 0.15); color: #f472b6; border: 1px solid rgba(236, 72, 153, 0.3); }

/* Tables */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.825rem;
}

.table th {
  padding: 0.75rem 1rem;
  font-weight: 600;
  font-size: 0.725rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
  background-color: var(--bg-surface-elevated);
}

.table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-color-subtle);
  color: var(--text-main);
  vertical-align: middle;
}

.table tr:hover td {
  background-color: var(--bg-surface-elevated);
}

/* Modals & Dialogs */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 99999;
  opacity: 1;
  visibility: visible;
  transition: all var(--transition-base);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.7), 0 0 32px rgba(79, 70, 229, 0.2);
  transform: scale(1) translateY(0);
  transition: all var(--transition-base);
  overflow-y: auto;
  position: relative;
}

.modal-overlay.active .modal-card {
  transform: scale(1) translateY(0);
}


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

.modal-title {
  font-size: 1.05rem;
  font-weight: 700;
}

.modal-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: var(--radius-xs);
  transition: color var(--transition-fast);
}

.modal-close-btn:hover {
  color: var(--text-main);
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  background-color: var(--bg-surface-elevated);
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

/* ==========================================================================
   Corporate Confirmation Dialog Modal (Taste & Modern Web Aesthetics)
   ========================================================================== */
.confirm-dialog-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 14, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.confirm-dialog-overlay.active {
  opacity: 1;
  visibility: visible;
}

.confirm-dialog-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  max-width: 440px;
  width: 100%;
  padding: 1.75rem;
  box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.65), 0 0 0 1px var(--border-color-subtle);
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  transform: scale(0.94) translateY(12px);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.confirm-dialog-overlay.active .confirm-dialog-card {
  transform: scale(1) translateY(0);
}

.confirm-icon-circle {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.confirm-icon-circle.primary {
  background: var(--primary-subtle);
  color: var(--primary);
  border: 1px solid rgba(79, 70, 229, 0.25);
}

.confirm-icon-circle.danger {
  background: var(--danger-subtle);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.confirm-icon-circle.warning {
  background: var(--warning-subtle);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.confirm-icon-circle.success {
  background: var(--success-subtle);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.confirm-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.3;
}

.confirm-message {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.confirm-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
  margin-top: 0.5rem;
}

/* Toast Notification Container */
#toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  background-color: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 0.825rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  animation: slideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.success { border-left: 4px solid var(--success); }
.toast.error { border-left: 4px solid var(--danger); }
.toast.warning { border-left: 4px solid var(--warning); }
.toast.info { border-left: 4px solid var(--info); }

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

/* ==========================================================================
   Auth Screen (Visual Elegance)
   ========================================================================== */
.auth-page-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: radial-gradient(circle at 50% 20%, rgba(79, 70, 229, 0.12) 0%, transparent 60%), var(--bg-page);
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 2.25rem;
  box-shadow: var(--shadow-lg);
}

.auth-brand {
  text-align: center;
  margin-bottom: 1.75rem;
}

.auth-brand-logo {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--primary), #818cf8);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(79, 70, 229, 0.4);
  margin-bottom: 0.85rem;
}

.auth-title {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.auth-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.quick-demo-section {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-color);
}

.quick-demo-title {
  font-size: 0.725rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.65rem;
}

.quick-demo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.45rem;
}

.demo-user-chip {
  padding: 0.5rem 0.65rem;
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: left;
}

.demo-user-chip:hover {
  border-color: var(--primary);
  background-color: var(--primary-subtle);
  transform: translateY(-1px);
}

.demo-chip-role {
  font-size: 0.725rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text-main);
}

.demo-chip-name {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ==========================================================================
   Base Grid Systems (Generous Gap & Spacing)
   ========================================================================== */
.grid-1 { display: grid; grid-template-columns: 1fr; gap: 1.5rem; width: 100%; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; width: 100%; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; width: 100%; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem; width: 100%; }
.grid-auto-fit { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.5rem; width: 100%; }

/* ==========================================================================
   Property Card Component (Corporate Luxury Aesthetic)
   ========================================================================== */
.property-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  position: relative;
  height: 100%;
  min-width: 0;
  max-width: 100%;
}

.property-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px -8px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(99, 102, 241, 0.35);
  border-color: rgba(99, 102, 241, 0.4);
}

.property-card-image-wrap {
  position: relative;
  width: 100%;
  height: 220px;
  min-height: 220px;
  max-height: 220px;
  background-color: var(--bg-surface-elevated);
  overflow: hidden;
  border-top-left-radius: inherit;
  border-top-right-radius: inherit;
}

.property-card-image-wrap img,
.property-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.property-card:hover .property-card-image {
  transform: scale(1.04);
}

.property-card-badge-top {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  right: 0.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 2;
  pointer-events: none;
}

.property-card-photo-counter {
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  z-index: 2;
}

.property-card-body {
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.65rem;
}

.property-card-price {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.property-price-main {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.property-price-expenses {
  font-size: 0.725rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-surface-elevated);
  padding: 2px 6px;
  border-radius: var(--radius-xs);
}

.property-card-title {
  font-size: 0.925rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 2.5rem;
}

.property-card-location {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.775rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.property-card-specs {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding-top: 0.65rem;
  margin-top: auto;
  border-top: 1px solid var(--border-color);
  flex-wrap: wrap;
}

.property-spec-item {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.725rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-surface-elevated);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
}

.property-card-footer {
  padding: 0.75rem 1.15rem;
  background: rgba(255, 255, 255, 0.015);
  border-top: 1px solid var(--border-color-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

/* ==========================================================================
   Gallery Carousel & Image Manager Component
   ========================================================================== */
.gallery-carousel-wrapper {
  position: relative;
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background-color: #0b0f19;
  box-shadow: var(--shadow-md);
}

.gallery-main-slide {
  width: 100%;
  aspect-ratio: 16 / 10;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #070a12;
}

.gallery-main-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.gallery-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 5;
}

.gallery-nav-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  transform: translateY(-50%) scale(1.08);
}

.gallery-nav-btn.prev { left: 0.75rem; }
.gallery-nav-btn.next { right: 0.75rem; }

.gallery-counter-badge {
  position: absolute;
  bottom: 0.75rem;
  left: 0.75rem;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(8px);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.15);
  z-index: 5;
}

.gallery-thumbnail-strip {
  display: flex;
  gap: 0.5rem;
  padding: 0.65rem 0.25rem 0.25rem 0.25rem;
  overflow-x: auto;
  scrollbar-width: thin;
}

.gallery-thumb-item {
  width: 76px;
  height: 54px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  cursor: pointer;
  border: 2px solid transparent;
  opacity: 0.6;
  transition: all 0.2s ease;
  position: relative;
}

.gallery-thumb-item.active {
  border-color: var(--primary);
  opacity: 1;
  transform: scale(1.04);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

.gallery-thumb-item:hover {
  opacity: 1;
}

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

.gallery-thumb-cover-tag {
  position: absolute;
  bottom: 2px;
  right: 2px;
  background: var(--primary);
  color: #fff;
  font-size: 0.55rem;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 2px;
}

.photo-upload-dropzone {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1rem;
  text-align: center;
  background: rgba(255, 255, 255, 0.015);
  transition: all 0.2s ease;
  cursor: pointer;
}

.photo-upload-dropzone:hover {
  border-color: var(--primary);
  background: var(--primary-subtle);
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
}

@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    top: 0; bottom: 0; left: 0;
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-lg);
  }

  .mobile-menu-btn {
    display: flex;
  }

  .content-body {
    padding: 1rem;
  }

  .grid-4, .grid-3, .grid-2 {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

/* ==========================================================================
   RestoSaaS - Gastronomy & POS Specific Styles (Touch Optimized)
   ========================================================================== */

/* Universal Touch & Typography Optimizations */
button, .btn, .nav-item, .clickable {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

/* Touch PIN Login Pad */
.pin-login-container {
  max-width: 440px;
  margin: 0 auto;
  padding: 2.5rem 2rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.pin-staff-selector {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding: 0.5rem 0.25rem 1rem;
  margin-bottom: 1.5rem;
  scrollbar-width: thin;
}

.staff-avatar-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 0.6rem 0.85rem;
  background: var(--bg-surface-elevated);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-lg);
  cursor: pointer;
  min-width: 80px;
  transition: var(--transition-fast);
}

.staff-avatar-btn.selected {
  border-color: var(--primary);
  background: var(--primary-subtle);
  transform: translateY(-2px);
}

.staff-avatar-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
}

.pin-display-dots {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 1.5rem 0 2rem;
}

.pin-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--border-color-hover);
  background: transparent;
  transition: var(--transition-fast);
}

.pin-dot.filled {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 10px rgba(79, 70, 229, 0.5);
  transform: scale(1.15);
}

.numpad-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
  max-width: 320px;
  margin: 0 auto;
}

.numpad-key {
  height: 64px;
  min-width: 64px;
  font-size: 1.5rem;
  font-weight: 700;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  background: var(--bg-surface-elevated);
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.numpad-key:active {
  background: var(--primary);
  color: #ffffff;
  transform: scale(0.94);
}

.numpad-key.action-key {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* Floor Map & Tables */
.tables-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.table-card {
  position: relative;
  padding: 1.25rem;
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  border: 2px solid var(--border-color);
  cursor: pointer;
  transition: var(--transition-base);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 150px;
  box-shadow: var(--shadow-sm);
}

.table-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

/* Color Coded Table States */
.table-card.libre, .table-card.status-libre {
  border-color: #10b981 !important;
  background: linear-gradient(145deg, var(--bg-surface), rgba(16, 185, 129, 0.08)) !important;
}
.table-card.libre .table-status-pill, .table-card.status-libre .table-status-pill {
  background: rgba(16, 185, 129, 0.2) !important;
  color: #10b981 !important;
  font-weight: 700;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.table-card.ocupada, .table-card.status-ocupada {
  border-color: #3b82f6 !important;
  background: linear-gradient(145deg, var(--bg-surface), rgba(59, 130, 246, 0.08)) !important;
}
.table-card.ocupada .table-status-pill, .table-card.status-ocupada .table-status-pill {
  background: rgba(59, 130, 246, 0.2) !important;
  color: #38bdf8 !important;
  font-weight: 700;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.table-card.esperando_plato, .table-card.status-esperando_plato, .table-card.esperando-plato {
  border-color: #f59e0b !important;
  background: linear-gradient(145deg, var(--bg-surface), rgba(245, 158, 11, 0.1)) !important;
  animation: pulse-yellow 2.5s infinite;
}
.table-card.esperando_plato .table-status-pill, .table-card.status-esperando_plato .table-status-pill, .table-card.esperando-plato .table-status-pill {
  background: rgba(245, 158, 11, 0.25) !important;
  color: #fbbf24 !important;
  font-weight: 700;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.table-card.cuenta_pedida, .table-card.status-cuenta_pedida, .table-card.cuenta-pedida {
  border-color: #a855f7 !important;
  background: linear-gradient(145deg, var(--bg-surface), rgba(168, 85, 247, 0.1)) !important;
  animation: pulse-purple 2s infinite;
}
.table-card.cuenta_pedida .table-status-pill, .table-card.status-cuenta_pedida .table-status-pill, .table-card.cuenta-pedida .table-status-pill {
  background: rgba(168, 85, 247, 0.25) !important;
  color: #c084fc !important;
  font-weight: 700;
  border: 1px solid rgba(168, 85, 247, 0.4);
}

.table-card.listo, .table-card.status-listo {
  border-color: #0ea5e9 !important;
  background: linear-gradient(145deg, var(--bg-surface), rgba(14, 165, 233, 0.18)) !important;
  animation: pulse-cyan 1.8s infinite;
}
.table-card.listo .table-status-pill, .table-card.status-listo .table-status-pill {
  background: #0ea5e9 !important;
  color: #ffffff !important;
  font-weight: 800;
  border: 1px solid #38bdf8;
  box-shadow: 0 0 8px rgba(14, 165, 233, 0.5);
}

.table-card.servido, .table-card.status-servido {
  border-color: #3b82f6 !important;
  background: linear-gradient(145deg, var(--bg-surface), rgba(59, 130, 246, 0.08)) !important;
}

@keyframes pulse-yellow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.2); }
  50% { box-shadow: 0 0 0 8px rgba(245, 158, 11, 0); }
}

@keyframes pulse-purple {
  0%, 100% { box-shadow: 0 0 0 0 rgba(168, 85, 247, 0.25); }
  50% { box-shadow: 0 0 0 10px rgba(168, 85, 247, 0); }
}

@keyframes pulse-cyan {
  0%, 100% { box-shadow: 0 0 0 0 rgba(14, 165, 233, 0.45); }
  50% { box-shadow: 0 0 0 12px rgba(14, 165, 233, 0); }
}

.table-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Waiter POS Ordering Interface */
.pos-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 1.5rem;
  height: calc(100vh - 120px);
}

@media (max-width: 960px) {
  .pos-layout {
    grid-template-columns: 1fr;
    height: auto;
  }
}

.category-pills-bar {
  display: flex;
  gap: 0.65rem;
  overflow-x: auto;
  padding-bottom: 0.75rem;
  margin-bottom: 1rem;
}

.cat-pill-btn {
  padding: 0.65rem 1.15rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.875rem;
  white-space: nowrap;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  transition: var(--transition-fast);
}

.cat-pill-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.dishes-touch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
  overflow-y: auto;
  max-height: calc(100vh - 220px);
  padding-right: 0.5rem;
}

.dish-touch-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 140px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.dish-touch-card:active {
  transform: scale(0.97);
  border-color: var(--primary);
}

.dish-touch-card.sold-out {
  opacity: 0.45;
  filter: grayscale(0.8);
  pointer-events: none;
}

/* POS Cart / Tray Drawer */
.cart-tray {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.cart-header {
  padding: 1.25rem;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-surface-elevated);
}

.cart-items-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.cart-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  border-radius: var(--radius-md);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color-subtle);
}

.qty-control-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-main);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.cart-footer {
  padding: 1.25rem;
  border-top: 1px solid var(--border-color);
  background: var(--bg-surface-elevated);
}

.btn-send-kitchen {
  width: 100%;
  padding: 1rem;
  font-size: 1.1rem;
  font-weight: 700;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 54px;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.35);
  transition: var(--transition-base);
}

.btn-send-kitchen:active {
  transform: scale(0.98);
}

/* KDS (Kitchen Display System) Grid */
.kds-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.25rem;
  align-items: start;
}

.kds-ticket {
  background: var(--bg-surface);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
}

.kds-header {
  padding: 0.85rem 1.15rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
}

.kds-header.ready, .kds-header.status-ready {
  background: linear-gradient(135deg, #0284c7, #0ea5e9) !important;
  color: #ffffff !important;
}

.kds-ticket.ticket-ready {
  border-color: #0ea5e9 !important;
  box-shadow: 0 0 16px rgba(14, 165, 233, 0.4) !important;
}

.kds-header.green {
  background: #10b981;
  color: #ffffff;
}

.kds-header.yellow {
  background: #f59e0b;
  color: #ffffff;
}

.kds-header.red {
  background: #ef4444;
  color: #ffffff;
  animation: kds-alert-flash 1.5s infinite alternate;
}

@keyframes kds-alert-flash {
  0% { background: #ef4444; }
  100% { background: #b91c1c; }
}

.kds-items-list {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 160px;
}

.kds-dish-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-md);
  background: var(--bg-surface-elevated);
  border-left: 4px solid var(--primary);
  cursor: pointer;
}

.kds-dish-row.ready {
  opacity: 0.5;
  text-decoration: line-through;
  border-left-color: #10b981;
  background: rgba(16, 185, 129, 0.08);
}

.kds-dish-notes {
  font-size: 0.8rem;
  font-weight: 700;
  color: #f59e0b;
  margin-top: 0.2rem;
}

.kds-footer {
  padding: 0.85rem 1rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 0.5rem;
}

/* PedidosYa & Delivery Badge */
.badge-pedidosya {
  background: #ea1d2c;
  color: #ffffff;
  font-weight: 800;
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  letter-spacing: 0.3px;
}

/* ESC/POS Thermal Receipt Simulation */
.escpos-receipt-container {
  background: #fdfbf7;
  color: #1a1a1a;
  font-family: 'Courier New', Courier, monospace;
  padding: 1.5rem;
  border-radius: var(--radius-sm);
  max-width: 360px;
  margin: 0 auto;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  line-height: 1.4;
  font-size: 0.85rem;
}

.escpos-receipt-container hr {
  border: none;
  border-top: 1px dashed #777;
  margin: 0.75rem 0;
}

/* BOM Multi-Level Hierarchy */
.bom-badge-level-1 {
  background: rgba(14, 165, 233, 0.15);
  color: #0ea5e9;
  border: 1px solid rgba(14, 165, 233, 0.3);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
}

.bom-badge-level-2 {
  background: rgba(168, 85, 247, 0.15);
  color: #a855f7;
  border: 1px solid rgba(168, 85, 247, 0.3);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
}

.bom-badge-level-3 {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
}

/* ==========================================================================
   Modals & Dialogs System (Fixed Z-Index & Backdrop Blur)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(8, 12, 20, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  padding: 1rem;
  animation: modalFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.6), 0 0 32px rgba(79, 70, 229, 0.15);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 1.5rem;
  animation: modalScaleIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalScaleIn {
  from { opacity: 0; transform: scale(0.94) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* ==========================================================================
   Touch PIN & Numpad Authentication Components
   ========================================================================== */
.pin-login-container {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 1.75rem 1.5rem;
  box-shadow: var(--shadow-lg), 0 0 40px rgba(79, 70, 229, 0.15);
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
}

.pin-staff-selector {
  display: flex;
  gap: 0.6rem;
  overflow-x: auto;
  padding: 0.35rem 0.25rem 0.75rem;
  margin-bottom: 1rem;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.staff-avatar-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 0.6rem 0.5rem;
  background: var(--bg-surface-elevated);
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  min-width: 74px;
  max-width: 82px;
  transition: all var(--transition-fast);
  flex-shrink: 0;
  touch-action: manipulation;
}

.staff-avatar-btn:active {
  transform: scale(0.96);
}

.staff-avatar-btn.selected {
  border-color: var(--primary);
  background: rgba(79, 70, 229, 0.18);
  box-shadow: 0 0 16px rgba(79, 70, 229, 0.35);
}

.staff-avatar-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4f46e5, #06b6d4);
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35);
}

.pin-display-dots {
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  margin-bottom: 1.25rem;
}

.pin-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--border-color-hover);
  background: var(--bg-surface-elevated);
  transition: all var(--transition-fast);
}

.pin-dot.filled {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 14px rgba(79, 70, 229, 0.7);
  transform: scale(1.2);
}

.numpad-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
  max-width: 320px;
  margin: 0 auto;
}

.numpad-key {
  height: 58px;
  border-radius: var(--radius-lg);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 1.5rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  touch-action: manipulation;
  transition: all var(--transition-fast);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.numpad-key:active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  transform: scale(0.94);
}

.numpad-key.action-key {
  background: rgba(255, 255, 255, 0.05);
  font-size: 1.15rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Mobile Responsive Adjustments (Phones & Small Tablets)
   ========================================================================== */
@media (max-width: 900px) {
  .app-container {
    flex-direction: column;
  }

  .mobile-menu-btn {
    display: flex !important;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: -290px;
    height: 100vh;
    z-index: 10000;
    transition: left var(--transition-smooth);
    width: 290px;
    background-color: var(--bg-sidebar);
  }

  .sidebar.open {
    left: 0;
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.9);
  }


  .top-header {
    padding: 0.5rem 1rem;
    height: auto;
    min-height: 56px;
  }

  .content-body {
    padding: 1rem;
  }

  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }

  .tables-grid {
    grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
    gap: 0.75rem;
  }

  .table-card {
    min-height: 110px;
    padding: 0.75rem 0.5rem;
  }

  .table-card-number {
    font-size: 1.1rem;
  }

  .pos-container {
    flex-direction: column;
    height: auto;
  }

  .pos-cart-tray {
    width: 100%;
    max-height: 380px;
    border-left: none;
    border-top: 1px solid var(--border-color);
  }

  .pin-login-container {
    padding: 1.25rem 1rem;
    border-radius: var(--radius-lg);
  }

  .numpad-key {
    height: 52px;
    font-size: 1.3rem;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 0.8125rem;
  }

  .pin-login-container {
    padding: 1rem 0.75rem;
    box-shadow: none;
    border: none;
    background: transparent;
  }

  .pin-display-dots {
    gap: 0.75rem;
    margin-bottom: 1rem;
  }

  .pin-dot {
    width: 14px;
    height: 14px;
  }

  .numpad-grid {
    gap: 0.5rem;
  }

  .numpad-key {
    height: 48px;
    font-size: 1.25rem;
  }

  .modal-card {
    padding: 1.15rem 1rem;
  }
}

/* ==========================================================================
   BOM & GASTRO PREMIUM COMPONENTS & DISH PHOTO CARDS
   ========================================================================== */
.bom-badge-level-1 {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(14, 165, 233, 0.12);
  color: #0284c7;
  border: 1px solid rgba(14, 165, 233, 0.3);
  font-weight: 700;
  font-size: 0.72rem;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  letter-spacing: 0.02em;
}

.bom-badge-level-2 {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(245, 158, 11, 0.12);
  color: #d97706;
  border: 1px solid rgba(245, 158, 11, 0.3);
  font-weight: 700;
  font-size: 0.72rem;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  letter-spacing: 0.02em;
}

.bom-badge-level-3 {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(99, 102, 241, 0.12);
  color: #4f46e5;
  border: 1px solid rgba(99, 102, 241, 0.3);
  font-weight: 700;
  font-size: 0.72rem;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  letter-spacing: 0.02em;
}

/* Dish Cards Grid View */
.dish-grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-top: 1rem;
  width: 100%;
}

.dish-premium-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  position: relative;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  height: 100%;
}

.dish-premium-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: rgba(99, 102, 241, 0.4);
}

.dish-card-image-wrap {
  width: 100%;
  height: 160px;
  min-height: 160px;
  max-height: 160px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #1e293b, #334155);
  flex-shrink: 0;
}

.dish-card-image {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--transition-normal);
}

.dish-premium-card:hover .dish-card-image {
  transform: scale(1.05);
}

.dish-card-fallback-image {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(14, 165, 233, 0.15));
  color: var(--text-muted);
  font-size: 0.75rem;
  gap: 0.35rem;
}

.dish-card-price-overlay {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  color: #ffffff;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.dish-card-prep-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(6px);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  font-weight: 600;
  color: #f8fafc;
  display: flex;
  align-items: center;
  gap: 4px;
}

.dish-card-status-badge {
  position: absolute;
  top: 8px;
  right: 8px;
}

.dish-card-content {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.5rem;
}

.dish-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
  margin: 0;
}

.dish-card-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dish-card-metrics {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface-elevated);
  padding: 0.45rem 0.65rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  font-size: 0.75rem;
  margin-top: auto;
}

.dish-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-color);
}

/* Production Batch Live Calculator Card */
.batch-calc-container {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.batch-calc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.65rem;
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  font-size: 0.82rem;
}

.batch-stock-pill {
  font-family: var(--font-mono);
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}

.batch-stock-before {
  background: rgba(100, 116, 139, 0.15);
  color: var(--text-muted);
}

.batch-stock-deduct {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  font-weight: 700;
}

.batch-stock-after {
  background: rgba(34, 197, 94, 0.12);
  color: #16a34a;
  font-weight: 700;
}

/* Image Upload Dropzone */
.image-dropzone-wrap {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  text-align: center;
  background: var(--bg-surface-elevated);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.image-dropzone-wrap:hover {
  border-color: var(--primary);
  background: var(--primary-subtle);
}

.image-preview-thumb {
  width: 100%;
  height: 140px;
  border-radius: var(--radius-md);
  object-fit: cover;
  border: 1px solid var(--border-color);
}

/* ==========================================================================
   Executive Gastronomy Reports & Analytics Component
   ========================================================================== */
.reports-tab-bar {
  display: flex;
  gap: 0.5rem;
  background: var(--bg-surface);
  padding: 0.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  margin-bottom: 1.5rem;
  overflow-x: auto;
  scrollbar-width: thin;
}

.reports-tab-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.15rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.reports-tab-btn:hover {
  color: var(--text-main);
  background: var(--bg-surface-elevated);
}

.reports-tab-btn.active {
  color: #ffffff;
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35);
}

.chart-bar-track {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  height: 12px;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.chart-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}

.thermal-ticket-card {
  background: #fffbfa;
  color: #111827;
  font-family: 'Courier New', Courier, monospace;
  width: 320px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  border-radius: 4px;
  border-top: 6px dashed #d1d5db;
  border-bottom: 6px dashed #d1d5db;
  font-size: 0.82rem;
  line-height: 1.4;
}

.thermal-divider {
  border-top: 1px dashed #9ca3af;
  margin: 0.5rem 0;
}

/* ==========================================================================
   Modern Data Table & Enterprise Grid Styling
   ========================================================================== */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  box-shadow: var(--shadow-sm);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.86rem;
  letter-spacing: -0.01em;
}

.data-table thead {
  background: var(--bg-surface-elevated);
}

.data-table th {
  padding: 0.8rem 1rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  white-space: nowrap;
  border-bottom: 1px solid var(--border-color);
}

.data-table td {
  padding: 0.85rem 1rem;
  vertical-align: middle;
  border-bottom: 1px solid var(--border-color-subtle);
  color: var(--text-main);
  transition: background var(--transition-fast);
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.data-table tbody tr:hover td {
  background: var(--bg-surface-elevated);
}

.data-table .col-mono {
  font-family: var(--font-mono, monospace);
  font-size: 0.85rem;
}

.data-table .col-right {
  text-align: right;
}

.data-table .col-center {
  text-align: center;
}

.data-table .col-nowrap {
  white-space: nowrap;
}

/* Badges for BOM & Levels */
.bom-badge-level-1 {
  background: rgba(14, 165, 233, 0.12);
  color: #0ea5e9;
  border: 1px solid rgba(14, 165, 233, 0.25);
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
}

.bom-badge-level-2 {
  background: rgba(168, 85, 247, 0.12);
  color: #a855f7;
  border: 1px solid rgba(168, 85, 247, 0.25);
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
}

.bom-badge-level-3 {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
}

/* ==========================================================================
   2D Floor Plan & Room Designer Styles
   ========================================================================== */
.room-designer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 15, 0.88);
  backdrop-filter: blur(8px);
  z-index: 1200;
  display: flex;
  flex-direction: column;
  animation: fadeIn 0.15s ease-out;
}

.designer-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  padding: 0.75rem 1.25rem;
  flex-wrap: wrap;
  gap: 0.75rem;
  z-index: 10;
}

.designer-workspace {
  display: flex;
  flex: 1;
  overflow: hidden;
  height: calc(100vh - 65px);
  position: relative;
}

.designer-sidebar {
  width: 320px;
  background: var(--bg-surface);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow-y: auto;
  z-index: 5;
}

.designer-sidebar-section {
  padding: 1rem;
  border-bottom: 1px solid var(--border-color-subtle);
}

.designer-sidebar-title {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.toolbox-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.toolbox-item {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.5rem;
  text-align: center;
  cursor: grab;
  transition: all var(--transition-fast);
  user-select: none;
}

.toolbox-item:hover {
  border-color: var(--primary);
  background: var(--primary-subtle);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.toolbox-item:active {
  cursor: grabbing;
}

.toolbox-item-icon {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 36px;
}

.toolbox-item-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.toolbox-item-sub {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.designer-canvas-viewport {
  flex: 1;
  background: #0b1120;
  background-image: radial-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px);
  background-size: 20px 20px;
  overflow: auto;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.designer-canvas-stage {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  background: #0b1120;
  position: relative;
}

.floorplan-2d-canvas-wrap {
  width: 100%;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  background: #0b1120;
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 20px 20px;
  overflow: hidden;
  position: relative;
  min-height: 520px;
  box-shadow: var(--shadow-sm);
}

.view-mode-toggle {
  display: flex;
  background: var(--bg-surface-elevated);
  padding: 3px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  gap: 2px;
}

.view-mode-toggle-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all var(--transition-fast);
}

.view-mode-toggle-btn.active {
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   Print Styles for Reports (@media print)
   ========================================================================== */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }

  .sidebar,
  .topbar,
  .reports-tab-bar,
  .reports-actions-bar,
  .btn,
  .modal-overlay,
  #offline-banner,
  #pwa-install-banner,
  .no-print {
    display: none !important;
  }

  .main-content {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
  }

  .card,
  .metric-card {
    background: #ffffff !important;
    border: 1px solid #d1d5db !important;
    color: #000000 !important;
    box-shadow: none !important;
    page-break-inside: avoid;
  }

  .print-only-header {
    display: block !important;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #000000;
    padding-bottom: 0.75rem;
  }

  .data-table {
    border-collapse: collapse !important;
    width: 100% !important;
  }

  .data-table th,
  .data-table td {
    border: 1px solid #9ca3af !important;
    color: #000000 !important;
    padding: 6px 8px !important;
  }
}
