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

/* ===== Bobbel Brand System (Logo Option 2) ===== */
:root {
    --brand-primary: #1e293b;
    --brand-primary-hover: #0f172a;
    --brand-accent: #f4a574;
    --brand-accent-strong: #e8926a;
    --brand-accent-soft: #fde8d8;
    --brand-accent-muted: #f8d4b8;
    --brand-secondary: #c5d4e3;
    --brand-secondary-border: #b8c9db;
    --brand-secondary-soft: #e8eef4;
    --brand-bg: #faf7f2;
    --brand-surface: #ffffff;
    --brand-text: #1e293b;
    --brand-text-muted: #64748b;
    --brand-text-subtle: #94a3b8;
    --brand-border: var(--brand-secondary-border);
    --brand-border-soft: #e8e2d9;
    --brand-focus-ring: rgba(30, 41, 59, 0.14);
    --brand-shadow-sm: 0 1px 3px rgba(30, 41, 59, 0.06), 0 1px 2px rgba(30, 41, 59, 0.04);
    --brand-shadow-md: 0 8px 24px rgba(30, 41, 59, 0.07);
    --brand-radius-card: 1rem;
    --brand-radius-input: 0.625rem;
    --brand-font: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --admin-simulation-bar-height: 2.75rem;
}

body {
    font-family: var(--brand-font);
    font-variant-numeric: tabular-nums;
    background: var(--brand-bg);
    color: var(--brand-text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.app-shell[hidden] {
    display: none !important;
}

.app-shell {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 100vh;
    min-height: 100dvh;
}

.auth-gate {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    min-height: 100vh;
    background:
        radial-gradient(ellipse 80% 60% at 50% -10%, rgba(139, 92, 246, 0.14), transparent),
        radial-gradient(ellipse 60% 50% at 100% 100%, rgba(37, 99, 235, 0.1), transparent),
        #f1f5f9;
}

.auth-gate[hidden] {
    display: none !important;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 2rem 2rem 1.75rem;
    box-shadow:
        0 20px 50px rgba(15, 23, 42, 0.08),
        0 4px 14px rgba(15, 23, 42, 0.04);
}

.auth-card-brand {
    text-align: center;
    margin-bottom: 1.75rem;
}

.auth-card-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 14px;
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    font-size: 1.5rem;
    margin-bottom: 0.85rem;
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.28);
}

.auth-card-brand h2 {
    font-size: 1.45rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.35rem;
}

.auth-card-subtitle {
    font-size: 0.92rem;
    color: #64748b;
}

.auth-mode-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.35rem;
    padding: 0.25rem;
    margin-bottom: 0.25rem;
    border-radius: 12px;
    background: #f1f5f9;
}

.auth-mode-tab {
    border: none;
    border-radius: 10px;
    padding: 0.55rem 0.75rem;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    color: #64748b;
    background: transparent;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}

.auth-mode-tab.is-active {
    background: #ffffff;
    color: #5b21b6;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.auth-field label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #475569;
}

.auth-field input {
    width: 100%;
    padding: 0.72rem 0.85rem;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-size: 0.95rem;
    color: #0f172a;
    background: #f8fafc;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.auth-field input:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.18);
    background: #ffffff;
}

.auth-message {
    font-size: 0.86rem;
    line-height: 1.45;
    padding: 0.65rem 0.75rem;
    border-radius: 8px;
}

.auth-message[hidden] {
    display: none !important;
}

.auth-message--error {
    color: #b91c1c;
    background: #fef2f2;
    border: 1px solid #fecaca;
}

.auth-message--success {
    color: #166534;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
}

.auth-submit-btn {
    margin-top: 0.25rem;
    padding: 0.78rem 1rem;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #7c3aed, #8b5cf6);
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(124, 58, 237, 0.28);
    transition: transform 0.15s, box-shadow 0.15s;
}

.auth-submit-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(124, 58, 237, 0.34);
}

.auth-submit-btn:disabled {
    opacity: 0.7;
    cursor: wait;
}

.auth-toggle-line {
    margin-top: 1.25rem;
    text-align: center;
}

.auth-hint {
    font-size: 0.82rem;
    color: #64748b;
    line-height: 1.45;
    text-align: center;
}

.auth-mode-toggle {
    border: none;
    background: none;
    color: #6366f1;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.auth-mode-toggle:hover {
    color: #4f46e5;
}

/* ===== Auth-Modal (über der Landingpage) ===== */
.auth-gate--modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    min-height: 0;
    background: none;
}

.auth-gate-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    animation: authBackdropIn 0.2s ease;
}

.auth-gate--modal .auth-card {
    position: relative;
    z-index: 1;
    animation: authCardIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-card-close {
    position: absolute;
    top: 0.85rem;
    right: 0.95rem;
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: #f1f5f9;
    color: #475569;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, transform 0.15s;
}

.auth-card-close:hover {
    background: #e2e8f0;
    color: #0f172a;
    transform: rotate(90deg);
}

@keyframes authBackdropIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes authCardIn {
    from { opacity: 0; transform: translateY(16px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

body.auth-modal-open {
    overflow: hidden;
}

/* ===================================================================== */
/* ===== Landingpage =================================================== */
/* ===================================================================== */
.landing {
    flex: 1;
    display: flex;
    flex-direction: column;
    font-family: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: #1e293b;
    background:
        radial-gradient(ellipse 70% 55% at 50% -8%, rgba(139, 92, 246, 0.18), transparent 60%),
        radial-gradient(ellipse 55% 45% at 100% 8%, rgba(37, 99, 235, 0.12), transparent 55%),
        #f8fafc;
}

.landing[hidden] {
    display: none !important;
}

.landing-container {
    width: 100%;
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ----- Buttons ----- */
.landing-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.7rem 1.35rem;
    border: 1px solid transparent;
    border-radius: 999px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.landing-btn--primary {
    background: linear-gradient(135deg, #7c3aed, #6366f1);
    color: #ffffff;
    box-shadow: 0 10px 24px rgba(99, 102, 241, 0.32);
}

.landing-btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(99, 102, 241, 0.4);
}

.landing-btn--ghost {
    background: rgba(255, 255, 255, 0.7);
    color: #4338ca;
    border-color: rgba(99, 102, 241, 0.3);
}

.landing-btn--ghost:hover {
    background: #ffffff;
    border-color: rgba(99, 102, 241, 0.55);
    transform: translateY(-2px);
}

.landing-btn--outline {
    background: transparent;
    color: #4338ca;
    border-color: #c7d2fe;
}

.landing-btn--outline:hover {
    background: #eef2ff;
    border-color: #a5b4fc;
}

.landing-btn--lg {
    padding: 0.9rem 1.75rem;
    font-size: 1rem;
}

/* ----- Header ----- */
.landing-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(248, 250, 252, 0.82);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(15, 23, 42, 0.07);
}

.landing-header-inner {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    height: 72px;
}

.landing-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: #0f172a;
    font-weight: 700;
    font-size: 1.12rem;
    margin-right: auto;
}

.landing-logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 12px;
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    font-size: 1.25rem;
    box-shadow: 0 8px 18px rgba(99, 102, 241, 0.3);
}

.landing-logo-img--small {
    width: 2.4rem;
    height: 2.4rem;
    object-fit: contain;
    border-radius: 8px;
    flex-shrink: 0;
}

.landing-hero-large-logo {
    display: block;
    max-width: min(100%, 520px);
    max-height: 400px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.landing-hero-logo-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.landing-hero-logo-wrap[hidden] {
    display: none !important;
}

.landing-hero-visual--logo-only .landing-hero-logo-wrap {
    display: flex;
}

.landing-hero-visual--logo-only {
    min-height: auto;
    padding: 0.5rem 0;
}

.landing-hero-visual--logo-only .landing-hero-large-logo {
    border-radius: 0;
    box-shadow: none;
    background: transparent;
}

.landing-hero-visual-decor {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.landing-hero-visual-decor[hidden] {
    display: none !important;
}

.landing-nav {
    display: flex;
    align-items: center;
    gap: 1.75rem;
}

.landing-nav-link {
    color: #475569;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.15s ease;
}

.landing-nav-link:hover {
    color: #4338ca;
}

.landing-header-actions {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.lang-switcher {
    position: relative;
    display: inline-flex;
}

.lang-switcher-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.35rem;
    height: 2.35rem;
    padding: 0;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #ffffff;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.lang-switcher-trigger:hover,
.lang-switcher-trigger:focus-visible {
    border-color: #c7d2fe;
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.16);
    outline: none;
}

.lang-switcher-flag {
    font-size: 1.15rem;
    line-height: 1;
}

.lang-switcher-menu {
    position: absolute;
    top: calc(100% + 0.45rem);
    right: 0;
    z-index: 1200;
    min-width: 11.5rem;
    padding: 0.35rem;
    margin: 0;
    list-style: none;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
}

.lang-switcher-option {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    padding: 0.55rem 0.7rem;
    border: none;
    border-radius: 8px;
    background: transparent;
    font-family: inherit;
    font-size: 0.92rem;
    color: #1e293b;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.lang-switcher-option:hover:not(.lang-switcher-option--placeholder),
.lang-switcher-option.is-active {
    background: #eef2ff;
    color: #4338ca;
}

.lang-switcher-option--placeholder {
    opacity: 0.45;
    cursor: not-allowed;
}

.lang-switcher-option-flag {
    font-size: 1.1rem;
    line-height: 1;
}

.lang-switcher-option-label {
    font-weight: 500;
}

.lang-switcher--landing .lang-switcher-trigger {
    background: #ffffff;
}

.lang-switcher--app .lang-switcher-trigger {
    background: var(--surface-elevated, #ffffff);
}

.landing-nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    width: 2.6rem;
    height: 2.6rem;
    padding: 0.7rem;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #ffffff;
    cursor: pointer;
    order: 3;
}

.landing-nav-toggle-bar {
    display: block;
    height: 2px;
    width: 100%;
    background: #334155;
    border-radius: 2px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

/* ----- Hero ----- */
.landing-main {
    flex: 1;
}

.landing-hero {
    padding: clamp(3rem, 7vw, 6rem) 0 clamp(2.5rem, 5vw, 4.5rem);
}

.landing-hero-inner {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    align-items: center;
    gap: clamp(2rem, 5vw, 4rem);
}

.landing-eyebrow {
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.78rem;
    font-weight: 700;
    color: #6366f1;
    margin-bottom: 1rem;
}

.landing-hero-title {
    font-family: "Fraunces", Georgia, serif;
    font-size: clamp(2.1rem, 4.6vw, 3.5rem);
    line-height: 1.08;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 1.25rem;
    letter-spacing: -0.01em;
}

.landing-hero-lead {
    font-size: clamp(1rem, 1.5vw, 1.18rem);
    line-height: 1.6;
    color: #475569;
    max-width: 34rem;
    margin-bottom: 2rem;
}

.landing-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
}

.landing-hero-visual {
    position: relative;
    min-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.landing-hero-card {
    border-radius: 24px;
    box-shadow: 0 30px 60px rgba(15, 23, 42, 0.16);
}

.landing-hero-card--back {
    position: absolute;
    inset: 12% 8% 18% 14%;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.9), rgba(37, 99, 235, 0.85));
    transform: rotate(-6deg);
    filter: blur(0.5px);
}

.landing-hero-card--front {
    position: relative;
    width: min(100%, 360px);
    background: #ffffff;
    border: 1px solid #eef2ff;
    padding: 1.25rem;
}

.landing-hero-card-header {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 1.1rem;
}

.landing-hero-dot {
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 50%;
    background: #e2e8f0;
}

.landing-hero-dot:nth-child(1) { background: #fca5a5; }
.landing-hero-dot:nth-child(2) { background: #fcd34d; }
.landing-hero-dot:nth-child(3) { background: #86efac; }

.landing-hero-yarn-row {
    display: flex;
    gap: 0.6rem;
    align-items: flex-end;
    height: 130px;
    margin-bottom: 1.1rem;
}

.landing-hero-yarn {
    flex: 1;
    border-radius: 999px 999px 10px 10px;
    background: linear-gradient(180deg, #c4b5fd, #8b5cf6);
}

.landing-hero-yarn--1 { height: 60%; background: linear-gradient(180deg, #fbcfe8, #ec4899); }
.landing-hero-yarn--2 { height: 90%; background: linear-gradient(180deg, #ddd6fe, #8b5cf6); }
.landing-hero-yarn--3 { height: 70%; background: linear-gradient(180deg, #bfdbfe, #3b82f6); }
.landing-hero-yarn--4 { height: 100%; background: linear-gradient(180deg, #bbf7d0, #22c55e); }
.landing-hero-yarn--5 { height: 50%; background: linear-gradient(180deg, #fde68a, #f59e0b); }

.landing-hero-metric {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: 0.85rem 1rem;
    background: #f8fafc;
    border-radius: 14px;
    font-size: 0.9rem;
    color: #64748b;
}

.landing-hero-metric strong {
    font-family: "Fraunces", Georgia, serif;
    font-size: 1.6rem;
    color: #4338ca;
}

/* ----- Sections ----- */
.landing-section {
    padding: clamp(3rem, 6vw, 5.5rem) 0;
}

.landing-section-head {
    max-width: 42rem;
    margin: 0 auto clamp(2rem, 4vw, 3rem);
    text-align: center;
}

.landing-section-head--left {
    margin-left: 0;
    text-align: left;
}

.landing-section-title {
    font-family: "Fraunces", Georgia, serif;
    font-size: clamp(1.7rem, 3.2vw, 2.5rem);
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 0.85rem;
    letter-spacing: -0.01em;
}

.landing-section-lead {
    font-size: 1.05rem;
    line-height: 1.6;
    color: #64748b;
}

/* ----- Features ----- */
.landing-feature-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
}

.landing-feature-card {
    padding: 1.75rem 1.5rem;
    background: #ffffff;
    border: 1px solid #eef2ff;
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.landing-feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.1);
}

.landing-feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 14px;
    background: #eef2ff;
    font-size: 1.5rem;
    margin-bottom: 1.1rem;
}

.landing-feature-card h3 {
    font-size: 1.12rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.5rem;
}

.landing-feature-card p {
    font-size: 0.94rem;
    line-height: 1.55;
    color: #64748b;
}

/* ----- Pricing ----- */
.landing-pricing {
    background:
        radial-gradient(ellipse 60% 50% at 50% 0%, rgba(99, 102, 241, 0.08), transparent 60%);
}

.landing-pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    align-items: stretch;
}

.landing-price-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 2rem 1.75rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 22px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.landing-price-card--featured {
    border-color: transparent;
    background: linear-gradient(180deg, #ffffff, #fbfbff);
    box-shadow: 0 24px 50px rgba(99, 102, 241, 0.22);
    outline: 2px solid #6366f1;
    transform: translateY(-8px);
}

.landing-price-badge {
    position: absolute;
    top: -0.85rem;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.3rem 0.9rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #7c3aed, #6366f1);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.35);
}

.landing-price-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.3rem;
}

.landing-price-tagline {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 1.25rem;
    min-height: 2.6rem;
}

.landing-price-amount {
    display: flex;
    align-items: baseline;
    gap: 0.2rem;
    font-family: "Fraunces", Georgia, serif;
    margin-bottom: 1.5rem;
    color: #0f172a;
}

.landing-price-value {
    font-size: 3rem;
    font-weight: 600;
    line-height: 1;
}

.landing-price-currency {
    font-size: 1.5rem;
    font-weight: 600;
}

.landing-price-period {
    font-family: "DM Sans", sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    color: #94a3b8;
    margin-left: 0.2rem;
}

.landing-price-amount--custom {
    font-size: 2.1rem;
    font-weight: 600;
}

.landing-price-features {
    list-style: none;
    margin: 0 0 1.75rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    flex: 1;
}

.landing-price-features li {
    position: relative;
    padding-left: 1.6rem;
    font-size: 0.94rem;
    color: #475569;
    line-height: 1.4;
}

.landing-price-features li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    width: 1.1rem;
    height: 1.1rem;
    color: #16a34a;
    font-weight: 700;
}

.landing-price-cta {
    width: 100%;
}

/* ----- FAQ ----- */
.landing-faq-inner {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: clamp(2rem, 5vw, 4rem);
    align-items: start;
}

.landing-faq .landing-section-head {
    margin: 0;
}

.landing-accordion {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.landing-accordion-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    overflow: hidden;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.landing-accordion-item:has(.landing-accordion-trigger[aria-expanded="true"]) {
    border-color: #c7d2fe;
    box-shadow: 0 12px 28px rgba(99, 102, 241, 0.12);
}

.landing-accordion-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.1rem 1.25rem;
    border: none;
    background: none;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    color: #0f172a;
    text-align: left;
    cursor: pointer;
}

.landing-accordion-icon {
    position: relative;
    flex-shrink: 0;
    width: 1.1rem;
    height: 1.1rem;
}

.landing-accordion-icon::before,
.landing-accordion-icon::after {
    content: "";
    position: absolute;
    background: #6366f1;
    border-radius: 2px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.landing-accordion-icon::before {
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    transform: translateY(-50%);
}

.landing-accordion-icon::after {
    left: 50%;
    top: 0;
    width: 2px;
    height: 100%;
    transform: translateX(-50%);
}

.landing-accordion-trigger[aria-expanded="true"] .landing-accordion-icon::after {
    opacity: 0;
    transform: translateX(-50%) scaleY(0);
}

.landing-accordion-panel {
    padding: 0 1.25rem 1.2rem;
}

.landing-accordion-panel[hidden] {
    display: none;
}

.landing-accordion-panel p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #64748b;
}

/* ----- Footer ----- */
.landing-footer {
    background: #0f172a;
    color: #cbd5e1;
    padding-top: clamp(3rem, 5vw, 4.5rem);
    margin-top: auto;
}

.landing-footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 5vw, 4rem);
    padding-bottom: 3rem;
}

.landing-logo--footer {
    color: #ffffff;
    margin-bottom: 1rem;
}

.landing-footer-tagline {
    font-size: 0.96rem;
    line-height: 1.6;
    color: #94a3b8;
    max-width: 26rem;
    margin-bottom: 1.25rem;
}

.landing-footer-legal {
    display: flex;
    gap: 1.5rem;
}

.landing-footer-link {
    color: #cbd5e1;
    text-decoration: none;
    font-size: 0.92rem;
    transition: color 0.15s ease;
}

.landing-footer-link:hover {
    color: #ffffff;
}

.landing-footer-heading {
    font-size: 1.2rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.6rem;
}

.landing-footer-contact-lead {
    font-size: 0.94rem;
    line-height: 1.6;
    color: #94a3b8;
    margin-bottom: 1.4rem;
}

.landing-contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.landing-contact-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.landing-contact-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.landing-contact-field label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #e2e8f0;
}

.landing-contact-field input,
.landing-contact-field textarea {
    width: 100%;
    padding: 0.7rem 0.85rem;
    border: 1px solid #334155;
    border-radius: 10px;
    background: #1e293b;
    color: #f8fafc;
    font-family: inherit;
    font-size: 0.94rem;
    resize: vertical;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.landing-contact-field input::placeholder,
.landing-contact-field textarea::placeholder {
    color: #64748b;
}

.landing-contact-field input:focus,
.landing-contact-field textarea:focus {
    outline: none;
    border-color: #818cf8;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}

.landing-contact-feedback {
    font-size: 0.9rem;
    color: #6ee7b7;
    padding: 0.6rem 0.75rem;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.35);
    border-radius: 8px;
}

.landing-contact-feedback[hidden] {
    display: none;
}

.landing-contact-form .landing-btn {
    align-self: flex-start;
}

.landing-footer-bottom {
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    padding: 1.4rem 0;
}

.landing-copyright {
    font-size: 0.85rem;
    color: #64748b;
    text-align: center;
}

/* ----- Promo-Banner (Countdown) ----- */
.landing-promo-banner {
    position: sticky;
    top: 0;
    z-index: 120;
    color: #ffffff;
    background: #5b21b6;
    box-shadow: 0 8px 24px rgba(91, 33, 182, 0.35);
}

.landing-promo-banner[hidden] {
    display: none !important;
}

.landing-promo-banner-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.65rem 1.5rem;
    flex-wrap: wrap;
}

.landing-promo-text {
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.landing-promo-countdown {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-variant-numeric: tabular-nums;
}

.landing-promo-countdown-segment {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    min-width: 2.6rem;
    padding: 0.2rem 0.45rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.14);
}

.landing-promo-countdown-segment strong {
    font-size: 1rem;
    line-height: 1.1;
}

.landing-promo-countdown-segment small {
    font-size: 0.62rem;
    opacity: 0.85;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.landing-promo-countdown-sep {
    font-weight: 700;
    opacity: 0.75;
    margin-top: -0.35rem;
}

body.has-landing-promo .landing-header {
    top: 0;
}

/* ----- Dynamische CMS-Module ----- */
.landing-dynamic-root:empty {
    display: none;
}

.landing-module-text-inner {
    max-width: 760px;
}

.landing-module-text-body {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #475569;
    margin-top: 0.75rem;
}

.landing-module-media {
    margin: 0;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
    background: #ffffff;
}

.landing-module-media-el {
    display: block;
    width: 100%;
    max-height: 520px;
    object-fit: cover;
}

.landing-module-media figcaption {
    padding: 0.85rem 1.1rem;
    font-size: 0.92rem;
    color: #64748b;
    border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.landing-module-media-placeholder {
    padding: 4rem 1.5rem;
    text-align: center;
    color: #94a3b8;
    background: linear-gradient(135deg, #f8fafc, #eef2ff);
}

.landing-feature-grid--cms {
    grid-template-columns: repeat(3, 1fr);
}

.landing-btn--login + .landing-btn--login {
    margin-left: 0;
}

.landing-header-actions {
    gap: 0.5rem;
}

/* ----- Responsive ----- */
@media (max-width: 960px) {
    .landing-feature-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .landing-pricing-grid {
        grid-template-columns: 1fr;
        max-width: 30rem;
        margin: 0 auto;
    }
    .landing-price-card--featured {
        transform: none;
    }
    .landing-faq-inner {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .landing-promo-banner-inner {
        justify-content: center;
        text-align: center;
    }
    .landing-nav-toggle {
        display: inline-flex;
    }
    .landing-nav {
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0.5rem 1.5rem 1rem;
        background: rgba(248, 250, 252, 0.98);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border-bottom: 1px solid rgba(15, 23, 42, 0.08);
        box-shadow: 0 16px 30px rgba(15, 23, 42, 0.1);
        display: none;
    }
    .landing-nav.is-open {
        display: flex;
    }
    .landing-nav-link {
        padding: 0.85rem 0;
        border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    }
    .landing-header-inner {
        flex-wrap: wrap;
    }
    .landing-hero-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .landing-eyebrow {
        margin-left: auto;
        margin-right: auto;
    }
    .landing-hero-lead {
        margin-left: auto;
        margin-right: auto;
    }
    .landing-hero-actions {
        justify-content: center;
    }
    .landing-hero-visual {
        order: -1;
        min-height: 260px;
    }
    .landing-footer-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .landing-feature-grid {
        grid-template-columns: 1fr;
    }
    .landing-contact-row {
        grid-template-columns: 1fr;
    }
    .landing-logo-text {
        font-size: 1rem;
    }
    .landing-header-actions {
        gap: 0.5rem;
    }
}

.header {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    padding: 1rem 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    flex-shrink: 0;
    overflow: visible;
    position: relative;
    z-index: 100;
}

.header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.user-menu {
    position: relative;
}

.user-menu-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    max-width: min(420px, 52vw);
    padding: 0.45rem 0.85rem;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #f8fafc;
    color: #475569;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.user-menu-trigger:hover,
.user-menu-trigger.is-open {
    background: #ffffff;
    border-color: #cbd5e1;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

.user-menu-trigger--admin {
    color: #6d28d9;
    background: #f5f3ff;
    border-color: #ddd6fe;
}

.user-menu-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-menu-trigger-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
    text-align: left;
}

.user-menu-credits {
    font-size: 0.68rem;
    font-weight: 600;
    color: #0f766e;
    line-height: 1.2;
    white-space: nowrap;
}

.user-menu-credits[hidden] {
    display: none !important;
}

.user-menu-chevron {
    font-size: 0.62rem;
    color: #94a3b8;
    transition: transform 0.15s ease;
    flex-shrink: 0;
}

.user-menu-trigger.is-open .user-menu-chevron {
    transform: rotate(180deg);
}

.user-menu-dropdown {
    position: absolute;
    top: calc(100% + 0.45rem);
    right: 0;
    min-width: 220px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
    padding: 0.4rem;
    z-index: 1000;
}

.user-menu-dropdown[hidden] {
    display: none !important;
}

.user-menu-item {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.62rem 0.75rem;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #334155;
    font-size: 0.86rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.12s, color 0.12s;
}

.user-menu-item:hover:not(:disabled):not(.user-menu-item--disabled) {
    background: #f1f5f9;
    color: #0f172a;
}

.user-menu-item.is-active {
    background: #eff6ff;
    color: #1d4ed8;
}

.user-menu-item[hidden] {
    display: none !important;
}

.user-menu-item--disabled {
    color: #94a3b8;
    cursor: not-allowed;
    font-weight: 500;
}

.user-menu-item--logout {
    color: #64748b;
}

.user-menu-item--logout:hover {
    background: #fef2f2;
    color: #b91c1c;
}

.user-menu-divider {
    height: 1px;
    background: #e2e8f0;
    margin: 0.35rem 0.25rem;
}

.header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #0f172a;
}

.layout {
    display: grid;
    grid-template-columns: 400px minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    grid-template-areas:
        "sidebar tabs"
        "sidebar main";
    flex: 1;
    gap: 1rem;
    padding: 1rem;
    min-height: auto;
    overflow: visible;
    align-items: start;
}

.main-tabs {
    grid-area: tabs;
}

.sidebar {
    grid-area: sidebar;
    width: 400px;
    flex-shrink: 0;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 1.25rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-shrink: 0;
}

.sidebar-head h2,
.sidebar h2 {
    font-size: 1rem;
    font-weight: 600;
    color: #475569;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    flex-shrink: 0;
}

.sidebar-close-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    color: #475569;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
}

.sidebar-close-btn:hover {
    background: #ffffff;
    border-color: #cbd5e1;
}

.sidebar-toggle-btn {
    display: none;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.7rem;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #ffffff;
    color: #334155;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    flex-shrink: 0;
}

.sidebar-toggle-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.sidebar-toggle-icon {
    font-size: 1rem;
    line-height: 1;
}

.mobile-scroll-preview-btn {
    display: none;
}

.sidebar-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    overflow-y: auto;
    min-height: 0;
    padding-right: 0.25rem;
}

.main {
    grid-area: main;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-width: 0;
    min-height: auto;
}

.main-tabs {
    display: flex;
    gap: 0.35rem;
    flex-shrink: 0;
    padding: 0.25rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.main-tab {
    flex: 1;
    padding: 0.65rem 1rem;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #64748b;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.main-tab:hover {
    background: #f8fafc;
    color: #334155;
}

.main-tab.active {
    background: #0f172a;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.18);
}

.main-tab-lock-icon {
    margin-left: 0.35rem;
    font-size: 0.75rem;
    line-height: 1;
}

.main-tab--permission-locked {
    opacity: 0.82;
}

.main-tab-text--short {
    display: none;
}

.main-tab-panel {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
    min-height: auto;
    overflow: visible;
}

.main-tab-panel[hidden] {
    display: none !important;
}

#panel-designer {
    gap: 0.65rem;
    flex: 0 0 auto;
    min-height: auto;
    overflow: visible;
}

.vorschau-studio {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 1.25rem;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    overflow-y: auto;
}

.vorschau-studio-layout {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: center;
    gap: 1.25rem;
    width: 100%;
}

.vorschau-preview-column {
    flex: 1 1 320px;
    max-width: 560px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.ai-prompt-panel {
    flex: 1 1 300px;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.1rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
}

.ai-prompt-heading {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.ai-panel-block {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.ai-panel-block label {
    font-size: 0.72rem;
    font-weight: 600;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.garment-select,
#garmentSelect,
.winding-type-select,
#windingTypeSelect {
    width: 100%;
    padding: 0.6rem 2rem 0.6rem 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #334155;
    background: #f8fafc url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23475569' d='M2 4l4 4 4-4'/%3E%3C/svg%3E") no-repeat right 0.75rem center;
    appearance: none;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.garment-select:hover,
#garmentSelect:hover,
.winding-type-select:hover,
#windingTypeSelect:hover {
    border-color: #94a3b8;
}

.garment-select:focus,
#garmentSelect:focus,
.winding-type-select:focus,
#windingTypeSelect:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

#windingTypeSelect {
    margin-bottom: 0.35rem;
}

.ai-prompt-actions {
    display: flex;
    justify-content: flex-end;
}

.ai-open-actions {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.ai-open-btn {
    width: 100%;
    padding: 0.85rem 1rem;
    border: none;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1.35;
}

.ai-open-btn-gemini {
    background: linear-gradient(135deg, #4285f4 0%, #669df6 100%);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(66, 133, 244, 0.32);
}

.ai-open-btn-gemini:hover:not(.is-success) {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(66, 133, 244, 0.38);
}

.ai-open-btn-gpt {
    background: linear-gradient(135deg, #10a37f 0%, #0d8c6d 100%);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(16, 163, 127, 0.32);
}

.ai-open-btn-gpt:hover:not(.is-success) {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(16, 163, 127, 0.38);
}

.ai-open-btn.is-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
    box-shadow: none;
    transform: none;
}

.ai-secondary-btn {
    padding: 0.55rem 0.85rem;
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.ai-prompt-output {
    width: 100%;
    min-height: 160px;
    padding: 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.82rem;
    line-height: 1.5;
    color: #334155;
    background: #f8fafc;
    resize: vertical;
    font-family: inherit;
}

.ai-secondary-btn:hover {
    background: #e2e8f0;
}

.ai-secondary-btn.is-success {
    background: #dcfce7;
    border-color: #86efac;
    color: #166534;
}

.bobbel-canvas-wrap {
    width: 100%;
    max-width: 560px;
    aspect-ratio: 1 / 1;
    padding: 1rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
}

#bobbelCanvas {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 10px;
    background: transparent;
}

.save-preview-btn {
    padding: 0.8rem 1.25rem;
    background: #0ea5e9;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(14, 165, 233, 0.28);
    transition: all 0.2s ease;
}

.save-preview-btn:hover {
    background: #0284c7;
    transform: translateY(-1px);
}

.preview-area {
    flex: 0 0 auto;
    align-self: flex-start;
    width: 100%;
    max-width: 380px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    overflow: hidden;
    padding: 0.5rem 0.65rem 0.6rem;
}

.preview-canvas-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
    width: 100%;
}

.preview-workspace {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 350px;
    padding: 1.25rem;
    border-radius: 12px;
    background-color: #000000;
    transition: background-color 0.2s ease;
}

.canvas-wrapper {
    position: relative;
    width: 100%;
    max-width: 350px;
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    overflow: hidden;
    background-color: transparent;
    transition: box-shadow 0.2s ease;
}

.canvas-wrapper.is-dragover {
    box-shadow: 0 0 0 3px #8b5cf6, 0 8px 24px rgba(124, 58, 237, 0.35);
}

.inspiration-drop-overlay {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(91, 33, 182, 0.55);
    color: #fff;
    font-size: 0.92rem;
    font-weight: 600;
    text-align: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.canvas-wrapper.is-dragover .inspiration-drop-overlay {
    opacity: 1;
}

.inspiration-drop-overlay-text {
    padding: 0.55rem 0.85rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.35);
}

.input-group--upload.is-dragover {
    border-radius: 8px;
    box-shadow: inset 0 0 0 2px #8b5cf6;
    background: #faf5ff;
}

.image-upload-hint {
    margin: 0.35rem 0 0;
    font-size: 0.78rem;
    color: #64748b;
    line-height: 1.4;
}

#gradientCanvas {
    display: block;
    width: 100%;
    max-width: 350px;
    height: auto;
    aspect-ratio: 1 / 1;
    background: transparent;
}

#gradientCanvas[hidden] {
    display: none !important;
}

.preview-toolbar {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.55rem;
    width: 100%;
    max-width: 350px;
}

.preview-toolbar[hidden] {
    display: none !important;
}

.preview-render-switch {
    display: flex;
    gap: 0.3rem;
    padding: 0.25rem;
    background: var(--brand-surface, #f8fafc);
    border: 1px solid var(--brand-border-soft, #e2e8f0);
    border-radius: 999px;
}

.preview-render-btn {
    flex: 1;
    padding: 0.45rem 0.65rem;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: var(--brand-text-muted, #64748b);
    font-family: var(--brand-font, inherit);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease;
}

.preview-render-btn.is-active {
    background: var(--brand-primary, #1e293b);
    color: #fff;
}

.preview-saturation-control {
    width: 100%;
}

#sidebarRecipeSections[hidden],
#sidebarInspirationAccordion[hidden] {
    display: none !important;
}

.designer-preview-mode-switch {
    max-width: min(68vh, 720px);
}

.preview-image[hidden] {
    display: none !important;
}

#panel-designer #kiStudioPanel {
    width: 100%;
    max-width: min(68vh, 720px);
    margin: 0 auto;
}

#panel-designer #kiStudioPanel .vorschau-studio-layout {
    width: 100%;
}

#kiStudioPanel[hidden] {
    display: none !important;
}

.bg-switch-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    max-width: 350px;
}

.bg-switch-label {
    font-size: 0.68rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    flex-shrink: 0;
}

.bg-switch-options {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.bg-switch-btn {
    width: 18px;
    height: 18px;
    padding: 0;
    border-radius: 50%;
    border: 2px solid rgba(15, 23, 42, 0.18);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
}

.bg-switch-btn:hover {
    transform: scale(1.08);
}

.bg-switch-btn.is-active {
    border-color: #0f172a;
    box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px #0f172a;
}

#bg-switch-black {
    background-color: #000000;
}

#bg-switch-gray {
    background-color: #808080;
}

#bg-switch-white {
    background-color: #ffffff;
}

.preview-image {
    position: absolute;
    inset: 0;
    width: 100%;
    max-width: 350px;
    height: 100%;
    object-fit: contain;
    z-index: 1;
}

.preview-image--picker {
    cursor: crosshair;
}

.advanced-color-picker-controls {
    width: 100%;
    max-width: 350px;
    margin-top: 0.65rem;
    padding: 0.7rem 0.75rem;
    border-radius: 10px;
    border: 1px solid #c4b5fd;
    background: linear-gradient(180deg, #faf5ff, #f5f3ff);
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.advanced-color-picker-controls[hidden] {
    display: none !important;
}

.advanced-color-picker-row {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.advanced-color-picker-row label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #5b21b6;
}

.advanced-color-picker-row select,
.advanced-color-picker-row input[type="range"] {
    width: 100%;
}

.advanced-color-picker-hint {
    margin: 0;
    font-size: 0.78rem;
    color: #6d28d9;
    line-height: 1.4;
}

.color-picker-loupe-marker {
    position: absolute;
    width: 28px;
    height: 28px;
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.45), 0 4px 12px rgba(15, 23, 42, 0.25);
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 3;
}

.color-swatches-wrap {
    flex-shrink: 0;
}

.color-swatches-wrap[hidden] {
    display: none !important;
}

.color-swatches-heading {
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0 0 0.5rem 0.25rem;
}

.color-swatches {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 12px;
    padding: 0.75rem 1rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    min-height: 56px;
    overflow: visible;
    position: relative;
    z-index: 1;
}

.color-swatches:empty {
    display: none;
}

.color-swatch-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px 12px;
    min-width: 88px;
    max-width: 110px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    z-index: 1;
}

.color-swatch-card.is-open {
    z-index: 300;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.color-swatch-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.color-swatch-card .color-swatch {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
    flex-shrink: 0;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.color-swatch-card .color-swatch:hover {
    transform: scale(1.06);
    box-shadow: 0 0 0 2px #8b5cf6, inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.color-swatch-name {
    font-size: 0.72rem;
    font-weight: 600;
    color: #1e293b;
    text-align: center;
    line-height: 1.25;
    word-break: break-word;
    hyphens: auto;
    pointer-events: none;
}

.swatch-alternatives {
    position: absolute;
    top: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 400;
    min-width: 200px;
    max-width: 240px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.16);
    padding: 6px;
}

.swatch-alternatives[hidden] {
    display: none !important;
}

.swatch-alternatives-label {
    font-size: 0.65rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 4px 8px 6px;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 4px;
}

.swatch-alt-option {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 7px 8px;
    border: none;
    border-radius: 7px;
    background: transparent;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s ease;
}

.swatch-alt-option:hover {
    background: #f1f5f9;
}

.swatch-alt-color {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    flex-shrink: 0;
}

.swatch-alt-name {
    font-size: 0.72rem;
    font-weight: 600;
    color: #334155;
    line-height: 1.2;
}

.swatch-alt-empty {
    font-size: 0.72rem;
    color: #94a3b8;
    padding: 6px 8px;
    text-align: center;
}

.apply-colors-btn {
    display: block;
    width: 100%;
    margin-top: 0.65rem;
    padding: 0.75rem;
    background: #059669;
    color: #ffffff;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: bold;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.28);
    transition: all 0.2s ease;
}

.apply-colors-btn[hidden] {
    display: none !important;
}

.apply-colors-btn:hover {
    background: #047857;
    transform: translateY(-1px);
}

.recipe-area {
    flex-shrink: 0;
    flex-grow: 0;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 1.25rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    max-height: none;
    height: auto;
    overflow-y: visible;
    overflow-x: auto;
}

.recipe-header-area {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 0.75rem;
    margin-bottom: 0.75rem;
}

.recipe-area h2,
#recipeTitleHeading {
    font-size: 1rem;
    font-weight: 600;
    color: #0f172a;
}

.recipe-meta {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 0.25rem;
}

.recipe-legend {
    font-size: 0.8rem;
    margin-bottom: 0.75rem;
}

.recipe-table-wrap {
    overflow-x: auto;
    overflow-y: visible;
    border: 1px solid var(--brand-border-soft);
    border-radius: var(--brand-radius-card);
    background: var(--brand-bg);
}

.recipe-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
    min-width: 640px;
    table-layout: fixed;
    background: var(--brand-bg);
}

.recipe-table col.recipe-col-section { width: 4.5rem; }
.recipe-table col.recipe-col-length { width: 4.25rem; }
.recipe-table col.recipe-col-consumption { width: 5.5rem; }
.recipe-table col.recipe-col-schema { width: 4.75rem; }
.recipe-table col.recipe-col-thread { width: 5.25rem; }
.recipe-table col.recipe-col-status { width: 6.75rem; }

.recipe-thread-col,
.recipe-thread-col-group {
    text-align: center;
    white-space: nowrap;
}

.recipe-col-section,
.recipe-col-schema {
    text-align: center !important;
}

.recipe-col-length,
.recipe-col-consumption,
.recipe-section-cones {
    text-align: right !important;
    font-variant-numeric: tabular-nums;
}

.recipe-col-schema {
    font-family: ui-monospace, "Cascadia Code", "Consolas", monospace;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.recipe-section-cones {
    font-size: 0.76rem;
    color: var(--brand-text-muted);
    white-space: nowrap;
    vertical-align: middle;
    padding-right: 0.65rem !important;
}

.recipe-section-cone-line {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.3rem;
    line-height: 1.35;
    font-variant-numeric: tabular-nums;
}

.recipe-section-cone-dot {
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
    flex-shrink: 0;
    border: 1px solid rgba(30, 41, 59, 0.12);
}

.recipe-section-cone-line + .recipe-section-cone-line {
    margin-top: 0.12rem;
}

.recipe-thread-cell {
    text-align: center;
    vertical-align: middle;
    padding: 0.4rem 0.25rem !important;
}

.recipe-thread-cell-dot {
    display: block;
    width: 1.1rem;
    height: 1.1rem;
    margin: 0 auto 0.2rem;
    border-radius: 50%;
    border: 1px solid rgba(30, 41, 59, 0.12);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.recipe-thread-cell-name {
    display: block;
    font-size: 0.62rem;
    line-height: 1.2;
    color: var(--brand-text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 5rem;
    margin: 0 auto;
}

.recipe-thread-cell--changed {
    background: rgba(244, 165, 116, 0.12);
}

.recipe-thread-cell--changed .recipe-thread-cell-dot {
    box-shadow: 0 0 0 2px var(--brand-accent);
}

.recipe-thread-cell--permanent {
    background: var(--brand-secondary-soft);
}

.recipe-thread-cell--empty {
    color: var(--brand-text-subtle);
    font-size: 0.75rem;
}

.recipe-section-status-cell {
    text-align: center;
    vertical-align: middle;
    padding: 0.35rem 0.45rem !important;
}

.recipe-section-status-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin: 0;
    padding: 0.28rem 0.45rem;
    border-radius: 999px;
    border: 1px solid var(--brand-border-soft);
    background: var(--brand-surface);
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
    user-select: none;
}

.recipe-section-status-label:hover {
    border-color: var(--brand-secondary-border);
    background: var(--brand-secondary-soft);
}

.recipe-section-status-label.is-checked {
    border-color: #9fd0b0;
    background: #e8f5ec;
    box-shadow: 0 0 0 1px rgba(29, 107, 58, 0.12);
}

.recipe-section-status-check {
    width: 1.15rem;
    height: 1.15rem;
    margin: 0;
    flex-shrink: 0;
    accent-color: #2f9e5f;
    cursor: pointer;
    border-radius: 4px;
}

.recipe-section-status-text {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--brand-text-muted);
    line-height: 1;
}

.recipe-section-status-label.is-checked .recipe-section-status-text {
    color: #1d6b3a;
}

.recipe-thread-slots-cell {
    padding: 0.45rem 0.5rem !important;
    min-width: 220px;
}

.thread-slots {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: stretch;
}

.thread-slot {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0.2rem;
    flex: 1 1 calc((100% / var(--thread-slot-count, 4)) - 0.4rem);
    min-width: 72px;
    max-width: 120px;
    padding: 0.35rem 0.3rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    text-align: center;
}

.thread-slot--changed {
    border-color: #f59e0b;
    background: #fffbeb;
}

.thread-slot--permanent {
    border-color: #bfdbfe;
    background: #eff6ff;
}

.thread-slot--empty {
    color: #94a3b8;
    font-size: 0.68rem;
    font-weight: 600;
    justify-content: center;
}

.thread-slot-label {
    font-size: 0.62rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.thread-slot-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid rgba(15, 23, 42, 0.12);
}

.thread-slot-name {
    font-size: 0.66rem;
    line-height: 1.25;
    color: #334155;
    word-break: break-word;
}

.recipe-table th,
.recipe-table td {
    padding: 0.42rem 0.5rem;
    text-align: left;
    border-bottom: 1px solid var(--brand-secondary-border);
    vertical-align: middle;
}

.recipe-table th {
    background: var(--brand-secondary-soft);
    color: var(--brand-text-muted);
    font-weight: 700;
    font-size: 0.66rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--brand-secondary-border);
}

.recipe-table tbody tr {
    background: var(--brand-surface);
}

.recipe-table tbody tr:hover:not(.recipe-row--wound-done):not(.recipe-bobbel-group-header):not(.recipe-bobbel-separator-row) {
    background: rgba(197, 212, 227, 0.14);
}

.recipe-table tbody tr:last-child td {
    border-bottom: none;
}

.empty-row {
    text-align: center;
    color: #94a3b8;
    padding: 1.25rem !important;
}

/* Rezept-Datenbank */
.recipe-db-save-box {
    margin: 0 0 1.25rem;
    padding: 1rem 1.1rem;
    background: linear-gradient(180deg, #f0fdf4 0%, #ecfdf5 100%);
    border: 1px dashed #22c55e;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.08);
}

.recipe-db-save-box label {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.45rem;
}

.recipe-db-save-row {
    display: flex;
    gap: 0.65rem;
    align-items: stretch;
    flex-wrap: wrap;
}

.recipe-db-save-row input {
    flex: 1 1 220px;
    min-width: 0;
    padding: 0.65rem 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.9rem;
    background: #ffffff;
}

.recipe-db-save-btn {
    flex: 0 0 auto;
    padding: 0.65rem 1rem;
    background: linear-gradient(135deg, #16a34a 0%, #22c55e 100%);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.28);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.recipe-db-save-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(34, 197, 94, 0.34);
}

.recipe-db-save-btn.is-saving {
    opacity: 0.85;
    cursor: wait;
    transform: none;
}

.recipe-db-save-hint {
    margin: 0.55rem 0 0;
    font-size: 0.72rem;
    color: #64748b;
    line-height: 1.4;
}

.recipe-db-section {
    padding: 0.75rem 0 1.5rem;
    background: var(--brand-bg);
}

.recipe-db-header h2 {
    margin: 0 0 0.25rem;
    font-size: 1.2rem;
    color: var(--brand-primary);
    font-family: var(--brand-font);
}

.recipe-db-meta {
    margin: 0 0 0.25rem;
    color: var(--brand-text-muted);
    font-size: 0.82rem;
}

.recipe-db-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    margin: 0.65rem 0 0.75rem;
    padding: 0.45rem 0.55rem;
    background: var(--brand-surface);
    border: 1px solid var(--brand-border-soft);
    border-radius: var(--brand-radius-card);
    box-shadow: var(--brand-shadow-sm);
}

.recipe-db-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin: 0;
    padding: 0.15rem;
    background: var(--brand-secondary-soft);
    border-radius: 999px;
    border: 1px solid var(--brand-border-soft);
}

.recipe-db-filter {
    padding: 0.38rem 0.75rem;
    border: 1px solid transparent;
    border-radius: 999px;
    background: transparent;
    color: var(--brand-text-muted);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.recipe-db-filter:hover {
    color: var(--brand-primary);
    background: rgba(255, 255, 255, 0.65);
}

.recipe-db-filter.active {
    background: var(--brand-primary);
    border-color: var(--brand-primary);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(30, 41, 59, 0.16);
}

.recipe-db-filter--archive {
    margin-left: 0.15rem;
    color: var(--brand-text-subtle);
    font-weight: 500;
}

.recipe-db-filter--archive:hover {
    color: var(--brand-text-muted);
    background: rgba(255, 255, 255, 0.5);
}

.recipe-db-filter--archive.active {
    background: var(--brand-secondary-soft) !important;
    border-color: var(--brand-secondary-border) !important;
    color: var(--brand-primary) !important;
    box-shadow: inset 0 -2px 0 var(--brand-secondary) !important;
}

.recipe-db-search-wrap {
    flex: 1 1 200px;
    min-width: min(100%, 220px);
    max-width: 320px;
    margin-left: auto;
}

.recipe-db-search {
    width: 100%;
    padding: 0.45rem 0.75rem 0.45rem 2rem;
    border: 1px solid var(--brand-border-soft);
    border-radius: 999px;
    background: var(--brand-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 0.65rem center;
    color: var(--brand-text);
    font-size: 0.82rem;
    font-family: var(--brand-font);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.recipe-db-search::placeholder {
    color: var(--brand-text-subtle);
}

.recipe-db-search:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px var(--brand-focus-ring);
}

.recipe-db-loading {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--brand-primary);
}

.recipe-db-error {
    margin: 0.2rem 0 0;
    font-size: 0.78rem;
    color: #dc2626;
}

/* ===== Rezept-Kategorien (Tags) ===== */
.recipe-db-header-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.recipe-category-manage-btn {
    flex-shrink: 0;
    padding: 0.55rem 1rem;
    border: 1px solid #ddd6fe;
    border-radius: 999px;
    background: linear-gradient(135deg, #7c3aed, #8b5cf6);
    color: #ffffff;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(124, 58, 237, 0.24);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.recipe-category-manage-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(124, 58, 237, 0.32);
}

/* Basis-Badge (farbige Inline-Styles kommen aus JS) */
.recipe-category-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.6rem;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.4;
    white-space: nowrap;
}

.recipe-category-badge--sm {
    font-size: 0.7rem;
    padding: 0.12rem 0.5rem;
}

/* Filter-Leiste über der Liste */
.recipe-category-filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 1rem;
    padding: 0.65rem 0.75rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

.recipe-category-filter-bar[hidden] {
    display: none;
}

.recipe-category-filter-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-right: 0.15rem;
}

.recipe-category-filter-badge {
    padding: 0.3rem 0.75rem;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    opacity: 0.65;
    transition: opacity 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.recipe-category-filter-badge:hover {
    opacity: 0.9;
}

.recipe-category-filter-badge.is-active {
    opacity: 1;
    box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.18);
    transform: translateY(-1px);
}

.recipe-category-filter-clear {
    margin-left: auto;
    padding: 0.3rem 0.7rem;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: #ffffff;
    color: #475569;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
}

.recipe-category-filter-clear:hover {
    background: #eef2ff;
    border-color: #c7d2fe;
    color: #4338ca;
}

/* Kategorie-Badges auf den Rezept-Karten */
.recipe-db-category-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-top: 0.4rem;
}

/* Tag-Zeile auf der Rezept-Karte inkl. Direkt-Bearbeiten */
.recipe-db-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.2rem;
    margin-top: 0.1rem;
}

.recipe-db-tags-empty {
    font-size: 0.72rem;
    color: #b6c0cf;
    font-style: italic;
}

.recipe-db-tag-edit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.4rem;
    height: 1.4rem;
    padding: 0;
    border: 1px dashed #cbd5e1;
    border-radius: 999px;
    background: #ffffff;
    font-size: 0.7rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0.65;
    transition: opacity 0.15s ease, border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.recipe-db-tag-edit-btn:hover {
    opacity: 1;
    border-color: #8b5cf6;
    background: #f5f3ff;
    transform: scale(1.08);
}

/* Schnell-Dropdown zum Taggen (an document.body, fixed positioniert) */
.recipe-tag-menu {
    z-index: 1200;
    min-width: 220px;
    max-width: 280px;
    max-height: 320px;
    overflow-y: auto;
    padding: 0.5rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
    animation: recipeTagMenuIn 0.12s ease-out;
}

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

.recipe-tag-menu-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #94a3b8;
    padding: 0.2rem 0.5rem 0.45rem;
}

.recipe-tag-menu-list {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.recipe-tag-menu-item {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    width: 100%;
    padding: 0.45rem 0.55rem;
    border: none;
    border-radius: 8px;
    background: transparent;
    font-size: 0.85rem;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    text-align: left;
    transition: background 0.12s ease;
}

.recipe-tag-menu-item:hover {
    background: #f1f5f9;
}

.recipe-tag-menu-item.is-selected {
    background: #f5f3ff;
    color: #5b21b6;
}

.recipe-tag-menu-item.is-loading {
    opacity: 0.55;
    cursor: wait;
}

.recipe-tag-menu-dot {
    flex-shrink: 0;
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 999px;
}

.recipe-tag-menu-label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recipe-tag-menu-check {
    flex-shrink: 0;
    width: 1rem;
    text-align: center;
    font-weight: 800;
    color: #7c3aed;
}

/* Mehrfachauswahl im Rezept-Formular */
.recipe-category-select {
    margin-top: 0.75rem;
}

.recipe-category-select-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.45rem;
}

.recipe-category-select-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.recipe-category-select-manage {
    border: none;
    background: none;
    color: #7c3aed;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: underline;
}

.recipe-category-checkbox-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.recipe-category-empty {
    font-size: 0.82rem;
    color: #94a3b8;
    font-style: italic;
}

/* Auswahl-Chip: native Checkbox versteckt, Chip wird zum Toggle */
.recipe-category-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.32rem 0.7rem;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.recipe-category-chip:hover {
    opacity: 0.85;
}

.recipe-category-chip input {
    width: 0;
    height: 0;
    opacity: 0;
    position: absolute;
    pointer-events: none;
}

.recipe-category-chip.is-checked {
    opacity: 1;
    box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.2);
    transform: translateY(-1px);
}

.recipe-category-chip.is-checked::before {
    content: "✓";
    font-weight: 800;
}

.category-manage-empty {
    list-style: none;
    font-size: 0.85rem;
    color: #94a3b8;
    font-style: italic;
    padding: 0.5rem 0;
}

.recipe-db-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--brand-border-soft);
    border-radius: var(--brand-radius-card);
    background: var(--brand-surface);
    box-shadow: var(--brand-shadow-sm);
}

.recipe-db-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 640px;
}

.recipe-db-table th,
.recipe-db-table td {
    padding: 0.35rem 0.55rem;
    border-bottom: 1px solid var(--brand-border-soft);
    text-align: left;
    vertical-align: middle;
}

.recipe-db-table th {
    background: var(--brand-bg);
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--brand-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.recipe-db-th-expand {
    width: 2rem;
    padding-left: 0.4rem !important;
    padding-right: 0.15rem !important;
}

.recipe-db-th-actions {
    width: 5.5rem;
    text-align: right;
}

.recipe-db-row {
    cursor: pointer;
    transition: background 0.12s ease;
}

.recipe-db-table tbody tr.recipe-db-row:hover {
    background: rgba(197, 212, 227, 0.18);
}

.recipe-db-row--expanded {
    background: rgba(197, 212, 227, 0.12);
}

.recipe-db-table tbody tr.recipe-db-detail-row:hover {
    background: transparent;
}

.recipe-db-table tbody tr:last-child td,
.recipe-db-detail-row:last-child td {
    border-bottom: none;
}

.recipe-db-expand-cell {
    width: 2rem;
    padding-right: 0.15rem !important;
}

.recipe-db-expand-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    padding: 0;
    border: 1px solid var(--brand-border-soft);
    border-radius: 6px;
    background: var(--brand-bg);
    color: var(--brand-text-muted);
    font-size: 0.65rem;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.15s ease, color 0.15s ease;
}

.recipe-db-expand-btn::before {
    content: "▸";
    display: block;
    transition: transform 0.2s ease;
}

.recipe-db-row--expanded .recipe-db-expand-btn::before {
    transform: rotate(90deg);
}

.recipe-db-expand-btn:hover {
    border-color: var(--brand-secondary-border);
    color: var(--brand-primary);
}

.recipe-db-detail-row[hidden] {
    display: none;
}

.recipe-db-detail-cell {
    padding: 0 !important;
    background: linear-gradient(180deg, rgba(250, 247, 242, 0.9) 0%, var(--brand-surface) 100%);
    border-bottom: 1px solid var(--brand-border-soft) !important;
}

.recipe-db-detail-panel {
    padding: 0.55rem 0.65rem 0.65rem 2.15rem;
    animation: recipeDbDetailIn 0.18s ease-out;
}

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

.recipe-db-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 0.85fr);
    gap: 0.65rem;
    align-items: start;
}

