:root {
  --bg-primary: #0f1117;
  --bg-secondary: #1a1d27;
  --bg-card: #242836;
  --bg-card-hover: #2a2f40;
  --bg-input: #1e2130;
  --border: #2e3348;
  --text-primary: #e4e6ed;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --green: #22c55e;
  --green-dim: #166534;
  --red: #ef4444;
  --red-dim: #7f1d1d;
  --amber: #f59e0b;
  --amber-dim: #78350f;
  --sidebar-width: 240px;
  --radius: 8px;
  --radius-sm: 4px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ==================== SIDEBAR ==================== */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  z-index: 100;
}

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

.sidebar-header h2 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.sidebar-header .logo {
  width: 28px;
  height: 28px;
  background: var(--accent);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

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

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  transition: all 0.15s;
  position: relative;
  cursor: pointer;
}

.nav-item:hover {
  background: var(--bg-card);
  color: var(--text-primary);
}

.nav-item.active {
  background: var(--accent);
  color: white;
}

.nav-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.nav-item .badge {
  position: absolute;
  right: 10px;
  background: var(--red);
  color: white;
  font-size: 11px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 10px;
  min-width: 20px;
  text-align: center;
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  font-size: 12px;
}

.connection-status {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
}

.connection-status::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
}

.connection-status.connected::before {
  background: var(--green);
}

.mute-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  margin-left: auto;
  font-size: 16px;
}

.mute-btn:hover { color: var(--text-primary); }

/* ==================== MAIN CONTENT ==================== */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  padding: 24px;
  min-height: 100vh;
}

.page-header {
  margin-bottom: 24px;
}

.page-header h1 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 4px;
}

.page-header p {
  color: var(--text-secondary);
  font-size: 14px;
}

/* ==================== STAT CARDS ==================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

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

.stat-card .value {
  font-size: 28px;
  font-weight: 700;
}

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

.stat-card.green .value { color: var(--green); }
.stat-card.red .value { color: var(--red); }
.stat-card.amber .value { color: var(--amber); }
.stat-card.blue .value { color: var(--accent); }

/* ==================== DASHBOARD LAYOUT ==================== */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 24px;
}

@media (max-width: 1200px) {
  .dashboard-grid { grid-template-columns: 1fr; }
}

.section-title {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 12px;
}

/* ==================== ALARM FEED ==================== */
.alarm-feed {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-height: 600px;
  overflow-y: auto;
}

.alarm-feed-empty {
  padding: 40px;
  text-align: center;
  color: var(--text-muted);
}

.alarm-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
  animation: fadeIn 0.3s ease;
}

.alarm-item:hover { background: var(--bg-card-hover); }
.alarm-item:last-child { border-bottom: none; }

.alarm-item .alarm-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.alarm-item .alarm-time {
  font-size: 11px;
  color: var(--text-muted);
  font-family: 'SF Mono', Monaco, monospace;
}

.alarm-item .alarm-device {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
}

.alarm-item .alarm-desc {
  font-size: 13px;
  color: var(--text-primary);
}

.alarm-item .alarm-cid {
  font-size: 11px;
  color: var(--text-muted);
  font-family: 'SF Mono', Monaco, monospace;
}

.alarm-item .alarm-meta {
  display: flex;
  gap: 12px;
  margin-top: 4px;
  font-size: 11px;
  color: var(--text-secondary);
}

.alarm-item.severity-critical { border-left: 3px solid var(--red); }
.alarm-item.severity-warning { border-left: 3px solid var(--amber); }
.alarm-item.severity-info { border-left: 3px solid var(--accent); }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==================== PANEL STATUS GRID ==================== */
.panels-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.panel-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  cursor: pointer;
  transition: all 0.15s;
}

.panel-card:hover { border-color: var(--accent); }

.panel-card .panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.panel-card .panel-name {
  font-size: 14px;
  font-weight: 600;
}

.panel-card .panel-serial {
  font-size: 11px;
  color: var(--text-muted);
  font-family: 'SF Mono', Monaco, monospace;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.status-dot.online { background: var(--green); box-shadow: 0 0 6px var(--green); }
.status-dot.offline { background: var(--red); box-shadow: 0 0 6px var(--red); }

@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 8px var(--red); }
  50% { opacity: 0.7; box-shadow: 0 0 20px var(--red); }
}

.panel-subsystems {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.subsystem-tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 500;
}

.subsystem-tag.armed {
  background: var(--green-dim);
  color: var(--green);
  border: 1px solid var(--green);
}

