/* ============================================
   PaintMixer - Dark Theme CSS (Complete)
   Mobile-first rewrite
   ============================================ */

:root {
    --bg-primary: #1a1a2e;
    --bg-secondary: #16213e;
    --bg-card: #1e2a45;
    --bg-input: #0f1729;
    --text-primary: #e0e0e0;
    --text-secondary: #a0a0b0;
    --text-muted: #6a6a7a;
    --accent: #e94560;
    --accent-hover: #ff6b81;
    --accent-green: #4ecca3;
    --border: #2a2a4a;
    --shadow: rgba(0,0,0,0.3);
}

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

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

a {
    color: var(--accent);
    text-decoration: none;
}

    a:hover {
        color: var(--accent-hover);
    }

/* ============================================
   TOP NAV
   ============================================ */

.top-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.5rem;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-brand a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.2rem;
}

.brand-icon {
    font-size: 1.4rem;
}

.brand-sub {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-left: 0.5rem;
}

.nav-discord {
    margin-left: 0.5rem;
    font-size: 1.1rem;
    opacity: 0.6;
    transition: opacity 0.2s;
    text-decoration: none;
}

    .nav-discord:hover {
        opacity: 1;
    }

/* Hamburger button — hidden on desktop */
.nav-hamburger {
    display: none;
    background: none;
    border: 1px solid var(--border);
    color: var(--text-primary);
    font-size: 1.3rem;
    width: 38px;
    height: 38px;
    border-radius: 6px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

    .nav-hamburger:hover {
        border-color: var(--accent);
        color: var(--accent);
    }

.nav-links {
    display: flex;
    gap: 0.25rem;
}

.nav-link {
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: all 0.2s;
}

    .nav-link:hover {
        background: var(--bg-card);
        color: var(--text-primary);
    }

.nav-cta {
    background: var(--accent);
    color: #fff !important;
    font-weight: 600;
}

    .nav-cta:hover {
        background: var(--accent-hover);
    }

.nav-auth {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-auth-mobile {
    display: none;
}

.nav-user {
    color: var(--accent-green);
    font-weight: 600;
    font-size: 0.9rem;
}

.btn-logout {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
}

    .btn-logout:hover {
        border-color: var(--accent);
        color: var(--accent);
    }

/* ============================================
   MAIN CONTENT
   ============================================ */

.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    gap: 0.75rem;
}

    .page-header h1 {
        font-size: 1.6rem;
        min-width: 0;
    }

    .page-header .btn-primary {
        width: auto;
        flex-shrink: 0;
        white-space: nowrap;
    }

.subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ============================================
   FILTERS BAR
   ============================================ */

.filters-bar {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.search-input, .brand-select, .type-select {
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 0.6rem 0.75rem;
    border-radius: 6px;
    font-size: 0.9rem;
}

.search-input {
    flex: 1;
    min-width: 0;
}

    .search-input:focus, .brand-select:focus, .type-select:focus {
        outline: none;
        border-color: var(--accent);
    }

/* ============================================
   PAINT GRID
   ============================================ */

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

.paint-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.6rem;
    transition: border-color 0.2s;
    min-width: 0;
}

    .paint-card:hover {
        border-color: var(--accent);
    }

.paint-swatch {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    flex-shrink: 0;
    border: 1px solid rgba(255,255,255,0.1);
}

.paint-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.paint-name {
    font-weight: 600;
    font-size: 0.9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.paint-brand {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.paint-meta {
    display: flex;
    gap: 0.5rem;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

/* ============================================
   MIX GRID
   ============================================ */

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

.mix-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.75rem;
    color: var(--text-primary);
    transition: border-color 0.2s;
    min-width: 0;
}

    .mix-card:hover {
        border-color: var(--accent);
        color: var(--text-primary);
    }

.mix-swatch {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    flex-shrink: 0;
    border: 1px solid rgba(255,255,255,0.1);
}

.mix-info {
    flex: 1;
    min-width: 0;
}

.mix-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.mix-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mix-meta {
    display: flex;
    gap: 0.75rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
    flex-wrap: wrap;
}

/* ============================================
   AUTH PAGES
   ============================================ */

.auth-page {
    display: flex;
    justify-content: center;
    padding-top: 3rem;
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    width: 100%;
    max-width: 400px;
}

    .auth-card h2 {
        margin-bottom: 1.5rem;
        text-align: center;
    }

.auth-link {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* ============================================
   FORMS
   ============================================ */

.form-group {
    margin-bottom: 1rem;
}

    .form-group label {
        display: block;
        margin-bottom: 0.3rem;
        font-size: 0.85rem;
        color: var(--text-secondary);
    }

.form-input {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 0.6rem 0.75rem;
    border-radius: 6px;
    font-size: 0.9rem;
}

    .form-input:focus {
        outline: none;
        border-color: var(--accent);
    }

.btn-primary {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 0.65rem 1.25rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: background 0.2s;
}

    .btn-primary:hover {
        background: var(--accent-hover);
        color: #fff;
    }

    .btn-primary:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

.auth-card .btn-primary {
    width: 100%;
}

.error-msg {
    background: rgba(233,69,96,0.15);
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 0.85rem;
}

/* ============================================
   PAGINATION
   ============================================ */

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.btn-page {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
}

    .btn-page:hover:not(:disabled) {
        border-color: var(--accent);
    }

    .btn-page:disabled {
        opacity: 0.3;
        cursor: not-allowed;
    }

.page-info {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* ============================================
   UTILITIES
   ============================================ */

.loading {
    color: var(--text-muted);
    text-align: center;
    padding: 2rem;
}

.no-results {
    color: var(--text-muted);
    text-align: center;
    padding: 2rem;
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
}

    .empty-state .btn-primary {
        width: auto;
        margin-top: 1rem;
    }

.text-muted {
    color: var(--text-muted);
}

.text-sm {
    font-size: 0.8rem;
}

/* ============================================
   MIX BUILDER
   ============================================ */

.mix-builder {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 1.5rem;
    align-items: start;
}

.mix-builder-main {
    min-width: 0;
}

.mix-builder-sidebar {
    position: sticky;
    top: 70px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.section-title {
    font-size: 1.1rem;
    margin: 1.5rem 0 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.form-textarea {
    min-height: 80px;
    resize: vertical;
}

.form-row {
    margin-bottom: 1rem;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

    .toggle-label input[type="checkbox"] {
        width: 18px;
        height: 18px;
        accent-color: var(--accent);
    }

.components-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.component-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.6rem 0.75rem;
    flex-wrap: wrap;
}

.component-swatch {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    flex-shrink: 0;
    border: 1px solid rgba(255,255,255,0.1);
}

.component-info {
    flex: 1;
    min-width: 0;
}

.component-name {
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.component-brand {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 400;
}

.component-parts {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    flex-shrink: 0;
}

.btn-parts {
    width: 28px;
    height: 28px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-primary);
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .btn-parts:hover:not(:disabled) {
        border-color: var(--accent);
        color: var(--accent);
    }

    .btn-parts:disabled {
        opacity: 0.3;
        cursor: not-allowed;
    }

.parts-value {
    font-weight: 700;
    font-size: 1.1rem;
    min-width: 24px;
    text-align: center;
}

.parts-label {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.btn-remove {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0.25rem;
    border-radius: 4px;
}

    .btn-remove:hover {
        color: var(--accent);
        background: rgba(233,69,96,0.1);
    }

.ratio-display {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--accent-green);
    font-weight: 600;
}

.add-custom-section {
    margin-top: 1rem;
}

.custom-color-form {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.color-picker {
    width: 44px;
    height: 38px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-input);
    cursor: pointer;
    padding: 2px;
}

.form-input-sm {
    padding: 0.4rem 0.6rem;
    font-size: 0.85rem;
    width: auto;
    flex: 1;
    min-width: 80px;
}

.btn-sm {
    padding: 0.4rem 0.75rem;
    font-size: 0.85rem;
    width: auto;
}

.btn-secondary {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    display: inline-block;
    text-align: center;
}

    .btn-secondary:hover {
        border-color: var(--accent);
        color: var(--text-primary);
    }

.btn-danger {
    background: rgba(233,69,96,0.15);
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 0.65rem 1.25rem;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
}

    .btn-danger:hover {
        background: rgba(233,69,96,0.3);
    }

.save-bar {
    display: flex;
    gap: 0.75rem;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
}

/* Preview card */
.preview-card, .paint-search-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1rem;
}

    .preview-card h3, .paint-search-card h3 {
        font-size: 0.95rem;
        margin-bottom: 0.75rem;
        color: var(--text-secondary);
    }

.preview-swatch {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 0.5rem;
}

.preview-hex {
    text-align: center;
    font-family: monospace;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Override color */
.override-color-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-top: 0.5rem;
}

/* Gloss control */
.gloss-control {
    margin-top: 1rem;
}

.gloss-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.3rem;
}

.gloss-value-label {
    color: var(--accent-green);
    font-weight: 600;
}

.gloss-slider {
    width: 100%;
    accent-color: var(--accent);
    cursor: pointer;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--bg-input);
    border-radius: 3px;
    outline: none;
}

    .gloss-slider::-webkit-slider-thumb {
        -webkit-appearance: none;
        width: 18px;
        height: 18px;
        border-radius: 50%;
        background: var(--accent);
        cursor: pointer;
    }

.gloss-scale {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

/* Paint search */
.search-results {
    max-height: 400px;
    overflow-y: auto;
    margin-top: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.search-result {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem;
    border-radius: 6px;
    cursor: pointer;
}

    .search-result:hover {
        background: var(--bg-secondary);
    }

.paint-swatch-sm {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    flex-shrink: 0;
    border: 1px solid rgba(255,255,255,0.1);
}

.search-result-info {
    min-width: 0;
}

.search-result-name {
    font-size: 0.85rem;
    font-weight: 600;
}

.search-result-brand {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* ============================================
   MIX DETAIL VIEW
   ============================================ */

.mix-detail {
    max-width: 700px;
}

.mix-detail-header {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.mix-detail-preview {
    width: 100px;
    height: 100px;
    border-radius: 12px;
    flex-shrink: 0;
    border: 1px solid rgba(255,255,255,0.1);
}

.mix-detail-title h1 {
    font-size: 1.5rem;
    margin-bottom: 0.3rem;
}

.mix-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.mix-hex-badge {
    font-family: monospace;
    background: var(--bg-secondary);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-size: 0.8rem;
}

.mix-detail-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.mix-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.tag {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    padding: 0.15rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.mix-actions {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.recipe-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.recipe-row {
    display: grid;
    grid-template-columns: 44px 1fr auto 120px;
    align-items: center;
    gap: 0.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.6rem 0.75rem;
}

.recipe-swatch {
    width: 44px;
    height: 44px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.1);
}

.recipe-info {
    min-width: 0;
}

.recipe-paint-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.recipe-brand {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.recipe-ratio {
    text-align: right;
    font-size: 0.85rem;
    white-space: nowrap;
}

.recipe-pct {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.recipe-bar-container {
    height: 8px;
    background: var(--bg-secondary);
    border-radius: 4px;
    overflow: hidden;
}

.recipe-bar {
    height: 100%;
    border-radius: 4px;
    min-width: 4px;
}

/* ============================================
   RECIPE GRID (My Recipes / Community)
   ============================================ */

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

.recipe-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.75rem;
    color: var(--text-primary);
    transition: border-color 0.2s;
    min-width: 0;
}

    .recipe-card:hover {
        border-color: var(--accent);
        color: var(--text-primary);
    }

.recipe-card-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.recipe-card-thumb {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid rgba(255,255,255,0.1);
}

.recipe-card-info {
    flex: 1;
    min-width: 0;
}

.recipe-card-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.recipe-card-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ============================================
   RECIPE BUILDER
   ============================================ */

.recipe-builder {
    max-width: 800px;
}

.step-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 0.75rem;
}

.step-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.step-number {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--accent-green);
    background: rgba(78,204,163,0.1);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
}

.step-header-actions {
    display: flex;
    gap: 0.25rem;
}

.btn-icon {
    width: 28px;
    height: 28px;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .btn-icon:hover {
        border-color: var(--accent);
        color: var(--accent);
    }

.btn-icon-danger:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.form-row-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.step-items {
    margin-top: 0.75rem;
}

.step-items-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
    display: block;
}

.step-item-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0;
    border-bottom: 1px solid var(--border);
}

    .step-item-row:last-of-type {
        border-bottom: none;
    }

.step-item-info {
    flex: 1;
    min-width: 0;
}

.step-item-name {
    font-size: 0.85rem;
    font-weight: 600;
}

.step-item-sub {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-left: 0.4rem;
}

.step-item-notes {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-style: italic;
}

.step-item-badge {
    font-size: 0.65rem;
    background: var(--accent);
    color: #fff;
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
    margin-left: 0.3rem;
    font-weight: 600;
}

.step-add-item {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.search-results-inline {
    max-height: 200px;
    margin-top: 0.25rem;
}

/* ============================================
   RECIPE VIEW
   ============================================ */

.recipe-detail {
    max-width: 700px;
}

.recipe-detail-header {
    margin-bottom: 1.5rem;
}

    .recipe-detail-header h1 {
        font-size: 1.5rem;
        margin-bottom: 0.3rem;
    }

.recipe-steps-view {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.step-view-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1rem;
}

.step-view-header {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.step-view-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent-green);
    color: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.step-view-title-block {
    flex: 1;
    min-width: 0;
}

    .step-view-title-block h3 {
        font-size: 1rem;
        margin-bottom: 0.15rem;
    }

.step-technique-badge {
    display: inline-block;
    font-size: 0.7rem;
    background: rgba(78,204,163,0.15);
    color: var(--accent-green);
    padding: 0.1rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
}

.step-view-notes {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.step-view-items {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-top: 0.5rem;
}

.step-view-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.5rem;
    background: var(--bg-secondary);
    border-radius: 6px;
    flex-wrap: wrap;
}

.step-view-item-info {
    flex: 1;
    min-width: 0;
}

.step-view-item-name {
    font-size: 0.85rem;
    font-weight: 600;
}

.step-view-item-brand {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-left: 0.4rem;
}

.step-view-link {
    font-size: 0.75rem;
    color: var(--accent);
    white-space: nowrap;
}

/* ============================================
   TAB BAR (Community page)
   ============================================ */

.tab-bar {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--border);
    padding-bottom: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.tab {
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 0.6rem 1rem;
    cursor: pointer;
    font-size: 0.9rem;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

    .tab:hover {
        color: var(--text-primary);
    }

.tab-active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

/* ============================================
   RECIPE PHOTOS
   ============================================ */

.recipe-photo-preview {
    position: relative;
    display: inline-block;
    margin-bottom: 0.5rem;
}

    .recipe-photo-preview img {
        max-width: 300px;
        max-height: 200px;
        border-radius: 8px;
        border: 1px solid var(--border);
        display: block;
    }

.btn-remove-photo {
    position: absolute;
    top: 0.4rem;
    right: 0.4rem;
    background: rgba(0,0,0,0.7);
    color: var(--accent);
    border: none;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
}

    .btn-remove-photo:hover {
        background: rgba(0,0,0,0.9);
    }

.recipe-photo-pending {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.recipe-detail-photo {
    flex-shrink: 0;
    margin-bottom: 1rem;
}

    .recipe-detail-photo img {
        max-width: 100%;
        max-height: 300px;
        border-radius: 10px;
        border: 1px solid var(--border);
        display: block;
    }

/* ============================================
   COLLECTION GRID & CARDS
   ============================================ */

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

.collection-card {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.75rem;
    color: var(--text-primary);
    transition: border-color 0.2s;
    min-width: 0;
}

    .collection-card:hover {
        border-color: var(--accent);
        color: var(--text-primary);
    }

.collection-card-icon {
    font-size: 2rem;
    flex-shrink: 0;
    line-height: 1;
}

.collection-card-info {
    flex: 1;
    min-width: 0;
}

.collection-card-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.collection-card-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.collection-card-counts {
    display: flex;
    gap: 0.75rem;
    font-size: 0.8rem;
    color: var(--accent-green);
    margin-top: 0.2rem;
}

/* ============================================
   COLLECTION DETAIL
   ============================================ */

.collection-detail-header {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1rem;
}

    .collection-detail-header .collection-card-icon {
        font-size: 3.5rem;
    }

.collection-summary-bar {
    display: flex;
    gap: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

    .collection-summary-bar span {
        font-size: 0.9rem;
        color: var(--accent-green);
    }

.collection-mixes-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.collection-mix-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.75rem;
}

.collection-mix-comp-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-secondary);
    border-radius: 6px;
    padding: 0.3rem 0.5rem;
    margin-top: 0.25rem;
    flex-wrap: wrap;
}

/* ============================================
   COLLECTION EDITOR (ADD ITEMS)
   ============================================ */

.add-item-section {
    margin-top: 1rem;
}

.add-item-bar {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.search-results-dropdown {
    max-height: 250px;
    overflow-y: auto;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    margin-top: 0.25rem;
}

.search-result-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.6rem;
    cursor: pointer;
}

    .search-result-row:hover {
        background: var(--bg-secondary);
    }

.success-msg {
    background: rgba(78,204,163,0.15);
    border: 1px solid var(--accent-green);
    color: var(--accent-green);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 0.85rem;
}

/* ============================================
   RESPONSIVE — MOBILE (<768px)
   ============================================ */

@media (max-width: 768px) {
    /* --- NAV: hamburger menu --- */
    .top-nav {
        flex-wrap: wrap;
        padding: 0.6rem 1rem;
    }

    .nav-hamburger {
        display: flex;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        order: 3;
        padding-top: 0.5rem;
        border-top: 1px solid var(--border);
        margin-top: 0.5rem;
        gap: 0;
    }

        .nav-links.nav-open {
            display: flex;
        }

        .nav-links .nav-link {
            padding: 0.65rem 0.5rem;
            border-radius: 6px;
            font-size: 0.95rem;
        }

            .nav-links .nav-link:hover {
                background: var(--bg-card);
            }

    .nav-auth-desktop {
        display: none;
    }

    .nav-auth-mobile {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        padding: 0.65rem 0.5rem;
        border-top: 1px solid var(--border);
        margin-top: 0.25rem;
    }

    .brand-sub {
        display: none;
    }

    /* --- MAIN CONTENT --- */
    .main-content {
        padding: 1rem 0.75rem;
    }

    .page-header {
        gap: 0.5rem;
    }

        .page-header h1 {
            font-size: 1.3rem;
        }

        .page-header .btn-primary {
            padding: 0.5rem 0.75rem;
            font-size: 0.8rem;
        }

    /* --- GRIDS: single column --- */
    .paint-grid,
    .mix-grid,
    .recipe-grid,
    .collection-grid {
        grid-template-columns: 1fr;
    }

    /* --- FILTERS --- */
    .filters-bar {
        flex-direction: column;
    }

    .search-input {
        min-width: 0;
    }

    /* --- MIX BUILDER --- */
    .mix-builder {
        grid-template-columns: 1fr;
    }

    .mix-builder-sidebar {
        position: static;
        order: -1;
    }

    .preview-swatch {
        aspect-ratio: 3/1;
    }

    .component-row {
        gap: 0.5rem;
        padding: 0.5rem;
    }

    .component-swatch {
        width: 32px;
        height: 32px;
    }

    /* --- MIX DETAIL --- */
    .mix-detail-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .mix-detail-preview {
        width: 80px;
        height: 80px;
    }

    .mix-detail-title h1 {
        font-size: 1.3rem;
    }

    .mix-detail-meta {
        justify-content: center;
        gap: 0.5rem;
    }

    .mix-tags {
        justify-content: center;
    }

    /* Mix recipe rows: drop bar column */
    .recipe-row {
        grid-template-columns: 36px 1fr auto;
        gap: 0.5rem;
        padding: 0.5rem;
    }

    .recipe-swatch {
        width: 36px;
        height: 36px;
    }

    .recipe-bar-container {
        display: none;
    }

    /* --- RECIPE DETAIL --- */
    .recipe-detail-header {
        flex-direction: column;
    }

    .recipe-detail-photo img {
        max-height: 200px;
    }

    .recipe-detail-header h1 {
        font-size: 1.3rem;
    }

    /* --- RECIPE BUILDER --- */
    .form-row-pair {
        grid-template-columns: 1fr;
    }

    .step-add-item {
        flex-direction: column;
    }

    .step-card {
        padding: 0.75rem;
    }

    /* --- COLLECTION DETAIL --- */
    .collection-detail-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .collection-summary-bar {
        justify-content: center;
        gap: 1rem;
    }

    .collection-mix-comp-row {
        font-size: 0.8rem;
    }

    /* --- TABS --- */
    .tab-bar {
        gap: 0;
    }

    .tab {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }

    /* --- MIX ACTIONS --- */
    .mix-actions {
        flex-wrap: wrap;
    }

    .btn-secondary,
    .btn-danger {
        font-size: 0.8rem;
        padding: 0.4rem 0.75rem;
    }

    /* --- AUTH --- */
    .auth-card {
        margin: 0 0.25rem;
        padding: 1.5rem;
    }

    .auth-page {
        padding-top: 1.5rem;
    }

    /* --- SAVE BAR --- */
    .save-bar {
        flex-direction: column;
    }

        .save-bar .btn-primary,
        .save-bar .btn-secondary,
        .save-bar .btn-danger {
            width: 100%;
        }

    /* --- CUSTOM COLOR FORM --- */
    .custom-color-form {
        flex-direction: column;
        align-items: stretch;
    }

    .color-picker {
        width: 100%;
        height: 44px;
    }

    .form-input-sm {
        min-width: 0;
        width: 100%;
    }

    /* --- ADD ITEM BAR --- */
    .add-item-bar {
        flex-direction: column;
    }
}

/* ============================================
   RESPONSIVE — SMALL MOBILE (<480px)
   ============================================ */

@media (max-width: 480px) {
    .page-header h1 {
        font-size: 1.15rem;
    }

    .mix-swatch {
        width: 44px;
        height: 44px;
    }

    .mix-card {
        gap: 0.75rem;
        padding: 0.6rem;
    }

    .paint-swatch {
        width: 40px;
        height: 40px;
    }

    .recipe-card-thumb {
        width: 40px;
        height: 40px;
    }

    .recipe-card-icon {
        font-size: 1.6rem;
    }

    .collection-card-icon {
        font-size: 1.6rem;
    }

    .step-view-card {
        padding: 0.75rem;
    }

    .step-view-item {
        padding: 0.3rem;
    }
}
