/* =============================================
   rqclaw Dashboard — Mission Control
   Premium Dark Mode Theme
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg-primary: #0a0b0f;
  --bg-secondary: #12131a;
  --bg-tertiary: #1a1b24;
  --border-subtle: #1e2030;
  --border-hover: #2a2c40;
  --text-primary: #e8e9ed;
  --text-secondary: #8b8d9a;
  --text-muted: #5a5c6a;
  --sidebar-width: 260px;
  --ana: #ef4444;
  --anadev: #3b82f6;
  --agatha: #a855f7;
  --charliept: #eab308;
  --jessica: #ec4899;
  --genia: #22c55e;
  --kommersial: #06b6d4;
  --ubicatlanta: #f97316;
  --optimo: #6366f1;
  --anthropic: #d4a574;
  --openai: #10a37f;
  --vapi: #7c3aed;
  --groq: #f97316;
}

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

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

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border-subtle); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-hover); }

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

/* ---- SIDEBAR ---- */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-subtle);
  position: fixed;
  top: 0; left: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform 0.3s ease;
}
.sidebar-header {
  padding: 24px 20px;
  border-bottom: 1px solid var(--border-subtle);
}
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.sidebar-logo .logo-icon {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--ana), #ff6b6b);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.sidebar-logo .logo-text {
  font-size: 18px; font-weight: 700; color: var(--text-primary);
  letter-spacing: -0.5px;
}
.sidebar-logo .logo-sub {
  font-size: 11px; color: var(--text-muted); font-weight: 400;
  text-transform: uppercase; letter-spacing: 1px;
}

.sidebar-nav { flex: 1; padding: 16px 12px; overflow-y: auto; }
.nav-section { margin-bottom: 24px; }
.nav-section-title {
  font-size: 10px; text-transform: uppercase; letter-spacing: 1.5px;
  color: var(--text-muted); padding: 0 8px; margin-bottom: 8px; font-weight: 600;
}
.nav-link {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 8px;
  color: var(--text-secondary); text-decoration: none;
  font-size: 14px; font-weight: 500;
  transition: all 0.2s ease;
}
.nav-link:hover {
  background: rgba(255,255,255,0.05);
  color: var(--text-primary);
}
.nav-link.active {
  background: rgba(239,68,68,0.1);
  color: var(--ana);
}
.nav-link i { width: 20px; text-align: center; font-size: 15px; }
.nav-link .nav-badge {
  margin-left: auto;
  background: var(--ana);
  color: white;
  font-size: 10px; font-weight: 700;
  padding: 2px 7px; border-radius: 10px;
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border-subtle);
}
.sidebar-footer .status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #22c55e; display: inline-block;
  animation: pulse 2s infinite;
}

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

/* ---- PAGE HEADER ---- */
.page-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 32px;
}
.page-header h1 {
  font-size: 28px; font-weight: 700; letter-spacing: -0.5px;
}
.page-header h1 span { color: var(--text-muted); font-weight: 400; }
.header-actions { display: flex; gap: 12px; }

/* ---- STATS ROW ---- */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.stat-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 20px;
  transition: all 0.3s ease;
}
.stat-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}
.stat-card .stat-label {
  font-size: 12px; color: var(--text-muted); text-transform: uppercase;
  letter-spacing: 1px; margin-bottom: 8px; font-weight: 600;
}
.stat-card .stat-value {
  font-size: 28px; font-weight: 700; letter-spacing: -1px;
}
.stat-card .stat-change {
  font-size: 12px; margin-top: 4px; font-weight: 500;
}
.stat-card .stat-change.positive { color: #22c55e; }
.stat-card .stat-change.negative { color: #ef4444; }

/* ---- AGENT CARDS GRID ---- */
.agents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}
.agent-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
}
.agent-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--agent-color);
  opacity: 0.8;
}
.agent-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, var(--agent-color) 0%, transparent 60%);
  opacity: 0.03;
  pointer-events: none;
}
.agent-card:hover {
  border-color: var(--agent-color);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}
