/* Estilos globales */
:root {
    --gold: #bfa76a;
    --gold-dark: #a88d52;
    --gold-soft: #d7c28a;
    --oxford: #2f3b45;
    --oxford-dark: #24313a;
    --ivory: #f9f6ef;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Montserrat', sans-serif;
    color: var(--oxford);
    background-color: var(--ivory);
}

a { color: inherit; }

/* Página de invitación */
.invitation-body {
    background: url('../images/background.png') no-repeat center/cover fixed;
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 2rem 0;
    position: relative;
    overflow-y: auto;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.5);
    z-index: 0;
    pointer-events: none;
}

[hidden] {
    display: none !important;
}

.balloons {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 4;
}

.balloon {
    position: absolute;
    bottom: -18%;
    width: 84px;
    height: 104px;
    border-radius: 50% 50% 50% 50%;
    background:
        radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0) 40%),
        radial-gradient(circle at 50% 70%, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0) 55%),
        var(--balloon-color);
    box-shadow: inset -8px -10px 18px rgba(255, 255, 255, 0.35);
    opacity: 0.9;
    animation: balloon-float 12s ease-in infinite;
    transform: translateY(0);
}

.balloon::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    width: 16px;
    height: 18px;
    background: var(--balloon-color);
    border-radius: 0 0 8px 8px;
    transform: translateX(-50%);
    filter: brightness(0.9);
}

.balloon::before {
    content: '';
    position: absolute;
    top: 100px;
    left: 50%;
    width: 2px;
    height: 90px;
    background: rgba(255, 255, 255, 0.6);
    transform: translateX(-50%);
}

@keyframes balloon-float {
    0% {
        transform: translateY(0) scale(1);
        opacity: 0;
    }
    10% {
        opacity: 0.9;
    }
    100% {
        transform: translateY(-140vh) scale(1.03);
        opacity: 0;
    }
}

.invitation-card {
    position: relative;
    background: rgba(255, 255, 255, 0.92);
    padding: 2rem;
    border-radius: 12px;
    max-width: 650px;
    width: 90%;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    z-index: 3;
}

.invitation-card h1.names {
    font-family: 'Great Vibes', cursive;
    font-size: 3.8rem;
    margin-bottom: 0.5rem;
    color: var(--gold);
}

.motto {
    font-style: italic;
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--oxford);
}

.wedding-image {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto 1rem;
}

.verse {
    font-style: italic;
    font-size: 1.4rem;
    margin: 1rem 0;
    color: var(--oxford);
}
.verse-ref {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    font-weight: bold;
    color: var(--oxford);
    font-style: italic;
}
.blessing-message {
    display: inline-block;
    margin: 0.75rem auto 1.25rem;
    padding: 0;
    background: transparent;
    color: var(--oxford);
    border-radius: 0;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.4;
    box-shadow: none;
}

.details {
    margin: 0.5rem 0;
    font-size: 1rem;
}

.countdown-block {
    display: inline-flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.8rem;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    width: max-content;
    max-width: 100%;
}

.countdown {
    color: var(--gold);
}
.countdown-title {
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15rem;
    color: var(--gold-dark);
    margin-bottom: 0.8rem;
}
.countdown-message {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gold);
}
.countdown-timer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    flex-wrap: wrap;
    width: max-content;
    max-width: 100%;
}
.countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 70px;
}
.countdown-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gold);
}
.countdown-label {
    margin-top: 0.2rem;
    font-size: 0.75rem;
    font-weight: 300;
    letter-spacing: 0.12rem;
    text-transform: uppercase;
    color: var(--gold-dark);
}
.countdown-separator {
    color: var(--gold-soft);
    font-weight: 600;
    font-size: 1.4rem;
}

.buttons {
    margin-top: 1.5rem;
}
.buttons .btn {
    display: inline-block;
    margin: 0.3rem;
    background: var(--oxford);
    color: #fff;
    padding: 0.6rem 1.2rem;
    border-radius: 30px;
    text-decoration: none;
    transition: background 0.3s;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}
.buttons .btn:hover {
    background: var(--oxford-dark);
}

.invitation-body .btn,
.invitation-body .buttons .btn {
    background: #0b2f57;
}

.invitation-body .btn:hover,
.invitation-body .buttons .btn:hover {
    background: #092544;
}


