/* ─────────────────────────────────────────────
   IMAGE×SWAPP — Stylesheet
   Palette: #f5f0e8 bg · #2c2416 text · #5b7fa6 accent (støvet blå)
   Type: Space Mono (labels) + DM Sans (body)
   ───────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&family=DM+Sans:ital,wght@0,300;0,400;0,500;1,300&display=swap');

/* ── Reset ──────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Tokens ─────────────────────────────────── */
:root {
  --bg:        #f5f0e8;
  --bg-2:      #eee8dc;
  --bg-3:      #e4ddd0;
  --bg-4:      #d8d0c0;
  --text:      #2c2416;
  --text-dim:  #7a6e5f;
  --text-mute: #b0a898;
  --accent:    #5b7fa6;
  --accent-dark: #3d5f82;
  --accent-light: #d6e4f0;
  --danger:    #c0392b;
  --border:    #d4cbbf;
  --border-light: #e8e2d8;
  --radius:    6px;
  --shadow:    0 1px 4px rgba(44,36,22,0.08);
  --shadow-md: 0 4px 16px rgba(44,36,22,0.10);
  --mono:      'Space Mono', monospace;
  --sans:      'DM Sans', sans-serif;
}

/* ── Base ───────────────────────────────────── */
html, body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='7' fill='none' stroke='%235b7fa6' stroke-width='1.5'/%3E%3Ccircle cx='12' cy='12' r='1.5' fill='%235b7fa6'/%3E%3Cline x1='12' y1='2' x2='12' y2='6' stroke='%235b7fa6' stroke-width='1.5' stroke-linecap='round'/%3E%3Cline x1='12' y1='18' x2='12' y2='22' stroke='%235b7fa6' stroke-width='1.5' stroke-linecap='round'/%3E%3Cline x1='2' y1='12' x2='6' y2='12' stroke='%235b7fa6' stroke-width='1.5' stroke-linecap='round'/%3E%3Cline x1='18' y1='12' x2='22' y2='12' stroke='%235b7fa6' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") 12 12, default;
  line-height: 1.7;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='7' fill='%235b7fa620' stroke='%233d5f82' stroke-width='1.5'/%3E%3Ccircle cx='12' cy='12' r='2.5' fill='%233d5f82'/%3E%3Cline x1='12' y1='2' x2='12' y2='6' stroke='%233d5f82' stroke-width='1.5' stroke-linecap='round'/%3E%3Cline x1='12' y1='18' x2='12' y2='22' stroke='%233d5f82' stroke-width='1.5' stroke-linecap='round'/%3E%3Cline x1='2' y1='12' x2='6' y2='12' stroke='%233d5f82' stroke-width='1.5' stroke-linecap='round'/%3E%3Cline x1='18' y1='12' x2='22' y2='12' stroke='%233d5f82' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") 12 12, pointer; }
a:hover { text-decoration: underline; color: var(--accent-dark); }

h2 {
  font-family: var(--sans);
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--text);
  margin-bottom: 0.5rem;
}

small, .hint { font-size: 0.8rem; color: var(--text-dim); }

.label {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-mute);
}

.accent { color: var(--accent); }

/* ── Site Header ─────────────────────────────── */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  background: rgba(245,240,232,0.95);
  backdrop-filter: blur(8px);
  z-index: 1100;
}

.logo {
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--text);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.user-name {
  font-size: 0.85rem;
  color: var(--text-dim);
}

/* ── Buttons ─────────────────────────────────── */
.btn-primary {
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0.65rem 1.5rem;
  border-radius: var(--radius);
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='7' fill='%235b7fa620' stroke='%233d5f82' stroke-width='1.5'/%3E%3Ccircle cx='12' cy='12' r='2.5' fill='%233d5f82'/%3E%3Cline x1='12' y1='2' x2='12' y2='6' stroke='%233d5f82' stroke-width='1.5' stroke-linecap='round'/%3E%3Cline x1='12' y1='18' x2='12' y2='22' stroke='%233d5f82' stroke-width='1.5' stroke-linecap='round'/%3E%3Cline x1='2' y1='12' x2='6' y2='12' stroke='%233d5f82' stroke-width='1.5' stroke-linecap='round'/%3E%3Cline x1='18' y1='12' x2='22' y2='12' stroke='%233d5f82' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") 12 12, pointer;
  display: inline-block;
  transition: background 0.15s, box-shadow 0.15s;
  box-shadow: 0 1px 3px rgba(91,127,166,0.25);
}
.btn-primary:hover {
  background: var(--accent-dark);
  box-shadow: 0 2px 8px rgba(91,127,166,0.35);
  text-decoration: none;
  color: #fff;
}
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }

.btn-ghost {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 400;
  background: transparent;
  color: var(--text-dim);
  border: 1px solid var(--border);
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='7' fill='%235b7fa620' stroke='%233d5f82' stroke-width='1.5'/%3E%3Ccircle cx='12' cy='12' r='2.5' fill='%233d5f82'/%3E%3Cline x1='12' y1='2' x2='12' y2='6' stroke='%233d5f82' stroke-width='1.5' stroke-linecap='round'/%3E%3Cline x1='12' y1='18' x2='12' y2='22' stroke='%233d5f82' stroke-width='1.5' stroke-linecap='round'/%3E%3Cline x1='2' y1='12' x2='6' y2='12' stroke='%233d5f82' stroke-width='1.5' stroke-linecap='round'/%3E%3Cline x1='18' y1='12' x2='22' y2='12' stroke='%233d5f82' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") 12 12, pointer;
  display: inline-block;
  transition: all 0.15s;
}
.btn-ghost:hover {
  color: var(--text);
  border-color: var(--text-mute);
  background: var(--bg-2);
  text-decoration: none;
}
.btn-ghost.small { padding: 0.3rem 0.65rem; font-size: 0.75rem; }

/* ── Forms ───────────────────────────────────── */
label {
  display: block;
  font-size: 0.82rem;
  color: var(--text-dim);
  margin-bottom: 1rem;
  font-weight: 400;
}

label .hint { margin-left: 0.4rem; }

input[type=text],
input[type=email],
input[type=password] {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.95rem;
  padding: 0.65rem 0.9rem;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-shadow: inset 0 1px 2px rgba(44,36,22,0.04);
}
input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(91,127,166,0.12);
}

.form-error {
  background: rgba(192,57,43,0.06);
  border: 1px solid rgba(192,57,43,0.25);
  color: var(--danger);
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius);
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.form-success {
  background: rgba(91,127,166,0.08);
  border: 1px solid rgba(91,127,166,0.25);
  color: var(--accent-dark);
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius);
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

/* ── Auth Page ───────────────────────────────── */
.auth-page { display: flex; flex-direction: column; min-height: 100vh; }

.auth-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  gap: 1.5rem;
  background: var(--bg);
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 2.2rem;
  box-shadow: var(--shadow-md);
}

.tab-row {
  display: flex;
  gap: 0;
  margin-bottom: 1.8rem;
  border-bottom: 1px solid var(--border);
}
.tab {
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--text-dim);
  padding: 0.5rem 1.1rem 0.75rem;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s;
}
.tab.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 500; }
.tab:hover { color: var(--text); text-decoration: none; }

.auth-tagline {
  font-size: 0.82rem;
  color: var(--text-mute);
  text-align: center;
  max-width: 300px;
  line-height: 1.6;
  font-style: italic;
}