.subsystem-tag.disarmed {
  background: var(--bg-input);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

/* ==================== PANEL DETAIL ==================== */
.panel-detail {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-top: 16px;
}

.panel-detail h3 {
  font-size: 16px;
  margin-bottom: 16px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.detail-item .detail-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.detail-item .detail-value {
  font-size: 14px;
  color: var(--text-primary);
  font-family: 'SF Mono', Monaco, monospace;
}

/* ==================== DATA TABLE ==================== */
.data-table-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table th {
  background: var(--bg-secondary);
  padding: 10px 14px;
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 600;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
}

.data-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
}

.data-table tr:hover td { background: var(--bg-card-hover); }
.data-table tr:last-child td { border-bottom: none; }

.data-table .mono {
  font-family: 'SF Mono', Monaco, monospace;
  font-size: 12px;
}

/* ==================== FILTERS BAR ==================== */
.filters-bar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.filter-group label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

/* ==================== FORM CONTROLS ==================== */
input, select, textarea {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s;
  font-family: inherit;
}

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

input::placeholder { color: var(--text-muted); }
select { cursor: pointer; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}

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

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--bg-card-hover); }

.btn-danger {
  background: var(--red-dim);
  color: var(--red);
  border: 1px solid var(--red);
}
.btn-danger:hover { background: var(--red); color: white; }

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

/* ==================== PAGINATION ==================== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px;
}

.pagination button {
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
}

.pagination button:hover { background: var(--bg-card-hover); }
.pagination button.active { background: var(--accent); border-color: var(--accent); color: white; }
.pagination button:disabled { opacity: 0.4; cursor: not-allowed; }

.pagination .page-info {
  font-size: 12px;
  color: var(--text-secondary);
}

/* ==================== MODAL ==================== */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.15s;
}

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 90%;
  max-width: 560px;
  max-height: 85vh;
  overflow-y: auto;
}

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

.modal-header h3 { font-size: 16px; }

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
}
.modal-close:hover { color: var(--text-primary); }

.modal-body { padding: 20px; }

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

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

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
}

.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
}

.checkbox-label:hover { border-color: var(--accent); }
.checkbox-label input[type="checkbox"] { width: auto; }
.checkbox-label input[type="checkbox"]:checked + span { color: var(--accent); }

.radio-group {
  display: flex;
  gap: 8px;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
}

.radio-label:hover { border-color: var(--accent); }
.radio-label input[type="radio"] { display: none; }
.radio-label.selected { border-color: var(--accent); background: rgba(59, 130, 246, 0.1); color: var(--accent); }
.radio-label.selected.critical { border-color: var(--red); background: var(--red-dim); color: var(--red); }
.radio-label.selected.warning { border-color: var(--amber); background: var(--amber-dim); color: var(--amber); }
.radio-label.selected.info { border-color: var(--accent); background: rgba(59, 130, 246, 0.1); color: var(--accent); }

/* ==================== TOGGLE SWITCH ==================== */
.toggle {
  position: relative;
  width: 40px;
  height: 22px;
  display: inline-block;
}

.toggle input { display: none; }

.toggle-slider {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 11px;
  cursor: pointer;
  transition: all 0.2s;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  left: 2px;
  top: 2px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: all 0.2s;
}

.toggle input:checked + .toggle-slider {
  background: var(--accent);
  border-color: var(--accent);
}

.toggle input:checked + .toggle-slider::before {
  transform: translateX(18px);
  background: white;
}

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

.toast {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  animation: slideIn 0.3s ease;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.toast.closing { animation: slideOut 0.3s ease forwards; }

.toast-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

.toast.critical { border-left: 3px solid var(--red); }
.toast.critical .toast-icon { background: var(--red-dim); color: var(--red); }

.toast.warning { border-left: 3px solid var(--amber); }
.toast.warning .toast-icon { background: var(--amber-dim); color: var(--amber); }

.toast.info { border-left: 3px solid var(--accent); }
.toast.info .toast-icon { background: rgba(59, 130, 246, 0.15); color: var(--accent); }

.toast-content { flex: 1; }
.toast-title { font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.toast-message { font-size: 12px; color: var(--text-secondary); }

.toast-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  padding: 0;
  flex-shrink: 0;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(100%); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideOut {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(100%); }
}

/* ==================== TRIGGER LIST ==================== */
.trigger-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.trigger-item.disabled { opacity: 0.5; }

.trigger-info { flex: 1; }
.trigger-name { font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.trigger-desc { font-size: 12px; color: var(--text-secondary); }

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

.severity-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.severity-badge.critical { background: var(--red-dim); color: var(--red); }
.severity-badge.warning { background: var(--amber-dim); color: var(--amber); }
.severity-badge.info { background: rgba(59, 130, 246, 0.15); color: var(--accent); }

/* ==================== EMPTY STATE ==================== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state svg {
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
  opacity: 0.4;
}

.empty-state p {
  font-size: 14px;
  margin-bottom: 16px;
}

/* ==================== LOADING ==================== */
.loading {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 12px;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ==================== FLATPICKR OVERRIDES ==================== */
.flatpickr-input {
  background: var(--bg-input) !important;
  border: 1px solid var(--border) !important;
  color: var(--text-primary) !important;
  cursor: pointer !important;
}

/* ==================== SCROLLBAR ==================== */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ==================== ZONES TABLE ==================== */
.zone-status-ok { color: var(--green); }
.zone-status-fault { color: var(--red); }
.zone-status-bypass { color: var(--amber); }

/* ==================== DASHBOARD TRIGGERS PANEL ==================== */
.triggers-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  margin-bottom: 8px;
}

.trigger-dash-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  transition: all 0.3s;
}

.trigger-dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.trigger-dash-name {
  font-size: 14px;
  font-weight: 600;
}

.trigger-dash-detail {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.trigger-dash-action {
  display: inline-block;
  background: var(--red-dim);
  color: var(--red);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  margin-top: 4px;
}

.trigger-dash-last-fire {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--amber);
  font-weight: 500;
}

/* Fired state - pulsing border */
.trigger-dash-fired {
  border-color: var(--red);
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.3);
  animation: triggerPulse 1s ease-in-out infinite;
}

