/* =============================================
   VPS Dashboard — style.css
   Dark Glassmorphism Design System
   ============================================= */

/* ===== DESIGN TOKENS ===== */
:root {
  /* Backgrounds */
  --bg-base:     #0b0d12;
  --bg-surface:  #10131a;
  --bg-card:     rgba(20, 24, 38, 0.85);
  --bg-card-hov: rgba(28, 33, 52, 0.90);
  --bg-input:    rgba(255,255,255,0.04);
  --bg-glass:    rgba(255,255,255,0.035);
  --btn-bg:      rgba(255,255,255,0.05);
  --btn-border:  rgba(255,255,255,0.1);
  --bg-table-hov:rgba(255,255,255,0.025);
  --border-table:rgba(255,255,255,0.03);
  --bg-log:      rgba(0,0,0,0.35);
  --bg-opt:      #141820;
  --bg-header:   rgba(11, 13, 18, 0.85);

  /* Borders */
  --border:      rgba(255,255,255,0.07);
  --border-hov:  rgba(255,255,255,0.14);

  /* Text */
  --text-primary:   #e8eaf2;
  --text-secondary: #8892a4;
  --text-muted:     #4a5266;

  /* Accent colors */
  --cyan:    #22d3ee;
  --cyan-d:  #0891b2;
  --purple:  #a855f7;
  --purple-d:#7c3aed;
  --green:   #4ade80;
  --green-d: #16a34a;
  --amber:   #fbbf24;
  --amber-d: #d97706;
  --red:     #f87171;
  --red-d:   #dc2626;
  --blue:    #60a5fa;

  /* Semantic aliases */
  --cpu-color:  var(--cyan);
  --ram-color:  var(--purple);
  --disk-color: var(--amber);
  --net-color:  var(--green);
  --net-in-color: var(--blue);

  /* Shadows */
  --shadow-card: 0 4px 24px rgba(0,0,0,0.45), 0 1px 0 rgba(255,255,255,0.04) inset;
  --shadow-glow-cyan:   0 0 24px rgba(34,211,238,0.15);
  --shadow-glow-purple: 0 0 24px rgba(168,85,247,0.15);
  --shadow-glow-green:  0 0 24px rgba(74,222,128,0.15);
  --shadow-glow-amber:  0 0 24px rgba(251,191,36,0.15);

  /* Typography */
  --font-sans: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Timing */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --dur: 180ms;
}

