

:root {
  --bg-main: #181716;
  --bg-sidebar: #131211;
  --bg-card: #22201e;
  --bg-card-hover: #292724;
  --bg-input: #262422;
  --bg-elevated: #2d2b27;
  --bg-modal: #1e1d1b;
  --bg-overlay: rgba(10, 9, 8, 0.75);

  --accent-primary: #ea580c;
  --accent-hover: #f97316;
  --accent-dark: #9a3412;
  --accent-active-pill: #a33814;
  --accent-glow: rgba(234, 88, 12, 0.25);

  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-focus: rgba(234, 88, 12, 0.5);
  --border-card: rgba(255, 255, 255, 0.06);

  --text-main: #f5f5f5;
  --text-secondary: #a3a19d;
  --text-muted: #6e6b66;
  --text-inverse: #ffffff;

  --badge-green: #22c55e;
  --badge-yellow: #eab308;
  --badge-red: #ef4444;
  --badge-blue: #3b82f6;

  --sidebar-width: 250px;
  --sidebar-collapsed-width: 72px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-pill: 9999px;

  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.sidebar {
  width: var(--sidebar-width);
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  transition: width var(--transition-normal);
}

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

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
  text-decoration: none;
}

.brand-logo {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #ea580c, #c2410c);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 4px 12px var(--accent-glow);
}

.brand-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  letter-spacing: -0.2px;
}

.sidebar-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.icon-btn-ghost {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition-fast), background var(--transition-fast);
}

.icon-btn-ghost:hover {
  color: var(--text-main);
  background-color: rgba(255, 255, 255, 0.05);
}

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

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition-fast);
  user-select: none;
}

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

.nav-item.active {
  background-color: var(--accent-active-pill);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(163, 56, 20, 0.35);
}

.nav-item-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 16px;
}

.nav-item-badge {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.sidebar-admin-divider {
  margin: 12px 6px 8px;
  border-top: 1px solid var(--border-subtle);
  padding-top: 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
}

.sidebar-footer {
  padding: 16px 14px;
  border-top: 1px solid var(--border-subtle);
  background-color: rgba(15, 14, 13, 0.5);
}

.user-profile-widget {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.user-profile-widget:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.user-avatar-wrap {
  position: relative;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.user-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.user-status-indicator {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--badge-green);
  border: 2px solid var(--bg-sidebar);
}

.user-info-text {
  flex: 1;
  margin-left: 10px;
  overflow: hidden;
}

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

.user-email {
  font-size: 11.5px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-dropdown-menu {
  position: absolute;
  bottom: 75px;
  left: 12px;
  width: 260px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
  padding: 8px;
  display: none;
  flex-direction: column;
  gap: 4px;
  z-index: 200;
}

.user-dropdown-menu.show {
  display: flex;
}

.dropdown-header {
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: all var(--transition-fast);
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
}

.dropdown-item:hover {
  background-color: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
}

.dropdown-item.danger {
  color: #f87171;
}

.dropdown-item.danger:hover {
  background-color: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}

.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  padding: 40px 48px;
  max-width: 1400px;
  min-height: 100vh;
  transition: margin-left var(--transition-normal);
}
.main-content.admin-active {
  max-width: none;
}

.top-bar-telemetry {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-bottom: 24px;
}

.telemetry-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background-color: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.25);
  border-radius: var(--radius-pill);
  font-size: 12px;
  color: #4ade80;
  font-weight: 500;
}

.telemetry-dot {
  width: 7px;
  height: 7px;
  background-color: #22c55e;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.7; }
}

.hero-header {
  text-align: center;
  margin-bottom: 34px;
}

.hero-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.hero-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
}

.hero-search-wrapper {
  max-width: 640px;
  margin: 24px auto 36px;
  position: relative;
}

.hero-search-input {
  width: 100%;
  background-color: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 13px 18px 13px 44px;
  font-size: 14.5px;
  color: var(--text-main);
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.hero-search-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.hero-search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 16px;
  pointer-events: none;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 36px;
}

