/* NutriTrack — Custom design system */
:root {
  --nt-green:       #16a34a;
  --nt-green-light: #22c55e;
  --nt-green-dim:   #dcfce7;
  --nt-green-dark:  #14532d;
  --nt-amber:       #d97706;
  --nt-amber-dim:   #fef3c7;
  --nt-red:         #dc2626;
  --nt-red-dim:     #fee2e2;
  --nt-blue:        #2563eb;
  --nt-blue-dim:    #dbeafe;
  --nt-purple:      #7c3aed;
  --nt-purple-dim:  #ede9fe;

  --nt-bg:          #f8fafc;
  --nt-surface:     #ffffff;
  --nt-border:      #e2e8f0;
  --nt-text:        #0f172a;
  --nt-text-muted:  #64748b;
  --nt-radius:      0.75rem;
  --nt-shadow:      0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);
  --nt-shadow-md:   0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);
}

[data-theme="dark"] {
  --nt-bg:          #0f172a;
  --nt-surface:     #1e293b;
  --nt-border:      #334155;
  --nt-text:        #f1f5f9;
  --nt-text-muted:  #94a3b8;
  --nt-green-dim:   #14532d;
  --nt-amber-dim:   #78350f;
  --nt-red-dim:     #7f1d1d;
  --nt-blue-dim:    #1e3a5f;
  --nt-purple-dim:  #3b0764;
}

/* ── Reset & base ── */
*, *::before, *::after { box-sizing: border-box; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--nt-bg);
  color: var(--nt-text);
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

h1, h2, h3, h4 { font-weight: 700; line-height: 1.2; margin: 0 0 .75rem; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 .75rem; line-height: 1.6; }

/* ── Layout ── */
.nt-wrap { max-width: 1200px; margin: 0 auto; padding: 0 1.25rem; }

main { flex: 1; padding: 2rem 0; }

footer {
  border-top: 1px solid var(--nt-border);
  padding: .75rem 0;
  text-align: center;
  color: var(--nt-text-muted);
  font-size: .8rem;
}

/* ── Navigation ── */
.nt-nav {
  background: var(--nt-surface);
  border-bottom: 1px solid var(--nt-border);
  box-shadow: var(--nt-shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nt-nav-inner {
  display: flex;
  align-items: center;
  gap: .5rem;
  height: 3.5rem;
}

.nt-brand {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--nt-green);
  text-decoration: none;
  letter-spacing: -.02em;
  flex-shrink: 0;
}

.nt-brand svg { width: 1.6rem; height: 1.6rem; }

.nt-nav-links {
  display: flex;
  align-items: center;
  gap: .125rem;
  margin-left: 1rem;
  flex: 1;
}

.nt-nav-links a {
  display: flex;
  align-items: center;
  gap: .35rem;
  padding: .4rem .7rem;
  border-radius: .5rem;
  font-size: .875rem;
  font-weight: 500;
  color: var(--nt-text-muted);
  text-decoration: none;
  transition: background .15s, color .15s;
  white-space: nowrap;
}

.nt-nav-links a:hover {
  background: var(--nt-green-dim);
  color: var(--nt-green-dark);
}

[data-theme="dark"] .nt-nav-links a:hover {
  color: var(--nt-green-light);
}

.nt-nav-links a.active {
  background: var(--nt-green-dim);
  color: var(--nt-green);
  font-weight: 600;
}

.nt-nav-links a svg { width: 1rem; height: 1rem; flex-shrink: 0; }

.nt-nav-end {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-left: auto;
  flex-shrink: 0;
}

/* Profile dropdown */
.nt-profile { position: relative; }

.nt-profile-btn {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .35rem .6rem;
  border-radius: .5rem;
  background: transparent;
  border: 1px solid var(--nt-border);
  cursor: pointer;
  font-size: .875rem;
  font-weight: 500;
  color: var(--nt-text);
  transition: background .15s;
}

.nt-profile-btn:hover { background: var(--nt-green-dim); }
.nt-profile-btn svg { width: 1rem; height: 1rem; }
.nt-profile-btn .chevron { transition: transform .2s; }
.nt-profile-btn .chevron.open { transform: rotate(180deg); }

.nt-profile-menu {
  position: absolute;
  right: 0;
  top: calc(100% + .5rem);
  background: var(--nt-surface);
  border: 1px solid var(--nt-border);
  border-radius: var(--nt-radius);
  box-shadow: var(--nt-shadow-md);
  min-width: 11rem;
  overflow: hidden;
  z-index: 200;
}

.nt-profile-menu a {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .6rem 1rem;
  font-size: .875rem;
  color: var(--nt-text);
  text-decoration: none;
  transition: background .1s;
}

.nt-profile-menu a:hover { background: var(--nt-green-dim); color: var(--nt-green); }
.nt-profile-menu svg { width: .9rem; height: .9rem; }

.nt-profile-divider { height: 1px; background: var(--nt-border); margin: .25rem 0; }

/* Hamburger mobile */
.nt-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: .5rem;
  background: none;
  border: none;
  color: var(--nt-text);
}
.nt-hamburger span { display: block; width: 22px; height: 2px; background: currentColor; border-radius: 2px; transition: all .25s; }
.nt-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nt-hamburger.open span:nth-child(2) { opacity: 0; }
.nt-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Cards ── */
.nt-card {
  background: var(--nt-surface);
  border: 1px solid var(--nt-border);
  border-radius: var(--nt-radius);
  box-shadow: var(--nt-shadow);
  padding: 1.25rem;
}

