/* Meldveilig ops-portaal — brand-styling.
 *
 * Palet: ink (donkerblauw), indigo (mid-blauw), gold (accent),
 * sky/mist/sand (achtergronden), ok/warn/err (status).
 * Type: Georgia voor merknaam + headings, system-stack voor body.
 */

:root {
  --ink:    #0F1429;
  --indigo: #2E3A6B;
  --gold:   #B89B5E;
  --sky:    #C9D4E9;
  --mist:   #F4F2EA;
  --sand:   #E8E1CF;

  --ok:     #2F7A4D;
  --warn:   #B07A18;
  --err:    #B23B3B;
  --gray:   #6E7281;
  --line:   #D9D6CC;

  --shadow: 0 1px 2px rgba(15, 20, 41, 0.05),
            0 4px 14px rgba(15, 20, 41, 0.08);

  --radius: 6px;
  --radius-sm: 4px;

  --serif:  Georgia, "Times New Roman", serif;
  --sans:   -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
            "Helvetica Neue", Arial, sans-serif;
  --mono:   ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--mist);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14.5px;
  line-height: 1.55;
}

a { color: var(--indigo); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 {
  font-family: var(--serif);
  color: var(--ink);
  font-weight: 600;
  line-height: 1.25;
  margin: 0 0 0.5em;
}
h1 { font-size: 1.6rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }

.muted { color: var(--gray); }
.mono  { font-family: var(--mono); font-size: 0.92em; }

/* --- Topbar ----------------------------------------------------------- */

.topbar {
  background: var(--ink);
  color: white;
  border-bottom: 3px solid var(--gold);
}
.topbar-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: white;
  text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  font-family: var(--serif);
  font-weight: 700;
  color: var(--gold);
}
.brand-name {
  font-family: var(--serif);
  font-size: 1.1rem;
  letter-spacing: 0.02em;
}
.brand-sub {
  color: var(--gold);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.topnav {
  display: flex;
  gap: 20px;
  margin-left: 12px;
  flex: 1;
}
.topnav a {
  color: var(--sky);
  font-size: 0.9rem;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}
.topnav a:hover { color: white; text-decoration: none; }
.topnav a.active {
  color: white;
  border-bottom-color: var(--gold);
}
.logout {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
}
.logout .user {
  color: var(--sky);
  font-size: 0.85rem;
}

/* --- Page layout ------------------------------------------------------ */

.page {
  max-width: 1240px;
  margin: 24px auto;
  padding: 0 24px;
}
.footer {
  text-align: center;
  color: var(--gray);
  font-size: 0.8rem;
  padding: 32px 0;
}

/* --- Cards & alerts --------------------------------------------------- */

.card {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 24px;
  margin-bottom: 18px;
}

.alert {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border-left: 3px solid currentColor;
  margin-bottom: 14px;
  font-size: 0.92rem;
}
.alert-ok  { color: var(--ok);   background: #EFF6F1; }
.alert-warn{ color: var(--warn); background: #FBF4E5; }
.alert-err { color: var(--err);  background: #FBEEEE; }

/* --- Buttons ---------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-family: var(--sans);
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 80ms ease;
}
.btn-primary {
  background: var(--indigo);
  color: white;
}
.btn-primary:hover { background: var(--ink); }
.btn-ghost {
  background: transparent;
  color: var(--sky);
  border-color: rgba(255, 255, 255, 0.2);
  font-size: 0.85rem;
  padding: 6px 12px;
}
.btn-ghost:hover { color: white; border-color: var(--sky); }

/* --- Form ------------------------------------------------------------- */

label {
  display: block;
  margin: 12px 0 4px;
  font-size: 0.88rem;
  color: var(--ink);
}
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
select, textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: white;
  font-family: var(--sans);
  font-size: 0.95rem;
  color: var(--ink);
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--gold);
  outline-offset: -1px;
  border-color: var(--gold);
}

/* --- Login page ------------------------------------------------------- */

body.login-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background:
    radial-gradient(1200px 800px at 100% -10%, var(--sand) 0%, transparent 60%),
    radial-gradient(900px 700px at -10% 110%, var(--sky) 0%, transparent 60%),
    var(--mist);
}
.login-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 360px;
  margin: auto;
  padding: 32px 32px 24px;
}
.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.login-brand .brand-mark {
  width: 40px;
  height: 40px;
  border-color: var(--gold);
  color: var(--gold);
  font-size: 1.2rem;
}
.login-brand .brand-name {
  font-family: var(--serif);
  font-size: 1.4rem;
  color: var(--ink);
}
.login-brand .brand-sub {
  color: var(--gray);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.login-card .btn-primary {
  width: 100%;
  margin-top: 18px;
  padding: 11px;
  font-size: 0.98rem;
}
.login-foot {
  font-size: 0.8rem;
  color: var(--gray);
  margin: 18px 0 0;
  text-align: center;
}
.login-footer { padding: 16px 0 24px; }

/* --- Dashboard -------------------------------------------------------- */

.dash-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.dash-meta h1 { margin: 0; }
.dash-meta .meta-right { color: var(--gray); font-size: 0.85rem; }
.dash-meta .live-dot {
  display: inline-block;
  width: 8px; height: 8px;
  background: var(--ok);
  border-radius: 50%;
  vertical-align: middle;
  margin-right: 6px;
  animation: pulse 2.5s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.35; }
}

