/* Artis.Love Tools — Light Friendly Theme */

:root {
    --bg: #f7f6f3;
    --bg-card: #ffffff;
    --bg-input: #ffffff;
    --border: #e2e0dc;
    --border-strong: #ccc;
    --text: #1a1a1a;
    --text-muted: #777;
    --accent: #1a1a1a;
    --accent-hover: #333;
    --accent-soft: #f0eeea;
    --success: #16a34a;
    --error: #dc2626;
    --radius: 10px;
    --shadow: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-hover: 0 4px 12px rgba(0,0,0,0.08);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

/* Nav */
.main-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
}
.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text);
    font-weight: 600;
}
.nav-logo img { height: 28px; }
.nav-links { display: flex; gap: 1.5rem; align-items: center; }
.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--accent); }
.nav-logout { opacity: 0.5; }

/* Container */
.container {
    max-width: 720px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* Align headings with text inside cards (card padding = 1.25rem) */
h1 { font-size: 1.5rem; margin-bottom: 0.25rem; padding-left: 1.25rem; }
h2 { font-size: 1.25rem; margin: 1.5rem 0 0.75rem; padding-left: 1.25rem; }
h3 { font-size: 1rem; margin-bottom: 0.75rem; color: var(--text-muted); }
h4 { font-size: 0.9rem; margin: 1rem 0 0.5rem; color: var(--text-muted); }
.subtitle { color: var(--text-muted); margin-bottom: 2rem; padding-left: 1.25rem; }
.section-title { margin-top: 3rem; }

/* Forms */
.form-section {
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
details.form-collapsible > summary {
    cursor: pointer;
    user-select: none;
    list-style: none;
}
details.form-collapsible > summary::-webkit-details-marker { display: none; }
details.form-collapsible > summary h3 {
    display: inline;
    color: var(--text-muted);
    font-size: 0.95rem;
}
details.form-collapsible > summary h3::before {
    content: '▸ ';
}
details.form-collapsible[open] > summary h3 {
    color: var(--text);
}
details.form-collapsible[open] > summary h3::before {
    content: '▾ ';
}
details.form-collapsible > summary:hover h3 { color: var(--text); }
.input-field {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 1rem;
    margin-bottom: 0.5rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.input-field:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0,0,0,0.05);
}
.input-number { max-width: 160px; }

textarea.input-field { resize: vertical; }

/* Radio buttons */
.radio-option {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    margin-bottom: 0.2rem;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background 0.15s;
}
.radio-option:has(input:checked) { background: #f6f5f1; }
.radio-option:hover { background: var(--accent-soft); }
.radio-option input[type="radio"] {
    margin-top: 0.25rem;
    accent-color: var(--accent);
    flex-shrink: 0;
}
.radio-label { flex: 1; font-size: 0.9rem; }
.radio-factor {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-family: 'SF Mono', 'Menlo', monospace;
    flex-shrink: 0;
}

/* Dimensions */
.dim-inputs { display: flex; gap: 1rem; flex-wrap: wrap; }
.dim-field { flex: 1; min-width: 100px; }
.dim-field label { display: block; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.25rem; }
.dim-field .input-number { max-width: 100%; }

/* Result box — collapsible */
.result-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin: 1.5rem 0;
    box-shadow: var(--shadow);
    overflow: hidden;
}
.result-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    cursor: pointer;
    user-select: none;
    background: none;
    border: none;
    width: 100%;
    font: inherit;
    color: var(--text);
    transition: background 0.15s;
}
.result-toggle:hover { background: var(--accent-soft); }
.result-toggle h3 { margin: 0; color: var(--text); font-size: 1rem; }
.result-summary {
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.result-chevron {
    font-size: 0.8rem;
    transition: transform 0.25s;
    color: var(--text-muted);
}
.result-box.open .result-chevron { transform: rotate(180deg); }
.result-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease;
    padding: 0 1.25rem;
}
.result-box.open .result-body {
    max-height: 600px;
    padding: 0 1.25rem 1.25rem;
}
.result-row {
    display: flex;
    justify-content: space-between;
    padding: 0.35rem 0;
    font-size: 0.9rem;
}
.result-big { font-size: 1.1rem; font-weight: 600; }
.result-internal {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
    border-left: 2px solid var(--border);
    padding-left: 0.5rem;
    margin-left: 0.25rem;
}
.result-body hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 0.75rem 0;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: all 0.2s;
}
.btn-primary {
    background: var(--accent);
    color: #fff;
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--accent); background: var(--accent-soft); }