.kpi-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.kpi-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.12);
}

.kpi-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.kpi-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-main);
}

.tabs-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 24px;
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 14.5px;
  font-weight: 500;
  padding: 10px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 2px solid transparent;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}

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

.tab-btn.active {
  color: var(--text-main);
  border-bottom-color: var(--accent-primary);
  font-weight: 600;
}

.section-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  flex-wrap: wrap;
  gap: 14px;
}

.section-headings h3 {
  font-size: 19px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 3px;
}

.section-headings p {
  font-size: 13.5px;
  color: var(--text-secondary);
}

.section-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.select-filter {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  outline: none;
  cursor: pointer;
  transition: border-color var(--transition-fast);
}

.select-filter:focus {
  border-color: var(--border-focus);
}

.search-mini-wrapper {
  position: relative;
  min-width: 220px;
}

.search-mini-input {
  width: 100%;
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 8px 12px 8px 34px;
  font-size: 13.5px;
  color: var(--text-main);
  outline: none;
  transition: border-color var(--transition-fast);
}

.search-mini-input:focus {
  border-color: var(--border-focus);
}

.search-mini-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 13px;
  pointer-events: none;
}

.btn-primary {
  background: linear-gradient(135deg, #ea580c, #c2410c);
  color: #fff;
  border: none;
  padding: 9px 18px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: filter var(--transition-fast), transform var(--transition-fast);
  box-shadow: 0 4px 12px var(--accent-glow);
}

.btn-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  padding: 9px 16px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.btn-secondary:hover {
  background-color: var(--bg-elevated);
  border-color: rgba(255, 255, 255, 0.15);
}

.btn-danger {
  background: #dc2626;
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.btn-danger:hover {
  background: #b91c1c;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 40px;
}

.card-item {
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: transform var(--transition-fast), border-color var(--transition-fast), background-color var(--transition-fast);
  min-height: 190px;
}

.card-item:hover {
  background-color: var(--bg-card-hover);
  border-color: rgba(234, 88, 12, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.card-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 12px;
  line-height: 1.35;
}

.card-section-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: capitalize;
  margin-bottom: 4px;
}

.card-summary {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 18px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-updated {
  font-size: 12px;
  color: var(--text-muted);
}

.badge-tag {
  font-size: 11.5px;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background-color: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  font-weight: 500;
}

.badge-priority-Urgent { background: rgba(239, 68, 68, 0.15); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }
.badge-priority-High { background: rgba(249, 115, 22, 0.15); color: #fb923c; border: 1px solid rgba(249, 115, 22, 0.3); }
.badge-priority-Medium { background: rgba(234, 179, 8, 0.15); color: #facc15; border: 1px solid rgba(234, 179, 8, 0.3); }
.badge-priority-Low { background: rgba(59, 130, 246, 0.15); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); }

.badge-status-Open { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.badge-status-In_Progress { background: rgba(249, 115, 22, 0.15); color: #fb923c; }
.badge-status-Resolved { background: rgba(34, 197, 94, 0.15); color: #4ade80; }
.badge-status-Closed { background: rgba(107, 114, 128, 0.2); color: #9ca3af; }

.badge-status-active { background: rgba(34, 197, 94, 0.15); color: #4ade80; }
.badge-status-blocked { background: rgba(239, 68, 68, 0.15); color: #f87171; }
.badge-status-on_leave { background: rgba(234, 179, 8, 0.15); color: #facc15; }

.data-table-wrapper {
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 30px;
}

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

.data-table th {
  background-color: rgba(255, 255, 255, 0.02);
  padding: 14px 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
}

.data-table td {
  padding: 16px 20px;
  font-size: 13.5px;
  color: var(--text-main);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

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

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

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

.table-user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
}

.monitor-view-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.monitor-top-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 24px;
}

.active-staff-list {
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 680px;
  overflow-y: auto;
}

.staff-session-card {
  background-color: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.staff-session-card:hover {
  background-color: var(--bg-card-hover);
  border-color: rgba(234, 88, 12, 0.3);
}

.staff-session-card.selected {
  border-color: var(--accent-primary);
  background-color: rgba(234, 88, 12, 0.08);
}

.session-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.session-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.session-name-wrap {
  display: flex;
  flex-direction: column;
}

.session-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-main);
}

.session-rank {
  font-size: 11px;
  color: var(--text-muted);
}

.session-status-badge {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
}

.session-status-active {
  background-color: rgba(34, 197, 94, 0.15);
  color: #4ade80;
}

.session-status-idle {
  background-color: rgba(234, 179, 8, 0.15);
  color: #facc15;
}

.session-status-afk {
  background-color: rgba(239, 68, 68, 0.15);
  color: #f87171;
}

.session-meta-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-secondary);
}

.virtual-screenshare-box {
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
}

.screenshare-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 14px;
}

.screenshare-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.live-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: #dc2626;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.viewport-device-mockup {
  position: relative;
  background-color: #121110;
  border: 2px solid #2e2c29;
  border-radius: 10px;
  height: 520px;
  overflow: hidden;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.8);
}

.virtual-screen-scroll-container {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  position: relative;
  scroll-behavior: smooth;
  padding: 24px;
}

.virtual-cursor-pointer {
  position: absolute;
  width: 16px;
  height: 16px;
  pointer-events: none;
  z-index: 1000;
  transition: top 0.1s linear, left 0.1s linear;
}

.cursor-arrow {
  width: 0; 
  height: 0; 
  border-left: 12px solid #ea580c;
  border-right: 12px solid transparent;
  border-bottom: 18px solid transparent;
  transform: rotate(-35deg);
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.6));
}

.cursor-label {
  position: absolute;
  left: 18px;
  top: 10px;
  background-color: #ea580c;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
}

.productivity-stat-badge {
  display: flex;
  align-items: center;
  gap: 16px;
  background-color: rgba(255, 255, 255, 0.03);
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 12.5px;
}

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--bg-overlay);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

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

.modal-window {
  background-color: var(--bg-modal);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
  overflow: hidden;
  animation: modalIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.96) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

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

.modal-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-main);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  background-color: rgba(18, 17, 16, 0.5);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

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