.recipe-db-detail-col--actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.recipe-db-detail-col--actions .recipe-db-action-btn--load {
    width: 100%;
}

.recipe-db-status-compact {
    white-space: nowrap;
}

.recipe-db-status-badges {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.2rem;
}

.recipe-db-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.12rem 0.42rem;
    border-radius: 999px;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    border: 1px solid transparent;
}

.recipe-db-status-badge--done {
    background: #e8f5ec;
    color: #1d6b3a;
    border-color: #b8dfc8;
}

.recipe-db-status-badge--todo {
    background: var(--brand-secondary-soft);
    color: var(--brand-text-muted);
    border-color: var(--brand-border-soft);
}

.recipe-db-name-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    min-width: 0;
}

.recipe-db-badge-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.15rem;
}

.recipe-db-image-thumb--inline .recipe-db-image-thumb {
    width: 28px;
    height: 28px;
}

.recipe-db-image-thumb--inline {
    flex-shrink: 0;
}

.recipe-db-empty {
    text-align: center;
    color: #94a3b8;
    padding: 2rem 1rem !important;
}

.recipe-db-empty--loading {
    color: #6366f1;
    font-weight: 600;
}

.recipe-db-image {
    min-width: 0;
}

.recipe-db-image-wrap {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.55rem;
}

.recipe-db-image-preview-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.recipe-db-image-preview-link {
    display: inline-flex;
    flex-shrink: 0;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.recipe-db-image-preview-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.16);
}

.recipe-db-image-thumb {
    display: block;
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 50%;
    background: #f1f5f9;
}

.recipe-db-image-thumb.is-broken {
    opacity: 0.35;
}

.recipe-db-folder-btn {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0.42rem 0.6rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    color: #475569;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.recipe-db-folder-btn:hover {
    border-color: #6366f1;
    color: #4338ca;
    background: #eef2ff;
}

.recipe-db-dropzone {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 64px;
    padding: 0.65rem 0.75rem;
    border: 2px dashed #cbd5e1;
    border-radius: 10px;
    background: linear-gradient(180deg, #fafbfd 0%, #f1f5f9 100%);
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.recipe-db-dropzone:hover {
    border-color: #94a3b8;
    background: linear-gradient(180deg, #f8fafc 0%, #e8eef5 100%);
}

.recipe-db-dropzone.is-dragover {
    border-color: #6366f1;
    background: linear-gradient(180deg, #eef2ff 0%, #e0e7ff 100%);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
    transform: translateY(-1px);
}

.recipe-db-dropzone.is-uploading {
    pointer-events: none;
    opacity: 0.7;
    border-color: #a5b4fc;
    background: #eef2ff;
}

.recipe-db-dropzone-text {
    font-size: 0.72rem;
    font-weight: 600;
    color: #64748b;
    text-align: center;
    line-height: 1.35;
}

.recipe-db-dropzone.is-uploading .recipe-db-dropzone-text::after {
    content: " (wird hochgeladen…)";
    color: #6366f1;
}

.recipe-media-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
}

.recipe-media-modal[hidden] {
    display: none;
}

.recipe-media-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(3px);
}

.recipe-media-modal-panel {
    position: relative;
    z-index: 1;
    width: min(920px, 100%);
    max-height: min(82vh, 760px);
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.22);
    overflow: hidden;
}

.recipe-media-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e2e8f0;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.recipe-media-modal-header h3 {
    margin: 0;
    font-size: 1rem;
    color: #0f172a;
}

.recipe-media-modal-close {
    width: 2rem;
    height: 2rem;
    border: none;
    border-radius: 8px;
    background: #f1f5f9;
    color: #475569;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.recipe-media-modal-close:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.recipe-media-modal-body {
    padding: 1.25rem;
    overflow-y: auto;
}

.recipe-media-modal-loading,
.recipe-media-modal-empty,
.recipe-media-modal-error {
    margin: 0;
    text-align: center;
    color: #64748b;
    padding: 2rem 1rem;
}

.recipe-media-modal-loading {
    color: #6366f1;
    font-weight: 600;
}

.recipe-media-modal-error {
    color: #dc2626;
}

.recipe-media-modal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.85rem;
}

.recipe-media-modal-card {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    padding: 0.55rem;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.recipe-media-modal-card:hover {
    transform: translateY(-2px);
    border-color: #c7d2fe;
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.14);
}

.recipe-media-modal-card img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 8px;
    background: #e2e8f0;
}

.recipe-media-modal-card-name {
    font-size: 0.72rem;
    font-weight: 600;
    color: #475569;
    word-break: break-all;
}

body.recipe-media-modal-open {
    overflow: hidden;
}

.recipe-db-name {
    font-weight: 600;
    color: var(--brand-primary);
    min-width: 140px;
}

.recipe-db-name-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
}

.recipe-db-name-text {
    line-height: 1.25;
    font-size: 0.84rem;
}