.form-actions { text-align: center; margin-top: 2rem; }
.form-actions-secondary { text-align: center; margin-top: 0.75rem; }
.btn-small {
    padding: 0.4rem 1rem;
    font-size: 0.75rem;
}

/* Tool Grid (Dashboard) */
.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}
.tool-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    text-decoration: none;
    color: var(--text);
    box-shadow: var(--shadow);
    transition: box-shadow 0.2s, transform 0.2s;
}
.tool-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}
.tool-icon { font-size: 2rem; margin-bottom: 0.75rem; }
.tool-card h2 { margin: 0 0 0.5rem; font-size: 1.1rem; }
.tool-card p { color: var(--text-muted); font-size: 0.9rem; margin: 0; }

/* Shares table */
.shares-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.shares-table th, .shares-table td {
    padding: 0.6rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
.shares-table th { color: var(--text-muted); font-weight: 500; background: #f0eeea; }
.shares-table code {
    background: var(--accent-soft);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
}
.shares-table a { color: var(--accent); }
.btn-delete {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 1.1rem;
    padding: 0 0.25rem;
    line-height: 1;
    transition: color 0.15s;
}
.btn-delete:hover { color: #c33; }
.btn-edit {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    margin-right: 0.5rem;
    transition: color 0.15s;
}
.btn-edit:hover { color: var(--accent); }
.share-actions-cell { white-space: nowrap; }
.share-type { font-size: 0.75rem; color: var(--text-muted); font-family: 'SF Mono', 'Menlo', monospace; white-space: nowrap; width: 1%; }
.shares-table td:nth-child(3),
.shares-table td:nth-child(4),
.shares-table td:nth-child(5),
.shares-table .share-actions-cell { white-space: nowrap; width: 1%; font-size: 0.8rem; }
.share-client { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; width: 40%; }
.shares-table tbody tr { background: #f6f5f1; }
.copyable { cursor: pointer; transition: background 0.15s; }
.copyable:hover { background: var(--accent); color: #fff; }
.copyable.copied { background: #2a2; color: #fff; }
.btn-copy-link {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 0.1rem;
    line-height: 1;
    transition: color 0.15s;
}
.btn-copy-link:hover { color: var(--accent); }
.btn-copy-link.copied { color: #fff; background: #2a2; border-radius: 4px; padding: 0.15rem 0.35rem; }
.btn-lock {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 0 0.25rem;
    line-height: 1;
    opacity: 0.5;
    transition: opacity 0.15s;
}
.btn-lock:hover { opacity: 1; }
.btn-lock.is-locked { opacity: 1; }
.edit-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    font-style: italic;
}

/* Login */
.login-container {
    max-width: 400px;
    margin: 15vh auto;
    text-align: center;
    padding: 2rem;
}
.login-logo { margin-bottom: 1rem; width: 180px; }
.login-container h2 { color: var(--text-muted); margin-bottom: 2rem; font-weight: 400; }
.setup-box { margin: 2rem 0; }
.login-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
    color: var(--text-muted);
    font-size: 0.85rem;
}
.login-divider::before, .login-divider::after {
    content: '';
    flex: 1;
    border-top: 1px solid var(--border);
}
.password-form { display: flex; flex-direction: column; gap: 0.5rem; }

/* Share view */
.share-login {
    max-width: 400px;
    margin: 15vh auto;
    text-align: center;
    padding: 2rem;
}
.share-content {
    max-width: 720px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}
.share-header { text-align: center; margin-bottom: 2rem; }
.share-logo { width: 180px; }
.share-date { color: var(--text-muted); font-size: 0.85rem; }
.share-photo { margin: 1.5rem 0; text-align: center; }
.share-photo img { max-width: 100%; max-height: 400px; border-radius: var(--radius); box-shadow: var(--shadow-hover); }
.share-client {
    background: var(--accent-soft);
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
}
.calc-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}
.calc-table td {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}
.calc-table td:last-child { text-align: right; }
.calc-table small { color: var(--text-muted); }
.share-totals, .share-installments {
    background: var(--accent-soft);
    padding: 1rem;
    border-radius: var(--radius);
    margin: 1rem 0;
}
.share-actions { text-align: center; margin: 2rem 0; }
.share-terms { margin: 2rem 0; }
.share-terms h4 { margin-bottom: 1rem; }
.term {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    line-height: 1.5;
}
.share-contact {
    text-align: center;
    margin: 2rem 0;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}
.signature { max-width: 120px; margin-bottom: 1rem; }
.share-contact p { font-size: 0.85rem; color: var(--text-muted); }
.share-password-hint {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 3rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

/* Factor tooltip */
.factor-tooltip {
    display: none;
    position: absolute;
    z-index: 100;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: 'SF Mono', 'Menlo', monospace;
    pointer-events: none;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.factor-tooltip.tooltip-minus {
    background: #fef2f2;
    color: #991b1b;
}
.factor-tooltip.tooltip-plus {
    background: #dcfce7;
    color: #166534;
}

/* Category header with weight toggle */
.category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}
.category-header h3 { margin: 0; }

/* Weight lock row */
.weight-lock-row {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    padding-right: calc(1.25rem + 19px);
    gap: 0.5rem;
}
.btn-reset {
    background: var(--text);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.65rem;
    color: #fff;
    padding: 0.2rem 0.5rem;
    margin-left: auto;
    margin-right: 1rem;
    transition: opacity 0.15s;
}
.btn-reset:hover { opacity: 0.7; }
.weight-lock-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}
.weight-lock-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    padding: 0;
    line-height: 1;
    opacity: 0.6;
    transition: opacity 0.2s;
}
.weight-lock-btn:hover { opacity: 1; }
.weight-lock-btn.locked { opacity: 1; }

/* Locked state dims weight toggles */
.cat-weight.locked .cat-weight-track {
    pointer-events: none !important;
    opacity: 0.4;
    cursor: default;
}
.cat-weight.locked .cat-weight-thumb {
    background: var(--text-muted);
}

/* Per-category weight toggle */
.cat-weight {
    flex-shrink: 0;
}
.cat-weight-track {
    position: relative;
    width: 54px;
    height: 18px;
    background: var(--border);
    border-radius: 9px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5px;
}
.cat-weight-track span {
    font-size: 0.5rem;
    font-family: 'SF Mono', 'Menlo', monospace;
    color: var(--text);
    opacity: 0.3;
    z-index: 1;
    pointer-events: none;
    width: 10px;
    text-align: center;
    line-height: 18px;
}
.cat-weight-thumb {
    position: absolute;
    width: 18px;
    height: 18px;
    background: var(--accent);
    border-radius: 50%;
    top: 0;
    transition: left 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.5rem;
    font-family: 'SF Mono', 'Menlo', monospace;
    color: #fff;
    font-weight: 600;
}
.cat-weight[data-step="1"] .cat-weight-thumb { left: 0; }
.cat-weight[data-step="2"] .cat-weight-thumb { left: calc(50% - 9px); }
.cat-weight[data-step="3"] .cat-weight-thumb { left: calc(100% - 18px); }

/* Inline form row */
.form-row-inline {
    display: flex;
    gap: 1rem;
    flex-wrap: nowrap;
}
.form-row-inline > div { flex: 1; min-width: 0; }
.form-row-inline label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}
.form-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

/* Extra costs */
.extra-cost-row {
    margin-bottom: 0.75rem;
}
.extra-cost-row label {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}
.extra-cost-inputs {
    display: flex;
    gap: 0.5rem;
}
.extra-cost-inputs .input-number { flex: 1; }

/* Upload */
.upload-area { position: relative; }
.file-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}
.upload-placeholder {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
    transition: border-color 0.2s, background 0.2s;
}
.upload-area:hover .upload-placeholder { border-color: var(--accent); background: var(--accent-soft); }
.photo-preview {
    max-width: 100%;
    max-height: 300px;
    border-radius: var(--radius);
}

/* Messages */
.error { color: var(--error); margin-top: 1rem; }
.success { color: var(--success); margin-top: 1rem; }

/* Collapsible terms */
.terms-collapsible {
    margin-top: 2rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
}
.terms-collapsible summary {
    padding: 0.75rem 1.25rem;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text-muted);
    user-select: none;
}
.terms-collapsible summary:hover { color: var(--text); }
.terms-collapsible[open] summary { border-bottom: 1px solid var(--border); }
.terms-body {
    padding: 1rem 1.25rem;
}

