
/**
 * @fileoverview Global stylesheet for the Chicky Gallery project.
 * @file global.css
 * @project Chicky Gallery
 * @author Juan M
 *
 * Descripción:
 * Hoja de estilos global utilizada por toda la aplicación.
 * Define la identidad visual, navegación, componentes compartidos,
 * galería, perfil de usuario, modo oscuro, responsive y accesibilidad.
 *
 * Secciones:
 *
 *  1. Variables & Base
 *  2. Header & Navegación
 *  3. Perfil & Dropdown
 *  4. Overlay
 *  5. Componentes Compartidos
 *  6. Galería
 *  7. Footer
 *  8. Responsive
 *  9. Accesibilidad
 * 10. Loader Global
 * 11. Visibilidad de Autenticación
 * 12. Autor de Obra
 * 13. Dark Mode
 */


/* ============================================================= */
/* == 1. VARIABLES & BASE                                     == */
/* ============================================================= */

:root {

    /* Colores principales */
    --primary-color: #af00a1;
    --primary-hover-color: #d642df;

    --success-color: #2ecc71;
    --warning-color: #ff9800;
    --progress-color: #3498db;
    --error-color: #e74c3c;


    /* Fondos */
    --bg-main: #f8f9fa;
    --bg-panel: #ffffff;
    --bg-panel-soft: #f5edf7;
    --bg-input: #ffffff;


    /* Texto */
    --text-main: #2d2d35;
    --text-muted: #6f6f7a;
    --dark-text: #333333;


    /* Bordes */
    --light-gray: #f4f4f4;
    --medium-gray: #dddddd;
    --border: #e2dce8;


    /* Sombras */
    --card-shadow:
        0 4px 12px rgba(175, 0, 161, 0.12);

    --header-shadow:
        0 4px 20px rgba(40, 20, 45, 0.06);


    /* Radios */
    --border-radius: 8px;
    --panel-radius: 14px;
    --header-radius: 18px;


    /* Layout */
    --content-width: 1200px;
}


html,
body {
    min-height: 100%;
    margin: 0;
    padding: 0;
}


html {
    scroll-behavior: smooth;
}


body {

    font-family:
        "Segoe UI",
        Roboto,
        Arial,
        sans-serif;

    color: var(--text-main);

    background-color: var(--bg-main);

    display: flex;
    flex-direction: column;

    min-height: 100vh;

    overflow-x: hidden;
}


main {

    width: 100%;

    flex: 1 0 auto;
}


h1,
h2,
h3,
h4 {

    font-family:
        "Montserrat",
        "Segoe UI",
        Roboto,
        Arial,
        sans-serif;
}


img {

    max-width: 100%;
    height: auto;
    display: block;
}


a {
    color: inherit;
}


button,
input,
textarea,
select {
    font: inherit;
}


/* ============================================================= */
/* == 2. HEADER & NAVEGACIÓN                                  == */
/* ============================================================= */

/*
 * Header principal de Chicky Gallery.
 *
 * El diseño utiliza una estructura horizontal:
 *
 *   LOGO | NAVEGACIÓN | ACCIONES
 *
 * Está diseñado para dar una apariencia de galería artística
 * elegante y profesional.
 */

.site-header {

    width: 100%;

    background: var(--bg-panel);

    border-bottom:
        1px solid var(--border);

    box-shadow:
        var(--header-shadow);

    position: relative;

    z-index: 2500;
}


.header-inner {

    width: min(
        calc(100% - 48px),
        var(--content-width)
    );

    min-height: 78px;

    margin: 0 auto;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 30px;
}


/* ------------------------------------------------------------- */
/* Marca / Logo                                                  */
/* ------------------------------------------------------------- */

.brand {

    display: inline-flex;

    align-items: center;

    gap: 11px;

    flex-shrink: 0;

    text-decoration: none;

    color: var(--text-main);
}

.brand-logo {
    width: 42px;
    height: 42px;
    object-fit: cover;
    border-radius: 12px;
    flex-shrink: 0;
}

/*
.brand-mark {

    width: 42px;
    height: 42px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 13px;

    background:
        linear-gradient(
            135deg,
            var(--primary-color),
            var(--primary-hover-color)
        );

    color: #ffffff;

    font-family:
        "Montserrat",
        "Segoe UI",
        sans-serif;

    font-size: 0.85rem;

    font-weight: 800;

    letter-spacing: 0.5px;

    box-shadow:
        0 5px 14px rgba(175, 0, 161, 0.22);
}
        */


.brand-text {

    display: flex;

    flex-direction: column;

    line-height: 1;
}


.brand-name {

    font-family:
        "Montserrat",
        "Segoe UI",
        sans-serif;

    font-size: 1.08rem;

    font-weight: 800;

    letter-spacing: 0.2px;

    color: var(--text-main);
}


.brand-subtitle {

    margin-top: 4px;

    font-size: 0.68rem;

    font-weight: 600;

    letter-spacing: 2.2px;

    text-transform: uppercase;

    color: var(--primary-color);
}


/* ------------------------------------------------------------- */
/* Navegación                                                    */
/* ------------------------------------------------------------- */

