/* =============================================
   LABELBEHEER — CSS
   ============================================= */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

:root {
  --bg:           #F9F8F5;
  --bg-card:      #FFFFFF;
  --text:         #1C160C;
  --text-muted:   #6B6057;
  --text-light:   #9C9389;
  --accent:       #916F31;
  --accent-hover: #7A5C27;
  --accent-bg:    #F4EFE6;
  --border:       #E5E0D7;
  --border-dark:  #C8BFB0;

  --success:      #16A34A;
  --success-bg:   #DCFCE7;
  --warning:      #D97706;
  --warning-bg:   #FEF3C7;
  --danger:       #DC2626;
  --danger-bg:    #FEE2E2;
  --info:         #0284C7;
  --info-bg:      #E0F2FE;

  --sidebar-bg:        #1C160C;
  --sidebar-text:      #C4BBB0;
  --sidebar-hover:     rgba(255,255,255,0.07);
  --sidebar-active-bg: rgba(145,111,49,0.18);
  --sidebar-active:    #D4A853;

  --sp-1: 0.25rem; --sp-2: 0.5rem;  --sp-3: 0.75rem; --sp-4: 1rem;
  --sp-5: 1.25rem; --sp-6: 1.5rem;  --sp-8: 2rem;    --sp-10: 2.5rem;
  --sp-12: 3rem;

  --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --text-xs: 0.75rem; --text-sm: 0.875rem; --text-base: 1rem;
  --text-lg: 1.125rem; --text-xl: 1.25rem; --text-2xl: 1.5rem; --text-3xl: 1.875rem;

  --radius-sm: 4px; --radius: 8px; --radius-lg: 12px; --radius-xl: 16px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow:    0 2px 8px rgba(0,0,0,0.10);
  --shadow-lg: 0 4px 20px rgba(0,0,0,0.13);

  --sidebar-w:    240px;
  --topbar-h:     56px;
  --transition:   150ms ease;
}

html, body {
  height: 100%;
  font-family: var(--font);
  font-size: var(--text-base);
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* =============================================
   AUTH SCREEN
   ============================================= */

#auth-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--sidebar-bg);
  padding: var(--sp-4);
}

.auth-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: var(--sp-8);
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-lg);
}

.auth-logo {
  text-align: center;
  margin-bottom: var(--sp-6);
}

.auth-logo-icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: var(--sp-2);
}

.auth-logo h1 {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--text);
}

.auth-logo p {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-top: var(--sp-1);
}

.auth-tabs {
  display: flex;
  gap: var(--sp-1);
  background: var(--bg);
  border-radius: var(--radius);
  padding: var(--sp-1);
  margin-bottom: var(--sp-6);
}

.auth-tab {
  flex: 1;
  padding: var(--sp-2) var(--sp-3);
  border: none;
  background: transparent;
  border-radius: calc(var(--radius) - 2px);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font);
}

.auth-tab.active {
  background: var(--bg-card);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.auth-form { display: flex; flex-direction: column; gap: var(--sp-4); }

.form-error {
  font-size: var(--text-sm);
  color: var(--danger);
  padding: var(--sp-2) var(--sp-3);
  background: var(--danger-bg);
  border-radius: var(--radius-sm);
}

.form-success {
  font-size: var(--text-sm);
  color: var(--success);
  padding: var(--sp-2) var(--sp-3);
  background: var(--success-bg);
  border-radius: var(--radius-sm);
}

/* =============================================
   APP LAYOUT
   ============================================= */

/* SIDEBAR — visuele styling komt nu van de gedeelde .lk-sidebar/.lk-sidebar__link
   (styles/admin.css). .nav-link blijft enkel als JS-selector-hook bestaan
   (ui.js:129,135 targeten ".nav-link[data-view]"/".nav-link.active") — geen
   eigen decoratieve regels meer hier, om niet te vechten met .lk-sidebar__link. */
.lk-sidebar__link.active {
  background: var(--lk-accent-soft);
  color: var(--lk-accent-deep);
}

.nav-badge {
  margin-left: auto;
  background: var(--accent);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}

/* BREADCRUMB — geen aparte topbar meer (die dupliceerde de gedeelde header),
   enkel nog een smalle navigatiestrook bovenaan de inhoud zelf. */
#breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--text-sm);
  color: var(--text-muted);
  overflow: hidden;
  margin-bottom: var(--sp-4);
}
#breadcrumb:empty { display: none; margin: 0; }