/* ── Dashboard ───────────────────────────────── */
.dashboard {
  max-width: 720px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

/* Invite panel */
.invite-panel {
  background: var(--accent-light);
  border: 1px solid rgba(91,127,166,0.3);
  border-radius: 10px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}
.invite-link-row {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  flex-wrap: wrap;
}
.invite-url {
  font-family: var(--mono);
  font-size: 0.72rem;
  background: #fff;
  border: 1px solid var(--border);
  padding: 0.45rem 0.8rem;
  border-radius: var(--radius);
  color: var(--accent-dark);
  word-break: break-all;
  flex: 1;
}

/* New session form */
.new-session { display: flex; flex-direction: column; gap: 1rem; }
.new-session-form { display: flex; flex-direction: column; gap: 1.5rem; }
.form-row { display: flex; gap: 2rem; flex-wrap: wrap; }

fieldset {
  border: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
legend {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 0.5rem;
}

.radio-card {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='7' fill='%235b7fa620' stroke='%233d5f82' stroke-width='1.5'/%3E%3Ccircle cx='12' cy='12' r='2.5' fill='%233d5f82'/%3E%3Cline x1='12' y1='2' x2='12' y2='6' stroke='%233d5f82' stroke-width='1.5' stroke-linecap='round'/%3E%3Cline x1='12' y1='18' x2='12' y2='22' stroke='%233d5f82' stroke-width='1.5' stroke-linecap='round'/%3E%3Cline x1='2' y1='12' x2='6' y2='12' stroke='%233d5f82' stroke-width='1.5' stroke-linecap='round'/%3E%3Cline x1='18' y1='12' x2='22' y2='12' stroke='%233d5f82' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") 12 12, pointer;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  transition: all 0.15s;
  margin-bottom: 0;
  font-size: 0.9rem;
  color: var(--text);
  box-shadow: var(--shadow);
}
.radio-card:hover { border-color: var(--accent); background: var(--accent-light); }
.radio-card input { margin-top: 3px; accent-color: var(--accent); flex-shrink: 0; }
.radio-card:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-light);
  box-shadow: 0 0 0 2px rgba(91,127,166,0.15);
}
.radio-card small { display: block; color: var(--text-dim); font-size: 0.75rem; line-height: 1.3; }

/* Session cards */
.sessions-list { display: flex; flex-direction: column; gap: 0.8rem; }
.session-cards { display: flex; flex-direction: column; gap: 0.5rem; }
.session-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1.1rem;
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  text-decoration: none;
  transition: all 0.15s;
  color: var(--text);
  box-shadow: var(--shadow);
}
.session-card:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(91,127,166,0.12);
  text-decoration: none;
}
.session-card .session-arrow { margin-left: auto; color: var(--text-mute); }
.session-meta { font-size: 0.85rem; color: var(--text-dim); }

.session-status {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: 20px;
  flex-shrink: 0;
}
.status-waiting    { background: rgba(91,127,166,0.1);  color: var(--accent-dark); }
.status-uploading  { background: rgba(91,127,166,0.15); color: var(--accent-dark); }
.status-processing { background: rgba(180,140,60,0.1);  color: #8a6820; }
.status-complete   { background: rgba(60,140,100,0.1);  color: #2a7a50; }

/* ── Upload Page ─────────────────────────────── */
.upload-main {
  max-width: 700px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.upload-header { display: flex; flex-direction: column; gap: 0.3rem; }
.upload-meta { font-size: 0.85rem; color: var(--text-dim); }
.upload-rule {
  font-size: 0.82rem;
  color: var(--accent-dark);
  background: var(--accent-light);
  border-left: 3px solid var(--accent);
  padding: 0.5rem 0.9rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
}

/* Status banners */
.status-banner {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem 1.1rem;
  border-radius: var(--radius);
  font-size: 0.85rem;
}
.status-banner.waiting {
  background: var(--accent-light);
  border: 1px solid rgba(91,127,166,0.25);
  color: var(--accent-dark);
}
.status-banner.ready {
  background: rgba(60,140,100,0.08);
  border: 1px solid rgba(60,140,100,0.25);
  color: #2a7a50;
}

.pulse-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.35; transform: scale(0.65); }
}

/* Upload grid */
.upload-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 0.8rem;
}

.upload-slot {
  aspect-ratio: 1;
  background: #fff;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.15s;
  overflow: hidden;
}
.upload-slot:hover { border-color: var(--accent); background: var(--accent-light); }
.upload-slot.done  { border-style: solid; border-color: var(--accent); background: var(--accent-light); padding: 0; }
.upload-slot.done img.slot-thumb {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  border-radius: calc(var(--radius) - 1px);
}
.slot-done-overlay {
  position: absolute;
  bottom: 4px; right: 5px;
  background: rgba(91,127,166,0.85);
  color: #fff;
  font-size: .6rem;
  padding: .1rem .35rem;
  border-radius: 3px;
  font-family: var(--mono);
}
.upload-slot.uploading { border-color: var(--accent); background: var(--accent-light); opacity: 0.7; }

