:root {
    --bg: #faf5ef;
    --card-bg: #ffffff;
    --accent: #ff7a3c;
    --accent-soft: #ffe1cf;
    --text: #2c2c2c;
    --muted: #777;
    --border: #e1d7ce;
    --radius-lg: 14px;
    --radius-md: 8px;
    --shadow-soft: 0 10px 30px rgba(0,0,0,0.06);
    --font-main: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

body {
    margin: 0;
    font-family: var(--font-main);
    background: radial-gradient(circle at top left, #fff7ed, #f5ebe0);
    color: var(--text);
}

/* Layout */

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 6vw;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0,0,0,0.03);
    position: sticky;
    top: 0;
    z-index: 50;
}

.site-main {
    padding: 24px 6vw 48px;
    max-width: 1200px;
    margin: 0 auto;
}

.site-footer {
    padding: 16px 6vw 32px;
    text-align: center;
    font-size: 0.85rem;
    color: var(--muted);
}

/* Logo */

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.logo-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff7a3c, #ffb347);
    box-shadow: 0 6px 18px rgba(255, 122, 60, 0.4);
    font-size: 20px;
}

.logo-text {
    font-size: 1.1rem;
}

.logo-text span {
    color: var(--accent);
}

/* Nav */

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 18px;
    margin: 0;
    padding: 0;
    align-items: center;
}

.main-nav a {
    text-decoration: none;
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 999px;
    transition: background 0.2s, color 0.2s, transform 0.1s;
}

.main-nav a:hover {
    background: var(--accent-soft);
    color: #40251d;
    transform: translateY(-1px);
}

.btn-nav {
    border: 1px solid var(--accent);
    color: var(--accent);
}

/* Hero & cards */

.hero {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

.hero-content {
    max-width: 600px;
    padding: 24px 28px;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
}

.hero-content h1 {
    margin-top: 0;
    font-size: 2rem;
}

.hero-content p {
    margin: 8px 0;
}

.card,
.auth-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    box-shadow: var(--shadow-soft);
    margin-bottom: 24px;
}

.auth-card h1,
.card h1 {
    margin-top: 0;
}

.subtitle {
    color: var(--muted);
    margin-bottom: 16px;
}

/* Forms */

.form-modern {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-weight: 500;
    font-size: 0.95rem;
}