[data-theme="light"] {
  /* Backgrounds */
  --bg-base:     #f1f5f9;
  --bg-surface:  #e2e8f0;
  --bg-card:     rgba(255, 255, 255, 0.65);
  --bg-card-hov: rgba(255, 255, 255, 0.85);
  --bg-input:    rgba(255, 255, 255, 0.5);
  --bg-glass:    rgba(255, 255, 255, 0.4);
  --btn-bg:      rgba(0,0,0,0.04);
  --btn-border:  rgba(0,0,0,0.1);
  --bg-table-hov:rgba(0,0,0,0.025);
  --border-table:rgba(0,0,0,0.04);
  --bg-log:      rgba(255,255,255,0.6);
  --bg-opt:      #ffffff;
  --bg-header:   rgba(255, 255, 255, 0.85);

  /* Borders */
  --border:      rgba(255, 255, 255, 0.8);
  --border-hov:  rgba(255, 255, 255, 1);

  /* Text */
  --text-primary:   #1e293b;
  --text-secondary: #475569;
  --text-muted:     #94a3b8;

  /* Accent colors (Darkened for contrast on light) */
  --cyan:    #0284c7;
  --cyan-d:  #0369a1;
  --purple:  #7c3aed;
  --purple-d:#6d28d9;
  --green:   #16a34a;
  --green-d: #15803d;
  --amber:   #d97706;
  --amber-d: #b45309;
  --red:     #dc2626;
  --red-d:   #b91c1c;
  --blue:    #2563eb;

  /* Shadows */
  --shadow-card: 0 8px 32px rgba(0,0,0,0.04), 0 0 0 1px rgba(255,255,255,0.6) inset;
  --shadow-glow-cyan:   0 0 24px rgba(2,132,199,0.1);
  --shadow-glow-purple: 0 0 24px rgba(124,58,237,0.1);
  --shadow-glow-green:  0 0 24px rgba(22,163,74,0.1);
  --shadow-glow-amber:  0 0 24px rgba(217,119,6,0.1);
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ===== ANIMATED BACKGROUND ===== */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% -10%, rgba(34,211,238,0.06) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 110%, rgba(168,85,247,0.06) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

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

/* ===== HEADER ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 24px;
  height: 64px;
  background: var(--bg-header);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
}

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

.logo-icon {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--cyan-d), var(--cyan));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 16px rgba(34,211,238,0.35);
}
.logo-icon svg { width: 20px; height: 20px; color: #fff; }

.logo-title { display: block; font-size: 15px; font-weight: 700; color: var(--text-primary); }
.logo-sub    { display: block; font-size: 11px; color: var(--text-secondary); font-family: var(--font-mono); }

.status-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px;
  background: rgba(74,222,128,0.08);
  border: 1px solid rgba(74,222,128,0.2);
  border-radius: 20px;
  font-size: 12px; font-weight: 500; color: var(--green);
}
.status-pill.disconnected {
  background: rgba(248,113,113,0.08);
  border-color: rgba(248,113,113,0.2);
  color: var(--red);
}

.status-dot {
  width: 7px; height: 7px;
  background: var(--green);
  border-radius: 50%;
}
.status-dot.pulse { animation: pulse 2s ease infinite; }
.status-pill.disconnected .status-dot { background: var(--red); animation: none; }

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.8); }
}

.header-right { display: flex; align-items: center; gap: 20px; }

.hdr-stat { display: flex; flex-direction: column; align-items: flex-end; }
.hdr-stat-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.hdr-stat-value { font-size: 13px; font-weight: 600; color: var(--text-primary); font-family: var(--font-mono); }

/* ===== MAIN LAYOUT ===== */
.main {
  position: relative;
  z-index: 1;
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px 24px 48px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ===== GAUGE CARDS ROW ===== */
.gauges-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.gauge-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(12px);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.gauge-card:hover {
  border-color: var(--border-hov);
  transform: translateY(-2px);
}
#gauge-cpu:hover  { box-shadow: var(--shadow-card), var(--shadow-glow-cyan); }
#gauge-ram:hover  { box-shadow: var(--shadow-card), var(--shadow-glow-purple); }
#gauge-disk:hover { box-shadow: var(--shadow-card), var(--shadow-glow-amber); }
#gauge-net:hover  { box-shadow: var(--shadow-card), var(--shadow-glow-green); }

.gauge-icon {
  flex-shrink: 0;
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-glass);
}
.gauge-icon svg { width: 22px; height: 22px; }

.gauge-info { flex: 1; min-width: 0; }
.gauge-label { display: block; font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 4px; }
.gauge-value { display: block; font-size: 26px; font-weight: 800; line-height: 1; font-family: var(--font-mono); }
.gauge-sub   { display: block; font-size: 11px; color: var(--text-secondary); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Color helpers */
.cpu-color  { color: var(--cyan); }
.ram-color  { color: var(--purple); }
.disk-color { color: var(--amber); }
.net-color  { color: var(--green); }
.net-in-color { color: var(--blue); }

.gauge-icon.cpu-color  { color: var(--cyan);   border: 1px solid rgba(34,211,238,0.2); }
.gauge-icon.ram-color  { color: var(--purple); border: 1px solid rgba(168,85,247,0.2); }
.gauge-icon.disk-color { color: var(--amber);  border: 1px solid rgba(251,191,36,0.2); }
.gauge-icon.net-color  { color: var(--green);  border: 1px solid rgba(74,222,128,0.2); }

/* Ring gauge */
.gauge-ring-wrap { position: relative; flex-shrink: 0; width: 64px; height: 64px; }
.gauge-ring { width: 64px; height: 64px; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: rgba(255,255,255,0.05); stroke-width: 7; }
.ring-fg { fill: none; stroke-width: 7; stroke-linecap: round; transition: stroke-dashoffset 0.6s var(--ease); }
.cpu-stroke  { stroke: var(--cyan);   filter: drop-shadow(0 0 6px var(--cyan)); }
.ram-stroke  { stroke: var(--purple); filter: drop-shadow(0 0 6px var(--purple)); }
.disk-stroke { stroke: var(--amber);  filter: drop-shadow(0 0 6px var(--amber)); }

.gauge-ring-text {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; font-family: var(--font-mono);
}

/* Net speeds */
.net-speeds { display: flex; flex-direction: column; gap: 2px; margin: 4px 0; }
.net-speed-item { display: flex; align-items: center; gap: 6px; }
.net-arrow { font-size: 16px; font-weight: 700; color: var(--green); }
.net-arrow.down { color: var(--blue); }
.net-speed-item .gauge-value { font-size: 18px; }

/* ===== CHART CARDS ===== */
.charts-row {
  display: grid;
  gap: 16px;
}
.charts-row.two-col {
  grid-template-columns: 1fr 1fr;
}

.chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(12px);
  padding: 20px;
  transition: border-color var(--dur) var(--ease);
}
.chart-card:hover { border-color: var(--border-hov); }

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 8px;
}

