/* Dine Fiji — clean & modern styling (Yelp/TripAdvisor-like, photos do the visual work) */

:root {
    --color-primary: #d9534f;      /* warm coral-red accent, restrained */
    --color-primary-dark: #b5423e;
    --color-text: #1f2328;
    --color-text-muted: #5f6b7a;
    --color-border: #e3e6ea;
    --color-bg: #ffffff;
    --color-bg-alt: #f7f8fa;
    --color-success: #2e7d32;
    --color-warning: #b8860b;
    --radius: 8px;
    --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
    --max-width: 1120px;
    font-size: 16px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--color-text);
    background: var(--color-bg-alt);
    line-height: 1.5;
}

a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Header --- */
.site-header {
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 10;
}
.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}
.logo {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--color-text);
}
.logo span { color: var(--color-primary); }
.main-nav { display: flex; gap: 20px; align-items: center; }
.main-nav a { color: var(--color-text); font-weight: 500; }
.main-nav a:hover { color: var(--color-primary); text-decoration: none; }
.btn {
    display: inline-block;
    padding: 9px 18px;
    border-radius: var(--radius);
    border: 1px solid transparent;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.95rem;
}
.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover { background: var(--color-primary-dark); text-decoration: none; }
.btn-outline { background: transparent; border-color: var(--color-border); color: var(--color-text); }
.btn-outline:hover { border-color: var(--color-primary); color: var(--color-primary); text-decoration: none; }
.btn-danger { background: #fff; border-color: #d9534f; color: #d9534f; }
.btn-small { padding: 5px 12px; font-size: 0.85rem; }

/* --- Hero / search --- */
.hero {
    background: linear-gradient(135deg, #1f2328, #3a4250);
    color: #fff;
    padding: 56px 0;
    text-align: center;
}
.hero h1 { font-size: 2.1rem; margin: 0 0 10px; }
.hero p { color: #d7dade; margin: 0 0 28px; }
.search-form {
    background: #fff;
    border-radius: var(--radius);
    padding: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    max-width: 900px;
    margin: 0 auto;
    box-shadow: var(--shadow);
}
.search-form input[type="text"],
.search-form select {
    flex: 1 1 160px;
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    font-size: 0.95rem;
    color: var(--color-text);
}
.search-form button { flex: 0 0 auto; }

/* --- Cards / grid --- */
.section { padding: 40px 0; }
.section h2 { margin-bottom: 20px; }
.restaurant-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}
.restaurant-card {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
}
.restaurant-card .photo {
    height: 160px;
    background: var(--color-bg-alt) center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    font-size: 0.85rem;
}
.restaurant-card .body { padding: 14px 16px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.restaurant-card h3 { margin: 0; font-size: 1.05rem; }
.restaurant-card .meta { color: var(--color-text-muted); font-size: 0.88rem; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.tag {
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: 999px;
    padding: 2px 10px;
    font-size: 0.78rem;
    color: var(--color-text-muted);
}
.rating { color: var(--color-warning); font-weight: 600; font-size: 0.9rem; }
.rating .count { color: var(--color-text-muted); font-weight: 400; }

/* --- Filters sidebar (search page) --- */
.search-layout { display: grid; grid-template-columns: 220px 1fr; gap: 24px; align-items: start; }
.filters { background: var(--color-bg); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 16px; }
.filters h4 { margin: 0 0 8px; font-size: 0.9rem; text-transform: uppercase; color: var(--color-text-muted); }
.filters label { display: block; font-size: 0.92rem; margin-bottom: 6px; }
.filters select, .filters input { width: 100%; margin-bottom: 14px; padding: 7px; border: 1px solid var(--color-border); border-radius: 6px; }

/* --- Restaurant profile page --- */
.profile-header { background: var(--color-bg); border-bottom: 1px solid var(--color-border); padding: 28px 0; }
.profile-header h1 { margin: 0 0 6px; }
.photo-strip { display: flex; gap: 10px; overflow-x: auto; padding: 20px 0; }
.photo-strip img { height: 220px; border-radius: var(--radius); flex: 0 0 auto; }
.profile-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 28px; align-items: start; }
.card { background: var(--color-bg); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 20px; margin-bottom: 20px; }
.hours-table { width: 100%; font-size: 0.92rem; }
.hours-table td { padding: 3px 0; }
.status-open { color: var(--color-success); font-weight: 600; }
.status-closed { color: var(--color-primary); font-weight: 600; }

/* --- Reviews --- */
.review { border-bottom: 1px solid var(--color-border); padding: 16px 0; }
.review:last-child { border-bottom: none; }
.review .stars { color: var(--color-warning); font-size: 0.95rem; }
.review-form .rating-group { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.review-form .rating-group div { display: flex; flex-direction: column; gap: 4px; }

/* --- Forms --- */
.form-page { max-width: 460px; margin: 60px auto; background: #fff; padding: 32px; border-radius: var(--radius); box-shadow: var(--shadow); }
.form-page h1 { margin-top: 0; font-size: 1.4rem; }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 0.9rem; }
.field input, .field select, .field textarea {
    width: 100%; padding: 10px; border: 1px solid var(--color-border); border-radius: 6px; font-size: 0.95rem;
}
.error-message { background: #fdecea; color: #b3261e; padding: 10px 14px; border-radius: 6px; margin-bottom: 16px; font-size: 0.9rem; }
.success-message { background: #eaf6ea; color: var(--color-success); padding: 10px 14px; border-radius: 6px; margin-bottom: 16px; font-size: 0.9rem; }

/* --- Footer --- */
.site-footer { background: #1f2328; color: #b6bcc4; padding: 32px 0; margin-top: 40px; font-size: 0.88rem; }
.site-footer a { color: #d7dade; }
.site-footer .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* --- Admin --- */
.admin-layout { display: grid; grid-template-columns: 200px 1fr; min-height: 100vh; }
.admin-sidebar { background: #1f2328; color: #fff; padding: 24px 0; }
.admin-sidebar a { display: block; color: #d7dade; padding: 10px 24px; }
.admin-sidebar a:hover, .admin-sidebar a.active { background: #313841; color: #fff; text-decoration: none; }
.admin-main { padding: 28px; }
.stat-cards { display: flex; gap: 16px; margin-bottom: 24px; }
.stat-card { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius); padding: 18px 22px; flex: 1; }
.stat-card .num { font-size: 1.8rem; font-weight: 700; }
.stat-card .label { color: var(--color-text-muted); font-size: 0.85rem; }
table.admin-table { width: 100%; border-collapse: collapse; background: #fff; }
table.admin-table th, table.admin-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--color-border); font-size: 0.92rem; }
.checkbox-grid { display: flex; flex-wrap: wrap; gap: 10px 18px; }
.checkbox-grid label { display: flex; align-items: center; gap: 6px; font-weight: 400; width: auto; }
.checkbox-grid input { width: auto; }
.badge { padding: 2px 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 600; }
.badge-published { background: #eaf6ea; color: var(--color-success); }
.badge-flagged { background: #fff6e0; color: var(--color-warning); }
.badge-removed { background: #fdecea; color: #b3261e; }

@media (max-width: 800px) {
    .search-layout, .profile-grid { grid-template-columns: 1fr; }
    .admin-layout { grid-template-columns: 1fr; }
    .admin-sidebar { display: flex; overflow-x: auto; padding: 12px; }
}
