/* Tassen-Admin – Hausstil "tassen-ui" (Glassmorphism, Dark-Mode via body.dark-mode). Selbstständig, keine CDNs. */
:root {
  --bg: #f0f2f8; --bg2: #e8eaf2; --bg-card: rgba(255,255,255,0.7); --bg-card-solid: #ffffff; --bg-input: rgba(255,255,255,0.8);
  --border: rgba(0,0,0,0.08); --border-glow: rgba(0,0,0,0.15); --text: #1a1a2e; --text-dim: rgba(0,0,0,0.45);
  --accent: #7c3aed; --accent-hover: #6d28d9; --accent-glow: rgba(124,58,237,0.3);
  --green: #059669; --green-glow: rgba(5,150,105,0.3); --orange: #d97706; --orange-glow: rgba(217,119,6,0.3);
  --red: #dc2626; --red-glow: rgba(220,38,38,0.3); --blue: #2563eb;
  --glass-bg: rgba(255,255,255,0.55); --glass-border: rgba(0,0,0,0.06); --glass-shadow: 0 8px 32px rgba(0,0,0,0.08);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1); --spring-soft: cubic-bezier(0.22, 1.2, 0.36, 1); --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --radius: 14px; --sidebar-w: 224px; --header-h: 56px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
html.dark-mode, body.dark-mode {
  --bg: #0f0f1a; --bg2: #16162a; --bg-card: rgba(30,30,55,0.7); --bg-card-solid: #1e1e37; --bg-input: rgba(30,30,55,0.8);
  --border: rgba(255,255,255,0.08); --border-glow: rgba(255,255,255,0.15); --text: #e8e8f0; --text-dim: rgba(255,255,255,0.45);
  --glass-bg: rgba(30,30,55,0.55); --glass-border: rgba(255,255,255,0.06); --glass-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
* { box-sizing: border-box; }
html { color-scheme: light; }
html.dark-mode { color-scheme: dark; }
body { margin: 0; font-family: var(--font); font-size: 14px; line-height: 1.45; color: var(--text); background: var(--bg); min-height: 100vh; -webkit-font-smoothing: antialiased; }
body::before { content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(ellipse 80% 50% at 20% 40%, rgba(124,58,237,0.08), transparent),
              radial-gradient(ellipse 60% 40% at 80% 20%, rgba(37,99,235,0.06), transparent),
              radial-gradient(ellipse 50% 60% at 50% 80%, rgba(5,150,105,0.05), transparent);
  animation: gradientShift 20s ease-in-out infinite alternate; }
@keyframes gradientShift { 0% { opacity: 1; transform: scale(1) rotate(0deg); } 50% { opacity: .8; transform: scale(1.1) rotate(2deg); } 100% { opacity: 1; transform: scale(1) rotate(-1deg); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; } }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 10px; line-height: 1.2; }
h1 { font-size: 24px; font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: 16px; font-weight: 700; }
h3 { font-size: 14px; font-weight: 700; }
h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-dim); }
code, pre, kbd { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }
code { background: rgba(124,58,237,0.08); padding: 1px 5px; border-radius: 5px; }
pre.json { background: var(--bg2); border: 1px solid var(--border); border-radius: 10px; padding: 12px; overflow: auto; max-height: 480px; white-space: pre; font-size: 12px; }
kbd { border: 1px solid var(--border); border-radius: 4px; padding: 0 5px; background: var(--bg-card-solid); }
.muted { color: var(--text-dim); } .small { font-size: 12px; } .danger-text { color: var(--red); }
.mt { margin-top: 18px; } .mt-s { margin-top: 8px; } .inline { display: inline; }
[hidden] { display: none !important; }

/* Glass */
.glass { background: var(--glass-bg); backdrop-filter: blur(20px) saturate(1.5); -webkit-backdrop-filter: blur(20px) saturate(1.5); border: 1px solid var(--glass-border); box-shadow: var(--glass-shadow); }

/* Floating emoji background (dezent, optional) */
#floating-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.bg-emoji { position: absolute; bottom: -60px; pointer-events: none; will-change: transform; animation: bgEmojiFloat linear infinite; user-select: none; }
@keyframes bgEmojiFloat { 0% { transform: translateY(0) translateX(0) rotate(0deg); } 25% { transform: translateY(-25vh) translateX(15px) rotate(5deg); } 50% { transform: translateY(-50vh) translateX(-10px) rotate(-3deg); } 75% { transform: translateY(-75vh) translateX(12px) rotate(4deg); } 100% { transform: translateY(-110vh) translateX(-5px) rotate(-2deg); } }

