* { box-sizing: border-box; }

:root {
    --accent: #7a2b3e;
    --accent-soft: #f6ece9;
    --gold: #b3893f;
    --bg: #f3ede4;
    --paper: #fffdfa;
    --ink: #2c2620;
    --muted: #8a7f72;
}

body {
    margin: 0;
    font-family: "Cormorant Garamond", "Georgia", serif;
    background: var(--bg);
    color: var(--ink);
    font-size: 16px;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { font-family: "Playfair Display", "Georgia", serif; }

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

/* Decorative side panel */
.auth-side {
    position: relative;
    flex: 0 0 42%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 48px;
    background: linear-gradient(165deg, var(--accent), #4d1a26);
    color: #fdf6f2;
    overflow: hidden;
}
.auth-side::before {
    content: "";
    position: absolute;
    inset: 18px;
    border: 1px solid rgba(255,255,255,0.22);
    border-radius: 22px;
    pointer-events: none;
}
.auth-side-brand {
    font-family: "Great Vibes", cursive;
    font-size: 44px;
    line-height: 1;
    margin-bottom: 18px;
    color: #fff;
}
.auth-side-orn { color: var(--gold); letter-spacing: 8px; font-size: 20px; margin-bottom: 22px; }
.auth-side-quote {
    font-family: "Playfair Display", serif;
    font-style: italic;
    font-size: 21px;
    line-height: 1.6;
    max-width: 300px;
    color: #fdf6f2;
    margin: 0 0 30px;
}
.auth-side-petals { font-size: 22px; letter-spacing: 10px; opacity: 0.85; }

.auth-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.auth-card {
    background: var(--paper);
    padding: 44px 40px;
    border-radius: 20px;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 30px 60px rgba(122,43,62,0.14);
    text-align: center;
}
.auth-card .auth-brand {
    display: none;
    font-family: "Great Vibes", cursive;
    font-size: 32px;
    color: var(--accent);
    margin-bottom: 10px;
}
.auth-card h1 {
    margin: 0 0 28px;
    font-size: 23px;
    font-style: italic;
    color: var(--ink);
    font-weight: 600;
}
.auth-card label { text-align: left; }
.auth-card .btn { width: 100%; margin-top: 10px; padding: 13px 20px; font-size: 16px; }
.auth-card .auth-switch {
    text-align: center;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid #f0e8dd;
    font-size: 15px;
    color: var(--muted);
}
.auth-card .auth-switch a { color: var(--accent); font-weight: 600; }

@media (max-width: 860px) {
    .auth-side { display: none; }
    .auth-card .auth-brand { display: block; }
}

label { display: block; margin-bottom: 18px; font-size: 15px; color: #55493e; font-weight: 600; }
input, select, textarea {
    width: 100%;
    padding: 12px 14px;
    margin-top: 7px;
    border: 1px solid #e0d6c8;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 400;
    font-family: inherit;
    background: #fffdfb;
    color: var(--ink);
    transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(179,137,63,0.18);
}

.btn {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    padding: 11px 20px;
    border: none;
    border-radius: 999px;
    font-size: 15px;
    font-family: "Cormorant Garamond", serif;
    font-weight: 600;
    letter-spacing: 0.3px;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(122,43,62,0.24);
    transition: transform 0.15s, opacity 0.15s, box-shadow 0.15s;
}
.btn:hover { opacity: 0.92; text-decoration: none; transform: translateY(-1px); box-shadow: 0 14px 28px rgba(122,43,62,0.3); }
.btn:active { transform: translateY(0); }
.btn-secondary { background: var(--accent-soft); color: var(--accent); box-shadow: none; }
.btn-secondary:hover { background: #efdcd6; box-shadow: none; }

.alert { padding: 12px 16px; border-radius: 9px; font-size: 15px; border-left: 3px solid transparent; text-align: left; }
.alert-error { background: #fde2e2; color: #b42318; border-left-color: #b42318; }
.alert-success { background: #d8f5e3; color: #147a3c; border-left-color: #147a3c; }

.admin-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 32px;
    background: var(--paper);
    border-bottom: 1px solid rgba(179,137,63,0.2);
}
.admin-nav .brand {
    font-family: "Great Vibes", cursive;
    font-size: 26px;
    color: var(--accent);
}
.nav-right { display: flex; align-items: center; gap: 18px; font-size: 15px; color: var(--muted); }
.nav-right a { color: var(--accent); font-weight: 600; }

.admin-main { max-width: 980px; margin: 0 auto; padding: 36px 32px; }
.admin-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 24px; flex-wrap: wrap; }
.admin-header h1 { font-size: 26px; color: var(--accent); margin: 0; }

.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 28px; }
.stat-tile {
    background: var(--paper);
    border-radius: 14px;
    padding: 20px 18px;
    text-align: center;
    box-shadow: 0 6px 24px rgba(0,0,0,0.04);
}
.stat-num { display: block; font-family: "Playfair Display", serif; font-size: 30px; font-weight: 700; color: var(--accent); }
.stat-label { display: block; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; margin-top: 4px; }
@media (max-width: 700px) { .stats-row { grid-template-columns: repeat(2, 1fr); } }

.table { width: 100%; border-collapse: collapse; background: var(--paper); border-radius: 12px; overflow: hidden; box-shadow: 0 6px 24px rgba(0,0,0,0.04); }
.table th, .table td { padding: 13px 15px; text-align: left; border-bottom: 1px solid #f0e8dd; font-size: 15px; }
.table th { background: var(--accent-soft); font-weight: 600; color: var(--accent); font-size: 13px; text-transform: uppercase; letter-spacing: 0.5px; }
.table tr:last-child td { border-bottom: none; }
.table .actions a { margin-right: 12px; font-size: 14px; }
.table .actions .danger { color: #b42318; }

.badge { padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge-on { background: #d8f5e3; color: #147a3c; }
.badge-off { background: var(--accent-soft); color: var(--muted); }

.empty { color: var(--muted); padding: 48px 0; text-align: center; font-size: 17px; }

.event-form { background: var(--paper); padding: 28px; border-radius: 14px; max-width: 580px; box-shadow: 0 6px 24px rgba(0,0,0,0.04); }
.event-form .checkbox { display: flex; align-items: center; gap: 8px; }
.event-form .checkbox input { width: auto; }
.cover-preview { max-width: 240px; border-radius: 10px; margin-top: 10px; display: block; }

.qr-box { background: var(--paper); padding: 36px; border-radius: 14px; text-align: center; max-width: 420px; box-shadow: 0 6px 24px rgba(0,0,0,0.04); }
.qr-box img { border-radius: 10px; }