.agent-card:hover::after { opacity: 0.06; }

.agent-card-header {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 16px; position: relative; z-index: 1;
}
.agent-avatar {
  width: 48px; height: 48px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  background: linear-gradient(135deg, var(--agent-color), rgba(255,255,255,0.1));
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.agent-info h3 {
  font-size: 16px; font-weight: 600;
  display: flex; align-items: center; gap: 8px;
}
.agent-info .agent-role {
  font-size: 12px; color: var(--text-muted); font-weight: 400;
}
.agent-info .agent-model {
  font-size: 11px; color: var(--text-muted);
  background: var(--bg-tertiary); padding: 2px 8px;
  border-radius: 4px; display: inline-block; margin-top: 4px;
}

.status-badge {
  font-size: 11px; font-weight: 600;
  padding: 3px 10px; border-radius: 20px;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.status-badge.online { background: rgba(34,197,94,0.15); color: #22c55e; }
.status-badge.busy { background: rgba(234,179,8,0.15); color: #eab308; }
.status-badge.offline { background: rgba(239,68,68,0.15); color: #ef4444; }
.status-dot-indicator {
  width: 8px; height: 8px; border-radius: 50%; display: inline-block;
}
.status-dot-indicator.online { background: #22c55e; animation: pulse 2s infinite; }
.status-dot-indicator.busy { background: #eab308; animation: pulse 2s infinite; }
.status-dot-indicator.offline { background: #ef4444; }

.agent-card-stats {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  position: relative; z-index: 1;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}
.agent-stat { }
.agent-stat .label { font-size: 11px; color: var(--text-muted); }
.agent-stat .value { font-size: 15px; font-weight: 600; }

/* ---- SECTION ---- */
.section {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
}
.section-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 20px;
}
.section-header h2 {
  font-size: 18px; font-weight: 600;
}
.section-header .section-actions { display: flex; gap: 8px; }

/* ---- TABLE ---- */
.data-table {
  width: 100%; border-collapse: collapse;
}
.data-table th {
  text-align: left;
  font-size: 11px; text-transform: uppercase; letter-spacing: 1px;
  color: var(--text-muted); font-weight: 600;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
}
.data-table td {
  padding: 14px 16px;
  font-size: 14px;
  border-bottom: 1px solid rgba(30,32,48,0.5);
}
.data-table tr:hover td {
  background: rgba(255,255,255,0.02);
}
.data-table .agent-tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 6px;
  font-size: 12px; font-weight: 600;
}

/* ---- BUTTONS ---- */
.btn {
  padding: 8px 16px; border-radius: 8px; border: none;
  font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all 0.2s ease;
  display: inline-flex; align-items: center; gap: 6px;
}
.btn-primary {
  background: var(--ana); color: white;
}
.btn-primary:hover { background: #dc2626; }
.btn-secondary {
  background: var(--bg-tertiary); color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}
.btn-secondary:hover { border-color: var(--border-hover); color: var(--text-primary); }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-approve { background: rgba(34,197,94,0.15); color: #22c55e; }
.btn-approve:hover { background: rgba(34,197,94,0.25); }
.btn-reject { background: rgba(239,68,68,0.15); color: #ef4444; }
.btn-reject:hover { background: rgba(239,68,68,0.25); }

/* ---- PRIORITY BADGES ---- */
.priority-badge {
  font-size: 11px; font-weight: 700; padding: 3px 8px;
  border-radius: 4px; text-transform: uppercase; letter-spacing: 0.5px;
}
.priority-badge.critical { background: rgba(239,68,68,0.2); color: #ef4444; }
.priority-badge.high { background: rgba(249,115,22,0.2); color: #f97316; }
.priority-badge.medium { background: rgba(234,179,8,0.2); color: #eab308; }
.priority-badge.low { background: rgba(34,197,94,0.2); color: #22c55e; }

/* ---- CHART CONTAINER ---- */
.chart-container {
  position: relative;
  height: 300px;
  margin: 16px 0;
}
.chart-container canvas { width: 100% !important; }

/* ---- FILTER BAR ---- */
.filter-bar {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px;
}
.filter-btn {
  padding: 6px 14px; border-radius: 20px; border: 1px solid var(--border-subtle);
  background: transparent; color: var(--text-secondary);
  font-size: 12px; font-weight: 500; cursor: pointer;
  transition: all 0.2s ease; font-family: 'Inter', sans-serif;
}
.filter-btn:hover { border-color: var(--border-hover); color: var(--text-primary); }
.filter-btn.active {
  background: var(--ana); border-color: var(--ana); color: white;
}

/* ---- RESOURCE CARDS ---- */
.resource-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}
.resource-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--provider-color);
}
.resource-card:hover {
  border-color: var(--provider-color);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.25);
}
.resource-card-header {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 20px;
}
.provider-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: white;
  background: linear-gradient(135deg, var(--provider-color), rgba(255,255,255,0.1));
}
.resource-card h3 { font-size: 16px; font-weight: 600; }
.resource-card .provider-plan { font-size: 12px; color: var(--text-muted); }

.progress-bar-container {
  background: var(--bg-tertiary);
  border-radius: 8px;
  height: 10px;
  margin: 12px 0;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  border-radius: 8px;
  transition: width 1s ease;
}
.resource-stat-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0;
  font-size: 13px;
}
.resource-stat-row .label { color: var(--text-muted); }
.resource-stat-row .value { font-weight: 600; }
.days-remaining {
  font-size: 32px; font-weight: 800; letter-spacing: -1px;
  margin: 4px 0;
}
.days-label { font-size: 12px; color: var(--text-muted); }

/* Alert banners */
.alert-banner {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 20px; border-radius: 12px;
  margin-bottom: 12px;
  font-size: 14px; font-weight: 500;
}
.alert-banner.critical {
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.3);
  color: #fca5a5;
}
.alert-banner.warning {
  background: rgba(234,179,8,0.1);
  border: 1px solid rgba(234,179,8,0.3);
  color: #fde68a;
}
.alert-banner.info {
  background: rgba(59,130,246,0.1);
  border: 1px solid rgba(59,130,246,0.3);
  color: #93bbfd;
}
.alert-banner i { font-size: 18px; }

/* VPS Gauge */
.vps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.gauge-card {
  text-align: center;
  padding: 20px;
}
.gauge-ring {
  width: 120px; height: 120px;
  border-radius: 50%;
  margin: 0 auto 16px;
  position: relative;
  display: flex; align-items: center; justify-content: center;
}
.gauge-ring .gauge-value {
  font-size: 24px; font-weight: 700;
}
.gauge-ring .gauge-unit {
  font-size: 12px; color: var(--text-muted);
}
.gauge-label { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.gauge-detail { font-size: 12px; color: var(--text-muted); }

/* ---- SUGGESTION CARD ---- */
.suggestion-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 12px;
  transition: all 0.2s ease;
}
.suggestion-card:hover { border-color: var(--border-hover); }
.suggestion-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 12px;
}
.suggestion-meta {
  display: flex; gap: 8px; align-items: center;
  font-size: 12px; color: var(--text-muted);
}
.suggestion-type {
  font-size: 10px; padding: 2px 8px; border-radius: 4px;
  text-transform: uppercase; font-weight: 700; letter-spacing: 0.5px;
  background: rgba(99,102,241,0.15); color: #818cf8;
}
.suggestion-actions { display: flex; gap: 6px; }

/* ---- MODAL ---- */
.modal-overlay {
  display: none;
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6);
  z-index: 200;
  align-items: center; justify-content: center;
  backdrop-filter: blur(4px);
}
.modal-overlay.active { display: flex; }
.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 32px;
  width: 90%; max-width: 500px;
}
.modal h2 { margin-bottom: 20px; font-size: 20px; }
.modal .form-group { margin-bottom: 16px; }
.modal label {
  display: block; font-size: 12px; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px; font-weight: 600;
}
.modal input, .modal select, .modal textarea {
  width: 100%; padding: 10px 14px; border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-tertiary); color: var(--text-primary);
  font-family: 'Inter', sans-serif; font-size: 14px;
  transition: border-color 0.2s;
}
.modal input:focus, .modal select:focus, .modal textarea:focus {
  outline: none; border-color: var(--ana);
}
.modal textarea { resize: vertical; min-height: 80px; }
.modal-actions {
  display: flex; gap: 8px; justify-content: flex-end; margin-top: 24px;
}

/* ---- MOBILE TOGGLE ---- */
.mobile-toggle {
  display: none;
  position: fixed; top: 16px; left: 16px;
  z-index: 150;
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 18px;
  cursor: pointer;
  align-items: center; justify-content: center;
}

/* ---- TABS ---- */
.tab-bar {
  display: flex; gap: 4px; margin-bottom: 24px;
  background: var(--bg-tertiary);
  padding: 4px; border-radius: 10px;
  width: fit-content;
}
.tab-btn {
  padding: 8px 16px; border-radius: 8px; border: none;
  background: transparent; color: var(--text-secondary);
  font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 500;
  cursor: pointer; transition: all 0.2s;
}
.tab-btn.active { background: var(--bg-secondary); color: var(--text-primary); }

/* ---- ANIMATIONS ---- */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeIn 0.4s ease forwards; }

/* ---- BUDGET CARDS ---- */
.budget-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}
.budget-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}
.budget-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--agent-color);
  opacity: 0.8;
}
.budget-card:hover {
  border-color: var(--agent-color);
  transform: translateY(-3px);
  box-shadow: 0 10px 35px rgba(0,0,0,0.3);
}
.budget-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.budget-agent-info { flex: 1; min-width: 0; }
.budget-agent-info h3 {
  font-size: 16px; font-weight: 600; margin-bottom: 4px;
}
.budget-status-badge {
  font-size: 11px; font-weight: 600;
  padding: 3px 10px; border-radius: 20px;
  display: inline-block;
}
.budget-status-badge.active { background: rgba(34,197,94,0.15); color: #22c55e; }
.budget-status-badge.warning { background: rgba(234,179,8,0.15); color: #eab308; }
.budget-status-badge.paused { background: rgba(239,68,68,0.15); color: #ef4444; }
.budget-card-actions {
  display: flex; gap: 6px;
}
.budget-bars {
  display: flex; flex-direction: column; gap: 14px;
}
.budget-bar-group {}
.budget-bar-label {
  display: flex; justify-content: space-between;
  font-size: 12px; color: var(--text-muted); margin-bottom: 6px; font-weight: 500;
}
.budget-progress-bar {
  background: var(--bg-tertiary);
  border-radius: 8px;
  height: 12px;
  overflow: hidden;
  position: relative;
}
.budget-progress-fill {
  height: 100%;
  border-radius: 8px;
  transition: width 0.8s ease;
  position: relative;
}
.budget-progress-fill::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.15) 50%, transparent 100%);
  border-radius: 8px;
}
.budget-bar-pct {
  font-size: 12px; color: var(--text-secondary); margin-top: 4px;
  text-align: right; font-weight: 600;
}
.budget-postponed-count {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
  font-size: 12px;
  color: var(--jessica);
  font-weight: 500;
}
.budget-postponed-count i { margin-right: 6px; }
.budget-reason {
  font-size: 11px; padding: 3px 8px; border-radius: 4px;
  background: rgba(239,68,68,0.1); color: #fca5a5;
  font-weight: 500;
}