/* System map */
.system-map {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.map-step {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}
.map-icon {
    font-size: 1.1rem;
    width: 1.5rem;
    text-align: center;
    flex-shrink: 0;
    opacity: 0.5;
    line-height: 1.4;
}
.map-step strong { font-size: 0.85rem; }
.map-step p { font-size: 0.8rem; color: var(--text-muted); margin: 0.15rem 0 0; }
.map-step em { font-size: 0.75rem; font-family: 'SF Mono', 'Menlo', monospace; }
.map-table {
    font-size: 0.75rem;
    border-collapse: collapse;
    margin: 0.4rem 0;
    font-family: 'SF Mono', 'Menlo', monospace;
}
.map-table th, .map-table td {
    padding: 0.2rem 0.6rem;
    border-bottom: 1px solid var(--border);
    text-align: center;
}
.map-table th { color: var(--text-muted); font-weight: 500; }
.map-table td:first-child { text-align: left; font-weight: 500; }
.map-example-intro { font-size: 0.85rem; margin-bottom: 0.5rem; }
.map-example-note { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.5rem; }

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    border-top: 1px solid var(--border);
    margin-top: 4rem;
}

/* ============================================
   Print Calculator (public, /print)
   ============================================ */

.print-calc {
    max-width: 620px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* Header */
.print-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}
.print-logos {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.print-logos a { display: flex; align-items: center; }
.print-logos img { height: 28px; }
.print-logos .leap-logo-link img { height: 45px; position: relative; top: 3px; }

/* Language switch */
.lang-switch {
    display: flex;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.lang-btn {
    padding: 0.4rem 0.75rem;
    border: none;
    background: var(--bg-card);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: all 0.2s;
}
.lang-btn:first-child { border-right: 1px solid var(--border); }
.lang-btn:hover { color: var(--text); }
.lang-btn.active {
    background: var(--accent);
    color: #fff;
}

/* Intro text — white card like form sections */
.intro-text {
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    line-height: 1.7;
    font-size: 0.95rem;
}
.intro-text p { margin-bottom: 0.75rem; }
.intro-text p:last-child { margin-bottom: 0; }
.intro-text a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.intro-text a:hover { text-decoration-thickness: 2px; }

/* Type selection grid */
.type-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}
.type-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}
.type-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 1rem 0.5rem;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    text-align: center;
    position: relative;
}
.type-card input { display: none; }
.type-card:hover { border-color: var(--accent); }
.type-card.selected { border-color: var(--accent); box-shadow: var(--shadow-hover); }
.type-icon { font-size: 1.8rem; }
.type-svg { color: var(--text); opacity: 0.7; transition: opacity 0.2s; }
.type-card.selected .type-svg { opacity: 1; }
.type-card:hover .type-svg { opacity: 1; }
.type-name { font-size: 0.85rem; font-weight: 500; }

