/* Nimbus Client V2 Dashboard — Dark Futuristic Theme */
:root {
  --bg: #0b0e17;
  --bg-raised: #101828;
  --surface: #151c2c;
  --surface-hover: #1a2338;
  --border: rgba(255, 255, 255, 0.08);
  --border-focus: #00d4ff;
  --text: #e0e6ed;
  --text-muted: #7a8ba0;
  --primary: #00d4ff;
  --primary-hover: #00b8e6;
  --primary-glow: rgba(0, 212, 255, 0.25);
  --success: #39ff14;
  --warning: #ffb300;
  --danger: #ff2d55;
  --danger-hover: #e0264b;
  --info: #00d4ff;
  --code-bg: #0d1220;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "SF Mono", "Cascadia Code", "Consolas", monospace;
  --radius: 6px;
  --glow-sm: 0 0 8px rgba(0, 212, 255, 0.15);
  --glow-md: 0 0 16px rgba(0, 212, 255, 0.2);
  --glow-lg: 0 0 32px rgba(0, 212, 255, 0.25);
}

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; color: #33dfff; }

/* Layout */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }
.nav {
  background: var(--surface);
  border-bottom: 2px solid var(--primary);
  padding: 0.75rem 0;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 12px rgba(0, 212, 255, 0.08);
}
.nav .container { display: flex; align-items: center; justify-content: space-between; }
.nav-brand { font-weight: 700; font-size: 1.1rem; color: var(--primary); letter-spacing: 0.04em; }
.nav-links { display: flex; gap: 1.5rem; align-items: center; }
.nav-links a { color: var(--text-muted); font-size: 0.9rem; transition: color 0.2s, text-shadow 0.2s; }
.nav-links a:hover, .nav-links a.active {
  color: var(--primary);
  text-decoration: none;
  text-shadow: 0 0 8px rgba(0, 212, 255, 0.5);
}
.nav-user { color: var(--text-muted); font-size: 0.85rem; }

/* TZ select in nav */
.tz-select {
  font-size: 0.75rem;
  padding: 2px 6px;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--bg-raised);
  color: var(--text);
}

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
  transition: box-shadow 0.25s, border-color 0.25s;
}
.card:hover {
  box-shadow: var(--glow-sm);
  border-color: rgba(0, 212, 255, 0.15);
}
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}
.card-title { font-size: 1.1rem; font-weight: 600; color: var(--text); }

/* Stats bar */
.stats {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1.25rem;
  min-width: 120px;
  transition: box-shadow 0.25s;
}
.stat:hover { box-shadow: var(--glow-sm); }
.stat-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.stat-value { font-size: 1.5rem; font-weight: 700; color: var(--text); }

/* Table */
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th {
  text-align: left;
  padding: 0.5rem 0.75rem;
  border-bottom: 2px solid rgba(0, 212, 255, 0.15);
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
td { padding: 0.65rem 0.75rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:nth-child(even) td { background: rgba(255, 255, 255, 0.015); }
tr:hover td { background: rgba(0, 212, 255, 0.04); }

/* Status dots */
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.dot-green { background: var(--success); box-shadow: 0 0 6px rgba(57, 255, 20, 0.5); }
.dot-yellow { background: var(--warning); box-shadow: 0 0 6px rgba(255, 179, 0, 0.5); }
.dot-red { background: var(--danger); box-shadow: 0 0 6px rgba(255, 45, 85, 0.5); }

/* Tags */
.tag {
  display: inline-block;
  background: rgba(0, 212, 255, 0.1);
  color: var(--primary);
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  font-size: 0.75rem;
  margin-right: 0.25rem;
  border: 1px solid rgba(0, 212, 255, 0.15);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.4rem 0.85rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-family: var(--font);
  cursor: pointer;
  text-align: center;
  transition: background 0.2s, box-shadow 0.2s, border-color 0.2s;
  color: var(--text);
}
.btn-primary {
  background: var(--primary);
  color: #0b0e17;
  border-color: var(--primary);
  font-weight: 600;
}
.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 0 12px var(--primary-glow);
  text-decoration: none;
}
.btn-danger { background: var(--danger); color: white; border-color: var(--danger); }
.btn-danger:hover { background: var(--danger-hover); box-shadow: 0 0 12px rgba(255, 45, 85, 0.3); }
.btn-outline { background: transparent; color: var(--text); border-color: var(--border); }
.btn-outline:hover { background: var(--bg-raised); border-color: var(--text-muted); }
.btn-sm { padding: 0.25rem 0.6rem; font-size: 0.8rem; }

/* Forms */
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: 0.35rem; font-size: 0.85rem; font-weight: 500; color: var(--text-muted); }
input[type="text"], input[type="password"], input[type="email"], input[type="number"], select, textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 0.9rem;
  background: var(--bg-raised);
  color: var(--text);
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-glow);
}

/* Code/commands */
.code {
  font-family: var(--mono);
  background: var(--code-bg);
  padding: 0.2rem 0.45rem;
  border-radius: 3px;
  font-size: 0.85rem;
  color: var(--primary);
  border: 1px solid var(--border);
}
.code-block {
  background: var(--code-bg);
  padding: 0.75rem;
  border-radius: var(--radius);
  overflow-x: auto;
  max-height: 400px;
  font-size: 0.85rem;
  font-family: var(--mono);
  color: var(--text);
  border: 1px solid var(--border);
}
.ssh-command {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--code-bg);
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 0.8rem;
  border: 1px solid var(--border);
}
.debug-textarea {
  font-family: var(--mono);
  font-size: 0.85rem;
}

/* Login page */
.login-container {
  max-width: 380px;
  margin: 8rem auto;
  padding: 0 1rem;
}
.login-container .card {
  padding: 2rem;
  box-shadow: 0 0 60px rgba(0, 212, 255, 0.08), 0 0 120px rgba(0, 212, 255, 0.04);
  border: 1px solid rgba(0, 212, 255, 0.12);
}
.login-container .card-title { text-align: center; margin-bottom: 1.5rem; color: var(--primary); }

/* Alerts */
.alert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  font-size: 0.9rem;
}
.alert-danger { background: rgba(255, 45, 85, 0.1); color: #ff6b8a; border: 1px solid rgba(255, 45, 85, 0.2); }
.alert-success { background: rgba(57, 255, 20, 0.08); color: #66ff44; border: 1px solid rgba(57, 255, 20, 0.15); }

/* Modal */
.modal-backdrop {
  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;
  backdrop-filter: blur(4px);
}
.modal {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.5rem;
  min-width: 400px;
  max-width: 90%;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4), var(--glow-md);
  border: 1px solid rgba(0, 212, 255, 0.12);
}
.modal-title { font-size: 1.1rem; font-weight: 600; margin-bottom: 1rem; color: var(--text); }
.modal-actions { display: flex; gap: 0.5rem; justify-content: flex-end; margin-top: 1.5rem; }

/* Utility */
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 0.85rem; }
.text-mono { font-family: var(--mono); }
.mt-1 { margin-top: 0.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }

/* Scrollbars */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.18); }

/* Responsive */
@media (max-width: 768px) {
  .stats { flex-direction: column; }
  table { font-size: 0.8rem; }
  .nav-links { gap: 0.75rem; }
}
