/* MunjDeploy — minimalist dashboard styles */

:root {
  --bg: #0f1117;
  --surface: #1a1d27;
  --border: #2a2f3d;
  --text: #e4e6eb;
  --muted: #8b919a;
  --primary: #4f8cff;
  --success: #3dd68c;
  --warning: #f5a623;
  --danger: #f56565;
  --radius: 8px;
  --font: system-ui, -apple-system, sans-serif;
  --mono: "Cascadia Code", "Fira Code", Consolas, monospace;
}

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

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

[x-cloak] { display: none !important; }

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.brand {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.page-header h1 { font-size: 1.75rem; margin-top: 0.25rem; }

.muted { color: var(--muted); font-size: 0.875rem; }
.mono { font-family: var(--mono); font-size: 0.8rem; word-break: break-all; }

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-size: 0.875rem;
  text-decoration: none;
  transition: background 0.15s;
}

.btn:hover { background: var(--border); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { opacity: 0.9; }
.btn-success { background: var(--success); border-color: var(--success); color: #000; }
.btn-warning { background: var(--warning); border-color: var(--warning); color: #000; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-sm { padding: 0.25rem 0.5rem; font-size: 0.75rem; }
.btn-group { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* Cards & forms */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.card h2 { font-size: 1rem; margin-bottom: 1rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }

.form-card label { display: block; margin: 0.75rem 0 0.25rem; font-size: 0.875rem; }
.form-card input, .form-card textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font);
}

.env-editor {
  width: 100%;
  padding: 0.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.85rem;
  resize: vertical;
}

.login-box {
  max-width: 400px;
  margin: 4rem auto;
  padding: 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.login-box h1 { margin-bottom: 1.5rem; }
.login-box input { width: 100%; margin-bottom: 1rem; padding: 0.5rem 0.75rem; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); }
.login-box button { width: 100%; }

/* Table */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid var(--border); }
.table th { color: var(--muted); font-size: 0.75rem; text-transform: uppercase; }
.table a { color: var(--primary); text-decoration: none; }

/* Badges */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}
.badge-active { background: rgba(61, 214, 140, 0.15); color: var(--success); }
.badge-inactive { background: rgba(245, 101, 101, 0.15); color: var(--danger); }
.badge-unknown { background: rgba(139, 145, 154, 0.15); color: var(--muted); }

/* Flash messages */
.flash { padding: 0.75rem 1rem; border-radius: var(--radius); margin-bottom: 1rem; font-size: 0.875rem; }
.flash-success { background: rgba(61, 214, 140, 0.15); color: var(--success); border: 1px solid var(--success); }
.flash-error { background: rgba(245, 101, 101, 0.15); color: var(--danger); border: 1px solid var(--danger); }

/* Info grid */
.info-grid { display: grid; grid-template-columns: 140px 1fr; gap: 0.5rem 1rem; font-size: 0.875rem; }
.info-grid dt { color: var(--muted); }
.info-grid dd code { font-family: var(--mono); font-size: 0.8rem; word-break: break-all; }

.mt-sm { margin-top: 0.75rem; }

/* Terminal */
.terminal {
  background: #1e1e1e;
  color: #a8ff78;
  font-family: var(--mono);
  font-size: 0.8rem;
  padding: 1rem;
  border-radius: var(--radius);
  height: 400px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-all;
  border: 1px solid #333;
}

.token-mask { font-family: var(--mono); font-size: 0.8rem; }

/* Danger zone */
.danger-zone { border-color: var(--danger); }
.danger-zone h2 { color: var(--danger); }
