/* ═══════════════════════════════════════════
   RESIPIE — Warm Light Theme
   ═══════════════════════════════════════════ */

:root {
    /* Light warm palette */
    --bg-primary: #faf8f5;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f3efe9;
    --bg-glass: rgba(255, 255, 255, 0.8);
    --bg-glass-hover: rgba(255, 255, 255, 0.95);
    --bg-card: rgba(255, 255, 255, 0.85);

    /* Accent - warm amber/copper */
    --accent: #c8722a;
    --accent-glow: rgba(200, 114, 42, 0.15);
    --accent-soft: rgba(200, 114, 42, 0.08);
    --accent-hover: #b5651d;
    --accent-dark: #a05520;
    --accent-light: #f5e6d6;

    /* Secondary accent */
    --copper: #a0522d;
    --copper-soft: rgba(160, 82, 45, 0.08);

    /* Text */
    --text-primary: #2c2418;
    --text-secondary: #6b5d4f;
    --text-muted: #9e9184;
    --text-inverse: #ffffff;

    /* Borders */
    --border: rgba(0, 0, 0, 0.08);
    --border-hover: rgba(200, 114, 42, 0.3);

    /* Status */
    --success: #3d9a50;
    --danger: #c9433e;
    --warning: #d4920a;

    /* Layout */
    --sidebar-width: 240px;
    --nav-mobile-height: 68px;
    --radius: 16px;
    --radius-sm: 10px;
    --radius-xs: 6px;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.1);

    /* Transitions */
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Subtle warm top glow */
body::before {
    content: '';
    position: fixed;
    top: -20%;
    right: -10%;
    width: 50%;
    height: 50%;
    background: radial-gradient(circle, rgba(200,114,42,0.05) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* ─── SIDEBAR ─── */
#sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: 100;
    padding: 20px 0;
    box-shadow: var(--shadow-sm);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px 32px;
    cursor: pointer;
}

.brand-icon {
    font-size: 28px;
}

.brand-text {
    font-family: 'Playfair Display', serif;
    font-size: 26px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent), var(--copper));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-links {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0 12px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 14px;
    transition: var(--transition);
}

.nav-link svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.nav-link:hover {
    background: var(--accent-soft);
    color: var(--accent);
}

.nav-link.active {
    background: var(--accent-light);
    color: var(--accent);
    font-weight: 600;
}

/* ─── MOBILE NAV ─── */
#mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--nav-mobile-height);
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    z-index: 100;
    justify-content: space-around;
    align-items: center;
    padding: 0 16px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
}

.mob-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 11px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.mob-link svg {
    width: 22px;
    height: 22px;
}

.mob-link.active {
    color: var(--accent);
}

/* ─── MAIN CONTENT ─── */
#main-content {
    margin-left: var(--sidebar-width);
    padding: 32px;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

#view-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* ─── SEARCH BAR ─── */
.search-container {
    position: relative;
    margin-bottom: 28px;
}

.search-input {
    width: 100%;
    padding: 16px 20px 16px 52px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

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

.search-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    width: 20px;
    height: 20px;
}

/* ─── CATEGORY PILLS ─── */
.category-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.cat-pill {
    padding: 8px 18px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 50px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    box-shadow: var(--shadow-sm);
}

.cat-pill:hover, .cat-pill.active {
    background: var(--accent-light);
    border-color: var(--accent);
    color: var(--accent);
}

/* ─── RECIPE CARD GRID ─── */
.recipe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.recipe-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    box-shadow: var(--shadow-sm);
}

.recipe-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-lg);
}

.recipe-card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: var(--bg-tertiary);
    display: block;
}

.recipe-card-img-placeholder {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--bg-tertiary), var(--accent-light));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 52px;
    opacity: 0.6;
}

.recipe-card-body {
    padding: 18px 20px 20px;
}

.recipe-card-category {
    display: inline-block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 6px;
}

.recipe-card-title {
    font-family: 'Playfair Display', serif;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.3;
    color: var(--text-primary);
}

.recipe-card-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.recipe-card-meta {
    display: flex;
    gap: 16px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    font-size: 12px;
    color: var(--text-muted);
}

.recipe-card-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ─── PAGE HEADERS ─── */
.page-header {
    margin-bottom: 28px;
}

.page-title {
    font-family: 'Playfair Display', serif;
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 14px;
}

/* ─── RECIPE DETAIL VIEW ─── */
.recipe-detail {
    max-width: 900px;
    margin: 0 auto;
}

.recipe-hero {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 28px;
    box-shadow: var(--shadow-md);
}

.recipe-hero img {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    display: block;
}

