/* ──────────────────────────────────────────────
   ZenceColor — Luxury Dark Salon Stylesheet
   ────────────────────────────────────────────── */

:root {
  --bg:          #0d0d0b;
  --surface:     #141410;
  --surface2:    #1c1b17;
  --surface3:    #252420;
  --border:      #2c2b26;
  --border-light:#383630;
  --gold:        #c9a84c;
  --gold-light:  #e0c478;
  --gold-dim:    #7a6428;
  --gold-glow:   rgba(201,168,76,.12);
  --cream:       #f0ead6;
  --cream2:      #c8c0ae;
  --muted:       #7a746a;
  --muted2:      #4a4640;
  --red:         #c94848;
  --red-dim:     #3a1414;
  --green:       #4ca870;
  --green-dim:   #0e2818;
  --blue:        #5898d4;
  --blue-dim:    #0e1e34;

  --sidebar-w:   240px;
  --topbar-h:    64px;
  --radius:      10px;
  --radius-sm:   6px;
  --radius-lg:   14px;

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;

  --shadow-sm:   0 1px 4px rgba(0,0,0,.4);
  --shadow:      0 4px 16px rgba(0,0,0,.5);
  --shadow-lg:   0 8px 40px rgba(0,0,0,.7);
}

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

html { font-size: 15px; -webkit-font-smoothing: antialiased; }

body {
  background: var(--bg);
  color: var(--cream);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ── SCROLLBAR ──────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--surface); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }

/* ── SIDEBAR ────────────────────────────────── */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform .3s cubic-bezier(.4,0,.2,1);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: .9rem;
  padding: 1.5rem 1.4rem 1.2rem;
  border-bottom: 1px solid var(--border);
}

.sidebar-brand {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--gold);
  letter-spacing: .03em;
  line-height: 1.2;
}

.sidebar-sub {
  font-size: .68rem;
  color: var(--muted);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.sidebar-nav {
  flex: 1;
  padding: 1rem .8rem;
  display: flex;
  flex-direction: column;
  gap: .2rem;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .65rem 1rem;
  border-radius: var(--radius-sm);
  color: var(--muted);
  text-decoration: none;
  font-size: .88rem;
  font-weight: 500;
  transition: background .15s, color .15s;
  cursor: pointer;
}

.nav-item:hover {
  background: var(--surface2);
  color: var(--cream2);
}

.nav-item.active {
  background: var(--gold-glow);
  color: var(--gold);
  border: 1px solid rgba(201,168,76,.2);
}

.nav-item svg { flex-shrink: 0; }

.sidebar-footer {
  padding: 1.2rem 1.4rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: .8rem;
}

.version-badge {
  font-size: .7rem;
  padding: .2rem .5rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--muted);
}

/* ── MAIN CONTENT ───────────────────────────── */
.main-content {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── TOP BAR ────────────────────────────────── */
.top-bar {
  position: sticky;
  top: 0;
  height: var(--topbar-h);
  background: rgba(13,13,11,.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  z-index: 50;
}

.top-bar-left { display: flex; align-items: center; gap: 1rem; }
.top-bar-right { display: flex; align-items: center; gap: 1rem; }

.page-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--cream);
  letter-spacing: .01em;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: .4rem;
}
.menu-toggle span {
  display: block; width: 20px; height: 2px;
  background: var(--cream2); border-radius: 1px;
  transition: .2s;
}

/* ── SEARCH ─────────────────────────────────── */
.search-wrap {
  display: flex;
  align-items: center;
  gap: .5rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: .4rem .9rem;
}

.search-wrap svg { color: var(--muted); flex-shrink: 0; }
.search-wrap input {
  background: none;
  border: none;
  outline: none;
  color: var(--cream);
  font-family: var(--font-body);
  font-size: .85rem;
  width: 180px;
}
.search-wrap input::placeholder { color: var(--muted); }

/* ── PAGES ──────────────────────────────────── */
.page {
  display: none;
  padding: 2rem;
  flex: 1;
  animation: fadeIn .25s ease;
}