.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.kpi {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow);
}
.kpi-label {
  font-size: 0.78rem;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.kpi-value {
  font-family: var(--serif);
  font-size: 1.6rem;
  margin-top: 4px;
  color: var(--ink);
}
.kpi.kpi-ok   .kpi-value { color: var(--ok); }
.kpi.kpi-warn .kpi-value { color: var(--warn); }
.kpi.kpi-err  .kpi-value { color: var(--err); }

.frontdoor-card {
  display: flex;
  align-items: center;
  gap: 14px;
}
.frontdoor-card h2 {
  margin: 0;
  font-size: 1rem;
  font-family: var(--sans);
  font-weight: 600;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.frontdoor-status {
  font-family: var(--serif);
  font-size: 1.1rem;
}
.frontdoor-card .pill { margin-left: auto; }

/* Tenant-tabel */

.tenant-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.tenant-table th {
  text-align: left;
  font-weight: 600;
  color: var(--gray);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--mist);
}
.tenant-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.tenant-table tr:last-child td { border-bottom: none; }
.tenant-table tr:hover td { background: var(--mist); }
.tenant-table .slug a {
  color: var(--ink);
  font-weight: 600;
}
.tenant-table .slug-sub {
  color: var(--gray);
  font-size: 0.85em;
  margin-top: 2px;
}
.tenant-table .ver { font-family: var(--mono); font-size: 0.88em; }
.tenant-table .uptime { color: var(--gray); font-size: 0.85em; }
.tenant-table .services {
  display: flex;
  gap: 6px;
  align-items: center;
}

.empty-state {
  padding: 40px 20px;
  text-align: center;
  color: var(--gray);
  font-style: italic;
}

/* Pillen + dots */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
  white-space: nowrap;
}
.pill-ok    { background: #DEEDE3; color: var(--ok); }
.pill-warn  { background: #F6E9CC; color: var(--warn); }
.pill-err   { background: #F6D6D6; color: var(--err); }
.pill-info  { background: var(--sky); color: var(--ink); }
.pill-mute  { background: #E5E3DA; color: var(--gray); }

.dot {
  display: inline-block;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--gray);
}
.dot[title]:hover { cursor: help; }
.dot-label {
  font-size: 0.7rem;
  color: var(--gray);
  margin-left: 1px;
  margin-right: 5px;
}
.dot-ok    { background: var(--ok); }
.dot-warn  { background: var(--warn); }
.dot-err   { background: var(--err); }
.dot-mute  { background: var(--line); }

.notice {
  padding: 10px 14px;
  background: #FBF4E5;
  border-left: 3px solid var(--warn);
  border-radius: var(--radius-sm);
  color: var(--warn);
  font-size: 0.9rem;
  margin-bottom: 14px;
}
