/*
 * ShiftConnect Application Styles
 *


 */

/* ============================================
   CSS Custom Properties (Design Tokens)
   ============================================ */
:root {
  /* Colors - Light Mode */
  --primary: #3B82F6;
  --primary-hover: #2563EB;
  --primary-light: rgba(59, 130, 246, 0.1);

  --success: #10B981;
  --success-light: rgba(16, 185, 129, 0.1);
  --warning: #F97316;
  --warning-light: rgba(249, 115, 22, 0.1);
  --danger: #EF4444;
  --danger-light: rgba(239, 68, 68, 0.1);

  /* Shift type colors */
  --shift-vroeg: #10B981;
  --shift-vroeg-light: rgba(16, 185, 129, 0.1);
  --shift-dag: #3B82F6;
  --shift-dag-light: rgba(59, 130, 246, 0.1);
  --shift-laat: #F97316;
  --shift-laat-light: rgba(249, 115, 22, 0.1);
  --shift-nacht: #EC4899;
  --shift-nacht-light: rgba(236, 72, 153, 0.1);

  /* Backgrounds */
  --bg: #F8FAFC;
  --surface: #FFFFFF;
  --surface-hover: #F1F5F9;

  /* Text */
  --text: #1E293B;
  --text-secondary: #64748B;
  --text-muted: #94A3B8;

  /* Borders */
  --border: #E2E8F0;
  --border-hover: #CBD5E1;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

  /* Layout */
  --sidebar-width: 260px;
  --header-height: 56px;
  --radius: 8px;
  --radius-lg: 12px;

  /* Font */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Tenant colors */
  --tenant-blue: #3B82F6;
  --tenant-green: #10B981;
  --tenant-red: #EF4444;
  --tenant-orange: #F97316;
  --tenant-purple: #8B5CF6;
  --tenant-teal: #14B8A6;
  --tenant-pink: #EC4899;
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0F172A;
    --surface: #1E293B;
    --surface-hover: #334155;
    --text: #F1F5F9;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;
    --border: #334155;
    --border-hover: #475569;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
  }
}

/* ============================================
   Reset & Base
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

[hidden] {
  display: none !important;
}

/* ============================================
   App Layout
   ============================================ */
.app-body {
  min-height: 100vh;
}

.app-layout {
  display: flex;
  min-height: 100vh;
}

/* ============================================
   Sidebar
   ============================================ */
.sidebar {
  width: var(--sidebar-width);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 50;
  overflow-y: auto;
}

.sidebar-header {
  padding: 20px 16px;
  border-bottom: 1px solid var(--border);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-logo-text {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.sidebar-nav {
  flex: 1;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.15s ease;
}

.nav-link:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.nav-link.active {
  background: var(--primary-light);
  color: var(--primary);
}

.nav-link.active .nav-icon {
  color: var(--primary);
}

.nav-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.nav-link-logout {
  color: var(--danger);
}

.nav-link-logout:hover {
  background: var(--danger-light);
  color: var(--danger);
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 12px 8px;
  border-top: 1px solid var(--border);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  margin-bottom: 4px;
}

.sidebar-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
}

.sidebar-user-info {
  flex: 1;
  min-width: 0;
}

.sidebar-user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-role {
  font-size: 11px;
  color: var(--text-muted);
}


/* ============================================
   Main Wrapper
   ============================================ */
.main-wrapper {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ============================================
   Top Header
   ============================================ */
.top-header {
  height: var(--header-height);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 40;
}

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

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-user-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

/* ============================================
   Tenant Switcher
   ============================================ */
.tenant-switcher {
  position: relative;
}

.btn-ghost {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: all 0.15s ease;
}

.btn-ghost:hover {
  border-color: var(--border-hover);
  background: var(--surface-hover);
}

.tenant-color-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.tenant-color-blue { background: var(--tenant-blue); }
.tenant-color-green { background: var(--tenant-green); }
.tenant-color-red { background: var(--tenant-red); }
.tenant-color-orange { background: var(--tenant-orange); }
.tenant-color-purple { background: var(--tenant-purple); }
.tenant-color-teal { background: var(--tenant-teal); }
.tenant-color-pink { background: var(--tenant-pink); }

.tenant-switcher-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 200px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  list-style: none;
  padding: 4px;
  z-index: 100;
}

.tenant-switcher-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  transition: all 0.15s ease;
}

.tenant-switcher-item:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.tenant-switcher-item.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 500;
}

/* ============================================
   Toast Notifications
   ============================================ */
.toast-container {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 400px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  animation: toast-enter 0.3s ease;
  font-size: 13px;
}

.toast-success {
  background: var(--success-light);
  border: 1px solid var(--success);
  color: var(--success);
}

.toast-error {
  background: var(--danger-light);
  border: 1px solid var(--danger);
  color: var(--danger);
}

.toast-warning {
  background: var(--warning-light);
  border: 1px solid var(--warning);
  color: var(--warning);
}

.toast-message {
  flex: 1;
}

.toast-dismiss {
  font-size: 18px;
  line-height: 1;
  opacity: 0.7;
  color: inherit;
}

.toast-dismiss:hover {
  opacity: 1;
}

.toast-exit {
  animation: toast-exit 0.3s ease forwards;
}

@keyframes toast-enter {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes toast-exit {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(20px);
  }
}

/* ============================================
   Main Content
   ============================================ */
.main-content {
  flex: 1;
  padding: 28px 32px;
}

/* ============================================
   Page Structure
   ============================================ */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
}

.page-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.page-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ============================================
   Buttons
   ============================================ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  transition: all 0.15s ease;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-success {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  background: var(--success);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  transition: all 0.15s ease;
}

.btn-success:hover {
  opacity: 0.9;
}

.btn-danger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  background: var(--danger);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  transition: all 0.15s ease;
}

.btn-danger:hover {
  opacity: 0.9;
}

.btn-confirm-warning {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  background: var(--warning);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  transition: all 0.15s ease;
}

.btn-confirm-warning:hover {
  opacity: 0.9;
}

.btn-sm {
  padding: 6px 10px;
  font-size: 12px;
}

