/* ============================================================
   app.css - Estils principals de la Gimcana del Casament
   ============================================================ */

/* ── Variables ────────────────────────────────────────────── */
:root {
    --gc-gold:      #C8956C;
    --gc-rose:      #D4808A;
    --gc-dark:      #2C2017;
    --gc-light:     #FDF8F3;
    --gc-border:    rgba(200,149,108,.2);
    --gc-bg:        #FAF6F1;
    --gc-card-bg:   #FFFFFF;
    --gc-text:      #2C2017;
    --gc-text-muted:#7A6855;
    --gc-radius:    12px;
    --gc-shadow:    0 2px 12px rgba(44,32,23,.08);
    --gc-shadow-lg: 0 8px 32px rgba(44,32,23,.12);
}

/* ── Reset i base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body.gc-body {
    background: var(--gc-bg);
    color: var(--gc-text);
    font-family: 'Inter', system-ui, sans-serif;
    font-size: .95rem;
    min-height: 100vh;
}

/* ── Navbar ───────────────────────────────────────────────── */
.gc-navbar {
    background: linear-gradient(135deg, #1A1008, #2C1A08);
    border-bottom: 2px solid var(--gc-gold);
    padding: .4rem 0;
}
.gc-brand {
    font-family: 'Playfair Display', serif;
    font-size: 1.15rem;
    color: var(--gc-gold) !important;
    font-weight: 700;
    text-decoration: none;
}
.gc-navbar .nav-link {
    color: rgba(255,255,255,.75) !important;
    font-size: .85rem;
    padding: .35rem .65rem !important;
    border-radius: 6px;
    transition: color .15s, background .15s;
}
.gc-navbar .nav-link:hover,
.gc-navbar .nav-link.active {
    color: var(--gc-gold) !important;
    background: rgba(200,149,108,.12);
}
.gc-navbar .dropdown-menu {
    border: 1px solid var(--gc-border);
    border-radius: var(--gc-radius);
    box-shadow: var(--gc-shadow-lg);
    background: #1A1008;
}
.gc-navbar .dropdown-item {
    color: rgba(255,255,255,.8);
    font-size: .85rem;
    border-radius: 6px;
}
.gc-navbar .dropdown-item:hover { background: rgba(200,149,108,.15); color: var(--gc-gold); }
.gc-navbar .dropdown-item.active { background: var(--gc-gold); color: #fff; }
.gc-navbar .dropdown-divider { border-color: rgba(255,255,255,.1); }
.gc-navbar .dropdown-header { color: rgba(255,255,255,.4); }

/* ── Contingut ────────────────────────────────────────────── */
.gc-content { min-height: calc(100vh - 56px); }

/* ── Cards ────────────────────────────────────────────────── */
.card {
    border: 1px solid var(--gc-border);
    border-radius: var(--gc-radius);
    box-shadow: var(--gc-shadow);
    background: var(--gc-card-bg);
}
.card-header {
    border-radius: calc(var(--gc-radius) - 1px) calc(var(--gc-radius) - 1px) 0 0 !important;
    border-bottom: 1px solid var(--gc-border);
    background: var(--gc-light);
    font-weight: 600;
}

/* ── Botons ───────────────────────────────────────────────── */
.btn-gold {
    background: var(--gc-gold);
    color: #fff;
    border: none;
    font-weight: 600;
}
.btn-gold:hover { background: #b07856; color: #fff; }

.btn-outline-gold {
    border: 1px solid var(--gc-gold);
    color: var(--gc-gold);
    background: transparent;
}
.btn-outline-gold:hover { background: var(--gc-gold); color: #fff; }

/* ── Titols ───────────────────────────────────────────────── */
h1, h2, h3 { font-family: 'Playfair Display', serif; }
.fw-600 { font-weight: 600; }

/* ── Avatar ───────────────────────────────────────────────── */
.gc-avatar-sm {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gc-gold);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .8rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* ── Progress bar ─────────────────────────────────────────── */
.progress { border-radius: 20px; }
.progress-bar.gc-bar { background: var(--gc-gold); }

/* ── Mission cards ────────────────────────────────────────── */
.gc-mission-card {
    border: 1px solid var(--gc-border);
    border-radius: var(--gc-radius);
    background: #fff;
    transition: box-shadow .2s, transform .2s;
    cursor: pointer;
}
.gc-mission-card:hover {
    box-shadow: var(--gc-shadow-lg);
    transform: translateY(-2px);
}
.gc-mission-card.completed {
    border-color: #198754;
    background: #f0fff4;
}
.gc-mission-card.blocked {
    border-color: #dc3545;
    background: #fff5f5;
    opacity: .7;
}
.gc-mission-card.special {
    border-color: var(--gc-gold);
    background: linear-gradient(135deg, #fffbf5, #fff5e8);
}

/* ── Galeria ──────────────────────────────────────────────── */
.gc-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 8px;
}
@media (max-width: 576px) {
    .gc-gallery-grid { grid-template-columns: repeat(3, 1fr); gap: 4px; }
}
.gc-gallery-item {
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 8px;
    position: relative;
    cursor: pointer;
    background: #f0e8e0;
}
.gc-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s;
}
.gc-gallery-item:hover img { transform: scale(1.05); }
.gc-gallery-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,.75));
    padding: 1.5rem .5rem .4rem;
    opacity: 0;
    transition: opacity .2s;
    font-size: .72rem;
    color: #fff;
}
.gc-gallery-item:hover .gc-gallery-overlay { opacity: 1; }