.invitation-body .btn-gallery {
    background: linear-gradient(120deg, #0b2f57, #2d8cff, #0b2f57);
    background-size: 220% 220%;
    animation: gallery-gradient-shift 5s ease-in-out infinite;
    font-weight: 700;
    box-shadow: 0 8px 16px rgba(11, 47, 87, 0.28);
}

.invitation-body .btn-gallery:hover {
    background: linear-gradient(120deg, #0b2f57, #3ea2ff, #0b2f57);
    background-size: 220% 220%;
    animation: gallery-gradient-shift 3.8s ease-in-out infinite;
}

@keyframes gallery-gradient-shift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.invitation-body .btn-confirm-assistance {
    background: #fff;
    color: var(--gold-dark);
    border: 3px solid var(--gold);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08rem;
    width: 100%;
}

.invitation-body .btn-confirm-assistance:hover {
    background: #fff;
    color: var(--gold-dark);
}

.invitation-body .btn-confirm-assistance .btn-icon {
    color: var(--gold-dark);
}

.success-msg {
    background: #e6f7e6;
    border: 1px solid #b3deb3;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    color: #2a662a;
    margin-top: 1rem;
}

.modal-content--success {
    background: #f0fbf2;
    border: 1px solid #cde9d2;
}

.confirm-success {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
    padding: 0.5rem 0;
}

.confirm-success__icon {
    font-size: 3rem;
}

.confirm-success__text {
    font-size: 1rem;
    color: #2f5635;
}

.modal-message {
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.95rem;
}

.modal-message--error {
    background: #fdecea;
    border: 1px solid #f5c2c7;
    color: #842029;
}


.modal-message--info {
    background: #eef4ff;
    border: 1px solid #cfdfff;
    color: #1f3b64;
}

.modal-content--info {
    text-align: center;
    padding-top: 2rem;
}

.gallery-help-link {
    border: none;
    background: none;
    color: var(--oxford);
    font-size: 0.95rem;
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
}

.gallery-help-link:hover {
    color: var(--oxford-dark);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
}
.modal-content {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    width: 90%;
    max-width: 420px;
    position: relative;
}
.modal-content .close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 1.5rem;
    cursor: pointer;
}
.form-group {
    margin-bottom: 1rem;
    text-align: left;
}
.form-group label {
    display: block;
    margin-bottom: 0.3rem;
}
.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="password"],
.form-group input[type="email"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}
.btn {
    background: var(--oxford);
    color: #fff;
    padding: 0.6rem 1.2rem;
    border-radius: 30px;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.btn:hover {
    background: var(--oxford-dark);
}

.btn.btn-sears {
    background: #e0001b;
}

.btn.btn-sears:hover {
    background: #b80016;
}

.btn.btn-liverpool {
    background: #e6007e;
}

.btn.btn-liverpool:hover {
    background: #cc006f;
}

.btn .btn-icon {
    display: inline-flex;
    margin-right: 0.45rem;
    color: #fff;
}

.btn .btn-icon svg {
    width: 1.1rem;
    height: 1.1rem;
}

/* Estilos para página de login */
.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    background: #f5f5f5;
}
.login-container {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    width: 320px;
    text-align: center;
}
.login-container h2 {
    font-family: 'Great Vibes', cursive;
    margin-bottom: 1rem;
    font-size: 2rem;
    color: var(--gold);
}
.error-msg {
    background: #fdecea;
    border: 1px solid #f5c2c7;
    color: #842029;
    padding: 0.5rem;
    margin-bottom: 1rem;
    border-radius: 4px;
}

/* Estilos para el panel de administración */
.admin-body {
    display: flex;
    min-height: 100vh;
    background: #f5f5f5;
}
.sidebar {
    width: 200px;
    background: #3a2c4e;
    color: #fff;
    padding: 1rem;
    box-sizing: border-box;
}
.sidebar h2 {
    font-family: 'Great Vibes', cursive;
    font-size: 2rem;
    margin-bottom: 1rem;
    text-align: center;
}
.sidebar nav ul {
    list-style: none;
    padding: 0;
}
.sidebar nav li {
    margin-bottom: 1rem;
}
.sidebar nav a {
    color: #fff;
    text-decoration: none;
    display: block;
    padding: 0.5rem;
    border-radius: 4px;
}
.sidebar nav a.active,
.sidebar nav a:hover {
    background: #57406c;
}

