:root {
  --bg: #0f172a;
  --bg-soft: #1e293b;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --danger-bg: #fef2f2;
  --danger-border: #fecaca;
  --danger-text: #b91c1c;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(2, 6, 23, 0.18);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 50% -200px, #334155 0%, var(--bg) 60%);
  min-height: 100vh;
}

.muted { color: var(--muted); }

/* --- Login --- */
.center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px;
}

.login-card { width: 100%; max-width: 380px; }

.brand { text-align: center; margin-bottom: 22px; }
.brand h1 { font-size: 1.35rem; margin: 12px 0 2px; }
.brand p { margin: 0; }

.brand-logo {
  width: 52px; height: 52px;
  margin: 0 auto;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), #7c3aed);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.5rem;
}
.brand-logo.sm { width: 34px; height: 34px; border-radius: 9px; font-size: 1.05rem; }

form { display: flex; flex-direction: column; gap: 14px; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 0.9rem; font-weight: 600; }
input {
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 1rem;
  outline: none;
}
input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15); }

.btn-primary {
  margin-top: 6px;
  padding: 12px;
  border: none;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}
.btn-primary:hover { background: var(--primary-hover); }

.alert {
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  color: var(--danger-text);
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.9rem;
  margin-bottom: 16px;
}

/* --- Dashboard --- */
.topbar {
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.topbar-inner {
  max-width: 900px; margin: 0 auto;
  padding: 14px 20px;
  display: flex; align-items: center; justify-content: space-between;
  color: #e2e8f0;
}
.brand-inline { display: flex; align-items: center; gap: 10px; }
.user-box { display: flex; align-items: center; gap: 14px; }

.btn-ghost {
  color: #e2e8f0;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); }

.container { max-width: 900px; margin: 0 auto; padding: 40px 20px; color: #e2e8f0; }
.container h1 { margin: 0 0 6px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 28px;
}

.service {
  display: flex; align-items: center; gap: 14px;
  background: var(--card);
  color: var(--text);
  text-decoration: none;
  padding: 18px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.service:hover { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(2, 6, 23, 0.28); }
.service-icon { font-size: 1.8rem; }
.service-body { display: flex; flex-direction: column; flex: 1; }
.service-name { font-weight: 700; }
.service-desc { font-size: 0.82rem; }
.service-arrow { color: var(--muted); font-size: 1.2rem; }

.footer { text-align: center; padding: 24px; font-size: 0.8rem; color: #94a3b8; }
