
:root {
  --bg: #F7F9FC;
  --surface: #FFFFFF;
  --surface-strong: #F1F5F9;
  --border: rgba(15, 23, 42, 0.08);
  --text: #101828;
  --muted: #667085;
  --primary: #16A085;
  --secondary: #0E7490;
  --ai: linear-gradient(135deg, #4F46E5 0%, #8B5CF6 50%, #0EA5E9 100%);
  --success: #16A34A;
  --warning: #F59E0B;
  --danger: #DC2626;
  --shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
  --radius: 20px;
  --sidebar-width: 280px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: 'Inter', sans-serif; background: var(--bg); color: var(--text); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.app-shell { display: flex; min-height: 100vh; }
.sidebar { width: var(--sidebar-width); background: rgba(255,255,255,0.86); border-right: 1px solid var(--border); backdrop-filter: blur(12px); padding: 26px 16px 20px; display: flex; flex-direction: column; gap: 18px; transition: width 0.25s ease; }
.sidebar.collapsed { width: 90px; }
.sidebar.collapsed .brand-copy, .sidebar.collapsed .nav-item span, .sidebar.collapsed .mini-card div { display: none; }
.brand-wrap { display: flex; align-items: center; gap: 12px; padding: 8px 10px 18px; border-bottom: 1px solid var(--border); }
.brand-mark { width: 42px; height: 42px; border-radius: 14px; background: var(--ai); color: white; display: grid; place-items: center; font-weight: 800; }
.brand-copy { display: flex; flex-direction: column; }
.brand-name { font-weight: 700; }
.brand-copy small { color: var(--muted); }
.sidebar-group { display: flex; flex-direction: column; gap: 4px; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; color: var(--text); transition: all .2s ease; font-weight: 600; }
.nav-item:hover, .nav-item.active { background: rgba(22,160,133,0.08); color: var(--primary); }
.sidebar-footer { margin-top: auto; display: flex; flex-direction: column; gap: 12px; }
.mini-card { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 12px 10px; box-shadow: var(--shadow); }
.mini-card-soft { background: rgba(15,23,42,0.02); }
.mini-avatar { width: 38px; height: 38px; border-radius: 12px; background: var(--ai); color: white; display: grid; place-items: center; font-weight: 700; font-size: 12px; }
.mini-avatar.alt { background: linear-gradient(135deg, #0E7490, #16A085); }
.mini-card div { display: flex; flex-direction: column; }
.mini-card strong { font-size: 13px; }
.mini-card span { color: var(--muted); font-size: 11px; }
.main-panel { flex: 1; display: flex; flex-direction: column; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 18px 28px; background: rgba(255,255,255,0.8); border-bottom: 1px solid var(--border); backdrop-filter: blur(10px); }
.topbar-left, .topbar-actions { display: flex; align-items: center; gap: 14px; }
.icon-btn { width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.branch-select { display: flex; flex-direction: column; padding: 8px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.branch-select span { font-weight: 700; }
.branch-select small, .user-chip small { color: var(--muted); }
.search-pill { min-width: 280px; display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.search-pill input { border: none; background: transparent; flex: 1; outline: none; color: var(--text); }
.user-chip { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 8px 12px; }
.user-avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--primary); color: white; font-weight: 700; }
.page-content { padding: 28px; }
.hero-strip, .panel-head, .stat-row, .product-top, .product-meta, .product-footer, .ai-head, .ai-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hero-strip { background: linear-gradient(135deg, rgba(22,160,133,.12), rgba(14,116,144,.08)); border: 1px solid var(--border); padding: 24px 28px; border-radius: var(--radius); }
.eyebrow { text-transform: uppercase; letter-spacing: 0.12em; font-size: 11px; color: var(--secondary); font-weight: 700; margin: 0 0 8px; }
h1, h2, h3, h4 { margin: 0; }
.hero-strip h1 { font-size: clamp(1.9rem, 2vw, 3rem); }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 18px; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 20px; box-shadow: var(--shadow); }
.stat-card.tone-primary { background: linear-gradient(135deg, rgba(22,160,133,0.08), rgba(255,255,255,1)); }
.stat-card.tone-success { background: linear-gradient(135deg, rgba(22,163,74,0.07), rgba(255,255,255,1)); }
.stat-card.tone-secondary { background: linear-gradient(135deg, rgba(14,116,144,0.08), rgba(255,255,255,1)); }
.stat-card.tone-warning { background: linear-gradient(135deg, rgba(245,158,11,0.08), rgba(255,255,255,1)); }
.stat-label { color: var(--muted); font-size: 13px; }
.stat-value { font-size: 2rem; font-weight: 800; }
.delta { font-size: 12px; font-weight: 700; border-radius: 999px; padding: 6px 8px; }
.delta.up { background: rgba(22,163,74,0.12); color: var(--success); }
.delta.down { background: rgba(220,38,38,0.08); color: var(--danger); }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 22px; padding: 22px; box-shadow: var(--shadow); }
.two-column-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 22px; }
.chart-wrap { height: 240px; }
.rank-list { display: grid; gap: 14px; }
.rank-item { display: flex; justify-content: space-between; align-items: center; padding: 14px 12px; border: 1px solid var(--border); border-radius: 14px; }
.ai-panel { background: linear-gradient(135deg, rgba(79,70,229,0.06), rgba(14,116,144,0.08)); }
.ai-content { display: grid; grid-template-columns: 2fr 1fr; gap: 18px; }
.ai-message { padding: 6px 4px; }
.ai-message p { font-size: 1.1rem; font-weight: 600; }
.ai-message ul { margin: 12px 0 0; padding-left: 18px; color: var(--muted); line-height: 1.8; }
.ai-kpi-box { display: grid; gap: 14px; }
.kpi-card { background: rgba(255,255,255,0.7); border: 1px solid var(--border); border-radius: 18px; padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.kpi-card.accent { background: var(--ai); color: white; }
.kpi-card strong { font-size: 2rem; }
.kpi-card span { color: inherit; opacity: 0.9; }
.mt-24 { margin-top: 24px; }
.mb-24 { margin-bottom: 24px; }
.btn { border-radius: 12px; padding: 12px 18px; border: 1px solid transparent; font-weight: 700; transition: transform .16s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--primary); color: white; }
.btn-secondary { background: rgba(15,23,42,0.03); border-color: var(--border); color: var(--text); }
.small { padding: 10px 12px; font-size: 12px; }
.pill, .status-badge { display: inline-flex; align-items: center; padding: 7px 12px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.status-badge.success { background: rgba(22,163,74,0.12); color: var(--success); }
.status-badge.warning { background: rgba(245,158,11,0.12); color: var(--warning); }
.status-badge.info { background: rgba(14,116,144,0.12); color: var(--secondary); }
.pill { background: rgba(79,70,229,0.12); color: #4F46E5; }
.menu-layout { display: grid; grid-template-columns: 220px 1fr; gap: 18px; }
.draggable-list { display: grid; gap: 10px; }
.drag-item { padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: rgba(15,23,42,0.02); font-weight: 600; }
.drag-item.active { background: rgba(22,160,133,0.08); border-color: rgba(22,160,133,0.24); color: var(--primary); }
.menu-content { min-width: 0; }
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px; }
.product-card { overflow: hidden; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.product-card img { height: 180px; object-fit: cover; }
.product-body { padding: 16px; }
.product-body p { color: var(--muted); line-height: 1.6; margin: 8px 0; }
.product-meta { padding-top: 8px; border-top: 1px solid var(--border); margin-top: 12px; }
.product-meta span { font-weight: 800; font-size: 1.1rem; }
.text-btn { background: transparent; border: none; color: var(--primary); font-weight: 700; }
.featured { border-color: rgba(22,160,133,0.35); }
.modal { position: fixed; inset: 0; display: none; place-items: center; background: rgba(15,23,42,0.45); z-index: 15; }
.modal.show { display: grid; }
.modal-card { position: relative; width: min(540px, calc(100vw - 32px)); background: var(--surface); border-radius: 22px; padding: 26px; box-shadow: var(--shadow); }
.modal-card.wide { width: min(700px, calc(100vw - 32px)); }
.modal-close { position: absolute; top: 16px; right: 16px; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); }
.form-grid { display: grid; gap: 12px; }
.form-grid input, .form-grid textarea, .search-pill input { width: 100%; border: 1px solid var(--border); background: rgba(15,23,42,0.02); border-radius: 12px; padding: 12px 14px; color: var(--text); }
.kanban-wrap { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 18px; }
.kanban-column { background: rgba(15,23,42,0.02); border: 1px solid var(--border); border-radius: 18px; padding: 18px; }
.kanban-card { margin-top: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 16px; display: grid; gap: 8px; }
.table-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 18px; }
.table-card { border: 1px solid var(--border); padding: 18px; border-radius: 18px; background: rgba(15,23,42,0.02); display: flex; flex-direction: column; gap: 6px; }
.table-card.status-empty { border-left: 4px solid var(--success); }
.table-card.status-filled { border-left: 4px solid var(--primary); }
.table-card.status-waiting { border-left: 4px solid var(--warning); }
.table-card.status-cooking { border-left: 4px solid var(--secondary); }
.table-card.status-bill { border-left: 4px solid var(--danger); }
.table-card.status-reserved { border-left: 4px solid #7C3AED; }
.kitchen-table { width: 100%; border-collapse: collapse; }
.kitchen-table th, .kitchen-table td { padding: 12px; border-bottom: 1px solid var(--border); text-align: left; }
.tag { display: inline-flex; align-items: center; padding: 7px 10px; border-radius: 8px; font-weight: 700; font-size: 11px; }
.tag-new { background: rgba(22,160,133,0.12); color: var(--primary); }
.tag-cooking { background: rgba(14,116,144,0.12); color: var(--secondary); }
.tag-ready { background: rgba(22,163,74,0.12); color: var(--success); }
.reservation-list, .customer-list, .campaign-list { display: grid; gap: 12px; }
.reservation-item, .customer-row, .mini-row, .perm-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.customer-profile { width: 40px; height: 40px; border-radius: 50%; background: var(--primary); display: grid; place-items: center; color: white; font-weight: 700; }
.customer-profile.alt { background: var(--secondary); }
.customer-profile.alt2 { background: linear-gradient(135deg, #F59E0B, #F97316); }
.customer-row { border-bottom: 1px solid var(--border); }
.customer-row > div { display: flex; flex-direction: column; }
.loyalty-box, .campaign-editor { background: rgba(15,23,42,0.02); border: 1px solid var(--border); border-radius: 16px; padding: 18px; }
.callout { background: rgba(22,160,133,0.08); border-left: 4px solid var(--primary); padding: 12px; border-radius: 8px; }
.funnel-box { display: grid; gap: 12px; }
.funnel-step { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-radius: 14px; background: linear-gradient(135deg, rgba(22,160,133,0.06), rgba(14,116,144,0.06)); border: 1px solid var(--border); }
.heatmap-list { display: grid; gap: 12px; }
.heatmap-list div { display: flex; justify-content: space-between; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; }
.qr-grid, .integration-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; }
.qr-card, .integration-card { background: rgba(15,23,42,0.02); border: 1px solid var(--border); border-radius: 18px; padding: 18px; display: flex; flex-direction: column; gap:10px; align-items: center; justify-content: center; min-height: 180px; }
.qr-code { width: 92px; height: 92px; border-radius: 18px; display: grid; place-items: center; background: repeating-linear-gradient(45deg, #101828 0, #101828 8px, #fff 8px, #fff 16px); color: var(--text); font-weight: 800; }
.pricing-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 20px; }
.price-card { background: var(--surface); border: 1px solid var(--border); border-radius: 22px; padding: 24px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 18px; }
.price-card.featured { border-color: rgba(22,160,133,0.35); background: linear-gradient(135deg, rgba(22,160,133,0.04), rgba(14,116,144,0.04)); }
.price-card ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; color: var(--muted); }
.price-card h3 { font-size: 2.5rem; }
.builder-layout { display: grid; grid-template-columns: 220px 1fr 220px; gap: 18px; }
.builder-panel { background: rgba(15,23,42,0.02); border: 1px solid var(--border); border-radius: 18px; padding: 18px; }
.section-list, .style-list { display:flex; flex-wrap: wrap; gap: 8px; }
.section-list span, .style-list span { background: rgba(255,255,255,1); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; font-size: 12px; }
.builder-preview { background: rgba(15,23,42,0.01); border: 1px solid var(--border); border-radius: 18px; padding: 18px; }
.site-window { background: var(--surface); border-radius: 18px; border: 1px solid var(--border); min-height: 540px; overflow: hidden; }
.site-header { display:flex; justify-content: space-between; align-items:center; padding:14px 18px; border-bottom:1px solid var(--border); }
.hero-preview { background: linear-gradient(135deg, #0f172a, #1f2937); color: white; padding: 38px 24px; display: flex; justify-content: space-between; align-items: end; }
.site-grid { display:grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px; padding: 20px; }
.site-card { background: rgba(15,23,42,0.02); border:1px solid var(--border); border-radius:14px; min-height:120px; display:flex; align-items:center; justify-content:center; }
.data-table { width:100%; border-collapse:collapse; }
.data-table th, .data-table td { padding:12px 10px; border-bottom:1px solid var(--border); text-align:left; }
.auth-body { margin:0; min-height:100vh; background: linear-gradient(135deg,#eefaf7,#f4f2ff); display:flex; align-items:center; justify-content:center; }
.auth-layout { width:min(1200px, calc(100vw - 40px)); background: rgba(255,255,255,0.9); border: 1px solid var(--border); border-radius: 28px; overflow: hidden; display:grid; grid-template-columns: 1.2fr 0.8fr; box-shadow: var(--shadow); }
.auth-visual { background: linear-gradient(135deg,#101828,#0E7490); color:white; padding: 54px 42px; }
.auth-visual h1 { font-size: clamp(2.2rem,3vw,4rem); margin-bottom: 16px; }
.auth-visual ul { list-style:none; padding:0; margin:32px 0 0; display:grid; gap:14px; }
.auth-card { padding: 42px 34px; display:flex; align-items:center; justify-content:center; }
.auth-form { width:100%; display:grid; gap:14px; }
.auth-form .field { display:grid; gap:8px; }
.auth-form input { width:100%; border:1px solid var(--border); border-radius:12px; padding:12px 14px; }
.inline-row { display:flex; justify-content:space-between; align-items:center; }
.inline-row a { color: var(--primary); }
.auth-cta { display:grid; gap:10px; }
.hr-divider { display:flex; align-items:center; color:var(--muted); gap:10px; }
.hr-divider::before, .hr-divider::after { content:''; flex:1; height:1px; background: var(--border); }
.command-palette { position: fixed; inset: 0; display:none; place-items: start center; background: rgba(15,23,42,0.22); padding-top: 150px; z-index: 20; }
.command-palette.show { display:grid; }
.command-box { width:min(660px, calc(100vw - 32px)); background: rgba(255,255,255,0.96); border:1px solid var(--border); border-radius: 20px; padding: 18px; box-shadow: var(--shadow); }
.command-header { font-weight: 700; margin-bottom: 12px; }
.command-box input { width:100%; border:1px solid var(--border); border-radius:12px; padding:12px 14px; }
.command-results { display:grid; gap:10px; margin-top:14px; }
.command-item { background: rgba(15,23,42,0.02); border:1px solid var(--border); border-radius:10px; padding: 12px 14px; }
.toast { position: fixed; right: 24px; bottom: 24px; background: #101828; color: white; padding: 12px 18px; border-radius: 12px; box-shadow: var(--shadow); opacity: 0; transform: translateY(16px); transition: all .2s ease; z-index: 21; }
.toast.show { opacity: 1; transform: translateY(0); }
body.dark-theme { --bg:#0b1220; --surface:#111827; --surface-strong:#0f172a; --border: rgba(148,163,184,0.18); --text:#e5e7eb; --muted:#94a3b8; }
body.dark-theme .search-pill, body.dark-theme .icon-btn, body.dark-theme .user-chip, body.dark-theme .branch-select { background: rgba(17,24,39,0.8); }
body.dark-theme .sidebar { background: rgba(15,23,42,0.96); }
body.dark-theme .panel, body.dark-theme .product-card, body.dark-theme .table-card, body.dark-theme .kanban-card, body.dark-theme .price-card, body.dark-theme .modal-card, body.dark-theme .command-box { background: #111827; }
body.dark-theme .kpi-card { background: rgba(17,24,39,0.66); }
body.dark-theme .site-window { background: #0b1220; }
body.dark-theme .section-list span, body.dark-theme .style-list span { background: rgba(15,23,42,0.8); }
@media (max-width: 1100px) {
  .two-column-grid, .menu-layout, .ai-content, .pricing-grid, .kanban-wrap, .builder-layout { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .product-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 780px) {
  .sidebar { display: none; }
  .page-content { padding: 18px; }
  .topbar { padding: 14px 18px; flex-wrap: wrap; }
  .topbar-actions { width:100%; justify-content: space-between; }
  .search-pill { min-width: 0; flex:1; }
  .stats-grid, .product-grid, .qr-grid, .integration-grid, .table-grid { grid-template-columns: 1fr; }
  .hero-strip { flex-direction: column; align-items: flex-start; }
  .auth-layout { grid-template-columns: 1fr; }
}
