/* ===========================================================
   YouLifeRP - fælles stylesheet
   Tema uddraget fra logoet: sort baggrund, sølv/hvid + guld accent
   =========================================================== */

:root {
    --bg: #0a0a0c;
    --bg-alt: #131316;
    --bg-card: #18181c;
    --border: #2a2a30;
    --silver: #d9dadd;
    --silver-dim: #9a9ba2;
    --gold: #d9a520;
    --gold-bright: #f2c94c;
    --white: #f5f5f7;
    --danger: #e5484d;
    --success: #3ecf8e;
    --radius: 10px;
    --font-display: 'Bebas Neue', 'Arial Narrow', sans-serif;
    --font-body: 'Inter', system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--white);
    font-family: var(--font-body);
    line-height: 1.55;
    scroll-behavior: smooth;
}

body {
    background-image:
        radial-gradient(ellipse 900px 500px at 15% -10%, rgba(217, 165, 32, 0.08), transparent),
        radial-gradient(ellipse 900px 500px at 85% 0%, rgba(217, 218, 221, 0.06), transparent);
    background-attachment: fixed;
}

h1, h2, h3, h4 {
    font-family: var(--font-display);
    letter-spacing: 0.02em;
    font-weight: 400;
    line-height: 1.1;
    color: var(--white);
}

h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
h3 { font-size: 1.4rem; }

a { color: var(--gold-bright); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px;
}

.gold-text { color: var(--gold-bright); }

/* ---------- Header / nav ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(10, 10, 12, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
    gap: 16px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.brand__logo { height: 44px; width: auto; }

.brand__name {
    font-family: var(--font-display);
    font-size: 1.6rem;
    color: var(--white);
    letter-spacing: 0.04em;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    flex: 1;
    justify-content: center;
}

.main-nav a {
    color: var(--silver);
    font-weight: 500;
    font-size: 0.95rem;
    text-decoration: none;
    padding: 6px 2px;
    border-bottom: 2px solid transparent;
    transition: color 0.15s, border-color 0.15s;
}

.main-nav a:hover, .main-nav a.active {
    color: var(--gold-bright);
    border-color: var(--gold);
}

.nav-cta {
    background: linear-gradient(135deg, var(--gold), var(--gold-bright));
    color: #17140a !important;
    padding: 8px 16px !important;
    border-radius: 999px;
    font-weight: 700 !important;
    border-bottom: none !important;
}

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--white); display: block; }

.cart-indicator {
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--silver);
    display: flex;
    align-items: center;
    gap: 4px;
}
.cart-indicator #cartCount {
    background: var(--gold);
    color: #17140a;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 1px 7px;
    font-family: var(--font-body);
}

/* ---------- Edit mode ---------- */
.edit-mode-banner {
    background: var(--gold);
    color: #17140a;
    text-align: center;
    padding: 8px 16px;
    font-weight: 600;
    font-size: 0.9rem;
}
.edit-mode-banner__off { color: #17140a; text-decoration: underline; margin-left: 10px; }

.ec-editable {
    outline: 1px dashed rgba(217, 165, 32, 0.6);
    outline-offset: 3px;
    cursor: text;
    border-radius: 4px;
    transition: background 0.15s;
}
.edit-mode .ec-editable:hover { background: rgba(217, 165, 32, 0.12); }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 26px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: transform 0.12s, box-shadow 0.12s, opacity 0.12s;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }

.btn--gold {
    background: linear-gradient(135deg, var(--gold), var(--gold-bright));
    color: #17140a;
    box-shadow: 0 6px 20px rgba(217, 165, 32, 0.25);
}
.btn--silver {
    background: linear-gradient(135deg, #e5e6e9, #b9bac0);
    color: #101012;
}
.btn--outline {
    background: transparent;
    color: var(--white);
    border: 1px solid var(--border);
}
.btn--outline:hover { border-color: var(--gold); color: var(--gold-bright); }
.btn--danger { background: var(--danger); color: white; }
.btn--sm { padding: 7px 16px; font-size: 0.85rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ---------- Hero ---------- */
.hero {
    position: relative;
    padding: 90px 0 70px;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
}
.hero__bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(10,10,12,0.2), rgba(10,10,12,1)),
        radial-gradient(ellipse 1000px 500px at 50% 0%, rgba(217,165,32,0.15), transparent 60%);
    z-index: -1;
}
.hero__inner { text-align: center; max-width: 780px; margin: 0 auto; }
.hero__eyebrow {
    display: inline-block;
    color: var(--gold-bright);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 14px;
}
.hero__subtitle { color: var(--silver); font-size: 1.15rem; margin: 18px 0 32px; }
.hero__actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- Feature grid ---------- */
.section { padding: 70px 0; }
.section--alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section__header { text-align: center; max-width: 640px; margin: 0 auto 44px; }
.section__header p { color: var(--silver-dim); }

