/* ==========================================================================
   NEXUS ADMIN SUITE - STYLESHEET
   Full-featured, responsive SaaS Dashboard
   ========================================================================== */

:root {
  --bg-app: #080c14;
  --bg-sidebar: #0d1322;
  --bg-card: #111827;
  --bg-card-hover: #172136;
  --bg-input: #141c2e;
  --bg-topbar: rgba(13, 19, 34, 0.85);

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(6, 182, 212, 0.5);

  --accent-cyan: #06b6d4;
  --accent-blue: #3b82f6;
  --accent-purple: #8b5cf6;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] {
  --bg-app: #f8fafc;
  --bg-sidebar: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --bg-input: #f8fafc;
  --bg-topbar: rgba(255, 255, 255, 0.9);

  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #94a3b8;

  --border-color: rgba(0, 0, 0, 0.08);
  --border-focus: rgba(6, 182, 212, 0.6);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-app);
  color: var(--text-main);
  height: 100vh;
  overflow: hidden;
}

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

/* Layout Grid */
.admin-layout {
  display: flex;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

/* Left Sidebar */
.admin-sidebar {
  width: 260px;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  z-index: 20;
  transition: transform 0.3s ease;
}

.sidebar-brand {
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border-color);
}

.brand-logo {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
}

.brand-info {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.brand-name span {
  color: var(--accent-cyan);
}

.brand-badge {
  font-size: 0.65rem;
  color: var(--accent-cyan);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sidebar-nav {
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
  flex-grow: 1;
}

.nav-group-title {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-dim);
  padding: 12px 10px 4px;
  letter-spacing: 0.08em;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 500;
  transition: var(--transition);
}

.nav-link:hover {
  background-color: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
}

.nav-link.active {
  background-color: rgba(6, 182, 212, 0.12);
  color: var(--accent-cyan);
  font-weight: 600;
}

.pill-count {
  margin-left: auto;
  font-size: 0.72rem;
  background: rgba(6, 182, 212, 0.18);
  color: var(--accent-cyan);
  padding: 1px 7px;
  border-radius: var(--radius-full);
  font-weight: 700;
}

/* Sidebar User Footer */
.sidebar-user {
  padding: 14px 16px;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 12px;
  background-color: rgba(0, 0, 0, 0.1);
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-cyan));
  color: #fff;
  font-weight: 700;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-details {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  overflow: hidden;
}

.user-name {
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  font-size: 0.72rem;
  color: var(--text-dim);
}

.online-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
}

/* Main Workspace */
.admin-main {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  background-color: var(--bg-app);
}

/* Topbar */
.admin-topbar {
  height: 64px;
  background-color: var(--bg-topbar);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  z-index: 10;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  flex-direction: column;
  gap: 4px;
}

.mobile-toggle span {
  width: 20px;
  height: 2px;
  background: var(--text-main);
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
}

.crumb-root {
  color: var(--text-dim);
}

.crumb-separator {
  color: var(--text-dim);
}

.crumb-current {
  color: var(--text-main);
  font-weight: 700;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.topbar-search {
  position: relative;
  display: flex;
  align-items: center;
  width: 240px;
}

.topbar-search svg {
  position: absolute;
  left: 10px;
  color: var(--text-dim);
}

.topbar-search input {
  width: 100%;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 6px 12px 6px 32px;
  font-size: 0.8rem;
  color: var(--text-main);
  outline: none;
  transition: var(--transition);
}

.topbar-search input:focus {
  border-color: var(--accent-cyan);
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: var(--transition);
}

.icon-btn:hover {
  border-color: var(--accent-cyan);
}

.notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--accent-rose);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Notification Menu Dropdown */
.notification-wrapper {
  position: relative;
}

.notif-menu {
  position: absolute;
  top: 48px;
  right: 0;
  width: 320px;
  background: var(--bg-sidebar);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  display: none;
  flex-direction: column;
  z-index: 50;
  overflow: hidden;
}

.notif-menu.open {
  display: flex;
}

.notif-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

.clear-notifs-btn {
  background: none;
  border: none;
  color: var(--accent-cyan);
  font-size: 0.75rem;
  cursor: pointer;
}

.notif-list {
  max-height: 280px;
  overflow-y: auto;
}

.notif-item {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 0.8rem;
  transition: var(--transition);
}

.notif-item:hover {
  background-color: rgba(255, 255, 255, 0.03);
}