.form-group small {
    color: var(--muted);
    font-size: 0.8rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
textarea {
    padding: 10px 12px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    font: inherit;
    background: #fffdf9;
    transition: border 0.15s, box-shadow 0.15s, background 0.15s;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(255, 122, 60, 0.2);
    background: #ffffff;
}

textarea {
    resize: vertical;
}

/* Buttons */

.btn-primary,
.btn-secondary {
    border-radius: 999px;
    border: none;
    padding: 10px 18px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.15s, background 0.15s, color 0.15s;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 8px 20px rgba(255,122,60,0.4);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(255,122,60,0.5);
}

.btn-secondary {
    background: #fff;
    color: var(--accent);
    border: 1px solid var(--accent);
}

.btn-secondary:hover {
    background: var(--accent-soft);
}

.full-width {
    width: 100%;
}

/* Alerts */

.alert {
    padding: 10px 12px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.alert-error {
    background: #ffe2dd;
    color: #7d1c15;
}

.alert-success {
    background: #ddf4e4;
    color: #135229;
}

/* Search section */

.search-section {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

.search-form {
    display: flex;
    gap: 10px;
    width: 100%;
    max-width: 520px;
    background: var(--card-bg);
    border-radius: 999px;
    padding: 6px 6px 6px 14px;
    box-shadow: var(--shadow-soft);
}

.search-form input[type="text"] {
    border: none;
    background: transparent;
    box-shadow: none;
    padding: 8px 4px;
}

.search-form input[type="text"]:focus {
    outline: none;
    border: none;
    box-shadow: none;
}

.search-form .btn-primary {
    white-space: nowrap;
}

/* Recipes */

.recipes-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.recipe-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    padding: 16px 18px;
}

.recipe-header h3 {
    margin: 0;
}

.recipe-header .meta {
    margin: 4px 0 0;
    font-size: 0.85rem;
    color: var(--muted);
}

.recipe-header .meta a {
    color: var(--accent);
    text-decoration: none;
}

.recipe-header .meta a:hover {
    text-decoration: underline;
}

.recipe-body h4 {
    margin: 12px 0 6px;
}

.ingredients-list {
    padding-left: 18px;
    margin: 0;
}

.recipe-body p {
    margin: 4px 0;
}

.recipe-actions {
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-favorite {
    background: #fff8f1;
    border-radius: 999px;
    border: 1px solid var(--accent-soft);
    padding: 6px 14px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.btn-favorite.is-favorited {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.btn-favorite:hover {
    background: var(--accent-soft);
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 0.8rem;
}

.tag {
    background: #f6eee5;
    border-radius: 999px;
    padding: 3px 8px;
}

/* Profile */

.profile-header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    background: var(--card-bg);
    padding: 20px 22px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    margin-bottom: 24px;
}

.profile-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--accent-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.5rem;
}

.profile-about {
    margin-top: 8px;
}

.profile-actions {
    justify-self: end;
}

.profile-recipes h2 {
    margin-top: 0;
}

/* Loading / end indicators */

.loading-indicator,
.end-indicator {
    text-align: center;
    margin-top: 18px;
    font-size: 0.9rem;
    color: var(--muted);
}

/* Utility */

.muted {
    color: var(--muted);
}

.required {
    color: #c0392b;
}

/* Responsive */

@media (max-width: 768px) {
    .site-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .main-nav ul {
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .profile-header {
        grid-template-columns: auto minmax(0, 1fr);
        grid-template-rows: auto auto;
    }

    .profile-actions {
        grid-column: 1 / -1;
        justify-self: start;
    }
}


/* ----------------------------------------------------------
   ADMIN DASHBOARD
---------------------------------------------------------- */

.admin-section {
    margin-bottom: 40px;
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin-top: 25px;
}

.admin-card {
    background: var(--card-bg);
    padding: 20px 22px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
}

.admin-card-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--muted);
}

.admin-card-value {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--accent);
    margin: 5px 0 8px;
}

.admin-card-desc {
    font-size: 0.9rem;
    color: var(--text);
}

/* Responsive */
@media (max-width: 900px) {
    .admin-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .admin-grid {
        grid-template-columns: 1fr;
    }
}

.admin-users-wrapper {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

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

.admin-table th {
    font-weight: 600;
    color: var(--muted);
    background: #faf5ef;
}

.admin-table tr:nth-child(even) td {
    background: #fdf9f3;
}

.btn-small {
    font-size: 0.8rem;
    padding: 4px 10px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    margin-right: 4px;
}

.btn-small.btn-secondary {
    background: #fff;
    color: var(--accent);
    border: 1px solid var(--accent-soft);
}

.btn-small.btn-primary {
    background: var(--accent);
    color: #fff;
}
/* Admin user search bar */
.admin-user-search {
    max-width: 420px;
    margin-bottom: 18px;
}

/* Admin users table */

.admin-users-wrapper {
    overflow-x: auto;
}

.admin-users-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

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

.admin-users-table th {
    font-weight: 600;
    color: var(--muted);
    background: #faf5ef;
}

/* User cell (avatar + info) */

.user-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    color: #40251d;
}

.user-main {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.user-name {
    font-weight: 600;
}

.user-email {
    font-size: 0.85rem;
    color: var(--muted);
    word-break: break-all;
}

.user-meta {
    font-size: 0.78rem;
    color: var(--muted);
}

/* Badges */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
}

.badge-role-user {
    background: #eef4ff;
    color: #2f4ea5;
}

.badge-role-admin {
    background: #ffe8cf;
    color: #8b3a00;
}

.badge-status {
    background: #edf2f7;
    color: #334155;
}

.badge-active {
    background: #ddf4e4;
    color: #166534;
}

.badge-banned {
    background: #ffe2dd;
    color: #7f1d1d;
}

/* About column */

.col-about {
    max-width: 260px;
    font-size: 0.85rem;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Small buttons */

.btn-small {
    font-size: 0.8rem;
    padding: 4px 10px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    margin-right: 4px;
    margin-bottom: 4px;
    white-space: nowrap;
}

.btn-small.btn-secondary {
    background: #fff;
    color: var(--accent);
    border: 1px solid var(--accent-soft);
}

.btn-small.btn-primary {
    background: var(--accent);
    color: #fff;
}

/* ----------------------------------------------------------
   ADMIN FLOATING MENU
---------------------------------------------------------- */

.admin-floating-menu {
    position: fixed;
    top: 50%;
    right: 24px;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 100;
}

.afm-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px 8px 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.95);
    text-decoration: none;
    color: var(--text);
    font-size: 0.85rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.03);
    backdrop-filter: blur(10px);
    transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
    max-width: 180px;
}

.afm-item .afm-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--accent-soft);
    font-size: 1rem;
}