.card-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 600; color: var(--text-primary);
}
.card-title-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.card-title-dot.cpu-color  { background: var(--cyan);   box-shadow: 0 0 6px var(--cyan); }
.card-title-dot.ram-color  { background: var(--purple); box-shadow: 0 0 6px var(--purple); }
.card-title-dot.disk-color { background: var(--amber);  box-shadow: 0 0 6px var(--amber); }
.card-title-dot.net-color  { background: var(--green);  box-shadow: 0 0 6px var(--green); }

.card-badge {
  font-size: 13px; font-weight: 700;
  font-family: var(--font-mono);
  padding: 3px 10px;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.net-legend {
  display: flex; align-items: center; gap: 4px;
  font-size: 12px; color: var(--text-secondary);
}
.legend-dot {
  width: 8px; height: 8px; border-radius: 50%;
}
.legend-dot.net-color    { background: var(--green);  box-shadow: 0 0 4px var(--green); }
.legend-dot.net-in-color { background: var(--blue);   box-shadow: 0 0 4px var(--blue); }

.chart-wrap {
  position: relative;
  height: 180px;
}
.chart-card.wide .chart-wrap { height: 200px; }

/* ===== DISK BARS ===== */
.disk-bars {
  display: flex; flex-direction: column; gap: 14px;
  max-height: 210px; overflow-y: auto;
}
.disk-bar-item { display: flex; flex-direction: column; gap: 6px; }
.disk-bar-header {
  display: flex; justify-content: space-between; align-items: center;
}
.disk-mount { font-size: 12px; font-weight: 600; font-family: var(--font-mono); color: var(--text-primary); }
.disk-size-info { font-size: 11px; color: var(--text-secondary); }
.disk-bar-track {
  height: 8px; background: rgba(255,255,255,0.06);
  border-radius: 4px; overflow: hidden;
}
.disk-bar-fill {
  height: 100%; border-radius: 4px;
  background: linear-gradient(90deg, var(--amber-d), var(--amber));
  box-shadow: 0 0 8px rgba(251,191,36,0.3);
  transition: width 0.6s var(--ease);
}
.disk-bar-fill.warning {
  background: linear-gradient(90deg, #ef4444, #f87171);
  box-shadow: 0 0 8px rgba(248,113,113,0.4);
}

/* ===== SECTION CARD ===== */
.section-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(12px);
  padding: 20px;
}

/* ===== PROCESSES TABLE ===== */
.table-wrap { overflow-x: auto; }

.proc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.proc-table th {
  text-align: left;
  padding: 8px 12px;
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border);
  font-weight: 500;
}
.proc-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-table);
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-primary);
}
.proc-table tr:hover td { background: var(--bg-table-hov); }
.proc-table tr:last-child td { border-bottom: none; }
.loading-cell { text-align: center; color: var(--text-muted); padding: 24px !important; }

.pid-cell { color: var(--text-muted); }

.cpu-bar-cell { display: flex; align-items: center; gap: 8px; }
.cpu-mini-bar { width: 60px; height: 5px; background: var(--bg-glass); border-radius: 3px; overflow: hidden; }
.cpu-mini-fill { height: 100%; background: var(--cyan); border-radius: 3px; transition: width 0.4s; }

.service-actions {
  display: flex; gap: 6px; margin-top: 8px;
}
.svc-action-btn {
  flex: 1;
  background: var(--btn-bg);
  border: 1px solid var(--btn-border);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 13px;
  padding: 4px 0;
  cursor: pointer;
  transition: all var(--dur) var(--ease);
  line-height: 1;
}
.svc-action-btn:hover { background: var(--bg-glass); }
.svc-action-btn.start:hover { color: var(--green); border-color: rgba(74,222,128,0.5); }
.svc-action-btn.restart:hover { color: var(--blue); border-color: rgba(96,165,250,0.5); }
.svc-action-btn.stop:hover { color: var(--red); border-color: rgba(248,113,113,0.5); }