.grid {
    display: grid;
    gap: 22px;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 26px;
}
.card h3 { margin-top: 0; color: var(--gold-bright); }
.card p { color: var(--silver-dim); margin-bottom: 0; }

.feature-icon { font-size: 2rem; margin-bottom: 12px; display: block; }

/* ---------- Rules (destinyrp.dk-inspireret: TOC + nummererede sektioner) ---------- */
.rules-toc {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 26px;
    margin-bottom: 48px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 6px 24px;
}
.rules-toc a {
    color: var(--silver);
    text-decoration: none;
    padding: 6px 0;
    display: block;
    border-bottom: 1px solid transparent;
}
.rules-toc a:hover { color: var(--gold-bright); }
.rules-toc__num { color: var(--gold); font-weight: 700; margin-right: 8px; }
.rules-toc__row { display: flex; align-items: center; gap: 8px; }
.rules-toc__row a { flex: 1; padding: 0; }
.rules-toc__row input.rules-toc__order-input {
    flex: 0 0 52px;
    width: 52px;
    padding: 4px 6px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--gold-bright);
    font-weight: 700;
    text-align: center;
}

.rules-section { margin-bottom: 52px; scroll-margin-top: 90px; }
.rules-section__heading {
    display: flex;
    align-items: baseline;
    gap: 14px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 12px;
    margin-bottom: 18px;
}
.rules-section__num {
    font-family: var(--font-display);
    font-size: 1.6rem;
    color: var(--gold);
    letter-spacing: 0.04em;
}
.rules-section__heading h2 {
    margin: 0;
    color: var(--gold-bright);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.rules-list { list-style: none; margin: 0; padding: 0; }
.rules-list__item {
    display: flex;
    gap: 16px;
    justify-content: space-between;
    align-items: flex-start;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}
.rules-list__item:last-child { border-bottom: none; }
.rules-list__item::before {
    content: '';
}
.rules-list__body { flex: 1; }
.rules-list__body::before {
    content: '▸';
    color: var(--gold);
    margin-right: 10px;
}
.rules-list__desc { color: var(--silver-dim); }
.rules-list__actions { display: flex; gap: 8px; flex-shrink: 0; }

.rules-cta {
    text-align: center;
    max-width: 640px;
    margin: 60px auto 0;
    padding: 36px 30px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.rules-cta h2 { color: var(--gold-bright); margin-top: 0; }
.rules-cta p { color: var(--silver-dim); }

/* ---------- Forms ---------- */
.form-field { margin-bottom: 18px; }
.form-field label { display: block; margin-bottom: 6px; font-weight: 600; color: var(--silver); }
.form-field .hint { color: var(--silver-dim); font-size: 0.85rem; margin-top: 4px; }

input[type=text], input[type=email], input[type=number], input[type=password],
textarea, select {
    width: 100%;
    padding: 11px 14px;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--white);
    font-family: var(--font-body);
    font-size: 0.95rem;
}
textarea { min-height: 110px; resize: vertical; }
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--gold);
}

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 8px; margin-bottom: 30px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.tab-btn {
    background: none;
    border: none;
    color: var(--silver-dim);
    padding: 10px 18px;
    cursor: pointer;
    font-weight: 600;
    border-bottom: 2px solid transparent;
    font-size: 0.95rem;
}
.tab-btn.active { color: var(--gold-bright); border-color: var(--gold); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ---------- Status badges ---------- */
.badge { display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: 0.78rem; font-weight: 700; }
.badge--pending { background: rgba(217,165,32,0.18); color: var(--gold-bright); }
.badge--approved { background: rgba(62,207,142,0.18); color: var(--success); }
.badge--rejected { background: rgba(229,72,77,0.18); color: var(--danger); }

/* ---------- Donations / vehicles shop ---------- */
.shop-filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 28px; align-items: center; }
.shop-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.shop-item__image {
    height: 150px;
    background: var(--bg-alt);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--silver-dim);
    font-size: 0.85rem;
    overflow: hidden;
}
.shop-item__image img { width: 100%; height: 100%; object-fit: cover; }
.shop-item__body { padding: 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.shop-item__price { color: var(--gold-bright); font-weight: 800; font-size: 1.15rem; }
.shop-item__cat { color: var(--silver-dim); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; }

.mobilepay-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    display: flex;
    gap: 28px;
    align-items: center;
    flex-wrap: wrap;
}
.mobilepay-box img.qr { width: 160px; height: 160px; background: white; border-radius: 8px; padding: 8px; }