.form-input, .form-textarea, .form-select {
  background-color: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 14px;
  color: var(--text-main);
  outline: none;
  font-family: inherit;
  transition: border-color var(--transition-fast);
}

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

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

.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background-color: var(--bg-sidebar);
  border-top: 1px solid var(--border-subtle);
  z-index: 999;
  justify-content: space-around;
  align-items: center;
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 11px;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.mobile-nav-item.active {
  color: var(--accent-primary);
  font-weight: 600;
}

.mobile-nav-icon {
  font-size: 19px;
}

@media (max-width: 1024px) {
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .monitor-top-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .sidebar {
    display: none;
  }
  .mobile-bottom-nav {
    display: flex;
  }
  .main-content {
    margin-left: 0;
    padding: 24px 16px 80px;
  }
  .kpi-grid {
    grid-template-columns: 1fr;
  }
  .cards-grid {
    grid-template-columns: 1fr;
  }
  .hero-title {
    font-size: 26px;
  }
}

#tutorial-editor-modal,
.fullscreen-editor-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  max-width: 100vw !important;
  max-height: 100vh !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
  border: none !important;
  background-color: #141312 !important;
  z-index: 99999 !important;
  display: none;
  flex-direction: column !important;
  overflow: hidden !important;
}

#tutorial-editor-modal.show,
.fullscreen-editor-overlay.show {
  display: flex !important;
}

.editor-navbar {
  height: 64px;
  background-color: #121110;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  gap: 16px;
  flex-shrink: 0;
  z-index: 10;
}

