:root {
    --orange: #E8622A;
    --orange-light: #FDE8DF;
    --orange-dark: #C04E1E;
    --bg: #F2F2F7;
    --text: #1A1A1A;
    --muted: #7a7a7a;
    --border: #E0E0E0;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 17px;
}

.navbar-brand {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--orange-dark) !important;
}

.navbar {
    background: white !important;
    border-bottom: 1px solid var(--border);
}

.btn-primary {
    background: var(--orange);
    border-color: var(--orange);
}
.btn-primary:hover {
    background: var(--orange-dark);
    border-color: var(--orange-dark);
}
.btn-outline-primary {
    color: var(--orange);
    border-color: var(--orange);
}
.btn-outline-primary:hover {
    background: var(--orange);
    border-color: var(--orange);
    color: white;
}

/* Category tiles — home screen */
.category-tile {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    display: block;
    text-decoration: none;
    aspect-ratio: 1;
    background: var(--orange);
    transition: opacity 0.15s;
}
.category-tile:hover {
    opacity: 0.9;
}
.category-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.category-tile .tile-no-photo {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--orange) 0%, var(--orange-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
}
.category-tile .tile-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0.15) 55%, transparent 100%);
}
.category-tile .tile-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.75rem 0.875rem;
    color: white;
}
.category-tile .tile-name {
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.2;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.category-tile .tile-count {
    font-size: 0.78rem;
    opacity: 0.88;
    margin-top: 0.1rem;
}

/* Recipe cards */
.recipe-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow 0.15s;
    text-decoration: none;
    color: inherit;
    display: block;
}
.recipe-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    color: inherit;
}
.recipe-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}
.recipe-card .no-photo {
    width: 100%;
    height: 180px;
    background: var(--orange-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}
.recipe-card .card-body {
    padding: 1rem;
}
.recipe-card .card-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
    font-size: 1.05rem;
}
.recipe-card .badge {
    background: var(--orange-light);
    color: var(--orange-dark);
    font-weight: 500;
    font-size: 0.8rem;
}

.category-pill {
    background: white;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 0.4rem 1rem;
    font-size: 0.9rem;
    text-decoration: none;
    color: var(--text);
    white-space: nowrap;
}
.category-pill.active, .category-pill:hover {
    background: var(--orange);
    border-color: var(--orange);
    color: white;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--orange);
    text-decoration: none;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}
.back-link:hover {
    color: var(--orange-dark);
}

.recipe-hero img {
    width: 100%;
    max-height: 320px;
    object-fit: cover;
    border-radius: 12px;
}

.ingredient-item {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
    line-height: 1.4;
}
.ingredient-item:last-child {
    border-bottom: none;
}

.step-item {
    display: flex;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}
.step-item:last-child {
    border-bottom: none;
}
.step-number {
    background: var(--orange);
    color: white;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    min-width: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.meta-badge {
    background: var(--orange-light);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    text-align: center;
    flex: 1;
}
.meta-badge .value {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--orange-dark);
}
.meta-badge .label {
    font-size: 0.75rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.search-bar input {
    border-radius: 24px;
    border: 1px solid var(--border);
    padding: 0.6rem 1.2rem;
    font-size: 1rem;
    background: white;
}
.search-bar button {
    border-radius: 24px;
    padding: 0.6rem 1.4rem;
}

.fab {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--orange);
    color: white;
    border: none;
    font-size: 1.6rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    z-index: 100;
}
.fab:hover {
    background: var(--orange-dark);
    color: white;
}

form .form-label {
    font-weight: 500;
}
form .form-control, form .form-select {
    border-radius: 8px;
    border: 1px solid var(--border);
    font-size: 1rem;
    padding: 0.6rem 0.9rem;
}
form .form-control:focus, form .form-select:focus {
    border-color: var(--orange);
    box-shadow: 0 0 0 0.2rem rgba(232,98,42,0.2);
}

.section-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
}