/* ---------- Cart drawer ---------- */
.cart-drawer {
    position: fixed;
    top: 0; right: -420px;
    width: 400px; max-width: 92vw;
    height: 100vh;
    background: var(--bg-card);
    border-left: 1px solid var(--border);
    z-index: 200;
    display: flex;
    flex-direction: column;
    transition: right 0.25s ease;
}
.cart-drawer.open { right: 0; }
.cart-drawer__header { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.cart-drawer__header button { background: none; border: none; color: var(--silver); font-size: 1.5rem; cursor: pointer; }
.cart-drawer__items { flex: 1; overflow-y: auto; padding: 16px 20px; }
.cart-drawer__footer { padding: 18px 20px; border-top: 1px solid var(--border); }
.cart-drawer__total { font-weight: 800; font-size: 1.1rem; margin-bottom: 14px; color: var(--gold-bright); }
.cart-drawer__hint { color: var(--silver-dim); font-size: 0.8rem; margin: 10px 0 0; }
.cart-line { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.cart-line__remove { background: none; border: none; color: var(--danger); cursor: pointer; font-size: 0.85rem; }

.cart-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 190;
    display: none;
}
.cart-overlay.open { display: block; }

/* ---------- Dashboard ---------- */
.dash-layout { display: grid; grid-template-columns: 240px 1fr; gap: 30px; align-items: start; }
.dash-sidebar {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    position: sticky;
    top: 90px;
}
.dash-sidebar a {
    display: block;
    color: var(--silver);
    padding: 9px 10px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 2px;
}
.dash-sidebar a:hover, .dash-sidebar a.active { background: rgba(217,165,32,0.12); color: var(--gold-bright); }
.dash-profile { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.dash-profile img { width: 48px; height: 48px; border-radius: 50%; }
.dash-panel { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; margin-bottom: 22px; }

.role-chip { display: inline-block; background: var(--bg-alt); border: 1px solid var(--border); padding: 3px 10px; border-radius: 999px; font-size: 0.78rem; margin: 2px 4px 2px 0; }

table.simple-table { width: 100%; border-collapse: collapse; }
table.simple-table th, table.simple-table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
table.simple-table th { color: var(--silver-dim); font-weight: 600; text-transform: uppercase; font-size: 0.75rem; letter-spacing: 0.04em; }

/* ---------- Flash messages ---------- */
.flash { padding: 12px 18px; border-radius: 8px; margin: 18px 0; font-weight: 600; }
.flash--success { background: rgba(62,207,142,0.15); color: var(--success); border: 1px solid rgba(62,207,142,0.3); }
.flash--error { background: rgba(229,72,77,0.15); color: var(--danger); border: 1px solid rgba(229,72,77,0.3); }
.flash--info { background: rgba(217,165,32,0.15); color: var(--gold-bright); border: 1px solid rgba(217,165,32,0.3); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 40px 0; margin-top: 60px; }
.site-footer__inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; }
.footer-logo { height: 32px; opacity: 0.8; margin-bottom: 8px; }
.site-footer p { color: var(--silver-dim); font-size: 0.85rem; margin: 0; }
.footer-nav { display: flex; gap: 18px; }
.footer-nav a { color: var(--silver); font-size: 0.9rem; }

/* ---------- Modal ---------- */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.6);
    display: none; align-items: center; justify-content: center; z-index: 300; padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 26px;
    max-width: 560px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}
.modal-box h3 { margin-top: 0; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }

@media (max-width: 860px) {
    .dash-layout { grid-template-columns: 1fr; }
    .dash-sidebar { position: static; }
}

@media (max-width: 760px) {
    .nav-toggle { display: flex; }
    .main-nav {
        position: absolute;
        top: 72px; left: 0; right: 0;
        background: var(--bg);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        align-items: stretch;
        padding: 12px 20px;
        display: none;
        gap: 4px;
    }
    .main-nav.open { display: flex; }
    .nav-cta { text-align: center; }
}