.main-navigation {

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 5px;

    flex: 1;

    min-width: 0;
}


.main-navigation .nav-link {

    position: relative;

    display: inline-flex;

    align-items: center;

    justify-content: center;

    min-height: 42px;

    padding:
        8px
        14px;

    border-radius: 10px;

    color: var(--text-muted);

    text-decoration: none;

    font-size: 0.86rem;

    font-weight: 600;

    transition:
        color 0.2s ease,
        background-color 0.2s ease;
}


.main-navigation .nav-link:hover {

    color: var(--primary-color);

    background:
        var(--bg-panel-soft);
}


/*
 * Línea decorativa debajo del enlace.
 */

.main-navigation .nav-link::after {

    content: "";

    position: absolute;

    left: 50%;
    bottom: 3px;

    width: 0;
    height: 2px;

    border-radius: 999px;

    background: var(--primary-color);

    transform:
        translateX(-50%);

    transition:
        width 0.2s ease;
}


.main-navigation .nav-link:hover::after {

    width: 22px;
}


/* ------------------------------------------------------------- */
/* Acciones del Header                                           */
/* ------------------------------------------------------------- */

.header-actions {

    display: flex;

    align-items: center;

    justify-content: flex-end;

    gap: 14px;

    flex-shrink: 0;
}


/* ------------------------------------------------------------- */
/* Botón Login                                                    */
/* ------------------------------------------------------------- */

.login-button {

    display: inline-flex;

    align-items: center;

    justify-content: center;

    min-height: 40px;

    padding:
        0 16px;

    border:
        1px solid var(--border);

    border-radius: 10px;

    color: var(--text-main);

    background: var(--bg-panel);

    text-decoration: none;

    font-size: 0.84rem;

    font-weight: 700;

    transition:
        color 0.2s ease,
        background-color 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}


.login-button:hover {

    color: var(--primary-color);

    border-color:
        rgba(175, 0, 161, 0.35);

    background:
        var(--bg-panel-soft);

    transform:
        translateY(-1px);
}


/* ------------------------------------------------------------- */
/* Botón Hamburguesa                                             */
/* ------------------------------------------------------------- */

.boton-hamburguesa {

    display: none;

    width: 42px;
    height: 42px;

    padding: 0;

    border: none;

    border-radius: 11px;

    background:
        var(--primary-color);

    color: #ffffff;

    cursor: pointer;

    align-items: center;
    justify-content: center;

    font-size: 1.35rem;

    transition:
        background-color 0.2s ease,
        transform 0.2s ease;
}


.boton-hamburguesa:hover {

    background:
        var(--primary-hover-color);

    transform:
        translateY(-1px);
}


/* ============================================================= */
/* == 3. PERFIL & DROPDOWN                                    == */
/* ============================================================= */

/*
 * Contenedor del perfil.
 *
 * Mantiene el menú desplegable asociado al botón de perfil
 * y permite que auth-ui.js controle su visibilidad.
 */

.profile-dropdown {

    position: relative;

    display: inline-flex;

    align-items: center;
}


/* ------------------------------------------------------------- */
/* Botón de perfil                                                */
/* ------------------------------------------------------------- */

.profile-button {

    width: 42px;
    height: 42px;

    padding: 0;

    border:
        1px solid var(--border);

    border-radius: 50%;

    background:
        var(--bg-panel);

    color: var(--text-main);

    cursor: pointer;

    display: inline-flex;

    align-items: center;
    justify-content: center;

    position: relative;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}


.profile-button:hover {

    border-color:
        rgba(175, 0, 161, 0.45);

    box-shadow:
        0 4px 14px rgba(175, 0, 161, 0.12);

    transform:
        translateY(-1px);
}


/* ------------------------------------------------------------- */
/* Foto de perfil                                                */
/* ------------------------------------------------------------- */

.nav-profile-picture {

    width: 34px;
    height: 34px;

    border-radius: 50%;

    object-fit: cover;

    border:
        2px solid var(--primary-color);
}


.profile-button .nav-profile-icon {

    font-size: 25px;

    color: var(--text-muted);
}


/* ------------------------------------------------------------- */
/* Flecha del perfil                                              */
/* ------------------------------------------------------------- */

.profile-chevron {

    position: absolute;

    right: -5px;
    bottom: -3px;

    width: 17px;
    height: 17px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background:
        var(--bg-panel);

    border:
        1px solid var(--border);

    color: var(--text-muted);

    font-size: 10px;

    transition:
        transform 0.2s ease;
}


.profile-button[aria-expanded="true"]
.profile-chevron {

    transform:
        rotate(180deg);
}


/* ------------------------------------------------------------- */
/* Dropdown                                                       */
/* ------------------------------------------------------------- */

.dropdown-content {

    position: absolute;

    top: calc(100% + 12px);

    right: 0;

    width: 230px;

    min-width: 210px;

    padding: 6px;

    display: none;

    flex-direction: column;

    background:
        var(--bg-panel);

    border:
        1px solid var(--border);

    border-radius: 14px;

    box-shadow:
        0 14px 35px rgba(35, 20, 40, 0.14);

    z-index: 3000;

    overflow: hidden;
}