.recipe-db-meliert-badge {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    gap: 0.25rem;
    padding: 0.18rem 0.55rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #6d28d9;
    background: linear-gradient(135deg, #ede9fe 0%, #f5f3ff 100%);
    border: 1px solid #ddd6fe;
    border-radius: 999px;
    white-space: nowrap;
}

.recipe-db-bestseller-badge {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    padding: 0.18rem 0.55rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #92400e;
    background: #fef3c7;
    border: 1px solid #fde68a;
    border-radius: 999px;
    white-space: nowrap;
}

.recipe-db-material-warning {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.22rem 0.5rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.2;
    cursor: help;
    white-space: nowrap;
}

.recipe-db-material-warning--caution {
    background: #fefce8;
    color: #a16207;
    border: 1px solid #fde68a;
}

.recipe-db-material-warning--critical {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.recipe-db-row--material-warning {
    background: linear-gradient(90deg, rgba(254, 243, 199, 0.22) 0%, rgba(255, 255, 255, 0) 42%);
}

.recipe-db-swatches {
    min-width: 100px;
}

.recipe-db-swatch {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1px solid rgba(30, 41, 59, 0.1);
    margin: 1px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.recipe-db-status {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.recipe-db-status-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    color: var(--brand-text-muted);
    margin-bottom: 0;
    cursor: pointer;
}

.recipe-db-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.3rem;
    min-width: 0;
    white-space: nowrap;
}

.recipe-db-action-btn {
    padding: 0.28rem 0.5rem;
    border-radius: 6px;
    border: 1px solid var(--brand-border-soft);
    font-size: 0.68rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.recipe-db-action-btn--load {
    background: var(--brand-primary);
    color: #fff;
    border-color: var(--brand-primary);
}

.recipe-db-action-btn--load:hover {
    background: var(--brand-primary-hover);
}

.recipe-db-action-btn--delete {
    background: transparent;
    color: #b4534b;
    border-color: #f0d4d2;
}

.recipe-db-action-btn--delete:hover {
    background: #fdf0ef;
    border-color: #e8b4b0;
}

.recipe-db-action-btn--archive {
    background: var(--brand-secondary-soft);
    color: var(--brand-primary);
    border-color: var(--brand-secondary-border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    width: 100%;
}

.recipe-db-action-btn--archive:hover {
    background: var(--brand-secondary);
    border-color: var(--brand-secondary-border);
}

.recipe-db-action-btn--reactivate {
    background: #e8f5ec;
    color: #1d6b3a;
    border-color: #b8dfc8;
}

.recipe-db-action-btn--reactivate:hover {
    background: #d4eedc;
    border-color: #9fd0b0;
}

.recipe-db-action-icon {
    font-size: 0.85em;
    line-height: 1;
}

.recipe-db-status-badge--archived {
    background: var(--brand-secondary-soft);
    color: var(--brand-text-muted);
    border-color: var(--brand-secondary-border);
}

.recipe-db-row--archived {
    opacity: 0.92;
}

.recipe-db-row--archived .recipe-db-name-text {
    color: var(--brand-text-muted);
}

/* Form */
.input-group {
    background: #f8fafc;
    padding: 0.85rem;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.input-group--glitz {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.input-group label,
.section-label {
    display: block;
    font-weight: 600;
    font-size: 0.7rem;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.25rem;
}

.input-group label + select,
.input-group label + input,
.input-group select,
.input-group input[type="number"] {
    margin-bottom: 0.6rem;
}

.input-group label:last-of-type,
.input-group input:last-child,
.input-group select:last-child {
    margin-bottom: 0;
}

.length-cone-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.75rem 1rem;
    margin-top: 0.25rem;
}

.length-cone-field {
    flex: 1 1 9rem;
    min-width: 0;
}

.length-cone-field label {
    margin-bottom: 0.25rem;
}

.length-cone-field input {
    width: 100%;
    margin-bottom: 0;
}

.calculated-total-weight {
    flex: 1 1 10rem;
    padding: 0.55rem 0.75rem;
    background: linear-gradient(135deg, #faf5ff, #ffffff);
    border: 1px solid #e9d5ff;
    border-radius: 8px;
}

.calculated-total-weight-label {
    display: block;
    font-size: 0.65rem;
    font-weight: 600;
    color: #7c3aed;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.15rem;
}

.calculated-total-weight-value {
    font-size: 1.15rem;
    font-weight: 800;
    color: #0f172a;
    font-variant-numeric: tabular-nums;
}

/* ===== Materialkosten-Details (Designer) ===== */
.material-cost-accordion {
    margin-top: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #ffffff;
    overflow: hidden;
}

.material-cost-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.65rem 0.85rem;
    border: none;
    background: linear-gradient(135deg, #f8fafc, #ffffff);
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 700;
    color: #0f172a;
    text-align: left;
}

.material-cost-toggle:hover {
    background: #f1f5f9;
}

.material-cost-toggle-icon {
    flex: 0 0 auto;
    width: 0.55rem;
    height: 0.55rem;
    border-right: 2px solid #64748b;
    border-bottom: 2px solid #64748b;
    transform: rotate(45deg);
    transition: transform 0.2s ease;
}

.material-cost-toggle.is-open .material-cost-toggle-icon {
    transform: rotate(-135deg);
}

.material-cost-panel {
    padding: 0.5rem 0.85rem 0.75rem;
    border-top: 1px solid #e2e8f0;
}

.material-cost-empty {
    margin: 0.35rem 0;
    font-size: 0.78rem;
    color: #94a3b8;
}

.material-cost-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.4rem 0;
    border-bottom: 1px dashed #e2e8f0;
    font-size: 0.8rem;
}

.material-cost-row:last-child {
    border-bottom: none;
}

.material-cost-row-name {
    color: #334155;
}

.material-cost-row-price {
    flex: 0 0 auto;
    font-weight: 600;
    color: #0f172a;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.material-cost-row-price--missing {
    font-weight: 500;
    font-style: italic;
    color: #cbd5e1;
}

.material-cost-summary {
    margin-top: 0.6rem;
    padding-top: 0.6rem;
    border-top: 2px solid #cbd5e1;
}

.material-cost-summary-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    font-variant-numeric: tabular-nums;
}

.material-cost-summary-row--net {
    font-size: 0.92rem;
    color: #0f172a;
}

.material-cost-summary-row--net strong {
    font-size: 1rem;
    font-weight: 800;
}

.material-cost-summary-row--gross {
    margin-top: 0.15rem;
    font-size: 0.8rem;
    color: #64748b;
}

.material-cost-summary-row--gross strong {
    font-weight: 600;
}

.material-cost-summary-hint {
    margin: 0.5rem 0 0;
    font-size: 0.72rem;
    color: #94a3b8;
    line-height: 1.35;
}

.textile-fiber-composition {
    margin-top: 0.75rem;
    padding-top: 0.65rem;
    border-top: 1px solid rgba(148, 163, 184, 0.25);
}

.textile-fiber-composition__label {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 0.25rem;
}

.textile-fiber-composition__value {
    margin: 0;
    font-size: 0.78rem;
    line-height: 1.45;
    color: #1e293b;
}

.produktion-config-item--full {
    grid-column: 1 / -1;
}

.produktion-config-value--wrap {
    white-space: normal;
    line-height: 1.4;
}

/* ===== Einheiten-Umschalter (Metrisch / Imperial) ===== */
.unit-toggle-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.unit-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.3rem;
    padding: 0.25rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 9px;
}

.unit-switch-btn {
    padding: 0.45rem 0.5rem;
    border: 1px solid transparent;
    border-radius: 7px;
    background: transparent;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s, box-shadow 0.15s, border-color 0.15s;
}

.unit-switch-btn:hover:not(.is-active) {
    background: #f5f3ff;
    color: #7c3aed;
}

.unit-switch-btn.is-active {
    background: linear-gradient(135deg, #7c3aed, #8b5cf6);
    color: #ffffff;
    border-color: #7c3aed;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.28);
}

.unit-switch-btn:focus-visible {
    outline: 2px solid #8b5cf6;
    outline-offset: 2px;
}

.checkbox-label {
    text-transform: none !important;
    font-size: 0.85rem !important;
    color: #166534 !important;
    display: flex !important;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
}

select,
input[type="number"],
input[type="text"] {
    width: 100%;
    padding: 0.55rem 0.65rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.85rem;
    background: #fff;
    font-weight: 500;
}

.freestyle-config {
    margin-top: 0.5rem;
    background: #fffbeb;
    padding: 0.65rem;
    border-radius: 6px;
    border: 1px solid #fef3c7;
}

.freestyle-config label {
    color: #b45309 !important;
}

/* Tabs & Palette */
.available-only-toggle-wrap {
    margin: 0.15rem 0 0.75rem;
    padding: 0.7rem 0.75rem;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}

.available-only-toggle {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    cursor: pointer;
    user-select: none;
}

.available-only-toggle input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.available-only-toggle-track {
    position: relative;
    flex-shrink: 0;
    width: 42px;
    height: 24px;
    border-radius: 999px;
    background: #cbd5e1;
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

.available-only-toggle-track::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.18);
    transition: transform 0.2s ease;
}

.available-only-toggle input:checked + .available-only-toggle-track {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.available-only-toggle input:checked + .available-only-toggle-track::after {
    transform: translateX(18px);
}

.available-only-toggle input:focus-visible + .available-only-toggle-track {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
}

.available-only-toggle-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #334155;
    line-height: 1.35;
}

.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.tab-btn {
    background: #e2e8f0;
    border: none;
    padding: 5px 10px;
    font-size: 0.65rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    color: #475569;
    transition: all 0.15s;
}

.tab-btn.active {
    background: #0f172a;
    color: white;
}

.palette-container {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    padding: 0.6rem;
    background: #f8fafc;
    border-radius: 8px;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.palette-container--transitioning,
.palette-tabs--transitioning {
    opacity: 0.72;
    transform: translateY(2px);
}

.tabs.palette-tabs--transitioning {
    transition: opacity 0.18s ease;
}

.palette-move-hint {
    margin: -0.15rem 0 0.45rem;
    font-size: 0.68rem;
    color: #64748b;
    line-height: 1.35;
}

.palette-toolbar {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.55rem;
}

.palette-sort-bar {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    width: 100%;
}

.palette-toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.palette-sort-bar label {
    font-size: 0.68rem;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.palette-sort-select {
    width: 100%;
    padding: 0.42rem 0.55rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    font-size: 0.78rem;
    color: #0f172a;
}

.palette-manage-btn {
    flex: 1;
    min-width: 0;
    padding: 0.42rem 0.55rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
    color: #334155;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.palette-manage-btn:hover {
    background: #eff6ff;
    border-color: #93c5fd;
}

.palette-manage-btn--scheme {
    background: #fdf2f8;
    border-color: #f9a8d4;
    color: #9d174d;
}

.palette-manage-btn--scheme:hover {
    background: #fce7f3;
    border-color: #f472b6;
}

.palette-empty-hint {
    margin: 0;
    padding: 0.75rem 0.35rem;
    font-size: 0.74rem;
    color: #64748b;
    line-height: 1.45;
    text-align: center;
}

.tab-content {
    display: none;
    grid-template-columns: repeat(auto-fill, minmax(36px, 1fr));
    gap: 6px;
}

.tab-content.active {
    display: grid;
}

.swatch-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
}

.swatch-wrapper--unavailable .swatch-del {
    opacity: 0.35;
    pointer-events: none;
}

.swatch {
    width: 100%;
    height: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.swatch--unavailable {
    opacity: 0.28;
    filter: grayscale(0.85);
    cursor: not-allowed;
    border-color: #94a3b8;
}

/* Meliert: Farblimit (= Fädigkeit) erreicht -> restliche Farben ausgrauen */
.palette-locked .swatch {
    opacity: 0.4;
    filter: grayscale(0.7);
    cursor: not-allowed;
}

.palette-locked .swatch:hover {
    transform: none;
    border-color: #cbd5e1;
    box-shadow: none;
}

.palette-locked .swatch--unavailable {
    opacity: 0.2;
}

.swatch--unavailable:hover {
    transform: none;
    border-color: #94a3b8;
    box-shadow: none;
}

.swatch-unavailable-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.72rem;
    line-height: 1;
    z-index: 4;
    pointer-events: none;
    filter: drop-shadow(0 1px 1px rgba(255, 255, 255, 0.9));
}

.swatch:hover {
    transform: scale(1.1);
    border-color: #0f172a;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
    z-index: 2;
}

.swatch-del {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 14px;
    height: 14px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    font-size: 9px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 1px solid white;
    z-index: 3;
    opacity: 0;
    transition: opacity 0.15s;
}

.swatch-wrapper:hover .swatch-del {
    opacity: 1;
}

.swatch-move-btn {
    position: absolute;
    top: -4px;
    left: -4px;
    width: 14px;
    height: 14px;
    padding: 0;
    background: #0f172a;
    color: white;
    border: 1px solid white;
    border-radius: 50%;
    font-size: 8px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 3;
    opacity: 0;
    transition: opacity 0.15s;
}

.swatch-wrapper:hover .swatch-move-btn {
    opacity: 1;
}

.swatch-move-btn:hover {
    background: #1e40af;
}

.palette-move-menu {
    position: absolute;
    z-index: 1200;
    min-width: 180px;
    max-width: 260px;
    max-height: 240px;
    overflow-y: auto;
    background: white;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18);
    padding: 0.35rem 0;
}

.palette-move-menu__title {
    padding: 0.35rem 0.75rem 0.25rem;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 0.2rem;
}

.palette-move-menu__item {
    display: block;
    width: 100%;
    padding: 0.45rem 0.75rem;
    border: none;
    background: transparent;
    text-align: left;
    font-size: 0.78rem;
    color: #0f172a;
    cursor: pointer;
    transition: background 0.12s;
}

.palette-move-menu__item:hover,
.palette-move-menu__item:focus-visible {
    background: #eff6ff;
    outline: none;
}

.palette-move-menu__item--tags {
    font-weight: 600;
    color: #1d4ed8;
}

.palette-move-menu__divider {
    height: 1px;
    margin: 0.25rem 0;
    background: #e2e8f0;
}

/* Glitz */
.glitz-current {
    font-size: 0.75rem;
    font-weight: bold;
    color: #166534;
    margin-bottom: 0.4rem;
}

.glitz-palette-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(32px, 1fr));
    gap: 6px;
    background: white;
    padding: 8px;
    border-radius: 6px;
    border: 1px solid #bbf7d0;
}

.glitz-swatch {
    aspect-ratio: 1;
    border-radius: 4px;
    border: 1px solid #cbd5e1;
    cursor: pointer;
    transition: all 0.15s;
    position: relative;
}

.glitz-swatch:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.glitz-swatch.is-active {
    border: 2px solid #166534;
    box-shadow: 0 0 0 2px #bbf7d0;
}

.glitz-swatch.is-active::after {
    content: "✨";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
}

/* Tags */
.selected-colors {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 6px;
    min-height: 48px;
    padding: 0.6rem;
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    background: #fff;
}

.selected-empty {
    color: #94a3b8;
    font-size: 0.85rem;
}

.designer-macro-toolbar {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 0.75rem 0;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
}

.winding-types-group {
    background: linear-gradient(165deg, #f8fafc 0%, #f1f5f9 100%);
    border-color: #e2e8f0;
    border-radius: 16px;
    padding: 0.95rem;
}

.winding-mode-picker {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin-bottom: 0.75rem;
}

.winding-mode-picker__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.winding-mode-picker__label {
    margin: 0;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #64748b;
}

.winding-mode-picker__add-btn {
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #334155;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.2;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    white-space: nowrap;
}

.winding-mode-picker__add-btn:hover {
    background: #fff7ed;
    border-color: #fdba74;
    color: #9a3412;
}

.winding-mode-picker__row {
    display: flex;
    align-items: stretch;
    gap: 0.45rem;
}

.winding-mode-picker__select {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    padding: 0.62rem 0.8rem;
    border: 1px solid #dbe3ee;
    border-radius: 12px;
    background: #fdfefe;
    color: #0f172a;
    font-size: 0.86rem;
    font-weight: 500;
    line-height: 1.35;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.winding-mode-picker__select:hover {
    border-color: #c7d2e0;
    background: #ffffff;
}

.winding-mode-picker__select:focus {
    outline: none;
    border-color: #c4b5fd;
    box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.18);
    background: #ffffff;
}

.winding-mode-picker__select optgroup {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #94a3b8;
    background: #f8fafc;
}

.winding-mode-picker__select option {
    font-size: 0.84rem;
    font-weight: 500;
    color: #0f172a;
    padding: 0.35rem 0.15rem;
}

.winding-mode-picker__delete {
    flex: 0 0 auto;
    align-self: stretch;
    width: 2.35rem;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
    cursor: pointer;
    font-size: 0.95rem;
    line-height: 1;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.winding-mode-picker__delete:hover {
    background: #fff1f2;
    border-color: #fecdd3;
}

.winding-mode-picker__hint {
    margin: 0;
    padding: 0.45rem 0.65rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid #e8edf3;
    font-size: 0.78rem;
    line-height: 1.45;
    color: #64748b;
}

.winding-pattern-editor-meta,
.winding-pattern-dimensions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.winding-pattern-field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.winding-pattern-field label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #475569;
}

.winding-pattern-field input {
    padding: 0.45rem 0.55rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
}

.winding-pattern-macros {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    align-items: center;
}

.winding-pattern-loop-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
}

.winding-pattern-loop-controls label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #475569;
}

.winding-pattern-loop-count {
    width: 3.5rem;
    padding: 0.4rem 0.45rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    text-align: center;
}

.sleeve-bobbel-controls {
    margin: 0;
    padding: 0.7rem 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.55);
}

.sleeve-bobbel-toggle {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
    color: #0f172a;
}

.sleeve-bobbel-config {
    display: grid;
    gap: 0.65rem;
    margin-top: 0.65rem;
}

.sleeve-bobbel-field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.sleeve-bobbel-field label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #475569;
}

.sleeve-bobbel-field select,
.sleeve-bobbel-field input {
    padding: 0.45rem 0.55rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.85rem;
}

.production-quantity-badge {
    margin: 0.35rem 0 0;
    padding: 0.45rem 0.65rem;
    border-radius: 8px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e3a8a;
    font-size: 0.85rem;
}

.production-quantity-badge strong {
    font-size: 1rem;
}

.uni-bobbel-controls {
    margin-top: 0.65rem;
}

.uni-main-color-select {
    width: 100%;
    margin-top: 0.25rem;
    padding: 0.45rem 0.55rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.9rem;
    background: #fff;
}

.uni-recipe-summary {
    margin: 0.75rem 0 1rem;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    border: 2px solid #7c3aed;
    background: linear-gradient(135deg, #faf5ff, #f5f3ff);
    color: #4c1d95;
}

.uni-recipe-summary[hidden] {
    display: none !important;
}

.uni-recipe-summary-title {
    display: block;
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.uni-recipe-summary-swatch {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-weight: 600;
}

.uni-recipe-summary-swatch span {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.12);
}

.uni-recipe-summary-metrics {
    margin-top: 0.35rem;
    font-size: 0.88rem;
    color: #5b21b6;
}

.shopify-line-badge--uni {
    background: #f5f3ff;
    border-color: #c4b5fd;
    color: #5b21b6;
}

.shopify-uni-color-missing {
    color: #b45309;
    font-weight: 600;
}

.production-winding-banner {
    margin: 0.5rem 0 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.production-winding-banner[hidden] {
    display: none !important;
}

.production-winding-info {
    padding: 0.5rem 0.7rem;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #334155;
    font-size: 0.84rem;
    line-height: 1.45;
}

.production-winding-alert {
    padding: 0.65rem 0.8rem;
    border-radius: 8px;
    font-size: 0.9rem;
    line-height: 1.45;
    border-width: 2px;
    border-style: solid;
}

.production-winding-alert--reverse {
    background: #fef2f2;
    border-color: #f87171;
    color: #991b1b;
}

.production-winding-alert--reverse strong {
    display: block;
    font-size: 1rem;
    margin-bottom: 0.15rem;
}

.production-winding-start-swatch {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.2rem;
    font-weight: 600;
}

.production-winding-start-swatch span {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.12);
    flex-shrink: 0;
}

.shopify-production-flags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin: 0.35rem 0 0.5rem;
}

.shopify-production-flag {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.18rem 0.5rem;
    border-radius: 999px;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #475569;
}

.shopify-production-flag--reverse {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #b91c1c;
}

.shopify-batch-production-alert {
    margin: 0 0 0.75rem;
}

.shopify-batch-plan-list {
    list-style: none;
    margin: 0 0 1rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.shopify-batch-plan-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.55rem;
    align-items: center;
    padding: 0.5rem 0.65rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    font-size: 0.84rem;
}

.shopify-batch-plan-step {
    font-weight: 700;
    color: #64748b;
    min-width: 2rem;
}

.shopify-batch-plan-color {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
    color: #1e293b;
}

.shopify-batch-plan-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.12);
    flex-shrink: 0;
}

.shopify-batch-plan-metrics {
    text-align: right;
    color: #475569;
    white-space: nowrap;
}

.shopify-line-production-hint {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.75rem;
    color: #b45309;
    font-weight: 600;
}

.winding-pattern-matrix-wrap {
    overflow-x: auto;
    margin-bottom: 0.85rem;
}

.winding-pattern-matrix {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.winding-pattern-matrix th,
.winding-pattern-matrix td {
    border: 1px solid #e2e8f0;
    padding: 0.35rem;
    text-align: center;
}

.winding-pattern-matrix th {
    background: #f8fafc;
    font-size: 0.72rem;
    color: #64748b;
}

.winding-pattern-cell-input {
    width: 2.2rem;
    text-align: center;
    text-transform: uppercase;
    font-weight: 700;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 0.25rem;
}

.winding-pattern-editor-actions {
    display: flex;
    justify-content: flex-end;
}

.designer-macro-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.designer-macro-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.7rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    color: #0f172a;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
}

.designer-macro-btn:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
}

.designer-macro-btn--secondary {
    background: #eef2ff;
    border-color: #c7d2fe;
    color: #312e81;
}

.designer-macro-btn--locked {
    opacity: 0.78;
}

.designer-macro-lock {
    font-size: 0.72rem;
    line-height: 1;
}

.winding-schema-box {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.winding-schema-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #475569;
}

.winding-schema-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: center;
}

.winding-schema-select {
    flex: 1 1 10rem;
    min-width: 8rem;
    padding: 0.45rem 0.55rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.82rem;
    background: #fff;
}

.winding-schema-select.is-permission-locked {
    opacity: 0.75;
}

.recipe-db-action-btn--delete:hover {
    background: #fef2f2;
    border-color: #fecaca;
    color: #b91c1c;
}

/* Garn-Lager */
.inventory-section {
    padding: 1rem 0 2rem;
}

.inventory-header h2 {
    margin: 0 0 0.35rem;
    font-size: 1.35rem;
    color: #0f172a;
}

.inventory-meta {
    margin: 0 0 0.35rem;
    color: #64748b;
    font-size: 0.9rem;
}

.inventory-loading {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 600;
    color: #6366f1;
}

.inventory-error {
    margin: 0.2rem 0 0;
    font-size: 0.78rem;
    color: #dc2626;
}

.inventory-palette-hint {
    margin: 0.35rem 0 0;
    font-size: 0.78rem;
    font-weight: 600;
    color: #0f766e;
}

.inventory-table tbody tr.inventory-row--flash-existing {
    animation: inventory-row-flash 1.2s ease;
}

.inventory-table tbody tr.inventory-row--flash-new {
    background: #ecfdf5;
    box-shadow: inset 0 0 0 1px #a7f3d0;
}

@keyframes inventory-row-flash {
    0%, 100% {
        background: transparent;
    }
    35%, 70% {
        background: #fef9c3;
    }
}

.inventory-form {
    margin: 0.85rem 0 1rem;
    padding: 1rem 1.1rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
}

.inventory-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.inventory-form-field--full {
    grid-column: 1 / -1;
}

.inventory-form-field label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.inventory-form-field input {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.88rem;
    background: #f8fafc;
}

/* ===== Garn-Eigenschaften (Hersteller, Lauflänge, Gewicht, Leerkone) ===== */
.inventory-yarn-block {
    border: 1px solid #e9d5ff;
    background: linear-gradient(135deg, #faf5ff, #ffffff);
    border-radius: 10px;
    padding: 0.85rem 0.9rem;
}

.inventory-yarn-block-title {
    display: block;
    margin-bottom: 0.65rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: #7c3aed;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.inventory-yarn-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.7rem;
}

.inventory-yarn-grid input,
.inventory-yarn-grid select {
    width: 100%;
    padding: 0.55rem 0.7rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.88rem;
    background: #ffffff;
}

.inventory-yarn-grid input:focus,
.inventory-yarn-grid select:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.18);
}

/* ===== Einkaufs-Preise (Garn-Lager) ===== */
.inventory-price-block {
    margin-top: 0.85rem;
    border-color: #bbf7d0;
    background: linear-gradient(135deg, #f0fdf4, #ffffff);
}

.inventory-price-block .inventory-yarn-block-title {
    color: #15803d;
}

.inventory-price-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.7rem;
}

.inventory-price-grid input,
.inventory-price-grid select {
    width: 100%;
    padding: 0.55rem 0.7rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.88rem;
    background: #ffffff;
}

.inventory-price-grid input:focus,
.inventory-price-grid select:focus {
    outline: none;
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);
}

.inventory-add-btn {
    padding: 0.65rem 1rem;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #0f766e 0%, #14b8a6 100%);
    color: #ffffff;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(20, 184, 166, 0.28);
}

.inventory-add-btn:hover {
    transform: translateY(-1px);
}

.inventory-scheme-dropzone {
    margin-bottom: 0.85rem;
    padding: 0.75rem 0.85rem;
    border: 1px dashed #f9a8d4;
    border-radius: 12px;
    background: linear-gradient(135deg, #fffafb 0%, #fdf2f8 100%);
}

.inventory-scheme-dropzone[hidden] {
    display: none !important;
}

.inventory-scheme-dropzone-label {
    margin: 0 0 0.55rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: #9d174d;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.inventory-scheme-drop-targets {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.inventory-scheme-drop-target {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
    min-width: 108px;
    padding: 0.45rem 0.65rem;
    border: 1px solid #f9a8d4;
    border-radius: 10px;
    background: #fff;
    color: #831843;
    cursor: copy;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.inventory-scheme-drop-target__label {
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.inventory-scheme-drop-target__hint {
    font-size: 0.62rem;
    color: #be185d;
    opacity: 0.75;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.inventory-scheme-drop-target--dragover {
    border-color: #db2777;
    background: linear-gradient(135deg, #fdf2f8 0%, #fce7f3 100%);
    box-shadow: 0 0 0 3px rgba(219, 39, 119, 0.18), 0 8px 20px rgba(219, 39, 119, 0.16);
    transform: translateY(-2px) scale(1.03);
    animation: inventory-scheme-drop-pulse 0.9s ease-in-out infinite;
}

@keyframes inventory-scheme-drop-pulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(219, 39, 119, 0.18), 0 8px 20px rgba(219, 39, 119, 0.16); }
    50% { box-shadow: 0 0 0 5px rgba(219, 39, 119, 0.28), 0 10px 24px rgba(219, 39, 119, 0.22); }
}

.inventory-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.55rem;
    margin-bottom: 0.75rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
}

.inventory-filter-field {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    flex: 1;
    min-width: 160px;
}

.inventory-filter-field label {
    font-size: 0.68rem;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.inventory-filter-select {
    width: 100%;
    padding: 0.45rem 0.55rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    font-size: 0.8rem;
    color: #0f172a;
}

.inventory-reset-filters-btn {
    flex-shrink: 0;
    padding: 0.45rem 0.7rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    color: #475569;
    font-size: 0.74rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.12s ease, border-color 0.12s ease;
}

.inventory-reset-filters-btn:hover {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1d4ed8;
}

.inventory-filter-field--hidden-toggle {
    min-width: auto;
    flex: 0 1 auto;
}

.inventory-hidden-filter-label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
    padding: 0.45rem 0.55rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    font-size: 0.78rem;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    user-select: none;
}

.inventory-hidden-filter-label input {
    margin: 0;
}

.storage-filter-toggle-wrap {
    margin: 0.35rem 0 0.55rem;
}

.storage-filter-toggle .available-only-toggle-label {
    font-size: 0.78rem;
}

.inventory-row--hidden {
    opacity: 0.72;
    background: #f8fafc;
}

.inventory-visibility-btn {
    padding: 0.28rem 0.45rem;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
    background: #fff;
    color: #475569;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.inventory-visibility-btn:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
    color: #0f172a;
}

.swatch-wrapper--hidden-test {
    outline: 2px dashed #94a3b8;
    outline-offset: 2px;
    border-radius: 8px;
}

.swatch-hidden-test-badge {
    position: absolute;
    top: 2px;
    left: 2px;
    font-size: 10px;
    line-height: 1;
    pointer-events: none;
    filter: drop-shadow(0 1px 1px rgba(255, 255, 255, 0.85));
}

.inventory-preview-cell {
    width: 52px;
    padding-right: 0.35rem !important;
}

.inventory-preview-swatch {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px #cbd5e1, 0 3px 8px rgba(15, 23, 42, 0.12);
    overflow: hidden;
    flex-shrink: 0;
    cursor: grab;
}

.inventory-preview-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

.inventory-row--draggable {
    cursor: grab;
}

.inventory-row--dragging {
    opacity: 0.55;
    cursor: grabbing;
}

.inventory-table-wrap {
    overflow-x: auto;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
}

.inventory-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px;
}

.inventory-table th,
.inventory-table td {
    padding: 0.8rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
    vertical-align: middle;
}

.inventory-table th {
    background: #f8fafc;
    font-size: 0.72rem;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.inventory-empty {
    text-align: center;
    color: #94a3b8;
    padding: 2rem 1rem !important;
}

.inventory-empty--loading {
    color: #6366f1;
    font-weight: 600;
}

.inventory-cone-cell {
    min-width: 16rem;
}

.inventory-stock-mount {
    margin-top: 0.25rem;
}

.inventory-stock-ui {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.inventory-stock-ui--compact .inventory-cone-stock-label {
    font-size: 0.74rem;
}

.inventory-cone-stock-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #0f172a;
    font-variant-numeric: tabular-nums;
    cursor: help;
}

.inventory-cone-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
}

.cone-pie-row {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.3rem;
    min-height: 2.2rem;
}

.cone-row-btn {
    width: 1.55rem;
    height: 1.55rem;
    border: 1px solid #e2e8f0;
    border-radius: 50%;
    background: #ffffff;
    color: #334155;
    font-size: 0.95rem;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.cone-row-btn:hover:not(:disabled) {
    background: #ecfdf5;
    border-color: #86efac;
    color: #166534;
}

.cone-row-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.cone-pie-item {
    border: none;
    background: transparent;
    padding: 0.1rem;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.cone-pie-item:hover,
.cone-pie-item:focus-visible {
    transform: translateY(-1px) scale(1.06);
    outline: none;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.25);
}

.cone-pie-ring--small {
    width: 1.85rem;
    height: 1.85rem;
    display: block;
    border-radius: 50%;
    background: conic-gradient(
        from -90deg,
        var(--cone-pie-fill) 0deg var(--cone-pie-fill-deg),
        rgba(226, 232, 240, 0.55) var(--cone-pie-fill-deg) 360deg
    );
    box-shadow:
        inset 0 0 0 1px rgba(15, 23, 42, 0.08),
        0 1px 4px rgba(15, 23, 42, 0.08);
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.cone-pie-item:hover .cone-pie-ring--small,
.cone-pie-item:focus-visible .cone-pie-ring--small {
    box-shadow:
        inset 0 0 0 1px rgba(15, 23, 42, 0.14),
        0 3px 8px rgba(15, 23, 42, 0.14);
}

.cone-pie-ghost {
    width: 1.85rem;
    height: 1.85rem;
    border-radius: 50%;
    border: 1px dashed #cbd5e1;
    background: rgba(248, 250, 252, 0.8);
    opacity: 0.65;
}

.inventory-row--reorder-alert {
    background: linear-gradient(90deg, rgba(254, 243, 199, 0.55), rgba(255, 255, 255, 0));
}

.inventory-row--reorder-alert .inventory-cone-stock-label {
    color: #9a3412;
}

.inventory-reorder-badge {
    display: inline-flex;
    margin-top: 0.35rem;
    padding: 0.18rem 0.45rem;
    border-radius: 999px;
    background: #fff7ed;
    border: 1px solid #fdba74;
    color: #9a3412;
    font-size: 0.64rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.inventory-reorder-hint {
    margin-top: 0.35rem;
    padding: 0.45rem 0.65rem;
    border-radius: 8px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
    font-size: 0.78rem;
    font-weight: 600;
}

.empty-cone-btn {
    padding: 0.35rem 0.55rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    color: #475569;
    font-size: 0.72rem;
    cursor: pointer;
    white-space: nowrap;
}

.empty-cone-btn:hover:not(:disabled) {
    background: #fff7ed;
    border-color: #fdba74;
    color: #9a3412;
}

.empty-cone-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.inventory-availability-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.recipe-db-winding-tools {
    margin-top: 0.65rem;
    padding-top: 0.65rem;
    border-top: 1px dashed #e2e8f0;
}

.recipe-db-winding-label {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.4rem;
}

.recipe-db-winding-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.inventory-delete-btn {
    padding: 0.42rem 0.65rem;
    border: 1px solid #fecaca;
    border-radius: 8px;
    background: #fff1f2;
    color: #b91c1c;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
}

.inventory-delete-btn:hover {
    background: #ffe4e6;
}

.inventory-name-text {
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 0.25rem;
}

.inventory-sku {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.9em;
    white-space: nowrap;
}

.inventory-sku--empty {
    color: #94a3b8;
}

.inventory-tag-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.collection-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.14rem 0.45rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #fdf2f8 0%, #fce7f3 55%, #fae8ff 100%);
    border: 1px solid rgba(190, 24, 93, 0.18);
    color: #9d174d;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.inventory-action-cell {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.inventory-edit-btn {
    padding: 0.42rem 0.65rem;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
}

.inventory-edit-btn:hover {
    background: #dbeafe;
}

.studio-modal {
    position: fixed;
    inset: 0;
    z-index: 1300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.studio-modal[hidden] {
    display: none !important;
}

.studio-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
}

.studio-modal-panel {
    position: relative;
    width: min(100%, 560px);
    max-height: calc(100vh - 2rem);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.22);
}

.studio-modal-panel--compact {
    width: min(100%, 460px);
}

.studio-modal-panel--wide {
    width: min(100%, 720px);
}

.studio-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.studio-modal-header h3 {
    margin: 0;
    font-size: 1rem;
    color: #0f172a;
}

.studio-modal-close {
    width: 2rem;
    height: 2rem;
    border: none;
    border-radius: 8px;
    background: #f1f5f9;
    color: #475569;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
}

.studio-modal-close:hover {
    background: #e2e8f0;
}

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

.studio-modal-hint {
    margin: 0 0 0.85rem;
    font-size: 0.78rem;
    color: #64748b;
    line-height: 1.45;
}

.category-manage-list {
    list-style: none;
    margin: 0 0 0.85rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.category-manage-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) auto;
    gap: 0.35rem 0.55rem;
    align-items: center;
    padding: 0.55rem 0.65rem;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
}

.category-manage-markers {
    grid-column: 1 / span 2;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 0.75rem;
    align-items: center;
    font-size: 0.72rem;
}

.category-manage-marker {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    white-space: nowrap;
}

.category-manage-material-select {
    min-width: 140px;
    padding: 0.3rem 0.45rem;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    font-size: 0.72rem;
}

.category-manage-name-input {
    width: 100%;
    padding: 0.42rem 0.55rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.82rem;
}

.category-manage-meta {
    grid-column: 1 / span 2;
    font-size: 0.68rem;
    color: #64748b;
}

.category-manage-actions {
    grid-column: 3;
    grid-row: 1 / span 3;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.category-manage-save-btn,
.category-manage-delete-btn,
.category-manage-add-btn {
    padding: 0.38rem 0.55rem;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    background: #fff;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
}

.category-manage-save-btn {
    border-color: #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
}

.category-manage-delete-btn {
    border-color: #fecaca;
    background: #fff1f2;
    color: #b91c1c;
}

.category-manage-delete-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.category-manage-add {
    display: flex;
    gap: 0.45rem;
}

.category-manage-add input {
    flex: 1;
    padding: 0.45rem 0.55rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.82rem;
}

.category-manage-add-btn {
    border-color: #86efac;
    background: #ecfdf5;
    color: #166534;
}

.inventory-edit-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.inventory-edit-field label {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.inventory-edit-field input {
    width: 100%;
    padding: 0.45rem 0.55rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.85rem;
}

.inventory-edit-tags-hint {
    margin: 0.3rem 0 0;
    font-size: 0.72rem;
    color: #64748b;
}

.inventory-edit-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.45rem;
    margin-top: 0.25rem;
}

.inventory-edit-cancel-btn,
.inventory-edit-save-btn {
    padding: 0.45rem 0.8rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
}

.inventory-edit-cancel-btn {
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #475569;
}

.inventory-edit-save-btn {
    border: 1px solid #1d4ed8;
    background: #1d4ed8;
    color: #fff;
}

body.studio-modal-open {
    overflow: hidden;
}

.scheme-checkbox-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    padding: 0.55rem;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
    max-height: 180px;
    overflow-y: auto;
}

.scheme-checkbox-empty {
    margin: 0;
    width: 100%;
    font-size: 0.74rem;
    color: #64748b;
    line-height: 1.45;
}

.scheme-checkbox-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.32rem 0.55rem;
    border-radius: 999px;
    border: 1px solid rgba(190, 24, 93, 0.18);
    background: linear-gradient(135deg, #fff 0%, #fdf2f8 100%);
    color: #831843;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
    user-select: none;
}

.scheme-checkbox-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(15, 23, 42, 0.08);
}

.scheme-checkbox-item input {
    accent-color: #db2777;
    margin: 0;
}

.scheme-checkbox-item:has(input:checked) {
    border-color: #db2777;
    background: linear-gradient(135deg, #fdf2f8 0%, #fce7f3 55%, #fae8ff 100%);
    box-shadow: 0 2px 6px rgba(219, 39, 119, 0.12);
}

.scheme-checkbox-label {
    letter-spacing: 0.03em;
}

.scheme-manage-list {
    list-style: none;
    margin: 0 0 0.85rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.scheme-manage-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.35rem 0.55rem;
    align-items: center;
    padding: 0.55rem 0.65rem;
    border: 1px solid #fbcfe8;
    border-radius: 10px;
    background: #fffafb;
}

.scheme-manage-name-input {
    width: 100%;
    padding: 0.42rem 0.55rem;
    border: 1px solid #f9a8d4;
    border-radius: 8px;
    font-size: 0.82rem;
}

.scheme-manage-meta {
    grid-column: 1;
    font-size: 0.68rem;
    color: #9d174d;
}

.scheme-manage-actions {
    grid-column: 2;
    grid-row: 1 / span 2;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.scheme-manage-save-btn,
.scheme-manage-delete-btn,
.scheme-manage-add-btn {
    padding: 0.38rem 0.55rem;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    background: #fff;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
}

.scheme-manage-save-btn {
    border-color: #f9a8d4;
    background: #fdf2f8;
    color: #9d174d;
}

.scheme-manage-delete-btn {
    border-color: #fecaca;
    background: #fff1f2;
    color: #b91c1c;
}

.scheme-manage-add {
    display: flex;
    gap: 0.45rem;
}

.scheme-manage-add input {
    flex: 1;
    padding: 0.45rem 0.55rem;
    border: 1px solid #f9a8d4;
    border-radius: 8px;
    font-size: 0.82rem;
}

.scheme-manage-add-btn {
    border-color: #f9a8d4;
    background: #fdf2f8;
    color: #9d174d;
}

/* Lieferanten-Verwaltung (Garn-Lager) */
.inventory-header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.35rem 0 0.5rem;
}

.inventory-manage-btn {
    padding: 0.42rem 0.72rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    color: #0f172a;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
}

.inventory-manage-btn:hover {
    background: #f8fafc;
    border-color: #94a3b8;
}

.inventory-suppliers-section {
    margin-bottom: 1.25rem;
    padding: 1rem 1.1rem;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}

.inventory-suppliers-section--highlight {
    animation: inventory-suppliers-highlight 1.4s ease;
}

/* --- Reste-Rampe & Farbleichen-Matching --- */
.rest-matching-section {
    margin: 1.25rem 0;
    padding: 1.1rem 1.15rem;
    border: 1px solid #e9d5ff;
    border-radius: 14px;
    background: linear-gradient(180deg, #faf5ff 0%, #ffffff 55%);
    box-shadow: 0 4px 18px rgba(109, 40, 217, 0.06);
}

.rest-matching-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem 1rem;
    margin-bottom: 0.85rem;
}

.rest-matching-head h3 {
    margin: 0 0 0.3rem;
    font-size: 1.05rem;
    color: #5b21b6;
}

.rest-matching-intro {
    margin: 0;
    max-width: 42rem;
    font-size: 0.86rem;
    line-height: 1.5;
    color: #64748b;
}

.rest-matching-scan-btn,
.rest-matching-generate-btn,
.rest-matching-shopify-btn,
.rest-matching-designer-btn {
    border-radius: 10px;
    font-size: 0.86rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.rest-matching-scan-btn {
    padding: 0.5rem 0.85rem;
    border: 1px solid #ddd6fe;
    background: #fff;
    color: #6d28d9;
}

.rest-matching-scan-btn:hover {
    background: #f5f3ff;
    border-color: #c4b5fd;
}

.rest-matching-status {
    margin: 0 0 0.75rem;
    padding: 0.55rem 0.75rem;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    background: #f5f3ff;
    border: 1px solid #ddd6fe;
    color: #5b21b6;
}

.rest-matching-status.is-error {
    background: #fef2f2;
    border-color: #fecaca;
    color: #b91c1c;
}

.rest-matching-scanner-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.85rem;
    margin-bottom: 0.9rem;
}

.rest-matching-scanner-card {
    padding: 0.8rem 0.9rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #fff;
}

.rest-matching-scanner-card h4 {
    margin: 0 0 0.55rem;
    font-size: 0.88rem;
    color: #334155;
}

.rest-matching-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    max-height: 11rem;
    overflow-y: auto;
}

