/* ============================================================
   Las Chicas de Oro — Estilos
   Paleta minimalista blanco y negro
   ============================================================ */

:root {
    /* Paleta monocromática */
    --brand-primary: #1a1a1a;        /* casi negro: CTAs, links, icons */
    --brand-dark:    #000000;        /* negro puro: hover de CTA */
    --brand-light:   #e5e5e5;        /* gris claro: bordes suaves */
    --brand-cream:   #ffffff;        /* fondo página: blanco puro */
    --brand-accent:  #1a1a1a;        /* acento = negro (sin contraste cromático) */
    --brand-accent-dark: #000000;
    --brand-soft:    #f5f5f5;        /* gris muy claro: badges, zonas suaves */
    --brand-ink:     #1a1a1a;        /* texto principal */
    --brand-muted:   #6c6c6c;        /* texto secundario */
    --brand-border:  #e5e5e5;        /* bordes/separadores */

    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', 'Segoe UI', system-ui, sans-serif;
    --radius: 14px;
    --radius-sm: 10px;
    --radius-lg: 22px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow:    0 4px 16px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 32px rgba(0, 0, 0, 0.09);

    --sidebar-w: 280px;
}

/* ============================================================
   BASE
   ============================================================ */
body {
    font-family: var(--font-body);
    background-color: var(--brand-cream);
    color: var(--brand-ink);
    font-size: 0.94rem;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 {
    font-family: var(--font-display);
}

a { color: var(--brand-primary); }
a:hover { color: var(--brand-dark); }

/* ============================================================
   APP SHELL — sidebar vertical + main
   ============================================================ */
.app-shell {
    display: flex;
    min-height: 100vh;
}

.app-sidebar {
    width: var(--sidebar-w);
    flex: 0 0 var(--sidebar-w);
    background: linear-gradient(180deg, #ffffff 0%, var(--brand-cream) 100%);
    border-right: 1px solid var(--brand-soft);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.app-sidebar-brand {
    display: flex; align-items: center; gap: 0.6rem;
    padding: 1.25rem 1.25rem 0.75rem;
    color: var(--brand-dark);
    text-decoration: none;
}
.app-sidebar-brand i { font-size: 1.5rem; }
.app-sidebar-brand .brand-text {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.3rem;
    letter-spacing: 0.4px;
}

/* ============================================================
   MARCA DORADA — degradado metálico para "Las Chicas de Oro"
   ============================================================ */
.brand-gold,
.brand-gold > i,
.brand-gold .brand-text,
.app-sidebar-brand i,
.app-sidebar-brand .brand-text,
a.app-topbar-brand,
a.app-topbar-brand > i,
.navbar-brand-gold > i,
.navbar-brand-gold > span:not(.badge) {
    color: #c9a227;
}

.app-sidebar-user {
    margin: 0.5rem 1rem 1rem;
    padding: 0.9rem;
    border-radius: var(--radius);
    background: var(--brand-soft);
    display: flex; align-items: center; gap: 0.7rem;
}
.app-sidebar-user .user-avatar-sm {
    width: 38px; height: 38px;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-dark));
    color: white; font-size: 0.95rem;
}
.app-sidebar-user-name {
    font-weight: 600; color: var(--brand-dark); font-size: 0.92rem;
    line-height: 1.1; margin-bottom: 2px;
}
.app-sidebar-user-meta {
    font-size: 0.72rem; color: var(--brand-muted);
}

.app-sidebar-section {
    padding: 0.5rem 1rem 0.25rem;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--brand-muted);
    font-weight: 600;
    margin-top: 0.5rem;
}

.app-sidebar-nav {
    padding: 0 0.6rem;
    display: flex; flex-direction: column;
}