.editor-nav-left, .editor-nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.editor-mode-toggle {
  display: flex;
  background-color: #1d1b19;
  padding: 3px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  gap: 2px;
}

.editor-mode-pill {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.editor-mode-pill:hover {
  color: #fff;
}

.editor-mode-pill.active {
  background-color: var(--accent-primary);
  color: #ffffff;
  box-shadow: 0 2px 8px var(--accent-glow);
}

.editor-main-layout {
  flex: 1;
  display: flex;
  overflow: hidden;
  position: relative;
}

.editor-palette-bar {
  width: 270px;
  background-color: #141312;
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow-y: auto;
  padding: 16px 12px;
  gap: 16px;
  user-select: none;
}

.palette-section-header {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  margin-bottom: 6px;
  padding-left: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.palette-item-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

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

.palette-drag-item:hover {
  background-color: var(--bg-card-hover);
  border-color: var(--accent-primary);
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.palette-drag-item:active {
  cursor: grabbing;
}

.palette-item-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background-color: rgba(255,255,255,0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
  flex-shrink: 0;
}

.palette-item-info {
  flex: 1;
  min-width: 0;
}

.palette-item-title {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  line-height: 1.2;
}

.palette-item-desc {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.palette-drag-handle {
  color: var(--text-muted);
  opacity: 0.6;
  font-size: 14px;
}

.editor-canvas-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 36px 40px;
  background-color: #171615;
  display: flex;
  justify-content: center;
}

.editor-document-sheet {
  width: 100%;
  max-width: 920px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.editor-doc-header-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.editor-title-input {
  font-size: 26px;
  font-weight: 700;
  color: #ffffff;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  outline: none;
  padding: 6px 0;
  width: 100%;
  transition: border-color 0.2s ease;
}

.editor-title-input:focus {
  border-bottom-color: var(--accent-primary);
}

.editor-summary-input {
  font-size: 14.5px;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border-subtle);
  outline: none;
  padding: 6px 0;
  width: 100%;
}

.editor-summary-input:focus {
  border-bottom-color: rgba(255,255,255,0.2);
}

.editor-drop-zone {
  min-height: 10px;
  border-radius: 8px;
  margin: 3px 0;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.editor-drop-zone.drag-active {
  min-height: 44px;
  background-color: rgba(234, 88, 12, 0.12);
  border: 2px dashed var(--accent-primary);
  color: var(--accent-primary);
  font-size: 12.5px;
  font-weight: 700;
  box-shadow: 0 0 15px rgba(234, 88, 12, 0.2);
}

.builder-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 10px;
  padding: 16px;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.builder-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.builder-card.is-dragging {
  opacity: 0.4;
  border: 2px dashed var(--accent-primary);
}

.builder-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  padding-bottom: 10px;
}

.builder-card-type-tag {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.builder-card-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
}

.color-swatch-picker {
  display: flex;
  align-items: center;
  gap: 4px;
  background-color: rgba(0,0,0,0.25);
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid var(--border-subtle);
}

.color-dot {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.15s ease;
  border: 1px solid rgba(255,255,255,0.2);
}

.color-dot:hover {
  transform: scale(1.25);
}

.color-input-native {
  width: 20px;
  height: 20px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.markdown-editor-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.markdown-quick-toolbar {
  height: 44px;
  background-color: #181716;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 8px;
  overflow-x: auto;
  flex-shrink: 0;
}

.markdown-split-body {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
}

.markdown-raw-textarea {
  width: 100%;
  height: 100%;
  border: none;
  outline: none;
  background-color: #121110;
  color: #f1f5f9;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 13.5px;
  line-height: 1.6;
  padding: 24px;
  resize: none;
  border-right: 1px solid var(--border-subtle);
}

.markdown-live-preview {
  height: 100%;
  overflow-y: auto;
  padding: 28px 36px;
  background-color: #181716;
}

.showcase-drawer-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(0,0,0,0.65);
  backdrop-filter: blur(4px);
  z-index: 3000;
  display: none;
  justify-content: flex-end;
}

.showcase-drawer-backdrop.show {
  display: flex;
}

.showcase-drawer-window {
  width: 100%;
  max-width: 640px;
  height: 100%;
  background-color: #181716;
  border-left: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  box-shadow: -10px 0 40px rgba(0,0,0,0.8);
  animation: slideDrawer 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideDrawer {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

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

.showcase-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.showcase-item-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.showcase-code-box {
  background-color: #0f0e0d;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 10px 14px;
  font-family: monospace;
  font-size: 12.5px;
  color: #38bdf8;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  word-break: break-all;
}

.showcase-preview-box {
  background-color: rgba(255,255,255,0.02);
  border: 1px dashed var(--border-subtle);
  border-radius: 6px;
  padding: 12px 16px;
}

.tutorial-callout {
  border-radius: 8px;
  padding: 14px 18px;
  margin: 14px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tutorial-callout-info {
  background-color: rgba(56, 189, 248, 0.08);
  border-left: 4px solid #38bdf8;
  color: #bae6fd;
}

.tutorial-callout-tip {
  background-color: rgba(16, 185, 129, 0.08);
  border-left: 4px solid #10b981;
  color: #a7f3d0;
}

.tutorial-callout-warning {
  background-color: rgba(245, 158, 11, 0.08);
  border-left: 4px solid #f59e0b;
  color: #fde68a;
}

.tutorial-callout-danger {
  background-color: rgba(239, 68, 68, 0.08);
  border-left: 4px solid #ef4444;
  color: #fecaca;
}

.tutorial-callout-important {
  background-color: rgba(168, 85, 247, 0.08);
  border-left: 4px solid #a855f7;
  color: #e9d5ff;
}

.tutorial-code-block {
  background-color: #0f0e0d;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  overflow: hidden;
  margin: 14px 0;
}

.tutorial-code-header {
  background-color: #171615;
  border-bottom: 1px solid var(--border-subtle);
  padding: 6px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
}

.tutorial-code-body {
  padding: 14px 18px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  color: #4ade80;
  overflow-x: auto;
  line-height: 1.5;
}

.tutorial-table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.tutorial-table th {
  background-color: #242220;
  padding: 10px 14px;
  font-size: 12.5px;
  font-weight: 700;
  text-align: left;
  color: #fff;
  border-bottom: 1px solid var(--border-subtle);
}

.tutorial-table td {
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text-main);
  border-bottom: 1px solid var(--border-subtle);
  background-color: var(--bg-card);
}

.tutorial-quote {
  border-left: 3px solid var(--accent-primary);
  padding: 10px 18px;
  margin: 14px 0;
  font-style: italic;
  color: var(--text-secondary);
  background-color: rgba(255,255,255,0.02);
  border-radius: 0 8px 8px 0;
}

.tutorial-step-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 14px;
  background-color: rgba(255,255,255,0.02);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  margin: 6px 0;
}

.tutorial-step-badge {
  background-color: var(--accent-primary);
  color: #fff;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}


.showcase-drawer-backdrop {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  background: rgba(0,0,0,0.6);
  z-index: 10000;
  display: none;
  justify-content: flex-end;
}
.showcase-drawer-backdrop.show {
  display: flex;
}
.showcase-drawer-window {
  width: 450px;
  background: var(--bg-sidebar);
  height: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 15px rgba(0,0,0,0.5);
  animation: slideInRight 0.2s ease-out;
}
@keyframes slideInRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}
.showcase-drawer-header {
  padding: 16px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.showcase-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.showcase-item-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.showcase-code-box {
  background: #0c0b0a;
  padding: 8px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 11.5px;
  color: #4ade80;
  border: 1px solid var(--border-subtle);
}
.showcase-preview-box {
  background: var(--bg-main);
  padding: 12px;
  border-radius: 4px;
  border: 1px solid var(--border-subtle);
}
.form-textarea { width: 100%; box-sizing: border-box; resize: vertical; }

.admin-side-menu .admin-tab-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
}
.admin-side-menu .admin-tab-btn:hover {
  background: rgba(255,255,255,0.04);
  color: var(--text-main);
}
.admin-side-menu .admin-tab-btn.active {
  background: rgba(234, 88, 12, 0.1);
  color: var(--accent-primary);
  font-weight: 600;
}
.admin-side-menu .admin-tab-btn i {
  width: 16px; height: 16px;
}

/* Sidebar Collapse System */
.sidebar.collapsed {
  width: 70px;
}
.sidebar.collapsed .brand-title,
.sidebar.collapsed .nav-item span:not(.nav-item-icon),
.sidebar.collapsed .nav-item-badge,
.sidebar.collapsed .sidebar-admin-divider,
.sidebar.collapsed .user-info-text,
.sidebar.collapsed .user-profile-widget i {
  display: none !important;
}
.sidebar.collapsed .brand-wrapper {
  justify-content: center;
}
.sidebar.collapsed .nav-item {
  justify-content: center;
  padding: 10px;
}
.sidebar.collapsed .sidebar-header {
  padding: 20px 10px;
  justify-content: center;
}
.sidebar.collapsed .sidebar-header-actions {
  display: flex !important;
}
.sidebar.collapsed #sidebar-collapse-btn i {
  transform: rotate(180deg);
}
.sidebar.collapsed .user-profile-widget {
  justify-content: center;
  padding: 6px;
}
.main-content.expanded {
  margin-left: 70px;
}

/* Mobile Responsiveness */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-sidebar);
  border-top: 1px solid var(--border-subtle);
  z-index: 1000;
  padding: 8px 12px;
  padding-bottom: max(8px, env(safe-area-inset-bottom));
}
.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 10px;
  font-weight: 500;
  cursor: pointer;
}
.mobile-nav-item.active {
  color: var(--accent-primary);
}
.mobile-nav-item i {
  width: 20px;
  height: 20px;
}