.nt-card-header {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: 1rem;
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--nt-border);
}

.nt-card-header h2, .nt-card-header h3 { margin: 0; }

/* ── Grid helpers ── */
.nt-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
.nt-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.nt-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }

/* ── Stat cards (dashboard) ── */
.nt-stat {
  background: var(--nt-surface);
  border: 1px solid var(--nt-border);
  border-radius: var(--nt-radius);
  padding: 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.nt-stat-icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: .6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.nt-stat-icon svg { width: 1.4rem; height: 1.4rem; }
.nt-stat-icon.green  { background: var(--nt-green-dim);  color: var(--nt-green); }
.nt-stat-icon.amber  { background: var(--nt-amber-dim);  color: var(--nt-amber); }
.nt-stat-icon.blue   { background: var(--nt-blue-dim);   color: var(--nt-blue); }
.nt-stat-icon.purple { background: var(--nt-purple-dim); color: var(--nt-purple); }
.nt-stat-icon.red    { background: var(--nt-red-dim);    color: var(--nt-red); }

.nt-stat-body { flex: 1; min-width: 0; }
.nt-stat-label { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--nt-text-muted); margin-bottom: .25rem; }
.nt-stat-value { font-size: 1.75rem; font-weight: 800; line-height: 1; color: var(--nt-text); }
.nt-stat-sub   { font-size: .8rem; color: var(--nt-text-muted); margin-top: .2rem; }