/* Auto-Pause Rules */
.auto-pause-rules {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.rule-card {
  display: flex; gap: 16px; align-items: flex-start;
  background: var(--bg-tertiary);
  border-radius: 12px;
  padding: 20px;
  border: 1px solid var(--border-subtle);
}
.rule-icon {
  font-size: 24px;
  flex-shrink: 0;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.05);
  border-radius: 10px;
}
.rule-content h4 {
  font-size: 14px; font-weight: 600; margin-bottom: 6px;
}
.rule-content p {
  font-size: 12px; color: var(--text-muted); line-height: 1.5;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 14px;
}

/* ---- LOGIN PAGE ---- */
.login-body {
  background: var(--bg-primary);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-container {
  width: 100%;
  max-width: 440px;
  padding: 20px;
}
.login-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 40px 36px;
  position: relative;
  overflow: hidden;
}
.login-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--ana), #ff6b6b, var(--anadev));
}
.login-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(ellipse at top, rgba(239,68,68,0.06) 0%, transparent 60%);
  pointer-events: none;
}
.login-logo {
  text-align: center;
  margin-bottom: 32px;
  position: relative;
  z-index: 1;
}
.login-logo-icon {
  width: 64px; height: 64px;
  background: linear-gradient(135deg, var(--ana), #ff6b6b);
  border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  font-size: 32px;
  margin: 0 auto 14px;
  box-shadow: 0 8px 24px rgba(239,68,68,0.3);
}
.login-logo-text {
  font-size: 28px; font-weight: 800; color: var(--text-primary);
  letter-spacing: -1px;
}
.login-logo-sub {
  font-size: 12px; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 2px; margin-top: 4px;
}
.login-error {
  display: flex; align-items: center; gap: 10px;
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.3);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 20px;
  color: #fca5a5;
  font-size: 13px; font-weight: 500;
  animation: fadeIn 0.3s ease;
}
.login-error i { color: #ef4444; font-size: 16px; }
.login-field {
  margin-bottom: 18px;
  position: relative;
  z-index: 1;
}
.login-field label {
  display: block;
  font-size: 12px; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 1px;
  margin-bottom: 8px; font-weight: 600;
}
.login-field label i {
  margin-right: 6px; font-size: 11px;
}
.login-field input {
  width: 100%;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  transition: all 0.2s;
}
.login-field input:focus {
  outline: none;
  border-color: var(--ana);
  box-shadow: 0 0 0 3px rgba(239,68,68,0.15);
}
.login-field input::placeholder { color: var(--text-muted); }
.login-remember {
  margin-bottom: 24px;
  position: relative;
  z-index: 1;
}
.checkbox-label {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; color: var(--text-secondary);
  cursor: pointer; user-select: none;
}
.checkbox-label input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: var(--ana);
  cursor: pointer;
}
.login-btn {
  width: 100%;
  padding: 14px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, var(--ana), #dc2626);
  color: white;
  font-family: 'Inter', sans-serif;
  font-size: 15px; font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  position: relative;
  z-index: 1;
}
.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(239,68,68,0.4);
}
.login-btn:active { transform: translateY(0); }
.login-btn:disabled {
  opacity: 0.7; cursor: not-allowed; transform: none;
}
.login-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 11px;
  color: var(--text-muted);
  position: relative;
  z-index: 1;
}

/* ---- LOGOUT BUTTON ---- */
.logout-btn {
  display: flex; align-items: center; gap: 10px;
  width: calc(100% - 24px);
  margin: 8px 12px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(239,68,68,0.2);
  background: rgba(239,68,68,0.08);
  color: #ef4444;
  font-family: 'Inter', sans-serif;
  font-size: 13px; font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}
.logout-btn:hover {
  background: rgba(239,68,68,0.15);
  border-color: rgba(239,68,68,0.4);
}
.logout-btn i { width: 20px; text-align: center; }

/* ---- RESPONSIVE ---- */
@media (max-width: 1024px) {
  .agents-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
  .vps-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .mobile-toggle { display: flex; }
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; padding: 16px; padding-top: 64px; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .agents-grid { grid-template-columns: 1fr; }
  .page-header { flex-direction: column; align-items: flex-start; gap: 12px; }
  .data-table { font-size: 12px; }
  .data-table th, .data-table td { padding: 10px 8px; }
}