@media (max-width: 850px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.mobile-open {
    transform: translateX(0);
    width: 280px;
    z-index: 2000;
  }
  .main-content {
    margin-left: 0 !important;
    padding: 20px 16px 80px 16px; 
  }
  .mobile-bottom-nav {
    display: flex;
    justify-content: space-around;
  }
  #view-admin > div {
    flex-direction: column !important;
  }
  #view-admin > div > div:first-child {
    width: 100% !important;
    border-right: none !important;
    border-bottom: 1px solid var(--border-subtle);
    padding: 16px !important;
  }
  #view-admin > div > div:last-child {
    padding: 16px !important;
  }
  .cards-grid, .kpi-grid {
    grid-template-columns: 1fr;
  }
  .data-table-wrapper {
    overflow-x: auto;
  }
  .modal-window {
    width: 95%;
    max-height: 90vh;
  }
}

/* --- STAFF PERKS & FLOW BUILDER STYLES --- */
.perk-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.perk-card:hover {
  transform: translateY(-3px);
  border-color: rgba(234, 88, 12, 0.4);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.perk-card.claimable {
  border-color: rgba(34, 197, 94, 0.4);
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.12);
}

.perk-card.claimable:hover {
  border-color: rgba(34, 197, 94, 0.7);
  box-shadow: 0 0 25px rgba(34, 197, 94, 0.25);
}

