/* CrisisRadar / GripOpCrisis — zelfstandige huisstijl-stylesheet (geen
   afhankelijkheid van ongecompileerde Tailwind-utilities). Kleuren uit
   crisisradar.com/huisstijl. */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --cr-navy: #0E2050;
  --cr-navy-deep: #0A1840;
  --cr-navy-light: #1C3A78;
  --cr-red: #E63323;
  --cr-red-soft: #F06A5E;
  --cr-ink: #1f2937;
  --cr-muted: #6b7280;
  --cr-line: #e8eaef;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: var(--cr-ink);
  background: #f6f7f9;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; }
.hidden { display: none !important; }
[class^="ki-"], [class*=" ki-"] { line-height: 1; }

/* ---------- Header ---------- */
.cr-header {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 20px;
  background: linear-gradient(120deg, var(--cr-navy) 0%, var(--cr-navy-deep) 65%, var(--cr-navy-light) 100%);
  color: #fff; position: sticky; top: 0; z-index: 40;
  box-shadow: 0 1px 4px rgba(0,0,0,.18);
}
.cr-header-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cr-header-left img { height: 26px; }
.cr-header-title { font-size: 14px; font-weight: 500; color: rgba(255,255,255,.85); white-space: nowrap; }

/* ---------- Gebruikersmenu ---------- */
.cr-user-menu { position: relative; }
.cr-user-toggle {
  display: flex; align-items: center; gap: 8px; cursor: pointer;
  background: transparent; border: 0; padding: 2px; color: #fff;
}
.cr-avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 999px;
  background: var(--cr-red); color: #fff; font-weight: 600; font-size: 13px; flex-shrink: 0;
}
.cr-user-toggle .ki-down { font-size: 11px; color: rgba(255,255,255,.7); }

.cr-user-dropdown {
  position: absolute; right: 0; top: calc(100% + 8px);
  min-width: 264px; background: #fff; border-radius: 14px; padding: 6px;
  box-shadow: 0 16px 40px rgba(14,32,80,.20); border: 1px solid #eef0f4;
  opacity: 0; transform: translateY(-6px); pointer-events: none;
  transition: opacity .14s ease, transform .14s ease; z-index: 50;
}
.cr-user-menu.open .cr-user-dropdown { opacity: 1; transform: translateY(0); pointer-events: auto; }

.cr-ud-header { padding: 10px 12px; border-bottom: 1px solid #f0f1f4; margin-bottom: 4px; }
.cr-ud-name { font-weight: 600; color: var(--cr-navy); font-size: 14px; }
.cr-ud-email { color: var(--cr-muted); font-size: 12px; margin-top: 1px; }

.cr-user-dropdown a, .cr-user-dropdown button {
  display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 10px 12px; border-radius: 9px; font-size: 14px; color: var(--cr-ink);
  background: none; border: 0; cursor: pointer; text-align: left;
}
.cr-user-dropdown a:hover, .cr-user-dropdown button:hover { background: #f4f6fa; color: var(--cr-navy); }
.cr-user-dropdown a i, .cr-user-dropdown button i { font-size: 18px; color: var(--cr-navy-light); width: 20px; text-align: center; }
.cr-user-dropdown #logout_button, .cr-user-dropdown #logout_button i { color: var(--cr-red); }
.cr-ud-divider { height: 1px; background: #f0f1f4; margin: 5px 8px; }

/* ---------- Dashboard ---------- */
.cr-main { max-width: 1120px; margin: 0 auto; padding: 32px 24px; }
.cr-page-title { font-size: 24px; font-weight: 600; color: var(--cr-navy); margin: 0; }
.cr-page-sub { margin-top: 4px; color: var(--cr-muted); font-size: 14px; }
.cr-tiles { margin-top: 28px; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.cr-tile {
  display: flex; flex-direction: column; align-items: flex-start;
  background: #fff; border: 1px solid var(--cr-line); border-radius: 16px; padding: 22px;
  transition: transform .12s ease, box-shadow .12s ease;
}
.cr-tile:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(14,32,80,.10); }
.cr-tile-icon { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 13px; font-size: 24px; }
.cr-tile-title { margin-top: 14px; font-weight: 600; color: var(--cr-navy); font-size: 17px; }
.cr-tile-desc { margin-top: 5px; color: var(--cr-muted); font-size: 13.5px; line-height: 1.5; }

/* ---------- Login ---------- */
.cr-login { display: flex; min-height: 100%; }
.cr-login-brand {
  flex: 1; display: none; flex-direction: column; justify-content: space-between; padding: 48px; color: #fff;
  background: linear-gradient(160deg, var(--cr-navy) 0%, var(--cr-navy-deep) 60%, var(--cr-navy-light) 100%);
}
.cr-login-brand h1 { font-size: 34px; font-weight: 600; line-height: 1.15; margin: 0; }
.cr-login-brand p { margin-top: 14px; max-width: 26rem; font-size: 17px; color: rgba(255,255,255,.82); line-height: 1.5; }
.cr-login-brand .cr-copy { font-size: 13px; color: rgba(255,255,255,.5); }
@media (min-width: 1024px) { .cr-login-brand { display: flex; } }
.cr-login-panel { flex: 1; display: flex; align-items: center; justify-content: center; padding: 24px; }
.cr-login-card { width: 100%; max-width: 380px; }
.cr-login-card h2 { font-size: 22px; font-weight: 600; color: var(--cr-navy); margin: 0; }
.cr-login-card .cr-lead { margin-top: 4px; color: var(--cr-muted); font-size: 14px; }
.cr-login-logo-sm { height: 34px; margin-bottom: 26px; }
@media (min-width: 1024px) { .cr-login-logo-sm { display: none; } }

.cr-form { margin-top: 26px; display: flex; flex-direction: column; gap: 15px; }
.cr-field label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 500; color: #374151; }
.cr-input {
  width: 100%; border: 1px solid #d4d7de; border-radius: 10px; padding: 11px 14px;
  font-size: 14px; outline: none; transition: border-color .1s, box-shadow .1s; font-family: inherit;
}
.cr-input:focus { border-color: var(--cr-navy); box-shadow: 0 0 0 3px rgba(14,32,80,.12); }
.cr-btn-primary {
  width: 100%; background: var(--cr-red); color: #fff; font-weight: 600; font-size: 14px;
  border: 0; border-radius: 10px; padding: 12px 16px; cursor: pointer; transition: filter .1s;
}
.cr-btn-primary:hover { filter: brightness(.96); }
.cr-btn-primary:disabled { opacity: .6; cursor: default; }
.cr-btn-ghost {
  width: 100%; background: #fff; color: var(--cr-navy); font-weight: 500; font-size: 14px;
  border: 1px solid #d4d7de; border-radius: 10px; padding: 11px 16px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.cr-btn-ghost:hover { background: #f4f6fa; }
.cr-btn-ghost i { color: var(--cr-navy-light); }
.cr-hint { margin-top: 22px; text-align: center; font-size: 12px; color: #9ca3af; }
.cr-error { background: #fdecec; border: 1px solid #f6c9c5; color: #b91c1c; border-radius: 10px; padding: 10px 12px; font-size: 13px; }

/* ---------- Install-banner ---------- */
.cr-install-banner {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%);
  background: var(--cr-navy); color: #fff; border-radius: 12px; padding: 12px 16px;
  display: flex; align-items: center; gap: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.25);
  max-width: 92vw; z-index: 60; font-size: 14px;
}
.cr-install-banner button { background: rgba(255,255,255,.16); color: #fff; border: 0; border-radius: 8px; padding: 6px 12px; cursor: pointer; }