@keyframes triggerPulse {
  0%, 100% { box-shadow: 0 0 8px rgba(239, 68, 68, 0.2); }
  50% { box-shadow: 0 0 20px rgba(239, 68, 68, 0.5); }
}

/* ==================== FULLSCREEN ALERT ==================== */
.fullscreen-alert {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fsAlertIn 0.3s ease;
}

.fullscreen-alert.severity-critical {
  background: rgba(127, 29, 29, 0.92);
}
.fullscreen-alert.severity-warning {
  background: rgba(120, 53, 15, 0.92);
}
.fullscreen-alert.severity-info {
  background: rgba(30, 58, 138, 0.92);
}

.fs-alert-content {
  text-align: center;
  max-width: 500px;
  padding: 40px;
}

.fs-alert-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  font-weight: 900;
  animation: fsIconPulse 0.8s ease-in-out infinite;
}

.severity-critical .fs-alert-icon {
  background: var(--red);
  color: white;
}
.severity-warning .fs-alert-icon {
  background: var(--amber);
  color: #1a1a1a;
}
.severity-info .fs-alert-icon {
  background: var(--accent);
  color: white;
}

@keyframes fsIconPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.fs-alert-title {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(255,255,255,0.7);
  margin-bottom: 8px;
}

.fs-alert-trigger-name {
  font-size: 32px;
  font-weight: 800;
  color: white;
  margin-bottom: 20px;
}

.fs-alert-details {
  background: rgba(0,0,0,0.3);
  border-radius: var(--radius);
  padding: 16px 24px;
  margin-bottom: 24px;
}

.fs-alert-device {
  font-size: 18px;
  font-weight: 600;
  color: white;
  margin-bottom: 4px;
}

.fs-alert-desc {
  font-size: 15px;
  color: rgba(255,255,255,0.8);
  margin-bottom: 4px;
}

.fs-alert-action {
  display: inline-block;
  background: var(--red);
  color: white;
  font-size: 13px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 4px;
  margin-top: 8px;
  animation: fsActionBlink 0.6s ease-in-out infinite;
}

@keyframes fsActionBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.fs-alert-time {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  margin-top: 6px;
  font-family: 'SF Mono', Monaco, monospace;
}

.fs-alert-dismiss {
  background: rgba(255,255,255,0.15);
  border: 2px solid rgba(255,255,255,0.3);
  color: white;
  font-size: 16px;
  font-weight: 700;
  padding: 12px 40px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.15s;
  letter-spacing: 0.05em;
}

.fs-alert-dismiss:hover {
  background: rgba(255,255,255,0.25);
  border-color: rgba(255,255,255,0.5);
}

@keyframes fsAlertIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ==================== LOGIN PAGE ==================== */
.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--bg-primary);
}

.login-container {
  width: 100%;
  max-width: 400px;
  padding: 20px;
}

.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 32px;
  text-align: center;
}

.login-logo {
  width: 56px;
  height: 56px;
  background: var(--accent);
  color: white;
  font-size: 28px;
  font-weight: 800;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.login-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.login-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.login-field {
  text-align: left;
  margin-bottom: 16px;
}

.login-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.login-field input {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s;
}

.login-field input:focus {
  border-color: var(--accent);
}

.login-error {
  color: var(--red);
  font-size: 13px;
  min-height: 20px;
  margin-bottom: 8px;
}

.login-btn {
  width: 100%;
  padding: 11px;
  font-size: 14px;
  font-weight: 600;
}

/* Sidebar user section */
.sidebar-user {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-secondary);
}

.sidebar-user span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.logout-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: color 0.15s;
}

.logout-btn:hover {
  color: var(--red);
}