.perk-card.claimed {
  border-color: rgba(168, 85, 247, 0.4);
  background: linear-gradient(180deg, rgba(168, 85, 247, 0.05) 0%, var(--bg-card) 100%);
}

.perk-card.locked {
  opacity: 0.88;
  border-color: rgba(255, 255, 255, 0.06);
}

.perk-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.perk-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(234, 88, 12, 0.12);
  border: 1px solid rgba(234, 88, 12, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
  flex-shrink: 0;
}

.perk-icon-wrap.green {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.3);
  color: #4ade80;
}

.perk-icon-wrap.purple {
  background: rgba(168, 85, 247, 0.12);
  border-color: rgba(168, 85, 247, 0.3);
  color: #c084fc;
}

.tenure-progress-box {
  margin: 16px 0 18px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 10px 12px;
}

.tenure-progress-bar-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 6px;
}

.tenure-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #ea580c, #22c55e);
  border-radius: 999px;
  transition: width 0.4s ease;
}

.pagination-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border-subtle);
  flex-wrap: wrap;
  gap: 12px;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.page-pill-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.page-pill-btn:hover {
  background: var(--bg-elevated);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.page-pill-btn.active {
  background: var(--accent-primary);
  color: #fff;
  border-color: var(--accent-primary);
  box-shadow: 0 2px 10px var(--accent-glow);
}

.page-pill-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.active-claims-banner {
  background: linear-gradient(135deg, rgba(234, 88, 12, 0.1), rgba(168, 85, 247, 0.08));
  border: 1px solid rgba(234, 88, 12, 0.25);
  border-radius: var(--radius-lg);
  padding: 18px 22px;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.flow-step-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 12px;
  transition: border-color var(--transition-fast);
}

.flow-step-item:hover {
  border-color: rgba(234, 88, 12, 0.3);
}

.flow-step-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

/* --- HALLOWEEN THEME OVERRIDES --- */
body.halloween-theme {
  --bg-main: #12071a;
  --bg-sidebar: #0b0312;
  --bg-card: #1c0d29;
  --bg-card-hover: #271439;
  --bg-input: #1a0a27;
  --bg-elevated: #26113b;
  --bg-modal: #160824;
  --accent-primary: #ff7300;
  --accent-hover: #ff8c00;
  --accent-dark: #b35000;
  --accent-active-pill: #cc5c00;
  --accent-glow: rgba(255, 115, 0, 0.45);
  --border-subtle: rgba(255, 115, 0, 0.2);
  --border-focus: rgba(255, 140, 0, 0.7);
  --border-card: rgba(255, 115, 0, 0.15);
  background-image: radial-gradient(circle at 10% 20%, rgba(124, 58, 237, 0.08), transparent 30%), radial-gradient(circle at 90% 80%, rgba(255, 115, 0, 0.08), transparent 30%);
}

body.halloween-theme ::-webkit-scrollbar-thumb {
  background: rgba(255, 115, 0, 0.4);
  border-radius: 4px;
}

.spooky-glass-card {
  background: rgba(26, 12, 38, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 115, 0, 0.28);
  border-radius: 16px;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.55), inset 0 0 12px rgba(255, 115, 0, 0.04);
  padding: 24px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.spooky-glass-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 45px rgba(0, 0, 0, 0.65), inset 0 0 16px rgba(255, 115, 0, 0.12);
  border-color: rgba(255, 115, 0, 0.55);
}