.content {
    flex: 1;
    padding: 2rem;
}

.stats-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}
.stat-card {
    background: #fff;
    border-radius: 8px;
    padding: 1rem;
    flex: 1;
    min-width: 200px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.stat-card h3 {
    margin-bottom: 0.5rem;
    color: var(--gold);
}
.stat-card p {
    font-size: 2rem;
    margin: 0;
    color: var(--oxford);
}
.stat-split {
    display: flex;
    gap: 1rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #eee;
    text-align: left;
}
.stat-split div {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.9rem;
    color: #6c7177;
}
.stat-split strong {
    font-size: 1.2rem;
    color: var(--oxford);
}

.chart-section {
    margin-top: 2rem;
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.chart-section h2 {
    margin-bottom: 1rem;
    color: var(--gold);
}
.chart-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    align-items: center;
}
.donut-chart {
    width: 240px;
    height: 240px;
    border-radius: 50%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.donut-center {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: #fff;
    box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    text-align: center;
}
.donut-center span {
    font-size: 0.85rem;
    color: #6c7177;
    text-transform: uppercase;
    letter-spacing: 0.08rem;
}
.donut-center strong {
    font-size: 1.8rem;
    color: var(--oxford);
}
.chart-legend {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.chart-legend li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}
.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    margin-top: 0.2rem;
    flex-shrink: 0;
}
.chart-legend strong {
    display: block;
    font-size: 0.95rem;
    color: var(--oxford);
}
.chart-legend span {
    font-size: 0.85rem;
    color: #6c7177;
}

/* Tablas de administración */
.inv-table,
.don-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}
.inv-table th,
.inv-table td,
.don-table th,
.don-table td {
    border: 1px solid #ddd;
    padding: 0.5rem;
    text-align: left;
}
.inv-table th,
.don-table th {
    background: #f4efe3;
    color: var(--gold-dark);
}
.inv-table tr:nth-child(even),
.don-table tr:nth-child(even) {
    background: #fafafa;
}
.table-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin: 0.5rem 0;
}
.filters-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
    margin-bottom: 1rem;
}
.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 160px;
}
.filter-group label {
    font-size: 0.85rem;
    color: var(--gold-dark);
    text-transform: uppercase;
    letter-spacing: 0.08rem;
}
.filter-group select {
    padding: 0.45rem 0.6rem;
    border: 1px solid #d8d0c4;
    border-radius: 6px;
    background: #fff;
    color: var(--oxford);
}

.search-bar {
    margin-bottom: 0.75rem;
}
.search-bar label {
    display: block;
    font-size: 0.85rem;
    color: var(--gold-dark);
    text-transform: uppercase;
    letter-spacing: 0.08rem;
    margin-bottom: 0.35rem;
}
.search-bar input {
    width: 100%;
    max-width: 360px;
    padding: 0.45rem 0.6rem;
    border: 1px solid #d8d0c4;
    border-radius: 6px;
    background: #fff;
    color: var(--oxford);
}
.table-actions-bottom {
    margin-top: 1rem;
}
.don-total {
    margin-top: 1rem;
    text-align: right;
    font-weight: 600;
    color: var(--oxford);
}
.btn-small {
    padding: 0.3rem 0.6rem;
    border: none;
    background: var(--oxford);
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}
.btn-small:hover {
    background: var(--oxford-dark);
}
.action-buttons {
    display: inline-flex;
    gap: 0.35rem;
}
.icon-button {
    border: none;
    background: #f7f3eb;
    color: var(--oxford);
    border-radius: 999px;
    padding: 0.45rem;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.icon-button.invitation-button {
    color: #9aa0a6;
}
.icon-button.invitation-button.is-sent {
    color: #2d8a4b;
}
.icon-button:hover {
    background: #efe6d7;
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
}
.icon-button svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}
.icon-button.invitation-button svg {
    width: 21px;
    height: 21px;
}
.input-highlight {
    outline: 2px solid #b48a5a;
    box-shadow: 0 0 0 3px rgba(180, 138, 90, 0.2);
}
.status-check {
    color: #2d8a4b;
    font-weight: 600;
    margin-left: 0.25rem;
}
.inline-form {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* Donativos públicos */
.donativo-body {
    background: url('../images/background.png') no-repeat center/cover fixed;
    padding: 2rem;
    min-height: 100vh;
}
.donativo-container {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    max-width: 700px;
    margin: 0 auto;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: relative;
}
.donativo-container--plain {
    background: transparent;
    box-shadow: none;
    padding: 0;
    margin: 0;
    max-width: none;
}
.donativo-container h1 {
    font-family: 'Great Vibes', cursive;
    font-size: 2.5rem;
    color: var(--gold);
    margin-bottom: 1rem;
    text-align: center;
}
.donativo-container h2 {
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15rem;
    text-align: center;
    color: var(--gold-dark);
    margin-bottom: 1rem;
}
.donativo-container p {
    margin-bottom: 1rem;
    line-height: 1.5;
}
.donativo-text {
    text-align: justify;
}
.bank-info {
    background: #f4efe3;
    padding: 1rem;
    border-radius: 4px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 88px;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--oxford);
}
.bank-info strong {
    font-size: 1.55rem;
    color: var(--gold);
}
.bank-info__name {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.95rem;
    color: var(--oxford);
}
.success-msg {
    background: #e6f7e6;
    border: 1px solid #b3deb3;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    color: #2a662a;
    margin-top: 1rem;
    text-align: center;
}
.don-form .form-group {
    margin-bottom: 1rem;
}
.don-form label {
    display: block;
    margin-bottom: 0.3rem;
}
.don-form input[type="text"],
.don-form input[type="number"],
.don-form textarea {
    width: 100%;
    padding: 0.5rem;
    border-radius: 4px;
    border: 1px solid #ccc;
    font-size: 1rem;
}
.don-form textarea {
    resize: vertical;
}
.modal-title {
    margin-bottom: 1rem;
    color: var(--gold-dark);
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15rem;
}