/* ============================================
   Metric Cards
   ============================================ */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.metric-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: all 0.15s ease;
}

.metric-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow);
}

.metric-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.metric-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.metric-detail {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* ============================================
   Customer Setup Guide
   ============================================ */
.setup-dashboard-card,
.setup-hero,
.setup-step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.setup-dashboard-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px;
  margin-bottom: 28px;
}

.setup-dashboard-label,
.setup-eyebrow,
.setup-step-meta {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.setup-dashboard-label,
.setup-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.setup-dashboard-content h2,
.setup-hero h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.setup-dashboard-content p,
.setup-hero p,
.setup-step-body p {
  color: var(--text-secondary);
  font-size: 13px;
}

.setup-dashboard-content p,
.setup-hero p {
  margin-top: 4px;
}

.setup-dashboard-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.setup-dashboard-progress,
.setup-progress-ring {
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--primary) var(--setup-progress), var(--surface-hover) 0);
  color: var(--text);
  font-weight: 700;
  position: relative;
}

.setup-dashboard-progress::before,
.setup-progress-ring::before {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: var(--surface);
}

.setup-dashboard-progress span,
.setup-progress-value {
  position: relative;
  z-index: 1;
}

.setup-dashboard-progress {
  width: 48px;
  height: 48px;
  font-size: 12px;
}

.setup-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px;
  margin-bottom: 20px;
}

.setup-hero-main {
  max-width: 720px;
}

.setup-progress-ring {
  width: 88px;
  height: 88px;
  font-size: 18px;
  flex-shrink: 0;
}

.setup-progress-ring::before {
  inset: 7px;
}

.setup-steps {
  display: grid;
  gap: 12px;
}

.setup-step {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 18px;
}

.setup-step.is-next {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.setup-step-marker {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-hover);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.setup-step.is-complete .setup-step-marker {
  background: var(--success-light);
  color: var(--success);
}

.setup-step-topline {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.setup-step-topline h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.setup-step-status {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.setup-step-status.is-done {
  background: var(--success-light);
  color: var(--success);
}

.setup-step-status.is-open {
  background: var(--warning-light);
  color: var(--warning);
}

.setup-step-meta {
  margin-top: 8px;
}

.setup-step-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 140px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  transition: all 0.15s ease;
}

.setup-step-action:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--primary-light);
}

/* ============================================
   Weekly Overview
   ============================================ */
.weekly-overview {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 28px;
}

.weekly-overview-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
}

.weekly-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

.day-column {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.day-header {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: center;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}

.day-date {
  font-size: 10px;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 4px;
}

.shift-pill {
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shift-pill-vroeg {
  background: var(--shift-vroeg-light);
  color: var(--shift-vroeg);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.shift-pill-dag {
  background: var(--shift-dag-light);
  color: var(--shift-dag);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.shift-pill-laat {
  background: var(--shift-laat-light);
  color: var(--shift-laat);
  border: 1px solid rgba(249, 115, 22, 0.2);
}

.shift-pill-nacht {
  background: var(--shift-nacht-light);
  color: var(--shift-nacht);
  border: 1px solid rgba(236, 72, 153, 0.2);
}

.shift-type-color-green {
  background: var(--success-light);
  color: var(--success);
  border-color: rgba(16, 185, 129, 0.2);
}

.shift-type-color-blue {
  background: var(--primary-light);
  color: var(--primary);
  border-color: rgba(59, 130, 246, 0.2);
}

.shift-type-color-orange {
  background: var(--warning-light);
  color: var(--warning);
  border-color: rgba(249, 115, 22, 0.2);
}

.shift-type-color-pink {
  background: var(--shift-nacht-light);
  color: var(--shift-nacht);
  border-color: rgba(236, 72, 153, 0.2);
}

.shift-type-color-purple {
  background: rgba(139, 92, 246, 0.1);
  color: var(--tenant-purple);
  border-color: rgba(139, 92, 246, 0.2);
}

.shift-type-color-teal {
  background: rgba(20, 184, 166, 0.1);
  color: var(--tenant-teal);
  border-color: rgba(20, 184, 166, 0.2);
}

.shift-type-color-red {
  background: var(--danger-light);
  color: var(--danger);
  border-color: rgba(239, 68, 68, 0.2);
}

/* ============================================
   Shift Calendar
   ============================================ */
.calendar-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.calendar-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.calendar-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}

.calendar-count {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 2px;
}

.calendar-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.calendar-nav-button,
.calendar-today-button {
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  border-radius: var(--radius);
  transition: all 0.15s ease;
}

.calendar-nav-button {
  width: 34px;
}

.calendar-today-button {
  padding: 0 12px;
  font-size: 12px;
  font-weight: 600;
}

.calendar-nav-button:hover,
.calendar-today-button:hover {
  border-color: var(--border-hover);
  color: var(--text);
  background: var(--surface-hover);
}

.shift-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-weekday {
  padding: 10px 12px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}

.calendar-weekday:nth-child(7) {
  border-right: none;
}

.calendar-day {
  min-height: 180px;
  padding: 10px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.calendar-day:nth-child(7n) {
  border-right: none;
}

.calendar-day:nth-last-child(-n + 7) {
  border-bottom: none;
}

.calendar-day-muted {
  background: rgba(148, 163, 184, 0.05);
}

.calendar-day-today {
  box-shadow: inset 0 0 0 1px var(--primary);
}

.calendar-day-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 24px;
  margin-bottom: 8px;
}

.calendar-day-label {
  display: flex;
  align-items: center;
  gap: 6px;
}

.calendar-day-name {
  display: none;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}

.calendar-day-number {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
}

.calendar-day-today .calendar-day-number {
  background: var(--primary);
  color: white;
}

.calendar-day-count {
  min-width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--surface-hover);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
}

.calendar-day-shifts {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.calendar-shift-card {
  border: 1px solid var(--border);
  border-left-width: 3px;
  border-radius: var(--radius);
  background: var(--surface);
  padding: 9px;
  box-shadow: var(--shadow-sm);
}

.calendar-shift-card-approved {
  border-left-color: var(--success);
}

.calendar-shift-card-available {
  border-left-color: var(--primary);
}

.calendar-shift-card-pending {
  border-left-color: var(--warning);
}

.calendar-shift-card-rejected {
  border-left-color: var(--danger);
}

.calendar-shift-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.calendar-shift-card-header .badge {
  flex-shrink: 0;
}

.calendar-shift-card-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.calendar-shift-main {
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.calendar-shift-meta {
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.35;
}

.calendar-shift-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  margin-top: 8px;
}

.shift-card-action-form {
  display: inline;
}

.shift-card-action {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  transition: all 0.15s ease;
}

.shift-card-action:hover {
  border-color: var(--border-hover);
}

.shift-card-action-approve:hover {
  color: var(--success);
  border-color: var(--success);
  background: var(--success-light);
}

.shift-card-action-reject:hover {
  color: var(--warning);
  border-color: var(--warning);
  background: var(--warning-light);
}

.shift-card-action-unassign:hover {
  color: var(--warning);
  border-color: var(--warning);
  background: var(--warning-light);
}

.shift-card-action-delete:hover {
  color: var(--danger);
  border-color: var(--danger);
  background: var(--danger-light);
}

/* ============================================
   Tables
   ============================================ */
.table-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.table-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.table-card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table thead th {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 10px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.data-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.12s ease;
}

.data-table tbody tr:last-child {
  border-bottom: none;
}

.data-table tbody tr:hover {
  background: var(--surface-hover);
}

.data-table tbody td {
  padding: 12px 16px;
  font-size: 13px;
  color: var(--text-secondary);
}

.data-table tbody td:first-child {
  color: var(--text);
  font-weight: 500;
}

/* ============================================
   Status Badges
   ============================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}

.badge-pending {
  background: var(--warning-light);
  color: var(--warning);
}

.badge-available {
  background: var(--primary-light);
  color: var(--primary);
}

.badge-worker-active {
  background: var(--success-light);
  color: var(--success);
}

.badge-worker-inactive {
  background: var(--danger-light);
  color: var(--danger);
}

.badge-approved {
  background: var(--success-light);
  color: var(--success);
}

.badge-invoice-processed {
  background: var(--success-light);
  color: var(--success);
}

.badge-invoice-open {
  background: var(--warning-light);
  color: var(--warning);
}

.badge-rejected {
  background: var(--danger-light);
  color: var(--danger);
}

.badge-sent {
  background: var(--success-light);
  color: var(--success);
}

.badge-failed {
  background: var(--danger-light);
  color: var(--danger);
}

.badge-student {
  background: var(--primary-light);
  color: var(--primary);
}

.badge-interim {
  background: var(--warning-light);
  color: var(--warning);
}

.badge-skill {
  background: var(--primary-light);
  color: var(--primary);
}

/* ============================================
   Rule & Profile Badges
   ============================================ */
.badge-rule-type {
  background: var(--primary-light);
  color: var(--primary);
}

.badge-inactive {
  background: var(--surface-hover);
  color: var(--text-muted);
}

.badge .status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
}

.rule-params {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.rule-param-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  background: var(--surface-hover);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

/* Permission badge for profiles */
.perm-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  background: var(--success-light);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.perm-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 11px;
  font-size: 11px;
  font-weight: 600;
  background: var(--primary-light);
  color: var(--primary);
}

/* ============================================
   Campus Cards
   ============================================ */
.campus-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.campus-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.15s ease;
}

.campus-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow);
}