.spooky-gradient-text {
  background: linear-gradient(135deg, #ff8c00, #ffb703, #c084fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
}

/* Event Prize Podium */
.spooky-podium-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.spooky-podium-card {
  background: rgba(20, 8, 30, 0.85);
  border-radius: 16px;
  padding: 24px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.spooky-podium-card:hover {
  transform: translateY(-5px);
}

.spooky-podium-gold {
  border-color: rgba(251, 191, 36, 0.6);
  box-shadow: 0 0 25px rgba(251, 191, 36, 0.2), inset 0 0 15px rgba(251, 191, 36, 0.08);
  background: linear-gradient(180deg, rgba(45, 25, 10, 0.85), rgba(20, 8, 30, 0.95));
}
.spooky-podium-gold:hover {
  box-shadow: 0 0 35px rgba(251, 191, 36, 0.35), inset 0 0 20px rgba(251, 191, 36, 0.15);
}

.spooky-podium-silver {
  border-color: rgba(203, 213, 225, 0.5);
  box-shadow: 0 0 25px rgba(203, 213, 225, 0.15), inset 0 0 15px rgba(203, 213, 225, 0.05);
  background: linear-gradient(180deg, rgba(30, 35, 45, 0.85), rgba(20, 8, 30, 0.95));
}
.spooky-podium-silver:hover {
  box-shadow: 0 0 35px rgba(203, 213, 225, 0.25), inset 0 0 20px rgba(203, 213, 225, 0.1);
}

.spooky-podium-bronze {
  border-color: rgba(217, 119, 6, 0.5);
  box-shadow: 0 0 25px rgba(217, 119, 6, 0.15), inset 0 0 15px rgba(217, 119, 6, 0.05);
  background: linear-gradient(180deg, rgba(40, 22, 12, 0.85), rgba(20, 8, 30, 0.95));
}
.spooky-podium-bronze:hover {
  box-shadow: 0 0 35px rgba(217, 119, 6, 0.25), inset 0 0 20px rgba(217, 119, 6, 0.1);
}

.spooky-prize-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.spooky-reward-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 13.5px;
  color: #f1f5f9;
}

.spooky-reward-item i {
  color: #ffb703;
  flex-shrink: 0;
  margin-top: 3px;
}

/* Fortune Wheel */
.spooky-wheel-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

.spooky-wheel-box {
  position: relative;
  width: 240px;
  height: 240px;
  margin: 15px auto;
}

.spooky-wheel-canvas {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  box-shadow: 0 0 25px rgba(255, 115, 0, 0.4), inset 0 0 15px rgba(0, 0, 0, 0.5);
  border: 4px solid #ff7300;
  transition: transform 4s cubic-bezier(0.17, 0.67, 0.12, 0.99);
}

.spooky-wheel-pointer {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
  border-top: 22px solid #ffd166;
  z-index: 10;
  filter: drop-shadow(0 3px 6px rgba(0,0,0,0.7));
}

.spooky-wheel-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  background: radial-gradient(circle, #ff8c00, #b35000);
  border-radius: 50%;
  border: 3px solid #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px rgba(0,0,0,0.8);
  z-index: 5;
}

/* Staff Picker Modal */
.spooky-staff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  max-height: 360px;
  overflow-y: auto;
  padding-right: 6px;
  margin-top: 14px;
}