.recipe-hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px 28px 24px;
    background: linear-gradient(transparent, rgba(0,0,0,0.65));
}

.recipe-hero-title {
    font-family: 'Playfair Display', serif;
    font-size: 36px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.recipe-hero-overlay .recipe-hero-title {
    color: #fff;
}

.recipe-hero-meta {
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: var(--text-secondary);
}

.recipe-hero-overlay .recipe-hero-meta {
    color: rgba(255,255,255,0.85);
}

.recipe-hero-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.recipe-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    margin-bottom: 20px;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.recipe-back-btn:hover {
    background: var(--accent-light);
    color: var(--accent);
    border-color: var(--accent);
}

/* ─── SECTIONS ─── */
.detail-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

.detail-section-title {
    font-family: 'Playfair Display', serif;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
}

.detail-section-title .icon {
    font-size: 20px;
}

/* ─── SCALE SELECTOR ─── */
.scale-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.scale-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
    margin-right: 4px;
}

.scale-pill {
    padding: 7px 16px;
    border-radius: 50px;
    border: 1px solid var(--border);
    background: var(--bg-primary);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Inter', sans-serif;
}

.scale-pill:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-light);
}

.scale-pill.active {
    background: var(--accent);
    color: var(--text-inverse);
    border-color: var(--accent);
    box-shadow: 0 2px 8px var(--accent-glow);
}

/* ─── INGREDIENT CHECKLIST ─── */
.ingredient-list {
    list-style: none;
}

.ingredient-section-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 16px 0 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border);
}

.ingredient-section-label:first-child {
    margin-top: 0;
}

.ingredient-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-xs);
    transition: var(--transition);
    cursor: pointer;
}

.ingredient-item:hover {
    background: var(--accent-soft);
}

.ingredient-item.checked {
    opacity: 0.45;
}

.ingredient-item.checked .ingredient-name {
    text-decoration: line-through;
}

.ingredient-checkbox {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: 2px solid var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: var(--transition);
    background: var(--bg-primary);
}

.ingredient-item.checked .ingredient-checkbox {
    background: var(--accent);
    border-color: var(--accent);
}

.ingredient-item.checked .ingredient-checkbox::after {
    content: '✓';
    color: var(--text-inverse);
    font-size: 14px;
    font-weight: 700;
}

.ingredient-qty {
    font-weight: 600;
    color: var(--accent);
    min-width: 70px;
    font-size: 15px;
}

.ingredient-name {
    font-size: 15px;
    color: var(--text-primary);
}

/* ─── INSTRUCTIONS ─── */
.instructions-list {
    counter-reset: step;
    list-style: none;
}

.instruction-step {
    counter-increment: step;
    display: flex;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}

.instruction-step:last-child {
    border-bottom: none;
}

.instruction-step::before {
    content: counter(step);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    background: var(--accent-light);
    color: var(--accent);
    border-radius: 50%;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
    margin-top: 2px;
}

.instruction-text {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-primary);
}

/* ─── COOK NOTES ─── */
.note-card {
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    margin-bottom: 10px;
}

.note-text {
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.6;
}

.note-date {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 8px;
}

.note-actions {
    display: flex;
    gap: 8px;
    margin-top: 6px;
}

.note-delete-btn {
    font-size: 11px;
    color: var(--danger);
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    opacity: 0.7;
    transition: var(--transition);
}

.note-delete-btn:hover { opacity: 1; }

.note-input-row {
    display: flex;
    gap: 10px;
    margin-top: 14px;
}

.note-input {
    flex: 1;
    padding: 12px 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    outline: none;
    resize: none;
    min-height: 44px;
}

.note-input:focus {
    border-color: var(--accent);
}

/* ─── ORIGINAL CARD IMAGE ─── */
.card-image-section {
    text-align: center;
}