.campus-card-accent {
  height: 3px;
  background: linear-gradient(90deg, var(--primary), rgba(59, 130, 246, 0.2));
}

.campus-card-body {
  padding: 16px 20px;
}

.campus-card-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.campus-card-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.campus-dept-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.dept-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  background: var(--surface-hover);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.dept-tag-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 4px;
  font-size: 14px;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.15s ease;
  background: none;
  border: none;
  padding: 0;
}

.dept-tag-remove:hover {
  color: var(--danger);
}

.campus-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  border-top: 1px solid var(--border);
}

.campus-card-add {
  background: transparent;
  border: 1px dashed var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 160px;
  cursor: pointer;
  color: var(--text-muted);
  gap: 8px;
  transition: all 0.15s ease;
}

.campus-card-add:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.campus-card-add-icon {
  font-size: 24px;
  font-weight: 300;
}

.campus-card-add-text {
  font-size: 13px;
  font-weight: 500;
}

/* ============================================
   Info Cards (shared — used in subscription, analytics, etc.)
   ============================================ */
.info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.info-card-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.info-card-value {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.info-card-detail {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* ============================================
   Checkbox Group (Permissions / Departments)
   ============================================ */
.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg);
  transition: all 0.15s ease;
  cursor: pointer;
}

.checkbox-item:hover {
  border-color: var(--border-hover);
  background: var(--surface-hover);
}

.checkbox-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
}

.checkbox-item label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
}

/* ============================================
   Inline Department Form
   ============================================ */