.dropdown-content.show {

    display: flex;

    animation:
        dropdownAppear 0.18s ease;
}


@keyframes dropdownAppear {

    from {

        opacity: 0;

        transform:
            translateY(-5px);

    }

    to {

        opacity: 1;

        transform:
            translateY(0);

    }
}


/* ------------------------------------------------------------- */
/* Elementos del dropdown                                        */
/* ------------------------------------------------------------- */

.dropdown-content a,
.dropdown-content button {

    width: 100%;

    min-height: 43px;

    padding:
        10px
        12px;

    box-sizing: border-box;

    display: flex;

    align-items: center;

    gap: 10px;

    border: none;

    border-radius: 9px;

    background: transparent;

    color: var(--text-main);

    text-decoration: none;

    font-family: inherit;

    font-size: 0.87rem;

    font-weight: 600;

    text-align: left;

    cursor: pointer;

    transition:
        color 0.2s ease,
        background-color 0.2s ease;
}


.dropdown-content a i,
.dropdown-content button i {

    width: 20px;

    text-align: center;

    font-size: 18px;

    color: var(--text-muted);

    transition:
        color 0.2s ease;
}


.dropdown-content a:hover,
.dropdown-content button:hover {

    background:
        var(--bg-panel-soft);

    color:
        var(--primary-color);
}


.dropdown-content a:hover i,
.dropdown-content button:hover i {

    color:
        var(--primary-color);
}


/* ------------------------------------------------------------- */
/* Separador                                                      */
/* ------------------------------------------------------------- */

.dropdown-divider {

    height: 1px;

    margin:
        5px
        7px;

    background:
        var(--border);
}


/* ------------------------------------------------------------- */
/* Cerrar sesión                                                  */
/* ------------------------------------------------------------- */

.dropdown-content .logout-link {

    color:
        var(--error-color);
}


.dropdown-content .logout-link i {

    color:
        var(--error-color);
}


.dropdown-content .logout-link:hover {

    background:
        rgba(231, 76, 60, 0.08);

    color:
        var(--error-color);
}


/* ============================================================= */
/* == 4. OVERLAY                                               == */
/* ============================================================= */

/*
 * Overlay utilizado principalmente por el menú móvil.
 */

.overlay {

    display: none;

    position: fixed;

    inset: 0;

    width: 100%;
    height: 100%;

    background:
        rgba(0, 0, 0, 0.35);

    z-index: 2200;
}


.overlay.active {

    display: block;
}


/* ============================================================= */
/* == 5. COMPONENTES COMPARTIDOS                              == */
/* ============================================================= */

.container,
.ajustes-container {

    width:
        min(100%, 1000px);

    margin:
        0 auto;

    padding:
        20px;

    box-sizing:
        border-box;
}


/* ------------------------------------------------------------- */
/* Accordion                                                      */
/* ------------------------------------------------------------- */

.accordion {

    display: block;

    width: 100%;

    background:
        var(--bg-panel);

    border:
        1px solid var(--border);

    border-radius:
        var(--panel-radius);

    margin-bottom:
        18px;

    overflow: hidden;

    box-shadow:
        var(--card-shadow);

    box-sizing:
        border-box;
}


.accordion-toggle {

    display: flex;

    width: 100%;

    min-height: 54px;

    padding:
        16px
        18px;

    background:
        linear-gradient(
            135deg,
            var(--bg-panel),
            var(--bg-panel-soft)
        );

    color:
        var(--primary-color);

    border: 0;

    justify-content:
        space-between;

    align-items:
        center;

    gap:
        12px;

    cursor:
        pointer;

    text-align:
        left;

    appearance:
        none;

    box-sizing:
        border-box;

    font-family:
        inherit;

    font-size:
        1rem;

    font-weight:
        700;
}


.accordion-toggle span {

    display:
        flex;

    align-items:
        center;

    gap:
        10px;

    min-width:
        0;

    flex:
        1;
}


.accordion-toggle i {

    color:
        var(--primary-hover-color);
}


.accordion-toggle .fa-chevron-down {

    flex:
        0 0 auto;

    transition:
        transform 0.3s ease;
}


.accordion.active
.accordion-toggle
.fa-chevron-down {

    transform:
        rotate(180deg);
}


.accordion-toggle:hover {

    background:
        #f1e4f4;
}


.accordion-toggle:focus {

    outline:
        2px solid
        var(--primary-hover-color);

    outline-offset:
        -2px;
}


.accordion-content {

    display: none;

    width: 100%;

    padding:
        18px;

    border-top:
        1px solid var(--border);

    background:
        var(--bg-panel);

    color:
        var(--text-main);

    box-sizing:
        border-box;
}


.accordion.active
.accordion-content {

    display: block;
}


/* ------------------------------------------------------------- */
/* Botones                                                        */
/* ------------------------------------------------------------- */

button,
.btn-primary,
.btn-mini,
.btn-mini-ban,
.btn-mini-des,
.btn-deny,
.btn-save-note {

    border: none;

    border-radius:
        var(--border-radius);

    font-family:
        inherit;

    font-weight:
        700;

    cursor:
        pointer;

    box-sizing:
        border-box;
}