.notif-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.75rem;
}

.notif-icon.green { background: rgba(16, 185, 129, 0.15); color: var(--accent-emerald); }
.notif-icon.blue { background: rgba(59, 130, 246, 0.15); color: var(--accent-blue); }
.notif-icon.orange { background: rgba(245, 158, 11, 0.15); color: var(--accent-amber); }

[data-theme="dark"] .sun-icon { display: block; }
[data-theme="dark"] .moon-icon { display: none; }
[data-theme="light"] .sun-icon { display: none; }
[data-theme="light"] .moon-icon { display: block; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 0.84rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  color: #fff;
  box-shadow: 0 2px 10px rgba(6, 182, 212, 0.3);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(6, 182, 212, 0.45);
}

.btn-outline {
  background: transparent;
  border-color: var(--border-color);
  color: var(--text-main);
}
.btn-outline:hover {
  border-color: var(--accent-cyan);
}

.btn-danger {
  background: rgba(244, 63, 94, 0.15);
  color: var(--accent-rose);
  border-color: rgba(244, 63, 94, 0.3);
}
.btn-danger:hover {
  background: var(--accent-rose);
  color: #fff;
}

.btn-sm {
  padding: 4px 10px;
  font-size: 0.75rem;
}

/* Scrollable Admin Content Area */
.admin-content {
  flex-grow: 1;
  overflow-y: auto;
  padding: 24px;
}

.content-section {
  display: none;
  max-width: 1300px;
  margin: 0 auto;
}

.content-section.active {
  display: block;
}

/* KPI Cards Grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 24px;
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  transition: var(--transition);
}

.kpi-card:hover {
  border-color: rgba(6, 182, 212, 0.3);
  transform: translateY(-2px);
}

.kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.kpi-label {
  font-size: 0.78rem;
  color: var(--text-dim);
  font-weight: 600;
}

.kpi-pill {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
}

.kpi-pill.positive {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
}

.kpi-pill.neutral {
  background: rgba(6, 182, 212, 0.15);
  color: var(--accent-cyan);
}

.kpi-value {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

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

/* Charts Grid */
.charts-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 22px;
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 18px;
}

.chart-title {
  font-size: 1rem;
  font-weight: 700;
}

.chart-desc {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: 2px;
}

.chart-controls {
  display: flex;
  gap: 4px;
  background: var(--bg-input);
  padding: 3px;
  border-radius: var(--radius-sm);
}

.chart-pill {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
}

.chart-pill.active {
  background: var(--accent-cyan);
  color: #fff;
}

.chart-canvas-wrap {
  width: 100%;
  height: 200px;
  position: relative;
}

#trafficCanvas {
  width: 100%;
  height: 100%;
}

/* Circular Doughnut Chart */
.doughnut-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.doughnut-graphic {
  position: relative;
  width: 130px;
  height: 130px;
}

.circular-chart {
  display: block;
  width: 100%;
  height: 100%;
}

.circle-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.05);
  stroke-width: 3.8;
}

.circle-segment {
  fill: none;
  stroke-width: 3.8;
  stroke-linecap: round;
}

.circle-segment.cyan { stroke: var(--accent-cyan); }
.circle-segment.purple { stroke: var(--accent-purple); }
.circle-segment.orange { stroke: var(--accent-amber); }

.doughnut-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.doughnut-center strong {
  display: block;
  font-size: 1.1rem;
  font-weight: 800;
}

.doughnut-center span {
  font-size: 0.68rem;
  color: var(--text-dim);
}

.chart-legend {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.legend-item .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.dot.cyan { background-color: var(--accent-cyan); }
.dot.purple { background-color: var(--accent-purple); }
.dot.orange { background-color: var(--accent-amber); }

/* Table Section */
.table-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 22px;
}

.table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 20px;
}

.table-title {
  font-size: 1rem;
  font-weight: 700;
}

.table-desc {
  font-size: 0.78rem;
  color: var(--text-dim);
}

.table-filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-input, .filter-select {
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  outline: none;
}

.filter-input {
  width: 220px;
}

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

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.data-table th, .data-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.data-table th {
  color: var(--text-dim);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.data-table tr:hover {
  background-color: rgba(255, 255, 255, 0.02);
}

.user-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cell-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-cyan);
}

.cell-info strong {
  display: block;
  font-size: 0.86rem;
}