.inline-form {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.inline-form .form-input {
  flex: 1;
}

.inline-form .btn-primary {
  white-space: nowrap;
}

/* ============================================
   Forms
   ============================================ */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.form-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 9px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  font-family: var(--font);
  color: var(--text);
  transition: all 0.15s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.form-input::placeholder {
  color: var(--text-muted);
}

.org-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 16px;
  margin-bottom: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: var(--font);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.org-option:hover {
  border-color: var(--primary);
  background: var(--primary-light, #eff6ff);
}

.org-option--current {
  border-color: var(--primary);
}

.org-option__name {
  font-weight: 500;
}

.org-option__badge {
  font-size: 11px;
  color: var(--primary);
  background: var(--primary-light, #eff6ff);
  padding: 2px 8px;
  border-radius: 9999px;
  font-weight: 500;
}

.form-textarea {
  min-height: 80px;
  resize: vertical;
}

.date-picker-field {
  position: relative;
}

.date-picker-input {
  padding-right: 42px;
}

.date-picker-button {
  position: absolute;
  top: 50%;
  right: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  color: var(--text-secondary);
  transform: translateY(-50%);
  transition: all 0.15s ease;
}

.date-picker-button:hover {
  color: var(--primary);
  background: var(--primary-light);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.form-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 16px;
}

/* ============================================
   Modal
   ============================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
}

.modal-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 520px;
  animation: modal-enter 0.15s ease;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
}

.modal-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.modal-close {
  font-size: 22px;
  color: var(--text-muted);
  line-height: 1;
}

.modal-close:hover {
  color: var(--text);
}

.modal-body {
  padding: 20px 24px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px 20px;
  border-top: 1px solid var(--border);
}

.confirm-modal-panel {
  max-width: 420px;
}

.confirm-modal-body {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.confirm-modal-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 16px;
  font-weight: 700;
}

.confirm-modal-icon-primary {
  color: var(--primary);
  background: var(--primary-light);
}

.confirm-modal-icon-success {
  color: var(--success);
  background: var(--success-light);
}

.confirm-modal-icon-warning {
  color: var(--warning);
  background: var(--warning-light);
}

.confirm-modal-icon-danger {
  color: var(--danger);
  background: var(--danger-light);
}

.confirm-modal-message {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.5;
}

@keyframes modal-enter {
  from {
    opacity: 0;
    transform: translateY(-12px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}


/* ============================================
   Worker Portal Layout
   ============================================ */
.worker-layout {
  min-height: 100vh;
  background: var(--bg);
}

.worker-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
}

.worker-header-content {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

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

.worker-header-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.worker-header-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.worker-header-skills {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

.worker-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.worker-skills-section {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.worker-skills-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.worker-meta {
  font-size: 12px;
  color: var(--text-secondary);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.worker-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Progress Bar */
.progress-bar-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.progress-bar {
  width: 160px;
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.progress-bar-fill.warning {
  background: var(--warning);
}

.progress-bar-fill.danger {
  background: var(--danger);
}

.progress-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
}

/* Night shift eligibility badge */
.eligibility-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}

.eligibility-badge-eligible {
  background: var(--success-light);
  color: var(--success);
}

.eligibility-badge-ineligible {
  background: var(--danger-light);
  color: var(--danger);
}

.worker-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 24px;
}

/* ============================================
   Worker Portal Tabs
   ============================================ */
.portal-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}

.portal-tab {
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.15s ease;
}

.portal-tab:hover {
  color: var(--text);
}

.portal-tab-active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}

.portal-warning {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--warning-light);
  border: 1px solid var(--warning);
  border-radius: var(--radius);
  color: var(--warning);
  font-size: 13px;
  margin-bottom: 16px;
}

.portal-info {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--primary-light);
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  color: var(--primary);
  font-size: 13px;
  margin-bottom: 16px;
}

/* ============================================
   Login Page
   ============================================ */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 20px;
}

.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  width: 100%;
  max-width: 400px;
  padding: 32px;
}

.login-header {
  text-align: center;
  margin-bottom: 28px;
}

.login-header h1 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.login-header p {
  font-size: 13px;
  color: var(--text-muted);
}

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

.login-form .form-group-inline {
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.login-alert {
  background: var(--danger-light);
  border: 1px solid var(--danger);
  color: var(--danger);
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  margin-bottom: 16px;
}

.login-btn {
  width: 100%;
  justify-content: center;
}

.login-footer {
  text-align: center;
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.login-link {
  font-size: 13px;
  color: var(--primary);
  font-weight: 500;
}

.login-link:hover {
  text-decoration: underline;
}

/* ============================================
   Shift Type Badges & Table Cells
   ============================================ */
.shift-type-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.shift-type-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  width: fit-content;
}

.shift-type-vroeg {
  background: var(--shift-vroeg-light);
  color: var(--shift-vroeg);
}

.shift-type-dag {
  background: var(--shift-dag-light);
  color: var(--shift-dag);
}

.shift-type-laat {
  background: var(--shift-laat-light);
  color: var(--shift-laat);
}

.shift-type-nacht {
  background: var(--shift-nacht-light);
  color: var(--shift-nacht);
}

.shift-time-range {
  font-size: 11px;
  color: var(--text-muted);
}

/* ============================================
   Table Card Extras
   ============================================ */
.table-card-count {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.text-muted {
  color: var(--text-muted);
}

.table-scroll {
  overflow-x: auto;
}

.align-right {
  text-align: right;
}

/* ============================================
   Row Action Buttons
   ============================================ */
.row-actions-cell {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  opacity: 0;
  transition: opacity 0.12s ease;
}

.data-table tbody tr:hover .row-actions-cell {
  opacity: 1;
}

.row-actions-cell-visible {
  opacity: 1;
}

.btn-action-form {
  display: inline;
}

.btn-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  transition: all 0.15s ease;
  cursor: pointer;
}

.btn-action:hover {
  border-color: var(--border-hover);
}

.btn-action-approve:hover {
  color: var(--success);
  border-color: var(--success);
  background: var(--success-light);
}

.btn-action-reject:hover {
  color: var(--warning);
  border-color: var(--warning);
  background: var(--warning-light);
}

.btn-action-unassign:hover {
  color: var(--warning);
  border-color: var(--warning);
  background: var(--warning-light);
}

.btn-action-delete:hover {
  color: var(--danger);
  border-color: var(--danger);
  background: var(--danger-light);
}

/* ============================================
   Form Extras
   ============================================ */
.form-errors {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  background: var(--danger-light);
  border: 1px solid var(--danger);
  border-radius: var(--radius);
  color: var(--danger);
  font-size: 13px;
  margin-bottom: 16px;
}

.form-errors svg {
  flex-shrink: 0;
  margin-top: 2px;
}

.form-hint-inline {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 11px;
}

/* ============================================
   Empty State
   ============================================ */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 20px;
  text-align: center;
}

.empty-state-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  background: var(--surface-hover);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  color: var(--text-muted);
}

.empty-state-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.empty-state-text {
  font-size: 13px;
  color: var(--text-muted);
}

/* ============================================
   Analytics
   ============================================ */
