/**
 * Dashboard Stylesheet
 * Extracted from dashboard-view.ts for SOLID refactoring (Phase 1)
 */

* { box-sizing: border-box; }
body { font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; margin: 0; background: #0a0e1a; color: #e2e8f0; line-height: 1.5; }

/* Header */
header { background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%); padding: 20px 32px; border-bottom: 2px solid #334155; box-shadow: 0 4px 20px rgba(0,0,0,0.3); }
header h1 { margin: 0 0 8px 0; font-size: 28px; font-weight: 700; color: #f1f5f9; }
header .subtitle { margin: 0; color: #94a3b8; font-size: 14px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.status-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 6px; font-size: 12px; font-weight: 600; }
.status-badge.healthy { background: rgba(16, 185, 129, 0.15); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.3); }
.status-badge.warning { background: rgba(251, 191, 36, 0.15); color: #fbbf24; border: 1px solid rgba(251, 191, 36, 0.3); }
.status-badge.error { background: rgba(239, 68, 68, 0.15); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.3); }
.status-dot { width: 6px; height: 6px; border-radius: 50%; animation: pulse 2s ease-in-out infinite; }
.status-badge.healthy .status-dot { background: #10b981; }
.status-badge.warning .status-dot { background: #fbbf24; }
.status-badge.error .status-dot { background: #ef4444; }

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

/* Login banner */
.login-banner {
  width: 100%;
  padding: 0;
  z-index: 1000;
  animation: slideDown 0.3s ease-out;
}
.login-banner.warning {
  background: linear-gradient(90deg, rgba(251, 191, 36, 0.15) 0%, rgba(251, 191, 36, 0.05) 100%);
  border-bottom: 1px solid rgba(251, 191, 36, 0.3);
}
.login-banner.error {
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.2) 0%, rgba(239, 68, 68, 0.05) 100%);
  border-bottom: 1px solid rgba(239, 68, 68, 0.4);
}
.login-banner-content {
  max-width: 1600px;
  margin: 0 auto;
  padding: 12px 32px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.login-banner-icon {
  font-size: 24px;
  flex-shrink: 0;
}
.login-banner.warning .login-banner-icon { color: #fbbf24; }
.login-banner.error .login-banner-icon { color: #ef4444; }
.login-banner-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 200px;
}
.login-banner-text strong {
  font-size: 14px;
  font-weight: 600;
}
.login-banner.warning .login-banner-text strong { color: #fbbf24; }
.login-banner.error .login-banner-text strong { color: #ef4444; }
.login-banner-text span {
  font-size: 13px;
  color: #94a3b8;
  line-height: 1.4;
}
.login-banner-action {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: white;
  border: none;
  padding: 8px 20px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.login-banner-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}
.login-banner-dismiss {
  background: transparent;
  border: none;
  color: #64748b;
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  transition: color 0.2s ease;
}
.login-banner-dismiss:hover { color: #f1f5f9; }
@keyframes slideDown {
  from { transform: translateY(-100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Main layout */
main { padding: 32px; max-width: 1600px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }

/* Section headers */
.section-header { margin: 0 0 16px 0; font-size: 20px; font-weight: 600; color: #f1f5f9; display: flex; align-items: center; gap: 12px; }
.section-header::before { content: ''; width: 4px; height: 24px; background: linear-gradient(180deg, #3b82f6, #1d4ed8); border-radius: 4px; }

/* Cards */
.card { background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%); border: 1px solid #334155; border-radius: 16px; padding: 20px; box-shadow: 0 4px 20px rgba(0,0,0,0.2); transition: transform 0.2s ease, box-shadow 0.2s ease; }
.card:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(0,0,0,0.3); }
.card h2 { margin: 0 0 12px; font-size: 14px; color: #94a3b8; letter-spacing: 0.05em; text-transform: uppercase; font-weight: 600; }
.card h3 { margin: 0 0 16px; font-size: 18px; color: #f1f5f9; font-weight: 600; }
.card h4 { margin: 0 0 12px; font-size: 16px; color: #cbd5e1; font-weight: 600; }

/* Grids */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }

/* Metric cards */
.metric-card { position: relative; overflow: hidden; }
.metric { font-size: 40px; font-weight: 700; margin: 8px 0; background: linear-gradient(135deg, #60a5fa, #3b82f6); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.metric.success { background: linear-gradient(135deg, #34d399, #10b981); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.metric.warning { background: linear-gradient(135deg, #fbbf24, #f59e0b); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.metric.danger { background: linear-gradient(135deg, #f87171, #ef4444); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.metric-subtitle { color: #64748b; font-size: 13px; margin-top: 4px; }

/* Progress bars */
.progress-bar { background: #0a0e1a; border-radius: 999px; overflow: hidden; height: 8px; margin-top: 12px; position: relative; }
.progress-fill { height: 100%; transition: width 0.3s ease; border-radius: 999px; }
.progress-fill.low { background: linear-gradient(90deg, #10b981, #059669); }
.progress-fill.medium { background: linear-gradient(90deg, #3b82f6, #1d4ed8); }
.progress-fill.high { background: linear-gradient(90deg, #fbbf24, #f59e0b); }
.progress-fill.critical { background: linear-gradient(90deg, #ef4444, #dc2626); }

/* Tables */
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px; text-align: left; border-bottom: 1px solid #1e293b; }
th { color: #94a3b8; font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em; background: #0a0e1a; position: sticky; top: 0; z-index: 1; }
tr:hover td { background: rgba(30, 41, 59, 0.5); }
tbody tr:last-child td { border-bottom: none; }

/* Tags */
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 6px; font-size: 12px; font-weight: 600; }
.tag.queued { background: rgba(100, 116, 139, 0.15); color: #94a3b8; border: 1px solid rgba(100, 116, 139, 0.3); }
.tag.processing { background: rgba(59, 130, 246, 0.15); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); }
.tag.done { background: rgba(16, 185, 129, 0.15); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.3); }
.tag.rejected { background: rgba(239, 68, 68, 0.15); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.3); }

/* Utilities */
.muted { color: #64748b; font-size: 13px; }
code { font-family: 'SF Mono', Monaco, 'Cascadia Code', Consolas, monospace; background: rgba(51, 65, 85, 0.5); padding: 2px 6px; border-radius: 4px; font-size: 12px; }
pre { white-space: pre-wrap; word-wrap: break-word; background: #0a0e1a; border-radius: 12px; padding: 16px; border: 1px solid #1e293b; font-size: 12px; max-height: 400px; overflow-y: auto; }
a { color: #60a5fa; text-decoration: none; transition: color 0.2s ease; }
a:hover { color: #93c5fd; text-decoration: underline; }

/* Pagination */
.pagination { display: flex; justify-content: space-between; align-items: center; padding: 16px 0; gap: 16px; flex-wrap: wrap; }
.pagination a { color: #e2e8f0; padding: 10px 16px; border: 1px solid #334155; border-radius: 8px; background: #1e293b; text-decoration: none; transition: all 0.2s ease; font-weight: 500; }
.pagination a:hover:not([aria-disabled="true"]) { background: #334155; border-color: #475569; transform: translateY(-1px); }
.pagination a[aria-disabled="true"] { opacity: 0.4; pointer-events: none; }
.pagination .range { color: #94a3b8; font-size: 14px; }

/* Retry button */
.retry-btn { color: #e2e8f0; padding: 6px 12px; border: 1px solid #3b82f6; border-radius: 6px; background: rgba(59, 130, 246, 0.1); cursor: pointer; transition: all 0.2s ease; font-weight: 500; font-size: 13px; }
.retry-btn:hover { background: rgba(59, 130, 246, 0.2); border-color: #60a5fa; transform: translateY(-1px); }
.retry-btn:active { transform: translateY(0); }
.retry-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* Clickable job links */
.job-link { cursor: pointer; color: #3b82f6; transition: all 0.2s ease; }
.job-link:hover { color: #60a5fa; text-decoration: underline; }

/* Sortable table headers */
.sortable { cursor: pointer; user-select: none; transition: background 0.2s ease; }
.sortable:hover { background: rgba(59, 130, 246, 0.1); }
.sort-indicator { margin-left: 4px; color: #64748b; font-size: 10px; }
.sortable[data-direction="asc"] .sort-indicator { color: #3b82f6; }
.sortable[data-direction="desc"] .sort-indicator { color: #3b82f6; }

/* Toast Notifications */
.toast-container { position: fixed; top: 20px; right: 20px; z-index: 10000; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast { pointer-events: auto; padding: 14px 20px; border-radius: 8px; background: #1e293b; border: 1px solid #334155; color: #e2e8f0; font-size: 14px; box-shadow: 0 10px 30px rgba(0,0,0,0.4); animation: slideIn 0.3s ease; display: flex; align-items: center; gap: 12px; max-width: 400px; }
.toast.success { border-left: 4px solid #10b981; }
.toast.error { border-left: 4px solid #ef4444; }
.toast.warning { border-left: 4px solid #f59e0b; }
.toast.info { border-left: 4px solid #3b82f6; }
.toast-icon { font-size: 18px; }
.toast-close { margin-left: auto; padding: 4px; cursor: pointer; opacity: 0.6; transition: opacity 0.2s; background: none; border: none; color: #e2e8f0; font-size: 16px; }
.toast-close:hover { opacity: 1; }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes slideOut { from { transform: translateX(0); opacity: 1; } to { transform: translateX(100%); opacity: 0; } }

/* Keyboard navigation */
tr.keyboard-focus { background: rgba(59, 130, 246, 0.15) !important; outline: 2px solid #3b82f6; outline-offset: -2px; }

/* Help tooltips */
.help-tooltip { position: relative; display: inline-flex; align-items: center; gap: 4px; cursor: help; }
.help-tooltip .help-icon { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 50%; background: rgba(148, 163, 184, 0.2); color: #94a3b8; font-size: 10px; font-weight: bold; transition: all 0.2s ease; }
.help-tooltip:hover .help-icon { background: rgba(59, 130, 246, 0.3); color: #60a5fa; }
.help-tooltip .tooltip-text { visibility: hidden; position: absolute; z-index: 1000; bottom: 125%; left: 50%; transform: translateX(-50%); min-width: 200px; max-width: 300px; padding: 10px 14px; background: #1e293b; color: #e2e8f0; font-size: 12px; line-height: 1.5; border-radius: 8px; border: 1px solid #334155; box-shadow: 0 10px 25px rgba(0,0,0,0.4); opacity: 0; transition: opacity 0.2s ease, visibility 0.2s ease; }
.help-tooltip .tooltip-text::after { content: ''; position: absolute; top: 100%; left: 50%; margin-left: -6px; border-width: 6px; border-style: solid; border-color: #1e293b transparent transparent transparent; }
.help-tooltip:hover .tooltip-text { visibility: visible; opacity: 1; }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #0a0e1a; }
::-webkit-scrollbar-thumb { background: #334155; border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: #475569; }

/* Page health */
.page-health-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-top: 16px; }
.page-health-item { background: #0a0e1a; border: 1px solid #1e293b; border-radius: 8px; padding: 12px; }
.page-health-item.healthy { border-left: 3px solid #10b981; }
.page-health-item.in-use { border-left: 3px solid #3b82f6; background: rgba(59, 130, 246, 0.05); }
.page-health-item.unhealthy { border-left: 3px solid #ef4444; }
.page-health-title { font-weight: 600; color: #cbd5e1; margin-bottom: 8px; font-size: 14px; }
.page-health-stats { display: flex; flex-direction: column; gap: 4px; }
.page-health-stat { font-size: 12px; color: #94a3b8; }

/* Sidebar */
.layout-wrapper { display: flex; min-height: calc(100vh - 100px); }
.sidebar { width: 280px; background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%); border-right: 2px solid #334155; padding: 24px 0; position: sticky; top: 0; height: calc(100vh - 100px); overflow-y: auto; }
.sidebar-section { margin-bottom: 24px; }
.sidebar-title { padding: 0 20px; margin: 0 0 12px 0; font-size: 11px; font-weight: 700; color: #64748b; text-transform: uppercase; letter-spacing: 0.1em; }
.sidebar-nav { list-style: none; padding: 0; margin: 0; }
.sidebar-nav li { margin: 2px 0; }
.sidebar-nav a { display: flex; align-items: center; gap: 12px; padding: 10px 20px; color: #94a3b8; text-decoration: none; transition: all 0.2s ease; border-left: 3px solid transparent; font-size: 14px; }
.sidebar-nav a:hover { background: rgba(59, 130, 246, 0.1); color: #60a5fa; border-left-color: #3b82f6; }
.sidebar-nav a.active { background: rgba(59, 130, 246, 0.15); color: #60a5fa; border-left-color: #3b82f6; font-weight: 600; }
.sidebar-icon { font-size: 16px; width: 20px; text-align: center; }
.sidebar-badge { background: rgba(239, 68, 68, 0.2); color: #ef4444; font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 10px; margin-left: auto; }
.content-wrapper { flex: 1; min-width: 0; }

/* Forms */
.form-group { margin-bottom: 20px; }
.form-label { display: block; margin-bottom: 8px; color: #cbd5e1; font-size: 14px; font-weight: 600; }
.form-input, .form-textarea { width: 100%; padding: 10px 14px; background: #0a0e1a; border: 1px solid #334155; border-radius: 8px; color: #e2e8f0; font-size: 14px; font-family: inherit; transition: all 0.2s ease; }
.form-input:focus, .form-textarea:focus { outline: none; border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1); }
.form-textarea { min-height: 120px; font-family: 'SF Mono', Monaco, monospace; font-size: 13px; resize: vertical; }
.form-button { padding: 10px 20px; background: linear-gradient(135deg, #3b82f6, #1d4ed8); border: none; border-radius: 8px; color: white; font-size: 14px; font-weight: 600; cursor: pointer; transition: all 0.2s ease; }
.form-button:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4); }
.form-button:disabled { opacity: 0.5; cursor: not-allowed; }
.response-box { margin-top: 20px; padding: 16px; background: #0a0e1a; border-radius: 8px; border-left: 3px solid #3b82f6; display: none; }
.response-box.success { border-left-color: #10b981; }
.response-box.error { border-left-color: #ef4444; }
.response-title { font-weight: 600; margin-bottom: 8px; font-size: 14px; }
.response-content { font-size: 13px; font-family: 'SF Mono', Monaco, monospace; white-space: pre-wrap; }

/* Toggle switch for boolean config */
.toggle-switch { position: relative; display: inline-block; width: 44px; height: 24px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #334155; transition: 0.3s; border-radius: 24px; }
.toggle-slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px; background-color: #e2e8f0; transition: 0.3s; border-radius: 50%; }
.toggle-switch input:checked + .toggle-slider { background-color: #3b82f6; }
.toggle-switch input:checked + .toggle-slider:before { transform: translateX(20px); }
.toggle-switch input:focus + .toggle-slider { box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2); }

/* Stealth Verification Styles */
.verification-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin-top: 20px; }
.verification-card { background: #0a0e1a; border: 1px solid #1e293b; border-radius: 12px; padding: 16px; }
.verification-card.passed { border-left: 4px solid #10b981; }
.verification-card.failed { border-left: 4px solid #ef4444; }
.verification-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.verification-title { font-weight: 600; color: #e2e8f0; }
.verification-status { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 4px; }
.verification-status.passed { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.verification-status.failed { background: rgba(239, 68, 68, 0.15); color: #ef4444; }
.verification-screenshot { width: 100%; border-radius: 8px; margin-top: 12px; border: 1px solid #1e293b; }
.verification-details { margin-top: 12px; font-size: 13px; color: #94a3b8; }

/* Modal styles */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 10000;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(4px);
}
.modal-content {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border: 1px solid #334155;
  border-radius: 16px;
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #334155;
}
.modal-header h3 { margin: 0; color: #f1f5f9; font-size: 18px; }
.modal-close {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 24px;
  cursor: pointer;
  padding: 4px 8px;
  transition: color 0.2s;
}
.modal-close:hover { color: #f1f5f9; }
.modal-body { padding: 20px; }
.modal-footer {
  padding: 16px 20px;
  border-top: 1px solid #334155;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}
.modal-loading {
  text-align: center;
  padding: 40px;
  color: #94a3b8;
}

/* Job details in modal */
.job-details { display: flex; flex-direction: column; gap: 12px; }
.detail-row { display: flex; gap: 16px; }
.detail-label { width: 120px; flex-shrink: 0; color: #94a3b8; font-size: 13px; }
.detail-value { flex: 1; color: #e2e8f0; font-size: 14px; word-break: break-all; }

/* Responsive */
@media (max-width: 768px) {
  main { padding: 16px; }
  header { padding: 16px; }
  .grid, .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .layout-wrapper { flex-direction: column; }
}

/* ============================================
   LOGIN PAGE STYLES
   ============================================ */

/* Login page body */
body.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: radial-gradient(ellipse at top, #1e293b 0%, #0a0e1a 50%, #0a0e1a 100%);
}

.login-container {
  width: 100%;
  max-width: 400px;
  text-align: center;
}

.login-card {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border: 1px solid #334155;
  border-radius: 16px;
  padding: 40px 32px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.login-card h1 {
  margin: 0 0 8px 0;
  font-size: 28px;
  font-weight: 700;
  color: #f1f5f9;
  background: linear-gradient(135deg, #60a5fa, #3b82f6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.login-card .subtitle {
  margin: 0 0 32px 0;
  color: #94a3b8;
  font-size: 14px;
}

/* Login error message */
.login-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 24px;
  color: #fca5a5;
  font-size: 13px;
}

/* Auth providers section */
.auth-providers {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.auth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 14px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.auth-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.auth-btn.google {
  background: #ffffff;
  color: #374151;
  border: 1px solid #d1d5db;
}

.auth-btn.google:hover:not(:disabled) {
  background: #f9fafb;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

.auth-icon {
  width: 20px;
  height: 20px;
}

/* Divider */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 24px 0;
  color: #64748b;
  font-size: 12px;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #334155;
}

/* Email form */
.email-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.email-form .form-input {
  text-align: left;
}

.email-form .form-button {
  width: 100%;
  margin-top: 8px;
}

/* Login status */
.login-status {
  margin-top: 20px;
  padding: 12px;
  border-radius: 8px;
  font-size: 13px;
  display: none;
}

.login-status.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(59, 130, 246, 0.1);
  color: #60a5fa;
}

.login-status.error {
  display: block;
  background: rgba(239, 68, 68, 0.1);
  color: #fca5a5;
}

/* Spinner */
.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(59, 130, 246, 0.3);
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ============================================
   HEADER USER SECTION STYLES
   ============================================ */

.header-main {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
}

.header-left {
  flex: 1;
  min-width: 0;
}

.header-user {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: right;
}

.user-name {
  color: #e2e8f0;
  font-size: 14px;
  font-weight: 500;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.admin-badge.super {
  background: rgba(168, 85, 247, 0.2);
  color: #c084fc;
  border-color: rgba(168, 85, 247, 0.3);
}

.logout-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 8px;
  color: #f87171;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.logout-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.5);
  transform: translateY(-1px);
}

.logout-icon {
  font-size: 14px;
}

/* Responsive adjustments for header */
@media (max-width: 640px) {
  .header-main {
    flex-direction: column;
    align-items: stretch;
  }

  .header-user {
    justify-content: flex-end;
    border-top: 1px solid #334155;
    padding-top: 16px;
    margin-top: 8px;
  }

  .user-name {
    max-width: 100px;
  }
}
