:root {
  --grs-green: #198754;
  --grs-green-light: #d1e7dd;
  --grs-green-dark: #146c43;
}

/* Sidebar — light */
.sidebar {
  background: #fff;
  border-right: 1px solid #dee2e6;
}
.sidebar-brand {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
}
.brand-edu { color: var(--grs-green); }
.brand-station { color: #212529; }
.sidebar .nav-link {
  color: #6c757d;
  border-radius: 8px;
  font-size: 14px;
  padding: 8px 12px;
}
.sidebar .nav-link:hover { background: #f8f9fa; color: #212529; }
.sidebar .nav-link.active {
  background: var(--grs-green-light);
  color: var(--grs-green);
  font-weight: 500;
}
.sidebar-user { color: #6c757d; }
.main-content { background: #f8f9fa; }

/* Sidebar — dark */
[data-bs-theme="dark"] .sidebar {
  background: #161b22;
  border-right-color: #30363d;
}
[data-bs-theme="dark"] .brand-station { color: #e6edf3; }
[data-bs-theme="dark"] .sidebar .nav-link { color: #8b949e; }
[data-bs-theme="dark"] .sidebar .nav-link:hover {
  background: #21262d; color: #e6edf3;
}
[data-bs-theme="dark"] .sidebar .nav-link.active {
  background: #1a2e1a; color: #4CAF50;
}
[data-bs-theme="dark"] .sidebar-user { color: #8b949e; }
[data-bs-theme="dark"] .main-content { background: #0d1117; }

/* Theme toggle button */
.btn-icon {
  background: transparent;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 4px 8px;
  color: #6c757d;
  line-height: 1;
}
.btn-icon:hover { background: #f8f9fa; }
[data-bs-theme="dark"] .btn-icon {
  border-color: #30363d; color: #8b949e;
}
[data-bs-theme="dark"] .btn-icon:hover { background: #21262d; }

/* Stat cards */
.stat-card {
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 12px;
  padding: 16px 20px;
}
.stat-card .stat-num {
  font-size: 28px;
  font-weight: 500;
  color: var(--grs-green);
}
.stat-card .stat-label {
  font-size: 12px;
  color: #6c757d;
  margin-top: 2px;
}
[data-bs-theme="dark"] .stat-card {
  background: #161b22;
  border-color: #30363d;
}
[data-bs-theme="dark"] .stat-card .stat-num { color: #4CAF50; }
[data-bs-theme="dark"] .stat-card .stat-label { color: #8b949e; }

/* Tables */
.table-card {
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 12px;
  overflow: hidden;
}
[data-bs-theme="dark"] .table-card {
  background: #161b22;
  border-color: #30363d;
}

/* Status badges */
.badge-published { background: #d1e7dd; color: #0a3622; }
.badge-draft     { background: #fff3cd; color: #664d03; }
.badge-cancelled { background: #f8d7da; color: #58151c; }
.badge-archived  { background: #e2e3e5; color: #41464b; }
[data-bs-theme="dark"] .badge-published { background: #1a2e1a; color: #4CAF50; }
[data-bs-theme="dark"] .badge-draft     { background: #2e1f00; color: #d29922; }
[data-bs-theme="dark"] .badge-cancelled { background: #3b1219; color: #f1aeb5; }
[data-bs-theme="dark"] .badge-archived  { background: #2d2f31; color: #adb5bd; }

/* Audience badges */
.badge-internal        { background: #e9ecef; color: #1a1a2e; }
.badge-board-community { background: #d1e7dd; color: #0a3622; }
.badge-both            { background: #cfe2ff; color: #084298; }
[data-bs-theme="dark"] .badge-internal        { background: #1a1a2e; color: #adb5bd; }
[data-bs-theme="dark"] .badge-board-community { background: #1a2e1a; color: #4CAF50; }
[data-bs-theme="dark"] .badge-both            { background: #031633; color: #6ea8fe; }

/* Shared badge sizing for the span-based badges above */
[class^="badge-"], [class*=" badge-"] {
  display: inline-block;
  padding: .35em .65em;
  font-size: .75em;
  font-weight: 600;
  line-height: 1;
  border-radius: .375rem;
  white-space: nowrap;
}

/* Page headers */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}
.page-header h1 {
  font-size: 22px;
  font-weight: 500;
  margin: 0;
}

/* Compact form controls */
.form-label {
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 3px;
}
.form-control, .form-select {
  font-size: 13px;
  padding: 5px 10px;
}
.form-text {
  font-size: 11px;
}

/* Quill rich text editor — dark mode */
[data-bs-theme="dark"] .ql-toolbar {
  background: #161b22;
  border-color: #30363d;
}
[data-bs-theme="dark"] .ql-container {
  background: #0d1117;
  border-color: #30363d;
  color: #e6edf3;
}
[data-bs-theme="dark"] .ql-editor {
  color: #e6edf3;
}
[data-bs-theme="dark"] .ql-editor.ql-blank::before {
  color: #6c757d;
}
[data-bs-theme="dark"] .ql-stroke {
  stroke: #8b949e !important;
}
[data-bs-theme="dark"] .ql-fill {
  fill: #8b949e !important;
}
[data-bs-theme="dark"] .ql-picker-label,
[data-bs-theme="dark"] .ql-picker-options {
  color: #8b949e;
}
[data-bs-theme="dark"] .ql-picker-options {
  background: #161b22;
  border-color: #30363d;
}

/* Compact inline row action buttons/links */
.btn-row-action {
  display: inline-block;
  background: transparent;
  border: 1px solid #ced4da;
  border-radius: 6px;
  padding: 2px 10px;
  margin: 0 1px;
  font-size: 12px;
  line-height: 1.4;
  color: #495057;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.btn-row-action:hover { background: #f1f3f5; color: #212529; }
.btn-row-action.danger { color: #b02a37; border-color: #f1aeb5; }
.btn-row-action.danger:hover { background: #f8d7da; color: #842029; }
[data-bs-theme="dark"] .btn-row-action {
  border-color: #30363d; color: #adb5bd;
}
[data-bs-theme="dark"] .btn-row-action:hover { background: #21262d; color: #e6edf3; }
[data-bs-theme="dark"] .btn-row-action.danger { color: #f1aeb5; border-color: #6a2a31; }
[data-bs-theme="dark"] .btn-row-action.danger:hover { background: #3b1219; }

/* Form section cards (class form overhaul) */
.form-section-card {
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 10px;
  margin-bottom: 1rem;
  overflow: hidden;
}
.form-section-card .card-header {
  background: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  color: #495057;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.form-section-card .card-body { padding: 14px; }
.form-section-card .card-header {
  border-left: 3px solid #198754;
  padding-left: 11px;
}
.form-section-card:nth-child(even) .card-body { background: #fbfbfb; }
[data-bs-theme="dark"] .form-section-card:nth-child(even) .card-body { background: #0d1117; }
[data-bs-theme="dark"] .form-section-card .card-header { border-left-color: #4CAF50; }

.sidebar-card .card-header { background: #e9ecef; }

/* Resource rows */
.resource-row {
  background: #f8f9fa;
  border: 1px solid #dee2e6 !important;
}
[data-bs-theme="dark"] .resource-row {
  background: #161b22;
  border-color: #30363d !important;
}

/* Sub-event cards */
.subevent-card {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 10px;
}
[data-bs-theme="dark"] .subevent-card {
  background: #161b22;
  border-color: #30363d;
}
.subevent-card .card-header-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #dee2e6;
}
[data-bs-theme="dark"] .subevent-card .card-header-inner { border-bottom-color: #30363d; }

/* Form fields list */
.field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 0;
  border-bottom: 1px solid #f1f3f5;
  font-size: 13px;
  flex-wrap: wrap;
}
.field-row:last-of-type { border-bottom: none; }
[data-bs-theme="dark"] .field-row { border-bottom-color: #21262d; }

[data-bs-theme="dark"] .form-section-card {
  background: #161b22;
  border-color: #30363d;
}
[data-bs-theme="dark"] .form-section-card .card-header {
  background: #0d1117;
  border-color: #30363d;
  color: #8b949e;
}
[data-bs-theme="dark"] .sidebar-card .card-header { background: #21262d; }

/* Embeddable widgets page */
.widget-section {
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  overflow: hidden;
}
.widget-section .widget-header {
  background: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
  border-left: 3px solid #198754;
  padding: 12px 16px;
}
.widget-section .widget-body { padding: 16px; }
[data-bs-theme="dark"] .widget-section {
  background: #161b22;
  border-color: #30363d;
}
[data-bs-theme="dark"] .widget-section .widget-header {
  background: #0d1117;
  border-color: #30363d;
  border-left-color: #4CAF50;
}

.embed-code-box {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 12px;
  font-family: monospace;
  font-size: 12px;
  white-space: pre-wrap;
  word-break: break-all;
}
[data-bs-theme="dark"] .embed-code-box {
  background: #0d1117;
  border-color: #30363d;
  color: #e6edf3;
}

/* Login page */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8f9fa;
}
[data-bs-theme="dark"] .login-wrap { background: #0d1117; }
.login-card {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 16px;
  padding: 2rem;
}
[data-bs-theme="dark"] .login-card {
  background: #161b22;
  border-color: #30363d;
}