.analytics-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.analytics-period {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.analytics-range {
  margin-top: 2px;
  font-size: 12px;
  color: var(--text-muted);
}

.analytics-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.analytics-filter-form {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 24px;
}

.analytics-filter-field {
  width: 180px;
}

.analytics-filter-submit {
  flex-shrink: 0;
}

.analytics-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.worker-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* ============================================
   Settings
   ============================================ */

/* ── Overview stat cards ── */
.settings-overview-cards {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.settings-stat-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
}

.settings-stat-card--link {
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.settings-stat-card--link:hover {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.settings-stat-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.settings-stat-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.settings-stat-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.settings-stat-sub {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 3px;
}

.settings-stat-action {
  font-size: 12px;
  font-weight: 500;
  color: var(--primary);
  margin-top: 6px;
}

/* ── Section container ── */
.settings-section {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
  overflow: hidden;
}

.settings-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.settings-section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.settings-section-sub {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.settings-section-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.settings-section-footer {
  padding: 0 20px 20px;
}

/* ── Language form ── */
.settings-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}

.settings-two-col .form-group {
  margin-bottom: 0;
}

.settings-locale-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.settings-locale-options .checkbox-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 7px 12px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.settings-locale-options .checkbox-item:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.settings-info-banner {
  background: var(--surface-hover);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
}

.settings-info-banner-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

.settings-info-banner-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.settings-info-banner-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.settings-info-banner-detail {
  font-size: 12px;
  color: var(--text-secondary);
}

/* ── Shift type cards ── */
.shift-type-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
}

.shift-type-card {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 2fr) auto;
  align-items: stretch;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow 0.15s ease;
}

.shift-type-card:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.shift-type-card--new {
  border-style: dashed;
  background: var(--surface-hover);
}

.shift-type-card-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 16px;
  border-right: 1px solid var(--border);
  background: var(--surface-hover);
}

.shift-type-card-header-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.shift-type-card-time {
  font-size: 12px;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

.shift-type-card-header-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.checkbox-item--compact {
  padding: 4px 8px;
  font-size: 12px;
  background: none;
  border: none;
  gap: 5px;
}

.shift-type-card-fields {
  padding: 16px;
  display: grid;
  grid-template-columns: minmax(150px, 1.25fr) repeat(3, minmax(110px, 1fr));
  gap: 12px;
  align-items: end;
}

.shift-type-card-fields .form-group {
  margin-bottom: 0;
}

.shift-type-card-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  border-left: 1px solid var(--border);
  background: var(--surface);
}

/* ── Autosave status indicator ── */
.autosave-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  min-height: 20px;
  transition: opacity 0.15s ease;
}

.autosave-status--saving {
  color: var(--text-muted);
}

.autosave-status--saved {
  color: var(--success);
}

.autosave-status--error {
  color: var(--danger);
}

.autosave-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: autosave-pulse 1s ease-in-out infinite;
}

@keyframes autosave-pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* ── Drag handle ── */
.drag-handle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 5px;
  color: var(--text-muted);
  cursor: grab;
  transition: color 0.15s ease, background 0.15s ease;
  flex-shrink: 0;
}

.drag-handle:hover {
  color: var(--text-secondary);
  background: var(--surface);
}

.drag-handle:active {
  cursor: grabbing;
}

/* ── Delete button (compact) ── */
.btn-delete-sm {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  background: none;
  border: 1px solid transparent;
  border-radius: 5px;
  text-decoration: none;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-delete-sm:hover {
  color: var(--danger);
  background: var(--danger-light);
  border-color: var(--danger);
}

/* ── Sortable states ── */
.sortable-ghost {
  opacity: 0.3;
}

.sortable-chosen {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.sortable-drag {
  opacity: 0.9;
}

.btn-sm {
  font-size: 12px;
  padding: 6px 14px;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1200px) {
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .calendar-day {
    min-height: 150px;
    padding: 8px;
  }

  .calendar-shift-card {
    padding: 8px;
  }

  .campus-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .checkbox-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .settings-overview-cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 1100px) {
  .calendar-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .calendar-nav {
    width: 100%;
  }

  .calendar-today-button {
    flex: 1;
  }

  .shift-calendar {
    grid-template-columns: 1fr;
  }

  .calendar-weekday {
    display: none;
  }

  .calendar-day {
    min-height: 0;
    border-right: none;
  }

  .calendar-day:nth-last-child(-n + 7) {
    border-bottom: 1px solid var(--border);
  }

  .calendar-day:last-child {
    border-bottom: none;
  }

  .calendar-day-name {
    display: inline-flex;
  }
}

/* ============================================
   Subscription Page
   ============================================ */
.subscription-alert {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
}

.subscription-alert svg {
  flex-shrink: 0;
}

.subscription-alert strong {
  font-weight: 600;
}

.subscription-alert-warning {
  background: var(--warning-light);
  border: 1px solid var(--warning);
  color: var(--warning);
}

.subscription-alert-warning .btn-primary {
  margin-left: auto;
  flex-shrink: 0;
}

.subscription-alert-info {
  background: var(--primary-light);
  border: 1px solid var(--primary);
  color: var(--text);
}

.subscription-alert-trial {
  background: var(--primary-light);
  border: 1px solid var(--primary);
  color: var(--text);
}

/* Subscription status badges */
.badge-subscription {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}

.badge-subscription-trial {
  background: var(--primary-light);
  color: var(--primary);
}

.badge-subscription-active {
  background: var(--success-light);
  color: var(--success);
}

.badge-subscription-past_due {
  background: var(--warning-light);
  color: var(--warning);
}

.badge-subscription-cancelled {
  background: var(--danger-light);
  color: var(--danger);
}

/* Feature usage & hints */
.feature-usage {
  font-size: 12px;
  color: var(--text-muted);
  margin-left: 8px;
}

.feature-upgrade-hint {
  font-size: 11px;
  color: var(--primary);
  font-weight: 500;
  margin-left: 8px;
}

/* Subscription action panel */
.subscription-actions-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.subscription-actions-copy {
  min-width: 220px;
}

.subscription-actions-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.subscription-actions-text {
  font-size: 13px;
  color: var(--text-secondary);
}

.subscription-actions-buttons {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.subscription-action-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  transition: all 0.15s ease;
}

.subscription-action-button-primary {
  color: #fff;
  background: var(--primary);
  border: 1px solid var(--primary);
}

.subscription-action-button-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

.subscription-action-button-secondary {
  color: var(--text);
  background: var(--surface-hover);
  border: 1px solid var(--border-hover);
}

.subscription-action-button-secondary:hover {
  color: var(--primary);
  border-color: var(--primary);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--surface-hover);
  color: var(--text);
  border-color: var(--border-hover);
}

/* Billing onboarding modal */
.billing-onboarding-overlay {
  align-items: center;
}

.billing-onboarding-panel {
  max-width: 620px;
}

.billing-onboarding-subtitle {
  margin-top: 4px;
  font-size: 13px;
  color: var(--text-secondary);
}

.billing-onboarding-steps {
  display: flex;
  gap: 8px;
  padding: 16px 24px 0;
}

.billing-onboarding-dot {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: var(--surface);
}

.billing-onboarding-dot.is-active {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
}

.billing-onboarding-dot.is-complete {
  color: var(--primary);
  background: var(--primary-light);
  border-color: var(--primary);
}

.billing-onboarding-step-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
}