.btn-primary,
.btn-save-note {

    background:
        var(--primary-color);

    color:
        #ffffff;

    padding:
        10px
        16px;
}


.btn-primary:hover,
.btn-save-note:hover {

    background:
        var(--primary-hover-color);
}


.btn-mini {

    background:
        #f1e4f4;

    color:
        var(--primary-color);

    padding:
        7px
        10px;

    margin:
        2px;
}


.btn-mini:hover {

    background:
        #ead3ef;
}


.btn-mini-ban {

    background:
        rgba(231, 76, 60, 0.12);

    color:
        var(--error-color);

    padding:
        7px
        10px;

    margin:
        2px;
}


.btn-mini-ban:hover {

    background:
        rgba(231, 76, 60, 0.22);
}


.btn-mini-des {

    background:
        rgba(46, 204, 113, 0.12);

    color:
        var(--success-color);

    padding:
        7px
        10px;

    margin:
        2px;
}


.btn-mini-des:hover {

    background:
        rgba(46, 204, 113, 0.22);
}


.btn-deny {

    background:
        var(--error-color);

    color:
        #ffffff;

    padding:
        9px
        13px;
}


.btn-deny:hover {

    filter:
        brightness(1.05);
}


/* ------------------------------------------------------------- */
/* Formularios                                                    */
/* ------------------------------------------------------------- */

input,
textarea,
select {

    width:
        100%;

    background:
        var(--bg-input);

    color:
        var(--text-main);

    border:
        1px solid var(--border);

    border-radius:
        var(--border-radius);

    padding:
        10px
        12px;

    font-family:
        inherit;

    font-size:
        0.95rem;

    box-sizing:
        border-box;
}


input:focus,
textarea:focus,
select:focus {

    outline:
        2px solid
        var(--primary-hover-color);

    outline-offset:
        1px;
}


textarea {

    min-height:
        90px;

    resize:
        vertical;
}


input::placeholder,
textarea::placeholder {

    color:
        #9a8fa1;
}


label {

    display:
        block;

    margin:
        10px
        0
        6px;

    color:
        var(--text-muted);

    font-weight:
        700;
}


/* ------------------------------------------------------------- */
/* Tablas                                                         */
/* ------------------------------------------------------------- */

.table-wrapper {

    width:
        100%;

    overflow-x:
        auto;
}


.admin-table {

    width:
        100%;

    border-collapse:
        collapse;

    margin-top:
        10px;

    background-color:
        var(--bg-panel);

    color:
        var(--text-main);

    font-family:
        "Segoe UI",
        Roboto,
        Arial,
        sans-serif;
}


.admin-table th,
.admin-table td {

    padding:
        12px
        15px;

    border-bottom:
        1px solid var(--border);

    text-align:
        left;

    vertical-align:
        middle;
}


.admin-table th {

    color:
        var(--primary-color);

    font-size:
        0.85rem;

    background:
        var(--bg-panel-soft);

    text-transform:
        uppercase;

    letter-spacing:
        1px;
}


.admin-table tr:hover {

    background:
        rgba(175, 0, 161, 0.04);
}


.actions-cell {

    white-space:
        nowrap;
}


/* ------------------------------------------------------------- */
/* Estados                                                        */
/* ------------------------------------------------------------- */

.status-active {

    display:
        inline-block;

    background-color:
        rgba(46, 204, 113, 0.12);

    color:
        #1f8f4d;

    padding:
        4px
        8px;

    border-radius:
        4px;

    font-size:
        0.8rem;

    font-weight:
        bold;
}


.status-denied {

    display:
        inline-block;

    background-color:
        rgba(255, 152, 0, 0.14);

    color:
        #b66d00;

    padding:
        4px
        8px;

    border-radius:
        4px;

    font-size:
        0.8rem;

    font-weight:
        bold;
}


.status-muted {

    display:
        inline-block;

    background-color:
        rgba(111, 111, 122, 0.12);

    color:
        var(--text-muted);

    padding:
        4px
        8px;

    border-radius:
        4px;

    font-size:
        0.8rem;

    font-weight:
        bold;
}


.status-tag {

    display:
        inline-block;

    padding:
        5px
        10px;

    border-radius:
        999px;

    font-weight:
        700;
}


.status-en-progreso {

    background:
        rgba(255, 152, 0, 0.14);

    color:
        #b66d00;
}


.badge-role {

    display:
        inline-block;

    background:
        var(--primary-color);

    color:
        #ffffff;

    padding:
        4px
        8px;

    border-radius:
        4px;

    font-size:
        0.8rem;

    font-weight:
        bold;
}


.empty-table,
.empty-state {

    color:
        var(--text-muted);

    text-align:
        center;

    padding:
        18px;
}


/* ------------------------------------------------------------- */
/* Notas                                                          */
/* ------------------------------------------------------------- */

.notebook-header {

    display:
        flex;

    justify-content:
        flex-end;

    margin-bottom:
        12px;
}


.notas-grid {

    display:
        grid;

    grid-template-columns:
        repeat(
            auto-fill,
            minmax(230px, 1fr)
        );

    gap:
        16px;

    margin-top:
        18px;
}