/* ── Upload zone ──────────────────────────────────────────── */
.gc-upload-zone {
    border: 2px dashed var(--gc-border);
    border-radius: var(--gc-radius);
    padding: 2rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: border-color .2s, background .2s;
    background: var(--gc-light);
}
.gc-upload-zone:hover,
.gc-upload-zone.dragover {
    border-color: var(--gc-gold);
    background: rgba(200,149,108,.05);
}
.gc-upload-zone input[type="file"] {
    position: absolute;
    width: 1px; height: 1px;
    opacity: 0; overflow: hidden;
}
.gc-upload-icon { font-size: 2rem; color: var(--gc-gold); margin-bottom: .5rem; display: block; }

/* ── Ranking ──────────────────────────────────────────────── */
.gc-ranking-row {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .6rem .75rem;
    border-radius: 8px;
    margin-bottom: 4px;
    background: #fff;
    border: 1px solid var(--gc-border);
    transition: box-shadow .15s;
}
.gc-ranking-row:hover { box-shadow: var(--gc-shadow); }
.gc-ranking-row.mine { border-color: var(--gc-gold); background: rgba(200,149,108,.06); }
.gc-rank-num {
    width: 28px; text-align: center;
    font-weight: 700; font-size: .9rem;
    color: var(--gc-gold); flex-shrink: 0;
}
.gc-rank-medal-1 { color: #FFD700; }
.gc-rank-medal-2 { color: #C0C0C0; }
.gc-rank-medal-3 { color: #CD7F32; }

/* ── Seating chips ────────────────────────────────────────── */
.guest-chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 20px;
    font-size: .8rem;
    font-weight: 600;
    cursor: grab;
    white-space: nowrap;
    user-select: none;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
    transition: transform .1s, box-shadow .1s;
}
.guest-chip:hover {
    border-color: var(--gc-gold);
    box-shadow: 0 2px 8px rgba(200,149,108,.3);
    transform: translateY(-1px);
}
.guest-chip.dragging { opacity: .4; }

.drop-zone {
    border-radius: 8px;
    padding: 6px !important;
    min-height: 60px;
    transition: background .15s;
}
.drop-zone.drop-hover {
    background: rgba(200,149,108,.1) !important;
    outline: 2px dashed var(--gc-gold);
}
.chips-container { min-height: 40px; }

/* ── Seating board ────────────────────────────────────────── */
.seating-board { overflow-x: auto; }
.seating-column { flex-shrink: 0; }

/* ── Landing ──────────────────────────────────────────────── */
.gc-landing-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.gc-landing-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: brightness(.45);
}
.gc-landing-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: #fff;
    padding: 2rem 1rem;
}
.gc-countdown { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.gc-count-box {
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 12px;
    padding: .75rem 1.25rem;
    min-width: 80px;
}
.gc-count-num {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--gc-gold);
    line-height: 1;
}
.gc-count-label { font-size: .7rem; color: rgba(255,255,255,.6); margin-top: .25rem; }

/* ── Formulari d'inscripcio ───────────────────────────────── */
.gc-form-section {
    background: #fff;
    border: 1px solid var(--gc-border);
    border-radius: var(--gc-radius);
    padding: 1.25rem;
    margin-bottom: 1rem;
}
.gc-member-block {
    border-left: 3px solid var(--gc-gold);
    padding-left: 1rem;
    margin-bottom: 1.5rem;
}
.gc-price-row {
    display: flex;
    justify-content: space-between;
    padding: .3rem 0;
    font-size: .9rem;
}
.gc-price-total {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    color: var(--gc-gold);
    font-weight: 700;
}