/* ── Macro bar ── */
.nt-macro-bars { display: flex; flex-direction: column; gap: .6rem; }
.nt-macro-row { display: flex; align-items: center; gap: .75rem; }
.nt-macro-label { font-size: .8rem; font-weight: 600; width: 7rem; flex-shrink: 0; color: var(--nt-text-muted); }
.nt-macro-val { font-size: .8rem; font-weight: 700; width: 4rem; text-align: right; flex-shrink: 0; }
.nt-bar-track { flex: 1; height: .5rem; border-radius: 99px; background: var(--nt-border); overflow: hidden; }
.nt-bar-fill { height: 100%; border-radius: 99px; transition: width .4s ease; }
.nt-bar-fill.green  { background: var(--nt-green); }
.nt-bar-fill.amber  { background: var(--nt-amber); }
.nt-bar-fill.blue   { background: var(--nt-blue); }
.nt-bar-fill.red    { background: var(--nt-red); }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .5rem 1rem;
  border-radius: .5rem;
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background .15s, opacity .15s, box-shadow .15s;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.4;
}
.btn svg { width: .95rem; height: .95rem; flex-shrink: 0; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn-primary   { background: var(--nt-green); color: #fff; }
.btn-primary:hover { background: #15803d; text-decoration: none; }
.btn-secondary { background: var(--nt-surface); color: var(--nt-text); border: 1px solid var(--nt-border); }
.btn-secondary:hover { background: var(--nt-bg); text-decoration: none; }
.btn-danger    { background: var(--nt-red); color: #fff; }
.btn-danger:hover { background: #b91c1c; text-decoration: none; }
.btn-ghost     { background: transparent; color: var(--nt-text-muted); border: 1px solid transparent; }
.btn-ghost:hover { background: var(--nt-green-dim); color: var(--nt-green); text-decoration: none; }
.btn-sm { padding: .3rem .65rem; font-size: .8rem; }
.btn-lg { padding: .7rem 1.4rem; font-size: 1rem; }

/* ── Forms ── */
.nt-form-group { display: flex; flex-direction: column; gap: .3rem; margin-bottom: 1rem; }
.nt-label { font-size: .875rem; font-weight: 600; color: var(--nt-text); }
.nt-label .req { color: var(--nt-red); margin-left: .15rem; }
.nt-hint { font-size: .75rem; color: var(--nt-text-muted); }

.nt-input, .nt-select, .nt-textarea {
  width: 100%;
  padding: .55rem .75rem;
  border: 1.5px solid var(--nt-border);
  border-radius: .5rem;
  background: var(--nt-surface);
  color: var(--nt-text);
  font-size: .9rem;
  font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
  appearance: none;
}

.nt-input:focus, .nt-select:focus, .nt-textarea:focus {
  outline: none;
  border-color: var(--nt-green);
  box-shadow: 0 0 0 3px rgba(22,163,74,.15);
}

.nt-input.error { border-color: var(--nt-red); }
.nt-textarea { resize: vertical; min-height: 5rem; }

.nt-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .75rem center;
  padding-right: 2.25rem;
}

.nt-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.nt-form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }

/* ── Tables ── */
.nt-table-wrap { overflow-x: auto; border-radius: var(--nt-radius); border: 1px solid var(--nt-border); }

.nt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
}

.nt-table th {
  background: var(--nt-bg);
  padding: .65rem 1rem;
  text-align: left;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--nt-text-muted);
  border-bottom: 1px solid var(--nt-border);
  white-space: nowrap;
}

.nt-table td {
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--nt-border);
  vertical-align: middle;
}

.nt-table tr:last-child td { border-bottom: none; }
.nt-table tr:hover td { background: var(--nt-bg); }

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .2rem .55rem;
  border-radius: 99px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.badge-green  { background: var(--nt-green-dim);  color: var(--nt-green); }
.badge-amber  { background: var(--nt-amber-dim);  color: var(--nt-amber); }
.badge-red    { background: var(--nt-red-dim);    color: var(--nt-red); }
.badge-blue   { background: var(--nt-blue-dim);   color: var(--nt-blue); }
.badge-purple { background: var(--nt-purple-dim); color: var(--nt-purple); }
.badge-gray   { background: var(--nt-border);     color: var(--nt-text-muted); }

/* ── Alerts ── */
.nt-alert {
  padding: .75rem 1rem;
  border-radius: .5rem;
  font-size: .875rem;
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  margin-bottom: 1rem;
}
.nt-alert svg { flex-shrink: 0; width: 1rem; height: 1rem; margin-top: .1rem; }
.nt-alert-error   { background: var(--nt-red-dim);    color: var(--nt-red); border: 1px solid rgba(220,38,38,.2); }
.nt-alert-success { background: var(--nt-green-dim);  color: var(--nt-green); border: 1px solid rgba(22,163,74,.2); }
.nt-alert-info    { background: var(--nt-blue-dim);   color: var(--nt-blue); border: 1px solid rgba(37,99,235,.2); }

/* ── Dagboek maaltijd blokken ── */
.nt-maaltijd-blok {
  background: var(--nt-surface);
  border: 1px solid var(--nt-border);
  border-radius: var(--nt-radius);
  overflow: hidden;
  margin-bottom: .75rem;
}