.app-nav-link {
    display: flex; align-items: center; gap: 0.7rem;
    padding: 0.7rem 0.85rem;
    margin: 2px 0;
    border-radius: 12px;
    color: #333333;
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
    transition: background 0.15s, color 0.15s, transform 0.15s;
}
.app-nav-link i {
    font-size: 1.05rem;
    width: 20px; text-align: center;
    color: var(--brand-primary);
}
.app-nav-link:hover {
    background: var(--brand-soft);
    color: var(--brand-dark);
}
.app-nav-link.active {
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-dark));
    color: white;
    box-shadow: 0 4px 14px rgba(124, 167, 145, 0.32);
}
.app-nav-link.active i { color: white; }
.app-nav-link.app-nav-link-danger { color: #b46270; }
.app-nav-link.app-nav-link-danger i { color: var(--brand-accent); }
.app-nav-link.app-nav-link-danger:hover { background: #f5e3e6; color: #93434f; }

.app-sidebar-footer {
    margin-top: auto;
    padding: 1rem 1rem 1.2rem;
    font-size: 0.7rem;
    color: var(--brand-muted);
    text-align: center;
}

.app-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    background-color: var(--brand-cream);
}

.app-topbar {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 0.7rem 1rem;
    background: white;
    border-bottom: 1px solid var(--brand-soft);
    position: sticky; top: 0; z-index: 100;
}
.app-topbar-brand {
    color: var(--brand-dark);
    text-decoration: none;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.6rem;
}
.app-topbar-toggle {
    border: none;
    background: var(--brand-soft);
    color: var(--brand-dark);
    width: 40px; height: 40px;
    border-radius: 12px;
    font-size: 1.1rem;
    display: inline-flex; align-items: center; justify-content: center;
}

@media (max-width: 991.98px) {
    .app-shell { flex-direction: column; }
    .app-sidebar { display: none; }
    .app-topbar { display: flex; }
}

/* Offcanvas (móvil) reusa app-sidebar styles */
.offcanvas.app-sidebar-offcanvas {
    width: var(--sidebar-w);
    background: linear-gradient(180deg, #ffffff 0%, var(--brand-cream) 100%);
}
.offcanvas.app-sidebar-offcanvas .offcanvas-body { padding: 0; }

/* Compatibilidad con código legado (no toca) */
.bg-brand {
    background: linear-gradient(135deg, var(--brand-dark), var(--brand-primary)) !important;
}
.navbar { padding: 0.5rem 0; }
.brand-text {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: 0.3px;
}

.user-avatar-sm {
    width: 30px; height: 30px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 0.75rem; font-weight: 700; color: white;
}

.mobile-nav-link {
    display: block; padding: 0.65rem 1rem; border-radius: 8px;
    color: rgba(255,255,255,0.85); text-decoration: none;
    font-size: 0.9rem; margin: 1px 0;
}
.mobile-nav-link:hover { background: rgba(255,255,255,0.1); color: white; }
.mobile-nav-link i { width: 20px; text-align: center; margin-right: 8px; }

/* ============================================================
   BOTONES
   ============================================================ */
.btn-brand {
    background-color: var(--brand-primary);
    border-color: var(--brand-primary);
    color: white; border-radius: var(--radius-sm);
}
.btn-brand:hover, .btn-brand:focus {
    background-color: var(--brand-dark);
    border-color: var(--brand-dark);
    color: white;
}

.btn-outline-brand {
    color: var(--brand-primary);
    border-color: var(--brand-primary);
    border-radius: var(--radius-sm);
}
.btn-outline-brand:hover {
    background-color: var(--brand-primary);
    border-color: var(--brand-primary);
    color: white;
}

.text-brand { color: var(--brand-primary) !important; }
.bg-brand-soft { background-color: var(--brand-soft) !important; }

/* ============================================================
   AUTH PAGE — Pantalla dividida login
   ============================================================ */
.auth-page { margin: 0; padding: 0; background: var(--brand-cream); }

.auth-split {
    display: flex; min-height: 100vh;
}

.auth-hero {
    flex: 0 0 45%; position: relative;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--brand-light) 0%, var(--brand-primary) 50%, var(--brand-dark) 100%);
    overflow: hidden;
}

.auth-hero-overlay {
    position: absolute; inset: 0;
    background: radial-gradient(circle at 30% 60%, rgba(255,255,255,0.08) 0%, transparent 60%);
}

.auth-hero-content {
    position: relative; z-index: 1;
    text-align: center; color: white; padding: 2rem;
}

.auth-logo {
    font-size: 4rem; opacity: 0.9;
    margin-bottom: 1rem;
}

.auth-hero-title {
    font-family: var(--font-display);
    font-size: 2.5rem; font-weight: 700;
    letter-spacing: 0.5px; margin-bottom: 0.5rem;
}

.auth-hero-subtitle {
    font-size: 1.05rem; opacity: 0.85;
    font-weight: 300; line-height: 1.6;
}

.auth-hero-dots { margin-top: 2rem; }
.auth-hero-dots span {
    display: inline-block; width: 6px; height: 6px;
    border-radius: 50%; background: rgba(255,255,255,0.4);
    margin: 0 4px;
}
.auth-hero-dots span:nth-child(2) { background: rgba(255,255,255,0.7); }