/* Layout */
.header { position: sticky; top: 0; z-index: 30; height: var(--header-h); display: flex; align-items: center; gap: 12px; padding: 0 16px; border-left: 0; border-right: 0; border-top: 0; animation: slideDown .5s var(--ease-out) both; }
body.dark-mode .header { background: rgba(20,20,40,0.85); }
.brand { font-weight: 800; font-size: 16px; color: var(--text); display: flex; align-items: center; gap: 8px; }
.brand:hover { text-decoration: none; }
.brand-emoji { font-size: 20px; }
.header-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.header-clock { font-variant-numeric: tabular-nums; color: var(--text-dim); font-size: 13px; }
.shell { display: flex; min-height: calc(100vh - var(--header-h)); position: relative; z-index: 1; }
.sidebar { width: var(--sidebar-w); flex: 0 0 auto; padding: 14px 10px; border-top: 0; border-bottom: 0; border-left: 0; position: sticky; top: var(--header-h); height: calc(100vh - var(--header-h)); overflow-y: auto; display: flex; flex-direction: column; animation: slideRight .4s var(--ease-out) both; }
body.dark-mode .sidebar { background: rgba(20,20,40,0.6); }
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li a { display: flex; align-items: center; gap: 10px; padding: 11px 12px; min-height: 44px; border-radius: 10px; color: var(--text); font-weight: 500; transition: background .2s, transform .2s var(--spring-soft); }
.sidebar li a:hover { background: rgba(124,58,237,0.08); text-decoration: none; transform: translateX(2px); }
.sidebar li a.active { background: var(--accent); color: #fff; box-shadow: 0 6px 18px var(--accent-glow); }
.nav-icon { width: 22px; text-align: center; font-size: 15px; opacity: .85; }
.sidebar-foot { margin-top: auto; padding: 12px; display: flex; flex-direction: column; gap: 6px; font-size: 12px; }
.sidebar-backdrop { display: none; }
.content { flex: 1 1 auto; min-width: 0; padding: 22px 24px 60px; }
@media (max-width: 900px) {
  .sidebar { position: fixed; left: 0; top: var(--header-h); z-index: 40; transform: translateX(-105%); transition: transform .3s var(--ease-out); animation: none; background: var(--bg-card-solid); }
  body.nav-open .sidebar { transform: translateX(0); }
  .sidebar-backdrop { display: none; position: fixed; inset: var(--header-h) 0 0 0; background: rgba(0,0,0,0.35); z-index: 35; }
  body.nav-open .sidebar-backdrop { display: block; }
  .content { padding: 16px 12px 60px; }
}
#nav-toggle { display: none; }
@media (max-width: 900px) { #nav-toggle { display: inline-flex; } }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h1 { margin: 0; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.back { display: inline-block; font-size: 12px; margin-bottom: 4px; color: var(--text-dim); }
.section-title { margin: 22px 0 10px; }
.card { border-radius: var(--radius); padding: 18px; margin-bottom: 18px; animation: fadeIn .45s var(--ease-out) both; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.card-head h2, .card-head h3 { margin: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 1000px) { .grid-2 { grid-template-columns: 1fr; } }
.empty { color: var(--text-dim); padding: 12px; text-align: center; border: 1px dashed var(--border); border-radius: 10px; margin: 0; }
.banner { padding: 10px 14px; border-radius: 10px; margin-bottom: 14px; font-size: 13px; }
.banner-warning { background: rgba(217,119,6,0.12); border: 1px solid rgba(217,119,6,0.35); color: var(--orange); }
.banner-error { background: rgba(220,38,38,0.1); border: 1px solid rgba(220,38,38,0.3); color: var(--red); }
body.dark-mode .banner-warning { color: #fbbf24; }
body.dark-mode .banner-error { color: #f87171; }

/* Dashboard */
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 18px; }
.dash-card { display: block; border-radius: var(--radius); padding: 16px; color: var(--text); animation: fadeIn .5s var(--ease-out) both; transition: transform .25s var(--spring-soft), box-shadow .25s; transform-style: preserve-3d; }
.dash-card:hover { text-decoration: none; box-shadow: 0 14px 40px rgba(124,58,237,0.15); }
.dash-card:nth-child(1) { animation-delay: .05s; } .dash-card:nth-child(2) { animation-delay: .1s; } .dash-card:nth-child(3) { animation-delay: .15s; }
.dash-card:nth-child(4) { animation-delay: .2s; } .dash-card:nth-child(5) { animation-delay: .25s; } .dash-card:nth-child(6) { animation-delay: .3s; }
.dash-label { font-size: 12px; color: var(--text-dim); text-transform: uppercase; letter-spacing: .04em; }
.dash-value { font-size: 30px; font-weight: 800; margin: 4px 0; font-variant-numeric: tabular-nums; }
.dash-value.warn { color: var(--orange); } .dash-value.danger { color: var(--red); }
.dash-sub { font-size: 12px; color: var(--text-dim); }
.status-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.status-list li { display: flex; align-items: center; gap: 10px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: #9ca3af; flex: 0 0 auto; box-shadow: 0 0 0 3px rgba(156,163,175,0.2); }
.dot.ok { background: var(--green); box-shadow: 0 0 0 3px var(--green-glow); }
.dot.warn { background: var(--orange); box-shadow: 0 0 0 3px var(--orange-glow); }
.dot.off { background: #9ca3af; }
.job-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 10px 18px; border-radius: 12px; border: 1px solid transparent; font: inherit; font-weight: 600; cursor: pointer; background: var(--bg-card-solid); color: var(--text); transition: transform .2s var(--spring), box-shadow .2s, background .2s; position: relative; overflow: hidden; -webkit-tap-highlight-color: transparent; text-decoration: none; }
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: scale(.97); }
.btn:disabled, .btn.is-loading { opacity: .6; cursor: progress; pointer-events: none; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 6px 18px var(--accent-glow); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-outline { background: transparent; border-color: var(--border-glow); }
.btn-outline:hover { background: rgba(124,58,237,0.06); border-color: var(--accent); }
.btn-danger { color: var(--red); }
.btn-danger.btn-outline:hover { background: rgba(220,38,38,0.08); border-color: var(--red); }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: 13px; border-radius: 10px; }
.btn-block { width: 100%; }
.icon-btn { min-width: 44px; min-height: 44px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg-card); font-size: 18px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; color: var(--text); }
.btn .spinner { width: 14px; height: 14px; }
@keyframes rippleOut { to { transform: scale(1); opacity: 0; } }
.ripple { position: absolute; border-radius: 50%; background: rgba(124,58,237,0.16); transform: scale(0); animation: rippleOut .6s ease-out forwards; pointer-events: none; }

/* Forms */
.field { display: flex; flex-direction: column; gap: 5px; font-size: 13px; min-width: 0; }
.field > span { color: var(--text-dim); font-weight: 500; }
.field.check { flex-direction: row; align-items: center; gap: 8px; min-height: 44px; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
input, select, textarea { font: inherit; color: var(--text); background: var(--bg-input); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; min-height: 44px; width: 100%; max-width: 100%; transition: border-color .2s, box-shadow .2s; }
input[type="checkbox"], input[type="radio"] { width: 22px; height: 22px; min-height: 0; padding: 0; accent-color: var(--accent); cursor: pointer; }
input[type="color"] { padding: 4px; width: 56px; min-height: 44px; cursor: pointer; }
input[type="range"] { min-height: 44px; padding: 0; background: transparent; border: 0; accent-color: var(--accent); }
input[type="file"] { padding: 8px; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
body.dark-mode input, body.dark-mode select, body.dark-mode textarea { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.1); color: var(--text); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 16px; }
.form-grid.one { grid-template-columns: 1fr; }
.form-grid.two { grid-template-columns: 1fr 1fr; }
.form-grid.compact { gap: 8px 12px; }
.form-actions { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.inline-form input { flex: 1 1 200px; width: auto; }
.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.filter-bar input[type="search"] { flex: 1 1 200px; width: auto; }
.filter-bar select { width: auto; }
.color-row { display: flex; align-items: center; gap: 10px; }
.w-num { width: 84px; }
.table-forms input, .table-forms select { min-height: 38px; padding: 6px 8px; }
.table-forms td { vertical-align: middle; }
.progress { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; margin-top: 8px; }
.progress-bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--red), var(--orange), var(--green)); transition: width .2s; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; }
.kv dt { color: var(--text-dim); } .kv dd { margin: 0; min-width: 0; word-break: break-word; }
.kv-inline { display: flex; gap: 10px; font-size: 13px; padding: 4px 0; }
.kv-inline > span:first-child { color: var(--text-dim); min-width: 90px; }

/* Tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -6px; padding: 0 6px; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-dim); padding: 8px 8px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 10px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table tr:hover td { background: rgba(124,58,237,0.03); }
.table .actions { white-space: nowrap; display: flex; gap: 6px; flex-wrap: wrap; }
.pagination { display: flex; align-items: center; gap: 12px; justify-content: center; margin-top: 14px; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; background: rgba(0,0,0,0.06); color: var(--text); white-space: nowrap; }
body.dark-mode .badge { background: rgba(255,255,255,0.1); }
.badge-ok, .badge-done, .badge-ordered { background: rgba(5,150,105,0.14); color: var(--green); }
.badge-off, .badge-draft, .badge-no_designs { background: rgba(107,114,128,0.16); color: var(--text-dim); }
.badge-received, .badge-pending, .badge-in_cart { background: rgba(37,99,235,0.14); color: var(--blue); }
.badge-processing, .badge-rendering { background: rgba(217,119,6,0.14); color: var(--orange); }
.badge-failed { background: rgba(220,38,38,0.14); color: var(--red); }
body.dark-mode .badge-ok, body.dark-mode .badge-done, body.dark-mode .badge-ordered { color: #34d399; }
body.dark-mode .badge-failed { color: #f87171; }
body.dark-mode .badge-processing, body.dark-mode .badge-rendering { color: #fbbf24; }
body.dark-mode .badge-received, body.dark-mode .badge-pending, body.dark-mode .badge-in_cart { color: #93c5fd; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.chip { display: inline-flex; align-items: center; min-height: 40px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--border-glow); color: var(--text); font-weight: 600; font-size: 13px; background: var(--bg-card); }
.chip:hover { text-decoration: none; border-color: var(--accent); }
.chip.active { background: var(--accent); color: #fff; border-color: var(--accent); box-shadow: 0 6px 16px var(--accent-glow); }

/* Templates */
.template-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.template-card { border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; animation: fadeIn .45s var(--ease-out) both; }
.template-card.inactive { opacity: .65; }
.template-thumb { display: block; background: repeating-conic-gradient(rgba(0,0,0,0.05) 0 25%, transparent 0 50%) 0 0 / 16px 16px; }
.template-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.thumb-placeholder { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; min-height: 80px; color: var(--text-dim); font-size: 12px; }
.template-body { padding: 12px 14px 6px; }
.template-title { font-weight: 700; font-size: 15px; }
.template-actions { padding: 8px 14px 14px; display: flex; gap: 6px; flex-wrap: wrap; }
.thumb-preview { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: repeating-conic-gradient(rgba(0,0,0,0.05) 0 25%, transparent 0 50%) 0 0 / 16px 16px; }
.thumb-preview img { width: 100%; display: block; }
.editor-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
@media (max-width: 1100px) { .editor-layout { grid-template-columns: 1fr; } }
.editor-main { min-height: 420px; }
.editor-loading { display: flex; align-items: center; gap: 10px; color: var(--text-dim); padding: 40px 0; justify-content: center; }
.editor-stub { text-align: center; padding: 30px 12px; color: var(--text-dim); border: 1px dashed var(--border); border-radius: 12px; }

/* Fonts */
.font-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.font-row { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; display: grid; gap: 6px; }
.font-sample { font-size: 26px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.font-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* Model binding */
.binding-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr); gap: 18px; align-items: start; }
@media (max-width: 1000px) { .binding-layout { grid-template-columns: 1fr; } }
.viewer-stage { height: 460px; border-radius: 12px; overflow: hidden; touch-action: none; background: radial-gradient(circle at 50% 40%, #ffffff, #dfe2ea); position: relative; }
body.dark-mode .viewer-stage { background: radial-gradient(circle at 50% 40%, #3a3a5c, #15152a); }
@media (max-width: 700px) { .viewer-stage { height: 320px; } }
.pattern-canvas { width: 100%; height: auto; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.dropzone { border: 2px dashed var(--border-glow); border-radius: 14px; padding: 22px 16px; text-align: center; cursor: pointer; transition: border-color .2s, background .2s; outline: none; }
.dropzone:hover, .dropzone:focus, .dropzone.drag { border-color: var(--accent); background: rgba(124,58,237,0.05); }
.dropzone-icon { font-size: 26px; margin-bottom: 4px; }
.model-info { margin-top: 10px; }
.area-bind { border: 1px solid var(--border); border-radius: 12px; padding: 14px; margin-bottom: 12px; }
.area-bind.active { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.area-bind h3 { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.range-row { display: grid; grid-template-columns: 48px 1fr 72px; gap: 8px; align-items: center; font-size: 13px; }
.range-row input[type="number"] { min-height: 38px; padding: 6px 8px; }
.uv-grid { display: grid; gap: 6px; margin-top: 6px; }

/* Layout editor */
.layout-editor { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
@media (max-width: 1100px) { .layout-editor { grid-template-columns: 1fr; } }
.toolbar { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.inline-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.le-stage-wrap { overflow: auto; border-radius: 10px; }
.le-stage { background: repeating-conic-gradient(rgba(0,0,0,0.06) 0 25%, transparent 0 50%) 0 0 / 18px 18px; border: 1px solid var(--border); border-radius: 10px; touch-action: none; }
.le-preview { margin-top: 14px; border-top: 1px solid var(--border); padding-top: 12px; }
.le-preview img { max-width: 100%; border: 1px solid var(--border); border-radius: 8px; background: repeating-conic-gradient(rgba(0,0,0,0.06) 0 25%, transparent 0 50%) 0 0 / 18px 18px; }
.le-side .form-grid.two { grid-template-columns: 1fr 1fr; }
.mirror-row { display: grid; grid-template-columns: repeat(4, 1fr) auto; gap: 6px; align-items: center; margin-bottom: 6px; }
.mirror-row input { min-height: 38px; padding: 6px 8px; }
.prop-row { display: grid; grid-template-columns: 96px 1fr; gap: 8px; align-items: center; margin-bottom: 8px; font-size: 13px; }
.prop-row > span { color: var(--text-dim); }
.prop-row input, .prop-row select, .prop-row textarea { min-height: 38px; padding: 6px 8px; }
.prop-row.full { grid-template-columns: 1fr; }
.layer-list { list-style: none; margin: 0; padding: 0; }
.layer-list li { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 8px; cursor: pointer; min-height: 40px; }
.layer-list li:hover { background: rgba(124,58,237,0.06); }
.layer-list li.active { background: rgba(124,58,237,0.14); font-weight: 600; }
.layer-list .layer-type { font-size: 11px; color: var(--text-dim); text-transform: uppercase; width: 64px; }
.layer-list .layer-btns { margin-left: auto; display: flex; gap: 2px; }
.layer-list .layer-btns button { min-height: 30px; min-width: 30px; padding: 0 6px; border-radius: 6px; }

/* Orders / designs */
.line-item-grid { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 16px; }
@media (max-width: 700px) { .line-item-grid { grid-template-columns: 1fr; } }
.line-preview img { width: 100%; border-radius: 10px; border: 1px solid var(--border); background: #fff; }
.file-groups { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 10px; }
@media (max-width: 700px) { .file-groups { grid-template-columns: 1fr; } }
.file-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.design-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.design-card { display: block; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; color: var(--text); background: var(--bg-card); transition: transform .2s var(--spring-soft), box-shadow .2s; }
.design-card:hover { text-decoration: none; transform: translateY(-3px); box-shadow: 0 12px 30px rgba(0,0,0,0.1); }
.design-thumb { aspect-ratio: 1; background: #fff; display: flex; align-items: center; justify-content: center; }
.design-thumb img { width: 100%; height: 100%; object-fit: cover; }
.design-meta { padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.design-preview-big img { width: 100%; max-width: 480px; border-radius: 12px; border: 1px solid var(--border); background: #fff; }

/* Toasts */
#toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column-reverse; gap: 8px; pointer-events: none; max-width: calc(100vw - 40px); }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; padding: 12px 18px; background: rgba(255,255,255,0.95); backdrop-filter: blur(20px); border: 1px solid rgba(0,0,0,0.08); border-radius: 12px; box-shadow: 0 8px 30px rgba(0,0,0,0.12); font-size: 13px; font-weight: 500; color: var(--text); max-width: 360px; animation: toastIn .4s var(--spring) both; cursor: pointer; border-left: 3px solid var(--accent); }
.toast.success { border-left-color: var(--green); } .toast.error { border-left-color: var(--red); } .toast.warning { border-left-color: var(--orange); }
.toast .toast-icon { width: 24px; height: 24px; border-radius: 50%; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex-shrink: 0; background: var(--accent); }
.toast.success .toast-icon { background: var(--green); } .toast.error .toast-icon { background: var(--red); } .toast.warning .toast-icon { background: var(--orange); }
body.dark-mode .toast { background: rgba(30,30,55,0.95); border-color: rgba(255,255,255,0.08); }
@keyframes toastIn { from { transform: translateX(120%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes toastOut { from { transform: translateX(0); opacity: 1; } to { transform: translateX(120%); opacity: 0; } }

/* Modal */
.modal-overlay { position: fixed; inset: 0; z-index: 10000; background: rgba(0,0,0,0.4); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal-card { background: var(--bg-card-solid); border-radius: 16px; padding: 24px; max-width: 480px; width: 100%; box-shadow: 0 20px 60px rgba(0,0,0,0.25); animation: fadeIn .3s var(--ease-out); }
.modal-card h3 { font-size: 18px; margin-bottom: 10px; }
.modal-msg { color: var(--text-dim); font-size: 14px; margin-bottom: 20px; white-space: pre-line; }
.modal-btns { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }

/* Misc */
.spinner { display: inline-block; width: 18px; height: 18px; border: 2px solid var(--border-glow); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideDown { from { transform: translateY(-100%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes slideRight { from { transform: translateX(-100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.login-page .login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; position: relative; z-index: 1; }
.login-card { width: 100%; max-width: 380px; text-align: center; }
.login-card .field { text-align: left; margin-bottom: 14px; }
.login-emoji { font-size: 44px; }

/* Sammel-Aktionen in der Bestellliste */
.bulk-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 14px; margin-bottom: 12px;
  border: 1px solid var(--accent); border-radius: 12px; background: rgba(124,58,237,0.06); }
.bulk-bar select { min-height: 38px; padding: 6px 10px; }
.bulk-bar strong { margin-right: 4px; }
.filter-bar select, .filter-bar input { min-height: 40px; }

/* Produktseite: Farbliste und Bogen-Vorschau */
.color-dot { display: inline-block; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--border); }
.color-dot-sm { width: 13px; height: 13px; margin-right: 7px; vertical-align: -2px; }
.chip .color-dot-sm { margin-right: 8px; }
.pa-sheet { position: relative; width: 100%; border: 1px solid var(--border); border-radius: 10px;
  background: repeating-conic-gradient(rgba(0,0,0,0.05) 0 25%, transparent 0 50%) 0 0 / 16px 16px; overflow: hidden; }
.pa-band { position: absolute; left: 0; right: 0; top: 0; background: rgba(124,58,237,0.10); border-bottom: 1px dashed var(--accent); }
.pa-band span { position: absolute; left: 6px; top: 3px; font-size: 10px; color: var(--accent); }
.pa-box { position: absolute; border: 2px solid var(--accent); background: rgba(31,111,235,0.10); cursor: grab;
  display: flex; align-items: center; justify-content: center; font-size: 11px; color: var(--accent); text-align: center; }
.pa-box:active { cursor: grabbing; }
.mb-s { margin-bottom: 8px } .mt-s { margin-top: 8px }

/* Farbwähler in der Farbtabelle: links der eingestellte Ton, daneben – falls abweichend –
   die Farbe, die das 3D-Modell heute zeigt. */
.variant-color { display: flex; align-items: center; gap: 8px; }
.variant-color input[type="color"] { width: 38px; height: 30px; padding: 0; border: 1px solid var(--border); border-radius: 8px; background: none; cursor: pointer; }

/* Mehrere Druckdateien je Bestellung: schmale Knöpfe nebeneinander, damit die Zeile nicht aufreißt. */
.pdf-links { display: flex; flex-wrap: wrap; gap: 5px; }
.pdf-links .btn { padding: 3px 9px; font-size: 11.5px; min-height: 26px; }

/* Formen-Bibliothek */
.shape-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; }
.shape-card { border: 1px solid var(--border); border-radius: 12px; padding: 12px; text-align: center; }
.shape-preview { height: 96px; display: flex; align-items: center; justify-content: center;
  background: repeating-conic-gradient(rgba(0,0,0,0.05) 0 25%, transparent 0 50%) 0 0 / 14px 14px;
  border-radius: 8px; margin-bottom: 8px; }
.shape-preview img { max-width: 82%; max-height: 82%; object-fit: contain; }
.shape-name { font-size: 12.5px; margin-bottom: 8px; word-break: break-all; }

/* Zahlenfelder im Druckbogen-Editor: dreistellige Millimeterwerte müssen ganz lesbar sein. */
.form-grid.compact input[type="number"],
.form-grid.two input[type="number"] { min-width: 88px; }
.le-side .form-grid { grid-template-columns: 1fr 1fr; }

/* Hinweis im Bogen-Editor, wenn ein Element nicht exakt mittig sitzt. */
.le-off { color: #b45309; margin-top: 6px; }
body.dark-mode .le-off { color: #fbbf24; }