.page.active { display: block; }

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

/* ── BUTTONS ────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .6rem 1.3rem;
  background: var(--gold);
  color: var(--bg);
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, transform .1s;
  letter-spacing: .02em;
}
.btn-primary:hover { background: var(--gold-light); }
.btn-primary:active { transform: scale(.98); }
.btn-primary.btn-sm { padding: .4rem .9rem; font-size: .8rem; }
.btn-primary.btn-full { width: 100%; justify-content: center; padding: .9rem; font-size: .95rem; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .6rem 1.1rem;
  background: transparent;
  color: var(--cream2);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: .88rem;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.btn-ghost:hover { background: var(--surface3); border-color: var(--muted2); }
.btn-ghost.btn-sm { padding: .4rem .8rem; font-size: .8rem; }

.btn-danger {
  background: var(--red-dim);
  color: var(--red);
  border-color: rgba(201,72,72,.3);
}
.btn-danger:hover { background: rgba(201,72,72,.2); }

.link-btn {
  color: var(--gold);
  text-decoration: none;
  font-size: .82rem;
  opacity: .8;
  transition: opacity .15s;
}
.link-btn:hover { opacity: 1; }

/* ── STAT CARDS ─────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
  position: relative;
  overflow: hidden;
  transition: border-color .2s;
}
.stat-card:hover { border-color: var(--border-light); }

.stat-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--gold), transparent);
}

.stat-card.loading {
  height: 100px;
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface2) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}

.stat-icon {
  width: 36px; height: 36px;
  background: var(--gold-glow);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: .8rem;
  color: var(--gold);
}

.stat-value {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--cream);
  line-height: 1;
  margin-bottom: .3rem;
}

.stat-label {
  font-size: .78rem;
  color: var(--muted);
  letter-spacing: .04em;
  text-transform: uppercase;
}

/* ── DASHBOARD GRID ─────────────────────────── */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 1.5rem;
}

.dash-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.panel-header h2 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--cream);
}

.recent-list { padding: .5rem 0; }

.recent-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .8rem 1.5rem;
  transition: background .15s;
  cursor: pointer;
}
.recent-item:hover { background: var(--surface2); }

.recent-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--gold);
  flex-shrink: 0;
}

.recent-info { flex: 1; min-width: 0; }
.recent-name { font-size: .88rem; font-weight: 500; color: var(--cream); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recent-meta { font-size: .75rem; color: var(--muted); }
.recent-date { font-size: .75rem; color: var(--muted2); white-space: nowrap; }

.top-colors-grid {
  padding: 1.2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .6rem;
}

.top-color-item {
  display: flex;
  align-items: center;
  gap: .9rem;
}

.color-swatch-sm {
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,.08);
  flex-shrink: 0;
}

.top-color-info { flex: 1; }
.top-color-name { font-size: .85rem; color: var(--cream2); }
.top-color-code { font-size: .75rem; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ── KLEURENSCHIJF ──────────────────────────── */
.disc-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
  align-items: start;
}

.disc-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.disc-toolbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  align-self: stretch;
}

.disc-label {
  font-size: .8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}

.select-sm {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: .85rem;
  padding: .4rem .8rem;
  cursor: pointer;
  outline: none;
}
.select-sm:focus { border-color: var(--gold); }

.canvas-container {
  position: relative;
  cursor: crosshair;
}

.disc-center-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  font-family: var(--font-display);
  font-size: .75rem;
  color: var(--muted);
  pointer-events: none;
  line-height: 1.4;
}

.disc-center-label small { font-family: var(--font-body); font-size: .65rem; display: block; }

.disc-legend {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  justify-content: center;
  max-width: 520px;
}

.legend-items { display: contents; }

.legend-chip {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .25rem .6rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: .75rem;
  color: var(--cream2);
  cursor: pointer;
  transition: border-color .15s;
}
.legend-chip:hover { border-color: var(--gold); }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; }