.auth-form-panel {
    flex: 1; display: flex; align-items: center; justify-content: center;
    padding: 2rem;
}

.auth-form-wrapper { width: 100%; max-width: 400px; }

.auth-mobile-logo {
    font-size: 3rem; color: var(--brand-accent);
}
.auth-mobile-title {
    font-family: var(--font-display);
    font-size: 1.6rem; font-weight: 700;
    color: var(--brand-dark);
}

@media (max-width: 767.98px) {
    .auth-form-panel { padding: 1.5rem 1rem; }
}

/* ============================================================
   HOME
   ============================================================ */
.home-hero {
    background: linear-gradient(135deg, var(--brand-soft) 0%, var(--brand-cream) 100%);
    border-radius: var(--radius);
    overflow: hidden;
}

.home-hero-inner {
    padding: 1.25rem 1.5rem;
    text-align: center;
}

.home-hero-title {
    font-family: var(--font-display);
    font-size: 1.5rem; font-weight: 700;
    color: var(--brand-dark);
    margin-bottom: 0;
    line-height: 1.2;
}

.home-hero-subtitle {
    color: var(--brand-muted); font-size: 0.9rem;
    font-weight: 300; margin-top: 0.15rem; margin-bottom: 0;
}

@media (min-width: 768px) {
    .home-hero-inner { padding: 1.5rem 2rem; }
    .home-hero-title { font-size: 1.8rem; }
}

/* Block cards */
.block-card {
    border-radius: var(--radius) !important;
    transition: transform 0.2s, box-shadow 0.2s;
}
.block-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg) !important;
}
.block-card-icon { font-size: 2.5rem; }

/* Imagen del bloque: zoom sutil al hover (no choca con el translateY del card) */
.block-card-img {
    transition: transform 0.35s ease;
}
.block-card:hover .block-card-img {
    transform: scale(1.04);
}

/* News */
.news-card, .news-card-single {
    border-radius: var(--radius) !important;
}
.news-img-cover {
    background-size: cover; background-position: center;
    min-height: 140px;
}
/* Marco de altura fija que aloja la imagen sin recortarla (object-fit: contain).
   Se usa en grids antiguos / fallbacks donde la imagen va arriba a ancho completo. */
.news-img-frame {
    height: 220px;
    background: var(--brand-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 4px;
}
.news-img-frame img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

/* Layout 2 columnas para noticias del carousel: imagen vertical a un lado,
   texto al otro. Pensado para imágenes tipo Instagram (4:5 / 9:16). */
.news-card-split {
    min-height: 380px;
}
.news-img-side {
    width: 100%;
    height: 100%;
    min-height: 380px;
    background: var(--brand-soft);
    overflow: hidden;
}
.news-img-side img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}
@media (max-width: 767.98px) {
    /* En móvil las columnas se apilan: la imagen pasa a ser una banda superior */
    .news-card-split { min-height: 0; }
    .news-img-side   { min-height: 260px; height: 260px; }
}

/* Carousel de novedades: flechas oscuras para que se vean sobre fondo claro */
.news-carousel .carousel-control-prev,
.news-carousel .carousel-control-next {
    width: 38px;
    opacity: 0.8;
}
.news-carousel .carousel-control-prev-icon,
.news-carousel .carousel-control-next-icon {
    filter: invert(1) grayscale(1);
    background-color: rgba(0,0,0,0.4);
    border-radius: 50%;
    padding: 14px;
    background-size: 40%;
}
.news-carousel .carousel-indicators [data-bs-target] {
    background-color: var(--brand-primary);
    width: 8px; height: 8px;
    border-radius: 50%;
    border: none;
    margin: 0 4px;
}
.news-body { line-height: 1.7; }
.news-body-compact { line-height: 1.5; }

/* Tarjeta de noticia clickable (abre modal con vista completa) */
.news-card-clickable { cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; }
.news-card-clickable:hover { transform: translateY(-2px); box-shadow: 0 .5rem 1rem rgba(0,0,0,.08) !important; }
.news-card-clickable:focus-visible { outline: 2px solid var(--brand-primary); outline-offset: 2px; }