.cell-info span {
  font-size: 0.72rem;
  color: var(--text-dim);
}

/* Status & Role Badges */
.badge-role {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
}

.badge-role.superadmin { background: rgba(6, 182, 212, 0.15); color: var(--accent-cyan); }
.badge-role.engineer { background: rgba(139, 92, 246, 0.15); color: var(--accent-purple); }
.badge-role.support { background: rgba(245, 158, 11, 0.15); color: var(--accent-amber); }
.badge-role.viewer { background: rgba(16, 185, 129, 0.15); color: var(--accent-emerald); }

.status-pill {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.status-pill.active { background: rgba(16, 185, 129, 0.15); color: var(--accent-emerald); }
.status-pill.pending { background: rgba(245, 158, 11, 0.15); color: var(--accent-amber); }
.status-pill.suspended { background: rgba(244, 63, 94, 0.15); color: var(--accent-rose); }

.action-btn-cell {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.table-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  font-size: 0.78rem;
  color: var(--text-dim);
}

.table-pagination-controls {
  display: flex;
  gap: 4px;
}

.pg-btn {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
  cursor: pointer;
}

.pg-btn.active {
  background: var(--accent-cyan);
  color: #fff;
  border-color: var(--accent-cyan);
}

/* Roles Grid */
.page-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.roles-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.role-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
}

.role-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 14px;
}

.role-badge.cyan { background: rgba(6, 182, 212, 0.15); color: var(--accent-cyan); }
.role-badge.purple { background: rgba(139, 92, 246, 0.15); color: var(--accent-purple); }
.role-badge.orange { background: rgba(245, 158, 11, 0.15); color: var(--accent-amber); }
.role-badge.green { background: rgba(16, 185, 129, 0.15); color: var(--accent-emerald); }

.role-card h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.role-card p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 18px;
}

.role-stat {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-dim);
  border-top: 1px solid var(--border-color);
  padding-top: 12px;
}

/* API Tokens Section */
.api-keys-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.key-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.key-name {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.key-val-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.key-val-row code {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  background: var(--bg-input);
  padding: 2px 8px;
  border-radius: 4px;
  color: var(--accent-cyan);
}

.key-meta {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.key-actions {
  display: flex;
  gap: 8px;
}

/* Audit Feed */
.audit-feed {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.audit-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-color);
}
.audit-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.audit-bullet {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 6px;
  flex-shrink: 0;
}

.audit-bullet.cyan { background-color: var(--accent-cyan); }
.audit-bullet.green { background-color: var(--accent-emerald); }
.audit-bullet.purple { background-color: var(--accent-purple); }
.audit-bullet.orange { background-color: var(--accent-amber); }

.audit-title {
  font-size: 0.85rem;
  color: var(--text-main);
}

.audit-title code {
  font-family: var(--font-mono);
  background: var(--bg-input);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.78rem;
  color: var(--accent-cyan);
}

.audit-meta {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 2px;
}

/* Modal Dialog */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-backdrop.open {
  display: flex;
}

.modal-dialog {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 460px;
  padding: 24px;
  box-shadow: var(--shadow-md);
  animation: modalPop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.modal-header h3 {
  font-size: 1.15rem;
  font-weight: 800;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--text-dim);
  cursor: pointer;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-muted);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group select {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  outline: none;
}

.form-group input:focus, .form-group select:focus {
  border-color: var(--accent-cyan);
}

.checkbox-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.checkbox-group label {
  margin-bottom: 0;
  font-size: 0.8rem;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}

/* Toast Container */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--bg-sidebar);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 12px 18px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  font-size: 0.84rem;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideToast 0.3s ease;
}

.toast.success { border-left: 4px solid var(--accent-emerald); }
.toast.info { border-left: 4px solid var(--accent-cyan); }
.toast.danger { border-left: 4px solid var(--accent-rose); }

@keyframes slideToast {
  from { transform: translateX(50px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Responsive */
@media (max-width: 1100px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .charts-grid { grid-template-columns: 1fr; }
  .roles-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .admin-sidebar {
    position: fixed;
    height: 100%;
    transform: translateX(-100%);
  }
  .admin-sidebar.open {
    transform: translateX(0);
  }
  .mobile-toggle {
    display: flex;
  }
  .kpi-grid { grid-template-columns: 1fr; }
  .roles-grid { grid-template-columns: 1fr; }
  .topbar-search { display: none; }
}