#breadcrumb .crumb { white-space: nowrap; }
#breadcrumb .crumb.current { color: var(--text); font-weight: 600; }
#breadcrumb .crumb-sep { color: var(--border-dark); }

/* MAIN CONTENT */
#main-content {
  flex: 1;
  overflow-y: auto;
  padding: var(--sp-6);
}

.view { display: none; animation: fadeIn 0.15s ease; }
.view.active { display: block; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

/* =============================================
   VIEW HEADERS
   ============================================= */

.view-header {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-4);
  margin-bottom: var(--sp-6);
}

.view-header-info { flex: 1; }

.view-header h2 {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.view-header p {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-top: var(--sp-1);
}

.view-header-actions {
  display: flex;
  gap: var(--sp-2);
  flex-shrink: 0;
  align-items: flex-start;
  padding-top: 2px;
}

.back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  background: transparent;
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  transition: all var(--transition);
  flex-shrink: 0;
  margin-top: 2px;
}

.back-btn:hover { background: var(--bg); color: var(--text); }

/* =============================================
   BUTTONS
   ============================================= */

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--radius);
  font-size: var(--text-sm);
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.4;
}

.btn-primary {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border-dark);
}
.btn-outline:hover { background: var(--bg); border-color: var(--text-muted); }

.btn-danger {
  background: transparent;
  color: var(--danger);
  border-color: var(--danger);
}
.btn-danger:hover { background: var(--danger-bg); }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: transparent;
}
.btn-ghost:hover { background: var(--bg); color: var(--text); }

.btn-sm { padding: var(--sp-1) var(--sp-3); font-size: var(--text-xs); }
.btn-full { width: 100%; justify-content: center; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* =============================================
   FORMS
   ============================================= */

.form-group { display: flex; flex-direction: column; gap: var(--sp-1); }

.form-group label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: var(--sp-2) var(--sp-3);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius);
  font-size: var(--text-sm);
  font-family: var(--font);
  color: var(--text);
  background: var(--bg-card);
  transition: border-color var(--transition);
  width: 100%;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(145,111,49,0.12);
}

.form-group input[readonly],
.form-group input:disabled {
  background: var(--bg);
  color: var(--text-muted);
  cursor: default;
}

.form-group textarea { resize: vertical; min-height: 80px; }

.form-hint {
  font-size: var(--text-xs);
  color: var(--text-light);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-6);
}

.form-section { display: flex; flex-direction: column; gap: var(--sp-4); }

.form-actions {
  display: flex;
  gap: var(--sp-3);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--border);
  margin-top: var(--sp-2);
  flex-wrap: wrap;
}

.form-actions-right { margin-left: auto; display: flex; gap: var(--sp-3); }

/* Photo upload */
.photo-upload-area {
  border: 2px dashed var(--border-dark);
  border-radius: var(--radius-lg);
  padding: var(--sp-6);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--bg);
  position: relative;
}

.photo-upload-area:hover { border-color: var(--accent); background: var(--accent-bg); }
.photo-upload-area input[type=file] { display: none; }
.photo-upload-area i { font-size: 2rem; color: var(--text-light); display: block; margin-bottom: var(--sp-2); }
.photo-upload-area p { font-size: var(--text-sm); color: var(--text-muted); }

.photo-preview {
  width: 100%;
  max-height: 200px;
  object-fit: contain;
  border-radius: var(--radius);
  margin-top: var(--sp-3);
  display: none;
}

.photo-preview.visible { display: block; }

.photo-remove-btn {
  position: absolute;
  top: var(--sp-2);
  right: var(--sp-2);
  background: var(--danger);
  color: white;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  cursor: pointer;
  font-size: 0.75rem;
  display: none;
  align-items: center;
  justify-content: center;
}

.photo-preview.visible ~ .photo-remove-btn { display: flex; }

/* =============================================
   CARDS
   ============================================= */

