:root {
  --sidebar-w: 240px;
  --sidebar-bg: #1e293b;
  --sidebar-fg: #cbd5e1;
  --sidebar-active: #3b82f6;
  --topbar-h: 60px;
  --content-bg: #f8fafc;
}

* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: var(--content-bg); }

.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w); background: var(--sidebar-bg); color: var(--sidebar-fg);
  display: flex; flex-direction: column; z-index: 100;
}
.sidebar-brand {
  padding: 1.25rem 1.25rem; font-size: 1.4rem; font-weight: 600; color: white;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.sidebar-brand i { margin-right: .5rem; color: var(--sidebar-active); }
.sidebar-nav { list-style: none; padding: 1rem 0; margin: 0; }
.sidebar-nav li a {
  display: flex; align-items: center; padding: .65rem 1.25rem; color: var(--sidebar-fg);
  text-decoration: none; transition: background .15s, color .15s;
}
.sidebar-nav li a i { margin-right: .75rem; width: 18px; }
.sidebar-nav li a:hover { background: rgba(255,255,255,0.05); color: white; }
.sidebar-nav li a.active { background: var(--sidebar-active); color: white; }

.main-wrap { margin-left: var(--sidebar-w); min-height: 100vh; }
.topbar {
  height: var(--topbar-h); background: white; border-bottom: 1px solid #e2e8f0;
  display: flex; align-items: center; justify-content: space-between; padding: 0 1.5rem;
  position: sticky; top: 0; z-index: 50;
}
.topbar-title { font-size: 1.15rem; font-weight: 600; color: #334155; }
.content { min-height: calc(100vh - var(--topbar-h)); }

/* Stat cards */
.stat-card { border: none; border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.stat-card .stat-num { font-size: 2rem; font-weight: 700; }
.stat-card .stat-label { color: #64748b; font-size: .875rem; }

/* Status pills */
.status-pill { font-size: .75rem; padding: .25em .6em; border-radius: 50rem; font-weight: 500; }
.status-active { background: #dcfce7; color: #166534; }
.status-pending { background: #fef3c7; color: #92400e; }
.status-disabled, .status-paused, .status-terminated { background: #fee2e2; color: #991b1b; }
.status-inactive { background: #e2e8f0; color: #475569; }

.role-god { background: #fce7f3; color: #9d174d; }
.role-orgadmin { background: #dbeafe; color: #1e40af; }
.role-user { background: #f1f5f9; color: #475569; }

tr.row-pending { background: #fffbeb !important; }

/* Login */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #1e3a8a, #3b82f6);
}
.login-card {
  background: white; padding: 2.5rem; border-radius: 12px; width: 100%; max-width: 400px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

/* Schedule preview grid */
.schedule-grid { display: grid; grid-template-columns: 80px repeat(24, 1fr); gap: 2px; font-size: .7rem; }
.schedule-grid .day-label { font-weight: 600; padding: .25rem; }
.schedule-grid .hour { background: #e2e8f0; height: 24px; }
.schedule-grid .hour.attended { background: #3b82f6; }

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); transition: transform .2s; }
  .sidebar.open { transform: translateX(0); }
  .main-wrap { margin-left: 0; }
}