.nota-item {

    background:
        #fff4ff;

    border-left:
        5px solid
        var(--primary-hover-color);

    border-radius:
        12px;

    padding:
        14px;

    min-height:
        150px;

    display:
        flex;

    flex-direction:
        column;

    justify-content:
        space-between;
}


.nota-item p {

    margin:
        0
        0
        12px;

    color:
        var(--text-main);

    white-space:
        pre-wrap;

    overflow-wrap:
        break-word;
}


/* ============================================================= */
/* == 6. GALERÍA                                               == */
/* ============================================================= */

/*
 * Tarjetas utilizadas para mostrar las obras.
 *
 * Se mantiene una presentación limpia y visual para que
 * la imagen sea el elemento principal de cada tarjeta.
 */

.galeria-grid {

    display:
        grid;

    grid-template-columns:
        repeat(
            auto-fill,
            minmax(260px, 1fr)
        );

    gap:
        28px;

    padding:
        30px;

    width:
        100%;

    box-sizing:
        border-box;
}


.obra-card {

    border:
        1px solid var(--border);

    border-radius:
        18px;

    overflow:
        hidden;

    box-shadow:
        var(--card-shadow);

    position:
        relative;

    background-color:
        var(--bg-panel);

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}


.obra-card:hover {

    transform:
        translateY(-6px);

    box-shadow:
        0 16px 28px
        rgba(175, 0, 161, 0.20);
}


.obra-card img {

    width:
        100%;

    height:
        240px;

    display:
        block;

    object-fit:
        cover;

    object-position:
        center;

    background:
        #f5f5f5;
}


.obra-info {

    padding:
        16px
        18px
        18px;

    background:
        linear-gradient(
            180deg,
            var(--bg-panel) 0%,
            var(--bg-panel-soft) 100%
        );
}


.obra-info h3 {

    margin:
        0
        0
        8px;

    color:
        var(--text-main);

    font-size:
        1.15rem;

    font-weight:
        800;

    line-height:
        1.25;

    letter-spacing:
        0.2px;
}


.obra-info p {

    margin:
        0;

    color:
        var(--text-muted);

    font-size:
        0.95rem;

    line-height:
        1.5;
}


.obra-info p:first-of-type {

    font-weight:
        700;

    color:
        var(--primary-color);
}


.obra-description {

    margin-top:
        10px !important;

    color:
        #5f5f68;

    font-size:
        0.92rem;

    line-height:
        1.55;

    display:
        -webkit-box;

    -webkit-line-clamp:
        3;

    -webkit-box-orient:
        vertical;

    overflow:
        hidden;
}


/* ============================================= */
/* == 7. FOOTER                                   == */
/* ============================================= */

.site-footer {
    width: 100%;
    margin-top: auto;

    background: var(--bg-panel);
    border-top: 1px solid var(--border);

    box-sizing: border-box;
}

/* Contenido */

.footer-content {
    width: min(100% - 40px, 1100px);
    margin: 0 auto;

    min-height: 110px;
    padding: 24px 0;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    box-sizing: border-box;
}

/* ============================================= */
/* == MARCA                                    == */
/* ============================================= */

.footer-brand {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 12px;
}

.footer-logo {
    width: 42px;
    height: 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 12px;

    background: var(--primary-color);
    color: #ffffff;

    font-family: "Montserrat", "Segoe UI", sans-serif;
    font-size: 0.9rem;
    font-weight: 800;

    letter-spacing: 1px;

    box-shadow:
        0 4px 12px rgba(175, 0, 161, 0.18);
}

.footer-brand-text {
    display: flex;
    flex-direction: column;

    gap: 2px;
}

.footer-brand-text strong {
    color: var(--text-main);

    font-family: "Montserrat", "Segoe UI", sans-serif;
    font-size: 1rem;
    font-weight: 700;

    letter-spacing: 0.3px;
}

.footer-brand-text span {
    color: var(--text-muted);

    font-size: 0.78rem;
}

/* ============================================= */
/* == DIVISOR                                  == */
/* ============================================= */

.footer-divider {
    width: min(100%, 420px);
    height: 1px;

    margin: 18px 0 14px;

    background: var(--border);
}

/* ============================================= */
/* == COPYRIGHT                                == */
/* ============================================= */

.footer-copyright {
    margin: 0;

    color: var(--text-muted);

    font-size: 0.78rem;
    text-align: center;

    line-height: 1.5;
}

.footer-copyright span {
    margin: 0 6px;
    color: var(--primary-color);
}

/* ============================================= */
/* == RESPONSIVE                               == */
/* ============================================= */

@media (max-width: 768px) {

    .footer-content {
        width: min(100% - 28px, 600px);
        min-height: 100px;
        padding: 20px 0;
    }

    .footer-logo {
        width: 38px;
        height: 38px;
        border-radius: 10px;
        font-size: 0.82rem;
    }

    .footer-brand-text strong {
        font-size: 0.95rem;
    }

    .footer-brand-text span {
        font-size: 0.74rem;
    }

    .footer-copyright {
        font-size: 0.74rem;
    }
}