.billing-onboarding-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.billing-onboarding-note {
  margin: 8px 0 0;
}

.billing-onboarding-footer {
  align-items: center;
}

.billing-onboarding-button {
  min-width: 112px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  transition: all 0.15s ease;
}

.billing-onboarding-button-primary {
  color: #fff;
  background: var(--primary);
  border: 1px solid var(--primary);
}

.billing-onboarding-button-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

.billing-onboarding-button-secondary {
  color: var(--text-secondary);
  background: var(--surface);
  border: 1px solid var(--border-hover);
}

.billing-onboarding-button-secondary:hover {
  color: var(--text);
  background: var(--surface-hover);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

/* Public signup */
.public-signup-container {
  padding: 40px 20px;
  align-items: flex-start;
}

.public-signup-card {
  max-width: 760px;
  width: 100%;
}

.public-signup-form {
  gap: 22px;
}

.public-signup-section {
  padding-top: 4px;
}

.public-signup-section h2 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}

.public-signup-trial {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--success);
  background: var(--success-light);
  font-size: 12px;
  font-weight: 700;
}

.public-signup-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.public-signup-span {
  grid-column: 1 / -1;
}

@media (max-width: 720px) {
  .public-signup-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .sidebar {
    display: none;
  }

  .main-wrapper {
    margin-left: 0;
  }

  .worker-header {
    padding: 14px 16px;
  }

  .worker-header-content,
  .worker-header-left,
  .worker-header-info {
    align-items: flex-start;
    flex-direction: column;
  }

  .worker-header-content {
    gap: 14px;
  }

  .worker-header-right {
    width: 100%;
    justify-content: space-between;
  }

  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .setup-dashboard-card,
  .setup-dashboard-actions,
  .setup-hero,
  .setup-step {
    align-items: stretch;
    flex-direction: column;
  }

  .setup-dashboard-card,
  .setup-hero {
    display: flex;
  }

  .setup-step {
    display: flex;
  }

  .setup-dashboard-actions .btn-primary,
  .setup-step-action {
    width: 100%;
  }

  .setup-dashboard-progress,
  .setup-progress-ring {
    align-self: flex-start;
  }

  .analytics-toolbar,
  .analytics-filter-form {
    align-items: stretch;
    flex-direction: column;
  }

  .analytics-actions {
    width: 100%;
  }

  .analytics-actions .calendar-today-button {
    flex: 1;
  }

  .analytics-filter-field {
    width: 100%;
  }

  .weekly-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .campus-grid {
    grid-template-columns: 1fr;
  }

  .checkbox-grid {
    grid-template-columns: 1fr;
  }

  .settings-overview-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .settings-two-col {
    grid-template-columns: 1fr;
  }

  .shift-type-card {
    grid-template-columns: 1fr;
  }

  .shift-type-card-header {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .shift-type-card-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .shift-type-card-footer {
    justify-content: flex-start;
    border-left: none;
    border-top: 1px solid var(--border);
  }

  .main-content {
    padding: 16px;
  }
}

/* ============================================
   Impersonation Banner
   ============================================ */
.impersonation-banner {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: var(--warning-light);
  border-bottom: 2px solid var(--warning);
  padding: 10px 20px;
}

.impersonation-banner-content {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 1200px;
  margin: 0 auto;
  font-size: 13px;
  font-weight: 500;
  color: var(--warning);
}

.impersonation-banner-icon {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
}

.impersonation-banner-btn {
  margin-left: auto;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: var(--warning);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.impersonation-banner-btn:hover {
  opacity: 0.85;
}

/* ===== Admin Dashboard ===== */

.admin-stat-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}

.admin-stat-card {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 10px;
  padding: 16px;
}

.admin-stat-label {
  font-size: 10px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.admin-stat-value {
  font-size: 24px;
  font-weight: 700;
  color: #e2e8f0;
}

.admin-stat-value--green  { color: #4ade80; }
.admin-stat-value--blue   { color: #60a5fa; }
.admin-stat-value--yellow { color: #fbbf24; }
.admin-stat-value--red    { color: #f87171; }
.admin-stat-value--muted  { color: #94a3b8; }

.admin-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 28px;
}

.admin-card {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 28px;
}

.admin-card--no-margin { margin-bottom: 0; }

.admin-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #334155;
}

.admin-card-header--with-icon {
  gap: 8px;
  justify-content: flex-start;
}

.admin-card-title {
  font-size: 14px;
  font-weight: 600;
  color: #e2e8f0;
}

.admin-card-subtitle {
  font-size: 11px;
  color: #64748b;
  margin-left: 4px;
}

.admin-card-link {
  font-size: 12px;
  color: #fbbf24;
  text-decoration: none;
  font-weight: 500;
}

.admin-card-link:hover { text-decoration: underline; }

.admin-card-body {
  padding: 20px;
}

.admin-mrr-value {
  font-size: 32px;
  font-weight: 700;
  color: #4ade80;
  letter-spacing: -0.02em;
}

.admin-mrr-note {
  font-size: 12px;
  color: #64748b;
  margin-top: 6px;
}

.admin-plan-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-plan-name {
  font-size: 13px;
  font-weight: 500;
  color: #e2e8f0;
}

.admin-plan-count {
  font-size: 14px;
  font-weight: 700;
  color: #fbbf24;
}

.admin-plan-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-empty {
  padding: 32px 20px;
  text-align: center;
  color: #64748b;
  font-size: 13px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th {
  font-size: 10px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 10px 20px;
  text-align: left;
}

.admin-table th:last-child { text-align: right; padding-right: 20px; }

.admin-table td {
  padding: 12px 20px;
  border-bottom: 1px solid #334155;
  font-size: 13px;
  color: #94a3b8;
}

.admin-table td:first-child { font-weight: 500; color: #e2e8f0; }
.admin-table td:last-child  { text-align: right; }

.admin-table tr:last-child td { border-bottom: none; }

.admin-table-link {
  color: #e2e8f0;
  text-decoration: none;
}

.admin-action-link {
  font-size: 12px;
  color: #fbbf24;
  text-decoration: none;
  font-weight: 500;
}

.admin-badge-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}

.admin-badge-status--active    { color: #4ade80; background: rgba(74,222,128,0.12); }
.admin-badge-status--trial     { color: #60a5fa; background: rgba(96,165,250,0.12); }
.admin-badge-status--past-due  { color: #fbbf24; background: rgba(251,191,36,0.12); }
.admin-badge-status--cancelled { color: #f87171; background: rgba(248,113,113,0.12); }
.admin-badge-status--none      { color: #94a3b8; background: rgba(148,163,184,0.12); }

.admin-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.admin-trial-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  border-bottom: 1px solid rgba(51,65,85,0.5);
}

.admin-trial-row:last-child { border-bottom: none; }

.admin-trial-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-days-urgent  { font-size: 12px; font-weight: 600; color: #f87171; }
.admin-days-warning { font-size: 12px; font-weight: 600; color: #fbbf24; }

/* ===== Admin Layout Utilities ===== */

.header-title {
  font-size: 16px;
  font-weight: 600;
  color: #e2e8f0;
  margin: 0;
}

.flash {
  padding: 12px 16px;
  margin: 16px 24px 0;
  border-radius: 8px;
  font-size: 13px;
}

.flash-notice {
  background: rgba(74, 222, 128, 0.08);
  border: 1px solid rgba(74, 222, 128, 0.25);
  color: #4ade80;
}

.flash-alert {
  background: rgba(248, 113, 113, 0.08);
  border: 1px solid rgba(248, 113, 113, 0.25);
  color: #f87171;
}

.admin-plan-empty {
  font-size: 13px;
  color: #64748b;
}

/* ===== Admin Page Layout ===== */

.admin-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.admin-page-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.15s;
  border: none;
}

.admin-btn:hover { opacity: 0.85; }

.admin-btn--primary {
  background: #f59e0b;
  color: #1a1207;
  padding: 9px 18px;
}

.admin-btn--ghost {
  background: transparent;
  border: 1px solid #334155;
  color: #e2e8f0;
  font-weight: 500;
}

.admin-btn--amber {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #f59e0b;
  font-weight: 600;
  font-size: 11px;
  padding: 5px 12px;
}

.admin-btn--green {
  background: rgba(74, 222, 128, 0.12);
  border: 1px solid rgba(74, 222, 128, 0.3);
  color: #4ade80;
}

.admin-btn--blue {
  background: rgba(96, 165, 250, 0.12);
  border: 1px solid rgba(96, 165, 250, 0.3);
  color: #60a5fa;
}

.admin-btn--red {
  background: rgba(248, 113, 113, 0.08);
  border: 1px solid rgba(248, 113, 113, 0.25);
  color: #f87171;
}

.admin-btn--sm {
  padding: 6px 14px;
  font-size: 12px;
  border-radius: 6px;
}

/* ===== Admin Filter Bar ===== */

.admin-filter-bar {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 20px;
}

.admin-filter-form {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-filter-search {
  flex: 1;
  min-width: 200px;
}

.admin-input {
  width: 100%;
  padding: 9px 12px;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 8px;
  color: #e2e8f0;
  font-size: 13px;
  outline: none;
  font-family: inherit;
}

.admin-input:focus { border-color: #f59e0b; }

.admin-select {
  padding: 9px 30px 9px 12px;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 8px;
  color: #e2e8f0;
  font-size: 13px;
  outline: none;
  appearance: none;
  font-family: inherit;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2394a3b8'%3E%3Cpath fill-rule='evenodd' d='M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z' clip-rule='evenodd'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 16px;
}

.admin-select--sm {
  padding: 6px 28px 6px 10px;
  font-size: 12px;
  border-radius: 6px;
  background-size: 14px;
  background-position: right 6px center;
}

.admin-filter-btn {
  padding: 9px 16px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 8px;
  color: #f59e0b;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
  font-family: inherit;
}

.admin-filter-reset {
  font-size: 12px;
  color: #94a3b8;
  text-decoration: none;
  font-weight: 500;
  padding: 9px 12px;
}

/* ===== Admin Info Card ===== */

.admin-info-card {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 24px;
}

.admin-info-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.admin-info-card-title {
  font-size: 14px;
  font-weight: 600;
  color: #e2e8f0;
}

.admin-info-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.admin-info-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}

.admin-info-grid-full {
  grid-column: span 2;
}

.admin-info-label {
  font-size: 10px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}

.admin-info-value {
  font-size: 14px;
  font-weight: 500;
  color: #e2e8f0;
}

.admin-info-value--highlight { color: #fbbf24; font-weight: 600; }
.admin-info-value--muted { color: #94a3b8; font-size: 12px; font-family: 'JetBrains Mono', monospace; }

.admin-info-color-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-color-swatch {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.1);
  flex-shrink: 0;
}

.admin-divider {
  border: none;
  border-top: 1px solid #334155;
  margin: 16px 0;
}

/* ===== Admin Action Rows ===== */

.admin-action-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.admin-action-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 8px;
}

.admin-action-info { flex: 1; }

.admin-action-title {
  font-size: 12px;
  font-weight: 600;
  color: #e2e8f0;
  margin-bottom: 2px;
}

.admin-action-desc {
  font-size: 11px;
  color: #64748b;
}

.admin-action-desc--highlight { color: #fbbf24; font-weight: 600; }

.admin-action-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-input--sm {
  padding: 6px 10px;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 6px;
  color: #e2e8f0;
  font-size: 12px;
  outline: none;
  font-family: inherit;
}

/* ===== Admin Warning Banner ===== */

.admin-warning-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.2);
  border-radius: 8px;
  margin-bottom: 16px;
}

.admin-warning-text {
  font-size: 12px;
  color: #fbbf24;
  font-weight: 500;
}

/* ===== Admin Campus List ===== */

.admin-campus-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-campus-item {
  padding: 14px 16px;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 8px;
}

.admin-campus-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.admin-campus-name {
  font-size: 13px;
  font-weight: 600;
  color: #e2e8f0;
}

.admin-department-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-left: 20px;
}

.admin-department-tag {
  display: inline-flex;
  padding: 3px 10px;
  background: rgba(96, 165, 250, 0.08);
  border: 1px solid rgba(96, 165, 250, 0.2);
  border-radius: 5px;
  font-size: 11px;
  font-weight: 500;
  color: #60a5fa;
}

/* ===== Admin Stat Grid 3-col ===== */

.admin-stat-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

/* ===== Admin Table (with center columns) ===== */

.admin-table td.center,
.admin-table th.center { text-align: center; }

/* ===== Admin Trial Days ===== */

.admin-trial-days { font-weight: 600; }
.admin-trial-days--urgent { color: #f87171; }
.admin-trial-days--warning { color: #fbbf24; }
.admin-trial-days--ok { color: #94a3b8; }

/* ===== Pagination ===== */

.admin-pagination {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

/* ===== Admin badge-status border variant ===== */

.admin-badge-status--active    { border: 1px solid rgba(74,222,128,0.25); }
.admin-badge-status--trial     { border: 1px solid rgba(96,165,250,0.25); }
.admin-badge-status--past-due  { border: 1px solid rgba(251,191,36,0.25); }
.admin-badge-status--cancelled { border: 1px solid rgba(248,113,113,0.25); }
.admin-badge-status--none      { border: 1px solid rgba(148,163,184,0.2); }

/* ===== Admin audit log ===== */

.admin-audit-filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

/* ===== Admin Form ===== */

.admin-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.admin-form-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.admin-form-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
}

.admin-form-required { color: #f87171; }

.admin-form-error {
  font-size: 11px;
  color: #f87171;
}

.admin-form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-form-cancel {
  padding: 10px 20px;
  color: #94a3b8;
  font-size: 13px;
  text-decoration: none;
}

.admin-campus-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.admin-info-hint {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 16px;
  padding: 10px 14px;
  background: rgba(96, 165, 250, 0.06);
  border: 1px solid rgba(96, 165, 250, 0.15);
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.admin-campus-list-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-campus-empty {
  padding: 24px;
  text-align: center;
  color: #64748b;
  font-size: 13px;
  border: 1px dashed rgba(255,255,255,0.08);
  border-radius: 8px;
}

/* ===== Audit Log ===== */

.admin-audit-timestamp {
  font-size: 12px;
  font-family: 'JetBrains Mono', monospace;
  color: #94a3b8;
  white-space: nowrap;
}

.admin-audit-admin { font-size: 13px; font-weight: 500; color: #e2e8f0; }

.admin-audit-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}

.admin-audit-badge--green    { color: #4ade80; background: rgba(74,222,128,0.12); border: 1px solid rgba(74,222,128,0.25); }
.admin-audit-badge--blue     { color: #60a5fa; background: rgba(96,165,250,0.12); border: 1px solid rgba(96,165,250,0.25); }
.admin-audit-badge--purple   { color: #a78bfa; background: rgba(167,139,250,0.12); border: 1px solid rgba(167,139,250,0.25); }
.admin-audit-badge--red      { color: #f87171; background: rgba(248,113,113,0.12); border: 1px solid rgba(248,113,113,0.25); }
.admin-audit-badge--yellow   { color: #fbbf24; background: rgba(251,191,36,0.12); border: 1px solid rgba(251,191,36,0.25); }
.admin-audit-badge--muted    { color: #94a3b8; background: rgba(148,163,184,0.12); border: 1px solid rgba(148,163,184,0.2); }

.admin-audit-target-type { font-size: 11px; color: #64748b; font-weight: 500; }
.admin-audit-target-id   { font-size: 11px; font-family: 'JetBrains Mono', monospace; color: #64748b; }

.admin-audit-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-width: 300px;
}

.admin-audit-meta-chip {
  display: inline-flex;
  padding: 2px 7px;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 4px;
  font-size: 10px;
  font-family: 'JetBrains Mono', monospace;
  color: #94a3b8;
}

.admin-audit-meta-key { color: #64748b; }

.admin-empty-icon {
  width: 44px;
  height: 44px;
  margin: 0 auto 12px;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.admin-empty-title {
  font-size: 15px;
  font-weight: 600;
  color: #94a3b8;
  margin-bottom: 6px;
}

.admin-filter-search--narrow { max-width: 320px; }
.admin-input--mono { font-family: 'JetBrains Mono', monospace; }

.admin-select--full { width: 100%; box-sizing: border-box; }

@media (max-width: 640px) {
  .subscription-actions-card,
  .subscription-actions-buttons {
    align-items: stretch;
    flex-direction: column;
  }

  .subscription-actions-buttons form,
  .subscription-action-button {
    width: 100%;
  }

  .shift-type-card-fields {
    grid-template-columns: 1fr;
  }

  .billing-onboarding-panel {
    max-width: calc(100vw - 24px);
  }

  .billing-onboarding-grid {
    grid-template-columns: 1fr;
  }
}