.afm-item .afm-label {
    white-space: nowrap;
}

.afm-item:hover {
    transform: translateX(-2px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.13);
    background: #fff9f3;
    border-color: var(--accent-soft);
}

.afm-item.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.afm-item.active .afm-icon {
    background: rgba(255,255,255,0.2);
}

/* Mobile / narrow screens – move menu lower and in a bit */
@media (max-width: 768px) {
    .admin-floating-menu {
        right: 12px;
        top: auto;
        bottom: 20px;
        transform: none;
    }

    .afm-item {
        font-size: 0.8rem;
        padding: 7px 9px;
    }
}
/* ----------------------------------------------------------
   ADMIN RECIPES LIST
---------------------------------------------------------- */

.admin-recipes-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.admin-recipes-subtitle {
    margin: 0;
    font-size: 1.05rem;
}

.admin-recipes-note {
    margin: 3px 0 0;
    font-size: 0.85rem;
    color: var(--muted);
}

.admin-recipes-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
}

.admin-recipe-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 14px 16px;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(0,0,0,0.03);
}

.admin-recipe-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.admin-recipe-title h3 {
    margin: 0;
    font-size: 1.05rem;
}

.admin-recipe-meta {
    margin: 4px 0 0;
    font-size: 0.85rem;
    color: var(--muted);
}

.admin-recipe-meta a {
    color: var(--accent);
    text-decoration: none;
}

.admin-recipe-meta a:hover {
    text-decoration: underline;
}

.admin-recipe-body {
    margin-top: 10px;
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.admin-recipe-section strong {
    display: inline-block;
    margin-right: 4px;
}

.btn-danger {
    background: #f97373;
    color: #fff;
    border: none;
}

.btn-danger:hover {
    background: #ef4444;
}

/* On smaller screens, let cards breathe */
@media (max-width: 768px) {
    .admin-recipe-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .admin-recipe-card {
        padding: 12px 13px;
    }
}

/* Contact form layout */

.contact-form .form-row-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.contact-form select {
    padding: 10px 12px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    font: inherit;
    background: #fffdf9;
    transition: border 0.15s, box-shadow 0.15s, background 0.15s;
}

.contact-form select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(255,122,60,0.2);
    background: #ffffff;
}

@media (max-width: 700px) {
    .contact-form .form-row-2 {
        grid-template-columns: 1fr;
    }
}

/* ----------------------------------------------------------
   ADMIN CONTACTS
---------------------------------------------------------- */

.admin-contacts-heading {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.admin-contacts-empty {
    margin: 6px 0 2px;
    font-size: 0.9rem;
    color: var(--muted);
}

.admin-contacts-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 6px;
}

.admin-contact-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 14px 16px;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(0,0,0,0.03);
}

.admin-contact-complete {
    opacity: 0.94;
}

.admin-contact-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.admin-contact-title h3 {
    margin: 2px 0 4px;
    font-size: 1.0rem;
}

.admin-contact-meta {
    margin: 0;
    font-size: 0.82rem;
    color: var(--muted);
}

.admin-contact-meta a {
    color: var(--accent);
    text-decoration: none;
}

.admin-contact-meta a:hover {
    text-decoration: underline;
}

.admin-contact-body {
    margin-top: 10px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.admin-contact-actions {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Subject badge */

.badge-subject {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    background: #eef4ff;
    color: #1d4ed8;
    margin-bottom: 4px;
}

.badge-subject-complete {
    background: #ddf4e4;
    color: #166534;
}

/* Reuse small buttons + danger button from earlier */

.btn-danger {
    background: #f97373;
    color: #fff;
    border: none;
}

.btn-danger:hover {
    background: #ef4444;
}

@media (max-width: 768px) {
    .admin-contact-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* TOS */
.tos-container {
    line-height: 1.65;
    font-size: 0.95rem;
}

.tos-container h2 {
    margin-top: 18px;
    font-size: 1.15rem;
}

.tos-container ul {
    margin: 8px 0 12px 20px;
    padding: 0;
}

.tos-container li {
    margin: 4px 0;
}

/* PRIVACY */
.privacy-container {
    line-height: 1.65;
    font-size: 0.95rem;
}

.privacy-container h2 {
    margin-top: 18px;
    font-size: 1.15rem;
}

.privacy-container h3 {
    margin-top: 14px;
    font-size: 1rem;
}

.privacy-container ul {
    margin: 8px 0 12px 20px;
    padding: 0;
}

.privacy-container li {
    margin: 4px 0;
}