@media (max-width: 420px) {

    .footer-content {
        width: calc(100% - 20px);
    }

    .footer-brand {
        gap: 9px;
    }

    .footer-brand-text span {
        display: none;
    }

    .footer-divider {
        margin: 14px 0 11px;
    }

    .footer-copyright span {
        margin: 0 3px;
    }
}

/* ============================================================= */
/* == 8. RESPONSIVE                                            == */
/* ============================================================= */

/*
 * En pantallas pequeñas:
 *
 * - El header se vuelve compacto.
 * - La navegación pasa a un panel lateral.
 * - El menú hamburguesa aparece.
 * - El dropdown de perfil se adapta al ancho disponible.
 */

html,
body {

    max-width:
        100%;

    overflow-x:
        hidden;
}


body.menu-open {

    overflow:
        hidden;
}


/* ------------------------------------------------------------- */
/* Tablet / móvil                                                */
/* ------------------------------------------------------------- */

@media (max-width: 768px) {

    .site-header {

        position:
            sticky;

        top:
            0;

        z-index:
            2500;
    }


    .header-inner {

        width:
            calc(100% - 24px);

        min-height:
            64px;

        gap:
            10px;
    }


    .brand {

        min-width:
            0;
    }


    .brand-mark {

        width:
            38px;

        height:
            38px;

        border-radius:
            11px;

        font-size:
            0.78rem;
    }


    .brand-name {

        font-size:
            0.98rem;
    }


    .brand-subtitle {

        font-size:
            0.6rem;

        letter-spacing:
            1.7px;
    }


    /* --------------------------------------------------------- */
    /* Acciones                                                   */
    /* --------------------------------------------------------- */

    .header-actions {

        gap:
            8px;
    }


    .login-button {

        min-height:
            38px;

        padding:
            0
            12px;

        font-size:
            0.78rem;
    }


    .profile-button {

        width:
            40px;

        height:
            40px;
    }


    .boton-hamburguesa {

        display:
            inline-flex;
    }


    /* --------------------------------------------------------- */
    /* Navegación móvil                                           */
    /* --------------------------------------------------------- */

    .main-navigation {

        position:
            fixed;

        top:
            0;

        right:
            0;

        width:
            min(84vw, 340px);

        height:
            100vh;

        padding:
            82px
            16px
            24px;

        box-sizing:
            border-box;

        display:
            flex;

        flex-direction:
            column;

        align-items:
            stretch;

        justify-content:
            flex-start;

        gap:
            6px;

        background:
            var(--bg-panel);

        border-left:
            1px solid var(--border);

        box-shadow:
            -10px 0 30px
            rgba(0, 0, 0, 0.15);

        transform:
            translateX(110%);

        transition:
            transform 0.25s ease;

        z-index:
            2400;

        overflow-y:
            auto;
    }


    .main-navigation.menu-visible {

        transform:
            translateX(0);
    }


    .main-navigation .nav-link {

        width:
            100%;

        min-height:
            46px;

        padding:
            12px
            14px;

        justify-content:
            flex-start;

        border-radius:
            11px;

        font-size:
            0.9rem;
    }


    .main-navigation .nav-link::after {

        display:
            none;
    }


    .main-navigation .nav-link:hover {

        background:
            var(--bg-panel-soft);
    }


    /* --------------------------------------------------------- */
    /* Dropdown móvil                                             */
    /* --------------------------------------------------------- */

    .profile-dropdown {

        position:
            relative;
    }


    .dropdown-content {

        top:
            calc(100% + 10px);

        right:
            0;

        width:
            220px;
    }


    /* --------------------------------------------------------- */
    /* Galería                                                    */
    /* --------------------------------------------------------- */

    .galeria-grid {

        grid-template-columns:
            repeat(
                auto-fill,
                minmax(160px, 1fr)
            );

        gap:
            16px;

        padding:
            16px;
    }


    .obra-card img {

        height:
            180px;
    }


    .obra-info {

        padding:
            12px
            13px
            14px;
    }


    .obra-info h3 {

        font-size:
            1rem;
    }


    .obra-info p {

        font-size:
            0.88rem;
    }


    .obra-description {

        font-size:
            0.85rem;

        -webkit-line-clamp:
            2;
    }


    /* --------------------------------------------------------- */
    /* Componentes                                                */
    /* --------------------------------------------------------- */

    .container,
    .ajustes-container {

        width:
            100%;

        padding:
            12px;
    }


    .accordion-toggle {

        font-size:
            0.95rem;

        padding:
            14px;
    }


    .admin-table th,
    .admin-table td {

        padding:
            9px;

        font-size:
            0.9rem;
    }


    .site-footer,
    footer {

        padding:
            14px;
    }
}


/* ------------------------------------------------------------- */
/* Teléfonos pequeños                                             */
/* ------------------------------------------------------------- */

@media (max-width: 420px) {

    .header-inner {

        width:
            calc(100% - 20px);
    }


    .brand-text {

        display:
            none;
    }


    .login-button {

        padding:
            0
            9px;
    }


    .main-navigation {

        width:
            88vw;

        padding-left:
            14px;

        padding-right:
            14px;
    }


    .galeria-grid {

        grid-template-columns:
            1fr;

        padding:
            12px;
    }


    .obra-card img {

        height:
            220px;
    }
}