.disc-info-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  min-height: 320px;
  position: sticky;
  top: calc(var(--topbar-h) + 2rem);
}

.disc-info-placeholder {
  height: 100%;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  text-align: center;
  color: var(--muted2);
  font-size: .88rem;
}

.shade-detail-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.shade-swatch-lg {
  width: 60px; height: 60px;
  border-radius: var(--radius);
  border: 2px solid rgba(255,255,255,.1);
}

.shade-code-badge {
  display: inline-block;
  padding: .2rem .6rem;
  background: var(--gold-glow);
  border: 1px solid var(--gold-dim);
  border-radius: 100px;
  font-size: .75rem;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  margin-bottom: .3rem;
}

.shade-detail-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--cream);
}

.shade-detail-line {
  font-size: .78rem;
  color: var(--muted);
}

.shade-props {
  display: flex;
  flex-direction: column;
  gap: .7rem;
  margin-bottom: 1.2rem;
}

.prop-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .85rem;
}
.prop-label { color: var(--muted); }
.prop-value { color: var(--cream2); font-weight: 500; }

.grey-bar {
  width: 80px;
  height: 6px;
  background: var(--surface3);
  border-radius: 3px;
  overflow: hidden;
}
.grey-bar-fill { height: 100%; background: var(--gold); border-radius: 3px; transition: width .4s; }

/* ── CALCULATOR ─────────────────────────────── */
.calc-layout {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 1.5rem;
  align-items: start;
}

.calc-inputs { display: flex; flex-direction: column; gap: 1rem; }

.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.form-card-title {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: .88rem;
  font-weight: 600;
  color: var(--cream2);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 1.2rem;
  padding-bottom: .8rem;
  border-bottom: 1px solid var(--border);
}

.form-row { margin-bottom: .9rem; }
.form-row:last-child { margin-bottom: 0; }

.form-row > label {
  display: block;
  font-size: .78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: .4rem;
}

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }

.select-field {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: .88rem;
  padding: .55rem .8rem;
  outline: none;
  transition: border-color .15s;
}
.select-field:focus { border-color: var(--gold); }

/* Level picker */
.level-picker {
  display: flex;
  gap: .3rem;
  flex-wrap: wrap;
}

.level-btn {
  width: 34px; height: 34px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--cream2);
  font-size: .85rem;
  font-family: var(--font-body);
  cursor: pointer;
  transition: background .12s, border-color .12s, color .12s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.level-btn:hover { border-color: var(--gold-dim); color: var(--gold); }
.level-btn.active { background: var(--gold); color: var(--bg); border-color: var(--gold); font-weight: 600; }

/* Range */
.range-wrap {
  display: flex;
  align-items: center;
  gap: .8rem;
}

input[type="range"] {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 2px;
  background: var(--surface3);
  outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--gold);
  cursor: pointer;
  border: 2px solid var(--bg);
  box-shadow: 0 0 6px rgba(201,168,76,.4);
}

output {
  font-size: .85rem;
  color: var(--gold);
  font-weight: 600;
  min-width: 36px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Technique grid */
.technique-grid {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}

.tech-btn {
  padding: .4rem .9rem;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--cream2);
  font-family: var(--font-body);
  font-size: .8rem;
  cursor: pointer;
  transition: .15s;
}
.tech-btn:hover { border-color: var(--gold-dim); color: var(--gold-light); }
.tech-btn.active { background: var(--gold-glow); border-color: var(--gold); color: var(--gold); }

/* Shade selector */
.shade-selector {
  display: flex;
  align-items: center;
  gap: .7rem;
}

.shade-swatch-empty {
  flex: 1;
  height: 42px;
  border-radius: var(--radius-sm);
  border: 1.5px dashed var(--border-light);
  display: flex;
  align-items: center;
  padding: 0 .8rem;
  font-size: .82rem;
  color: var(--muted);
  transition: border-color .15s;
  cursor: pointer;
}

