/* ============================================================
   World-ICT Klantportaal — design-systeem overgenomen van de site
   ============================================================ */
:root {
  --primary: #9c6b10;
  --primary-dark: #2a2014;
  --navy: #1a1410;
  --accent: #e8a33d;
  --accent-soft: #faeed3;
  --surface: #ffffff;
  --surface-alt: #faf7f1;
  --text: #2b2318;
  --text-muted: #6f6555;
  --border: #eae3d6;
  --radius: 14px;
  --shadow-sm: 0 2px 8px rgba(26, 20, 12, .06);
  --shadow-md: 0 10px 30px rgba(26, 20, 12, .12);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ok: #2e7d43;
  --warn: #b3541e;
  --err: #b3271e;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: var(--font); color: var(--text); background: var(--surface-alt); line-height: 1.6; -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; cursor: pointer; }

.container { width: min(1160px, 94%); margin-inline: auto; }

/* ---------- Topbar ---------- */
.topbar { background: var(--navy); color: #fff; }
.topbar-inner { display: flex; align-items: center; gap: 1.5rem; padding: .8rem 0; flex-wrap: wrap; }
.logo { display: inline-flex; align-items: center; gap: .6rem; color: #fff; }
.logo:hover { text-decoration: none; }
.logo-mark { width: 30px; height: 30px; color: var(--accent); }
.logo-text { font-size: 1.1rem; font-weight: 800; letter-spacing: -.02em; }
.logo-accent { color: var(--accent); }
.logo-sub { font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.55); display: block; margin-top: -3px; }

.portal-nav { display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; margin-left: auto; }
.portal-nav a { color: rgba(255,255,255,.8); font-size: .92rem; font-weight: 500; padding: .45rem .85rem; border-radius: 999px; }
.portal-nav a:hover { color: #fff; background: rgba(255,255,255,.08); text-decoration: none; }
.portal-nav a.active { color: #241b12; background: var(--accent); }

.topbar-actions { display: flex; align-items: center; gap: .8rem; }
.lang-switch { display: flex; border: 1px solid rgba(255,255,255,.25); border-radius: 999px; overflow: hidden; }
.lang-switch a { color: rgba(255,255,255,.7); padding: .25rem .65rem; font-size: .8rem; font-weight: 600; }
.lang-switch a:hover { text-decoration: none; color: #fff; }
.lang-switch a.active { background: var(--accent); color: #241b12; }
.userchip { font-size: .85rem; color: rgba(255,255,255,.7); }

/* ---------- Knoppen ---------- */
.btn { display: inline-flex; align-items: center; gap: .45rem; padding: .6rem 1.3rem; border-radius: 999px; border: 2px solid transparent; font-weight: 600; font-size: .92rem; transition: transform .2s ease, box-shadow .2s ease; }
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn-primary { background: linear-gradient(135deg, #f2b04a, #c9821a); color: #241b12; box-shadow: 0 6px 16px rgba(232,163,61,.3); }
.btn-outline { border-color: var(--primary); color: var(--primary); background: transparent; }
.btn-outline:hover { background: var(--accent-soft); }
.btn-sm { padding: .35rem .9rem; font-size: .82rem; }
.btn-danger { border-color: var(--err); color: var(--err); background: transparent; }
.btn-danger:hover { background: #fdeceb; }
.linklike { background: none; border: none; color: var(--primary); padding: 0; }

/* ---------- Pagina ---------- */
.page { padding: 2.2rem 0 4rem; }
.page-head { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.page-head h1 { font-size: 1.55rem; letter-spacing: -.02em; }
.page-head .actions { margin-left: auto; display: flex; gap: .6rem; }
.page-sub { color: var(--text-muted); margin-top: -1rem; margin-bottom: 1.5rem; font-size: .95rem; }

/* ---------- Cards & grids ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 1.4rem; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 1.6rem; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.2rem 1.4rem; box-shadow: var(--shadow-sm); }
.stat-card .num { font-size: 2rem; font-weight: 800; color: var(--primary); line-height: 1.1; }
.stat-card .lbl { color: var(--text-muted); font-size: .88rem; }
.stat-card a { font-size: .82rem; }

/* ---------- Tabellen ---------- */
.tablewrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: .7rem 1rem; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: var(--surface-alt); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); }
tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #fdfaf4; }

/* ---------- Badges ---------- */
.badge { display: inline-block; padding: .15rem .6rem; border-radius: 999px; font-size: .75rem; font-weight: 600; white-space: nowrap; }
.badge-ok { background: #e3f2e7; color: var(--ok); }
.badge-warn { background: #fbeadf; color: var(--warn); }
.badge-err { background: #fdeceb; color: var(--err); }
.badge-muted { background: var(--surface-alt); color: var(--text-muted); border: 1px solid var(--border); }
.badge-accent { background: var(--accent-soft); color: var(--primary); }

/* ---------- Formulieren ---------- */
form.stack { display: grid; gap: 1rem; max-width: 560px; }
label.field { display: grid; gap: .3rem; font-weight: 600; font-size: .9rem; }
input[type=text], input[type=email], input[type=password], input[type=number], select, textarea {
  font: inherit; padding: .65rem .9rem; border: 1px solid var(--border); border-radius: 10px; background: #fff; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.field-hint { font-weight: 400; color: var(--text-muted); font-size: .8rem; }
.error { color: var(--err); font-size: .85rem; }
.checkline { display: flex; gap: .5rem; align-items: center; font-size: .9rem; }
.inline-form { display: inline; }
.searchbar { display: flex; gap: .6rem; max-width: 480px; }

/* ---------- Flash ---------- */
.flash { padding: .85rem 1.2rem; border-radius: 10px; margin-bottom: 1.2rem; font-size: .92rem; }
.flash-ok { background: #e3f2e7; color: var(--ok); border: 1px solid #bfe3c8; }
.flash-err { background: #fdeceb; color: var(--err); border: 1px solid #f5c6c2; }
.flash-pass { background: var(--accent-soft); border: 1px solid var(--accent); color: var(--primary-dark); font-family: ui-monospace, monospace; }

/* ---------- Chat/ticket thread ---------- */
.thread { display: grid; gap: .9rem; }
.article { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.2rem; }
.article.mine { background: var(--accent-soft); border-color: #ecd9ae; }
.article-meta { font-size: .78rem; color: var(--text-muted); margin-bottom: .4rem; }
.article-body { white-space: pre-wrap; font-size: .92rem; }

/* ---------- Login ---------- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; background: radial-gradient(1000px 500px at 20% -10%, #3a2c17 0%, var(--navy) 55%); padding: 2rem 1rem; }
.auth-card { width: min(420px, 100%); background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-md); padding: 2.2rem; }
.auth-card .logo { color: var(--primary); justify-content: center; margin-bottom: .4rem; }
.auth-card h1 { font-size: 1.25rem; text-align: center; margin-bottom: 1.4rem; }
.auth-links { text-align: center; margin-top: 1.2rem; font-size: .85rem; color: var(--text-muted); }

/* ---------- Utilities ---------- */
.muted { color: var(--text-muted); }
.mt { margin-top: 1.4rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; }
@media (max-width: 800px) { .grid-2 { grid-template-columns: 1fr; } }
.pagination { display: flex; gap: .3rem; margin-top: 1.2rem; flex-wrap: wrap; }
.pagination a, .pagination span { padding: .3rem .7rem; border-radius: 8px; border: 1px solid var(--border); background: #fff; font-size: .85rem; }
.pagination .current { background: var(--accent); border-color: var(--accent); color: #241b12; font-weight: 700; }
.empty { padding: 2.5rem 1rem; text-align: center; color: var(--text-muted); }
footer.portal-footer { padding: 1.5rem 0 2.5rem; color: var(--text-muted); font-size: .82rem; text-align: center; }