/* ============================================================= */
/* == 9. ACCESIBILIDAD                                        == */
/* ============================================================= */

.visually-hidden {

    position:
        absolute;

    width:
        1px;

    height:
        1px;

    padding:
        0;

    margin:
        -1px;

    overflow:
        hidden;

    clip:
        rect(0, 0, 0, 0);

    white-space:
        nowrap;

    border:
        0;
}


button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {

    outline:
        2px solid
        var(--primary-hover-color);

    outline-offset:
        2px;
}


/* ============================================================= */
/* == 10. LOADER GLOBAL                                       == */
/* ============================================================= */

#art-loader-wrapper {

    position:
        fixed;

    inset:
        0;

    width:
        100%;

    height:
        100%;

    background:
        var(--bg-panel);

    display:
        flex;

    justify-content:
        center;

    align-items:
        center;

    z-index:
        9999;

    transition:
        opacity 0.5s ease;
}


.art-logo {

    width:
        80px;

    height:
        80px;
}


/* ============================================================= */
/* == 11. AUTH VISIBILITY                                     == */
/* ============================================================= */

/*
 * auth-ui.js controla estas clases según el estado de sesión
 * y el rol del usuario.
 */

.oculto {

    display:
        none !important;
}


.auth-only,
.guest-only {

    visibility:
        visible;
}


/* ============================================================= */
/* == 12. AUTOR DE OBRA                                       == */
/* ============================================================= */

.obra-info a {

    display:
        inline-block;

    margin-bottom:
        10px;

    color:
        var(--primary-color);

    text-decoration:
        none;

    text-transform:
        uppercase;

    font-size:
        0.78rem;

    font-weight:
        600;

    letter-spacing:
        1.2px;

    transition:
        color 0.2s ease;
}


.obra-info a:hover {

    color:
        var(--primary-hover-color);
}


/* ============================================================= */
/* == 13. DARK MODE                                           == */
/* ============================================================= */

/*
 * Modo oscuro de Chicky Gallery.
 *
 * Se activa mediante:
 *
 *     body.dark-mode
 *
 * Los colores principales se mantienen para conservar
 * la identidad visual de la aplicación.
 */

body.dark-mode {

    /* Fondos */

    --bg-main:
        #120e16;

    --bg-panel:
        #1b1622;

    --bg-panel-soft:
        #251e2e;

    --bg-input:
        #1b1622;


    /* Texto */

    --text-main:
        #f4eff6;

    --text-muted:
        #a59ba9;

    --dark-text:
        #ffffff;


    /* Bordes */

    --light-gray:
        #2c2236;

    --medium-gray:
        #3d304b;

    --border:
        #3d304b;


    /* Sombras */

    --card-shadow:
        0 8px 24px
        rgba(11, 7, 15, 0.6);

    --header-shadow:
        0 6px 24px
        rgba(5, 3, 8, 0.55);


    color-scheme:
        dark;

    background:
        var(--bg-main);

    color:
        var(--text-main);
}


/* ------------------------------------------------------------- */
/* Dark Mode - Header                                            */
/* ------------------------------------------------------------- */

body.dark-mode .site-header {

    background:
        var(--bg-panel);

    border-color:
        var(--border);
}


body.dark-mode .brand-name {

    color:
        var(--text-main);
}


body.dark-mode .main-navigation .nav-link {

    color:
        var(--text-muted);
}


body.dark-mode .main-navigation .nav-link:hover {

    color:
        var(--primary-hover-color);

    background:
        var(--bg-panel-soft);
}


body.dark-mode .login-button {

    background:
        var(--bg-panel);

    color:
        var(--text-main);

    border-color:
        var(--border);
}


body.dark-mode .login-button:hover {

    color:
        var(--primary-hover-color);

    background:
        var(--bg-panel-soft);
}


/* ------------------------------------------------------------- */
/* Dark Mode - Perfil                                            */
/* ------------------------------------------------------------- */

body.dark-mode .profile-button {

    background:
        var(--bg-panel);

    border-color:
        var(--border);

    color:
        var(--text-main);
}


body.dark-mode .profile-chevron {

    background:
        var(--bg-panel);

    border-color:
        var(--border);

    color:
        var(--text-muted);
}


body.dark-mode .dropdown-content {

    background:
        var(--bg-panel);

    border-color:
        var(--border);

    box-shadow:
        0 14px 35px
        rgba(0, 0, 0, 0.45);
}


body.dark-mode .dropdown-content a,
body.dark-mode .dropdown-content button {

    color:
        var(--text-main);
}


body.dark-mode .dropdown-content a:hover,
body.dark-mode .dropdown-content button:hover {

    background:
        var(--bg-panel-soft);

    color:
        var(--primary-hover-color);
}


body.dark-mode .dropdown-divider {

    background:
        var(--border);
}


/* ------------------------------------------------------------- */
/* Dark Mode - Formularios                                       */
/* ------------------------------------------------------------- */

body.dark-mode input,
body.dark-mode textarea,
body.dark-mode select {

    background:
        var(--bg-input);

    color:
        var(--text-main);

    border-color:
        var(--border);
}


