/*  ZaagPlanner — Design System
    Industrieel minimalistisch · Grijstinten + rood accent
    Lettertype: Barlow Condensed (display) + DM Sans (body)
*/

@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@400;600;700&family=DM+Sans:wght@300;400;500;600&family=JetBrains+Mono:wght@400;600&display=swap');

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

:root {
  /* Grijs palet */
  --white:   #ffffff;
  --g50:     #f7f7f7;
  --g100:    #efefef;
  --g200:    #e2e2e2;
  --g300:    #cbcbcb;
  --g400:    #afafaf;
  --g500:    #878787;
  --g600:    #636363;
  --g700:    #474747;
  --g800:    #2e2e2e;
  --g900:    #1a1a1a;
  --black:   #0d0d0d;

  /* Rood accent — gebaseerd op logo */
  --red:     #d93025;
  --red-dk:  #b52820;
  --red-lt:  #f4433620;

  /* Semantisch */
  --bg:      var(--g50);
  --surface: var(--white);
  --border:  var(--g200);
  --border-strong: var(--g300);
  --text:    var(--g900);
  --text-2:  var(--g600);
  --text-3:  var(--g400);
  --accent:  var(--red);
  --success: #1e8c55;
  --success-bg: #e6f5ed;
  --danger:  #c0392b;
  --danger-bg: #fdf0ef;

  /* Typografie */
  --font-display: 'Barlow Condensed', sans-serif;
  --font-body:    'DM Sans', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;

  /* Ruimte */
  --radius-sm: 4px;
  --radius:    8px;
  --radius-lg: 12px;

  /* Schaduwen */
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow:    0 4px 12px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.06);
  --shadow-lg: 0 8px 24px rgba(0,0,0,.1), 0 4px 8px rgba(0,0,0,.06);
}

html { font-size: 16px; }
body { background: var(--bg); color: var(--text); font-family: var(--font-body); line-height: 1.5; }

/* ── TYPOGRAPHY ── */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; letter-spacing: .5px; line-height: 1.1; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--font-body); font-weight: 500; font-size: .875rem;
  border-radius: var(--radius); border: 1.5px solid transparent;
  padding: .625rem 1.125rem; cursor: pointer; text-decoration: none;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .1s;
  white-space: nowrap; line-height: 1;
}
.btn:active { transform: scale(.98); }
.btn-primary   { background: var(--accent); color: var(--white); border-color: var(--accent); }
.btn-primary:hover { background: var(--red-dk); border-color: var(--red-dk); }
.btn-secondary { background: var(--white); color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover { border-color: var(--g400); background: var(--g50); }
.btn-ghost     { background: transparent; color: var(--text-2); border-color: transparent; }
.btn-ghost:hover { background: var(--g100); color: var(--text); }
.btn-danger    { background: var(--danger-bg); color: var(--danger); border-color: rgba(192,57,43,.25); }
.btn-danger:hover { background: rgba(192,57,43,.15); }
.btn-lg { padding: .875rem 1.5rem; font-size: 1rem; }
.btn-sm { padding: .4rem .75rem; font-size: .8rem; }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none; }

/* ── FORM ELEMENTS ── */
.field { display: flex; flex-direction: column; gap: .375rem; }
.field label { font-size: .75rem; font-weight: 600; letter-spacing: .8px; text-transform: uppercase; color: var(--text-2); }
.field input {
  background: var(--white); border: 1.5px solid var(--border-strong); border-radius: var(--radius);
  padding: .75rem 1rem; font-family: var(--font-body); font-size: .9375rem; color: var(--text);
  outline: none; transition: border-color .15s, box-shadow .15s;
}
.field input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(217,48,37,.12); }

/* ── CARDS ── */
.card { background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--radius-lg); }

/* ── PROGRESS ── */
.prog-bar { height: 6px; background: var(--g200); border-radius: 99px; overflow: hidden; }
.prog-fill { height: 100%; background: var(--accent); border-radius: 99px; transition: width .4s ease; }
.prog-fill.green { background: var(--success); }

/* ── BADGE ── */
.badge { display: inline-flex; align-items: center; gap: .3rem; font-size: .72rem; font-weight: 600;
         letter-spacing: .5px; text-transform: uppercase; padding: .25rem .6rem;
         border-radius: var(--radius-sm); }
.badge-red   { background: var(--red-lt); color: var(--red); }
.badge-green { background: var(--success-bg); color: var(--success); }
.badge-gray  { background: var(--g100); color: var(--g600); }

/* ── DIVIDER ── */
hr { border: none; border-top: 1.5px solid var(--border); }

/* ── NAV ── */
.nav {
  background: var(--white); border-bottom: 1.5px solid var(--border);
  padding: 0 2rem; height: 58px; display: flex; align-items: center; gap: 1rem;
  position: sticky; top: 0; z-index: 100; box-shadow: var(--shadow-sm);
}
.nav-logo { display: flex; align-items: center; gap: .75rem; text-decoration: none; flex-shrink: 0; }
.nav-logo img { height: 28px; }
.nav-sep { width: 1.5px; height: 22px; background: var(--border-strong); }
.nav-app { font-family: var(--font-display); font-size: 1.15rem; font-weight: 700;
           letter-spacing: 1.5px; text-transform: uppercase; color: var(--g700); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: .75rem; }
.nav-user  { font-size: .82rem; color: var(--text-2); }

/* ── TOAST ── */
.toast-wrap { position: fixed; bottom: 1.5rem; right: 1.5rem; display: flex; flex-direction: column;
              gap: .5rem; z-index: 9999; }
.toast { background: var(--white); border: 1.5px solid var(--border); border-radius: var(--radius);
         padding: .75rem 1.1rem; font-size: .875rem; box-shadow: var(--shadow);
         animation: slideToast .22s ease; max-width: 320px; display: flex; align-items: center; gap: .6rem; }
.toast.success { border-left: 3px solid var(--success); }
.toast.error   { border-left: 3px solid var(--danger); }
@keyframes slideToast { from{transform:translateX(110%);opacity:0} to{transform:translateX(0);opacity:1} }

/* ── MODAL ── */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4);
                 z-index: 1000; align-items: center; justify-content: center; padding: 1rem; }
.modal-overlay.active { display: flex; }
.modal { background: var(--white); border: 1.5px solid var(--border); border-radius: var(--radius-lg);
         padding: 2rem; max-width: 440px; width: 100%; box-shadow: var(--shadow-lg); }
.modal h3 { font-size: 1.4rem; margin-bottom: .5rem; }
.modal p  { color: var(--text-2); font-size: .9rem; margin-bottom: 1.5rem; }
.modal-actions { display: flex; gap: .625rem; justify-content: flex-end; }

/* ── EMPTY STATE ── */
.empty-state { text-align: center; padding: 4rem 2rem; color: var(--text-3); }
.empty-state .icon { font-size: 2.5rem; margin-bottom: 1rem; }
.empty-state p { font-size: .95rem; color: var(--text-2); }

/* ── UTIL ── */
.mono { font-family: var(--font-mono); }