.shade-swatch-filled {
  flex: 1;
  height: 42px;
  border-radius: var(--radius-sm);
  border: 1.5px solid rgba(255,255,255,.1);
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: 0 .8rem;
  cursor: pointer;
  transition: border-color .15s;
}
.shade-swatch-filled:hover { border-color: var(--gold-dim); }

.shade-swatch-preview {
  width: 26px; height: 26px;
  border-radius: 4px;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,.1);
}

.swatch-text { font-size: .82rem; color: var(--cream2); }
.swatch-code { font-size: .72rem; color: var(--muted); }

.opt-badge {
  display: inline-block;
  padding: .1rem .4rem;
  background: var(--surface3);
  border-radius: 4px;
  font-size: .7rem;
  color: var(--muted);
  margin-left: .3rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* ── RESULT PANEL ───────────────────────────── */
.calc-result {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-height: 500px;
  position: sticky;
  top: calc(var(--topbar-h) + 2rem);
  overflow: hidden;
}

.result-placeholder {
  height: 100%;
  min-height: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  color: var(--muted2);
  text-align: center;
  padding: 2rem;
  font-size: .9rem;
}

.result-inner { padding: 1.5rem; }

.result-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--cream);
  margin-bottom: 1.2rem;
  padding-bottom: .8rem;
  border-bottom: 1px solid var(--border);
}

.formula-block {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem;
  margin-bottom: 1rem;
}

.formula-label {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  margin-bottom: .6rem;
}

.formula-items { display: flex; flex-direction: column; gap: .5rem; }

.formula-item {
  display: flex;
  align-items: center;
  gap: .8rem;
}

.fi-swatch {
  width: 32px; height: 32px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,.08);
  flex-shrink: 0;
}

.fi-info { flex: 1; }
.fi-name { font-size: .88rem; color: var(--cream); font-weight: 500; }
.fi-code { font-size: .75rem; color: var(--muted); }
.fi-amount { font-size: 1rem; color: var(--gold); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fi-unit { font-size: .72rem; color: var(--muted); }

.dev-block {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  margin-bottom: 1rem;
}

.dev-badge {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--gold);
  font-weight: 700;
  white-space: nowrap;
}

.dev-details { flex: 1; }
.dev-name { font-size: .88rem; color: var(--cream2); }
.dev-reason { font-size: .78rem; color: var(--muted); margin-top: .2rem; }

.meta-row {
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.meta-chip {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .4rem .8rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .82rem;
}

.meta-chip strong { color: var(--cream); }
.meta-chip span { color: var(--muted); }

.warning-block {
  background: rgba(201,72,72,.08);
  border: 1px solid rgba(201,72,72,.25);
  border-radius: var(--radius-sm);
  padding: .8rem 1rem;
  font-size: .82rem;
  color: var(--red);
  margin-bottom: 1rem;
  display: flex;
  gap: .5rem;
  align-items: flex-start;
}

.info-block {
  background: rgba(88,152,212,.08);
  border: 1px solid rgba(88,152,212,.2);
  border-radius: var(--radius-sm);
  padding: .8rem 1rem;
  font-size: .82rem;
  color: var(--blue);
  margin-bottom: 1rem;
}

.result-actions {
  display: flex;
  gap: .7rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  margin-top: 1rem;
}

/* ── CLIENTS PAGE ───────────────────────────── */
.page-toolbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.clients-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.client-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
  cursor: pointer;
  transition: border-color .15s, transform .15s;
  position: relative;
}
.client-card:hover { border-color: var(--gold-dim); transform: translateY(-2px); }

.client-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--gold-glow);
  border: 1px solid var(--gold-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--gold);
  margin-bottom: .9rem;
}

.client-name {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--cream);
  margin-bottom: .2rem;
}

.client-email { font-size: .8rem; color: var(--muted); margin-bottom: .7rem; }

.client-tags { display: flex; gap: .4rem; flex-wrap: wrap; }

.client-tag {
  padding: .2rem .55rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: .72rem;
  color: var(--cream2);
}