.slot-number {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--text-mute);
  position: absolute;
  top: 6px; left: 8px;
}
.slot-check { font-size: 1.4rem; color: var(--accent); }
.slot-label {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%; height: 100%;
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='7' fill='%235b7fa620' stroke='%233d5f82' stroke-width='1.5'/%3E%3Ccircle cx='12' cy='12' r='2.5' fill='%233d5f82'/%3E%3Cline x1='12' y1='2' x2='12' y2='6' stroke='%233d5f82' stroke-width='1.5' stroke-linecap='round'/%3E%3Cline x1='12' y1='18' x2='12' y2='22' stroke='%233d5f82' stroke-width='1.5' stroke-linecap='round'/%3E%3Cline x1='2' y1='12' x2='6' y2='12' stroke='%233d5f82' stroke-width='1.5' stroke-linecap='round'/%3E%3Cline x1='18' y1='12' x2='22' y2='12' stroke='%233d5f82' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") 12 12, pointer;
  margin: 0;
}
.slot-input { display: none; }
.slot-plus {
  font-size: 1.6rem;
  color: var(--border);
  transition: color 0.15s;
  line-height: 1;
}
.slot-label:hover .slot-plus { color: var(--accent); }
.slot-progress {
  font-size: 0.62rem;
  color: var(--accent);
  position: absolute;
  bottom: 5px;
  font-family: var(--mono);
}

.batch-upload-row { display:flex; align-items:center; flex-wrap:wrap; gap:.6rem; margin-bottom:.8rem; }
.batch-btn { cursor:pointer; display:inline-flex; align-items:center; }
.upload-footer { display: flex; flex-direction: column; gap: 0.5rem; }

/* ── Result Page ─────────────────────────────── */
.result-main {
  max-width: 960px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.result-header { display: flex; flex-direction: column; gap: 0.3rem; }
.result-meta { font-size: 0.9rem; color: var(--text-dim); }

.blend-controls {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
  padding: 1rem 1.2rem;
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.blend-label {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.blend-options { display: flex; gap: 0.4rem; }
.blend-btn {
  font-family: var(--sans);
  font-size: 0.8rem;
  background: var(--bg-2);
  color: var(--text-dim);
  border: 1px solid var(--border);
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='7' fill='%235b7fa620' stroke='%233d5f82' stroke-width='1.5'/%3E%3Ccircle cx='12' cy='12' r='2.5' fill='%233d5f82'/%3E%3Cline x1='12' y1='2' x2='12' y2='6' stroke='%233d5f82' stroke-width='1.5' stroke-linecap='round'/%3E%3Cline x1='12' y1='18' x2='12' y2='22' stroke='%233d5f82' stroke-width='1.5' stroke-linecap='round'/%3E%3Cline x1='2' y1='12' x2='6' y2='12' stroke='%233d5f82' stroke-width='1.5' stroke-linecap='round'/%3E%3Cline x1='18' y1='12' x2='22' y2='12' stroke='%233d5f82' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") 12 12, pointer;
  transition: all 0.15s;
}
.blend-btn:hover { color: var(--text); border-color: var(--accent); background: var(--accent-light); }
.blend-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.blend-controls .btn-primary { margin-left: auto; }

/* Loading */
.loading-state {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  padding: 2rem 0;
}
.loading-bar-wrap {
  height: 3px;
  background: var(--bg-3);
  border-radius: 2px;
  overflow: hidden;
}
.loading-bar {
  height: 100%;
  background: var(--accent);
  width: 0%;
  transition: width 0.3s ease;
}
#loadingText {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--text-mute);
  letter-spacing: 0.06em;
}

/* Gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.2rem;
}
.gallery-item {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.2s;
  box-shadow: var(--shadow);
}
.gallery-item:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.gallery-item img {
  width: 100%;
  display: block;
  aspect-ratio: auto;
}
.gallery-item-footer {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: 0.45rem 0.6rem;
  border-top: 1px solid var(--border-light);
  background: var(--bg);
  flex-wrap: wrap;
}

.per-blend-bar {
  display: flex;
  gap: .2rem;
  flex: 1 1 auto;
}

.per-blend-btn {
  font-family: var(--mono);
  font-size: .58rem;
  padding: .18rem .4rem;
  border-radius: 3px;
  border: 1px solid var(--border);
  background: var(--bg-2);
  color: var(--text-dim);
  cursor: pointer;
  transition: all .1s;
  line-height: 1.3;
}
.per-blend-btn:hover { border-color: var(--accent); color: var(--text); }
.per-blend-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.gallery-num {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--text-mute);
}

/* ── Scrollbar ───────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ── Responsive ──────────────────────────────── */
@media (max-width: 480px) {
  .site-header { padding: 0.8rem 1rem; }
  .dashboard, .upload-main, .result-main { padding: 1.5rem 1rem; }
  .form-row { flex-direction: column; gap: 1rem; }
  .blend-controls .btn-primary { margin-left: 0; }
  .gallery { grid-template-columns: 1fr 1fr; gap: 0.7rem; }
  .upload-grid { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 0.5rem; }
}

/* ── Lightbox ────────────────────────────────── */
#lightbox {
  position: fixed;
  inset: 0;
  background: rgba(44,36,22,0.92);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  padding: .75rem;
  backdrop-filter: blur(4px);
}

#lbInner {
  flex: 1 1 0;
  min-width: 0;
  max-width: calc(100vw - 8rem); /* plads til prev/next knapper */
  height: calc(100vh - 1.5rem);
  display: flex;
  flex-direction: column;
  gap: 0;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

#lbImg {
  display: block;
  width: 100%;
  flex: 1 1 0;
  min-height: 0;
  object-fit: contain;
  cursor: default;
  background: #111;
  transition: opacity .2s;
}