.nt-maaltijd-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .7rem 1rem;
  background: var(--nt-bg);
  border-bottom: 1px solid var(--nt-border);
}

.nt-maaltijd-title {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-weight: 700;
  font-size: .9rem;
  text-transform: capitalize;
}

.nt-maaltijd-kcal { font-size: .8rem; color: var(--nt-text-muted); }

.nt-dagboek-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .6rem 1rem;
  border-bottom: 1px solid var(--nt-border);
}

.nt-dagboek-item:last-child { border-bottom: none; }
.nt-dagboek-item-naam { flex: 1; font-size: .875rem; font-weight: 500; }
.nt-dagboek-item-gram { font-size: .8rem; color: var(--nt-text-muted); white-space: nowrap; }
.nt-dagboek-item-kcal { font-size: .8rem; font-weight: 700; color: var(--nt-green); white-space: nowrap; min-width: 4rem; text-align: right; }

/* ── Ingrediënten rij (recepten) ── */
.ing-rij {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: .5rem;
  align-items: center;
  margin-bottom: .5rem;
}

/* ── Paginering ── */
.nt-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  margin-top: 1.5rem;
}

.nt-page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: .4rem;
  font-size: .875rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--nt-text);
  border: 1px solid var(--nt-border);
  background: var(--nt-surface);
  transition: background .15s;
}

.nt-page-btn:hover { background: var(--nt-green-dim); color: var(--nt-green); text-decoration: none; }
.nt-page-btn.active { background: var(--nt-green); color: #fff; border-color: var(--nt-green); }
.nt-page-btn:disabled, .nt-page-btn.disabled { opacity: .4; pointer-events: none; }

/* ── Toast notifications ── */
.nt-toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.nt-toast {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem 1rem;
  border-radius: .6rem;
  font-size: .875rem;
  font-weight: 500;
  box-shadow: var(--nt-shadow-md);
  animation: toastIn .25s ease;
  max-width: 20rem;
}

@keyframes toastIn { from { opacity: 0; transform: translateY(.5rem); } }

.nt-toast-success { background: #16a34a; color: #fff; }
.nt-toast-error   { background: #dc2626; color: #fff; }
.nt-toast-info    { background: #2563eb; color: #fff; }
.nt-toast-close   { margin-left: auto; cursor: pointer; opacity: .7; background: none; border: none; color: inherit; font-size: 1.1rem; line-height: 1; }

/* ── Search bar ── */
.nt-search {
  display: flex;
  gap: .5rem;
  margin-bottom: 1.25rem;
}

.nt-search-input {
  flex: 1;
  padding: .55rem .75rem;
  border: 1.5px solid var(--nt-border);
  border-radius: .5rem;
  background: var(--nt-surface);
  color: var(--nt-text);
  font-size: .9rem;
  font-family: inherit;
}

.nt-search-input:focus {
  outline: none;
  border-color: var(--nt-green);
  box-shadow: 0 0 0 3px rgba(22,163,74,.15);
}

/* ── Week overzicht ── */
.nt-week-dag {
  background: var(--nt-surface);
  border: 1px solid var(--nt-border);
  border-radius: var(--nt-radius);
  padding: .75rem 1rem;
  text-align: center;
}

.nt-week-dag.vandaag { border-color: var(--nt-green); border-width: 2px; }
.nt-week-dag-naam { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--nt-text-muted); }
.nt-week-dag-datum { font-size: .9rem; font-weight: 700; margin: .2rem 0; }
.nt-week-dag-kcal { font-size: 1.3rem; font-weight: 800; color: var(--nt-green); }
.nt-week-dag-sub  { font-size: .72rem; color: var(--nt-text-muted); }

/* ── Voedingswaarden tabel (detail) ── */
.nt-vw-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .4rem .75rem;
}

.nt-vw-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .35rem 0;
  border-bottom: 1px solid var(--nt-border);
  font-size: .875rem;
}

.nt-vw-row:last-child { border-bottom: none; }
.nt-vw-key { color: var(--nt-text-muted); }
.nt-vw-val { font-weight: 700; }

/* ── Login pagina ── */
.nt-login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 50%, #bbf7d0 100%);
  padding: 1rem;
}

