:root {
  --primary: #e94560;
  --dark: #1a1a2e;
  --sidebar-w: 260px;
  --radius: 12px;
  --shadow: 0 2px 12px rgba(0,0,0,.07);
  --shadow-lg: 0 8px 30px rgba(0,0,0,.12);
  --border: #eef0f3;
  --text-muted: #6c757d;
  --bg: #f4f6fb;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', sans-serif; background: var(--bg); color: var(--dark); display: flex; min-height: 100vh; }

/* ===== SIDEBAR ===== */
.sidebar {
  width: var(--sidebar-w); background: var(--dark); color: #fff;
  display: flex; flex-direction: column;
  position: fixed; height: 100vh; overflow-y: auto; z-index: 200;
  transition: transform .25s ease;
}
.sidebar-top { padding: 20px 16px 0; }
.sidebar-logo { display: flex; align-items: center; gap: 10px; font-size: 1.1rem; font-weight: 800; color: #fff; margin-bottom: 16px; }
.sidebar-logo .logo-icon { font-size: 1.4rem; }

.restaurant-badge { display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,.07); border-radius: 10px; padding: 10px 12px; margin-bottom: 20px; }
.restaurant-avatar { width: 36px; height: 36px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1rem; color: #fff; flex-shrink: 0; }
.restaurant-name-nav { font-size: .85rem; font-weight: 700; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 140px; }
.restaurant-plan { font-size: .7rem; color: rgba(255,255,255,.45); margin-top: 2px; text-transform: uppercase; letter-spacing: .5px; }

.nav-section-label { font-size: .65rem; font-weight: 700; color: rgba(255,255,255,.3); text-transform: uppercase; letter-spacing: 1px; padding: 12px 20px 4px; }
.nav-links { list-style: none; }
.nav-links li a { display: flex; align-items: center; gap: 10px; padding: 10px 20px; color: rgba(255,255,255,.65); text-decoration: none; font-size: .875rem; font-weight: 500; transition: all .15s; border-left: 3px solid transparent; }
.nav-links li a:hover { color: #fff; background: rgba(255,255,255,.06); }
.nav-links li a.active { color: #fff; background: rgba(255,255,255,.1); border-left-color: var(--primary); }
.nav-icon { font-size: 1rem; width: 20px; text-align: center; }

.sidebar-bottom { margin-top: auto; padding: 16px; }
.sidebar-stats-mini { display: flex; gap: 8px; margin-bottom: 10px; }
.mini-stat { flex: 1; background: rgba(255,255,255,.07); border-radius: 8px; padding: 8px; text-align: center; }
.mini-num { display: block; font-size: 1.3rem; font-weight: 800; color: #fff; }
.mini-lbl { font-size: .65rem; color: rgba(255,255,255,.4); text-transform: uppercase; }
.logout-btn { display: block; padding: 10px; text-align: center; background: rgba(233,69,96,.15); color: rgba(255,255,255,.7); border-radius: 8px; text-decoration: none; font-size: .8rem; font-weight: 600; transition: all .2s; }
.logout-btn:hover { background: var(--primary); color: #fff; }

/* ===== MAIN ===== */
.main-content { margin-left: var(--sidebar-w); flex: 1; padding: 28px 32px; max-width: calc(100vw - var(--sidebar-w)); min-height: 100vh; }
.page-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.page-title { font-size: 1.5rem; font-weight: 800; }
.page-sub { color: var(--text-muted); font-size: .875rem; margin-top: 4px; }
.page-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ===== CARDS ===== */
.card { background: #fff; border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); margin-bottom: 20px; }
.card-title { font-size: .95rem; font-weight: 700; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; color: var(--dark); }
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }

/* ===== STATS ===== */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px,1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: #fff; border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.stat-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--primary); }
.stat-num { font-size: 2rem; font-weight: 800; color: var(--dark); line-height: 1; }
.stat-label { font-size: .78rem; color: var(--text-muted); margin-top: 6px; font-weight: 500; }
.stat-change { font-size: .75rem; margin-top: 8px; }
.stat-up { color: #28a745; }
.stat-down { color: #dc3545; }
.stat-icon { position: absolute; right: 16px; top: 16px; font-size: 1.8rem; opacity: .15; }

/* ===== TABS ===== */
.tabs { display: flex; gap: 4px; background: #f0f2f7; padding: 4px; border-radius: 10px; margin-bottom: 20px; width: fit-content; }
.tab { padding: 8px 18px; border-radius: 7px; cursor: pointer; font-size: .875rem; font-weight: 600; color: var(--text-muted); border: none; background: none; transition: all .15s; }
.tab.active { background: #fff; color: var(--dark); box-shadow: 0 1px 6px rgba(0,0,0,.1); }

/* ===== BUTTONS ===== */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 10px 20px; border-radius: 8px; font-weight: 600; font-size: .875rem; cursor: pointer; text-decoration: none; border: none; transition: all .15s; white-space: nowrap; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { filter: brightness(1.1); }
.btn-secondary { background: #f0f2f7; color: var(--dark); }
.btn-secondary:hover { background: #e4e7ef; }
.btn-success { background: #28a745; color: #fff; }
.btn-danger { background: #dc3545; color: #fff; }
.btn-outline { background: transparent; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-sm { padding: 6px 12px; font-size: .8rem; }
.btn-xs { padding: 4px 8px; font-size: .75rem; }
.btn-icon { padding: 8px; width: 36px; height: 36px; justify-content: center; }

/* ===== TABLE ===== */
.table-wrap { overflow-x: auto; border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: .875rem; }
th { background: #f8f9fc; padding: 11px 16px; text-align: left; font-weight: 700; font-size: .75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; border-bottom: 2px solid var(--border); white-space: nowrap; }
td { padding: 13px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #fafbff; }

/* ===== BADGES ===== */
.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 20px; font-size: .72rem; font-weight: 700; white-space: nowrap; }
.badge-green { background: #d4edda; color: #155724; }
.badge-red { background: #f8d7da; color: #721c24; }
.badge-yellow { background: #fff3cd; color: #856404; }
.badge-blue { background: #d1ecf1; color: #0c5460; }
.badge-gray { background: #f0f2f7; color: #5a6475; }
.badge-purple { background: #e8d5fb; color: #6f42c1; }
.badge-orange { background: #ffe5cc; color: #c05621; }

/* ===== FORMS ===== */
.form-group { margin-bottom: 16px; }
label { display: block; font-weight: 600; font-size: .82rem; margin-bottom: 6px; color: #374151; }
input, select, textarea { width: 100%; padding: 10px 14px; border: 1.5px solid var(--border); border-radius: 8px; font-size: .875rem; font-family: inherit; transition: border .15s; outline: none; background: #fff; color: var(--dark); }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(233,69,96,.1); }
input[type="color"] { height: 44px; cursor: pointer; padding: 4px 8px; }
input[type="checkbox"] { width: auto; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.form-hint { font-size: .75rem; color: var(--text-muted); margin-top: 4px; }
.input-prefix { display: flex; align-items: center; }
.input-prefix span { background: var(--border); padding: 10px 12px; border: 1.5px solid var(--border); border-right: none; border-radius: 8px 0 0 8px; font-size: .85rem; color: var(--text-muted); white-space: nowrap; }
.input-prefix input { border-radius: 0 8px 8px 0; }

.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: .875rem; display: flex; align-items: center; gap: 8px; }
.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.alert-info { background: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }

/* ===== AUTH ===== */
.auth-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: var(--dark); padding: 20px; }
.auth-card { background: #fff; border-radius: 16px; padding: 40px; width: 100%; max-width: 420px; box-shadow: var(--shadow-lg); }
.auth-logo { text-align: center; margin-bottom: 28px; }
.auth-logo h1 { font-size: 1.8rem; font-weight: 800; color: var(--dark); }
.auth-logo p { color: var(--text-muted); font-size: .9rem; margin-top: 4px; }

/* ===== WIDGET PAGE ===== */
.code-block { background: #1e2035; color: #a8daff; padding: 16px 20px; border-radius: 10px; font-family: 'Courier New', monospace; font-size: .8rem; overflow-x: auto; line-height: 1.6; position: relative; }
.copy-btn { position: absolute; top: 10px; right: 10px; padding: 4px 10px; background: rgba(255,255,255,.12); color: #fff; border: none; border-radius: 6px; cursor: pointer; font-size: .75rem; font-weight: 600; transition: background .2s; }
.copy-btn:hover { background: rgba(255,255,255,.25); }
.copy-btn.copied { background: #28a745; }

.link-box { display: flex; align-items: center; gap: 10px; background: #f8f9fc; border: 1.5px solid var(--border); border-radius: 10px; padding: 12px 16px; }
.link-box a { flex: 1; color: var(--primary); text-decoration: none; font-size: .9rem; font-weight: 600; word-break: break-all; }
.link-box .copy-link-btn { flex-shrink: 0; }

/* ===== BRANDING PREVIEW ===== */
.branding-preview { border: 2px dashed var(--border); border-radius: var(--radius); padding: 20px; text-align: center; margin-top: 12px; }
.color-swatch { width: 40px; height: 40px; border-radius: 8px; display: inline-block; border: 2px solid rgba(0,0,0,.1); }

/* ===== RESERVATIES TIMELINE ===== */
.rez-list { display: flex; flex-direction: column; gap: 10px; }
.rez-item { background: #fff; border-radius: var(--radius); padding: 14px 18px; box-shadow: var(--shadow); display: flex; align-items: center; gap: 14px; border-left: 4px solid var(--primary); transition: box-shadow .15s; }
.rez-item:hover { box-shadow: var(--shadow-lg); }
.rez-time { font-size: 1.1rem; font-weight: 800; min-width: 55px; color: var(--dark); }
.rez-info { flex: 1; min-width: 0; }
.rez-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rez-detail { font-size: .8rem; color: var(--text-muted); margin-top: 2px; }
.rez-actions { display: flex; gap: 6px; flex-shrink: 0; }

/* ===== GASTEN ===== */
.guest-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .9rem; flex-shrink: 0; }

/* ===== QUICK ACTIONS ===== */
.quick-walkin { background: linear-gradient(135deg, var(--primary), #ff6b8a); color: #fff; border-radius: var(--radius); padding: 20px 24px; margin-bottom: 24px; display: flex; align-items: center; justify-content: space-between; }
.quick-walkin h2 { font-size: 1.1rem; font-weight: 800; margin-bottom: 2px; }
.quick-walkin p { opacity: .85; font-size: .85rem; }

/* ===== EMPTY STATE ===== */
.empty-state { text-align: center; padding: 48px 20px; color: var(--text-muted); }
.empty-state .empty-icon { font-size: 3rem; margin-bottom: 12px; opacity: .5; }
.empty-state p { font-size: .95rem; }

/* ===== SEARCH BAR ===== */
.search-bar { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.search-input { flex: 1; min-width: 200px; }
.search-input input { padding: 9px 14px 9px 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%236c757d' viewBox='0 0 24 24'%3E%3Cpath d='M21 21l-4.35-4.35m0 0A7.5 7.5 0 1 0 6.5 6.5a7.5 7.5 0 0 0 10.15 10.15z' stroke='%236c757d' stroke-width='2' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: 10px center; background-size: 16px; }

/* ===== BOOKING WIDGET (publiek) ===== */
.rmtable-widget { font-family: 'Inter', sans-serif; max-width: 480px; background: #fff; border-radius: 16px; padding: 28px; box-shadow: var(--shadow-lg); }

/* ===== MOBILE HEADER ===== */
.mobile-header { display: none; position: fixed; top: 0; left: 0; right: 0; z-index: 150; background: var(--dark); padding: 12px 16px; align-items: center; gap: 12px; }
.hamburger { background: none; border: none; cursor: pointer; display: flex; flex-direction: column; gap: 4px; padding: 4px; }
.hamburger span { display: block; width: 22px; height: 2px; background: #fff; border-radius: 2px; transition: all .2s; }
.mobile-logo { flex: 1; font-weight: 800; color: #fff; font-size: 1rem; }
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 190; }

/* ===== MODAL ===== */
.modal-backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 300; align-items: center; justify-content: center; padding: 20px; }
.modal-backdrop.show { display: flex; }
.modal { background: #fff; border-radius: 16px; padding: 28px; max-width: 500px; width: 100%; max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-lg); position: relative; }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.modal-title { font-size: 1.1rem; font-weight: 800; }
.modal-close { background: none; border: none; font-size: 1.4rem; cursor: pointer; color: var(--text-muted); padding: 0; line-height: 1; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .mobile-header { display: flex; }
  .sidebar { transform: translateX(-100%); top: 0; }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay.show { display: block; }
  .main-content { margin-left: 0; padding: 80px 16px 20px; max-width: 100vw; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .page-header { flex-direction: column; }
  .quick-walkin { flex-direction: column; gap: 12px; text-align: center; }
  table { font-size: .8rem; }
  td, th { padding: 10px 10px; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
}