.back-link {
    position: absolute;
    top: 1rem;
    left: 1rem;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--oxford);
    color: #fff;
    text-decoration: none;
    transition: background 0.3s;
}

.back-link:hover {
    background: var(--oxford-dark);
}

.back-link .btn-icon {
    margin-right: 0;
    color: #fff;
    font-size: 1.1rem;
}

.donativo-actions {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.donativo-actions--gifts {
    margin-bottom: 1.5rem;
}

.donativo-body .btn {
    background: #0b2f57;
}

.donativo-body .btn:hover {
    background: #092544;
}

.donativo-body .btn.btn-liverpool {
    background: #e6007e;
}

.donativo-body .btn.btn-liverpool:hover {
    background: #cc006f;
}

.donativo-body .btn.btn-sears {
    background: #d32f2f;
}

.donativo-body .btn.btn-sears:hover {
    background: #b71c1c;
}

.donativo-actions .btn {
    min-width: 200px;
}

.gallery-page {
    max-width: 900px;
}


.gallery-page {
    position: relative;
}

.gallery-share-trigger {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: none;
    background: #0b2f57;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(11, 47, 87, 0.28);
    transition: transform 0.2s ease, background 0.2s ease;
}

.gallery-share-trigger:hover {
    background: #092544;
    transform: translateY(-1px);
}

.gallery-share-modal-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
}

.gallery-share-desc {
    margin: 0;
    color: #4c3f2d;
}