.cards-grid {
  display: grid;
  gap: var(--sp-4);
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-5);
  transition: all var(--transition);
  cursor: pointer;
}

.card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-2); margin-bottom: var(--sp-3); }
.card-icon { font-size: 1.5rem; }
.card-title { font-size: var(--text-base); font-weight: 700; color: var(--text); }
.card-sub { font-size: var(--text-xs); color: var(--text-muted); margin-top: var(--sp-1); }
.card-meta { font-size: var(--text-sm); color: var(--text-muted); }

/* Stat cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: var(--sp-4);
  margin-bottom: var(--sp-6);
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-4) var(--sp-5);
}

.stat-card-label { font-size: var(--text-xs); color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.stat-card-value { font-size: var(--text-3xl); font-weight: 700; color: var(--text); margin-top: var(--sp-1); line-height: 1; }
.stat-card-sub { font-size: var(--text-xs); color: var(--text-light); margin-top: var(--sp-1); }

/* Room cards */
.room-card {
  border-left: 4px solid var(--accent);
}

.room-card-code {
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--accent);
  font-family: monospace;
  letter-spacing: 0.05em;
}

/* =============================================
   LISTS (kasten + bakken)
   ============================================= */

.list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-3);
}

.list-header h3 {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--text);
}

.list-count {
  font-size: var(--text-sm);
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1px var(--sp-3);
}

.item-list { display: flex; flex-direction: column; gap: var(--sp-2); }

.list-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  color: inherit;
}

.list-item:hover {
  border-color: var(--accent);
  background: var(--accent-bg);
}

.list-item-color {
  width: 4px;
  height: 36px;
  border-radius: 2px;
  flex-shrink: 0;
}

.list-item-info { flex: 1; min-width: 0; }

.list-item-code {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text);
  font-family: monospace;
  letter-spacing: 0.03em;
}

.list-item-content {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text);
}

.list-item-sub {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.list-item-right {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-shrink: 0;
}

.list-item-thumb {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.list-item-arrow { color: var(--text-light); font-size: 0.875rem; }

/* Category badge */
.stock-badge {
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 2px var(--sp-2);
  border-radius: 20px;
  white-space: nowrap;
}

/* Category badge */
.cat-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 2px var(--sp-2);
  border-radius: 20px;
  color: white;
}

.cat-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* =============================================
   INLINE EDIT
   ============================================= */

.inline-edit-wrapper { position: relative; display: flex; align-items: center; gap: var(--sp-2); }
.inline-edit-text { cursor: pointer; }
.inline-edit-text:hover { text-decoration: underline; text-decoration-style: dotted; }
.inline-edit-input { flex: 1; }
.inline-edit-input.hidden { display: none; }

/* =============================================
   SECTION CARDS (within view)
   ============================================= */

.section-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-5);
  margin-bottom: var(--sp-4);
}

.section-card h3 {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--sp-4);
}

/* =============================================
   SEARCH
   ============================================= */

.search-bar-large {
  position: relative;
  margin-bottom: var(--sp-4);
}

.search-bar-large input {
  width: 100%;
  padding: var(--sp-3) var(--sp-4) var(--sp-3) 2.75rem;
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-lg);
  font-size: var(--text-base);
  font-family: var(--font);
  background: var(--bg-card);
  color: var(--text);
  transition: border-color var(--transition);
}

.search-bar-large input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(145,111,49,0.12);
}

.search-bar-large i {
  position: absolute;
  left: var(--sp-4);
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1rem;
  pointer-events: none;
}

.search-filters {
  display: flex;
  gap: var(--sp-3);
  flex-wrap: wrap;
  margin-bottom: var(--sp-5);
}

.search-filters select {
  padding: var(--sp-1) var(--sp-3);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius);
  font-size: var(--text-sm);
  font-family: var(--font);
  background: var(--bg-card);
  color: var(--text);
  cursor: pointer;
}

.filter-toggle {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-1) var(--sp-3);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius);
  font-size: var(--text-sm);
  font-family: var(--font);
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
}

.filter-toggle.active {
  background: var(--warning-bg);
  color: var(--warning);
  border-color: var(--warning);
}