.card-image-section img {
    max-width: 100%;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

/* ─── BUTTONS ─── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    border: none;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--copper));
    color: var(--text-inverse);
    box-shadow: 0 4px 12px var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px var(--accent-glow);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-light);
}

.btn-danger {
    background: rgba(201, 67, 62, 0.08);
    color: var(--danger);
    border: 1px solid rgba(201, 67, 62, 0.2);
}

.btn-danger:hover {
    background: rgba(201, 67, 62, 0.15);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ─── ADMIN / WIZARD ─── */
.wizard-steps {
    display: flex;
    gap: 0;
    margin-bottom: 28px;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.wizard-step {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 12px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    position: relative;
    transition: var(--transition);
}

.wizard-step.active {
    color: var(--accent);
    background: var(--accent-light);
}

.wizard-step.done {
    color: var(--success);
}

.wizard-step-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}

.wizard-step.active .wizard-step-num {
    background: var(--accent);
    color: var(--text-inverse);
}

.wizard-step.done .wizard-step-num {
    background: var(--success);
    color: white;
}

.wizard-panel {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    min-height: 300px;
    box-shadow: var(--shadow-sm);
}

/* ─── FORM ELEMENTS ─── */
.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: var(--transition);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

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

.form-select {
    appearance: none;
    cursor: pointer;
    background-image: 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='%236b5d4f' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.form-row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 14px;
}

/* ─── CAPTURE AREA ─── */
.capture-area {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    min-height: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: var(--bg-primary);
}

.capture-area:hover {
    border-color: var(--accent);
    background: var(--accent-light);
}

.capture-area .icon {
    font-size: 48px;
    opacity: 0.6;
}

.capture-area .text {
    color: var(--text-secondary);
    font-size: 14px;
}

.capture-area .sub-text {
    color: var(--text-muted);
    font-size: 12px;
}

.capture-preview {
    max-width: 100%;
    max-height: 300px;
    border-radius: var(--radius-sm);
    margin-top: 12px;
}

/* ─── LOADING SPINNER ─── */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.spinner-lg {
    width: 36px;
    height: 36px;
    border-width: 3px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-overlay {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 40px;
    color: var(--text-secondary);
    font-size: 14px;
}

/* ─── OCR TEXT PREVIEW ─── */
.ocr-text-box {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px;
    white-space: pre-wrap;
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-primary);
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 16px;
}

/* ─── INGREDIENT EDITOR ─── */
.ingredient-editor-row {
    display: grid;
    grid-template-columns: 80px 100px 1fr 100px 40px;
    gap: 8px;
    margin-bottom: 8px;
    align-items: center;
}

.ingredient-editor-row input, .ingredient-editor-row select {
    padding: 8px 10px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    color: var(--text-primary);
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    outline: none;
}

.ingredient-editor-row input:focus, .ingredient-editor-row select:focus {
    border-color: var(--accent);
}

.ingredient-remove-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(201,67,62,0.08);
    color: var(--danger);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.ingredient-remove-btn:hover {
    background: rgba(201,67,62,0.18);
}

.add-ingredient-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--accent-light);
    border: 1px dashed var(--accent);
    border-radius: var(--radius-xs);
    color: var(--accent);
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 8px;
}

.add-ingredient-btn:hover {
    background: var(--accent);
    color: var(--text-inverse);
    border-style: solid;
}

/* ─── DISH IMAGE PREVIEW ─── */
.dish-preview-container {
    text-align: center;
    margin-top: 16px;
}

.dish-preview {
    max-width: 100%;
    max-height: 350px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

/* ─── RECIPE ADMIN ACTIONS ─── */
.recipe-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    justify-content: flex-end;
}

/* ─── TOAST ─── */
#toast-container {
    position: fixed;
    bottom: 90px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column-reverse;
    gap: 8px;
}

.toast {
    padding: 14px 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    animation: toastIn 0.3s ease forwards;
    max-width: 380px;
    box-shadow: var(--shadow-lg);
}

.toast.success { border-left: 3px solid var(--success); }
.toast.error { border-left: 3px solid var(--danger); }
.toast.info { border-left: 3px solid var(--accent); }

@keyframes toastIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ─── MODAL ─── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(4px);
    z-index: 9000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.open {
    display: flex;
}

.modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    max-width: 560px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    font-family: 'Playfair Display', serif;
    font-size: 20px;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-xs);
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

#modal-body {
    padding: 24px;
}

#modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* ─── EMPTY STATE ─── */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state .icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state .title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.empty-state .subtitle {
    font-size: 14px;
    max-width: 400px;
    margin: 0 auto;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
    #sidebar { display: none; }
    #mobile-nav { display: flex; }
    #main-content {
        margin-left: 0;
        padding: 20px 16px calc(var(--nav-mobile-height) + 16px);
    }
    .recipe-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 16px;
    }
    .recipe-hero-title { font-size: 26px; }
    .ingredient-editor-row {
        grid-template-columns: 60px 80px 1fr 80px 36px;
        gap: 6px;
    }
    .form-row, .form-row-3 {
        grid-template-columns: 1fr;
    }
    .wizard-step span:not(.wizard-step-num) {
        display: none;
    }
}

/* ─── PRINT ─── */
@media print {
    #sidebar, #mobile-nav, .recipe-back-btn, .scale-bar, .note-input-row, .recipe-actions { display: none !important; }
    #main-content { margin-left: 0; padding: 0; }
    body { background: white; color: black; }
    .detail-section { background: white; border: 1px solid #ddd; box-shadow: none; }
    .ingredient-qty { color: #333; }
}