.gallery-share-copy-row {
    width: 100%;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.gallery-share-input {
    flex: 1;
    min-width: 220px;
    border: 1px solid #d7cdbb;
    border-radius: 10px;
    padding: 0.65rem 0.8rem;
    font-size: 0.95rem;
    color: #2f2f2f;
    background: #fff;
}

.gallery-share-qr {
    margin-top: 0.2rem;
    padding: 0.5rem;
    background: #fff;
    border-radius: 10px;
    border: 1px solid #e8decf;
}

.gallery-share-qr img {
    width: 220px;
    height: 220px;
    display: block;
}

.gallery-highlight {
    text-align: center;
    font-size: 1.1rem;
    line-height: 1.6;
    color: #4c3f2d;
    margin-bottom: 1.5rem;
}

.gallery-upload-panel {
    background: #fffaf1;
    border: 1px solid #ebdec9;
    border-radius: 16px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
}

.gallery-limit {
    margin: 0;
    text-align: center;
}

.upload-progress-wrapper {
    width: 100%;
    height: 12px;
    border-radius: 999px;
    background: #e8e0d2;
    overflow: hidden;
}

.upload-progress-bar {
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, #b48a5a, #6d4c91);
    transition: width 0.25s ease;
}

.upload-success {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #2d8a4b;
    font-weight: 700;
}

.upload-success-icon {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #d6f2df;
}

.gallery-name-form,
.gallery-actions {
    width: 100%;
    max-width: 400px;
}

.gallery-actions {
    display: flex;
    gap: 0.6rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn.btn-secondary {
    background: #5c4b6c;
}

.gallery-result {
    margin-top: 1.4rem;
}

.gallery-group {
    margin-bottom: 1.4rem;
}

.gallery-group h3 {
    margin-bottom: 0.75rem;
    color: var(--gold-dark);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
}

.gallery-item {
    border: none;
    padding: 0;
    border-radius: 12px;
    overflow: hidden;
    cursor: zoom-in;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

.gallery-item img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    transition: transform 0.2s ease;
}

.gallery-item:hover img {
    transform: scale(1.06);
}

.gallery-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.22s ease;
}

.gallery-lightbox.is-open {
    opacity: 1;
}

.gallery-lightbox img {
    max-width: 92vw;
    max-height: 88vh;
    border-radius: 14px;
    transform: scale(0.85);
    transition: transform 0.22s ease;
}

.gallery-lightbox.is-open img {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 26px;
    border: none;
    background: transparent;
    color: #fff;
    font-size: 2.2rem;
    cursor: pointer;
}

.admin-gallery-group {
    margin-bottom: 1.4rem;
}

.admin-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.admin-gallery-card {
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 0.7rem;
    background: #fff;
}

.admin-gallery-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 10px;
}

.admin-gallery-meta {
    display: flex;
    gap: 0.9rem;
    flex-wrap: wrap;
    margin: 0.2rem 0 0.8rem;
    color: #5f5f5f;
    font-size: 0.9rem;
}

.admin-gallery-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.6rem;
}

.btn-small.btn-danger {
    background: #c0392b;
    color: #fff;
    border: none;
}


.btn-icon-flat {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin-right: 0.35rem;
    font-size: 0.95rem;
}

.gallery-code-form {
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
}

.codigo-digit-group {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    width: 100%;
}

.codigo-digit {
    width: 52px;
    height: 52px;
    border: 1px solid #d7cdbb;
    border-radius: 15px;
    text-align: center;
    font-size: 1.35rem;
    font-weight: 700;
    color: #0b2f57;
    background: #fff;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.codigo-digit:focus {
    border-color: #7e57c2;
    box-shadow: 0 0 0 3px rgba(126, 87, 194, 0.2);
}

.gallery-view-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    margin-bottom: 0.8rem;
}

.gallery-folder-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 1rem;
}

.gallery-folder {
    border: 1px solid #d8ccb4;
    border-radius: 15px;
    background: #fffef9;
    padding: 0.7rem;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gallery-folder:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 18px rgba(78, 60, 35, 0.14);
}

.gallery-folder-preview {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 15px;
    overflow: hidden;
    background: #f1e7d8;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-folder-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-folder-placeholder {
    font-size: 2rem;
}

.gallery-folder-name {
    font-weight: 700;
    color: #4c3f2d;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gallery-folder-count {
    color: #6c5f4f;
    font-size: 0.9rem;
}

.btn-back-gallery {
    min-width: 110px;
}

.gallery-grid-masonry {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    grid-auto-flow: dense;
}

.gallery-item {
    cursor: default;
}

.gallery-item--lg {
    grid-column: span 2;
    grid-row: span 2;
}

.gallery-item--md {
    grid-column: span 2;
}

.gallery-item img {
    height: 140px;
}

.gallery-item--md img {
    height: 170px;
}

.gallery-item--lg img {
    height: 230px;
}

.upload-progress-wrapper {
    position: relative;
    width: 100%;
    height: 14px;
    border-radius: 999px;
    background: #e8e0d2;
    overflow: hidden;
    box-shadow: inset 0 1px 4px rgba(0,0,0,0.14);
}

.upload-progress-bar {
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, #7e57c2 0%, #42a5f5 45%, #26a69a 100%);
    position: relative;
    transition: width 0.25s ease;
}

.upload-progress-bar::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.32),
        rgba(255, 255, 255, 0.32) 10px,
        rgba(255, 255, 255, 0.14) 10px,
        rgba(255, 255, 255, 0.14) 20px
    );
}