/* Modal de noticia: imagen completa sin recortar */
.news-modal-img { max-height: 70vh; width: auto; max-width: 100%; object-fit: contain; }
@media (max-width: 767.98px) {
    .news-modal-img { max-height: 50vh; }
}
#newsModal .news-body img { max-width: 100%; height: auto; border-radius: .5rem; }
#newsModal .news-body a { word-break: break-word; }

/* ============================================================
   SECCIONES DE CARPETA (landings) — versión pública
   ============================================================ */
.folder-section {
    border-radius: var(--radius) !important;
    border-left: 4px solid var(--brand-primary) !important;
}
.folder-section h4 { color: var(--brand-ink); }
.folder-section-body {
    font-size: 0.95rem;
    line-height: 1.55;
}
/* Cuando el body viene de Quill, mantenemos un poco de aire en listas y enlaces. */
.folder-section-body p:last-child { margin-bottom: 0; }
.folder-section-body ul,
.folder-section-body ol { padding-left: 1.3rem; margin-bottom: 0.5rem; }
.folder-section-body a   { color: var(--brand-primary); text-decoration: underline; }
.folder-section-body strong,
.folder-section-body b   { color: var(--brand-ink); }

/* Editor Quill dentro del modal: redondeamos esquinas y ajustamos altura mínima */
.quill-editor-wrap .ql-toolbar.ql-snow {
    border-top-left-radius: .375rem;
    border-top-right-radius: .375rem;
    border-color: #ced4da;
}
.quill-editor-wrap .ql-container.ql-snow { border: none; }
.quill-editor-wrap .ql-editor { min-height: 110px; }

/* ============================================================
   CALENDARIO — vista admin (tabla) y widget home
   ============================================================ */
.admin-cal td {
    height: 90px;
    vertical-align: top;
    padding: 4px;
    cursor: pointer;
    position: relative;
}
.admin-cal td.day-other { background: #fafafa; color: #c0c0c0; cursor: default; }
.admin-cal td.day-today { background: #fff8d6; }
.admin-cal .day-num { font-size: 0.78rem; color: var(--brand-muted); }
.admin-cal td.day-today .day-num { color: #b08c00; font-weight: 700; }
.admin-cal .ev-chip {
    display: block;
    font-size: 0.7rem;
    padding: 1px 5px;
    margin: 2px 0;
    border-radius: 4px;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
}
.admin-cal .ev-more {
    font-size: 0.68rem;
    color: var(--brand-muted);
    padding-left: 4px;
}

/* Widget pequeño para el home */
.home-cal {
    font-size: 0.85rem;
}
.home-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    text-align: center;
}
.home-cal-grid .dow {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--brand-muted);
    padding: 4px 0;
}
.home-cal-grid .day {
    padding: 6px 0;
    border-radius: 6px;
    position: relative;
    cursor: pointer;
    transition: background 0.1s;
}
.home-cal-grid .day:hover { background: var(--brand-soft); }
.home-cal-grid .day.day-other { color: #c0c0c0; cursor: default; }
.home-cal-grid .day.day-other:hover { background: transparent; }
.home-cal-grid .day.day-today { background: #fff8d6; font-weight: 700; }
.home-cal-grid .day.has-events::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 5px; height: 5px;
    border-radius: 50%;
    background: var(--brand-primary);
}
.home-cal-grid .day.selected {
    background: var(--brand-primary);
    color: white;
}
.home-cal-grid .day.selected::after { background: white; }
.home-cal-events {
    max-height: 200px;
    overflow-y: auto;
}
.home-cal-event {
    display: flex;
    gap: 8px;
    padding: 8px 4px;
    border-bottom: 1px solid var(--brand-soft);
    align-items: flex-start;
}
.home-cal-event:last-child { border-bottom: none; }
.home-cal-event .ev-bar {
    width: 4px;
    align-self: stretch;
    border-radius: 2px;
}

/* Search bar */
.search-bar-home {
    background: white;
    border-radius: var(--radius);
    padding: 1.2rem;
    box-shadow: var(--shadow-sm);
}

/* ============================================================
   CARDS
   ============================================================ */
.card { border-radius: var(--radius) !important; }

.folder-card {
    transition: transform 0.15s, box-shadow 0.15s;
    cursor: pointer;
}
.folder-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg) !important;
}
.folder-icon-wrap {
    width: 64px; height: 64px; border-radius: 50%;
    background: var(--brand-soft);
    display: flex; align-items: center; justify-content: center;
}
.folder-icon-wrap-sm {
    width: 48px; height: 48px; border-radius: 50%;
    background: var(--brand-soft);
    display: flex; align-items: center; justify-content: center;
}

