* { box-sizing: border-box; }

body {
    font-family: -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    background: #fafafa;
    color: #2b2b2b;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.site-header {
    background: #fff;
    border-bottom: 1px solid #eee;
    padding: 16px 0;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.4rem;
    font-weight: 700;
    text-decoration: none;
    color: #d9534f;
}

nav a {
    margin-left: 16px;
    text-decoration: none;
    color: #333;
}

main {
    padding: 30px 20px;
    min-height: 60vh;
}

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

.recipe-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.15s ease;
}

.recipe-card:hover {
    transform: translateY(-3px);
}

.recipe-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    background: #eee;
}

.recipe-card .body {
    padding: 14px;
}

.recipe-card h3 {
    margin: 0 0 6px;
    font-size: 1.1rem;
}

.recipe-card .category {
    display: inline-block;
    font-size: 0.75rem;
    color: #d9534f;
    text-transform: uppercase;
    margin-bottom: 6px;
    letter-spacing: 0.04em;
}

.recipe-card p {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
}

.recipe-detail img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 20px;
}

.recipe-detail h1 {
    margin-bottom: 4px;
}

.recipe-detail .category {
    color: #d9534f;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.04em;
}

.recipe-detail .columns {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
    margin-top: 20px;
}

.recipe-detail ul, .recipe-detail ol {
    padding-left: 20px;
}

.site-footer {
    border-top: 1px solid #eee;
    padding: 20px 0;
    text-align: center;
    color: #888;
    font-size: 0.85rem;
}

.empty-state {
    text-align: center;
    color: #888;
    padding: 60px 0;
}

/* Admin */
.admin-header {
    background: #2b2b2b;
}

.admin-header .logo {
    color: #fff;
}

.admin-header nav a {
    color: #ddd;
}

.admin-wrap {
    max-width: 800px;
    margin: 0 auto;
    padding: 30px 20px;
}

.login-box {
    max-width: 360px;
    margin: 60px auto;
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.1);
}

form label {
    display: block;
    margin-bottom: 14px;
    font-weight: 600;
    font-size: 0.9rem;
}

form input[type=text],
form input[type=password],
form input[type=file],
form select,
form textarea {
    display: block;
    width: 100%;
    margin-top: 6px;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: normal;
}

form textarea {
    min-height: 100px;
    font-family: inherit;
}

.btn {
    display: inline-block;
    background: #d9534f;
    color: #fff;
    border: none;
    padding: 9px 18px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
    text-decoration: none;
}

.btn.secondary {
    background: #6c757d;
}

.btn.small {
    padding: 4px 10px;
    font-size: 0.8rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

table th, table td {
    text-align: left;
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.badge {
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    color: #fff;
}

.badge.published { background: #28a745; }
.badge.draft { background: #999; }

.alert {
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 16px;
}

.alert.error { background: #fdecea; color: #b02a25; }
.alert.success { background: #e6f6e9; color: #1f7a34; }

.actions { display: flex; gap: 8px; }
