:root {
  --bg: #f4f6fb;
  --sidebar-bg: #1a1f36;
  --sidebar-hover: #2d3454;
  --topbar-bg: #fff;
  --card-bg: #fff;
  --border: #e5e7eb;
  --text: #1a1f36;
  --text-muted: #6b7280;
}
[data-theme="dark"] {
  --bg: #0f1117;
  --sidebar-bg: #0d1117;
  --sidebar-hover: #1f2937;
  --topbar-bg: #161b22;
  --card-bg: #161b22;
  --border: #30363d;
  --text: #e6edf3;
  --text-muted: #8b949e;
}
body { background: var(--bg); font-family: 'Segoe UI', sans-serif; color: var(--text); transition: background 0.3s; }
.sidebar {
  width: 250px; height: 100vh; background: var(--sidebar-bg);
  position: fixed; top: 0; left: 0; z-index: 100;
  padding-top: 1rem; overflow-y: auto; transition: background 0.3s, transform 0.3s ease;
}
.sidebar .brand {
  color: #fff; font-size: 1.2rem; font-weight: 700;
  padding: 1rem 1.5rem 1.5rem; border-bottom: 1px solid #2d3454;
  display: flex; align-items: center; gap: 10px;
}
.sidebar .nav-section {
  font-size: 13px; color: #dde1f7; text-transform: uppercase; font-weight: 800;
  letter-spacing: 0.05em; padding: 0.85rem 1.1rem; margin-top: 0.35rem;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex; align-items: center; gap: 11px;
  cursor: pointer; user-select: none; transition: color 0.15s, background 0.15s;
}
.sidebar .nav-section:first-of-type { border-top: none; margin-top: 0; }
.sidebar .nav-section span { flex: 1; }
.sidebar .nav-section:hover { color: #fff; background: rgba(255,255,255,0.04); }
.sidebar .nav-section .section-icon {
  width: 26px; height: 26px; border-radius: 8px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; transition: transform 0.15s;
}
.sidebar .nav-section:hover .section-icon { transform: scale(1.08); }
.sidebar .nav-section .icon-main { background: rgba(99,102,241,0.22); color: #a5b4fc; }
.sidebar .nav-section .icon-platform { background: rgba(14,165,233,0.22); color: #7dd3fc; }
.sidebar .nav-section .icon-hotel { background: rgba(37,99,235,0.22); color: #93c5fd; }
.sidebar .nav-section .icon-restaurant { background: rgba(249,115,22,0.22); color: #fdba74; }
.sidebar .nav-section .icon-spa { background: rgba(20,184,166,0.22); color: #5eead4; }
.sidebar .nav-section .icon-finance { background: rgba(16,185,129,0.22); color: #6ee7b7; }
.sidebar .nav-section .icon-account { background: rgba(148,163,184,0.22); color: #cbd5e1; }
.sidebar .nav-section .toggle-icon { font-size: 14px; color: #9099c9; transition: transform 0.2s, color 0.15s; }
.sidebar .nav-section:hover .toggle-icon { color: #fff; }
.sidebar .nav-section.collapsed .toggle-icon { transform: rotate(-90deg); }
.sidebar .nav-group { overflow: hidden; transition: max-height 0.3s ease; padding: 0.15rem 0.65rem 0.35rem; }
.sidebar .nav-group.collapsed { max-height: 0 !important; padding-top: 0; padding-bottom: 0; }
.sidebar .nav-link {
  color: #9ca3af; padding: 0.5rem 0.75rem; margin: 1px 0;
  display: flex; align-items: center; gap: 10px;
  font-size: 14px; font-weight: 500; border-radius: 8px; transition: all 0.15s;
  text-decoration: none;
}
.sidebar .nav-link:hover { color: #fff; background: var(--sidebar-hover); }
.sidebar .nav-link.active {
  color: #fff; background: #4f46e5;
  box-shadow: 0 2px 10px rgba(79,70,229,0.4);
}
.sidebar .nav-link i { font-size: 16px; width: 20px; text-align: center; }
.topbar {
  margin-left: 250px; background: var(--topbar-bg);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 99; transition: background 0.3s;
}
.main-content { margin-left: 250px; padding: 2rem 1.5rem; }
.stat-card {
  background: var(--card-bg); border-radius: 12px;
  border: 1px solid var(--border); padding: 1.25rem;
}
.stat-card .stat-icon {
  width: 44px; height: 44px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.stat-card .stat-value { font-size: 26px; font-weight: 700; color: var(--text); }
.stat-card .stat-label { font-size: 13px; color: var(--text-muted); }
.card { border: 1px solid var(--border); border-radius: 12px; background: var(--card-bg); }
.card-header { background: var(--card-bg); border-bottom: 1px solid var(--border); font-weight: 600; }
.table { color: var(--text); }
.theme-toggle { cursor: pointer; background: none; border: 1px solid var(--border);
  border-radius: 8px; padding: 4px 10px; color: var(--text); font-size: 14px; }
.lang-switch-anon {
  position: fixed; top: 16px; right: 16px; z-index: 1050;
  display: flex; gap: 2px; background: var(--card-bg);
  border: 1px solid var(--border); border-radius: 8px; padding: 2px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.lang-switch-anon form { margin: 0; }
.lang-switch-anon button {
  border: none; background: transparent; color: var(--text-muted);
  font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: 6px;
  cursor: pointer; transition: all 0.15s;
}
.lang-switch-anon button.active { background: #4f46e5; color: white; }
.notif-btn { position: relative; cursor: pointer; background: none;
  border: 1px solid var(--border); border-radius: 8px; padding: 4px 10px;
  color: var(--text); font-size: 14px; }
.notif-badge { position: absolute; top: -5px; right: -5px; background: #dc2626;
  color: white; border-radius: 50%; width: 16px; height: 16px;
  font-size: 10px; display: flex; align-items: center; justify-content: center; }
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 99;
}
.sidebar-overlay.active { display: block; }
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-250px);
    z-index: 200;
  }
  .sidebar.mobile-open {
    transform: translateX(0);
  }
  .topbar, .main-content { margin-left: 0; }
}