.spooky-staff-card {
  background: rgba(35, 17, 51, 0.6);
  border: 1px solid rgba(255, 115, 0, 0.2);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.spooky-staff-card:hover {
  background: rgba(60, 25, 90, 0.8);
  border-color: #ff7300;
  transform: translateY(-2px);
}

.spooky-staff-card.selected {
  background: linear-gradient(135deg, rgba(255, 115, 0, 0.25), rgba(124, 58, 237, 0.35));
  border-color: #ffb703;
  box-shadow: 0 0 15px rgba(255, 115, 0, 0.3);
}

/* Spooky Activity Feed */
.spooky-feed-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 115, 0, 0.1);
  font-size: 13.5px;
  transition: background 0.2s ease;
}

.spooky-feed-item:hover {
  background: rgba(255, 115, 0, 0.04);
}

.spooky-feed-item:last-child {
  border-bottom: none;
}

/* Floating Mystery Pumpkin */
.spooky-mystery-pumpkin {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: radial-gradient(circle, #ff8c00, #b35000);
  box-shadow: 0 0 25px rgba(255, 115, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 999;
  animation: spookyFloat 3s ease-in-out infinite;
  transition: transform 0.2s ease;
}

.spooky-mystery-pumpkin:hover {
  transform: scale(1.15) rotate(10deg);
}

@keyframes spookyFloat {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-12px) rotate(-6deg); }
}