body.dark-mode input::placeholder,
body.dark-mode textarea::placeholder {

    color:
        #827688;
}


/* ------------------------------------------------------------- */
/* Dark Mode - Galería                                           */
/* ------------------------------------------------------------- */

body.dark-mode .obra-card {

    background:
        var(--bg-panel);

    border-color:
        var(--border);
}


body.dark-mode .obra-card img {

    background:
        #211a27;
}


body.dark-mode .obra-info {

    background:
        linear-gradient(
            180deg,
            #1b1622 0%,
            #251e2e 100%
        );
}


body.dark-mode .obra-info h3 {

    color:
        var(--text-main);
}


body.dark-mode .obra-description {

    color:
        var(--text-muted);
}


body.dark-mode .empty-state {

    background:
        var(--bg-panel);

    border-color:
        var(--border);
}


/* ------------------------------------------------------------- */
/* Dark Mode - Tablas                                            */
/* ------------------------------------------------------------- */

body.dark-mode .admin-table {

    background:
        var(--bg-panel);

    color:
        var(--text-main);
}


body.dark-mode .admin-table th {

    background:
        var(--bg-panel-soft);
}


body.dark-mode .admin-table tr:hover {

    background:
        rgba(214, 66, 223, 0.06);
}


/* ------------------------------------------------------------- */
/* Dark Mode - Notas                                             */
/* ------------------------------------------------------------- */

body.dark-mode .nota-item {

    background:
        #241b2b;

    border-left-color:
        var(--primary-hover-color);
}


/* ------------------------------------------------------------- */
/* Dark Mode - Accordion                                         */
/* ------------------------------------------------------------- */

body.dark-mode .accordion-toggle {

    background:
        linear-gradient(
            135deg,
            var(--bg-panel),
            var(--bg-panel-soft)
        );
}


body.dark-mode .accordion-toggle:hover {

    background:
        #2c2335;
}


/* ------------------------------------------------------------- */
/* Dark Mode - Overlay                                           */
/* ------------------------------------------------------------- */

body.dark-mode .overlay {

    background:
        rgba(18, 14, 22, 0.75);
}


/* ------------------------------------------------------------- */
/* Dark Mode - Loader                                            */
/* ------------------------------------------------------------- */

body.dark-mode #art-loader-wrapper {

    background:
        var(--bg-main);
}


/* ------------------------------------------------------------- */
/* Dark Mode - Footer                                            */
/* ------------------------------------------------------------- */

body.dark-mode .site-footer,
body.dark-mode footer {

    background:
        var(--bg-panel);

    border-color:
        var(--border);
}


/* ============================================================= */
/* == REDUCCIÓN DE MOVIMIENTO                                  == */
/* ============================================================= */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {

        scroll-behavior:
            auto !important;

        animation-duration:
            0.01ms !important;

        animation-iteration-count:
            1 !important;

        transition-duration:
            0.01ms !important;
    }
}
/* =============================================
   GLOBAL LOADING SCREEN
============================================= */

.global-loading-screen {
    position: fixed;
    inset: 0;
    z-index: 99999;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #ffffff;
    color: #2d2d35;

    opacity: 1;
    visibility: visible;

    transition:
        opacity 0.3s ease,
        visibility 0.3s ease;
}

.global-loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}


/* =============================================
   CONTENIDO
============================================= */

.global-loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 18px;

    text-align: center;
}


/* =============================================
   LOGOS
============================================= */

.global-loading-logo {
    width: 120px;
    height: 120px;

    object-fit: contain;
    display: block;
}


/* Logo normal */

.global-loading-logo-light {
    display: block;
}


/* Logo oscuro */

.global-loading-logo-dark {
    display: none;
}


/* =============================================
   SPINNER
============================================= */

.global-loading-spinner {
    width: 32px;
    height: 32px;

    border: 3px solid rgba(175, 0, 161, 0.18);
    border-top-color: #af00a1;

    border-radius: 50%;

    animation: global-loading-spin 0.8s linear infinite;
}


/* =============================================
   TEXTO
============================================= */

.global-loading-content p {
    margin: 0;

    color: #6f6f7a;

    font-size: 0.9rem;
    font-weight: 600;
}


/* =============================================
   DARK MODE
============================================= */

html.dark-mode .global-loading-screen,
body.dark-mode .global-loading-screen {
    background: #121212;
    color: #ffffff;
}


/* Cambiar logo */

html.dark-mode .global-loading-logo-light,
body.dark-mode .global-loading-logo-light {
    display: none;
}

html.dark-mode .global-loading-logo-dark,
body.dark-mode .global-loading-logo-dark {
    display: block;
}


/* Texto */

html.dark-mode .global-loading-content p,
body.dark-mode .global-loading-content p {
    color: #b8b8b8;
}


/* Spinner */

html.dark-mode .global-loading-spinner,
body.dark-mode .global-loading-spinner {
    border-color: rgba(255, 255, 255, 0.16);
    border-top-color: #af00a1;
}


/* =============================================
   ANIMACIÓN
============================================= */

@keyframes global-loading-spin {

    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}