.search-results-header {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: var(--sp-3);
}

/* =============================================
   LABELS VIEW
   ============================================= */

.labels-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: var(--sp-6);
  align-items: start;
}

.labels-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.labels-panel-section {
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--border);
}

.labels-panel-section:last-child { border-bottom: none; }

.labels-panel-section h4 {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--sp-3);
}

/* Label type selector */
.label-type-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-2);
}

.label-type-btn {
  padding: var(--sp-2) var(--sp-3);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  cursor: pointer;
  font-size: var(--text-xs);
  font-family: var(--font);
  font-weight: 600;
  color: var(--text-muted);
  text-align: left;
  transition: all var(--transition);
}

.label-type-btn.active {
  border-color: var(--accent);
  background: var(--accent-bg);
  color: var(--accent);
}

.label-type-btn .ltype-format {
  display: block;
  font-weight: 400;
  color: var(--text-light);
  font-size: 0.65rem;
  margin-top: 1px;
}

/* Avery format selector */
.avery-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-2);
}

.avery-btn {
  padding: var(--sp-2) var(--sp-3);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  cursor: pointer;
  font-size: var(--text-xs);
  font-family: var(--font);
  font-weight: 700;
  color: var(--text-muted);
  transition: all var(--transition);
}

.avery-btn.active {
  border-color: var(--accent);
  background: var(--accent-bg);
  color: var(--accent);
}

.avery-btn .avery-sub {
  display: block;
  font-weight: 400;
  font-size: 0.65rem;
  color: var(--text-light);
  margin-top: 1px;
}

/* Start position */
.startpos-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); }
.startpos-grid label { font-size: var(--text-xs); font-weight: 600; color: var(--text-muted); }

/* Selection list */
.selection-list { max-height: 240px; overflow-y: auto; display: flex; flex-direction: column; gap: var(--sp-1); }

.selection-item {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-2);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
}

.selection-item input[type=checkbox] { cursor: pointer; accent-color: var(--accent); }
.selection-item .sel-code { font-family: monospace; font-weight: 700; color: var(--accent); flex-shrink: 0; }
.selection-item .sel-content { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.selection-item .sel-color { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

/* Selection controls */
.sel-controls { display: flex; gap: var(--sp-2); flex-wrap: wrap; margin-bottom: var(--sp-3); }

/* Labels preview */
.preview-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.preview-header {
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.preview-header h3 { font-size: var(--text-sm); font-weight: 700; }

.preview-container {
  padding: var(--sp-4);
  background: #888;
  overflow: auto;
  min-height: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-4);
}

.preview-sheet-wrapper { box-shadow: 0 4px 16px rgba(0,0,0,0.3); background: white; }

/* =============================================
   DASHBOARD SPECIFIC
   ============================================= */

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-5);
  margin-top: var(--sp-6);
}

.dash-list { list-style: none; display: flex; flex-direction: column; gap: var(--sp-2); }

.dash-list-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--transition);
  font-size: var(--text-sm);
}

.dash-list-item:hover { background: var(--bg); }
.dash-list-item .dash-code { font-family: monospace; font-weight: 700; color: var(--accent); min-width: 100px; }
.dash-list-item .dash-content { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-list-item .dash-time { color: var(--text-light); font-size: var(--text-xs); flex-shrink: 0; }

.cat-stats { display: flex; flex-direction: column; gap: var(--sp-2); }

.cat-stat-row {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-size: var(--text-sm);
}

.cat-stat-bar-wrap { flex: 1; height: 6px; background: var(--bg); border-radius: 3px; overflow: hidden; }
.cat-stat-bar { height: 100%; border-radius: 3px; transition: width 0.4s ease; }
.cat-stat-count { font-weight: 700; min-width: 24px; text-align: right; color: var(--text-muted); font-size: var(--text-xs); }

/* =============================================
   SETTINGS
   ============================================= */

.settings-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-5);
  margin-bottom: var(--sp-5);
}

.settings-section h3 {
  font-size: var(--text-base);
  font-weight: 700;
  margin-bottom: var(--sp-4);
  padding-bottom: var(--sp-3);
  border-bottom: 1px solid var(--border);
}