/* Media card */
.media-card {
    transition: transform 0.12s, box-shadow 0.12s;
    border-radius: var(--radius) !important;
}
.media-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow) !important;
}
.media-icon-circle {
    width: 42px; height: 42px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
}

/* Thumbnail superior de la media-card */
.media-thumb {
    background-color: var(--brand-soft);
}
.media-thumb img {
    transition: transform 0.25s ease;
}
.media-card:hover .media-thumb img {
    transform: scale(1.04);
}
.media-play-overlay {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    border-radius: 50%;
    font-size: 1.25rem;
    line-height: 1;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
    pointer-events: none;
    transition: transform 0.15s ease, background 0.15s ease;
    opacity: 0.85;
}
.media-card:hover .media-play-overlay {
    transform: scale(1.1);
    background: rgba(0, 0, 0, 0.85);
}

/* Block hero */
.block-hero { border-radius: var(--radius); overflow: hidden; }

/* ============================================================
   CONTENT DETAIL
   ============================================================ */
.content-viewer { border-radius: 0; overflow: hidden; }
.content-viewer iframe,
.content-viewer video { border: 0; }

/* Visor PDF custom (PDF.js): fondo gris oscuro como visores típicos,
   páginas en lista vertical, scroll interno responsive. */
.pdf-viewer-wrap {
    background: #525659;
    padding: 12px 0;
    max-height: 80vh;
    overflow-y: auto;
}
.pdf-pages {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
.pdf-page-wrap {
    position: relative;
    max-width: 100%;
}
.pdf-page {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
    max-width: 100%;
    display: block;
}
@media (max-width: 767.98px) {
    .pdf-viewer-wrap { padding: 8px 0; max-height: 75vh; }
    .pdf-pages       { gap: 6px; }
}

/* Visor PDF modal: scroll vertical interno limitado al viewport para que
   el modal nunca pase de la ventana. */
.pdf-modal-body {
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}
#pdfViewerModal .pdf-pages {
    padding: 12px 0;
}
@media (max-width: 767.98px) {
    .pdf-modal-body { max-height: calc(100vh - 80px); }
    #pdfViewerModal .modal-dialog { margin: .5rem; max-width: calc(100% - 1rem); }
}

.content-meta-list { display: flex; flex-direction: column; gap: 0.5rem; }
.content-meta-item {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 0.85rem;
}
.content-meta-label { color: #999; }

/* ============================================================
   BREADCRUMB
   ============================================================ */
.breadcrumb { background: none; padding: 0; font-size: 0.82rem; margin-bottom: 0; }
.breadcrumb a { color: var(--brand-primary); }

/* ============================================================
   FORMS
   ============================================================ */
.form-control, .form-select {
    border-radius: var(--radius-sm);
}
.form-control:focus, .form-select:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
}
.input-group-text {
    background-color: white; color: var(--brand-primary);
}
.input-group-lg .form-control { font-size: 1rem; }

/* ============================================================
   ALERTS
   ============================================================ */
.alert { border-radius: var(--radius-sm); border: none; }

/* ============================================================
   BADGES
   ============================================================ */
.badge { font-weight: 500; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
    background: white;
    border-top: 1px solid var(--brand-soft);
}
.footer-brand {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--brand-dark);
    font-size: 0.95rem;
}

/* ============================================================
   PAGINATION
   ============================================================ */
.page-item.active .page-link {
    background-color: var(--brand-primary);
    border-color: var(--brand-primary);
}
.page-link { color: var(--brand-primary); border-radius: 8px !important; }

/* ============================================================
   TABLES (admin)
   ============================================================ */
.table th {
    font-size: 0.72rem; text-transform: uppercase;
    letter-spacing: 0.5px; color: #999; font-weight: 700;
}
.table .btn-link { text-decoration: none; }

/* ============================================================
   ADMIN (importado del bloque anterior)
   ============================================================ */