.rest-matching-list li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    color: #334155;
}

.rest-matching-swatch {
    width: 1rem;
    height: 1rem;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    flex-shrink: 0;
}

.rest-matching-meta {
    margin-left: auto;
    font-size: 0.76rem;
    color: #64748b;
    white-space: nowrap;
}

.rest-matching-empty {
    color: #94a3b8;
    font-style: italic;
}

.rest-matching-actions {
    margin-bottom: 0.85rem;
}

.rest-matching-generate-btn {
    padding: 0.62rem 1.1rem;
    border: none;
    background: linear-gradient(135deg, #6d28d9, #7c3aed);
    color: #fff;
    box-shadow: 0 4px 14px rgba(109, 40, 217, 0.25);
}

.rest-matching-generate-btn:hover:not(:disabled) {
    transform: translateY(-1px);
}

.rest-matching-generate-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.rest-matching-proposal {
    padding: 0.95rem 1rem;
    border-radius: 12px;
    border: 1px dashed #c4b5fd;
    background: #fff;
}

.rest-matching-proposal-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    margin-bottom: 0.75rem;
}

.rest-matching-proposal-head h4 {
    margin: 0;
    font-size: 0.98rem;
    color: #0f172a;
}

.rest-matching-proposal-badge {
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    background: #fef3c7;
    color: #92400e;
}

.rest-matching-proposal-body {
    font-size: 0.84rem;
    line-height: 1.55;
    color: #334155;
}

.rest-matching-proposal-colors {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 0.75rem;
}

.rest-matching-proposal-color {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    font-size: 0.8rem;
}

.rest-matching-section-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.5rem 0 0.75rem;
    font-size: 0.8rem;
}

.rest-matching-section-table th,
.rest-matching-section-table td {
    padding: 0.35rem 0.5rem;
    border-bottom: 1px solid #f1f5f9;
    text-align: left;
}

.rest-matching-section-table th {
    color: #64748b;
    font-weight: 600;
}

.rest-matching-proposal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 0.85rem;
}

.rest-matching-shopify-btn {
    padding: 0.58rem 1rem;
    border: none;
    background: linear-gradient(135deg, #047857, #059669);
    color: #fff;
}

.rest-matching-shopify-btn:hover:not(:disabled) {
    filter: brightness(1.05);
}

.rest-matching-shopify-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.rest-matching-designer-btn {
    padding: 0.58rem 1rem;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #334155;
}

.rest-matching-designer-btn:hover {
    background: #f8fafc;
}

.rest-matching-shopify-status {
    margin: 0.65rem 0 0;
    font-size: 0.82rem;
    font-weight: 600;
    color: #047857;
}

.rest-matching-shopify-status.is-error {
    color: #b91c1c;
}

@keyframes inventory-suppliers-highlight {
    0% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.35);
    }
    100% {
        box-shadow: 0 0 0 10px rgba(59, 130, 246, 0);
    }
}

.inventory-suppliers-head h3 {
    margin: 0 0 0.35rem;
    font-size: 1.05rem;
    color: #0f172a;
}

.supplier-manage-empty {
    list-style: none;
    margin: 0;
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px dashed #cbd5e1;
    background: #f8fafc;
    color: #64748b;
    font-size: 0.84rem;
    text-align: center;
}

.supplier-manage-intro {
    margin: 0 0 0.85rem;
    color: #64748b;
    font-size: 0.82rem;
    line-height: 1.45;
}

.supplier-manage-list {
    list-style: none;
    margin: 0 0 0.85rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    max-height: 280px;
    overflow-y: auto;
}

.supplier-manage-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    padding: 0.55rem 0.65rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
}

.supplier-manage-name {
    font-size: 0.86rem;
    font-weight: 600;
    color: #0f172a;
}

.supplier-manage-meta {
    font-size: 0.75rem;
    color: #64748b;
    margin-left: auto;
}

.supplier-manage-delete-btn {
    padding: 0.32rem 0.55rem;
    border: 1px solid #fecaca;
    border-radius: 6px;
    background: #fff1f2;
    color: #b91c1c;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    flex-shrink: 0;
}

.supplier-manage-delete-btn:hover {
    background: #ffe4e6;
}

.supplier-manage-add {
    display: flex;
    gap: 0.45rem;
}

.supplier-manage-add input {
    flex: 1;
    min-width: 0;
    padding: 0.48rem 0.62rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.84rem;
}

.supplier-manage-add-btn {
    flex-shrink: 0;
    padding: 0.48rem 0.72rem;
    border: 1px solid #86efac;
    border-radius: 8px;
    background: #ecfdf5;
    color: #166534;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
}

.supplier-manage-add-btn:hover {
    background: #d1fae5;
}

.yarn-profile-manage-intro {
    margin: 0 0 1rem;
    color: #475569;
    font-size: 0.86rem;
    line-height: 1.45;
}

.yarn-profile-manage-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    max-height: min(52vh, 420px);
    overflow-y: auto;
}

.yarn-profile-manage-item {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
}

.yarn-profile-manage-fields {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 0.8fr)) auto;
    gap: 0.5rem;
    align-items: center;
}

.yarn-profile-manage-input {
    width: 100%;
    padding: 0.5rem 0.6rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.84rem;
    background: #fff;
}

.yarn-profile-manage-meta {
    margin: 0;
    font-size: 0.76rem;
    color: #64748b;
}

.yarn-profile-manage-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.yarn-profile-manage-save-btn,
.yarn-profile-manage-delete-btn {
    padding: 0.38rem 0.7rem;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
}

.yarn-profile-manage-save-btn {
    background: #059669;
    color: #fff;
}

.yarn-profile-manage-save-btn:hover {
    background: #047857;
}

.yarn-profile-manage-delete-btn {
    background: #fff;
    color: #b91c1c;
    border-color: #fecaca;
}

.yarn-profile-manage-delete-btn:hover {
    background: #fef2f2;
}

.yarn-profile-manage-add {
    padding-top: 0.85rem;
    border-top: 1px solid #e2e8f0;
}

.yarn-profile-manage-add-title {
    margin: 0 0 0.65rem;
    font-size: 0.88rem;
    color: #0f172a;
}

.yarn-profile-manage-add-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 0.8fr)) auto auto;
    gap: 0.5rem;
    align-items: center;
}

.yarn-profile-default-check {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    color: #334155;
    white-space: nowrap;
}

.yarn-profile-default-check--inline {
    justify-self: start;
}

.yarn-profile-manage-add-btn {
    padding: 0.5rem 0.85rem;
    border: none;
    border-radius: 8px;
    background: #0f766e;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.yarn-profile-manage-add-btn:hover {
    background: #0d9488;
}

.yarn-profile-manage-empty {
    margin: 0;
    padding: 0.65rem;
    color: #64748b;
    font-size: 0.82rem;
    text-align: center;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
}

@media (max-width: 720px) {
    .yarn-profile-manage-fields,
    .yarn-profile-manage-add-grid {
        grid-template-columns: 1fr;
    }

    .yarn-profile-manage-actions {
        width: 100%;
    }

    .yarn-profile-manage-save-btn,
    .yarn-profile-manage-delete-btn,
    .yarn-profile-manage-add-btn {
        width: 100%;
    }
}

.inventory-availability-panel {
    margin-bottom: 0.75rem;
    padding: 0.75rem 0.85rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}

.inventory-availability-panel[hidden] {
    display: none !important;
}

.inventory-availability-heading {
    margin: 0 0 0.5rem;
    font-size: 0.78rem;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.inventory-availability-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.inventory-availability-item {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.55rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    font-size: 0.74rem;
}

.inventory-availability-name {
    font-weight: 600;
    color: #0f172a;
}

.inventory-availability-meta {
    color: #64748b;
}

.inventory-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.18rem 0.45rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.inventory-status-badge--ok {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.inventory-status-badge--low {
    background: #fefce8;
    color: #a16207;
    border: 1px solid #fde68a;
}

.inventory-status-badge--missing {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.inventory-row-status {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    min-width: 120px;
}

.inventory-tag-badge {
    margin-left: 0.25rem;
    font-size: 0.62rem;
}

.tag {
    position: relative;
    display: inline-flex;
    align-items: center;
    background: #f1f5f9;
    color: #334155;
    padding: 14px 10px 6px 8px;
    margin: 0;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid #e2e8f0;
    gap: 5px;
    cursor: grab;
    user-select: none;
    transition: opacity 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.tag.is-dragging {
    opacity: 0.55;
    cursor: grabbing;
    transform: scale(0.98);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
}

.tag.drag-over {
    outline: 2px dashed #8b5cf6;
    outline-offset: 2px;
    background: #f5f3ff;
}

.tag.is-permanent {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #bfdbfe;
    box-shadow: 0 0 0 1px #1d4ed8;
}

.tag-delete {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 16px;
    height: 16px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    cursor: pointer;
    transition: opacity 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.tag:hover .tag-delete {
    opacity: 1;
}

.tag-delete:hover {
    background: #ef4444;
    color: #ffffff;
    transform: scale(1.08);
}

.tag-name {
    cursor: pointer;
}

.tag-remove {
    cursor: pointer;
    color: #ef4444;
    padding: 0 4px;
    font-weight: bold;
}

.tag-perm-btn {
    cursor: pointer;
    font-size: 0.65rem;
    background: #e2e8f0;
    padding: 2px 5px;
    border-radius: 4px;
    border: 1px solid #cbd5e1;
    color: #475569;
}

.tag.is-permanent .tag-perm-btn {
    background: #1d4ed8;
    color: white;
    border-color: #1d4ed8;
}

.color-picker-input {
    width: 20px;
    height: 20px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    cursor: pointer;
    padding: 0;
    background: none;
}

/* Recipe helpers */
.print-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.2);
    margin-right: 4px;
    vertical-align: middle;
}

.glitz-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    transform: rotate(45deg);
    margin-right: 4px;
    vertical-align: middle;
    border: 1px solid rgba(0, 0, 0, 0.3);
}

.changed-thread {
    color: #ef4444;
    font-weight: bold;
    text-decoration: underline;
    background: #fef2f2;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px dashed #fca5a5;
    display: inline-flex;
    align-items: center;
}

.normal-thread {
    color: #334155;
    padding: 2px 4px;
    display: inline-flex;
    align-items: center;
}

/* Boxes & Buttons */
.add-color-box,
.save-recipe-box {
    background: #f0f9ff;
    border: 1px dashed #0ea5e9;
    padding: 0.85rem;
    border-radius: 8px;
}

.add-color-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.35rem;
}

.sm-btn-group {
    display: flex;
    gap: 3px;
}

.add-color-row {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 0.4rem;
}

.add-color-row input[type="color"] {
    width: 40px;
    height: 35px;
    padding: 0;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    cursor: pointer;
}

.gen-btn {
    padding: 0.85rem;
    background: #0ea5e9;
    color: white;
    border: none;
    cursor: pointer;
    width: 100%;
    font-size: 0.95rem;
    font-weight: bold;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
    transition: all 0.2s;
}

.gen-btn:hover {
    background: #0284c7;
    transform: translateY(-1px);
}

.analyze-controls {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.color-count-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.65rem 0.75rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.color-count-row label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
    margin: 0;
    text-transform: none;
    letter-spacing: 0;
    white-space: nowrap;
}

#colorCount {
    width: 4.5rem;
    padding: 0.45rem 0.5rem;
    margin: 0;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    background: #ffffff;
}

.analyze-btn {
    padding: 0.75rem;
    background: #8b5cf6;
    color: white;
    border: none;
    cursor: pointer;
    width: 100%;
    font-size: 0.9rem;
    font-weight: bold;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
    transition: all 0.2s;
}

.analyze-btn:hover {
    background: #7c3aed;
    transform: translateY(-1px);
}

.remove-img-btn {
    display: none;
    margin-top: 0.5rem;
    padding: 0.65rem;
    background: #ef4444;
    color: white;
    border: none;
    cursor: pointer;
    width: 100%;
    font-size: 0.85rem;
    font-weight: bold;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
    transition: all 0.2s;
}

.remove-img-btn:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

.db-actions {
    display: flex;
    gap: 8px;
}

.export-btn,
.import-btn,
.add-btn {
    flex: 1;
    padding: 0.65rem;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: bold;
    border-radius: 8px;
    transition: all 0.2s;
}

.export-btn {
    background: #10b981;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.export-btn:hover {
    background: #059669;
}

.import-btn {
    background: #64748b;
    box-shadow: 0 4px 12px rgba(100, 116, 139, 0.2);
}

.import-btn:hover {
    background: #475569;
}

.add-btn {
    background: #0ea5e9;
    margin-top: 0.4rem;
}

.add-btn:hover {
    background: #0284c7;
}

.print-btn {
    background: #10b981;
    color: white;
    border: none;
    padding: 0.45rem 0.85rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    flex-shrink: 0;
}

.print-btn:hover {
    background: #059669;
}

.sm-btn {
    padding: 4px 8px;
    font-size: 0.65rem;
    border-radius: 4px;
    border: 1px solid #cbd5e1;
    background: #f1f5f9;
    cursor: pointer;
    font-weight: 600;
}

.sm-btn--danger {
    color: #ef4444;
}

.del-recipe-btn {
    background: none;
    border: none;
    color: #ef4444;
    font-weight: bold;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 0 5px;
}

/* Catalog */
.catalog-section {
    border-top: 1px solid #e2e8f0;
    padding-top: 0.75rem;
}

.catalog-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
    margin-top: 0.5rem;
}

.catalog-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.65rem 0.75rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
}

.catalog-item:hover {
    background: #f0f9ff;
    border-color: #0ea5e9;
}

.catalog-meta {
    font-size: 0.65rem;
    color: #64748b;
    margin-top: 2px;
}

.workflow-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    padding: 4px 6px;
    border-radius: 6px;
}

.workflow-checks label {
    font-size: 0.65rem;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    text-transform: none;
    font-weight: 600;
}

@media print {
    @page {
        size: A5 landscape;
        margin: 3mm 4mm;
    }

    *,
    *::before,
    *::after {
        box-shadow: none !important;
        text-shadow: none !important;
        line-height: 1.2 !important;
    }

    html,
    body {
        background: #ffffff !important;
        color: #000000 !important;
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        height: auto !important;
        overflow: visible !important;
        font-size: 8pt !important;
        line-height: 1.2 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    /* Alle Abstände in sichtbaren Druckbereichen radikal reduzieren */
    .header,
    .layout,
    .main,
    .recipe-area,
    .recipe-header-area,
    .recipe-legend,
    #recipeLegend,
    .recipe-table,
    .recipe-table tbody,
    .recipe-table tr,
    .recipe-table th,
    .recipe-table td,
    h1, h2, h3, h4, h5, h6,
    p, strong, div, span {
        gap: 0 !important;
        row-gap: 0 !important;
        column-gap: 0 !important;
    }

    h1, h2, h3, h4, h5, h6,
    p {
        margin: 0 !important;
        padding: 0 !important;
        line-height: 1.2 !important;
    }

    /* Kein Seitenumbruch – alles auf einer A5-Querseite */
    .header,
    .layout,
    .main,
    .recipe-area,
    .recipe-table,
    .recipe-table tbody {
        page-break-inside: avoid !important;
        break-inside: avoid !important;
        page-break-after: avoid !important;
        break-after: avoid !important;
    }

    /* Sidebar, Vorschau, Buttons und interaktive Elemente ausblenden */
    .sidebar,
    .left,
    .main-tabs,
    .main-tab,
    #panel-produktion,
    #panel-datenbank,
    #panel-lager,
    .inventory-section,
    .inventory-availability-panel,
    .recipe-db-save-box,
    .recipe-media-modal,
    .vorschau-studio,
    .vorschau-studio-layout,
    .vorschau-preview-column,
    .ai-prompt-panel,
    #ai-prompt-panel,
    #aiPromptOutput,
    #copyPromptBtn,
    #openGeminiBtn,
    #openGptBtn,
    .bobbel-canvas-wrap,
    #bobbelCanvas,
    #savePreviewBtn,
    .save-preview-btn,
    .preview-area,
    .canvas-wrapper,
    #gradientCanvas,
    #color-swatches,
    #color-swatches-wrap,
    .color-swatches,
    .color-swatches-wrap,
    .swatch-alternatives,
    #applyColorsBtn,
    .apply-colors-btn,
    .analyze-controls,
    .color-count-row,
    #colorCount,
    label[for="colorCount"],
    button,
    #analyzeBtn,
    #removeImgBtn,
    input,
    select,
    .tabs,
    .palette-container,
    .selected-colors,
    .catalog-section,
    .add-color-box,
    .save-recipe-box,
    .db-actions,
    .input-group {
        display: none !important;
    }

    /* Kopfzeile */
    .header {
        display: block !important;
        background: #ffffff !important;
        border: none !important;
        border-bottom: 1px solid #000000 !important;
        padding: 0 0 2px 0 !important;
        margin: 0 0 2px 0 !important;
        text-align: center !important;
    }

    .header h1 {
        font-size: 11pt !important;
        font-weight: 700 !important;
        color: #000000 !important;
        margin: 0 !important;
        padding: 0 !important;
        line-height: 1.2 !important;
    }

    /* Hauptbereich */
    .layout {
        display: block !important;
        padding: 0 !important;
        margin: 0 !important;
        gap: 0 !important;
    }

    .main {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        min-height: 0 !important;
        gap: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .recipe-area {
        display: block !important;
        background: #ffffff !important;
        border: none !important;
        max-height: none !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
        gap: 0 !important;
    }

    .recipe-header-area {
        display: block !important;
        border-bottom: 1px solid #000000 !important;
        background: #ffffff !important;
        padding: 0 0 2px 0 !important;
        margin: 0 0 2px 0 !important;
        gap: 0 !important;
    }

    .recipe-area h2,
    #recipeTitleHeading {
        color: #000000 !important;
        font-size: 8pt !important;
        margin: 0 !important;
        padding: 0 !important;
        line-height: 1.2 !important;
    }

    .recipe-meta {
        color: #333333 !important;
        font-size: 7pt !important;
        margin: 0 !important;
        padding: 0 !important;
        line-height: 1.2 !important;
    }

    /* Farbschlüssel – Inline-Styles aus JS überschreiben */
    .recipe-legend,
    #recipeLegend {
        background: #ffffff !important;
        border: none !important;
        border-bottom: 1px solid #dddddd !important;
        padding: 0 0 2px 0 !important;
        margin: 0 0 2px 0 !important;
        font-size: 6.5pt !important;
        line-height: 1.2 !important;
        gap: 0 !important;
    }

    #recipeLegend strong {
        display: inline !important;
        margin: 0 2px 0 0 !important;
        padding: 0 !important;
        font-size: 6.5pt !important;
    }

    #recipeLegend > div,
    #recipeLegend div {
        display: inline-flex !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        gap: 2px !important;
        margin: 0 2px 0 0 !important;
        padding: 0 !important;
        line-height: 1.2 !important;
    }

    #recipeLegend span {
        margin: 0 !important;
        padding: 0 !important;
        font-size: 6.5pt !important;
        line-height: 1.2 !important;
    }

    /* Tabelle: zweispaltig, extrem kompakt */
    .recipe-table {
        display: block !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        font-size: 8pt !important;
        line-height: 1.2 !important;
        border: none !important;
        border-collapse: collapse !important;
        border-spacing: 0 !important;
    }

    .recipe-table thead {
        display: none !important;
    }

    .recipe-table tbody {
        display: block !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        column-count: 2 !important;
        column-gap: 4px !important;
        column-rule: 1px solid #cccccc !important;
        column-fill: auto !important;
    }

    .recipe-table tbody tr {
        display: flex !important;
        align-items: flex-start !important;
        width: 100% !important;
        margin: 0 0 1px 0 !important;
        padding: 0 !important;
        background: #ffffff !important;
        border: none !important;
        border-bottom: 1px solid #eeeeee !important;
        border-radius: 0 !important;
        gap: 0 !important;
        page-break-inside: avoid !important;
        break-inside: avoid !important;
        -webkit-column-break-inside: avoid !important;
        line-height: 1.2 !important;
    }

    .recipe-table th,
    .recipe-table td {
        display: block !important;
        margin: 0 !important;
        padding: 0 1px !important;
        background: #ffffff !important;
        color: #000000 !important;
        line-height: 1.2 !important;
        vertical-align: top !important;
        border: none !important;
        font-size: 8pt !important;
    }

    .recipe-table td:nth-child(1) {
        flex: 0 0 9% !important;
        font-weight: bold !important;
        text-align: center !important;
    }

    .recipe-table td:nth-child(2) {
        flex: 0 0 16% !important;
        font-weight: bold !important;
    }

    .recipe-table td:nth-child(3) {
        flex: 0 0 12% !important;
        font-family: monospace !important;
        font-weight: bold !important;
    }

    .recipe-table td:nth-child(4) {
        flex: 1 1 auto !important;
        font-size: 7pt !important;
        padding: 0 !important;
    }

    .recipe-table tbody tr:hover {
        background: #ffffff !important;
    }

    .changed-thread,
    .normal-thread {
        font-size: 7pt !important;
        margin: 0 !important;
        padding: 0 !important;
        line-height: 1.2 !important;
    }

    .changed-thread {
        background: #ffffff !important;
        border: none !important;
        color: #000000 !important;
        text-decoration: underline !important;
    }

    .normal-thread {
        color: #000000 !important;
    }

    .print-dot,
    .glitz-dot {
        width: 4px !important;
        height: 4px !important;
        margin: 0 1px 0 0 !important;
        padding: 0 !important;
    }

    #panel-konen-bestellungen,
    .konen-bestellungen-section {
        display: none !important;
    }

    body.print-produktion #panel-designer,
    body.print-produktion #panel-datenbank,
    body.print-produktion #panel-lager {
        display: none !important;
    }

    body.print-produktion #panel-produktion {
        display: block !important;
    }

    body.print-produktion .produktion-controls,
    body.print-produktion .produktion-print-btn,
    body.print-produktion #productionInventoryPanel {
        display: none !important;
    }

    body.print-produktion .produktion-studio {
        background: #ffffff !important;
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        gap: 0 !important;
    }

    body.print-produktion .produktion-recipe-area {
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
    }

    body.print-produktion #productionRecipeTitleHeading {
        font-size: 8pt !important;
        color: #000000 !important;
    }

    body.print-produktion #productionTotalSectionsText {
        font-size: 7pt !important;
    }

    body.print-produktion #productionRecipeLegend {
        font-size: 6.5pt !important;
    }
}

/* Konen Bestellungen */
.konen-bestellungen-section {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding: 1rem 0 2rem;
}

.konen-bestellungen-header h2 {
    margin: 0 0 0.35rem;
    font-size: 1.35rem;
    color: #0f172a;
}

.konen-bestellungen-meta {
    margin: 0;
    color: #64748b;
    font-size: 0.88rem;
}

.statistics-section {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.statistics-header h2 {
    margin: 0 0 0.35rem;
    font-size: 1.35rem;
    color: #0f172a;
}

.statistics-meta,
.statistics-card-intro {
    margin: 0;
    color: #64748b;
    font-size: 0.88rem;
}

.statistics-card {
    padding: 1.1rem 1.15rem;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.statistics-card h3 {
    margin: 0;
    font-size: 1.05rem;
    color: #0f172a;
}

.statistics-subheading {
    margin: 0 0 0.35rem;
    font-size: 0.92rem;
    color: #334155;
}

.statistics-settings-grid,
.statistics-date-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    align-items: flex-end;
}

.statistics-form-field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 10rem;
}

.statistics-form-field label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
}

.statistics-form-field input {
    padding: 0.45rem 0.6rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.9rem;
}

.statistics-save-btn,
.statistics-apply-btn {
    padding: 0.5rem 0.9rem;
    border: none;
    border-radius: 8px;
    background: #0f172a;
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}

.statistics-save-btn:hover,
.statistics-apply-btn:hover {
    background: #1e293b;
}

.statistics-settings-status {
    margin: 0;
    font-size: 0.82rem;
    color: #15803d;
}

.statistics-settings-status.is-error {
    color: #b91c1c;
}

.statistics-bestseller-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.statistics-bestseller-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.55rem 0.65rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
}

.statistics-bestseller-name {
    font-weight: 600;
    color: #0f172a;
}

.statistics-bestseller-badge {
    display: inline-flex;
    padding: 0.12rem 0.45rem;
    border-radius: 999px;
    background: #fef3c7;
    color: #92400e;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.statistics-table-wrap {
    overflow-x: auto;
}

.statistics-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.statistics-table th,
.statistics-table td {
    padding: 0.55rem 0.65rem;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
}

.statistics-table th {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
}

.statistics-color-cell {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.statistics-color-swatch {
    width: 1.1rem;
    height: 1.1rem;
    border-radius: 4px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    flex-shrink: 0;
}

.statistics-empty-hint {
    color: #94a3b8;
    font-size: 0.85rem;
}

.statistics-loading,
.statistics-error {
    margin: 0;
    font-size: 0.85rem;
}

.statistics-error {
    color: #b91c1c;
}

.inventory-print-btn {
    padding: 0.5rem 0.85rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    color: #0f172a;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.inventory-print-btn:hover {
    background: #f8fafc;
    border-color: #94a3b8;
}

.order-supplier-block-head-copy {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
    min-width: 0;
}

.order-supplier-block-count {
    display: inline-flex;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    background: #ecfdf5;
    border: 1px solid #86efac;
    color: #166534;
    font-size: 0.68rem;
    font-weight: 700;
}

.order-shopping-action {
    white-space: nowrap;
}

.order-shopping-ignore-btn {
    padding: 0.35rem 0.62rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #ffffff;
    color: #64748b;
    font-size: 0.76rem;
    font-weight: 600;
    cursor: pointer;
}

.order-shopping-ignore-btn:hover {
    background: #fef2f2;
    border-color: #fecaca;
    color: #b91c1c;
}

/* Legacy alias — früher „Bestellungen & Inventur“ */
.order-inventory-section {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding: 1rem 0 2rem;
}

.order-inventory-header h2 {
    margin: 0 0 0.35rem;
    font-size: 1.35rem;
    color: #0f172a;
}

.order-inventory-meta {
    margin: 0;
    color: #64748b;
    font-size: 0.88rem;
}

.order-step {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 1.1rem 1.2rem;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
}

.order-step--shopping {
    border-color: #bbf7d0;
    background: linear-gradient(180deg, #ffffff 0%, #f8fff9 100%);
}

.order-step-head {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.55rem;
}

.order-step-head h3 {
    margin: 0;
    font-size: 1.05rem;
    color: #0f172a;
}

.order-step-badge {
    display: inline-flex;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.order-step-badge--shopping {
    background: #ecfdf5;
    border-color: #86efac;
    color: #166534;
}

.order-step-intro {
    margin: 0 0 0.9rem;
    color: #475569;
    font-size: 0.86rem;
    line-height: 1.5;
    max-width: 62rem;
}

.order-print-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.72rem 1.1rem;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
    color: #ffffff;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.25);
}

.order-print-btn:hover {
    background: linear-gradient(135deg, #1e40af, #1d4ed8);
}

.order-shopping-table-wrap {
    overflow-x: auto;
    margin-bottom: 0.85rem;
}

.order-shopping-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 640px;
    font-size: 0.86rem;
}

.order-shopping-table th,
.order-shopping-table td {
    padding: 0.7rem 0.85rem;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
}

.order-shopping-table th {
    background: #f8fafc;
    font-size: 0.72rem;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.order-shopping-qty {
    font-weight: 700;
    color: #166534;
    white-space: nowrap;
}

.order-shopping-row--clickable {
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.order-shopping-row--clickable:hover,
.order-shopping-row--clickable:focus-visible {
    background: #eff6ff;
    outline: none;
}

.order-shopping-row--clickable:focus-visible {
    box-shadow: inset 0 0 0 2px #93c5fd;
}

.order-shopping-name {
    font-weight: 600;
    color: #1d4ed8;
}

.order-shopping-row--clickable:hover .order-shopping-name,
.order-shopping-row--clickable:focus-visible .order-shopping-name {
    text-decoration: underline;
}

.order-shopping-action {
    cursor: default;
}

.order-shopping-empty,
.order-shopping-empty-cell {
    color: #64748b;
    text-align: center;
}

.order-shopping-empty {
    margin: 0 0 0.75rem;
    padding: 0.55rem 0.75rem;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    font-size: 0.84rem;
}

.order-shopping-groups {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.order-supplier-block {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
    overflow: hidden;
}

.order-supplier-block-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding: 0.7rem 0.85rem;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid #e2e8f0;
}

.order-supplier-block-title {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 700;
    color: #0f172a;
}

.order-supplier-copy-btn {
    padding: 0.45rem 0.72rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    color: #0f172a;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.order-supplier-copy-btn:hover {
    background: #f8fafc;
    border-color: #94a3b8;
}

.order-supplier-copy-btn.is-copied {
    border-color: #86efac;
    background: #ecfdf5;
    color: #166534;
}

.order-copy-btn {
    padding: 0.62rem 0.95rem;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #ffffff;
    color: #0f172a;
    font-size: 0.86rem;
    font-weight: 600;
    cursor: pointer;
}

.order-copy-btn:hover:not(:disabled) {
    background: #f8fafc;
    border-color: #94a3b8;
}

.order-copy-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.order-copy-feedback {
    margin: 0.55rem 0 0;
    color: #166534;
    font-size: 0.8rem;
    font-weight: 600;
}

/* ===================== Shopify-Bestell-Schnittstelle ===================== */
.shopify-orders-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem 0 1.5rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid #e2e8f0;
}

.shopify-orders-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.shopify-orders-header h2 {
    margin: 0 0 0.3rem;
    font-size: 1.35rem;
    color: #0f172a;
}

.shopify-orders-meta {
    margin: 0;
    color: #64748b;
    font-size: 0.88rem;
    max-width: 46rem;
}

.shopify-refresh-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.7rem 1.1rem;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #7c3aed, #8b5cf6);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(124, 58, 237, 0.25);
    white-space: nowrap;
}

.shopify-refresh-btn:hover {
    background: linear-gradient(135deg, #6d28d9, #7c3aed);
}

.shopify-orders-status {
    margin: 0;
    padding: 0.6rem 0.85rem;
    border-radius: 10px;
    font-size: 0.84rem;
    font-weight: 600;
    border: 1px solid transparent;
}

.shopify-orders-status--info {
    background: #f5f3ff;
    border-color: #ddd6fe;
    color: #5b21b6;
}

.shopify-orders-status--success {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #166534;
}

.shopify-orders-status--error {
    background: #fef2f2;
    border-color: #fecaca;
    color: #b91c1c;
}

.shopify-view-switch {
    display: inline-flex;
    gap: 0.35rem;
    padding: 0.3rem;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    align-self: flex-start;
    flex-wrap: wrap;
}

.shopify-view-btn {
    padding: 0.55rem 1rem;
    border: none;
    border-radius: 9px;
    background: transparent;
    color: #475569;
    font-size: 0.86rem;
    font-weight: 600;
    cursor: pointer;
}

.shopify-view-btn.is-active {
    background: #fff;
    color: #6d28d9;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.shopify-empty {
    margin: 0;
    padding: 1rem 1.1rem;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    color: #64748b;
    font-size: 0.86rem;
    text-align: center;
}

.shopify-batch-intro {
    margin: 0 0 0.4rem;
    color: #475569;
    font-size: 0.86rem;
    line-height: 1.5;
    max-width: 52rem;
}

.shopify-orders-list,
.shopify-batch-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

/* --- Bestell-Karten (Ansicht A) --- */
.shopify-order-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 0.95rem 1.05rem;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
}

.shopify-order-card.is-produced {
    opacity: 0.7;
    background: #f8fafc;
}

.shopify-order-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.7rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid #f1f5f9;
    flex-wrap: wrap;
}

.shopify-order-id {
    display: flex;
    align-items: baseline;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.shopify-order-number {
    font-size: 1rem;
    font-weight: 700;
    color: #6d28d9;
}

.shopify-order-customer {
    font-size: 0.9rem;
    color: #334155;
    font-weight: 600;
}

.shopify-order-meta {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
}

.shopify-orders-toolbar {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.85rem;
    padding: 0.55rem 0.75rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}

.shopify-orders-sort-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #475569;
    white-space: nowrap;
}

.shopify-orders-sort-select {
    min-width: 11rem;
    padding: 0.45rem 0.65rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    color: #1e293b;
    font-size: 0.85rem;
    font-weight: 500;
}

.shopify-orders-sort-select:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

.shopify-order-date {
    font-size: 0.82rem;
    color: #64748b;
    font-weight: 500;
}

.shopify-order-progress {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 0.75rem;
    padding: 0.55rem 0.65rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}

.shopify-order-progress-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #334155;
}