.client-meta {
  display: flex;
  justify-content: space-between;
  margin-top: .8rem;
  padding-top: .7rem;
  border-top: 1px solid var(--border);
  font-size: .75rem;
  color: var(--muted);
}

.client-actions {
  position: absolute;
  top: .8rem;
  right: .8rem;
  display: flex;
  gap: .3rem;
  opacity: 0;
  transition: opacity .15s;
}
.client-card:hover .client-actions { opacity: 1; }

.icon-btn {
  width: 28px; height: 28px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--muted);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: .15s;
  font-size: .8rem;
}
.icon-btn:hover { color: var(--cream); border-color: var(--border-light); }
.icon-btn.del:hover { background: var(--red-dim); border-color: rgba(201,72,72,.3); color: var(--red); }

/* ── RECIPES PAGE ───────────────────────────── */
.recipes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
}

.recipe-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
  cursor: pointer;
  transition: border-color .15s, transform .15s;
  position: relative;
}
.recipe-card:hover { border-color: var(--gold-dim); transform: translateY(-2px); }

.recipe-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: .8rem;
}

.recipe-badge {
  padding: .25rem .6rem;
  border-radius: 4px;
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  font-weight: 600;
}

.recipe-badge.volledig { background: rgba(76,168,112,.1); color: var(--green); border: 1px solid rgba(76,168,112,.2); }
.recipe-badge.roots    { background: rgba(201,168,76,.1); color: var(--gold); border: 1px solid rgba(201,168,76,.2); }
.recipe-badge.toning   { background: rgba(88,152,212,.1); color: var(--blue); border: 1px solid rgba(88,152,212,.2); }
.recipe-badge.highlights,.recipe-badge.balayage { background: var(--surface2); color: var(--cream2); border: 1px solid var(--border); }
.recipe-badge.correctie { background: rgba(201,72,72,.1); color: var(--red); border: 1px solid rgba(201,72,72,.2); }

.recipe-name {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--cream);
  margin-bottom: .2rem;
}

.recipe-client { font-size: .8rem; color: var(--muted); margin-bottom: .8rem; }

.swatches-row {
  display: flex;
  gap: .3rem;
  margin-bottom: .8rem;
  align-items: center;
}

.swatch-circle {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,.1);
}

.swatch-more {
  font-size: .72rem;
  color: var(--muted);
  margin-left: .2rem;
}

.recipe-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: .7rem;
  border-top: 1px solid var(--border);
  font-size: .75rem;
  color: var(--muted);
}

.recipe-stars { color: var(--gold); letter-spacing: .05em; }
.recipe-actions {
  position: absolute;
  top: .8rem;
  right: .8rem;
  display: flex;
  gap: .3rem;
  opacity: 0;
  transition: opacity .15s;
}
.recipe-card:hover .recipe-actions { opacity: 1; }

.filter-badge {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .35rem .8rem;
  background: var(--gold-glow);
  border: 1px solid var(--gold-dim);
  border-radius: 100px;
  font-size: .82rem;
  color: var(--gold);
}
.filter-badge button { background: none; border: none; cursor: pointer; color: var(--gold); font-size: .9rem; line-height: 1; }

/* ── MODALS ─────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(4px);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}
.modal-overlay.active { opacity: 1; pointer-events: all; }

.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -48%);
  width: min(520px, 96vw);
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  z-index: 210;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  display: flex;
  flex-direction: column;
  max-height: 90vh;
}

.modal-wide { width: min(720px, 96vw); }
.modal-disc  { width: min(560px, 96vw); }

.modal.active {
  opacity: 1;
  pointer-events: all;
  transform: translate(-50%, -50%);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.3rem 1.5rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.modal-header h2 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--cream);
}

.modal-close {
  width: 28px; height: 28px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--muted);
  cursor: pointer;
  font-size: .85rem;
  display: flex; align-items: center; justify-content: center;
  transition: .15s;
}
.modal-close:hover { color: var(--cream); border-color: var(--border-light); }

.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
}

.modal-footer {
  display: flex;
  gap: .7rem;
  justify-content: flex-end;
  padding: 1.2rem 1.5rem;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

/* Form inside modal */
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.form-section-label {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  padding: .8rem 0 .4rem;
  border-top: 1px solid var(--border);
  margin-top: .4rem;
}

