/* assets/css/termijnen.css */
/* ============================================================
   NP – Termijnen – Portal Style (Light/Dark) + Mobile fixes
   ============================================================ */

:root{
  color-scheme: light dark;

  --bg: #f6f7fb;
  --card: #ffffff;
  --text: #0f172a;
  --muted: rgba(15,23,42,.72);

  --border: rgba(15,23,42,.10);
  --border-strong: rgba(15,23,42,.16);

  --accent: #2563eb;
  --accent-soft: rgba(37,99,235,.12);

  --shadow: 0 10px 28px rgba(15,23,42,.08);
  --radius: 16px;
  --radius-sm: 12px;
}

@media (prefers-color-scheme: dark){
  :root{
    --bg: #0b1020;
    --card: #0f172a;
    --text: #e5e7eb;
    --muted: rgba(229,231,235,.70);

    --border: rgba(229,231,235,.12);
    --border-strong: rgba(229,231,235,.18);

    --accent: #60a5fa;
    --accent-soft: rgba(96,165,250,.14);

    --shadow: 0 12px 30px rgba(0,0,0,.35);
  }
}

*{ box-sizing: border-box; }
html, body{ max-width: 100%; overflow-x: hidden; }

body{
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

/* Page wrapper */
#np-termijnen-page{
  max-width: 1150px;
  margin: 0 auto;
  padding: 18px 14px 40px;
}

.np-header{
  display:flex;
  align-items:flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.np-title{
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
  letter-spacing: .2px;
}

.np-sub{
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
  max-width: 70ch;
}

/* Card */
.np-card{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  overflow: hidden;
}

.np-card + .np-card{ margin-top: 14px; }

.np-card-head{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.np-card-head h2{
  margin: 0;
  font-size: 14px;
  letter-spacing: .2px;
}

/* Grid */
.np-grid{
  display:grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 900px){
  .np-grid{ grid-template-columns: 1.3fr 1fr; }
}

.np-field{ min-width: 0; } /* belangrijk voor iOS overflow */
.np-field label{
  display:block;
  font-weight: 800;
  font-size: 13px;
  margin: 0 0 6px;
}

/* Inputs: fix iOS datetime overflow */
.np-input,
.np-select{
  width: 100%;
  max-width: 100%;
  min-width: 0;
  display: block;
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text);
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
  font-size: 16px; /* voorkomt iOS zoom + layout issues */
}

.np-input:focus,
.np-select:focus{
  border-color: color-mix(in oklab, var(--accent) 55%, var(--border-strong));
  box-shadow: 0 0 0 4px var(--accent-soft);
}

/* Extra: iOS Safari kan intern padding anders doen */
input[type="datetime-local"]{
  -webkit-appearance: none;
  appearance: none;
}

.np-hint{
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.35;
}

/* Buttons */
.np-actions{
  display:flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.np-actions-top .np-btn{
  flex: 1 1 140px;
}

.np-actions-bottom{
  margin-top: 10px;
}

.np-btn{
  appearance: none;
  border: 1px solid var(--border-strong);
  background: rgba(127,127,127,.10);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  transition: transform .04s ease, background-color .12s ease, border-color .12s ease;
  user-select: none;
}

.np-btn:hover{ background: rgba(127,127,127,.16); }
.np-btn:active{ transform: translateY(1px); }

.np-btn-primary{
  border-color: color-mix(in oklab, var(--accent) 50%, var(--border-strong));
  background: var(--accent-soft);
}
.np-btn-primary:hover{
  background: color-mix(in oklab, var(--accent-soft) 80%, rgba(127,127,127,.12));
}

.np-btn-block{
  width: 100%;
}

/* Results */
.np-results{
  display:grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 14px;
}
@media (min-width: 900px){
  .np-results{ grid-template-columns: 1fr 1fr; }
}

.np-kv{
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  background: color-mix(in oklab, var(--card) 92%, rgba(127,127,127,.08));
}

.np-k{
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
  line-height: 1.3;
}

.np-v{
  font-size: 15px;
  font-weight: 900;
  line-height: 1.25;
  word-break: break-word;
}

.np-banner{
  margin-top: 12px;
  border: 1px dashed var(--border-strong);
  background: color-mix(in oklab, var(--card) 88%, rgba(127,127,127,.10));
  border-radius: var(--radius);
  padding: 12px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}

.np-chiprow{
  display:flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.np-chip{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 12px;
  color: var(--muted);
  background: rgba(127,127,127,.08);
  user-select: none;
}

.np-chip strong{ color: var(--text); font-weight: 900; }

code{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
}

/* ============================================================
   Topbar (Terug naar menu)
   ============================================================ */

.np-topbar{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  margin: 4px 0 12px;
}

.np-btn-back{
  text-decoration: none;
  display:inline-flex;
  align-items:center;
  gap: 8px;
  white-space: nowrap;
}