.admin-body { background-color: #fafafa; }

.admin-sidebar {
    background: white; min-height: calc(100vh - 56px);
    position: sticky; top: 56px; height: calc(100vh - 56px);
    overflow-y: auto;
}
.admin-sidebar .nav-link, #sidebarOffcanvas .nav-link {
    color: #555; padding: 0.55rem 1rem;
    border-radius: 8px; margin: 1px 6px; font-size: 0.88rem;
    transition: all 0.15s;
}
.admin-sidebar .nav-link:hover, #sidebarOffcanvas .nav-link:hover {
    background-color: var(--brand-soft); color: var(--brand-dark);
}
.admin-sidebar .nav-link.active, #sidebarOffcanvas .nav-link.active {
    background-color: var(--brand-primary); color: white; font-weight: 600;
}
.sidebar-heading { font-size: 0.7rem; letter-spacing: 1px; }

.admin-breadcrumb {
    padding: 0.4rem 0.8rem; border-radius: 8px;
    background: white; border: 1px solid #eee; font-size: 0.85rem;
}
.admin-breadcrumb a { color: var(--brand-primary); text-decoration: none; }

.folder-admin-card {
    border-radius: var(--radius-sm);
    transition: transform 0.12s, box-shadow 0.12s;
    position: relative; /* base para gestionar z-index al abrir el dropdown */
}
.folder-admin-card:hover {
    transform: translateY(-2px); box-shadow: var(--shadow) !important;
}

/* Cuando hay un dropdown abierto dentro del card, el card sube por encima
   de los hermanos de la fila siguiente para que el menú no quede cortado. */
.folder-admin-card:has(.dropdown-menu.show) {
    z-index: 1050;
}
.folder-admin-card .dropdown-menu {
    z-index: 1055;
}

.item-hidden { opacity: 0.45; }
.item-hidden:hover { opacity: 0.75; }

/* Permitir que los dropdowns salgan del table-responsive */
.table-responsive { overflow: visible !important; }

.admin-file-table th {
    font-size: 0.72rem; border-bottom: 2px solid #eee; padding: 0.5rem 0.75rem;
}
.admin-file-table td { padding: 0.55rem 0.75rem; font-size: 0.88rem; }
.admin-file-table tbody tr:hover { background-color: rgba(0, 0, 0, 0.04); }

.ls-wide { letter-spacing: 0.5px; }

/* Drop zone */
.dropzone-wrapper {
    border: 2px dashed var(--brand-light); border-radius: var(--radius);
    background: white; transition: all 0.2s;
}
.dropzone-inner { text-align: center; padding: 2rem 1rem; color: #888; }
.dropzone-wrapper.dropzone-active {
    border-color: var(--brand-primary);
    background: rgba(0, 0, 0, 0.04);
    box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.08);
}
.upload-queue { padding: 1rem; }
.upload-item { border-bottom: 1px solid #f0f0f0; }
.upload-item:last-child { border-bottom: none; }
.block-tab-wrapper { display: inline-flex; align-items: center; }
.progress { height: 6px; border-radius: 3px; }
.progress-bar { transition: width 0.4s ease; }

/* Sortable */
.sortable-ghost { opacity: 0.3; background: var(--brand-soft) !important; }
.sortable-chosen { box-shadow: var(--shadow-lg); }
.drag-handle, .drag-handle-cell { cursor: grab; }
.drag-handle:active, .drag-handle-cell:active { cursor: grabbing; }
.drag-handle {
    position: absolute; top: 4px; left: 4px;
    opacity: 0; transition: opacity 0.15s;
}
.folder-admin-card:hover .drag-handle { opacity: 0.5; }

/* Bulk toolbar */
.bulk-toolbar .card { border-radius: var(--radius-sm); }
.border-brand { border-color: var(--brand-light) !important; }

/* Preview panel */
.preview-panel .preview-media {
    border-bottom: 1px solid #eee; min-height: 120px;
    display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.preview-panel .preview-media img, .preview-panel .preview-media video { max-width: 100%; }
.content-row.table-active {
    background-color: rgba(0, 0, 0, 0.06) !important;
    border-left: 3px solid var(--brand-primary);
}

/* Tag autocomplete */
.tag-autocomplete-dropdown div:hover { background-color: var(--brand-soft); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 767.98px) {
    .home-hero-title { font-size: 1.6rem; }
    .block-card-icon { font-size: 2rem; }
    .admin-file-table { font-size: 0.82rem; }
    .dropzone-inner { padding: 1.2rem 0.8rem; }
    .bulk-toolbar .card-body { padding: 0.5rem !important; }
    .bulk-toolbar .btn { font-size: 0.72rem; padding: 0.2rem 0.4rem; }
    .media-icon-circle { width: 36px; height: 36px; font-size: 0.95rem; }
    .content-viewer iframe { min-height: 250px; }
}