.shopify-order-progress-bar {
    height: 0.45rem;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
}

.shopify-order-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #8b5cf6, #6d28d9);
    border-radius: 999px;
    transition: width 0.25s ease;
}

.shopify-order-card.is-all-wound {
    border-color: #a7f3d0;
    box-shadow: 0 4px 16px rgba(22, 101, 52, 0.08);
}

.shopify-order-card.has-production-strike,
.shopify-batch-card.has-production-strike {
    border-color: #ef4444;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
}

.shopify-production-strike-alert {
    margin: 0.65rem 0 0.5rem;
    padding: 0.75rem 0.9rem;
    border-radius: 10px;
    border: 2px solid #ef4444;
    background: #fef2f2;
    color: #991b1b;
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.45;
    animation: shopify-strike-pulse 2s ease-in-out infinite;
}

.shopify-production-strike-alert p {
    margin: 0;
}

.shopify-production-strike-alert p + p {
    margin-top: 0.35rem;
}

.shopify-production-strike-alert--compact {
    margin: 0 0 0.5rem;
    padding: 0.55rem 0.7rem;
    font-size: 0.82rem;
    border-radius: 8px;
}

.shopify-line-item.has-production-strike {
    border-left: 4px solid #ef4444;
    padding-left: 0.65rem;
}

@keyframes shopify-strike-pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.35);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
    }
}

.shopify-order-state--ready {
    color: #166534;
    background: #ecfdf5;
    border-color: #a7f3d0;
}

.shopify-wound-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.38rem 0.65rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    color: #475569;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    white-space: nowrap;
}

.shopify-wound-btn:hover {
    border-color: #8b5cf6;
    color: #6d28d9;
}

.shopify-wound-btn.is-checked {
    background: #ecfdf5;
    border-color: #6ee7b7;
    color: #166534;
}

.shopify-line-item.is-wound {
    background: #f1f5f9;
    opacity: 0.92;
}

.shopify-line-item.is-wound .shopify-line-title,
.shopify-line-item.is-wound .shopify-line-variant {
    text-decoration: line-through;
    color: #94a3b8;
}

.shopify-line-item.is-wound .shopify-line-qty {
    color: #94a3b8;
}

.shopify-order-state {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #166534;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    padding: 0.18rem 0.5rem;
    border-radius: 999px;
}

.shopify-line-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.shopify-line-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.5rem 0.65rem;
    border-radius: 10px;
    background: #f8fafc;
    flex-wrap: wrap;
}

.shopify-line-actions {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.shopify-line-item.is-produced {
    background: #f0fdf4;
}

.shopify-line-main {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    flex-wrap: wrap;
    min-width: 0;
}

.shopify-line-copy {
    display: flex;
    flex-direction: column;
    gap: 0.28rem;
    min-width: 0;
}

.shopify-line-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: #1e293b;
}

.shopify-line-variant {
    display: inline-block;
    font-size: 0.76rem;
    color: #6d28d9;
    background: #f5f3ff;
    border: 1px solid #ede9fe;
    padding: 0.18rem 0.5rem;
    border-radius: 8px;
    line-height: 1.35;
    max-width: 100%;
}

.shopify-line-qty {
    font-size: 0.78rem;
    font-weight: 700;
    color: #475569;
}

.shopify-line-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.shopify-line-badge {
    font-size: 0.76rem;
    font-weight: 600;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    white-space: nowrap;
}

.shopify-line-badge--matched {
    color: #166534;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
}

.shopify-line-badge--unmatched {
    color: #92400e;
    background: #fffbeb;
    border: 1px solid #fde68a;
}

.shopify-line-badge--produced {
    color: #166534;
    background: #dcfce7;
    border: 1px solid #86efac;
}

.shopify-assign-btn {
    padding: 0.35rem 0.7rem;
    border: 1px solid #c4b5fd;
    border-radius: 8px;
    background: #fff;
    color: #6d28d9;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
}

.shopify-assign-btn:hover {
    background: #f5f3ff;
    border-color: #a78bfa;
}

/* --- Batch-Karten (Ansicht B) --- */
.shopify-batch-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: linear-gradient(180deg, #ffffff 0%, #faf5ff 100%);
    border: 1px solid #ede9fe;
    border-radius: 14px;
    padding: 0.95rem 1.05rem;
    box-shadow: 0 4px 16px rgba(124, 58, 237, 0.07);
    flex-wrap: wrap;
}

.shopify-batch-info {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    min-width: 0;
}

.shopify-batch-title-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.shopify-batch-name {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
}

.shopify-batch-count {
    font-size: 0.74rem;
    font-weight: 700;
    color: #6d28d9;
    background: #f5f3ff;
    border: 1px solid #ddd6fe;
    padding: 0.18rem 0.55rem;
    border-radius: 999px;
}

.shopify-batch-variant {
    font-size: 0.8rem;
    color: #64748b;
}

.shopify-batch-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.shopify-batch-swatches .recipe-db-swatch {
    width: 16px;
    height: 16px;
    border-radius: 5px;
}

.shopify-batch-swatches--lg .recipe-db-swatch {
    width: 26px;
    height: 26px;
    border-radius: 7px;
}

.shopify-batch-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.7rem 1.05rem;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #7c3aed, #8b5cf6);
    color: #fff;
    font-size: 0.86rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(124, 58, 237, 0.22);
    white-space: nowrap;
}

.shopify-batch-btn:hover {
    background: linear-gradient(135deg, #6d28d9, #7c3aed);
}

/* --- Manual-Matching-Modal --- */
.shopify-match-search {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.shopify-match-search:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

.shopify-match-results {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    max-height: 50vh;
    overflow-y: auto;
}

.shopify-match-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
    padding: 0.6rem 0.7rem;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    text-align: left;
}

.shopify-match-item:hover {
    border-color: #a78bfa;
    background: #faf5ff;
}

.shopify-match-item-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: #1e293b;
}

.shopify-match-linked {
    font-size: 0.7rem;
    font-weight: 600;
    color: #166534;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
    margin-left: 0.4rem;
}

.shopify-match-item-swatches {
    display: inline-flex;
    gap: 0.2rem;
    flex-shrink: 0;
}

.shopify-match-item-swatches .recipe-db-swatch {
    width: 14px;
    height: 14px;
    border-radius: 4px;
}

/* --- Batch-Produktions-Modal --- */
.shopify-batch-progress {
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #8b5cf6;
    margin-bottom: 0.4rem;
}

.shopify-batch-step-title {
    margin: 0 0 0.35rem;
    font-size: 1.1rem;
    color: #0f172a;
}

.shopify-batch-step-hint {
    margin: 0 0 0.7rem;
    font-size: 0.84rem;
    color: #64748b;
}

.shopify-batch-yarn-list {
    list-style: none;
    margin: 0 0 1rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.shopify-batch-yarn-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.65rem;
    background: #f8fafc;
    border-radius: 10px;
}

.shopify-batch-yarn-dot {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    flex-shrink: 0;
}

.shopify-batch-yarn-name {
    flex: 1;
    font-size: 0.86rem;
    font-weight: 600;
    color: #1e293b;
}

.shopify-batch-yarn-cones {
    font-size: 0.82rem;
    font-weight: 700;
    color: #6d28d9;
}

.shopify-batch-winding-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
}

.shopify-batch-order-ref {
    font-size: 0.82rem;
    font-weight: 700;
    color: #334155;
    background: #f1f5f9;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
}

.shopify-batch-copy {
    font-size: 0.78rem;
    font-weight: 600;
    color: #92400e;
    background: #fffbeb;
    border: 1px solid #fde68a;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
}

.shopify-batch-sequence {
    margin: 0 0 1rem;
    padding-left: 1.2rem;
    columns: 2;
    font-size: 0.84rem;
    color: #475569;
}

.shopify-batch-sequence li {
    margin-bottom: 0.2rem;
}

.shopify-batch-actions {
    display: flex;
    justify-content: flex-end;
}

.shopify-batch-next-btn {
    padding: 0.72rem 1.15rem;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #7c3aed, #8b5cf6);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(124, 58, 237, 0.25);
}

.shopify-batch-next-btn:hover {
    background: linear-gradient(135deg, #6d28d9, #7c3aed);
}

/* --- Shopify-Verbindung im Profil --- */
.profile-shopify-intro {
    margin: 0 0 0.9rem;
    font-size: 0.86rem;
    color: #475569;
    line-height: 1.5;
}

.profile-shopify-hint {
    margin: 0.7rem 0 0;
    font-size: 0.78rem;
    color: #64748b;
}

.inventory-print-sheet {
    display: none;
}

.inventory-print-sheet-inner {
    padding: 0;
}

.inventory-print-header {
    margin-bottom: 0.75rem;
    border-bottom: 2px solid #0f172a;
    padding-bottom: 0.45rem;
}

.inventory-print-header h1 {
    margin: 0 0 0.2rem;
    font-size: 1.2rem;
}

.inventory-print-header p {
    margin: 0;
    font-size: 0.82rem;
    color: #475569;
}

.inventory-print-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.inventory-print-table th,
.inventory-print-table td {
    padding: 0.45rem 0.55rem;
    border: 1px solid #cbd5e1;
    vertical-align: middle;
}

.inventory-print-table th {
    background: #f1f5f9;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.inventory-print-swatch {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    border: 1px solid rgba(15, 23, 42, 0.15);
}

.inventory-print-system {
    font-weight: 600;
    white-space: nowrap;
}

.inventory-print-actual-box {
    display: inline-block;
    min-width: 5.5rem;
    min-height: 1.35rem;
    border: 2px dashed #94a3b8;
    border-radius: 6px;
    background: #ffffff;
}

@media print {
    body.print-inventory-checklist .header,
    body.print-inventory-checklist .layout {
        display: none !important;
    }

    body.print-inventory-checklist .inventory-print-sheet {
        display: block !important;
        position: static !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 8mm 10mm !important;
    }

    body.print-inventory-checklist .inventory-print-sheet[hidden] {
        display: block !important;
    }

    body.print-inventory-checklist .inventory-print-table {
        page-break-inside: auto;
    }

    body.print-inventory-checklist .inventory-print-table tr {
        page-break-inside: avoid;
        break-inside: avoid;
    }

    body.print-inventory-checklist .inventory-print-actual-box {
        min-height: 1.6rem;
        border-color: #64748b !important;
    }
}

.layout--admin-mode {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
        "tabs"
        "main";
}

.layout--admin-mode .sidebar {
    display: none !important;
}

.layout--admin-mode .main {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
}

.main-tab--role[hidden] {
    display: none !important;
}

.hub-header {
    margin-bottom: 1.25rem;
}

.hub-header h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.35rem;
}

.hub-subtitle {
    font-size: 0.92rem;
    color: #64748b;
}

.hub-form {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 1.25rem 1.35rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}

.hub-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.hub-submit-btn {
    padding: 0.72rem 1.1rem;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #7c3aed, #8b5cf6);
    color: #ffffff;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(124, 58, 237, 0.24);
}

.hub-submit-btn--admin {
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.24);
}

.hub-submit-btn:hover:not(:disabled) {
    transform: translateY(-1px);
}

.hub-submit-btn:disabled {
    opacity: 0.7;
    cursor: wait;
}

.hub-form-message {
    margin-top: 0.85rem;
    font-size: 0.86rem;
    padding: 0.65rem 0.75rem;
    border-radius: 8px;
}

.hub-form-message[hidden] {
    display: none !important;
}

.hub-form-message--error {
    color: #b91c1c;
    background: #fef2f2;
    border: 1px solid #fecaca;
}

.hub-form-message--success {
    color: #166534;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
}

.hub-list-section h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #334155;
    margin-bottom: 0.75rem;
}

.landing-editor-section {
    margin-top: 1.5rem;
}

.landing-editor-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.landing-editor-toolbar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.landing-editor-add-select {
    min-width: 12rem;
    padding: 0.55rem 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    font-size: 0.88rem;
}

.landing-editor-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.landing-editor-item {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
    overflow: hidden;
}

.landing-editor-item--inactive {
    opacity: 0.72;
}

.landing-editor-item-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.landing-editor-item-meta {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
}

.landing-editor-type-badge {
    flex-shrink: 0;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: #ede9fe;
    color: #5b21b6;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.landing-editor-item-title {
    font-size: 0.92rem;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.landing-editor-item-actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
}

.landing-editor-move-btn,
.landing-editor-delete-btn,
.landing-editor-save-btn {
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    color: #334155;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.landing-editor-move-btn {
    width: 2rem;
    height: 2rem;
    padding: 0;
}

.landing-editor-delete-btn {
    width: 2rem;
    height: 2rem;
    padding: 0;
}

.landing-editor-move-btn:hover:not(:disabled),
.landing-editor-delete-btn:hover,
.landing-editor-save-btn:hover {
    background: #f8fafc;
    border-color: #94a3b8;
}

.landing-editor-move-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.landing-editor-item-body {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.landing-editor-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: #475569;
}

.landing-editor-field input,
.landing-editor-field textarea,
.landing-editor-field select {
    font-weight: 400;
    padding: 0.6rem 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #0f172a;
    background: #ffffff;
}

.landing-editor-field textarea {
    resize: vertical;
    min-height: 4rem;
}

.landing-editor-feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.landing-editor-feature-item {
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    padding: 0.75rem;
    margin: 0;
}

.landing-editor-feature-item legend {
    font-size: 0.78rem;
    font-weight: 700;
    color: #64748b;
    padding: 0 0.25rem;
}

.landing-editor-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.88rem;
    color: #334155;
}

.landing-editor-hint {
    font-size: 0.82rem;
    color: #64748b;
    line-height: 1.45;
    margin: 0;
}

.landing-editor-item-footer {
    display: flex;
    justify-content: flex-end;
}

.landing-editor-save-btn {
    padding: 0.5rem 1rem;
    background: #5b21b6;
    border-color: #5b21b6;
    color: #ffffff;
}

.landing-editor-save-btn:hover {
    background: #4c1d95;
    border-color: #4c1d95;
}

.landing-editor-item--structural {
    border-color: #c4b5fd;
}

.landing-editor-inline-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.landing-editor-plan-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.landing-editor-plan-item {
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    padding: 0.75rem;
    margin: 0;
}

.landing-editor-plan-item legend {
    font-size: 0.78rem;
    font-weight: 700;
    color: #64748b;
    padding: 0 0.25rem;
}

.landing-editor-logo-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.landing-editor-logo-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.landing-editor-logo-preview-wrap {
    width: 4.5rem;
    height: 4.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #f8fafc;
}

.landing-editor-logo-preview {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.landing-editor-logo-placeholder {
    font-size: 0.72rem;
    color: #94a3b8;
    text-align: center;
    padding: 0.25rem;
}

.landing-editor-upload-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.85rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    font-size: 0.82rem;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
}

.landing-editor-upload-btn:hover {
    background: #f8fafc;
    border-color: #94a3b8;
}

@media (max-width: 900px) {
    .landing-editor-feature-grid,
    .landing-editor-inline-grid,
    .landing-editor-plan-grid {
        grid-template-columns: 1fr;
    }
}

/* ===================== Kunden-Widget (Shopify Konfigurator) ===================== */
.customer-widget-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 0.5rem 0 1.5rem;
}

.customer-widget-header h2 {
    margin: 0 0 0.3rem;
    font-size: 1.35rem;
    color: #0f172a;
}

.customer-widget-meta {
    margin: 0;
    color: #64748b;
    font-size: 0.88rem;
    max-width: 52rem;
}

.customer-widget-grid {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) minmax(320px, 1.2fr);
    gap: 1rem;
}

.customer-widget-api-card,
.customer-widget-preview-card,
.customer-widget-queue-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 1rem 1.1rem;
}

.customer-widget-api-card h3,
.customer-widget-preview-card h3,
.customer-widget-queue-card h3 {
    margin: 0 0 0.5rem;
    font-size: 1.05rem;
    color: #0f172a;
}

.customer-widget-hint {
    margin: 0 0 0.75rem;
    color: #64748b;
    font-size: 0.84rem;
    line-height: 1.45;
}

.customer-widget-hint--spaced {
    margin-top: 0.85rem;
}

.customer-widget-field {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: #334155;
}

.customer-widget-key-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.85rem;
}

.customer-widget-key-input {
    flex: 1 1 220px;
    min-width: 0;
    padding: 0.55rem 0.7rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.8rem;
    background: #f8fafc;
}

.customer-widget-endpoint-label {
    margin: 0 0 0.35rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: #334155;
}

.customer-widget-endpoint {
    display: block;
    margin-bottom: 0.55rem;
    padding: 0.55rem 0.7rem;
    border-radius: 8px;
    background: #0f172a;
    color: #e2e8f0;
    font-size: 0.76rem;
    word-break: break-all;
}

.customer-widget-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.85rem;
    border: none;
    border-radius: 8px;
    background: #2563eb;
    color: #fff;
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
}

.customer-widget-btn:hover {
    background: #1d4ed8;
}

.customer-widget-btn--secondary {
    background: #e2e8f0;
    color: #0f172a;
}

.customer-widget-btn--secondary:hover {
    background: #cbd5e1;
}

.widget-panel-status {
    margin: 0;
    padding: 0.55rem 0.75rem;
    border-radius: 8px;
    font-size: 0.84rem;
}

.widget-panel-status--info {
    background: #eff6ff;
    color: #1d4ed8;
}

.widget-panel-status--success {
    background: #ecfdf5;
    color: #047857;
}

.widget-panel-status--error {
    background: #fef2f2;
    color: #b91c1c;
}

.widget-preview-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.75rem;
}

.widget-preview-controls-label {
    font-size: 0.84rem;
    font-weight: 600;
    color: #334155;
}

.widget-plies-btn {
    min-width: 2.6rem;
    padding: 0.35rem 0.65rem;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: #fff;
    color: #334155;
    font-weight: 700;
    cursor: pointer;
}

.widget-plies-btn.is-active {
    border-color: #2563eb;
    background: #2563eb;
    color: #fff;
}

.widget-preview-meta {
    margin-left: auto;
    font-size: 0.82rem;
    color: #64748b;
}

.widget-preview-strip {
    display: flex;
    min-height: 3.25rem;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    overflow: hidden;
    background: #f8fafc;
    margin-bottom: 0.65rem;
}

.widget-preview-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.75rem;
    color: #94a3b8;
    font-size: 0.84rem;
    text-align: center;
}

.widget-preview-segment {
    flex: 1 1 0;
    min-width: 1.5rem;
    border: none;
    cursor: pointer;
    transition: opacity 0.15s ease;
}

.widget-preview-segment:hover {
    opacity: 0.85;
}

.widget-preview-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.widget-preview-palette {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(4.5rem, 1fr));
    gap: 0.45rem;
    max-height: 220px;
    overflow: auto;
    padding-right: 0.15rem;
}

.widget-preview-swatch {
    position: relative;
    aspect-ratio: 1;
    border: 2px solid rgba(15, 23, 42, 0.12);
    border-radius: 10px;
    cursor: pointer;
    overflow: hidden;
}

.widget-preview-swatch:hover {
    border-color: #2563eb;
}

.widget-preview-swatch-label {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 0.15rem 0.2rem;
    background: rgba(15, 23, 42, 0.72);
    color: #fff;
    font-size: 0.58rem;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.widget-preview-payload-details {
    margin-top: 0.75rem;
}

.widget-preview-payload-details summary {
    cursor: pointer;
    font-size: 0.84rem;
    color: #475569;
    font-weight: 600;
}

.widget-preview-payload {
    margin: 0.5rem 0 0;
    padding: 0.65rem;
    border-radius: 8px;
    background: #0f172a;
    color: #e2e8f0;
    font-size: 0.74rem;
    overflow: auto;
    max-height: 200px;
}

.widget-production-queue {
    display: grid;
    gap: 0.65rem;
}

.widget-queue-card {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.75rem 0.85rem;
    background: #f8fafc;
}

.widget-queue-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.widget-queue-badge {
    display: inline-flex;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: #fef3c7;
    color: #92400e;
    font-size: 0.72rem;
    font-weight: 700;
}

.widget-queue-meta,
.widget-queue-colors {
    margin: 0.35rem 0 0;
    font-size: 0.82rem;
    color: #64748b;
}

.widget-queue-empty {
    margin: 0;
    color: #94a3b8;
    font-size: 0.86rem;
}

@media (max-width: 900px) {
    .customer-widget-grid {
        grid-template-columns: 1fr;
    }

    .widget-preview-meta {
        margin-left: 0;
        width: 100%;
    }
}

/* ===================================================================== */
/* ===== Hilfe-Wissensdatenbank & Inline-Tooltips ====================== */
/* ===================================================================== */

.help-hub {
    max-width: 920px;
    margin: 0 auto;
    padding: 1.5rem 1.25rem 2.5rem;
}

.help-hub-header h2 {
    margin-bottom: 0.35rem;
}

.help-hub-intro {
    color: #64748b;
    line-height: 1.55;
    margin-bottom: 1.5rem;
}

.help-page-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.help-empty-hint {
    color: #94a3b8;
    font-size: 0.95rem;
}

.help-category-section {
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #ffffff;
    padding: 1.25rem 1.35rem;
}

.help-category-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #4338ca;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eef2ff;
}

.help-category-blocks {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.help-article {
    padding: 0.25rem 0;
}

.help-article-title {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.45rem;
}

.help-article-body,
.help-module-text-body {
    font-size: 0.95rem;
    line-height: 1.65;
    color: #475569;
}

.help-block.help-module--text,
.help-block.help-module--media,
.help-block.help-module--feature-grid {
    padding: 0;
}

.help-hub-footer {
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid #e2e8f0;
}

.help-editor-section {
    margin-top: 1.5rem;
}

.statistics-card-title-row {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.inline-help {
    position: relative;
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    margin-left: 0.25rem;
}

.inline-help__trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.15rem;
    height: 1.15rem;
    padding: 0;
    border: 1px solid #c7d2fe;
    border-radius: 999px;
    background: #eef2ff;
    color: #4338ca;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
    cursor: help;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.inline-help__trigger:hover,
.inline-help.is-open .inline-help__trigger {
    background: #4338ca;
    border-color: #4338ca;
    color: #ffffff;
}

.inline-help__popup {
    position: absolute;
    z-index: 80;
    left: 50%;
    bottom: calc(100% + 0.45rem);
    transform: translateX(-50%);
    width: max-content;
    max-width: 16rem;
    padding: 0.55rem 0.7rem;
    border-radius: 10px;
    background: #0f172a;
    color: #f8fafc;
    font-size: 0.78rem;
    font-weight: 500;
    line-height: 1.45;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.22);
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, visibility 0.15s ease;
}

.inline-help__popup::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #0f172a;
}

.inline-help.is-open .inline-help__popup,
.inline-help:hover .inline-help__popup {
    opacity: 1;
    visibility: visible;
}

.sleeve-bobbel-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.hub-workspace-list,
.hub-member-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.user-menu-trigger--ghost {
    color: #ffffff;
    background: linear-gradient(135deg, #ea580c, #dc2626);
    border-color: #c2410c;
    box-shadow: 0 4px 16px rgba(234, 88, 12, 0.35);
}

.user-menu-trigger--ghost:hover,
.user-menu-trigger--ghost.is-open {
    background: linear-gradient(135deg, #c2410c, #b91c1c);
    border-color: #9a3412;
    color: #ffffff;
}

.user-menu-item--ghost-exit {
    background: #fff7ed;
    color: #c2410c;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.user-menu-item--ghost-exit:hover {
    background: #ffedd5;
    color: #9a3412;
}

.ghost-enter-btn {
    flex-shrink: 0;
    padding: 0.45rem 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
    color: #334155;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.ghost-enter-btn:hover {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1d4ed8;
}

.hub-workspace-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 1rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}

.hub-workspace-item-main {
    min-width: 0;
    flex: 1;
}

.hub-workspace-item-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-shrink: 0;
}

.hub-workspace-item strong,
.hub-member-item strong {
    color: #0f172a;
    font-size: 0.92rem;
}

.hub-member-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 1rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}

.hub-item-meta {
    font-size: 0.8rem;
    color: #64748b;
}

.hub-empty-hint {
    font-size: 0.88rem;
    color: #94a3b8;
    font-style: italic;
}

.admin-hub,
.team-hub,
.support-hub {
    max-width: 100%;
    padding: 0.25rem 0 1rem;
}

.admin-hub-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 0;
    margin-bottom: 1.35rem;
    padding: 0;
    background: var(--brand-bg);
    border: 1px solid var(--brand-border-soft);
    border-radius: var(--brand-radius-card);
    box-shadow: var(--brand-shadow-sm);
    overflow: hidden;
}

.admin-hub-tab {
    flex: 1 1 auto;
    min-width: min(100%, 9.5rem);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.85rem 1rem;
    border: none;
    border-right: 1px solid var(--brand-border-soft);
    border-bottom: 2px solid transparent;
    background: transparent;
    color: var(--brand-text-muted);
    font-family: var(--brand-font);
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.25;
    text-align: center;
    cursor: pointer;
    transition:
        color 0.18s ease,
        background 0.18s ease,
        border-color 0.18s ease,
        box-shadow 0.18s ease;
}

.admin-hub-tab:last-child {
    border-right: none;
}

.admin-hub-tab:hover {
    color: var(--brand-primary);
    background: rgba(255, 255, 255, 0.72);
}

.admin-hub-tab.is-active {
    color: var(--brand-primary);
    background: var(--brand-accent-soft);
    border-bottom-color: var(--brand-primary);
    box-shadow: inset 0 -1px 0 rgba(30, 41, 59, 0.06);
}

.admin-hub-tab[hidden] {
    display: none !important;
}

.admin-hub-panels {
    position: relative;
    min-height: 12rem;
}

.admin-hub-panel {
    display: none;
    animation: adminHubPanelIn 0.18s ease;
}

.admin-hub-panel.is-active {
    display: block;
}

.admin-hub-panel[hidden] {
    display: none !important;
}

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

.admin-shops-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1.25rem;
    align-items: start;
}

.admin-shops-new .hub-form,
.admin-shops-form {
    margin-bottom: 0;
}

.admin-shops-existing,
.admin-shops-new {
    margin-top: 0;
}

.admin-section-hint {
    margin-bottom: 0.85rem;
}

.admin-support-section {
    margin-top: 0;
}

.admin-users-section {
    margin-top: 0;
}

.hub-list-section.landing-editor-section:first-child,
.hub-list-section.changelog-admin-section {
    margin-top: 0;
}

@media (max-width: 960px) {
    .admin-hub-tab {
        flex: 1 1 calc(50% - 1px);
        min-width: 0;
        border-bottom: 1px solid var(--brand-border-soft);
    }

    .admin-hub-tab:nth-child(2n) {
        border-right: none;
    }

    .admin-hub-tab.is-active {
        border-bottom-color: var(--brand-primary);
    }

    .admin-shops-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .admin-hub-tab {
        flex: 1 1 100%;
        border-right: none;
    }
}

/* ===== Support-Ticketsystem ===== */
.support-field--wide {
    grid-column: 1 / -1;
}

.support-form textarea {
    width: 100%;
    resize: vertical;
    min-height: 120px;
    padding: 0.7rem 0.85rem;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font: inherit;
    color: #0f172a;
    background: #ffffff;
}

.support-form textarea:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.18);
}

.support-table-wrap {
    overflow-x: auto;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
}

.support-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.support-table thead th {
    text-align: left;
    padding: 0.7rem 0.9rem;
    background: #f8fafc;
    color: #475569;
    font-weight: 600;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
}

.support-table tbody td {
    padding: 0.7rem 0.9rem;
    border-bottom: 1px solid #f1f5f9;
    color: #0f172a;
    vertical-align: middle;
}

.support-table tbody tr:last-child td {
    border-bottom: none;
}

.support-empty-cell {
    text-align: center;
    color: #94a3b8;
    font-style: italic;
}

/* Status-Etiketten — klare, professionelle Farben */
.support-status {
    display: inline-block;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1.3;
    white-space: nowrap;
    border: 1px solid transparent;
}

.support-status--offen {
    color: #1e3a8a;
    background: #eef2ff;
    border-color: #c7d2fe;
}

.support-status--in_bearbeitung {
    color: #7c2d12;
    background: #fff7ed;
    border-color: #fed7aa;
}

.support-status--rueckfrage {
    color: #854d0e;
    background: #fefce8;
    border-color: #fde68a;
}

.support-status--abgeschlossen {
    color: #166534;
    background: #f0fdf4;
    border-color: #bbf7d0;
}

/* Admin — Eingegangene Support-Tickets */
.admin-support-section {
    margin-top: 0;
}

.admin-support-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.admin-support-refresh-btn {
    padding: 0.4rem 0.85rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
    color: #334155;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.admin-support-refresh-btn:hover {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1d4ed8;
}

.admin-ticket-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin-top: 0.85rem;
}

.admin-ticket-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 1.1rem 1.2rem;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}

.admin-ticket-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.admin-ticket-category {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #7c3aed;
    background: #f5f3ff;
    border: 1px solid #ddd6fe;
    padding: 0.15rem 0.55rem;
    border-radius: 6px;
    margin-bottom: 0.4rem;
}

.admin-ticket-subject {
    font-size: 1.02rem;
    font-weight: 700;
    color: #0f172a;
}

.admin-ticket-description {
    margin: 0.75rem 0;
    font-size: 0.9rem;
    color: #475569;
    white-space: pre-wrap;
}

.admin-ticket-contact {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
    padding: 0.85rem;
    background: #f8fafc;
    border: 1px solid #eef2f7;
    border-radius: 10px;
    margin-bottom: 0.85rem;
}

.admin-ticket-contact-item {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.admin-ticket-contact-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #94a3b8;
    font-weight: 600;
}

.admin-ticket-contact-item strong {
    font-size: 0.9rem;
    color: #0f172a;
    word-break: break-word;
}

.admin-ticket-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.admin-ticket-meta {
    font-size: 0.8rem;
    color: #64748b;
}

.admin-ticket-status-control {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: #475569;
}

.admin-ticket-status-select {
    padding: 0.4rem 0.6rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    font: inherit;
    font-size: 0.84rem;
    font-weight: 600;
    color: #0f172a;
    cursor: pointer;
}

.admin-ticket-status-select:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.18);
}

.admin-ticket-status-select:disabled {
    opacity: 0.6;
    cursor: wait;
}

.company-profile {
    max-width: 920px;
    margin: 0 auto;
    padding: 0.25rem 0 2rem;
}

.company-profile-header {
    margin-bottom: 1.5rem;
}

.company-profile-header h2 {
    font-size: 1.45rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.35rem;
}

.company-profile-intro {
    font-size: 0.92rem;
    color: #64748b;
    line-height: 1.5;
}

.company-profile-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.profile-section {
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #ffffff;
    padding: 1.35rem 1.4rem 1.25rem;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.04);
    margin: 0;
}

.profile-section-legend {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
    padding: 0 0.35rem;
    margin-bottom: 0.75rem;
}

.profile-subsection {
    margin-bottom: 1.1rem;
}

.profile-subsection-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.75rem;
}

.profile-form-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 0.85rem 1rem;
}

.profile-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    grid-column: span 6;
}

.profile-field--wide {
    grid-column: span 12;
}

.profile-field--street {
    grid-column: span 8;
}

.profile-field--house {
    grid-column: span 4;
}

.profile-field label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #475569;
}

.profile-field input {
    width: 100%;
    padding: 0.68rem 0.8rem;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    font-size: 0.92rem;
    color: #0f172a;
    background: #f8fafc;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.profile-field input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
    background: #ffffff;
}

.required-star {
    color: #dc2626;
    font-weight: 700;
}

.profile-system-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 0.85rem;
}

.profile-system-card {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 0.9rem 0.95rem;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}

.profile-system-card label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #475569;
}

.profile-system-card select {
    width: 100%;
    padding: 0.6rem 0.7rem;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    font-size: 0.9rem;
    color: #0f172a;
    background: #ffffff;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.profile-system-card select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.profile-system-card-hint {
    margin: 0;
    font-size: 0.74rem;
    line-height: 1.35;
    color: #94a3b8;
}

.profile-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #334155;
    margin: 0.25rem 0 1rem;
    cursor: pointer;
}

.profile-billing-block {
    padding-top: 0.35rem;
    border-top: 1px dashed #e2e8f0;
    animation: profileFadeIn 0.22s ease;
}

.profile-billing-block[hidden] {
    display: none !important;
}

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

.profile-preference-group {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    margin-top: 0.5rem;
    padding: 0.85rem 1rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}

.profile-preference-label {
    font-size: 0.84rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.15rem;
}

.profile-radio-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #334155;
    cursor: pointer;
}

.profile-logo-dropzone {
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    background: #f8fafc;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.profile-logo-dropzone:hover,
.profile-logo-dropzone:focus-visible,
.profile-logo-dropzone.is-dragover {
    border-color: #2563eb;
    background: #eff6ff;
    outline: none;
}

.profile-logo-dropzone.is-uploading {
    opacity: 0.7;
    pointer-events: none;
}

.profile-logo-preview-wrap {
    margin-bottom: 0.85rem;
}

.profile-logo-preview {
    max-width: 220px;
    max-height: 120px;
    object-fit: contain;
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    padding: 0.5rem;
}

.profile-logo-hint {
    font-size: 0.86rem;
    color: #64748b;
    margin: 0;
}

.profile-form-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.65rem;
}

.profile-save-btn {
    padding: 0.75rem 1.35rem;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
    color: #ffffff;
    font-size: 0.94rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.22);
}

.profile-save-btn:hover:not(:disabled) {
    transform: translateY(-1px);
}

.profile-save-btn:disabled {
    opacity: 0.7;
    cursor: wait;
}