/* ===== SERVICES GRID ===== */
.refresh-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 12px; font-weight: 500;
  cursor: pointer;
  transition: all var(--dur) var(--ease);
  font-family: var(--font-sans);
}
.refresh-btn svg { width: 13px; height: 13px; }
.refresh-btn:hover { border-color: var(--border-hov); color: var(--text-primary); }
.refresh-btn.spinning svg { animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

.service-card {
  display: flex; flex-direction: column; gap: 8px;
  padding: 14px;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: all var(--dur) var(--ease);
  cursor: default;
}
.service-card:hover {
  border-color: var(--border-hov);
  transform: translateY(-1px);
}
.service-card.active  { border-color: rgba(74,222,128,0.25); }
.service-card.inactive{ border-color: rgba(248,113,113,0.2); }

.service-header { display: flex; align-items: center; justify-content: space-between; }
.service-name { font-size: 13px; font-weight: 600; font-family: var(--font-mono); color: var(--text-primary); }

.service-status-dot {
  width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0;
}
.service-status-dot.active   { background: var(--green); box-shadow: 0 0 6px var(--green); animation: pulse 2s ease infinite; }
.service-status-dot.inactive { background: var(--red);   box-shadow: 0 0 6px var(--red); animation: none; }
.service-status-dot.unknown  { background: var(--text-muted); animation: none; }

.service-sub {
  font-size: 11px;
  text-transform: capitalize;
}
.service-sub.running { color: var(--green); }
.service-sub.dead    { color: var(--red); }
.service-sub.unknown { color: var(--text-muted); }

.service-skeleton, .disk-skeleton {
  color: var(--text-muted); font-size: 13px; padding: 20px 0; text-align: center;
}

/* ===== LOG VIEWER ===== */
.logs-controls {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}

.logs-select, .logs-filter {
  padding: 7px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 13px;
  outline: none;
  transition: border-color var(--dur) var(--ease);
}
.logs-select { min-width: 180px; cursor: pointer; }
.logs-filter { min-width: 180px; }
.logs-select:focus, .logs-filter:focus { border-color: rgba(34,211,238,0.4); }
.logs-select option { background: var(--bg-opt); color: var(--text-primary); }

.autoscroll-toggle {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--text-secondary); cursor: pointer; user-select: none;
}
.autoscroll-toggle input { accent-color: var(--cyan); }

.log-viewer {
  margin-top: 14px;
  height: 340px;
  overflow-y: auto;
  background: var(--bg-log);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.7;
}

.log-empty {
  height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  font-family: var(--font-sans);
}

.log-line {
  display: block;
  padding: 1px 0;
  white-space: pre-wrap;
  word-break: break-all;
  color: #8892a4;
  transition: color 0.1s;
}
.log-line:hover { color: var(--text-primary); }
.log-line.error  { color: #f87171; }
.log-line.warn   { color: var(--amber); }
.log-line.notice { color: var(--cyan); }
.log-line.highlight { background: rgba(251,191,36,0.08); border-radius: 3px; color: var(--amber); }

.log-loading {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
  .gauges-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .charts-row.two-col { grid-template-columns: 1fr; }
  .header-right { display: none; }
}

@media (max-width: 640px) {
  .gauges-row { grid-template-columns: 1fr 1fr; }
  .main { padding: 16px 12px 40px; }
  .header { padding: 0 14px; }
  .logo-title { font-size: 13px; }
  .services-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
  .logs-controls { flex-direction: column; align-items: flex-start; }
}

/* ===== ENTRY ANIMATION ===== */
.gauge-card, .chart-card, .section-card {
  animation: fadeUp 0.4s var(--ease) both;
}
.gauge-card:nth-child(1) { animation-delay: 0ms; }
.gauge-card:nth-child(2) { animation-delay: 60ms; }
.gauge-card:nth-child(3) { animation-delay: 120ms; }
.gauge-card:nth-child(4) { animation-delay: 180ms; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== TOOLTIP ===== */
.tooltip {
  position: relative;
}
.tooltip::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(20,24,38,0.96);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur);
}
.tooltip:hover::after { opacity: 1; }