.modal input[type="text"],
.modal input[type="email"],
.modal input[type="tel"],
.modal textarea {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: .88rem;
  padding: .55rem .8rem;
  outline: none;
  transition: border-color .15s;
  resize: vertical;
}
.modal input:focus,
.modal textarea:focus { border-color: var(--gold); }

/* Star rating */
.star-rating { display: flex; gap: .3rem; }
.star {
  font-size: 1.4rem;
  background: none;
  border: none;
  color: var(--surface3);
  cursor: pointer;
  transition: color .1s;
  line-height: 1;
}
.star.active { color: var(--gold); }

/* Recipe modal body */
.recipe-print-header {
  text-align: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.recipe-print-logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--gold);
  margin-bottom: .3rem;
}

.rp-meta { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1rem 0; }

.rp-meta-chip {
  padding: .3rem .7rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .8rem;
  color: var(--cream2);
}
.rp-meta-chip strong { color: var(--cream); }

.rp-formula {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  margin: .8rem 0;
}

.rp-formula-title {
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--muted);
  margin-bottom: .7rem;
}

.rp-item { display: flex; align-items: center; gap: .8rem; padding: .4rem 0; }
.rp-swatch { width: 30px; height: 30px; border-radius: 6px; border: 1px solid rgba(255,255,255,.08); flex-shrink: 0; }
.rp-item-info { flex: 1; }
.rp-item-name { font-size: .88rem; color: var(--cream2); }
.rp-item-code { font-size: .75rem; color: var(--muted); }
.rp-item-grams { font-size: 1rem; color: var(--gold); font-weight: 700; }

.mini-disc-wrap { display: flex; justify-content: center; }
.mini-disc-info {
  margin-top: 1rem;
  padding: .8rem 1rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .85rem;
  color: var(--cream2);
  min-height: 46px;
}

/* ── TOAST ───────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  pointer-events: none;
}

.toast {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: .8rem 1.2rem;
  font-size: .85rem;
  color: var(--cream);
  box-shadow: var(--shadow);
  animation: toastIn .25s ease;
  max-width: 320px;
  display: flex;
  align-items: center;
  gap: .6rem;
  pointer-events: all;
}

.toast.success { border-left: 3px solid var(--green); }
.toast.error   { border-left: 3px solid var(--red); }
.toast.info    { border-left: 3px solid var(--gold); }

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

/* ── EMPTY STATE ─────────────────────────────── */
.empty-state {
  grid-column: 1/-1;
  text-align: center;
  padding: 4rem 2rem;
  color: var(--muted);
}
.empty-state svg { opacity: .3; margin-bottom: 1rem; }
.empty-state h3 { font-family: var(--font-display); color: var(--cream2); margin-bottom: .4rem; }
.empty-state p { font-size: .88rem; }

/* ── PRINT ──────────────────────────────────── */
@media print {
  .sidebar, .top-bar, .modal-footer, .modal-header .modal-close { display: none !important; }
  .main-content { margin: 0; }
  .modal { position: static; transform: none; box-shadow: none; border: none; opacity: 1; pointer-events: all; width: 100%; max-height: none; }
  .modal-overlay { display: none; }
  body { background: white; color: black; }
}

/* ── RESPONSIVE ─────────────────────────────── */
@media (max-width: 1200px) {
  .stats-grid { grid-template-columns: repeat(2,1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .calc-layout { grid-template-columns: 1fr; }
  .calc-result { position: static; }
  .disc-layout { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  :root { --sidebar-w: 0px; }
  .sidebar { transform: translateX(-100%); width: 240px; }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .menu-toggle { display: flex; }
  .page { padding: 1.2rem; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .form-grid-2 { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .top-bar { padding: 0 1.2rem; }
}