.profile-save-message {
    font-size: 0.86rem;
    padding: 0.65rem 0.8rem;
    border-radius: 8px;
    margin: 0;
}

.profile-save-message[hidden] {
    display: none !important;
}

.profile-save-message--error {
    color: #b91c1c;
    background: #fef2f2;
    border: 1px solid #fecaca;
}

.profile-save-message--success {
    color: #166534;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
}

@media (max-width: 720px) {
    .profile-field,
    .profile-field--wide,
    .profile-field--street,
    .profile-field--house {
        grid-column: span 12;
    }
}

/* ----- Studio mobile / tablet (pure CSS – no JS class required) ----- */
@media (max-width: 768px) {
    :root {
        --mobile-tab-bar-height: 3.15rem;
    }

    .sidebar-toggle-btn,
    .sidebar-backdrop,
    .sidebar-close-btn {
        display: none !important;
    }

    .header {
        position: sticky;
        top: 0;
        z-index: 300;
        padding: 0.65rem 0.85rem;
    }

    .header-bar {
        gap: 0.5rem;
    }

    .header-title {
        font-size: 0.95rem;
        flex: 1;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .header h1 {
        font-size: 0.95rem;
    }

    .user-menu-trigger {
        max-width: 34vw;
        padding: 0.4rem 0.65rem;
        font-size: 0.72rem;
    }

    .layout {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto 1fr;
        grid-template-areas:
            "tabs"
            "main";
        padding: 0.5rem;
        gap: 0.65rem;
        min-height: calc(100dvh - 3.25rem);
    }

    /* Sidebar nur im Designer-Tab */
    .layout:has(#tab-designer.active),
    body.mobile-designer-tab .layout {
        grid-template-areas:
            "tabs"
            "sidebar"
            "main";
        grid-template-rows: auto auto 1fr;
    }

    .sidebar,
    #studioSidebar {
        display: none !important;
    }

    .layout:has(#tab-designer.active) .sidebar,
    .layout:has(#tab-designer.active) #studioSidebar,
    body.mobile-designer-tab .sidebar,
    body.mobile-designer-tab #studioSidebar {
        display: flex !important;
    }

    .layout--admin-mode .sidebar,
    .layout--admin-mode #studioSidebar {
        display: none !important;
    }

    .main-tabs {
        grid-area: tabs;
        position: sticky;
        top: 0;
        z-index: 250;
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 0.2rem;
        padding: 0.3rem;
        margin: 0;
        border-radius: 10px;
        box-shadow: 0 2px 12px rgba(15, 23, 42, 0.1);
    }

    .main-tabs::-webkit-scrollbar {
        display: none;
    }

    .main-tab {
        flex: 1 1 0;
        min-width: 0;
        white-space: nowrap;
        font-size: 0.72rem;
        padding: 0.5rem 0.35rem;
        min-height: 2.45rem;
    }

    .main-tab-text--long {
        display: none;
    }

    .main-tab-text--short {
        display: inline;
    }

    .layout:has(#tab-designer.active) .sidebar,
    body.mobile-designer-tab .sidebar {
        grid-area: sidebar;
        position: static;
        transform: none;
        width: 100%;
        max-width: none;
        max-height: none;
        z-index: auto;
        margin: 0;
        border-radius: 10px;
        border: 1px solid #e2e8f0;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    }

    .layout:has(#tab-designer.active) .palette-container,
    body.mobile-designer-tab .palette-container {
        max-height: 42vh;
        min-height: 140px;
    }

    .layout:has(#tab-designer.active) .gen-btn,
    body.mobile-designer-tab .gen-btn {
        width: 100%;
        min-height: 3rem;
        font-size: 1rem;
    }

    .mobile-scroll-preview-btn {
        display: block;
        width: 100%;
        margin-top: 0.5rem;
        padding: 0.7rem 1rem;
        border: 1px dashed #94a3b8;
        border-radius: 10px;
        background: #f8fafc;
        color: #334155;
        font-size: 0.88rem;
        font-weight: 600;
        cursor: pointer;
    }

    .mobile-scroll-preview-btn[hidden] {
        display: none !important;
    }

    .mobile-scroll-preview-btn:hover {
        background: #ffffff;
        border-color: #64748b;
    }

    .main {
        grid-area: main;
        width: 100%;
        min-width: 0;
        min-height: 0;
    }

    .main-tab-panel:not([hidden]) {
        animation: mobile-tab-fade-in 0.2s ease;
    }

    @keyframes mobile-tab-fade-in {
        from {
            opacity: 0.35;
            transform: translateY(6px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .preview-area {
        max-width: none;
        width: 100%;
        align-self: stretch;
    }

    .canvas-wrapper,
    #gradientCanvas,
    .bg-switch-bar {
        max-width: none;
        width: 100%;
    }

    #gradientCanvas {
        filter: blur(5px) scale(1.02);
        height: auto;
        aspect-ratio: 1 / 1;
    }

    .recipe-header-area {
        flex-direction: column;
        align-items: stretch;
    }

    .recipe-db-save-row {
        flex-direction: column;
        align-items: stretch;
    }

    .recipe-db-save-row .recipe-db-save-btn {
        width: 100%;
    }

    .recipe-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .inventory-table-wrap,
    .recipe-table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .vorschau-studio-layout {
        flex-direction: column;
        align-items: stretch;
    }

    .vorschau-preview-column,
    .ai-prompt-panel {
        max-width: none;
        width: 100%;
        flex: 1 1 100%;
    }

    .studio-modal-panel {
        width: calc(100vw - 1rem);
        max-width: calc(100vw - 1rem);
        max-height: min(90dvh, 900px);
        margin: 0.5rem;
    }

    .auth-card {
        width: min(100%, 24rem);
        margin: 0 0.75rem;
    }

    .hub-header,
    .recipe-db-header-top,
    .inventory-header,
    .shopify-orders-header,
    .order-inventory-header {
        flex-direction: column;
        align-items: stretch;
        gap: 0.65rem;
    }

    .palette-grid {
        grid-template-columns: repeat(auto-fill, minmax(2.6rem, 1fr));
    }

    .analyze-btn,
    .auth-submit-btn,
    .print-btn,
    .landing-btn,
    .gen-btn {
        min-height: 2.75rem;
    }
}

/* ===== SaaS Plan & Permission System ===== */

.permission-gated-section {
    position: relative;
}

.permission-lock-overlay {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 20;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(248, 250, 252, 0.82);
    backdrop-filter: blur(4px);
    border-radius: 14px;
    text-align: center;
}

.permission-lock-overlay.is-locked {
    display: flex;
}

.permission-lock-content {
    max-width: 26rem;
    padding: 1.25rem 1.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.permission-lock-icon {
    display: block;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.permission-lock-content h3 {
    margin: 0 0 0.5rem;
    font-size: 1.05rem;
    color: #0f172a;
}

.permission-lock-content p {
    margin: 0;
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.5;
}

.permission-lock-hint {
    margin-top: 0.65rem !important;
    font-size: 0.82rem !important;
    color: #94a3b8 !important;
}

.permission-upgrade-banner {
    position: fixed;
    bottom: 1.25rem;
    left: 50%;
    transform: translateX(-50%) translateY(120%);
    z-index: 12000;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    max-width: min(34rem, calc(100vw - 2rem));
    padding: 0.75rem 1rem;
    border: 1px solid #fcd34d;
    border-radius: 12px;
    background: #fffbeb;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
    transition: transform 0.28s ease;
}

.permission-upgrade-banner.is-visible {
    transform: translateX(-50%) translateY(0);
}

.permission-upgrade-banner-icon {
    flex-shrink: 0;
}

.permission-upgrade-banner-text {
    flex: 1;
    font-size: 0.88rem;
    color: #92400e;
    line-height: 1.45;
}

.permission-upgrade-banner-close {
    border: none;
    background: transparent;
    color: #b45309;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.15rem 0.35rem;
}

.color-picker-input.is-permission-locked {
    opacity: 0.45;
    cursor: not-allowed;
}

.shopify-view-btn.is-permission-locked {
    opacity: 0.55;
}

.hub-user-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.hub-user-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
}

.hub-user-item-main {
    min-width: 0;
}

.hub-user-item-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-shrink: 0;
}

.hub-plan-badge {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.hub-plan-badge--light {
    background: #f1f5f9;
    color: #475569;
}

.hub-plan-badge--standard {
    background: #dbeafe;
    color: #1d4ed8;
}

.hub-plan-badge--premium {
    background: #fef3c7;
    color: #b45309;
}

.hub-plan-badge--super-admin {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.35);
}

.admin-super-admin-notice {
    margin: 0 0 1rem;
    padding: 0.75rem 0.9rem;
    border: 1px solid #c7d2fe;
    border-radius: 10px;
    background: #eef2ff;
    color: #3730a3;
    font-size: 0.86rem;
    line-height: 1.45;
}

.hub-user-edit-btn {
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
    color: #334155;
    font-size: 0.82rem;
    padding: 0.4rem 0.7rem;
    cursor: pointer;
}

.hub-user-edit-btn:hover {
    background: #f1f5f9;
}

.admin-user-permissions-meta {
    margin: 0 0 1rem;
    font-size: 0.88rem;
    color: #64748b;
}

.admin-permissions-plan-block {
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid #e2e8f0;
}

.admin-password-reset-block {
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid #e2e8f0;
}

.admin-password-reset-title {
    margin: 0 0 0.35rem;
    font-size: 0.95rem;
    color: #0f172a;
}

.admin-password-reset-grid {
    display: grid;
    grid-template-columns: minmax(120px, 160px) 1fr;
    gap: 0.45rem 0.75rem;
    align-items: center;
    margin: 0.75rem 0;
}

.admin-password-reset-input {
    width: 100%;
    padding: 0.55rem 0.7rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.92rem;
}

.admin-password-reset-block .hub-submit-btn {
    margin-top: 0.15rem;
}

.admin-permissions-plan-row {
    display: flex;
    gap: 0.65rem;
    align-items: center;
    margin-top: 0.45rem;
}

.admin-permissions-select {
    flex: 1;
    min-width: 0;
    padding: 0.55rem 0.7rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.92rem;
}

.admin-permissions-fieldset {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1rem 1.1rem;
    margin: 0 0 1rem;
    max-height: 24rem;
    overflow-y: auto;
}

.admin-permissions-fieldset legend {
    font-size: 0.78rem;
    font-weight: 700;
    color: #64748b;
    padding: 0 0.35rem;
}

.admin-permission-check {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    margin-bottom: 0.75rem;
    font-size: 0.88rem;
    color: #334155;
    cursor: pointer;
}

.admin-permission-check input {
    margin-top: 0.15rem;
}

.admin-permission-max-colors {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-top: 0.5rem;
}

.admin-permission-max-colors input {
    max-width: 8rem;
    padding: 0.5rem 0.65rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
}

/* ===== Super-Admin Plan Simulator ===== */

:root {
    --admin-simulation-bar-height: 2.75rem;
}

.admin-simulation-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 13000;
    height: var(--admin-simulation-bar-height);
    display: flex;
    align-items: center;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
    transition: background 0.2s ease, border-color 0.2s ease;
}

.admin-simulation-bar[hidden] {
    display: none !important;
}

.admin-simulation-bar.is-simulating {
    background: linear-gradient(90deg, #fff7ed 0%, #ffedd5 100%);
    border-bottom-color: #fb923c;
    box-shadow: 0 2px 10px rgba(249, 115, 22, 0.18);
}

.admin-simulation-bar-inner {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.admin-simulation-bar-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: #475569;
    white-space: nowrap;
}

.admin-simulation-bar.is-simulating .admin-simulation-bar-label {
    color: #9a3412;
}

.admin-simulation-select {
    min-width: 14rem;
    max-width: 100%;
    padding: 0.35rem 0.55rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    font-size: 0.82rem;
    color: #1e293b;
}

.admin-simulation-bar.is-simulating .admin-simulation-select {
    border-color: #fdba74;
    background: #fff;
}

.admin-simulation-status {
    font-size: 0.78rem;
    font-weight: 600;
    color: #c2410c;
}

.admin-simulation-end-btn {
    margin-left: auto;
    padding: 0.35rem 0.75rem;
    border: 1px solid #f97316;
    border-radius: 8px;
    background: #ea580c;
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.admin-simulation-end-btn:hover {
    background: #c2410c;
}

.is-permission-locked-section {
    opacity: 0.45;
    pointer-events: none;
    filter: grayscale(0.15);
}

.available-only-toggle-wrap.is-permission-locked {
    opacity: 0.45;
    pointer-events: none;
}

body.has-admin-simulation-bar .app-shell {
    padding-top: var(--admin-simulation-bar-height);
}

/* ===== Hilfe-Hub & Changelog ===== */
.help-hub {
    max-width: 900px;
    padding: 0.25rem 0 1rem;
}

.help-hub-header h2 {
    margin: 0 0 0.35rem;
    font-size: 1.45rem;
    color: #0f172a;
}

.help-hub-intro {
    margin: 0 0 1.25rem;
    color: #64748b;
    font-size: 0.92rem;
    line-height: 1.5;
}

.help-hub-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 0.25rem;
}

.help-hub-tab {
    padding: 0.55rem 1rem;
    border: none;
    border-radius: 8px 8px 0 0;
    background: transparent;
    color: #64748b;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.15s, background 0.15s;
}

.help-hub-tab:hover {
    color: #334155;
    background: #f8fafc;
}

.help-hub-tab.active {
    color: #4f46e5;
    background: #eef2ff;
    box-shadow: inset 0 -2px 0 #4f46e5;
}

.help-tab-panel[hidden] {
    display: none;
}

.help-page-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.help-category-section {
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #ffffff;
    overflow: hidden;
}

.help-category-title {
    margin: 0;
    padding: 0.85rem 1.1rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    font-size: 1rem;
    color: #334155;
}

.help-category-blocks {
    padding: 0.5rem 1.1rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.help-article {
    padding: 0.75rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.help-article:last-child {
    border-bottom: none;
}

.help-article-title {
    margin: 0 0 0.45rem;
    font-size: 0.98rem;
    color: #0f172a;
}

.help-article-body {
    margin: 0;
    font-size: 0.9rem;
    color: #475569;
    line-height: 1.55;
}

.help-empty-hint {
    font-size: 0.88rem;
    color: #94a3b8;
    font-style: italic;
}

.help-hub-footer {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

.changelog-view {
    min-height: 120px;
}

.changelog-timeline {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.changelog-entry {
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #ffffff;
    padding: 1rem 1.15rem;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.changelog-entry-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.55rem;
}

.changelog-entry-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
}

.changelog-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.changelog-badge--neu {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #86efac;
}

.changelog-badge--optimiert {
    background: #dbeafe;
    color: #1d4ed8;
    border: 1px solid #93c5fd;
}

.changelog-badge--fix {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fca5a5;
}

.changelog-badge--default {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
}

.changelog-version {
    font-size: 0.82rem;
    font-weight: 700;
    color: #334155;
    font-family: ui-monospace, "Cascadia Code", "Segoe UI Mono", monospace;
}

.changelog-date {
    font-size: 0.82rem;
    color: #94a3b8;
}

.changelog-entry-title {
    margin: 0 0 0.45rem;
    font-size: 1.05rem;
    color: #0f172a;
}

.changelog-entry-body {
    font-size: 0.9rem;
    color: #475569;
    line-height: 1.55;
}

.changelog-admin-section {
    margin-top: 1.5rem;
}

.changelog-field--wide {
    grid-column: 1 / -1;
}

.changelog-admin-form textarea {
    width: 100%;
    resize: vertical;
    min-height: 120px;
    padding: 0.7rem 0.85rem;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font: inherit;
    color: #0f172a;
    background: #ffffff;
}

.changelog-admin-form textarea:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.18);
}

.changelog-admin-list-wrap {
    margin-top: 1.5rem;
}

.changelog-admin-list-wrap h4 {
    margin: 0 0 0.75rem;
    font-size: 0.95rem;
    color: #334155;
}

.changelog-admin-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.changelog-admin-item .changelog-entry {
    margin: 0;
}

.changelog-admin-empty {
    font-size: 0.88rem;
    color: #94a3b8;
    font-style: italic;
}

.changelog-admin-delete-btn {
    flex-shrink: 0;
    padding: 0.3rem 0.65rem;
    border: 1px solid #fecaca;
    border-radius: 8px;
    background: #fff5f5;
    color: #b91c1c;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
}

.changelog-admin-delete-btn:hover {
    background: #fee2e2;
}

/* ---------- Preiskalkulator ---------- */

.price-calculator-section {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.price-calculator-header h2 {
    margin: 0 0 0.35rem;
    font-size: 1.35rem;
    color: #0f172a;
}

.price-calculator-meta,
.price-calculator-card-intro {
    margin: 0;
    color: #64748b;
    font-size: 0.88rem;
}

.price-calculator-card {
    padding: 1.1rem 1.15rem;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.price-calculator-card h3 {
    margin: 0;
    font-size: 1.05rem;
    color: #0f172a;
}

.price-calculator-subheading {
    margin: 0;
    font-size: 0.92rem;
    color: #334155;
}

.price-calculator-settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
    gap: 0.75rem 1rem;
}

.price-calculator-form-field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.price-calculator-form-field label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
}

.price-calculator-form-field input,
.price-calculator-form-field select {
    padding: 0.45rem 0.6rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.9rem;
}

.price-calculator-field-hint {
    margin: 0.2rem 0 0;
    font-size: 0.78rem;
    color: #64748b;
    line-height: 1.35;
}

.price-calculator-volume-block {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-top: 0.35rem;
}

.price-calculator-radio {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.88rem;
    color: #334155;
    cursor: pointer;
}

.price-calculator-radio input {
    margin: 0;
}

.price-calculator-volume-summary {
    margin: 0;
    padding: 0.55rem 0.7rem;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    font-size: 0.82rem;
    color: #475569;
    line-height: 1.4;
}

.price-calculator-volume-banner {
    margin: 0 0 0.75rem;
    padding: 0.55rem 0.75rem;
    border-radius: 8px;
    background: #ecfeff;
    border: 1px solid #a5f3fc;
    font-size: 0.82rem;
    color: #0f766e;
    line-height: 1.4;
}

.price-calculator-ad-spend-block {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-top: 0.35rem;
}

.price-calculator-ad-spend-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.price-calculator-add-row-btn,
.price-calculator-save-btn,
.price-calculator-refresh-btn {
    padding: 0.5rem 0.9rem;
    border: none;
    border-radius: 8px;
    background: #0f766e;
    color: #ffffff;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
}

.price-calculator-add-row-btn {
    background: #f1f5f9;
    color: #0f172a;
    border: 1px solid #cbd5e1;
}

.price-calculator-add-row-btn:hover,
.price-calculator-save-btn:hover,
.price-calculator-refresh-btn:hover {
    filter: brightness(0.95);
}

.price-calculator-remove-row-btn {
    padding: 0.3rem 0.55rem;
    border: 1px solid #fecaca;
    border-radius: 8px;
    background: #fff5f5;
    color: #b91c1c;
    font-size: 0.78rem;
    cursor: pointer;
}

.price-calculator-table-wrap {
    overflow-x: auto;
}

.price-calculator-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.price-calculator-table th,
.price-calculator-table td {
    padding: 0.55rem 0.65rem;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
    vertical-align: middle;
}

.price-calculator-table thead th {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #64748b;
    background: #f8fafc;
}

.price-calculator-table tfoot th,
.price-calculator-table tfoot td {
    font-weight: 600;
    background: #f8fafc;
    border-top: 2px solid #e2e8f0;
}

.price-calculator-table input[type="text"],
.price-calculator-table input[type="number"] {
    width: 100%;
    min-width: 6rem;
    padding: 0.35rem 0.5rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.88rem;
}

.price-calculator-empty-row td,
.price-calculator-empty-cell {
    color: #94a3b8;
    font-style: italic;
    text-align: center;
}

.price-calculator-status {
    margin: 0;
    font-size: 0.85rem;
    color: #0f766e;
}

.price-calculator-status.is-error {
    color: #b91c1c;
}

.price-calculator-loading,
.price-calculator-error {
    margin: 0;
    font-size: 0.88rem;
}

.price-calculator-error {
    color: #b91c1c;
}

.price-calculator-recipes-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.price-calculator-table--recipes tbody tr {
    cursor: pointer;
}

.price-calculator-table--recipes tbody tr:hover {
    background: #f8fafc;
}

.price-calculator-table--recipes tbody tr.is-expanded {
    background: #f0fdfa;
}

.pc-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}

.pc-status-badge--profit {
    background: #dcfce7;
    color: #166534;
}

.pc-status-badge--loss {
    background: #fee2e2;
    color: #b91c1c;
}

.pc-status-badge--neutral {
    background: #f1f5f9;
    color: #64748b;
}

.pc-material-cell--editable {
    cursor: text;
    color: #b45309;
    background: #fffbeb;
}

.pc-material-cell--editable:hover,
.pc-material-cell--override:hover {
    outline: 1px dashed #94a3b8;
    outline-offset: -1px;
}

.pc-material-cell--override {
    cursor: text;
    font-style: italic;
}

.pc-material-cell-input {
    width: 5.5rem;
    padding: 0.2rem 0.35rem;
    border: 1px solid #0f766e;
    border-radius: 6px;
    font-size: 0.85rem;
}

.price-calculator-breakdown-list--material {
    margin-top: 0.35rem;
    font-size: 0.85rem;
}

.price-calculator-detail-panels {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.price-calculator-detail-panel {
    padding: 0.85rem 1rem;
    border: 1px solid #99f6e4;
    border-radius: 10px;
    background: #f0fdfa;
}

.price-calculator-detail-panel h4 {
    margin: 0 0 0.5rem;
    font-size: 0.95rem;
    color: #0f172a;
}

.price-calculator-breakdown-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.price-calculator-breakdown-list li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.88rem;
    color: #334155;
}

.price-calculator-breakdown-list li strong {
    color: #0f172a;
}

.price-calculator-breakdown-meta {
    margin: 0.35rem 0 0;
    font-size: 0.82rem;
    color: #64748b;
}

.price-calculator-breakdown-total {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid #99f6e4;
    font-weight: 700;
}

@media (max-width: 900px) {
    .price-calculator-table--recipes th:nth-child(n+3),
    .price-calculator-table--recipes td:nth-child(n+3) {
        display: none;
    }
}

/* ===================================================================== */
/* ===== Global Brand Redesign v2 (Logo Option 2) ===================== */
/* ===================================================================== */

/* --- Surfaces & cards --- */
.auth-card,
.sidebar,
.main-tabs,
.recipe-area,
.recipe-db-section,
.vorschau-studio,
.inventory-section,
.price-calculator-card,
.landing-feature-card,
.landing-accordion-item,
.help-category-section,
.landing-pricing-card,
.save-recipe-box,
.add-color-box,
.catalog-section,
.color-swatches,
.recipe-db-save-box,
.ai-prompt-panel,
.bobbel-canvas-wrap,
.admin-card,
.profile-card,
.support-ticket-card,
.shopify-panel,
.konen-orders-panel,
.statistics-card {
    border-radius: var(--brand-radius-card) !important;
    box-shadow: var(--brand-shadow-sm) !important;
    border-color: var(--brand-border-soft) !important;
}

.auth-gate {
    background:
        radial-gradient(ellipse 70% 50% at 50% -10%, rgba(244, 165, 116, 0.12), transparent 55%),
        radial-gradient(ellipse 55% 45% at 100% 100%, rgba(197, 212, 227, 0.35), transparent 50%),
        var(--brand-bg);
}

.auth-card-logo {
    background: linear-gradient(135deg, var(--brand-primary), #334155);
    box-shadow: 0 8px 20px rgba(30, 41, 59, 0.22);
}

.auth-mode-tab.is-active {
    color: var(--brand-primary);
}

.auth-field input:focus,
.auth-field select:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px var(--brand-focus-ring);
}

.auth-submit-btn,
.landing-btn--primary,
.gen-btn,
.analyze-btn,
.recipe-db-save-btn,
.save-preview-btn,
.price-calculator-save-btn,
.price-calculator-refresh-btn,
.add-btn:not(.sm-btn) {
    background: var(--brand-primary) !important;
    color: #fff !important;
    box-shadow: 0 4px 14px rgba(30, 41, 59, 0.2) !important;
}

.auth-submit-btn:hover:not(:disabled),
.landing-btn--primary:hover,
.gen-btn:hover,
.analyze-btn:hover,
.recipe-db-save-btn:hover,
.save-preview-btn:hover,
.price-calculator-save-btn:hover,
.price-calculator-refresh-btn:hover,
.add-btn:not(.sm-btn):hover {
    background: var(--brand-primary-hover) !important;
}

.landing {
    background:
        radial-gradient(ellipse 70% 55% at 50% -8%, rgba(244, 165, 116, 0.14), transparent 60%),
        radial-gradient(ellipse 55% 45% at 100% 8%, rgba(197, 212, 227, 0.28), transparent 55%),
        var(--brand-bg);
}

.landing-btn--primary {
    background: var(--brand-primary);
    border-color: var(--brand-primary);
}

.landing-btn--primary:hover {
    background: var(--brand-primary-hover);
}

.landing-accordion-item:has(.landing-accordion-trigger[aria-expanded="true"]) {
    border-color: var(--brand-secondary);
    box-shadow: 0 12px 28px rgba(30, 41, 59, 0.08);
}

.landing-accordion-icon::before,
.landing-accordion-icon::after {
    background: var(--brand-primary);
}

.landing-hero-yarn--1 { background: var(--brand-accent); }
.landing-hero-yarn--2 { background: var(--brand-secondary); }
.landing-hero-yarn--3 { background: var(--brand-primary); }
.landing-hero-yarn--4 { background: var(--brand-accent-muted); }
.landing-hero-yarn--5 { background: var(--brand-secondary-soft); }

.header {
    background: var(--brand-surface);
    border-bottom: 1px solid var(--brand-border-soft);
}

.header h1,
.header-title {
    color: var(--brand-primary);
    font-family: var(--brand-font);
}

.main-tab.active {
    background: var(--brand-primary) !important;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(30, 41, 59, 0.2) !important;
}

.main-tab:hover:not(.active) {
    background: var(--brand-secondary-soft);
    color: var(--brand-primary);
}

.sidebar,
.main-tabs {
    background: var(--brand-surface);
}

.sidebar-head h2,
.sidebar h2 {
    color: var(--brand-text-muted);
}

/* --- Global form controls --- */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="url"],
input[type="tel"],
textarea,
select,
.garment-select,
#garmentSelect,
.winding-type-select,
#windingTypeSelect,
.price-calculator-form-field input,
.price-calculator-form-field select,
.inventory-form input,
.inventory-form select,
.profile-field input,
.profile-field select,
.profile-field textarea {
    border: 1px solid var(--brand-secondary-border) !important;
    border-radius: var(--brand-radius-input) !important;
    background: var(--brand-surface) !important;
    color: var(--brand-text) !important;
    font-family: var(--brand-font);
    font-variant-numeric: tabular-nums;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--brand-primary) !important;
    box-shadow: 0 0 0 3px var(--brand-focus-ring) !important;
}

/* --- Studio accordions (Designer sidebar) --- */
.studio-accordions {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.studio-accordion {
    border: 1px solid var(--brand-border-soft);
    border-radius: 0.875rem;
    background: var(--brand-surface);
    overflow: hidden;
    box-shadow: var(--brand-shadow-sm);
}

.studio-accordion[open] {
    border-color: var(--brand-secondary);
}

.studio-accordion__trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    cursor: pointer;
    list-style: none;
    user-select: none;
    background: linear-gradient(180deg, #fff 0%, var(--brand-bg) 100%);
}

.studio-accordion__trigger::-webkit-details-marker {
    display: none;
}

.studio-accordion__title {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--brand-primary);
}

.studio-accordion__icon {
    position: relative;
    flex-shrink: 0;
    width: 0.9rem;
    height: 0.9rem;
}

.studio-accordion__icon::before,
.studio-accordion__icon::after {
    content: "";
    position: absolute;
    background: var(--brand-primary);
    border-radius: 2px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.studio-accordion__icon::before {
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    transform: translateY(-50%);
}

.studio-accordion__icon::after {
    left: 50%;
    top: 0;
    width: 2px;
    height: 100%;
    transform: translateX(-50%);
}

.studio-accordion[open] .studio-accordion__icon::after {
    opacity: 0;
    transform: translateX(-50%) scaleY(0);
}

.studio-accordion__panel {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 0.25rem 1rem 1.15rem;
}

.studio-accordion__panel--actions {
    gap: 0.85rem;
}

.sidebar-content {
    gap: 0.65rem;
}

.input-group {
    gap: 0.85rem;
}

/* --- Designer two-column workspace --- */
.designer-workspace {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    min-height: 0;
}

.designer-preview-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
    min-height: min(72vh, 780px);
    padding: 1.5rem 1rem;
    background: linear-gradient(165deg, var(--brand-surface) 0%, var(--brand-bg) 100%);
    border: 1px solid var(--brand-border-soft);
    border-radius: var(--brand-radius-card);
    box-shadow: var(--brand-shadow-sm);
}

#panel-designer {
    gap: 1rem;
}

#panel-designer .preview-area {
    flex: 1 1 auto;
    align-self: stretch;
    width: 100%;
    max-width: none;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

#panel-designer .preview-canvas-stack {
    gap: 0.75rem;
    max-width: min(68vh, 720px);
    margin: 0 auto;
}

#panel-designer .preview-workspace,
#panel-designer .preview-toolbar,
#panel-designer .canvas-wrapper,
#panel-designer #gradientCanvas,
#panel-designer .bg-switch-bar,
#panel-designer .advanced-color-picker-controls,
#panel-designer .preview-image {
    max-width: min(68vh, 720px);
    width: 100%;
}

#panel-designer .preview-workspace {
    max-width: min(68vh, 720px);
}

#panel-designer .canvas-wrapper {
    border-radius: 1rem;
    box-shadow: var(--brand-shadow-md);
}

#panel-designer .bg-switch-label {
    color: var(--brand-text-subtle);
}

#panel-designer .color-swatches-wrap {
    width: 100%;
    max-width: min(68vh, 720px);
}

#panel-designer .color-swatches-heading {
    color: var(--brand-text-muted);
}

#panel-designer .recipe-area {
    flex-shrink: 0;
    background: var(--brand-surface);
    border: 1px solid var(--brand-border-soft);
}

.canvas-wrapper.is-dragover {
    box-shadow: 0 0 0 3px var(--brand-accent), 0 8px 24px rgba(244, 165, 116, 0.28) !important;
}

.inspiration-drop-overlay {
    background: rgba(30, 41, 59, 0.55);
}

.advanced-color-picker-controls {
    border-color: var(--brand-secondary) !important;
    background: linear-gradient(180deg, var(--brand-surface), var(--brand-secondary-soft)) !important;
}

.advanced-color-picker-row label,
.advanced-color-picker-hint {
    color: var(--brand-primary) !important;
}

/* --- Tables: alignment --- */
.recipe-table th,
.recipe-db-table th,
.inventory-table th,
.price-calculator-table th,
.shopify-orders-table th,
.konen-orders-table th,
.statistics-table th {
    color: var(--brand-text-muted);
    font-weight: 600;
}

.recipe-table th:not(.recipe-thread-col):not(.recipe-col-status),
.recipe-table td.td-num,
.recipe-table td.recipe-col-length,
.recipe-table td.recipe-col-consumption,
.recipe-db-table td.td-num,
.recipe-db-table td[data-align="num"],
.price-calculator-table td.td-num,
.price-calculator-table td:nth-child(n+2):not(:last-child),
.inventory-table td.td-num,
.inventory-table td[data-align="num"],
.statistics-table td.td-num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.recipe-table th.recipe-col-section,
.recipe-table td.recipe-col-section,
.recipe-table td.recipe-col-schema,
.recipe-db-table td:first-child,
.inventory-table td:first-child {
    text-align: left;
}

.recipe-table td .inventory-status-badge,
.recipe-db-table .recipe-status-badge,
.inventory-status-badge,
.pc-status-badge,
.status-badge {
    display: inline-flex;
    justify-content: center;
    text-align: center;
    margin-inline: auto;
}

.recipe-db-table td:has(.recipe-status-badge),
.inventory-table td:has(.inventory-status-badge) {
    text-align: center;
}

/* --- Status badges (pastel brand tones) --- */
.inventory-status-badge--ok,
.pc-status-badge--ok,
.recipe-status-badge--wound,
.recipe-status-badge--shop {
    background: var(--brand-secondary-soft);
    color: var(--brand-primary);
    border: 1px solid var(--brand-secondary);
}

.inventory-status-badge--low,
.pc-status-badge--warn,
.recipe-status-badge--photo {
    background: var(--brand-accent-soft);
    color: #9a4a2a;
    border: 1px solid var(--brand-accent-muted);
}

.inventory-status-badge--missing,
.pc-status-badge--bad,
.recipe-status-badge--todo {
    background: #fce8e6;
    color: #9f2d2d;
    border: 1px solid #f5c4c0;
}

.recipe-db-filter.active,
.help-hub-tab.active {
    background: var(--brand-primary) !important;
    color: #fff !important;
    box-shadow: inset 0 -2px 0 var(--brand-accent) !important;
}

.recipe-db-filter--archive.active {
    background: var(--brand-secondary-soft) !important;
    color: var(--brand-primary) !important;
    box-shadow: inset 0 -2px 0 var(--brand-secondary) !important;
}

.help-hub-tab.active {
    background: var(--brand-secondary-soft) !important;
    color: var(--brand-primary) !important;
}