/* Textiles collapsible (inside form-section) */
.textiles-collapsible {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}
.textiles-collapsible summary {
    cursor: pointer;
    user-select: none;
    font-size: 0.9rem;
    color: var(--text-muted);
    list-style: none;
}
.textiles-collapsible summary::-webkit-details-marker { display: none; }
.textiles-collapsible summary::before { content: '▸ '; }
.textiles-collapsible[open] summary::before { content: '▾ '; }
.textiles-collapsible[open] summary { color: var(--text); }
.textiles-collapsible summary:hover { color: var(--text); }

/* Format hint */
.format-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    line-height: 1.4;
}

/* Format grid */
.format-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.format-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.6rem 1rem;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: border-color 0.2s;
    min-width: 70px;
}
.format-option input { display: none; }
.format-option:hover { border-color: var(--accent); }
.format-option.selected { border-color: var(--accent); background: #f6f5f1; }
.format-name { font-weight: 600; font-size: 0.95rem; }
.format-dims { font-size: 0.7rem; color: var(--text-muted); }

/* Color selector */
.color-selector {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.color-btn {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s, background 0.2s;
    color: var(--text);
}
.color-btn:hover { border-color: var(--accent); background: var(--accent-soft); }
.color-count {
    font-size: 1.5rem;
    font-weight: 700;
    min-width: 2rem;
    text-align: center;
}
.color-max { font-size: 0.8rem; color: var(--text-muted); }

/* Edition presets */
.edition-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.edition-btn {
    padding: 0.5rem 1rem;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: border-color 0.2s;
}
.edition-btn input { display: none; }
.edition-btn:hover { border-color: var(--accent); }
.edition-btn.selected { border-color: var(--accent); background: #f6f5f1; }

/* Checkbox options */
.checkbox-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background 0.15s;
}
.checkbox-option:hover { background: var(--accent-soft); }
.checkbox-option input[type="checkbox"] { accent-color: var(--accent); flex-shrink: 0; }
.checkbox-label { font-size: 0.9rem; }

/* Tooltip */
.tooltip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--border);
    color: var(--text-muted);
    font-size: 0.65rem;
    font-weight: 700;
    cursor: help;
    flex-shrink: 0;
    line-height: 1;
}
.tooltip-icon:hover { background: var(--accent); color: #fff; }

/* WLYA Deal section */
.wlya-section {
    border: 2px solid var(--success);
    background: #f0fdf4;
}
.wlya-toggle {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    cursor: pointer;
}
.wlya-toggle input { margin-top: 0.25rem; accent-color: var(--success); flex-shrink: 0; transform: scale(1.2); }
.wlya-content h3 { color: var(--success); margin: 0 0 0.25rem; font-size: 1rem; }
.wlya-content p { font-size: 0.85rem; color: var(--text-muted); margin: 0; line-height: 1.5; }

/* Edition details */
.edition-details { margin-top: 0.5rem; }
.edition-details summary {
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text-muted);
    user-select: none;
    padding: 0.25rem 0;
}
.edition-details summary:hover { color: var(--text); }
.edition-breakdown { padding-top: 0.5rem; }
.edition-breakdown .result-row { font-size: 0.85rem; }