#lbFooter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .6rem 1rem;
  border-top: 1px solid var(--border-light);
  background: var(--bg);
  gap: .8rem;
}

#lbNum {
  font-family: var(--mono);
  font-size: .7rem;
  color: var(--text-mute);
  min-width: 50px;
}

#lbClose {
  background: none;
  border: none;
  font-size: 1.1rem;
  color: var(--text-dim);
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='7' fill='%235b7fa620' stroke='%233d5f82' stroke-width='1.5'/%3E%3Ccircle cx='12' cy='12' r='2.5' fill='%233d5f82'/%3E%3Cline x1='12' y1='2' x2='12' y2='6' stroke='%233d5f82' stroke-width='1.5' stroke-linecap='round'/%3E%3Cline x1='12' y1='18' x2='12' y2='22' stroke='%233d5f82' stroke-width='1.5' stroke-linecap='round'/%3E%3Cline x1='2' y1='12' x2='6' y2='12' stroke='%233d5f82' stroke-width='1.5' stroke-linecap='round'/%3E%3Cline x1='18' y1='12' x2='22' y2='12' stroke='%233d5f82' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") 12 12, pointer;
  padding: .2rem .4rem;
  border-radius: 4px;
  transition: all .15s;
  line-height: 1;
}
#lbClose:hover { background: var(--bg-3); color: var(--text); }

/* Admin blend bar i lightbox */
#lbBlendBar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: .45rem 1rem;
  background: var(--bg-2);
  border-top: 1px solid var(--border-light);
  flex-shrink: 0;
}

.lb-blend-label {
  font-family: var(--mono);
  font-size: .65rem;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: .06em;
  flex-shrink: 0;
}

.lb-blend-btn {
  font-family: var(--mono);
  font-size: .65rem;
  padding: .25rem .55rem;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-dim);
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='7' fill='%235b7fa620' stroke='%233d5f82' stroke-width='1.5'/%3E%3Ccircle cx='12' cy='12' r='2.5' fill='%233d5f82'/%3E%3Cline x1='12' y1='2' x2='12' y2='6' stroke='%233d5f82' stroke-width='1.5' stroke-linecap='round'/%3E%3Cline x1='12' y1='18' x2='12' y2='22' stroke='%233d5f82' stroke-width='1.5' stroke-linecap='round'/%3E%3Cline x1='2' y1='12' x2='6' y2='12' stroke='%233d5f82' stroke-width='1.5' stroke-linecap='round'/%3E%3Cline x1='18' y1='12' x2='22' y2='12' stroke='%233d5f82' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") 12 12, pointer;
  transition: all .12s;
  line-height: 1.2;
}
.lb-blend-btn:hover { border-color: var(--accent); color: var(--text); background: var(--accent-light); }
.lb-blend-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }

#lbPrev, #lbNext {
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  font-size: 2.5rem;
  line-height: 1;
  padding: .5rem .8rem;
  border-radius: 6px;
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='7' fill='%235b7fa620' stroke='%233d5f82' stroke-width='1.5'/%3E%3Ccircle cx='12' cy='12' r='2.5' fill='%233d5f82'/%3E%3Cline x1='12' y1='2' x2='12' y2='6' stroke='%233d5f82' stroke-width='1.5' stroke-linecap='round'/%3E%3Cline x1='12' y1='18' x2='12' y2='22' stroke='%233d5f82' stroke-width='1.5' stroke-linecap='round'/%3E%3Cline x1='2' y1='12' x2='6' y2='12' stroke='%233d5f82' stroke-width='1.5' stroke-linecap='round'/%3E%3Cline x1='18' y1='12' x2='22' y2='12' stroke='%233d5f82' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") 12 12, pointer;
  transition: background .15s;
  flex-shrink: 0;
  user-select: none;
}
#lbPrev:hover, #lbNext:hover { background: rgba(255,255,255,0.28); }

@media (max-width: 480px) {
  #lbPrev, #lbNext { font-size: 1.8rem; padding: .4rem .5rem; }
  #lightbox { padding: .3rem; gap: .3rem; }
  #lbInner { max-width: calc(100vw - 5rem); height: calc(100vh - .6rem); }
}

/* ── Invite email form ───────────────────────── */
.invite-email-form {
  background: rgba(91,127,166,0.06);
  border: 1px solid rgba(91,127,166,0.15);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
}

/* ── Site footer ─────────────────────────────── */
.site-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  text-align: center;
  padding: .6rem 1.5rem;
  border-top: 1px solid var(--border-light);
  background: rgba(245,240,232,0.92);
  backdrop-filter: blur(8px);
  z-index: 90;
}

/* Giv siden lidt ekstra padding i bunden så indhold ikke gemmes bag footer */
body { padding-bottom: 52px; }

.bmc-btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: #FFDD00;
  color: #000;
  font-family: var(--sans);
  font-size: .82rem;
  font-weight: 600;
  padding: .55rem 1.2rem;
  border-radius: 50px;
  text-decoration: none;
  box-shadow: 0 1px 6px rgba(255,221,0,0.35);
  transition: all .2s;
}
.bmc-btn:hover {
  background: #f0d000;
  box-shadow: 0 3px 12px rgba(255,221,0,0.5);
  transform: translateY(-1px);
  text-decoration: none;
  color: #000;
}

/* ── Navigation ──────────────────────────────── */
.site-header {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: .2rem;
  flex: 1;
}

.nav-link {
  font-family: var(--sans);
  font-size: .82rem;
  color: var(--text-dim);
  text-decoration: none;
  padding: .4rem .75rem;
  border-radius: var(--radius);
  transition: all .15s;
  white-space: nowrap;
}
.nav-link:hover { color: var(--text); background: var(--bg-2); text-decoration: none; }
.nav-link.nav-active {
  color: var(--accent-dark);
  background: var(--accent-light);
  font-weight: 500;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-left: auto;
}

.nav-lang {
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .06em;
}