.price-calculator-add-row-btn,
.price-calculator-save-btn,
.price-calculator-refresh-btn {
    background: var(--brand-primary) !important;
}

.price-calculator-volume-banner {
    background: var(--brand-secondary-soft);
    border-color: var(--brand-secondary);
    color: var(--brand-primary);
}

.layout {
    background: transparent;
    gap: 1.15rem;
    padding: 1.15rem;
}

.sidebar {
    padding: 1rem;
}

.gen-btn {
    width: 100%;
    padding: 0.9rem 1rem;
    font-size: 0.95rem;
    font-weight: 700;
    border: none;
    border-radius: 0.75rem;
    cursor: pointer;
}

.palette-manage-btn,
.export-btn,
.import-btn,
.recipe-category-manage-btn {
    border-color: var(--brand-secondary-border);
    color: var(--brand-primary);
}

.available-only-toggle-track {
    background: var(--brand-secondary-soft);
}

.available-only-toggle input:checked + .available-only-toggle-track {
    background: var(--brand-primary);
}

.material-cost-toggle-label {
    color: var(--brand-primary);
}

@media (max-width: 768px) {
    .designer-preview-stage {
        min-height: auto;
        padding: 1rem 0.75rem;
    }

    #panel-designer .preview-canvas-stack,
    #panel-designer .canvas-wrapper,
    #panel-designer #gradientCanvas,
    #panel-designer .bg-switch-bar {
        max-width: 100%;
    }

    .designer-view-switch {
        margin-bottom: 0.5rem;
    }
}

/* ===================================================================== */
/* ===== Designer: Rezept-Design vs. Tuch-Studio ====================== */
/* ===================================================================== */

.designer-view-switch {
    display: flex;
    gap: 0.35rem;
    padding: 0.3rem;
    background: var(--brand-surface);
    border: 1px solid var(--brand-border-soft);
    border-radius: 999px;
    box-shadow: var(--brand-shadow-sm);
    align-self: stretch;
    width: 100%;
    max-width: 420px;
    margin: 0 auto 0.5rem;
}

.designer-view-btn {
    flex: 1;
    padding: 0.68rem 1rem;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: var(--brand-text-muted);
    font-family: var(--brand-font);
    font-size: 0.86rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.designer-view-btn:hover:not(.is-active) {
    background: var(--brand-secondary-soft);
    color: var(--brand-primary);
}

.designer-view-btn.is-active {
    background: var(--brand-primary);
    color: #fff;
    box-shadow: 0 4px 14px rgba(30, 41, 59, 0.18);
}

.designer-view-btn.is-active[data-designer-view="studio"] {
    background: linear-gradient(135deg, var(--brand-primary) 0%, #334155 72%, var(--brand-accent-strong) 160%);
    box-shadow: 0 4px 16px rgba(244, 165, 116, 0.22);
}

.designer-view-panel {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-height: 0;
}

.designer-view-panel[hidden] {
    display: none !important;
}

.designer-integrated-studio.vorschau-studio {
    background: linear-gradient(180deg, var(--brand-surface) 0%, var(--brand-bg) 100%);
    border-color: var(--brand-border-soft);
    box-shadow: var(--brand-shadow-md);
}

.designer-integrated-studio .ai-prompt-panel {
    border-color: var(--brand-border-soft);
    background: var(--brand-surface);
    box-shadow: var(--brand-shadow-sm);
}

.designer-integrated-studio .ai-prompt-heading {
    color: var(--brand-primary);
}

/* ===================================================================== */
/* ===== Produktion (eigenständige Seite) ============================== */
/* ===================================================================== */

.produktion-studio {
    display: flex;
    flex-direction: column;
    gap: 1.35rem;
    padding: 1.5rem;
    min-height: 0;
    background: linear-gradient(165deg, var(--brand-surface) 0%, var(--brand-bg) 55%, var(--brand-accent-soft) 160%);
    border: 1px solid var(--brand-border-soft);
    border-radius: var(--brand-radius-card);
    box-shadow: var(--brand-shadow-md);
}

.produktion-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.produktion-header h2 {
    margin: 0;
    font-size: 1.65rem;
    color: var(--brand-primary);
    letter-spacing: -0.02em;
}

.produktion-meta {
    margin: 0.35rem 0 0;
    color: var(--brand-text-muted);
    font-size: 0.92rem;
    max-width: 42rem;
}

.produktion-print-btn {
    align-self: flex-start;
}

.produktion-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}

.produktion-control-card {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding: 1rem 1.1rem;
    background: var(--brand-surface);
    border: 1px solid var(--brand-border-soft);
    border-radius: var(--brand-radius-input);
    box-shadow: var(--brand-shadow-sm);
}

.produktion-control-card label,
.produktion-config-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--brand-text-muted);
}

.produktion-recipe-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.produktion-select {
    flex: 1 1 200px;
    min-width: 0;
    padding: 0.62rem 2rem 0.62rem 0.75rem;
    border: 1px solid var(--brand-border);
    border-radius: var(--brand-radius-input);
    background: var(--brand-bg);
    color: var(--brand-text);
    font-family: var(--brand-font);
    font-size: 0.9rem;
}

.produktion-load-btn {
    padding: 0.62rem 1.1rem;
    border: none;
    border-radius: var(--brand-radius-input);
    background: linear-gradient(135deg, var(--brand-primary) 0%, #334155 100%);
    color: #fff;
    font-family: var(--brand-font);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 4px 14px rgba(30, 41, 59, 0.16);
}

.produktion-load-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(30, 41, 59, 0.2);
}

.produktion-config-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.produktion-config-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.produktion-config-key {
    font-size: 0.72rem;
    color: var(--brand-text-subtle);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.produktion-config-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--brand-primary);
}

.produktion-recipe-area {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    padding: 1.2rem 1.25rem;
    background: var(--brand-surface);
    border: 1px solid var(--brand-border-soft);
    border-radius: var(--brand-radius-card);
    box-shadow: var(--brand-shadow-sm);
}

.produktion-recipe-head h3 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--brand-primary);
}

.produktion-recipe-meta {
    margin-top: 0.35rem;
}

.produktion-table-wrap {
    margin-top: 0.25rem;
}

.produktion-recipe-table {
    font-size: 0.95rem;
}

#panel-produktion .production-winding-banner {
    margin-top: 0.65rem;
}

#panel-produktion .production-quantity-badge {
    margin-top: 0.45rem;
    padding: 0.55rem 0.75rem;
    background: var(--brand-accent-soft);
    border: 1px solid var(--brand-accent-muted);
    border-radius: var(--brand-radius-input);
    color: var(--brand-primary);
    font-size: 0.88rem;
}

.recipe-table--hide-status .recipe-col-status,
.recipe-table--hide-status .recipe-section-status-cell {
    display: none;
}

.recipe-table--hide-status col.recipe-col-status {
    width: 0 !important;
}

.recipe-table tbody tr.recipe-row--wound-done {
    background: rgba(232, 238, 244, 0.55);
    opacity: 0.62;
}

.recipe-table tbody tr.recipe-row--wound-done td {
    color: var(--brand-text-subtle);
}

.recipe-table tbody tr.recipe-row--wound-done .recipe-section-status-cell,
.recipe-table tbody tr.recipe-row--wound-done .recipe-section-status-label {
    opacity: 1;
}

.recipe-table tbody tr.recipe-row--wound-done .recipe-col-schema {
    color: var(--brand-text-muted);
}

.recipe-table tbody tr.recipe-row--wound-done .recipe-thread-cell-name {
    opacity: 0.75;
}

#panel-designer .gen-btn {
    margin-top: 0.35rem;
}

/* ===================================================================== */
/* ===== Farb-Zentrale & kompakte Sidebar-Palette ====================== */
/* ===================================================================== */

.palette-compact-meta {
    margin: 0.15rem 0 0.45rem;
    font-size: 0.78rem;
    color: var(--brand-text-muted);
}

.palette-compact-toolbar {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin-top: 0.35rem;
}

.palette-compact-toolbar .palette-search-input {
    margin: 0;
}

.palette-compact-filters {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem;
}

.palette-compact-filter-field {
    display: flex;
    flex-direction: column;
    gap: 0.18rem;
    min-width: 0;
}

.palette-compact-filter-field label {
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--brand-text-muted);
}

.palette-compact-filter-select {
    width: 100%;
    padding: 0.42rem 0.5rem;
    border: 1px solid var(--brand-secondary-border);
    border-radius: 0.55rem;
    background: var(--brand-surface);
    color: var(--brand-text);
    font-family: var(--brand-font);
    font-size: 0.78rem;
}

.palette-search-input {
    width: 100%;
    margin: 0.35rem 0 0.5rem;
    padding: 0.62rem 0.85rem 0.62rem 2.15rem;
    border: 1px solid var(--brand-secondary-border);
    border-radius: 0.75rem;
    background:
        var(--brand-surface)
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E")
        no-repeat 0.7rem center;
    color: var(--brand-text);
    font-family: var(--brand-font);
    font-size: 0.88rem;
    box-shadow: var(--brand-shadow-sm);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.palette-search-input::placeholder {
    color: var(--brand-text-subtle);
}

.palette-search-input:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px var(--brand-focus-ring);
}

.palette-search-input--hub {
    flex: 1 1 14rem;
    min-width: min(100%, 14rem);
    margin: 0;
}

.palette-search-empty {
    width: 100%;
    margin: 0;
    padding: 0.85rem 0.25rem;
    font-size: 0.82rem;
    color: var(--brand-text-muted);
    text-align: center;
}

.color-hub-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.85rem;
    margin-bottom: 0.75rem;
}

.palette-compact-grid-scroll {
    max-height: 17rem;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 0.85rem 0.65rem;
    background: var(--brand-surface);
    border: 1px solid var(--brand-border-soft);
    border-radius: 0.75rem;
    box-shadow: var(--brand-shadow-sm);
}

.palette-compact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(5rem, 1fr));
    gap: 0.65rem;
    overflow: visible;
    padding: 0.35rem;
}

.swatch-wrapper--dragging {
    opacity: 0.55;
    transform: scale(0.96);
}

.palette-compact-swatch {
    display: flex;
    flex-direction: column;
    width: 100%;
    aspect-ratio: 1;
    min-height: 5rem;
    border: 1px solid rgba(30, 41, 59, 0.14);
    border-radius: 0.6rem;
    cursor: pointer;
    padding: 0;
    overflow: hidden;
    background: var(--brand-surface);
    position: relative;
    z-index: 1;
    transform-origin: center center;
    transition:
        transform 0.24s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.24s ease,
        z-index 0s linear 0.24s;
}

.palette-compact-swatch-color {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
}

.palette-compact-swatch-label {
    flex: 0 0 auto;
    padding: 0.22rem 0.28rem 0.26rem;
    font-size: 0.62rem;
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: 0.01em;
    text-align: center;
    color: var(--brand-primary);
    background: rgba(255, 255, 255, 0.94);
    border-top: 1px solid rgba(30, 41, 59, 0.08);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: font-size 0.22s ease, padding 0.22s ease, background 0.22s ease;
}

.palette-compact-swatch:hover:not(:disabled) {
    transform: scale(1.48);
    z-index: 30;
    box-shadow:
        0 16px 34px rgba(30, 41, 59, 0.24),
        0 4px 12px rgba(30, 41, 59, 0.14);
    transition:
        transform 0.24s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.24s ease,
        z-index 0s linear 0s;
}

.palette-compact-swatch:hover:not(:disabled) .palette-compact-swatch-label {
    font-size: 0.82rem;
    font-weight: 700;
    padding: 0.34rem 0.38rem 0.38rem;
    background: #fff;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    line-height: 1.2;
}

.palette-compact-swatch:focus-visible {
    outline: none;
    transform: scale(1.48);
    z-index: 30;
    box-shadow:
        0 10px 22px rgba(30, 41, 59, 0.18),
        0 0 0 3px var(--brand-focus-ring);
}

.palette-compact-swatch:focus-visible .palette-compact-swatch-label {
    font-size: 0.82rem;
    font-weight: 700;
    padding: 0.34rem 0.38rem 0.38rem;
    background: #fff;
    white-space: normal;
    overflow: visible;
}

.palette-compact-swatch.is-chosen {
    box-shadow:
        0 0 0 2px var(--brand-surface),
        0 0 0 3.5px var(--brand-accent-strong);
}

.palette-compact-swatch.is-chosen:hover:not(:disabled) {
    box-shadow:
        0 10px 22px rgba(30, 41, 59, 0.18),
        0 0 0 2px var(--brand-surface),
        0 0 0 3.5px var(--brand-accent-strong);
}

.palette-compact-swatch.is-unavailable {
    opacity: 0.42;
    cursor: not-allowed;
}

.palette-compact-swatch.is-unavailable .palette-compact-swatch-label {
    color: var(--brand-text-muted);
}

.palette-compact-swatch.is-hidden-test {
    outline: 2px dashed var(--brand-accent-muted);
    outline-offset: 1px;
}

.color-hub-open-btn {
    width: 100%;
    margin-top: 0.65rem;
    padding: 0.72rem 0.9rem;
    border: 1px solid var(--brand-secondary-border);
    border-radius: 0.75rem;
    background: linear-gradient(180deg, var(--brand-surface) 0%, var(--brand-accent-soft) 100%);
    color: var(--brand-primary);
    font-family: var(--brand-font);
    font-size: 0.86rem;
    font-weight: 700;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.color-hub-open-btn:hover {
    border-color: var(--brand-accent);
    box-shadow: 0 6px 18px rgba(244, 165, 116, 0.18);
    transform: translateY(-1px);
}

.glitz-compact-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.45rem 0.65rem;
    margin-top: 0.75rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--brand-border-soft);
    border-radius: 0.75rem;
    background: var(--brand-secondary-soft);
}

.glitz-compact-picker {
    position: relative;
    flex: 1 1 100%;
    min-width: 0;
}

.glitz-compact-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.45rem;
    width: 100%;
    padding: 0.45rem 0.65rem;
    border: 1px solid var(--brand-secondary-border);
    border-radius: 0.65rem;
    background: var(--brand-surface);
    color: var(--brand-primary);
    font-family: var(--brand-font);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.glitz-compact-trigger:hover,
.glitz-compact-picker.is-open .glitz-compact-trigger {
    border-color: var(--brand-accent);
    box-shadow: 0 0 0 3px var(--brand-focus-ring);
}

.glitz-compact-label {
    flex: 1;
    min-width: 0;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--brand-primary);
}

.glitz-compact-chevron {
    flex-shrink: 0;
    font-size: 0.72rem;
    color: var(--brand-text-muted);
    transition: transform 0.15s ease;
}

.glitz-compact-picker.is-open .glitz-compact-chevron {
    transform: rotate(180deg);
}

.glitz-compact-menu {
    position: fixed;
    z-index: 1400;
    max-height: min(16rem, 42vh);
    overflow-y: auto;
    padding: 0.55rem;
    border: 1px solid var(--brand-secondary-border);
    border-radius: 0.75rem;
    background: var(--brand-surface);
    box-shadow: var(--brand-shadow-md);
}

.glitz-compact-menu-empty {
    margin: 0;
    padding: 0.35rem 0.15rem;
    font-size: 0.78rem;
    color: var(--brand-text-muted);
    text-align: center;
}

.glitz-compact-menu-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.glitz-compact-menu-swatch {
    width: 2.15rem;
    height: 2.15rem;
    border: 2px solid rgba(30, 41, 59, 0.12);
    border-radius: 0.55rem;
    cursor: pointer;
    pointer-events: auto;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.glitz-compact-menu-swatch:hover {
    transform: scale(1.08);
}

.glitz-compact-menu-swatch.is-active {
    box-shadow: 0 0 0 2px var(--brand-surface), 0 0 0 3.5px var(--brand-accent-strong);
}

.glitz-compact-pick-btn {
    margin-left: auto;
    padding: 0.3rem 0.55rem;
    border: 1px solid var(--brand-secondary-border);
    border-radius: 999px;
    background: var(--brand-surface);
    color: var(--brand-primary);
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
}

.color-hub-modal {
    padding: 0;
    align-items: stretch;
}

.color-hub-modal .studio-modal-backdrop {
    z-index: 0;
    background: rgba(30, 41, 59, 0.52);
    backdrop-filter: blur(6px);
}

.color-hub-modal .studio-modal-panel {
    z-index: 1;
}

.studio-modal-panel--fullscreen,
.color-hub-panel {
    width: min(100%, 1440px);
    max-width: 100vw;
    height: min(100vh, 100dvh);
    max-height: 100dvh;
    margin: 0 auto;
    border-radius: 0;
    box-shadow: none;
}

.color-hub-header {
    padding: 1rem 1.35rem;
    background: linear-gradient(180deg, var(--brand-surface) 0%, var(--brand-bg) 100%);
}

.color-hub-eyebrow {
    margin: 0 0 0.2rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--brand-accent-strong);
}

.color-hub-header-copy h3 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--brand-primary);
}

.color-hub-layout {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(220px, 260px) minmax(0, 1fr) minmax(240px, 300px);
    gap: 0;
    overflow: hidden;
}

.color-hub-sidebar,
.color-hub-aside {
    overflow-y: auto;
    padding: 1rem;
    background: var(--brand-bg);
    border-right: 1px solid var(--brand-border-soft);
}

.color-hub-aside {
    border-right: none;
    border-left: 1px solid var(--brand-border-soft);
}

.color-hub-sidebar-block + .color-hub-sidebar-block {
    margin-top: 1.25rem;
    padding-top: 1.1rem;
    border-top: 1px solid var(--brand-border-soft);
}

.color-hub-sidebar-head h4,
.color-hub-add-card h4,
.color-hub-glitz-card h4 {
    margin: 0 0 0.35rem;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--brand-primary);
}

.color-hub-sidebar-hint,
.color-hub-toolbar-hint,
.color-hub-add-hint {
    margin: 0;
    font-size: 0.74rem;
    line-height: 1.4;
    color: var(--brand-text-muted);
}

.color-hub-dnd-list {
    list-style: none;
    margin: 0.55rem 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.color-hub-dnd-item {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 0.6rem;
    border: 1px solid var(--brand-border-soft);
    border-radius: 0.65rem;
    background: var(--brand-surface);
    cursor: grab;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.color-hub-dnd-item.is-dragging {
    opacity: 0.55;
    cursor: grabbing;
}

.color-hub-dnd-item.is-drop-target {
    border-color: var(--brand-accent);
    background: var(--brand-accent-soft);
    box-shadow: 0 0 0 2px rgba(244, 165, 116, 0.25);
}

.color-hub-dnd-handle {
    color: var(--brand-text-subtle);
    font-size: 0.85rem;
    line-height: 1;
    user-select: none;
}

.color-hub-dnd-label {
    flex: 1;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--brand-primary);
}

.color-hub-dnd-meta {
    font-size: 0.72rem;
    color: var(--brand-text-muted);
}

.color-hub-inline-add {
    display: flex;
    gap: 0.35rem;
    margin-top: 0.55rem;
}

.color-hub-inline-add input {
    flex: 1;
    min-width: 0;
    padding: 0.45rem 0.55rem;
    border: 1px solid var(--brand-secondary-border);
    border-radius: 0.55rem;
    font-size: 0.82rem;
}

.color-hub-inline-add-btn {
    width: 2.1rem;
    border: none;
    border-radius: 0.55rem;
    background: var(--brand-primary);
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
}

.color-hub-main {
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 1rem 1.1rem;
    background: var(--brand-surface);
    overflow: hidden;
}

.color-hub-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.85rem;
    margin-bottom: 0.75rem;
}

.color-hub-sort-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--brand-text-muted);
}

.color-hub-sort-select {
    min-width: 12rem;
    padding: 0.45rem 0.6rem;
    border: 1px solid var(--brand-secondary-border);
    border-radius: 0.55rem;
    font-size: 0.84rem;
}

.color-hub-tabs {
    flex-shrink: 0;
}

.color-hub-palette {
    flex: 1;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
    margin-top: 0.5rem;
}

.color-hub-add-card,
.color-hub-glitz-card {
    padding: 0.9rem;
    border: 1px solid var(--brand-border-soft);
    border-radius: 0.85rem;
    background: var(--brand-surface);
    box-shadow: var(--brand-shadow-sm);
}

.color-hub-glitz-card {
    margin-top: 1rem;
}

.color-hub-add-card label {
    display: block;
    margin: 0.65rem 0 0.25rem;
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--brand-text-muted);
}

.color-hub-add-card label:first-of-type {
    margin-top: 0.35rem;
}

.color-hub-add-card select,
.color-hub-add-card input[type="text"] {
    width: 100%;
    padding: 0.48rem 0.55rem;
    border: 1px solid var(--brand-secondary-border);
    border-radius: 0.55rem;
    font-size: 0.84rem;
}

.color-hub-add-row {
    display: flex;
    gap: 0.45rem;
    align-items: center;
}

.color-hub-add-row input[type="color"] {
    width: 3rem;
    height: 2.35rem;
    padding: 0.15rem;
    border: 1px solid var(--brand-secondary-border);
    border-radius: 0.55rem;
    background: var(--brand-surface);
}

.color-hub-add-save-btn {
    flex: 1;
}

.color-hub-glitz-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.55rem;
}

.color-hub-glitz-swatch {
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 0.55rem;
    border: 2px solid rgba(30, 41, 59, 0.12);
    cursor: pointer;
    pointer-events: auto;
    position: relative;
    z-index: 1;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.color-hub-glitz-swatch.is-active {
    box-shadow: 0 0 0 2px var(--brand-surface), 0 0 0 3.5px var(--brand-accent-strong);
    transform: scale(1.05);
}

@media (max-width: 1100px) {
    .color-hub-layout {
        grid-template-columns: minmax(200px, 220px) minmax(0, 1fr);
    }

    .color-hub-aside {
        grid-column: 1 / -1;
        border-left: none;
        border-top: 1px solid var(--brand-border-soft);
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }

    .color-hub-glitz-card {
        margin-top: 0;
    }
}

@media (max-width: 768px) {
    .studio-modal-panel--fullscreen,
    .color-hub-panel {
        height: 100dvh;
    }

    .color-hub-layout {
        grid-template-columns: 1fr;
        overflow-y: auto;
    }

    .color-hub-sidebar {
        border-right: none;
        border-bottom: 1px solid var(--brand-border-soft);
    }

    .color-hub-aside {
        grid-template-columns: 1fr;
    }
}

/* ===== Rezept-Datenbank v2 (kompakt, aufklappbar) ===== */

.recipe-delete-modal-panel {
    border: 1px solid #f0d4d2;
    box-shadow: 0 20px 48px rgba(30, 41, 59, 0.18), 0 0 0 1px rgba(180, 83, 75, 0.08);
}

.recipe-delete-modal-header {
    border-bottom-color: #f5e0de;
}

.recipe-delete-modal-header h3 {
    color: #9f2d2d;
    font-size: 1.05rem;
}

.recipe-delete-modal-text {
    margin: 0 0 1.1rem;
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--brand-text);
}

.recipe-delete-modal-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem;
}

.recipe-delete-modal-btn {
    padding: 0.55rem 1rem;
    border-radius: var(--brand-radius-input);
    font-size: 0.84rem;
    font-weight: 600;
    font-family: var(--brand-font);
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.recipe-delete-modal-btn--cancel {
    border: 1px solid var(--brand-border-soft);
    background: var(--brand-surface);
    color: var(--brand-primary);
}

.recipe-delete-modal-btn--cancel:hover {
    background: var(--brand-secondary-soft);
}

.recipe-delete-modal-btn--danger {
    border: 1px solid #e8b4b0;
    background: #fdf0ef;
    color: #b4534b;
}

.recipe-delete-modal-btn--danger:hover {
    background: #fae2e0;
    border-color: #d99a95;
}

.recipe-db-dropzone {
    min-height: 52px;
    padding: 0.5rem 0.65rem;
    border-color: var(--brand-border-soft);
    background: var(--brand-bg);
}

.recipe-db-dropzone:hover {
    border-color: var(--brand-secondary-border);
    background: var(--brand-secondary-soft);
}

.recipe-db-dropzone.is-dragover {
    border-color: var(--brand-primary);
    background: var(--brand-secondary-soft);
    box-shadow: 0 0 0 3px var(--brand-focus-ring);
}

.recipe-db-folder-btn {
    border-color: var(--brand-border-soft);
    color: var(--brand-primary);
    background: var(--brand-surface);
}

.recipe-db-folder-btn:hover {
    border-color: var(--brand-secondary-border);
    background: var(--brand-secondary-soft);
}

.recipe-category-manage-btn {
    border-color: var(--brand-secondary-border);
    background: var(--brand-primary);
    box-shadow: 0 4px 12px rgba(30, 41, 59, 0.18);
}

.recipe-category-manage-btn:hover {
    box-shadow: 0 6px 16px rgba(30, 41, 59, 0.22);
}

@media (max-width: 900px) {
    .recipe-db-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .recipe-db-search-wrap {
        max-width: none;
        margin-left: 0;
    }

    .recipe-db-detail-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .recipe-db-table {
        min-width: 520px;
    }
}

/* ===== Designer Workflow (Mitte, chronologisch) ====================== */

.designer-workflow {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    margin-bottom: 1.15rem;
    padding-bottom: 1.15rem;
    border-bottom: 1px solid var(--brand-border-soft);
}

.designer-color-chain-wrap {
    text-align: center;
}

.designer-color-chain-label {
    margin: 0 0 0.55rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--brand-text-muted);
}

.designer-color-chain-hint {
    margin: 0.45rem 0 0;
    font-size: 0.72rem;
    color: var(--brand-text-subtle);
}

.designer-color-chain {
    min-height: 4.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 0.75rem;
    background: linear-gradient(180deg, var(--brand-bg) 0%, var(--brand-surface) 100%);
    border: 1px solid var(--brand-border-soft);
    border-radius: var(--brand-radius-card);
    box-shadow: var(--brand-shadow-sm);
}

.designer-color-chain-empty {
    margin: 0;
    font-size: 0.88rem;
    color: var(--brand-text-subtle);
    font-style: italic;
}

.designer-color-chain-track {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: center;
    gap: 0.55rem 0.65rem;
    width: 100%;
}

.designer-color-chain-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.28rem;
    min-width: 3.4rem;
    cursor: grab;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.designer-color-chain-item.is-dragging {
    opacity: 0.45;
    cursor: grabbing;
}

.designer-color-chain-item.drag-over {
    transform: translateY(-3px);
}

.designer-color-chain-item.is-permanent .designer-color-chain-dot {
    box-shadow: 0 0 0 2px var(--brand-primary), 0 4px 12px rgba(30, 41, 59, 0.18);
}

.designer-color-chain-order {
    font-size: 0.62rem;
    font-weight: 700;
    color: var(--brand-text-subtle);
    line-height: 1;
}

.designer-color-chain-dot {
    position: relative;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border: 2px solid rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    box-shadow: 0 3px 10px rgba(30, 41, 59, 0.16);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.designer-color-chain-dot:hover {
    transform: scale(1.06);
}

.designer-color-chain-pin {
    position: absolute;
    top: -4px;
    right: -4px;
    font-size: 0.72rem;
    line-height: 1;
    pointer-events: none;
}

.designer-color-chain-pin-btn {
    flex: 0 0 auto;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    padding: 2px 4px;
    border-radius: 6px;
}

.designer-color-chain-pin-btn:hover:not(:disabled) {
    background: rgba(37, 99, 235, 0.1);
}

.designer-color-chain-pin-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}
    position: absolute;
    right: -0.15rem;
    top: -0.2rem;
    font-size: 0.72rem;
    line-height: 1;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.designer-color-chain-name {
    max-width: 5.5rem;
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--brand-text-muted);
    line-height: 1.2;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
}

.designer-color-chain-remove {
    width: 1.25rem;
    height: 1.25rem;
    padding: 0;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: var(--brand-text-subtle);
    font-size: 0.85rem;
    line-height: 1;
    cursor: pointer;
}

.designer-color-chain-remove:hover {
    background: #fdf0ef;
    color: #b4534b;
}

.designer-gen-btn {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    padding: 1rem 1.35rem !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.02em;
}

.designer-recipe-meta-box {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    background: var(--brand-bg);
    border: 1px solid var(--brand-border-soft);
    border-radius: var(--brand-radius-card);
}

.designer-recipe-meta-fields {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    gap: 0.75rem 1rem;
}

.designer-recipe-field label,
.designer-recipe-field .recipe-category-select-label {
    display: block;
    margin-bottom: 0.3rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--brand-text-muted);
}

.designer-recipe-field input[type="text"] {
    width: 100%;
    padding: 0.55rem 0.7rem;
    border: 1px solid var(--brand-border-soft);
    border-radius: var(--brand-radius-input);
    font-family: var(--brand-font);
    font-size: 0.9rem;
    color: var(--brand-text);
    background: var(--brand-surface);
}

.designer-recipe-field input[type="text"]:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px var(--brand-focus-ring);
}

.designer-save-btn {
    width: 100%;
    padding: 0.75rem 1rem !important;
    font-size: 0.92rem !important;
}

/* Ärmel-Bobbel: sequentielle Produktions-Checkliste */
.recipe-bobbel-group-header td {
    padding: 0.55rem 0.75rem !important;
    background: var(--brand-secondary-soft);
    border-bottom: 1px solid var(--brand-border-soft) !important;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--brand-primary);
}

