:root {
    --bg: #fff6ec;
    --surface: #ffffff;
    --panel: #fff4ee;
    --panel-strong: #fde0c1;
    --border: #f1c0a5;
    --text: #0f0b08;
    --muted: #6b5c52;
    --accent: #f97316;
    --accent-strong: #ff9b3d;
    font-size: 16px;
}

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

body {
    margin: 0;
    background: linear-gradient(180deg, #fffefa 0%, var(--bg) 100%);
    color: var(--text);
    font-family: 'Cairo', 'Tajawal', sans-serif;
    direction: rtl;
    min-height: 100vh;
}

.page {
    min-height: 100vh;
    background: var(--bg);
}

header,
.section {
    padding: 1rem clamp(1rem, 3vw, 4rem);
}

.hero {
    display: grid;
    gap: 1rem;
    align-items: center;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: var(--panel);
    border-radius: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
    margin-bottom: 1.5rem;
}

.top-bar .brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.top-bar .brand img {
    width: 48px;
    height: 48px;
    border-radius: 14px;
}

.top-bar .actions-links {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.top-bar .actions-links a {
    background: #fef0e1;
    border: 1px solid transparent;
    padding: 0.6rem 1rem;
    border-radius: 999px;
    color: var(--text);
    font-weight: 600;
    text-decoration: none;
}

.pill-card {
    background: var(--surface);
    border-radius: 1.5rem;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 20px 30px rgba(245, 176, 114, 0.2);
}

.hero .actions {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.grid {
    display: grid;
    gap: 1.25rem;
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.btn {
    border: none;
    padding: 0.85rem 1.5rem;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    transition: transform 0.2s ease, background 0.2s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #ff7a18, #ffb347);
    color: #fff;
}

.btn-secondary {
    background: transparent;
    border: 1px solid rgba(248, 113, 23, 0.6);
    color: var(--accent);
}

.btn:hover {
    transform: translateY(-2px);
}

.badge {
    display: inline-flex;
    padding: 0.25rem 0.85rem;
    border-radius: 999px;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    background: rgba(45, 212, 191, 0.15);
    color: var(--accent);
}

form {
    display: grid;
    gap: 1rem;
}

label {
    font-size: 0.9rem;
    color: var(--muted);
}

input,
textarea,
select {
    width: 100%;
    background: #fff;
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 0.8rem;
    padding: 0.85rem 1rem;
    font-size: 1rem;
}

textarea {
    min-height: 130px;
}

.data-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--muted);
}

.meals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.meal-card {
    position: relative;
    overflow: hidden;
    background: #fff;
    border-radius: 1rem;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}

.meal-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.meal-card .body {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.meal-card footer {
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-flex;
    margin-left: 0.4rem;
}

.status-published {
    background: var(--accent);
}

.status-expired {
    background: #f87171;
}

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

.notification-item {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 0.9rem;
    padding: 1rem;
}

.notification-item.unread {
    border-color: var(--accent);
}

.hero h1,
.section h2 {
    margin: 0;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.feature-item {
    background: var(--panel);
    border-radius: 1rem;
    padding: 1rem;
    border: 1px solid var(--border);
}

.grid-sm {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.page-footer {
    padding: 2rem;
    text-align: center;
    font-size: 0.85rem;
    color: var(--muted);
}

@media (max-width: 768px) {
    header,
    .section {
        padding: 1.5rem;
    }
    .hero {
        grid-template-columns: 1fr;
    }
}

.auth-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(15, 11, 8, 0.35);
    z-index: 999;
    padding: 1rem;
}

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

.auth-modal__dialog {
    width: min(460px, 100%);
    background: #fff;
    border-radius: 1.5rem;
    padding: 1.5rem;
    box-shadow: 0 20px 40px rgba(15, 11, 8, 0.25);
    position: relative;
}

.auth-modal__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    border: none;
    background: transparent;
    font-size: 1.4rem;
    cursor: pointer;
    color: var(--muted);
}

.auth-modal__tabs {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

.auth-modal__tabs button {
    flex: 1;
    border: none;
    border-radius: 999px;
    padding: 0.6rem 0;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
    color: var(--muted);
    border: 1px solid transparent;
}

.auth-modal__tabs button.active {
    background: linear-gradient(135deg, #ff8a3c, #ffb347);
    color: #fff;
    border-color: #ff9b3d;
}

.auth-form {
    display: none;
    flex-direction: column;
    gap: 0.9rem;
}

.auth-form.active {
    display: flex;
}

.auth-form input,
.auth-form select {
    border: 1px solid #f1c0a5;
    border-radius: 0.9rem;
    padding: 0.85rem 1rem;
    background: #fff;
}
