
:root {
  --bg: #f6f2e9;
  --surface: #fffdf7;
  --surface-2: #fbf6eb;
  --ink: #171717;
  --ink-2: #2b2b2b;
  --muted: #77736a;
  --line: #e6dfd2;
  --line-2: #d8cebd;
  --green: #1fbf75;
  --green-dark: #0c8f54;
  --green-soft: #e9f9f1;
  --yellow: #f8c847;
  --yellow-soft: #fff7da;
  --orange: #ff8a3d;
  --red: #ef4444;
  --red-soft: #ffeded;
  --blue: #2563eb;
  --blue-soft: #eef4ff;
  --black: #151515;
  --sidebar: #fffaf0;
  --radius: 24px;
  --radius-sm: 16px;
  --shadow: 0 18px 38px rgba(24, 20, 14, 0.055);
  --sidebar-width: 272px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(31,191,117,.10), transparent 34%),
    radial-gradient(circle at 90% 10%, rgba(248,200,71,.13), transparent 28%),
    var(--bg);
  color: var(--ink);
  font-family: 'Poppins', sans-serif;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; }
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar);
  border-right: 1px solid var(--line);
  padding: 22px 18px;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 1050;
  display: flex;
  flex-direction: column;
  transition: transform .28s ease;
}
.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.brand-icon {
  width: 44px; height: 44px; border-radius: 16px; background: var(--black); color: #fff;
  display: grid; place-items: center; font-size: 18px; box-shadow: 0 12px 25px rgba(0,0,0,.13);
}
.brand h4 { font-size: 18px; font-weight: 800; margin: 0; letter-spacing: -.5px; }
.brand span { display: block; font-size: 12px; color: var(--muted); margin-top: 1px; }
.nav-title { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 800; margin: 10px 10px 9px; }
.nav-menu { display: flex; flex-direction: column; gap: 6px; overflow-y: auto; padding-right: 2px; }
.nav-link-custom {
  padding: 11px 13px; border-radius: 15px; color: #272727; display: flex; align-items: center; gap: 11px;
  font-size: 13.5px; font-weight: 700; transition: .18s ease; white-space: nowrap;
}
.nav-link-custom i { width: 18px; color: #5d574e; text-align: center; }
.nav-link-custom:hover, .nav-link-custom.active { background: var(--black); color: #fff; transform: translateX(2px); }
.nav-link-custom:hover i, .nav-link-custom.active i { color: #fff; }
.sidebar-promo {
  margin-top: auto; background: #101010; color: #fff; border-radius: 23px; padding: 18px; overflow: hidden; position: relative;
  min-height: 145px;
}
.sidebar-promo:after { content: ''; position: absolute; width: 110px; height: 110px; border-radius: 50%; background: rgba(31,191,117,.23); right: -35px; top: -35px; }
.sidebar-promo h6, .sidebar-promo p, .sidebar-promo a { position: relative; z-index: 1; }
.sidebar-promo h6 { font-weight: 800; margin-bottom: 8px; }
.sidebar-promo p { font-size: 12px; color: #d7d7d7; margin-bottom: 14px; line-height: 1.55; }
.sidebar-promo a { display: inline-flex; align-items:center; gap:7px; border: 0; background: var(--green); color: #fff; border-radius: 999px; padding: 9px 14px; font-size: 12px; font-weight: 800; }
.main { margin-left: var(--sidebar-width); width: calc(100% - var(--sidebar-width)); padding: 22px; }
.topbar {
  background: rgba(255,253,247,.88); backdrop-filter: blur(12px); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 15px 18px; display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 22px; box-shadow: var(--shadow);
}
.mobile-btn { display: none; border: 1px solid var(--line); background: #fff; width: 43px; height: 43px; border-radius: 14px; place-items: center; }
.status-pill, .soft-pill {
  display: inline-flex; align-items: center; gap: 8px; background: var(--green-soft); color: var(--green-dark); border: 1px solid #cfeedd;
  padding: 9px 13px; border-radius: 999px; font-size: 12.5px; font-weight: 800;
}
.soft-pill.dark { background:#111; color:#fff; border-color:#111; }
.soft-pill.yellow { background: var(--yellow-soft); color:#8a6500; border-color:#efd67f; }
.soft-pill.blue { background: var(--blue-soft); color: var(--blue); border-color:#d8e6ff; }
.soft-pill.red { background: var(--red-soft); color: var(--red); border-color:#ffd5d5; }
.pulse-dot { width: 9px; height: 9px; background: var(--green); border-radius: 50%; box-shadow: 0 0 0 4px rgba(31,191,117,.15); animation: pulse 1.4s infinite; }
@keyframes pulse { 0%,100% { transform: scale(1); opacity: 1;} 50% { transform: scale(1.28); opacity: .72;} }
.top-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.branch-select, .icon-btn, .filter-btn {
  border: 1px solid var(--line); background: #fbf7ee; border-radius: 16px; padding: 11px 14px; font-weight: 800; font-size: 13px; color: var(--ink);
}
.icon-btn { width: 44px; height: 44px; display:grid; place-items:center; padding: 0; }
.profile-box { display:flex; align-items:center; gap:10px; background:#f7f1e5; border:1px solid var(--line); border-radius:999px; padding:7px 12px 7px 7px; }
.avatar { width:38px; height:38px; border-radius:50%; background:#151515; color:#fff; display:grid; place-items:center; font-weight:850; }
.page-title { margin-bottom: 22px; }
.page-title h1 { font-size: clamp(27px, 3vw, 38px); font-weight: 850; letter-spacing: -1.3px; margin-bottom: 6px; }
.page-title p { color: var(--muted); margin:0; max-width: 740px; line-height: 1.6; }
.card-clean { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 22px; }
.metric-card { padding: 22px; min-height: 152px; position: relative; overflow: hidden; }
.metric-card:after { content:''; position:absolute; width:90px; height:90px; border-radius:50%; background:rgba(31,191,117,.08); right:-30px; top:-30px; }
.metric-label { color: var(--muted); font-size: 13px; font-weight: 800; margin-bottom: 16px; display:flex; align-items:center; gap:6px; }
.metric-value { font-size: clamp(30px, 4vw, 40px); font-weight: 850; letter-spacing: -1.2px; margin-bottom: 3px; }
.metric-note { color: var(--muted); font-size: 12.5px; }
.section-heading { display:flex; justify-content:space-between; align-items:center; gap:14px; margin-bottom:18px; }
.section-heading h5 { font-weight:850; margin:0; letter-spacing:-.45px; }
.section-heading p { color: var(--muted); margin:4px 0 0; font-size: 13px; }
.activity-item { display:flex; align-items:center; gap:13px; padding:13px 0; border-bottom:1px solid var(--line); }
.activity-item:last-child { border-bottom:0; padding-bottom:0; }
.call-icon, .round-icon { width:42px; height:42px; border-radius:15px; background:#f1eadc; display:grid; place-items:center; color:#151515; flex:0 0 auto; }
.round-icon.green { background: var(--green-soft); color: var(--green-dark); }
.round-icon.blue { background: var(--blue-soft); color: var(--blue); }
.round-icon.yellow { background: var(--yellow-soft); color: #8a6500; }
.round-icon.black { background:#111; color:#fff; }
.item-title { font-weight:800; font-size:14px; margin-bottom:2px; }
.item-sub { color: var(--muted); font-size:12px; line-height:1.45; }
.search-input, .form-control, .form-select, textarea.form-control {
  border: 1px solid var(--line); background-color: #fbf7ee; border-radius: 16px; padding: 12px 15px; font-weight: 600; color: var(--ink); outline:0;
}
.search-input { width:100%; font-size:13px; }
.form-control:focus, .form-select:focus, textarea.form-control:focus, .search-input:focus { border-color:#111; box-shadow:0 0 0 .2rem rgba(17,17,17,.075); background:#fff; }
.table { margin:0; }
.table thead th { color:var(--muted); font-size:11.5px; font-weight:850; border-bottom:1px solid var(--line); padding:14px 10px; white-space:nowrap; }
.table tbody td { padding:16px 10px; border-bottom:1px solid var(--line); vertical-align:middle; font-size:13px; font-weight:650; white-space:nowrap; }
.table tbody tr:hover { background:#fbf5e9; }
.table tbody tr:last-child td { border-bottom:0; }
.btn-black, .btn-green, .btn-cream {
  border:0; border-radius:16px; padding:12px 16px; font-weight:850; font-size:13px; display:inline-flex; align-items:center; justify-content:center; gap:8px;
}
.btn-black { background:#111; color:#fff; }
.btn-green { background: var(--green); color:#fff; }
.btn-cream { background:#fbf7ee; color:#111; border:1px solid var(--line); }
.btn-black:hover, .btn-green:hover { color:#fff; transform: translateY(-1px); }
.btn-cream:hover { background:#fff; color:#111; }
.tabs-box { display:flex; gap:8px; flex-wrap:wrap; }
.tab-btn { border:1px solid var(--line); background:#fbf7ee; padding:10px 14px; border-radius:999px; font-weight:850; font-size:12.5px; }
.tab-btn.active, .tab-btn:hover { background:#111; color:#fff; border-color:#111; }
.detail-panel { position: sticky; top: 22px; }
.customer-circle { width:52px; height:52px; border-radius:50%; background:#111; color:#fff; display:grid; place-items:center; font-weight:850; font-size:18px; }
.big-price { font-size:34px; font-weight:850; letter-spacing:-1px; }
.mini-line { height:1px; background: var(--line); margin:18px 0; }
.item-row { padding:12px 0; border-bottom:1px solid var(--line); }
.item-row:last-child { border-bottom:0; }
.kv { display:flex; justify-content:space-between; gap:10px; padding:10px 0; border-bottom:1px solid var(--line); font-size:13px; }
.kv:last-child { border-bottom:0; }
.kv span:first-child { color: var(--muted); font-weight:700; }
.kv span:last-child { font-weight:850; text-align:right; }
.progress { height: 10px; background:#efe7d8; border-radius:999px; overflow:hidden; }
.progress-bar { background: var(--green); border-radius:999px; }
.bar-chart { height:280px; display:flex; align-items:end; gap:13px; padding:20px 4px 32px; }
.bar { flex:1; min-width:32px; border-radius:16px 16px 7px 7px; background:linear-gradient(180deg,#111,#333); position:relative; }
.bar.green { background:linear-gradient(180deg,var(--green),#0b8d51); }
.bar.yellow { background:linear-gradient(180deg,var(--yellow),#d6a512); }
.bar span { position:absolute; bottom:-28px; left:50%; transform:translateX(-50%); color:var(--muted); font-size:11px; font-weight:700; }
.stat-grid { display:grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap:12px; }
.stat-tile { background:#fbf7ee; border:1px solid var(--line); border-radius:18px; padding:16px; }
.stat-tile strong { font-size:20px; font-weight:850; display:block; }
.stat-tile span { color:var(--muted); font-size:12px; font-weight:700; }
.integration-card, .agent-card, .kb-card { padding:18px; height:100%; }
.switch { position:relative; display:inline-block; width:48px; height:28px; }
.switch input { opacity:0; width:0; height:0; }
.slider { position:absolute; cursor:pointer; inset:0; background:#ddd0be; border-radius:999px; transition:.2s; }
.slider:before { content:''; position:absolute; height:22px; width:22px; left:3px; top:3px; background:#fff; border-radius:50%; transition:.2s; box-shadow:0 3px 8px rgba(0,0,0,.15); }
.switch input:checked + .slider { background:var(--green); }
.switch input:checked + .slider:before { transform:translateX(20px); }
.login-body { min-height:100vh; display:grid; place-items:center; padding:22px; background: radial-gradient(circle at top left, rgba(31,191,117,.15), transparent 30%), var(--bg); }
.login-card { width:100%; max-width:440px; background:var(--surface); border:1px solid var(--line); border-radius:30px; padding:30px; box-shadow:var(--shadow); }
.login-logo { width:56px; height:56px; border-radius:20px; background:#111; color:#fff; display:grid; place-items:center; font-size:22px; margin-bottom:18px; }
.backdrop { display:none; }
.hide { display:none!important; }
@media (max-width: 1199px) { .detail-panel { position: static; } }
@media (max-width: 991px) {
  .sidebar { transform: translateX(-106%); }
  .sidebar.show { transform: translateX(0); }
  .backdrop.show { display:block; position:fixed; inset:0; background:rgba(0,0,0,.45); z-index:1040; }
  .main { margin-left:0; width:100%; padding:15px; }
  .mobile-btn { display:grid; }
  .topbar { flex-wrap:wrap; }
  .profile-name { display:none; }
  .stat-grid { grid-template-columns:1fr; }
}
@media (max-width: 575px) {
  .top-actions { width:100%; justify-content:stretch; }
  .top-actions .branch-select { width:100%; }
  .status-pill { width:100%; justify-content:center; order:3; }
  .section-heading { align-items:flex-start; flex-direction:column; }
  .bar-chart { gap:8px; height:220px; overflow-x:auto; }
  .bar { min-width:42px; }
  .btn-black, .btn-green, .btn-cream, .filter-btn { width:100%; }
  .profile-box { display:none; }
}


.nav-new {
  margin-left: auto;
  background: var(--green);
  color: #fff;
  border-radius: 999px;
  padding: 3px 7px;
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: .02em;
}
.category-list { display:flex; flex-direction:column; gap:10px; }
.category-pill {
  border:1px solid var(--line); background:#fbf7ee; border-radius:18px; padding:13px 15px;
  display:flex; justify-content:space-between; align-items:center; gap:10px; font-weight:850; transition:.18s ease;
}
.category-pill:hover, .category-pill.active { background:#111; color:#fff; border-color:#111; }
.category-pill small { color:var(--muted); font-weight:800; }
.category-pill.active small, .category-pill:hover small { color:#ddd; }
.menu-item-card { background:#fbf7ee; border:1px solid var(--line); border-radius:20px; padding:16px; margin-bottom:12px; transition:.18s ease; }
.menu-item-card:hover { background:#fff; transform: translateY(-1px); }
.price-tag { background:#111; color:#fff; border-radius:999px; padding:7px 11px; font-size:12px; font-weight:900; white-space:nowrap; }
.modifier-tag { background:#fff; border:1px solid var(--line); border-radius:999px; padding:6px 10px; font-size:11px; font-weight:800; color:var(--muted); }
.reservation-slot { background:#fbf7ee; border:1px solid var(--line); border-radius:18px; padding:14px; display:flex; gap:12px; align-items:center; }
.slot-time { background:#111; color:#fff; border-radius:14px; padding:10px 12px; min-width:82px; text-align:center; font-weight:900; font-size:12px; }
.slot-time.green { background:var(--green); }
.slot-time.yellow { background:var(--yellow); color:#111; }
.guest-count { width:38px; height:38px; border-radius:13px; background:#111; color:#fff; display:grid; place-items:center; font-weight:900; }
.floor-table { border:1px solid var(--line); background:#fbf7ee; border-radius:18px; padding:13px; min-height:84px; display:flex; flex-direction:column; justify-content:space-between; }
.floor-table.available { border-color:#cfeedd; background:var(--green-soft); }
.floor-table.booked { border-color:#efd67f; background:var(--yellow-soft); }
.floor-table.blocked { border-color:#ffd5d5; background:var(--red-soft); }
.quick-chip { border:1px solid var(--line); background:#fbf7ee; border-radius:999px; padding:8px 12px; font-size:12px; font-weight:850; display:inline-flex; gap:7px; align-items:center; }
.ai-tip { border:1px dashed var(--line-2); background:#fffcf5; border-radius:20px; padding:16px; }
@media (max-width: 575px) {
  .category-pill, .reservation-slot { align-items:flex-start; flex-direction:column; }
  .slot-time { width:100%; }
}

/* PHP dynamic additions */
.alert-box { border-radius:18px; padding:13px 16px; margin-bottom:16px; font-size:13px; font-weight:750; }
.alert-success-custom { background:var(--green-soft); color:var(--green-dark); border:1px solid #cfeedd; }
.alert-error-custom { background:var(--red-soft); color:var(--red); border:1px solid #ffd5d5; }
.action-link { border:1px solid var(--line); background:#fbf7ee; border-radius:12px; padding:8px 10px; font-weight:850; font-size:12px; display:inline-flex; align-items:center; gap:6px; }
.action-link:hover { background:#111; color:#fff; }
.action-link.red:hover { background:var(--red); border-color:var(--red); }
.form-grid { display:grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap:14px; }
.form-grid-3 { display:grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap:14px; }
.full-span { grid-column:1/-1; }
.small-muted { color:var(--muted); font-size:12px; font-weight:700; }
.code-box { background:#111; color:#fff; border-radius:18px; padding:14px; font-size:12px; overflow:auto; }
.empty-state { padding:30px; text-align:center; color:var(--muted); }
@media(max-width:767px){ .form-grid, .form-grid-3 { grid-template-columns:1fr; } }

/* Vapi integration additions */
.transcript-box {
  background: #fbf7ee;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 18px;
  min-height: 320px;
  max-height: 620px;
  overflow: auto;
  white-space: pre-wrap;
  line-height: 1.8;
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
}
.sync-panel {
  background: #fffcf5;
  border: 1px dashed var(--line-2);
  border-radius: 20px;
  padding: 16px;
}
