/* ============================================================
   BASE STYLES — fonts, brand variables, login page
   The dashboard itself uses dashboard.css for the glass treatment
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,wght@0,200;0,300;0,400;0,500;1,200;1,300;1,400&family=Manrope:wght@300;400;500;600&family=JetBrains+Mono:wght@500;600&display=swap');

:root {
  --navy:        #1a3a4a;
  --navy-deep:   #0e242e;
  --sage:        #7a9e87;
  --sage-deep:   #5a7e67;
  --sage-pale:   #a8c2b0;
  --sage-fade:   rgba(122, 158, 135, 0.18);
  --paper:       #fafaf6;
  --paper-2:     #f2efe6;
  --line:        rgba(26, 58, 74, 0.12);
  --ink-soft:    rgba(26, 58, 74, 0.7);

  --f-display:   'Fraunces', Georgia, serif;
  --f-body:      'Manrope', -apple-system, sans-serif;
  --f-mono:      'JetBrains Mono', monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: var(--f-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }

/* ============================================================
   LOGIN PAGE — keeps original light treatment
   ============================================================ */

body.login-page {
  background: var(--paper);
  color: var(--navy);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-container { width: 100%; max-width: 420px; }

.login-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 48px 40px;
  position: relative;
}
.login-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--sage), transparent);
}

.login-brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--f-display); font-size: 18px; margin-bottom: 32px;
}
.login-brand em { font-style: italic; color: var(--sage-deep); }
.login-brand .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--sage); }

.login-title {
  font-family: var(--f-display); font-weight: 300; font-size: 32px;
  line-height: 1.1; letter-spacing: -0.02em; margin-bottom: 8px;
}
.login-title em { font-style: italic; color: var(--sage-deep); }

.login-sub { font-size: 14px; color: var(--ink-soft); margin-bottom: 32px; }

.field { margin-bottom: 20px; }
.field label {
  display: block; font-family: var(--f-mono); font-size: 10px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-soft); margin-bottom: 8px;
}
.field input {
  width: 100%; padding: 14px 16px;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 6px; font-size: 15px; transition: border-color 0.2s;
}
.field input:focus { outline: none; border-color: var(--sage-deep); background: white; }

.login-btn {
  width: 100%; padding: 16px 24px;
  background: var(--navy); color: var(--paper);
  border: none; border-radius: 100px;
  font-family: var(--f-mono); font-size: 11px; font-weight: 600;
  letter-spacing: 0.2em; text-transform: uppercase;
  transition: background 0.2s, transform 0.2s;
  display: inline-flex; align-items: center; justify-content: center;
  gap: 12px; margin-top: 8px;
}
.login-btn:hover:not(:disabled) { background: var(--sage-deep); transform: translateY(-1px); }
.login-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.login-btn .arr { font-family: var(--f-body); letter-spacing: 0; }

.login-msg {
  margin-top: 16px; padding: 12px 16px;
  border-radius: 6px; font-size: 13px; line-height: 1.5;
}
.login-msg.success { background: var(--sage-fade); border-left: 3px solid var(--sage-deep); color: var(--navy); }
.login-msg.error { background: rgba(194, 91, 63, 0.1); border-left: 3px solid #c25b3f; color: #8a3d33; }

.login-footer { text-align: center; margin-top: 32px; font-size: 13px; color: var(--ink-soft); }
.login-footer a { color: var(--sage-deep); font-weight: 500; border-bottom: 1px solid currentColor; }

/* ============================================================
   ADMIN PAGE — dark glass treatment (cards float on dark bg)
   ============================================================ */

.client-card-admin {
  padding: 28px;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 4px 20px rgba(0, 0, 0, 0.15);
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}
.client-card-admin:hover {
  transform: translateY(-2px);
  border-color: rgba(168, 194, 176, 0.25);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 12px 40px rgba(0, 0, 0, 0.25),
    0 0 60px rgba(122, 158, 135, 0.15);
}
.client-card-admin .client-card-name {
  font-family: var(--f-display); font-size: 22px; font-weight: 400;
  color: rgba(255, 255, 255, 0.95); letter-spacing: -0.01em;
}
.client-card-admin .client-card-meta {
  font-family: var(--f-mono); font-size: 10px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}
.client-card-status {
  padding: 14px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex; flex-direction: column; gap: 4px; font-size: 13px;
}
.status-ok {
  color: #a8c2b0; font-weight: 500;
  text-shadow: 0 0 12px rgba(168, 194, 176, 0.3);
}
.status-warn { color: #e8c089; font-weight: 500; }
.status-meta {
  font-family: var(--f-mono); font-size: 10px;
  letter-spacing: 0.1em; color: rgba(255, 255, 255, 0.45);
}
.client-card-actions {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.connect-btn {
  padding: 10px 18px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 100px;
  font-family: var(--f-mono); font-size: 10px; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  cursor: pointer; transition: all 0.3s;
}
.connect-btn:hover:not(:disabled) {
  background: rgba(168, 194, 176, 0.15);
  border-color: rgba(168, 194, 176, 0.3);
  transform: translateY(-1px);
}
.connect-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.view-link {
  font-family: var(--f-mono); font-size: 10px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  transition: color 0.2s;
}
.view-link:hover { color: #a8c2b0; }