.recipe-bobbel-separator-row td {
    padding: 0.65rem 0.75rem !important;
    background: linear-gradient(180deg, #fff8f0 0%, var(--brand-bg) 100%);
    border-top: 2px dashed var(--brand-accent-muted) !important;
    border-bottom: 2px dashed var(--brand-accent-muted) !important;
}

.recipe-bobbel-separator-card {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.45rem 0.65rem;
    text-align: center;
    font-size: 0.82rem;
    color: var(--brand-primary);
}

.recipe-bobbel-separator-line {
    font-weight: 600;
}

.recipe-bobbel-separator-arrow {
    font-size: 1.1rem;
    color: var(--brand-accent-strong);
}

.recipe-bobbel-separator-next {
    padding: 0.28rem 0.65rem;
    border-radius: 999px;
    background: var(--brand-primary);
    color: #fff;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
}

@media (max-width: 768px) {
    .designer-recipe-meta-fields {
        grid-template-columns: 1fr;
    }

    .designer-color-chain-dot {
        width: 2.15rem;
        height: 2.15rem;
    }
}

.translation-admin-section {
    margin-top: 2rem;
}

.translation-admin-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.translation-admin-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.translation-admin-search {
    min-width: min(100%, 280px);
    padding: 0.55rem 0.85rem;
    border: 1px solid var(--border-subtle, #d8dee9);
    border-radius: 8px;
    background: var(--surface-elevated, #fff);
    font: inherit;
}

.translation-admin-secondary-btn {
    padding: 0.55rem 0.85rem;
    border: 1px solid var(--brand-secondary-border, #b8c9db);
    border-radius: 8px;
    background: var(--brand-surface, #fff);
    color: var(--brand-primary, #1e293b);
    font-family: var(--brand-font, inherit);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.translation-admin-secondary-btn:hover:not(:disabled) {
    border-color: var(--brand-accent, #f4a574);
    background: var(--brand-accent-soft, #fde8d8);
}

.translation-admin-secondary-btn:disabled {
    opacity: 0.65;
    cursor: wait;
}

.translation-admin-table-wrap {
    overflow: auto;
    border: 1px solid var(--border-subtle, #d8dee9);
    border-radius: 12px;
    background: var(--surface-elevated, #fff);
}

.translation-admin-table {
    width: 100%;
    min-width: 960px;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.translation-admin-table th,
.translation-admin-table td {
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid var(--border-subtle, #e5e9f0);
    vertical-align: top;
    text-align: left;
}

.translation-admin-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--surface-muted, #f4f6f9);
    font-weight: 600;
    white-space: nowrap;
}

.translation-admin-key code {
    display: block;
    font-size: 0.78rem;
    color: var(--text-muted, #5c6778);
    word-break: break-all;
}

.translation-admin-area {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.82rem;
    color: var(--text-primary, #1a1f2c);
    font-weight: 500;
}

.translation-admin-de {
    color: var(--text-primary, #1a1f2c);
    min-width: 180px;
    max-width: 280px;
}

.translation-admin-input {
    width: 100%;
    min-width: 140px;
    padding: 0.45rem 0.6rem;
    border: 1px solid var(--border-subtle, #d8dee9);
    border-radius: 6px;
    font: inherit;
    background: #fff;
}

.translation-admin-input--placeholder {
    background: var(--surface-muted, #f8f9fb);
    color: var(--text-muted, #8b95a5);
    cursor: not-allowed;
}

.translation-admin-input:focus {
    outline: 2px solid var(--brand-primary, #2563eb);
    outline-offset: 1px;
    border-color: transparent;
}

/* --- KI-Credits Badge --- */
.ai-credits-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    border: 1px solid #6ee7b7;
    font-size: 0.78rem;
    font-weight: 600;
    color: #065f46;
}

.ai-credits-badge[hidden] {
    display: none !important;
}

.ai-credits-badge__icon {
    font-size: 0.9rem;
}

/* --- Dashboard / Mind-Clearer --- */
.dashboard-studio,
.trend-radar-studio,
.subscription-studio {
    padding: 1rem 1.25rem 2rem;
}

.dashboard-header,
.trend-radar-header,
.subscription-header {
    margin-bottom: 1.25rem;
}

.dashboard-meta,
.trend-radar-meta,
.subscription-meta {
    color: var(--brand-text-muted, #64748b);
    margin-top: 0.35rem;
}

.mind-clearer-card,
.trend-radar-card,
.subscription-card {
    background: var(--brand-surface, #fff);
    border: 1px solid var(--brand-border-soft, #e2e8f0);
    border-radius: var(--brand-radius-card, 12px);
    padding: 1rem 1.1rem;
    margin-bottom: 1rem;
    box-shadow: var(--brand-shadow-sm, 0 1px 3px rgba(0, 0, 0, 0.06));
}

.mind-clearer-input-wrap {
    position: relative;
}

.mind-clearer-input {
    width: 100%;
    min-height: 120px;
    padding: 0.75rem 3.75rem 0.75rem 0.75rem;
    border: 1px solid var(--brand-border-soft, #cbd5e1);
    border-radius: 10px;
    font: inherit;
    resize: vertical;
}

.mind-clearer-dictation-btn {
    position: absolute;
    top: 0.55rem;
    right: 0.55rem;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    min-width: 3rem;
    padding: 0.45rem 0.5rem;
    border: 1px solid #99f6e4;
    border-radius: 12px;
    background: linear-gradient(180deg, #ecfdf5, #d1fae5);
    color: #065f46;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.1;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.mind-clearer-dictation-btn:hover:not(:disabled) {
    border-color: #2dd4bf;
    box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.18);
}

.mind-clearer-dictation-btn.is-active {
    border-color: #ef4444;
    background: linear-gradient(180deg, #fef2f2, #fee2e2);
    color: #b91c1c;
    animation: mind-clearer-pulse 1.2s ease-in-out infinite;
}

.mind-clearer-dictation-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.mind-clearer-dictation-btn__icon {
    font-size: 1.15rem;
    line-height: 1;
}

@keyframes mind-clearer-pulse {
    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.35);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
    }
}

.mind-clearer-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.mind-clearer-submit-btn,
.trend-radar-filter-btn,
.trend-radar-keyword-btn,
.trend-radar-preview-btn {
    padding: 0.55rem 0.9rem;
    border: none;
    border-radius: 999px;
    background: var(--brand-primary, #1e293b);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}

.trend-radar-preview-btn {
    background: #0f766e;
}

.mind-clearer-hint {
    font-size: 0.78rem;
    color: var(--brand-text-muted, #64748b);
}

.mind-clearer-status,
.trend-radar-status,
.subscription-purchase-status {
    margin-top: 0.65rem;
    color: #0f766e;
    font-size: 0.86rem;
}

.mind-clearer-categories {
    margin-top: 0.65rem;
    padding: 0.55rem 0.65rem;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.mind-clearer-categories__title {
    margin: 0 0 0.2rem;
    font-size: 0.82rem;
}

.mind-clearer-categories__hint {
    margin: 0 0 0.45rem;
    font-size: 0.72rem;
    color: var(--brand-text-muted, #64748b);
}

.mind-clearer-categories__form {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.mind-clearer-categories__input {
    flex: 1 1 180px;
    min-width: 0;
    padding: 0.45rem 0.6rem;
    border: 1px solid var(--brand-border-soft, #cbd5e1);
    border-radius: 8px;
    font: inherit;
}

.mind-clearer-categories__add-btn {
    padding: 0.45rem 0.85rem;
    border: 1px solid #99f6e4;
    border-radius: 8px;
    background: linear-gradient(180deg, #ecfdf5, #d1fae5);
    color: #065f46;
    font-weight: 600;
    font-size: 0.82rem;
    cursor: pointer;
}

.mind-clearer-categories__empty {
    margin: 0.5rem 0 0;
    font-size: 0.8rem;
    color: #b45309;
}

.mind-clearer-categories__list {
    list-style: none;
    padding: 0;
    margin: 0.45rem 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.mind-clearer-categories__item {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.18rem 0.3rem 0.18rem 0.45rem;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #cbd5e1;
    font-size: 0.72rem;
}

.mind-clearer-categories__name {
    font-weight: 600;
}

.mind-clearer-categories__delete {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.35rem;
    height: 1.35rem;
    padding: 0;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: #64748b;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
}

.mind-clearer-categories__delete:hover {
    background: #fee2e2;
    color: #b91c1c;
}

.mind-clearer-filters {
    margin-top: 0.85rem;
}

.mind-clearer-filters__row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.55rem;
}

.mind-clearer-filters__field {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    font-size: 0.78rem;
}

.mind-clearer-filters__field--search {
    grid-column: 1 / -1;
}

@media (min-width: 720px) {
    .mind-clearer-filters__field--search {
        grid-column: auto;
    }
}

.mind-clearer-filters__label {
    color: var(--brand-text-muted, #64748b);
    font-weight: 600;
}

.mind-clearer-filters__select,
.mind-clearer-filters__date,
.mind-clearer-filters__search {
    width: 100%;
    padding: 0.4rem 0.55rem;
    border: 1px solid var(--brand-border-soft, #cbd5e1);
    border-radius: 8px;
    font: inherit;
    font-size: 0.82rem;
}

.mind-clearer-ideas {
    list-style: none;
    padding: 0;
    margin: 0.75rem 0 0;
    display: grid;
    gap: 0.55rem;
}

.mind-clearer-idea {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.55rem;
    align-items: start;
    padding: 0.65rem 0.75rem;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.mind-clearer-idea.is-completed {
    opacity: 0.72;
    background: #f1f5f9;
}

.mind-clearer-idea.is-completed .mind-clearer-idea__summary {
    text-decoration: line-through;
    color: #64748b;
}

.mind-clearer-idea__check {
    display: flex;
    align-items: flex-start;
    padding-top: 0.15rem;
    cursor: pointer;
}

.mind-clearer-idea__checkbox {
    width: 1rem;
    height: 1rem;
    accent-color: #0d9488;
    cursor: pointer;
}

.mind-clearer-idea__body {
    min-width: 0;
}

.mind-clearer-idea__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.25rem;
}

.mind-clearer-idea__date {
    font-size: 0.72rem;
    color: var(--brand-text-muted, #64748b);
}

.mind-clearer-idea__delete {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    font-size: 1rem;
    cursor: pointer;
}

.mind-clearer-idea__delete:hover {
    background: #fee2e2;
    border-color: #fecaca;
}

.studio-modal-btn--danger {
    background: #dc2626;
    border-color: #dc2626;
    color: #fff;
}

.studio-modal-btn--danger:hover {
    background: #b91c1c;
    border-color: #b91c1c;
}

.mind-clearer-idea__category {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #0f766e;
    margin-bottom: 0.25rem;
}

.mind-clearer-idea__summary {
    margin: 0;
    font-weight: 600;
}

.mind-clearer-idea__raw {
    margin: 0.35rem 0 0;
    font-size: 0.82rem;
    color: #64748b;
}

.mind-clearer-empty,
.trend-radar-empty {
    color: #64748b;
    font-size: 0.9rem;
}

.trend-radar-filter-row,
.trend-radar-keyword-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    align-items: center;
    margin-bottom: 0.75rem;
}

.trend-radar-filter-input,
.trend-radar-keyword-input {
    flex: 1 1 220px;
    min-width: 180px;
    padding: 0.5rem 0.65rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
}

.trend-radar-ticker-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.45rem;
    max-height: 280px;
    overflow: auto;
}

.trend-radar-ticker-item {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.55rem 0.65rem;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.trend-radar-ticker-traffic {
    font-size: 0.78rem;
    color: #64748b;
    white-space: nowrap;
}

.trend-radar-chart-wrap {
    width: 100%;
    overflow-x: auto;
    margin-top: 0.75rem;
}

.trend-radar-preview-wrap {
    margin-top: 1rem;
}

.trend-radar-preview-image {
    max-width: min(100%, 420px);
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: var(--brand-shadow-md, 0 8px 24px rgba(15, 23, 42, 0.12));
}

.trend-radar-card--colors {
    border-color: #99f6e4;
}

.trend-radar-card--forecast {
    border-color: #c4b5fd;
    position: relative;
}

.trend-radar-forecast-intro {
    margin: 0 0 0.75rem;
    font-size: 0.84rem;
    color: var(--brand-text-muted, #64748b);
    line-height: 1.45;
}

.trend-radar-forecast-meta {
    margin: 0 0 0.85rem;
    font-size: 0.82rem;
    color: #475569;
    line-height: 1.45;
}

.trend-radar-forecast-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
}

.trend-radar-forecast-carousel {
    display: block;
}

.trend-radar-forecast-carousel__viewport {
    width: 100%;
    min-width: 0;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
    padding-right: 3.75rem;
}

.trend-radar-forecast-carousel__viewport::-webkit-scrollbar {
    height: 6px;
}

.trend-radar-forecast-carousel__viewport::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 999px;
}

.trend-radar-forecast-carousel__track {
    display: flex;
    gap: 0.85rem;
    padding-bottom: 0.25rem;
}

.trend-radar-forecast-carousel__arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    min-width: 3rem;
    min-height: 3rem;
    padding: 0;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(255, 255, 255, 0.94);
    color: #1e293b;
    font-size: 1.65rem;
    line-height: 1;
    cursor: pointer;
    box-shadow:
        0 4px 14px rgba(15, 23, 42, 0.12),
        0 1px 3px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(6px);
    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        opacity 0.15s ease,
        box-shadow 0.15s ease,
        transform 0.15s ease;
}

.trend-radar-forecast-carousel__arrow--fab {
    position: fixed;
    right: clamp(0.75rem, 2vw, 1.5rem);
    top: 50vh;
    transform: translateY(-50%);
    z-index: 40;
}

.trend-radar-forecast-carousel__arrow:hover:not(:disabled) {
    background: #fff;
    border-color: #c4b5fd;
    color: #5b21b6;
    box-shadow:
        0 8px 22px rgba(91, 33, 182, 0.18),
        0 2px 6px rgba(15, 23, 42, 0.08);
}

.trend-radar-forecast-carousel__arrow:active:not(:disabled) {
    transform: translateY(-50%) scale(0.96);
}

.trend-radar-forecast-carousel__arrow:disabled {
    opacity: 0.35;
    cursor: default;
    pointer-events: none;
}

.trend-radar-forecast-carousel__arrow.is-hidden,
.trend-radar-forecast-carousel__arrow.is-outside {
    opacity: 0;
    pointer-events: none;
}

@media (max-width: 960px) {
    .trend-radar-forecast-grid {
        grid-template-columns: 1fr;
    }
}

.trend-radar-forecast-month {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding: 0.8rem;
    border-radius: 12px;
    background: #fafafa;
    border: 1px solid #e2e8f0;
    flex: 0 0 min(100%, 22rem);
    scroll-snap-align: start;
}

.trend-radar-forecast-month__head {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.trend-radar-forecast-month__badge {
    display: inline-flex;
    align-self: flex-start;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    background: #ede9fe;
    color: #5b21b6;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.trend-radar-forecast-month__title {
    margin: 0;
    font-size: 1rem;
    color: #0f172a;
}

.trend-radar-forecast-month__colors {
    display: grid;
    gap: 0.45rem;
}

.trend-radar-forecast-color {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.35rem;
    padding: 0.55rem 0.45rem;
    border-radius: 10px;
    background: #fff;
    border: 1px solid #e2e8f0;
}

.trend-radar-forecast-color__swatch {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, 0.12);
}

.trend-radar-forecast-color__name {
    font-size: 0.8rem;
    font-weight: 600;
    color: #1e293b;
}

.trend-radar-forecast-color__hex {
    font-size: 0.72rem;
    color: #64748b;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.trend-radar-forecast-probability__label-row {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.trend-radar-forecast-probability__label {
    font-size: 0.74rem;
    font-weight: 600;
    color: #475569;
}

.trend-radar-forecast-probability__value {
    font-size: 0.74rem;
    font-weight: 700;
    color: #6d28d9;
}

.trend-radar-forecast-probability__track {
    height: 0.45rem;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}

.trend-radar-forecast-probability__fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #8b5cf6, #6d28d9);
}

.trend-radar-color-probability {
    width: 100%;
    margin-top: 0.15rem;
}

.trend-radar-color-probability__label-row {
    display: flex;
    justify-content: space-between;
    gap: 0.35rem;
    margin-bottom: 0.2rem;
}

.trend-radar-color-probability__label {
    font-size: 0.62rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.trend-radar-color-probability__value {
    font-size: 0.62rem;
    font-weight: 700;
    color: #6d28d9;
}

.trend-radar-color-probability__track {
    height: 0.35rem;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}

.trend-radar-color-probability__fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #34d399, #059669);
}

.trend-radar-forecast-color .trend-radar-color-probability__fill {
    background: linear-gradient(90deg, #8b5cf6, #6d28d9);
}

.trend-radar-forecast-preview-btn {
    width: 100%;
    margin-top: 0.15rem;
}

.trend-radar-forecast-preview-wrap {
    margin-top: 0.15rem;
}

.trend-radar-inventory-notice,
.trend-radar-inventory-empty {
    margin: 0.5rem 0 0;
    font-size: 0.78rem;
    color: #64748b;
    line-height: 1.4;
}

.trend-radar-inventory-accordion {
    width: 100%;
    margin-top: 0.35rem;
}

.trend-radar-inventory-accordion--empty {
    text-align: center;
}

.trend-radar-inventory-accordion__empty {
    display: block;
    font-size: 0.68rem;
    color: #94a3b8;
    line-height: 1.35;
}

.trend-radar-inventory-accordion__toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    width: 100%;
    margin: 0;
    padding: 0.28rem 0.4rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    color: #475569;
    font-size: 0.68rem;
    font-weight: 600;
    line-height: 1.3;
    cursor: pointer;
    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease;
}

.trend-radar-inventory-accordion__toggle:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #1e293b;
}

.trend-radar-inventory-accordion__icon {
    flex-shrink: 0;
    font-size: 0.62rem;
    line-height: 1;
}

.trend-radar-inventory-accordion__label {
    text-align: left;
}

.trend-radar-inventory-accordion__panel {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.22s ease;
}

.trend-radar-inventory-accordion__panel.is-open {
    grid-template-rows: 1fr;
}

.trend-radar-inventory-accordion__panel-inner {
    overflow: hidden;
}

.trend-radar-inventory-alt-list {
    list-style: none;
    margin: 0.3rem 0 0;
    padding: 0;
    display: grid;
    gap: 0.2rem;
}

.trend-radar-inventory-alt {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.22rem 0.3rem;
    border-radius: 6px;
    border: 1px solid transparent;
}

.trend-radar-inventory-alt--ok {
    background: #f0fdf4;
    border-color: #dcfce7;
}

.trend-radar-inventory-alt--warning {
    background: #fff7ed;
    border-color: #ffedd5;
}

.trend-radar-inventory-alt--critical {
    background: #fff1f2;
    border-color: #ffe4e6;
}

.trend-radar-inventory-alt__swatch {
    width: 0.85rem;
    height: 0.85rem;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    flex-shrink: 0;
}

.trend-radar-inventory-alt__line {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    min-width: 0;
    flex: 1;
    font-size: 0.68rem;
    line-height: 1.25;
}

.trend-radar-inventory-alt__name {
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 5.5rem;
}

.trend-radar-inventory-alt__meta {
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.62rem;
}

.trend-radar-inventory-alt__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 0.95rem;
    height: 0.95rem;
    border-radius: 999px;
    font-size: 0.58rem;
    font-weight: 800;
    flex-shrink: 0;
}

.trend-radar-inventory-alt__badge.is-ok {
    background: #10b981;
    color: #fff;
}

.trend-radar-inventory-alt__badge.is-warning {
    background: #f97316;
    color: #fff;
}

.trend-radar-inventory-alt__badge.is-critical {
    background: #ef4444;
    color: #fff;
}

.trend-radar-forecast-color-block {
    display: grid;
    gap: 0;
}

.trend-radar-colors-head,
.trend-radar-archive-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.trend-radar-colors-meta {
    margin: 0.25rem 0 0;
    font-size: 0.8rem;
    color: var(--brand-text-muted, #64748b);
}

.trend-radar-colors-palette {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.75rem;
}

@media (max-width: 1100px) {
    .trend-radar-colors-palette {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
}

.trend-radar-color-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.45rem;
    padding: 0.75rem 0.55rem;
    border-radius: 14px;
    background: #fff;
    border: 1px solid #e2e8f0;
}

.trend-radar-color-chip__swatch {
    width: 5.5rem;
    height: 5.5rem;
    border-radius: 999px;
    border: 2px solid rgba(15, 23, 42, 0.08);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.trend-radar-color-chip__name {
    font-weight: 700;
    font-size: 0.88rem;
    color: #0f172a;
}

.trend-radar-color-chip__hex {
    font-size: 0.76rem;
    color: #64748b;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.trend-radar-colors-summary {
    margin: 0.85rem 0 0;
    font-size: 0.86rem;
    color: #334155;
    line-height: 1.45;
}

.trend-radar-archive-toggle {
    display: inline-flex;
    gap: 0.35rem;
    padding: 0.2rem;
    border-radius: 999px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
}

.trend-radar-archive-toggle-btn {
    border: none;
    background: transparent;
    color: #475569;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    cursor: pointer;
}

.trend-radar-archive-toggle-btn.is-active {
    background: #fff;
    color: #0f766e;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.trend-radar-archive-timeline {
    display: grid;
    gap: 0.55rem;
    max-height: 420px;
    overflow: auto;
    padding-right: 0.15rem;
}

.trend-radar-archive-day {
    display: grid;
    grid-template-columns: minmax(110px, 140px) 1fr;
    gap: 0.65rem;
    align-items: center;
    padding: 0.55rem 0.65rem;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.trend-radar-archive-day__date {
    font-size: 0.8rem;
    font-weight: 600;
    color: #334155;
}

.trend-radar-archive-day__swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.trend-radar-archive-swatch {
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.trend-radar-loading,
.trend-radar-error {
    font-size: 0.86rem;
}

.trend-radar-error {
    color: #b91c1c;
}

.subscription-credits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
    margin: 0.75rem 0;
}

.subscription-credit-stat {
    padding: 0.75rem;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.subscription-credit-stat__label {
    display: block;
    font-size: 0.78rem;
    color: #64748b;
    margin-bottom: 0.25rem;
}

.subscription-credit-stat__value {
    font-size: 1.35rem;
}

.subscription-note,
.subscription-purchase-intro {
    font-size: 0.86rem;
    color: #64748b;
}

.subscription-pack-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 0.75rem;
}

.subscription-pack-btn {
    min-width: 100px;
    padding: 0.75rem 1rem;
    border: 1px solid #99f6e4;
    border-radius: 12px;
    background: linear-gradient(180deg, #ecfdf5, #d1fae5);
    cursor: pointer;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 700;
    color: #065f46;
}

.subscription-pack-btn:disabled {
    opacity: 0.6;
    cursor: wait;
}

.subscription-pack-btn--simulation {
    border-style: dashed;
    border-color: #f59e0b;
    background: linear-gradient(180deg, #fffbeb, #fef3c7);
    color: #92400e;
}

.subscription-card--simulation {
    border-color: #fcd34d;
    background: linear-gradient(180deg, #fffdf7, #fffbeb);
}

.subscription-simulation-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.5rem 0.75rem;
    margin-bottom: 0.85rem;
    padding: 0.65rem 0.75rem;
    border-radius: 10px;
    border: 1px dashed #fbbf24;
    background: #fffbeb;
}

.subscription-simulation-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    background: #f59e0b;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.subscription-simulation-note {
    flex: 1 1 220px;
    margin: 0;
    font-size: 0.82rem;
    color: #92400e;
    line-height: 1.45;
}

.subscription-pack-btn__amount {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: #065f46;
}

.subscription-pack-btn__label {
    font-size: 0.78rem;
    color: #047857;
}

/* ===== Designer Material-Lock & Farbauswahl-Modal ===== */
.designer-material-lock {
    margin-bottom: 0.85rem;
    padding: 0.75rem;
    border: 1px solid var(--brand-secondary-border, #d8e0ea);
    border-radius: 10px;
    background: var(--surface-elevated, #fff);
}

.designer-material-lock.is-ready {
    border-color: var(--brand-accent, #f4a574);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--brand-accent, #f4a574) 35%, transparent);
}

.designer-material-lock__label {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.designer-material-lock__select {
    width: 100%;
    font: inherit;
    padding: 0.45rem 0.55rem;
    border-radius: 8px;
    border: 1px solid var(--brand-secondary-border, #c9d4e0);
}

.designer-material-lock__hint {
    margin: 0.45rem 0 0;
    font-size: 0.72rem;
    color: var(--brand-text-muted, #64748b);
    line-height: 1.4;
}

.designer-palette-picker-actions {
    display: grid;
    gap: 0.5rem;
    margin: 0.65rem 0 0.85rem;
}

.designer-open-color-picker-btn {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border-radius: 10px;
    border: 1px solid var(--brand-primary, #1e293b);
    background: var(--brand-primary, #1e293b);
    color: #fff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.designer-open-color-picker-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.designer-glitz-manage-btn {
    width: 100%;
    margin-top: 0.35rem;
    padding: 0.45rem 0.6rem;
    border: 1px dashed var(--brand-secondary-border, #c9d4e0);
    border-radius: 8px;
    background: transparent;
    font: inherit;
    font-size: 0.78rem;
    cursor: pointer;
}

.designer-color-picker-modal .designer-color-picker-panel {
    width: min(720px, calc(100vw - 2rem));
    max-height: min(85vh, 820px);
    display: flex;
    flex-direction: column;
    padding: 1rem 1rem 0.85rem;
}

.designer-color-picker-head h3 {
    margin: 0 0 0.65rem;
    font-size: 1.05rem;
}

.designer-color-picker-search {
    width: 100%;
    padding: 0.55rem 0.7rem;
    border-radius: 10px;
    border: 1px solid var(--brand-secondary-border, #c9d4e0);
    font: inherit;
}

.designer-color-picker-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin: 0.75rem 0 0.45rem;
}

.designer-color-picker-tab {
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    border: 1px solid var(--brand-secondary-border, #d8e0ea);
    background: var(--surface-elevated, #fff);
    font: inherit;
    font-size: 0.74rem;
    cursor: pointer;
    white-space: nowrap;
}

.designer-color-picker-tab.is-active {
    border-color: var(--brand-accent, #f4a574);
    background: var(--brand-accent-soft, #fde8d8);
    font-weight: 600;
}

.designer-color-picker-tab.is-main-category.is-active {
    border-color: var(--brand-primary, #1e293b);
    background: color-mix(in srgb, var(--brand-primary, #1e293b) 12%, #fff);
}

.designer-color-picker-tabs-divider {
    flex-basis: 100%;
    width: 100%;
    margin: 0.15rem 0 0.05rem;
    padding: 0.15rem 0.1rem 0;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--brand-text-muted, #64748b);
}

.designer-color-picker-meta {
    margin: 0 0 0.45rem;
    font-size: 0.72rem;
    color: var(--brand-text-muted, #64748b);
}

.designer-color-picker-grid-scroll {
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding-bottom: 0.5rem;
}

.designer-color-picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
    gap: 0.45rem;
}

.designer-color-picker-swatch {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    padding: 0.35rem;
    border: 1px solid var(--brand-secondary-border, #e2e8f0);
    border-radius: 10px;
    background: var(--surface-elevated, #fff);
    cursor: pointer;
    text-align: left;
}

.designer-color-picker-swatch-color {
    display: block;
    width: 100%;
    aspect-ratio: 1.2;
    border-radius: 8px;
    border: 1px solid rgb(0 0 0 / 8%);
}

.designer-color-picker-swatch-label {
    font-size: 0.62rem;
    line-height: 1.25;
    color: var(--brand-text, #334155);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.designer-color-picker-swatch.is-chosen {
    outline: 2px solid var(--brand-primary, #1e293b);
}

.designer-color-picker-swatch.is-accent {
    border-style: dashed;
}

.designer-color-picker-empty {
    grid-column: 1 / -1;
    font-size: 0.82rem;
    color: var(--brand-text-muted, #64748b);
}

.designer-color-chain-add-row {
    display: grid;
    gap: 0.4rem;
    margin-top: 0.55rem;
}

.designer-color-chain-add {
    width: 100%;
    padding: 0.5rem 0.65rem;
    border-radius: 10px;
    border: 1px dashed var(--brand-secondary-border, #c9d4e0);
    background: transparent;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.designer-color-chain-add:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.designer-color-chain-add--accent {
    border-style: dashed;
    border-color: #c4b5fd;
    background: #faf5ff;
    color: #5b21b6;
}

.designer-color-chain-item.is-accent-yarn {
    border-style: dashed;
    border-color: #c4b5fd;
    background: linear-gradient(180deg, #faf5ff 0%, #fff 100%);
}

.designer-color-chain-item.is-accent-yarn .designer-color-chain-dot {
    box-shadow: inset 0 0 0 2px #a78bfa;
}

.designer-accent-yarn-actions {
    display: grid;
    gap: 0.45rem;
    margin-top: 0.5rem;
}

.designer-open-color-picker-btn--accent {
    background: #5b21b6;
    border-color: #5b21b6;
}

.designer-color-picker-tab:not(.is-main-category) {
    border-style: dashed;
}

.designer-color-chain-move {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.designer-color-chain-move-btn {
    width: 1.35rem;
    height: 1.1rem;
    padding: 0;
    border: 1px solid var(--brand-secondary-border, #d8e0ea);
    border-radius: 4px;
    background: var(--surface-elevated, #fff);
    font-size: 0.65rem;
    line-height: 1;
    cursor: pointer;
}

.designer-color-chain-move-btn:disabled {
    opacity: 0.35;
    cursor: default;
}

.custom-materials-list {
    list-style: none;
    margin: 0 0 0.85rem;
    padding: 0;
    display: grid;
    gap: 0.45rem;
}

.custom-materials-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.55rem 0.65rem;
    border: 1px solid var(--brand-secondary-border, #e2e8f0);
    border-radius: 8px;
}

.custom-materials-item__meta {
    display: grid;
    gap: 0.15rem;
    font-size: 0.82rem;
}

.custom-materials-item__meta span {
    font-size: 0.72rem;
    color: var(--brand-text-muted, #64748b);
}

.custom-materials-empty {
    font-size: 0.82rem;
    color: var(--brand-text-muted, #64748b);
}

.custom-materials-categories-select {
    width: 100%;
    font: inherit;
}

.custom-materials-form {
    display: grid;
    gap: 0.65rem;
}

.recipe-category-filter-bar {
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0.45rem 0.55rem;
}

.recipe-category-filter-badge {
    padding: 0.2rem 0.55rem;
    font-size: 0.72rem;
}

body.designer-color-picker-open {
    overflow: hidden;
}

/* ===== Hauptgarn-Kategorien Manager (Drag & Drop) ===== */
body.main-yarn-manager-open {
    overflow: hidden;
}

.main-yarn-manager-modal .studio-modal-backdrop {
    background: rgba(15, 23, 42, 0.55);
}

.main-yarn-manager-panel {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: min(96vh, 1100px);
    padding: 1rem 1.1rem 1.1rem;
}

.main-yarn-manager-header {
    align-items: flex-start;
    gap: 0.75rem;
}

.main-yarn-manager-header-copy {
    min-width: 0;
}

.main-yarn-manager-eyebrow {
    margin: 0 0 0.2rem;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--brand-text-muted, #64748b);
}

.main-yarn-manager-header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.main-yarn-manager-secondary-btn {
    border: 1px solid var(--brand-border-soft, #e2e8f0);
    background: var(--brand-surface, #fff);
    color: var(--brand-text, #0f172a);
    border-radius: 0.55rem;
    padding: 0.4rem 0.7rem;
    font-size: 0.78rem;
    cursor: pointer;
}

.main-yarn-manager-secondary-btn:hover {
    border-color: var(--brand-primary, #2563eb);
    color: var(--brand-primary, #2563eb);
}

.main-yarn-manager-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem 1rem;
}

.main-yarn-manager-search {
    flex: 1 1 220px;
    min-width: 180px;
    max-width: 360px;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--brand-border-soft, #e2e8f0);
    border-radius: 0.55rem;
    font-size: 0.88rem;
}

.main-yarn-manager-toolbar-hint {
    margin: 0;
    font-size: 0.76rem;
    color: var(--brand-text-muted, #64748b);
}

.main-yarn-manager-meta {
    margin: 0;
    font-size: 0.78rem;
    color: var(--brand-text-muted, #64748b);
}

.main-yarn-manager-category-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem 1rem;
    margin-bottom: 0.5rem;
}

.main-yarn-manager-category-bar.is-all-colors-mode .main-yarn-manager-category-tabs {
    opacity: 0.45;
    pointer-events: none;
}

.main-yarn-manager-category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    flex: 1 1 auto;
}

.main-yarn-manager-category-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.65rem;
    border: 1px solid var(--brand-border-soft, #e2e8f0);
    border-radius: 0.55rem;
    background: var(--brand-surface, #fff);
    color: var(--brand-text, #0f172a);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.main-yarn-manager-category-tab:hover:not(:disabled) {
    border-color: var(--brand-primary, #2563eb);
}

.main-yarn-manager-category-tab.is-active {
    border-color: var(--brand-primary, #2563eb);
    background: rgba(37, 99, 235, 0.08);
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.2);
}

.main-yarn-manager-category-tab:disabled {
    cursor: not-allowed;
}

.main-yarn-manager-category-tab-count {
    min-width: 1.25rem;
    padding: 0.05rem 0.35rem;
    border-radius: 999px;
    background: var(--brand-surface-muted, #f1f5f9);
    font-size: 0.68rem;
    font-weight: 700;
    text-align: center;
}

.main-yarn-manager-all-colors-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    flex-shrink: 0;
}

.main-yarn-manager-all-colors-toggle input {
    width: 1rem;
    height: 1rem;
    accent-color: var(--brand-primary, #2563eb);
}

.main-yarn-manager-content-scroll {
    flex: 1;
    min-height: 0;
    overflow: auto;
    border: 1px solid var(--brand-border-soft, #e2e8f0);
    border-radius: 0.75rem;
    background: var(--brand-surface-muted, #f8fafc);
}

.main-yarn-manager-empty {
    margin: 0;
    padding: 2.5rem 1rem;
    text-align: center;
    font-size: 0.88rem;
    color: var(--brand-text-muted, #64748b);
}

.main-yarn-manager-grid {
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 8px;
    padding: 0.65rem;
    min-height: 280px;
}

.main-yarn-manager-grid.is-drop-target {
    outline: 2px dashed var(--brand-primary, #2563eb);
    outline-offset: -2px;
}

.main-yarn-manager-board-scroll {
    overflow-x: auto;
    padding-bottom: 4px;
}

.main-yarn-manager-board {
    display: grid;
    grid-template-columns: repeat(5, minmax(88px, 1fr));
    gap: 12px;
    align-items: start;
    min-width: min(100%, 720px);
}

.main-yarn-manager-column {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 120px;
    padding: 8px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.03);
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.main-yarn-manager-column.is-active {
    border-color: var(--brand-primary, #2563eb);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.18);
}

.main-yarn-manager-column.is-drop-target {
    border-color: var(--brand-primary, #2563eb);
}

.main-yarn-manager-column-title {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.25;
    color: #334155;
}

.main-yarn-manager-column-tiles {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 70px;
}

.main-yarn-manager-column-tiles.is-drop-target {
    outline: 2px dashed rgba(37, 99, 235, 0.35);
    outline-offset: 2px;
    border-radius: 8px;
}

.main-yarn-manager-tile {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    flex: 0 0 70px;
    padding: 4px;
    border: 1px solid rgba(15, 23, 42, 0.14);
    border-radius: 10px;
    cursor: grab;
    user-select: none;
    box-sizing: border-box;
    overflow: hidden;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.main-yarn-manager-tile:hover {
    border-color: rgba(15, 23, 42, 0.28);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.14);
    transform: translateY(-1px);
}

.main-yarn-manager-tile.is-dragging {
    opacity: 0.35;
    cursor: grabbing;
    transform: scale(0.96);
}

.main-yarn-manager-tile.is-search-match {
    border-color: var(--brand-primary, #2563eb);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.35);
    animation: main-yarn-manager-pulse 1.1s ease-in-out infinite;
}

@keyframes main-yarn-manager-pulse {
    0%,
    100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.04);
    }
}

.main-yarn-manager-tile-id {
    display: block;
    max-width: 100%;
    padding: 2px 4px;
    border-radius: 4px;
    font-size: 0.62rem;
    font-weight: 700;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    line-height: 1.15;
    text-align: center;
    word-break: break-all;
    text-shadow:
        0 0 4px rgba(255, 255, 255, 0.85),
        0 0 4px rgba(0, 0, 0, 0.35);
}

@media (max-width: 1200px) {
    .main-yarn-manager-category-tab-label {
        font-size: 0.74rem;
    }
}

@media (max-width: 768px) {
    .main-yarn-manager-header {
        flex-direction: column;
    }

    .main-yarn-manager-header-actions {
        width: 100%;
        justify-content: space-between;
    }

    .main-yarn-manager-category-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .main-yarn-manager-all-colors-toggle {
        justify-content: flex-start;
    }
}

.main-yarn-manager-tile.is-drop-before {
    box-shadow: inset 0 0 0 3px var(--brand-primary, #2563eb);
}

.main-yarn-manager-tile.is-drop-after {
    box-shadow: inset 0 0 0 3px var(--brand-primary, #2563eb);
}

.main-yarn-manager-drag-ghost {
    position: fixed;
    top: -1000px;
    left: -1000px;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    border: 2px solid rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.35);
    pointer-events: none;
    opacity: 0.95;
}

.main-yarn-manager-drag-ghost-label {
    font-size: 0.62rem;
    font-weight: 700;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    text-align: center;
    line-height: 1.15;
    padding: 2px 4px;
    text-shadow:
        0 0 4px rgba(255, 255, 255, 0.85),
        0 0 4px rgba(0, 0, 0, 0.35);
}