.cat-manage-list { display: flex; flex-direction: column; gap: var(--sp-2); margin-bottom: var(--sp-4); }

.cat-manage-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
}

.cat-color-swatch {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 2px solid rgba(0,0,0,0.1);
}

.cat-manage-name { flex: 1; font-size: var(--text-sm); font-weight: 600; }

.cat-manage-actions { display: flex; gap: var(--sp-1); }

.room-edit-list { display: flex; flex-direction: column; gap: var(--sp-3); }

.room-edit-item { display: grid; grid-template-columns: 80px 1fr; gap: var(--sp-3); align-items: center; }
.room-edit-code { font-family: monospace; font-weight: 700; color: var(--accent); font-size: var(--text-base); }

/* =============================================
   MODAL
   ============================================= */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: var(--sp-4);
  backdrop-filter: blur(2px);
}

.modal-box {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: var(--sp-6);
  max-width: 480px;
  width: 100%;
  box-shadow: var(--shadow-lg);
}

.modal-title {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--sp-4);
}

.modal-body { margin-bottom: var(--sp-5); }
.modal-body p { font-size: var(--text-sm); color: var(--text-muted); line-height: 1.6; }

.modal-actions { display: flex; gap: var(--sp-3); justify-content: flex-end; }

/* =============================================
   TOAST
   ============================================= */

#toast-container {
  position: fixed;
  bottom: var(--sp-6);
  right: var(--sp-6);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  z-index: 2000;
}

.toast {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: var(--text);
  color: #F4EFE6;
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.2s ease;
  max-width: 360px;
}

.toast.toast-success { background: var(--success); }
.toast.toast-error   { background: var(--danger);  }
.toast.toast-warning { background: var(--warning); }

.toast-out { animation: toastOut 0.2s ease forwards; }

@keyframes toastIn  { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toastOut { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(20px); } }

/* =============================================
   EMPTY STATE
   ============================================= */

.empty-state {
  text-align: center;
  padding: var(--sp-12) var(--sp-8);
  color: var(--text-muted);
}

.empty-state i { font-size: 3rem; display: block; margin-bottom: var(--sp-4); opacity: 0.4; }
.empty-state h3 { font-size: var(--text-lg); font-weight: 700; color: var(--text); margin-bottom: var(--sp-2); }
.empty-state p { font-size: var(--text-sm); max-width: 320px; margin: 0 auto var(--sp-4); }

/* =============================================
   LOADING
   ============================================= */

.loading-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-10);
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* =============================================
   MISC
   ============================================= */

.text-muted  { color: var(--text-muted); }
.text-danger { color: var(--danger); }
.text-sm     { font-size: var(--text-sm); }
.font-mono   { font-family: monospace; }
.mt-4        { margin-top: var(--sp-4); }
.mb-4        { margin-bottom: var(--sp-4); }

.divider { height: 1px; background: var(--border); margin: var(--sp-4) 0; }

.page-title {
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--text);
  margin-bottom: var(--sp-1);
}

.page-sub {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: var(--sp-6);
}

/* =============================================
   RESPONSIVE
   ============================================= */

@media (max-width: 900px) {
  .labels-layout { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .dashboard-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  /* Sidebar-inklap op mobiel gebeurt via de gedeelde .lk-admin-grid
     (styles/admin.css) — geen eigen hamburger/off-canvas-gedrag meer nodig. */
  #main-content { padding: var(--sp-4); }

  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .cards-grid { grid-template-columns: 1fr; }
}

/* =============================================
   PRINT STYLES
   ============================================= */

@media print {
  .lk-nav--admin,
  #auth-screen,
  #app-shell,
  #toast-container,
  #modal-overlay { display: none !important; }

  #print-area { display: block !important; }

  @page { size: A4; margin: 0mm; }

  * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }

  .print-sheet {
    width: 210mm;
    height: 297mm;
    position: relative;
    background: white;
    page-break-after: always;
    overflow: hidden;
  }

  .print-sheet:last-child { page-break-after: avoid; }

  .print-label {
    position: absolute;
    overflow: hidden;
    box-sizing: border-box;
  }

  .print-label * { box-sizing: border-box; }
}

#print-area { display: none; }