/* Price matrix table */
.price-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}
.price-table th, .price-table td {
    padding: 0.4rem 0.5rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
}
.price-table th { color: var(--text-muted); font-weight: 500; font-size: 0.8rem; }
.price-table .price-val { text-align: right; font-family: 'SF Mono', 'Menlo', monospace; font-size: 0.85rem; }
.price-table td:last-child { text-align: right; }
.price-table input.price-input { width: 80px; padding: 0.3rem 0.5rem; font-size: 0.85rem; text-align: right; }

/* Price edit rows */
.price-edit-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}
.price-edit-row label { flex: 1; font-size: 0.85rem; }
.price-edit-row .input-number { width: 90px; padding: 0.4rem 0.5rem; font-size: 0.9rem; text-align: right; }

/* Inquiry cards (admin /anfragen) */
.inquiry-card { margin-bottom: 1rem; }
.inquiry-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    gap: 0.25rem;
}
.inquiry-email { color: var(--text-muted); font-size: 0.85rem; margin-left: 0.5rem; }
.inquiry-meta { font-size: 0.8rem; color: var(--text-muted); display: flex; gap: 0.75rem; }
.inquiry-id { font-family: 'SF Mono', 'Menlo', monospace; }
.inquiry-details { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 0.5rem; }
.inquiry-tag {
    font-size: 0.75rem;
    padding: 0.15rem 0.5rem;
    background: var(--accent-soft);
    border-radius: 4px;
    color: var(--text);
}
.inquiry-price { font-weight: 600; }
.inquiry-message {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0.5rem 0;
    line-height: 1.5;
}
.inquiry-file {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0.25rem 0;
}
.inquiry-actions { margin-top: 0.5rem; }

/* Inquiry section (public form) */
.inquiry-section {
    border: 1px solid var(--border);
    background: var(--bg-card);
}
.privacy-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 0.75rem 0 0;
    line-height: 1.5;
}

/* Disclaimer */
.disclaimer {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
    margin: 2rem 0 1rem;
    line-height: 1.5;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

/* CTA hint */
.cta-hint {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.75rem;
}

/* Print footer */
.print-footer {
    text-align: center;
    padding: 2rem 1.25rem;
    margin-top: 3rem;
    border-top: 1px solid var(--border);
    font-size: 0.8rem;
    color: var(--text-muted);
}
.print-footer a { color: var(--text-muted); text-decoration: none; }
.print-footer a:hover { color: var(--accent); }
.print-footer span { margin: 0 0.5rem; }

/* Mobile */
@media (max-width: 640px) {
    .main-nav { padding: 0.75rem 1rem; flex-wrap: wrap; gap: 0.5rem; }
    .nav-links { gap: 1rem; font-size: 0.85rem; }
    .container { padding: 1.5rem 1rem; }
    h1 { font-size: 1.25rem; }
    .dim-inputs { flex-direction: column; }
    .form-section { padding: 1rem; }
    .form-row-inline { flex-wrap: wrap; }
    .form-row-inline > div { flex: 1 1 45%; min-width: 0; }
    .weight-lock-row { padding-right: calc(1rem + 19px); }
    .radio-option { padding: 0.5rem; }
    .radio-label { font-size: 0.8rem; }
    .radio-factor { font-size: 0.75rem; }
    .extra-cost-row label { font-size: 0.8rem; }
    .result-row { font-size: 0.85rem; }
    .form-actions-secondary { margin-top: 0.5rem; }

    /* Print calc mobile */
    .print-calc { padding: 1.5rem 1rem; }
    .type-grid { grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
    .type-card { padding: 0.75rem 0.25rem; }
    .type-icon { font-size: 1.4rem; }
    .type-name { font-size: 0.75rem; }
    .format-grid { gap: 0.35rem; }
    .format-option { padding: 0.5rem 0.6rem; min-width: 55px; }
    .edition-presets { gap: 0.35rem; }
    .edition-btn { padding: 0.4rem 0.75rem; font-size: 0.8rem; }
}