/* ── Status badges ────────────────────────────────────────── */
.gc-status-created      { background: #e9ecef; color: #495057; }
.gc-status-form_pending { background: #fff3cd; color: #856404; }
.gc-status-form_completed { background: #d1ecf1; color: #0c5460; }
.gc-status-confirmed    { background: #d4edda; color: #155724; }
.gc-status-cancelled    { background: #f8d7da; color: #721c24; }

/* ── Admin sidebar ────────────────────────────────────────── */
.gc-admin-sidebar {
    background: #fff;
    border-right: 1px solid var(--gc-border);
    min-height: calc(100vh - 56px);
}
.gc-admin-section { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--gc-text-muted); padding: .75rem 1rem .25rem; font-weight: 600; }
.gc-admin-link {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .45rem 1rem;
    color: var(--gc-text);
    font-size: .85rem;
    text-decoration: none;
    border-radius: 0;
    transition: background .15s, color .15s;
}
.gc-admin-link:hover  { background: var(--gc-light); color: var(--gc-gold); }
.gc-admin-link.active { background: rgba(200,149,108,.12); color: var(--gc-gold); font-weight: 600; border-right: 3px solid var(--gc-gold); }
.gc-admin-link i      { width: 18px; text-align: center; flex-shrink: 0; }

/* ── Economia ─────────────────────────────────────────────── */
.gc-stat-card {
    background: #fff;
    border: 1px solid var(--gc-border);
    border-radius: var(--gc-radius);
    padding: 1.25rem;
    text-align: center;
}
.gc-stat-value {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--gc-gold);
}
.gc-stat-label { font-size: .78rem; color: var(--gc-text-muted); }

/* ── Utilitats ────────────────────────────────────────────── */
.text-gold { color: var(--gc-gold) !important; }
.bg-gold   { background: var(--gc-gold) !important; }
.border-gold { border-color: var(--gc-gold) !important; }
.gc-divider { border: none; border-top: 1px solid var(--gc-border); margin: 1rem 0; }

/* ── Responsive ───────────────────────────────────────────── */
/* El sidebar és una barra fixa en pantalla gran i un offcanvas lliscant en mòbil */
@media (min-width: 992px) {
    /* En escriptori l'offcanvas es comporta com un panell estàtic sempre visible */
    #adminSidebarOffcanvas {
        position: sticky;
        top: 56px;
        height: calc(100vh - 56px);
        width: 220px;
        flex-shrink: 0;
        transform: none !important;
        visibility: visible !important;
        border-right: 1px solid var(--gc-border);
        z-index: 1;
    }
    #adminSidebarOffcanvas .offcanvas-header { display: none; }
    #adminSidebarBackdrop, .offcanvas-backdrop { display: none !important; }
}
@media (max-width: 991.98px) {
    /* En mòbil/tauleta és un offcanvas real (amaga't per defecte, s'obre amb el botó) */
    #adminSidebarOffcanvas { width: 260px; }
    .container-fluid { padding: .5rem; }
}

/* ── Classes addicionals ────────────────────────────────────── */
.gc-card { background: #fff; border-radius: 16px; box-shadow: var(--gc-shadow); padding: 1.5rem; }
.gc-card-light { background: var(--gc-light); border-radius: 12px; padding: 1rem; }

/* Landing */
.gc-hero { position: relative; min-height: 70vh; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.gc-hero-bg { position: absolute; inset: 0; background: linear-gradient(135deg,#1A1008,#2C1A08); }
.gc-hero-content { position: relative; z-index: 1; text-align: center; color: #fff; }
.gc-title { font-family: 'Playfair Display', serif; font-size: clamp(1.8rem, 5vw, 3rem); color: var(--gc-gold); }
.gc-subtitle { font-size: 1.1rem; opacity: .8; }
.gc-section { padding: 3rem 0; }
.gc-section-title { font-family: 'Playfair Display', serif; font-size: 1.6rem; color: var(--gc-gold); margin-bottom: 1.5rem; }
.gc-footer { background: #1A1008; color: rgba(255,255,255,.6); padding: 2rem; text-align: center; font-size: .85rem; }
.gc-scroll-hint { position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%); animation: bounce 2s infinite; color: rgba(255,255,255,.5); }
.gc-today-msg { font-family: 'Playfair Display', serif; font-size: 2rem; color: var(--gc-gold); }

/* Dress code icons */
.gc-dc-icons { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; }
.gc-dc-icon { background: rgba(200,149,108,.1); border: 1px solid var(--gc-border); border-radius: 12px; padding: .75rem 1.25rem; text-align: center; min-width: 80px; }

/* Login */
.gc-login-card { background: rgba(255,255,255,.96); border-radius: 20px; padding: 2.5rem 2rem; max-width: 420px; width: 100%; box-shadow: 0 20px 60px rgba(0,0,0,.4); }
.gc-login-title { font-family: 'Playfair Display', serif; color: var(--gc-gold); font-size: 1.6rem; }

/* Chips containers (seating) */
.chips-container { min-height: 60px; }
/* drop-hover ja definit a .drop-zone.drop-hover */

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
}