[data-theme="dark"] .nt-login-wrap {
  background: linear-gradient(135deg, #0f172a 0%, #0f2b1a 50%, #052e16 100%);
}

.nt-login-card {
  background: var(--nt-surface);
  border: 1px solid var(--nt-border);
  border-radius: 1rem;
  box-shadow: var(--nt-shadow-md);
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 400px;
}

.nt-login-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  margin-bottom: 1.75rem;
}

.nt-login-logo-icon {
  width: 3rem;
  height: 3rem;
  background: var(--nt-green);
  border-radius: .75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.nt-login-logo-icon svg { width: 1.75rem; height: 1.75rem; }
.nt-login-title { font-size: 1.5rem; font-weight: 800; color: var(--nt-text); }
.nt-login-sub   { text-align: center; color: var(--nt-text-muted); font-size: .875rem; margin-bottom: 1.5rem; }

/* ── Page headers ── */
.nt-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.nt-page-header h1 { margin: 0; }
.nt-page-actions { display: flex; gap: .5rem; flex-wrap: wrap; }

/* ── Autocomplete ── */
.nt-autocomplete { position: relative; }
.nt-ac-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--nt-surface);
  border: 1px solid var(--nt-border);
  border-radius: .5rem;
  box-shadow: var(--nt-shadow-md);
  z-index: 50;
  max-height: 15rem;
  overflow-y: auto;
}

.nt-ac-item {
  padding: .55rem .75rem;
  cursor: pointer;
  font-size: .875rem;
  border-bottom: 1px solid var(--nt-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nt-ac-item:last-child { border-bottom: none; }
.nt-ac-item:hover { background: var(--nt-green-dim); color: var(--nt-green); }
.nt-ac-item-sub { font-size: .75rem; color: var(--nt-text-muted); }

/* ── OFF zoekresultaten ── */
.nt-off-result {
  background: var(--nt-surface);
  border: 1px solid var(--nt-border);
  border-radius: var(--nt-radius);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.nt-off-result-naam { font-weight: 700; }
.nt-off-result-merk { font-size: .8rem; color: var(--nt-text-muted); }
.nt-off-results-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: .75rem; }

/* ── Dividers & spacing ── */
.mt-1  { margin-top: .25rem; }
.mt-2  { margin-top: .5rem; }
.mt-3  { margin-top: .75rem; }
.mt-4  { margin-top: 1rem; }
.mt-6  { margin-top: 1.5rem; }
.mb-1  { margin-bottom: .25rem; }
.mb-2  { margin-bottom: .5rem; }
.mb-4  { margin-bottom: 1rem; }
.mb-6  { margin-bottom: 1.5rem; }
.flex  { display: flex; }
.flex-1 { flex: 1; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: .5rem; }
.gap-3 { gap: .75rem; }
.gap-4 { gap: 1rem; }
.text-muted { color: var(--nt-text-muted); }
.text-sm    { font-size: .875rem; }
.text-xs    { font-size: .75rem; }
.font-bold  { font-weight: 700; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.w-full { width: 100%; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .nt-nav-links { display: none; position: fixed; top: 3.5rem; left: 0; right: 0; bottom: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--nt-surface); padding: 1rem; overflow-y: auto; z-index: 90; border-top: 1px solid var(--nt-border); }
  .nt-nav-links.open { display: flex; }
  .nt-nav-links a { padding: .75rem 1rem; border-radius: .5rem; font-size: 1rem; }
  .nt-hamburger { display: flex; }

  .nt-grid-2, .nt-grid-3, .nt-grid-4 { grid-template-columns: 1fr; }
  .nt-form-row, .nt-form-row-3 { grid-template-columns: 1fr; }

  .nt-page-header { flex-direction: column; }
  .nt-page-actions { width: 100%; }

  main { padding: 1rem 0; }
  .nt-card { padding: 1rem; }
}

@media (max-width: 480px) {
  .nt-stat { flex-direction: column; gap: .5rem; }
  .nt-macro-label { width: 5rem; }
}