.nav-username {
  font-size: .82rem;
  color: var(--text-dim);
  padding: 0 .4rem;
  white-space: nowrap;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-logout {
  font-size: .75rem;
  padding: .4rem .8rem;
  white-space: nowrap;
}

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='7' fill='%235b7fa620' stroke='%233d5f82' stroke-width='1.5'/%3E%3Ccircle cx='12' cy='12' r='2.5' fill='%233d5f82'/%3E%3Cline x1='12' y1='2' x2='12' y2='6' stroke='%233d5f82' stroke-width='1.5' stroke-linecap='round'/%3E%3Cline x1='12' y1='18' x2='12' y2='22' stroke='%233d5f82' stroke-width='1.5' stroke-linecap='round'/%3E%3Cline x1='2' y1='12' x2='6' y2='12' stroke='%233d5f82' stroke-width='1.5' stroke-linecap='round'/%3E%3Cline x1='18' y1='12' x2='22' y2='12' stroke='%233d5f82' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") 12 12, pointer;
  padding: .4rem;
  margin-left: auto;
  z-index: 110;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all .2s;
  transform-origin: center;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobil */
@media (max-width: 640px) {
  .nav-hamburger { display: flex; }

  .main-nav {
    display: none;
    position: absolute;
    top: 57px;
    left: 0; right: 0;
    background: #fff;
    border-bottom: 1px solid var(--border-light);
    box-shadow: var(--shadow-md);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: .5rem 0;
    z-index: 100;
  }
  .main-nav.open { display: flex; }

  .nav-link {
    padding: .75rem 1.2rem;
    border-radius: 0;
    font-size: .9rem;
  }
  .nav-link.nav-active { border-left: 3px solid var(--accent); }

  .nav-right {
    margin-left: 0;
    flex-direction: column;
    align-items: stretch;
    padding: .5rem 0;
    border-top: 1px solid var(--border-light);
    gap: 0;
  }
  .nav-right .nav-link,
  .nav-right .btn-ghost,
  .nav-right .nav-logout { padding: .75rem 1.2rem; border-radius: 0; border: none; text-align: left; }
  .nav-username { padding: .6rem 1.2rem; font-weight: 500; color: var(--text); }
}

/* ── Admin mobil ─────────────────────────────── */
@media (max-width: 640px) {
  .admin-layout { flex-direction: column; }
  .admin-content { padding: .8rem; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: .5rem; }
  .stat-num { font-size: 1.3rem; }
  .stat-label { font-size: .7rem; }
  .stat-card { padding: .8rem; }
  .cleanup-row { flex-direction: column; align-items: flex-start; gap: .4rem; }

  /* Skjul tabel-headers og lav kortvisning */
  .admin-table thead { display: none; }
  .admin-table, .admin-table tbody { display: block; width: 100%; }

  .admin-table tr {
    display: block;
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    margin-bottom: .6rem;
    padding: .7rem .9rem;
    box-shadow: var(--shadow);
  }
  .admin-table tr:hover td { background: transparent; }

  .admin-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .25rem 0;
    border: none;
    font-size: .82rem;
    gap: .5rem;
  }

  /* Data-label via CSS attr */
  .admin-table td[data-label]::before {
    content: attr(data-label);
    font-family: var(--mono);
    font-size: .62rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--text-mute);
    flex-shrink: 0;
    min-width: 80px;
  }

  /* Skjul tomme/uvæsentlige kolonner på mobil */
  .admin-table td.hide-mobile { display: none; }

  .filter-row { gap: .3rem; flex-wrap: wrap; }
  .filter-btn { font-size: .65rem; padding: .3rem .6rem; }
  .translation-row .translation-val { font-size: .82rem; }
  .translation-form textarea { font-size: .82rem; }
  .modal { width: calc(100vw - 2rem); }
}

/* ── Admin sub-navigation ────────────────────── */
.admin-subnav {
  display: flex;
  align-items: center;
  gap: .2rem;
  padding: .5rem 1.5rem;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border-light);
  flex-wrap: wrap;
}
.admin-subnav-link {
  font-size: .78rem;
  font-family: var(--mono);
  letter-spacing: .05em;
  color: var(--text-dim);
  text-decoration: none;
  padding: .35rem .75rem;
  border-radius: var(--radius);
  transition: all .15s;
  white-space: nowrap;
  text-transform: uppercase;
}
.admin-subnav-link:hover { color: var(--text); background: var(--bg-3); text-decoration: none; }
.admin-subnav-link.active { color: var(--accent-dark); background: var(--accent-light); font-weight: 700; }
.admin-layout { display: block; }
.admin-content { max-width: 1000px; margin: 0 auto; padding: 1.5rem; }

@media (max-width: 640px) {
  .admin-subnav { padding: .4rem .8rem; gap: .2rem; }
  .admin-subnav-link { font-size: .65rem; padding: .3rem .5rem; }
}

/* ── Session card wrap ───────────────────────── */
.session-card-wrap {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.session-resend {
  background: var(--bg-2);
  border: 1px solid var(--border-light);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  padding: .4rem .8rem;
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
}
.session-card-wrap .session-card {
  border-radius: var(--radius) var(--radius) 0 0;
}

/* ── Dashboard section titles (matches manual h1) ── */
.dash-section-title {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 500;
  color: var(--text);
  font-family: var(--sans);
  letter-spacing: 0;
  line-height: 1.2;
  margin-bottom: .6rem;
}