/* ===== LOGIN OVERLAY ===== */
.login-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(11, 13, 18, 0.95);
  backdrop-filter: blur(20px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.login-box {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 20px; box-shadow: var(--shadow-card);
  width: 100%; max-width: 360px; padding: 32px;
  text-align: center; animation: fadeUp 0.4s var(--ease) both;
}
.login-logo {
  width: 48px; height: 48px; margin: 0 auto 16px;
  background: linear-gradient(135deg, var(--cyan-d), var(--cyan));
  border-radius: 14px; display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-glow-cyan);
}
.login-logo svg { width: 24px; height: 24px; color: #fff; }
.login-title { font-size: 20px; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.login-sub { font-size: 13px; color: var(--text-secondary); margin-bottom: 24px; }
.login-err { 
  display: none; font-size: 13px; color: var(--red);
  background: rgba(248,113,113,0.1); border-radius: 8px; padding: 10px; margin-bottom: 16px; border: 1px solid rgba(248,113,113,0.2);
}
.login-input {
  width: 100%; padding: 12px 14px; margin-bottom: 12px;
  background: var(--bg-input); border: 1px solid var(--border);
  border-radius: 10px; color: var(--text-primary); font-family: var(--font-sans);
  outline: none; transition: border-color var(--dur) var(--ease);
}
.login-input:focus { border-color: rgba(34,211,238,0.4); }
.login-btn {
  width: 100%; padding: 12px; margin-top: 8px;
  background: var(--cyan); color: #000; font-weight: 600; font-size: 14px;
  border: none; border-radius: 10px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: all var(--dur) var(--ease); box-shadow: 0 4px 12px rgba(34,211,238,0.2);
}
.login-btn:hover { background: #67e8f9; transform: translateY(-1px); box-shadow: 0 6px 16px rgba(34,211,238,0.3); }
.login-btn svg { width: 16px; height: 16px; }

/* ===== REDIS EXPLORER ===== */
.re-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 16px;
  height: 380px;
  margin-top: 14px;
}
.re-keys-panel {
  background: var(--bg-log);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow-y: auto;
}
.re-key-item {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  word-break: break-all;
  transition: all 0.1s;
}
.re-key-item:hover {
  background: rgba(255,255,255,0.04);
  color: var(--text-primary);
}
.re-key-item.active {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border-left: 2px solid #ef4444;
}
.re-val-panel {
  background: var(--bg-log);
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.re-val-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-table-hov);
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 50px;
}
.re-key-name {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  word-break: break-all;
}
.re-key-actions {
  display: flex; gap: 12px; align-items: center;
}
.re-key-meta {
  font-size: 11px; color: var(--text-secondary); font-family: var(--font-mono); display: flex; gap: 8px;
}
.re-key-meta span { background: var(--bg-card); padding: 2px 6px; border-radius: 4px; border: 1px solid var(--border); }
.re-val-body {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-primary);
  white-space: pre-wrap;
  word-break: break-all;
  line-height: 1.6;
}
@media (max-width: 768px) {
  .re-grid { grid-template-columns: 1fr; height: auto; }
  .re-keys-panel { height: 200px; }
  .re-val-panel { height: 300px; }
}

/* ===== BACKUP MANAGER ===== */
.bp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 14px;
}
@media (max-width: 768px) {
  .bp-grid { grid-template-columns: 1fr; }
}
.bp-panel {
  background: var(--bg-log);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
}
.bp-title {
  font-size: 15px; font-weight: 600; color: var(--text-primary); margin-bottom: 4px;
}
.bp-sub {
  font-size: 12px; color: var(--text-secondary); margin-bottom: 16px; line-height: 1.4;
}
.bp-actions {
  display: flex; gap: 8px; margin-top: 12px;
}
.bp-btn {
  flex: 1; padding: 10px; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer;
  border: none; transition: all 0.2s; display: flex; align-items: center; justify-content: center; gap: 6px;
}
.bp-btn.dl { background: rgba(34,211,238,0.1); color: var(--cyan); border: 1px solid rgba(34,211,238,0.2); }
.bp-btn.dl:hover { background: rgba(34,211,238,0.2); }
.bp-btn.tg { background: rgba(16,185,129,0.1); color: var(--green); border: 1px solid rgba(16,185,129,0.2); }
.bp-btn.tg:hover { background: rgba(16,185,129,0.2); }
.bp-status {
  margin-top: 10px; font-size: 12px; color: var(--text-secondary); height: 16px;
}
.bp-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: var(--bg-table-hov);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.bp-list-item:hover {
  background: var(--btn-bg);
}
