/**
 * MaisBook V5 - Estilos da Área do Cliente
 */

/* ==========================================
   PROTEÇÃO DE IMAGENS
   ========================================== */

/* Desabilitar seleção de texto e imagens */
.maisbook-page,
.gallery-grid,
.gallery-item,
.lightbox,
.lightbox-content {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-touch-callout: none;
}

/* Permitir seleção apenas em inputs e textareas */
input,
textarea {
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}

/* ==========================================
   LAYOUT GERAL
   ========================================== */

/* Textos brancos em toda a área do cliente */
.maisbook-page,
.acesso-page {
    color: #ffffff;
}

.maisbook-page p,
.maisbook-page span,
.maisbook-page div,
.maisbook-page h1,
.maisbook-page h2,
.maisbook-page h3,
.maisbook-page label,
.maisbook-page strong,
.maisbook-page li,
.maisbook-page td,
.maisbook-page th,
.acesso-page p,
.acesso-page span,
.acesso-page h1,
.acesso-page h2,
.acesso-page label {
    color: #ffffff !important;
}

.maisbook-page input,
.maisbook-page textarea,
.maisbook-page select,
.acesso-page input {
    color: #ffffff !important;
}

.maisbook-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.maisbook-header {
    background: var(--color-bg-soft) !important;
    height: 80px;
    padding: 0;
    box-shadow: var(--shadow-lg);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--color-border);
}

.maisbook-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.maisbook-logo {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--color-text);
    text-decoration: none;
    letter-spacing: -0.5px;
    transition: transform var(--transition-normal), opacity var(--transition-fast);
}

.maisbook-logo:hover {
    color: var(--color-text);
    transform: scale(1.02);
    opacity: 0.9;
}

.maisbook-user {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: var(--font-size-sm);
    color: var(--color-text);
}

.maisbook-user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.maisbook-user-plano {
    font-size: 0.75rem;
    color: var(--color-text-light);
    font-weight: 500;
}

.maisbook-user-avatar {
    width: 40px;
    height: 40px;
    background: var(--color-border);
    border: 2px solid var(--color-border-strong);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text);
    font-weight: 700;
}

.maisbook-logout-btn {
    width: 36px;
    height: 36px;
    background: var(--color-bg-card);
    border: 2px solid var(--color-border-strong);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text);
    cursor: pointer;
    transition: all var(--transition-fast);
    padding: 0;
    margin-left: 8px;
}

.maisbook-logout-btn:hover {
    background: var(--color-bg-soft);
    border-color: var(--color-border-strong);
    color: var(--color-text);
    transform: translateY(-2px);
}

.maisbook-logout-btn svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
}

.maisbook-main {
    flex: 1;
    padding: 60px 0 80px 0;
}

.selecao-page .maisbook-main {
    padding-bottom: 120px; /* Espaço para a barra fixa */
}

.maisbook-footer {
    background: var(--color-bg-card);
    padding: 20px 0;
    text-align: center;
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    border-top: 1px solid var(--color-border);
}

/* ==========================================
   PÁGINA DE ACESSO (LOGIN)
   ========================================== */

.acesso-page {
    min-height: 87vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: radial-gradient(1200px 600px at 20% 10%, rgba(232, 90, 113, 0.12), transparent 55%),
                radial-gradient(900px 500px at 85% 30%, rgba(255, 255, 255, 0.03), transparent 55%),
                var(--color-bg);
}

.acesso-box {
    width: 100%;
    max-width: 440px;
    text-align: center;
}

.acesso-logo {
    margin-bottom: 40px;
}

.acesso-logo h1 {
    font-size: var(--font-size-3xl);
    font-weight: 800;
    color: var(--color-text);
    margin: 0;
    letter-spacing: -0.5px;
}

.acesso-logo p {
    color: var(--color-text-light);
    margin-top: 8px;
}

.acesso-card {
    background: var(--color-bg-card);
    border-radius: var(--radius-xl);
    padding: 40px;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--color-border);
}

.acesso-card h2 {
    font-size: var(--font-size-xl);
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--color-text);
}

.acesso-card p {
    color: var(--color-text-light);
    margin-bottom: 30px;
}

.acesso-input {
    width: 100%;
    padding: 18px 24px;
    font-size: var(--font-size-lg);
    text-align: center;
    letter-spacing: 4px;
    text-transform: uppercase;
    font-weight: 600;
    border: 2px solid var(--color-border-strong);
    border-radius: var(--radius-lg);
    background: var(--color-bg-soft);
    color: var(--color-text);
    transition: all var(--transition-fast);
}

.acesso-input:focus {
    outline: none;
    border-color: var(--color-focus);
    box-shadow: 0 0 0 3px rgba(232, 90, 113, 0.25);
    background: var(--color-bg-card);
}

/* Focus visível para acessibilidade (teclado) */
.maisbook-page .btn:focus-visible,
.maisbook-page .btn-voltar:focus-visible,
.maisbook-page .btn-clear:focus-visible,
.maisbook-page .btn-confirm:focus-visible,
.maisbook-page .btn-preview:focus-visible,
.maisbook-page .btn-download:focus-visible,
.maisbook-page a:focus-visible,
.box:focus-visible {
    outline: 2px solid var(--color-focus);
    outline-offset: 2px;
}

.acesso-input::placeholder {
    letter-spacing: normal;
    font-weight: 400;
    color: var(--color-text-muted);
}

.acesso-btn {
    margin-top: 20px;
}

.acesso-error {
    margin-top: 16px;
    padding: 12px 16px;
    background: rgba(248, 113, 113, 0.12);
    border-radius: var(--radius-md);
    color: var(--color-error);
    font-size: var(--font-size-sm);
    display: none;
}

.acesso-error.show {
    display: block;
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    75% { transform: translateX(8px); }
}

/* ==========================================
   DASHBOARD DO CLIENTE
   ========================================== */

.dashboard-welcome {
    text-align: left;
    margin-bottom: 40px;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.dashboard-welcome h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 10px;
    letter-spacing: -1px;
}

.dashboard-welcome p {
    color: var(--color-text-light);
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.dashboard-page .maisbook-main {
    background: var(--color-bg);
}

.dashboard-page .container {
    max-width: 1100px;
    width: 100%;
    padding: 20px;
}

.dashboard-welcome.dashboard-welcome-center {
    text-align: center;
}

.dashboard-welcome h1 {
    color: var(--color-text);
}

.dashboard-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--color-text-light);
}

.dashboard-empty p {
    font-size: 1.1rem;
}

.dashboard-section {
    margin-bottom: 40px;
}

.dashboard-section h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--color-border);
}

.box-label small {
    display: block;
    font-size: 0.8rem;
    font-weight: 400;
    opacity: 0.9;
    margin-top: 5px;
}

.box-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 3;
    color: #fff;
}

.box-badge-success {
    background: var(--color-success);
}

.box-badge-warning {
    background: var(--color-warning);
    color: #1A1A2E;
    font-weight: 700;
}

.dashboard-alert {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(245, 158, 11, 0.1));
    border-radius: 16px;
    padding: 40px;
    text-align: center;
    border: 2px solid rgba(245, 158, 11, 0.4);
}

.dashboard-alert-icon {
    width: 80px;
    height: 80px;
    background: var(--color-warning);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.dashboard-alert-icon svg {
    width: 40px;
    height: 40px;
    fill: #1A1A2E;
}

.dashboard-alert h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-warning);
    margin: 0 0 12px 0;
}

.dashboard-alert p {
    margin: 0 auto;
    color: var(--color-text-light);
    font-size: 1.1rem;
    max-width: 500px;
}

.status-aprovado {
    color: var(--color-success);
    font-weight: 600;
}

.status-modificacoes {
    color: var(--color-warning);
    font-weight: 600;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
}

.selection-card {
    background: var(--color-bg-card);
    border-radius: var(--radius-xl);
    padding: 32px;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    border-left: 4px solid var(--color-border-accent);
    min-height: 320px;
    display: flex;
    flex-direction: column;
}

.selection-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.selection-card.completed {
    border-left-color: var(--color-success);
}

.selection-card.completed::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(900px 240px at 0% 0%, rgba(0, 184, 148, 0.10), transparent 55%);
    pointer-events: none;
}

.selection-card.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.selection-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, rgba(198, 40, 61, 0.16), rgba(198, 40, 61, 0.06));
    border: 1px solid rgba(198, 40, 61, 0.18);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 20px;
}

.selection-card.album .selection-icon {
    background: linear-gradient(135deg, rgba(198, 40, 61, 0.18), rgba(232, 90, 113, 0.08));
    border-color: rgba(198, 40, 61, 0.22);
}

.selection-card.poster .selection-icon {
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.16), rgba(26, 26, 46, 0.06));
    border-color: rgba(26, 26, 46, 0.18);
}

.selection-card.polaroide .selection-icon {
    background: linear-gradient(135deg, rgba(253, 203, 110, 0.22), rgba(253, 203, 110, 0.10));
    border-color: rgba(253, 203, 110, 0.28);
}

.selection-title {
    font-size: var(--font-size-xl);
    font-weight: 700;
    margin-bottom: 8px;
}

.selection-desc {
    color: var(--color-text-light);
    font-size: var(--font-size-sm);
    margin-bottom: 20px;
}

.selection-progress {
    margin-bottom: 20px;
}

.progress-bar {
    height: 8px;
    background: var(--color-bg-soft);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-cta), var(--color-secondary));
    border-radius: var(--radius-full);
    transition: width var(--transition-slow);
}

.progress-text {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    display: flex;
    justify-content: space-between;
}

.selection-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: 600;
    margin-bottom: 20px;
}

.selection-status.pending {
    background: rgba(251, 191, 36, 0.2);
    color: var(--color-warning);
}

.selection-status.completed {
    background: rgba(52, 211, 153, 0.15);
    color: var(--color-success);
}

.selection-btn {
    width: 100%;
    margin-top: auto;
}

/* ==========================================
   PÁGINA DE SELEÇÃO DE FOTOS
   ========================================== */

.selecao-page .maisbook-main {
    padding: 30px 0 120px 0; /* Espaço para a barra fixa */
}

.selecao-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 16px;
}

.selecao-header .btn-voltar {
    margin-bottom: 20px;
}

.selecao-alert {
    margin-top: 15px;
    padding: 15px 20px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(245, 158, 11, 0.1));
    border: 2px solid rgba(245, 158, 11, 0.4);
    border-radius: 12px;
    display: inline-block;
}

.selecao-alert p {
    margin: 0;
    color: var(--color-warning);
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.action-bar-locked {
    padding: 12px 20px;
    background: var(--color-bg-soft);
    color: var(--color-text-light);
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
}

.galeria-subtitle {
    color: var(--color-text-light);
    margin-top: 8px;
}

.downloads-count-label {
    font-size: 0.85rem;
    color: var(--color-text-light);
    margin-top: 5px;
    display: block;
    text-align: center;
}

.galeria-empty {
    text-align: center;
    padding: 60px 20px;
    background: var(--color-bg-card);
    border-radius: 16px;
}

.galeria-empty-icon {
    width: 80px;
    height: 80px;
    background: var(--color-warning);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.galeria-empty-icon svg {
    width: 40px;
    height: 40px;
    fill: #1A1A2E;
}

.galeria-empty h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text);
    margin: 0 0 12px 0;
}

.galeria-empty p {
    margin: 0;
    color: var(--color-text-light);
    font-size: 1.1rem;
}

.action-bar-info-box {
    padding: 12px 20px;
    background: var(--color-bg-soft);
    color: var(--color-text-light);
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
}

.selecao-header h1 {
    font-size: var(--font-size-2xl);
    font-weight: 700;
}

.selecao-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.selecao-counter {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--color-bg-card);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-sm);
    font-weight: 600;
}

.selecao-counter .count {
    font-size: var(--font-size-lg);
    color: var(--color-text-accent);
}

.selecao-counter .limit {
    color: var(--color-text-muted);
}

.selecao-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--color-text-light);
    font-size: var(--font-size-sm);
    transition: color var(--transition-fast);
}

.selecao-back:hover {
    color: var(--color-link);
}

/* Galeria */
.gallery-loading {
    text-align: center;
    padding: 60px 20px;
}

.gallery-loading .spinner {
    width: 48px;
    height: 48px;
    margin: 0 auto 20px;
}

/* Seções de pastas */
.gallery-folder-section {
    margin-bottom: 50px;
}

.gallery-folder-section:last-child {
    margin-bottom: 0;
}

.gallery-folder-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid rgba(255, 255, 255, 1);
}

.gallery-folder-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--color-text-accent);
    margin: 0;
}

.gallery-folder-title svg {
    color: var(--color-text-accent);
    opacity: 0.8;
}

.gallery-folder-count {
    font-size: var(--font-size-base);
    font-weight: 500;
    color: var(--color-text-muted);
    margin-left: 4px;
}

.gallery-grid {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12px;
    padding: 20px 0 0 0;
    justify-content: space-around;
    align-items: stretch;
    align-content: center;
}

.gallery-folder-section:last-child .gallery-grid {
    padding-bottom: 180px;
}

/* Desktop grande - 5 colunas */
@media (min-width: 1400px) {
    .gallery-grid {
        gap: 12px;
    }
    
    .gallery-item {
        width: calc((100% - (14px * 4)) / 5);
    }
    
    .gallery-item.horizontal {
        width: calc(((100% - (14px * 4)) / 5) * 2 + 14px);
    }
}

/* Desktop médio - 4 colunas */
@media (min-width: 1024px) and (max-width: 1399px) {
    .gallery-grid {
        gap: 12px;
    }
    
    .gallery-item {
        width: calc((100% - (12px * 3)) / 4);
    }
    
    .gallery-item.horizontal {
        width: calc(((100% - (12px * 3)) / 4) * 2 + 12px);
    }
}

/* Tablet - 3 colunas */
@media (min-width: 769px) and (max-width: 1023px) {
    .gallery-grid {
        gap: 10px;
    }
    
    .gallery-item {
        width: calc((100% - (10px * 2)) / 3);
    }
    
    .gallery-item.horizontal {
        width: calc(((100% - (10px * 2)) / 3) * 2 + 10px);
    }
}

.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    background: var(--color-bg-card);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
    border: 3px solid transparent;
    display: grid;
    width: calc((100% - (12px * 3)) / 4);
    line-height: 0;
    pointer-events: auto;
    align-content: center;

}
.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    background: var(--color-bg-soft);
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
    pointer-events: none;
    -webkit-touch-callout: none;
    transition: transform var(--transition-normal);
    transform: scale(1.02);
}

/* Imagens horizontais ocupam mais espaço (2 colunas) */
.gallery-item.horizontal {
    width: calc(((100% - (12px * 3)) / 4) * 2 + 12px);
}

.gallery-item:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
    border-color: rgba(198, 40, 61, 0.35);
    z-index: 10;
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    background: var(--color-bg-soft);
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
    pointer-events: none;
    -webkit-touch-callout: none;
}

.gallery-item::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity var(--transition-normal);
    z-index: 2;
    pointer-events: none;
}

.gallery-item:hover::before {
    opacity: 1;
}

.gallery-item.selected {
    box-shadow: 0 0 0 4px rgba(198, 40, 61, 0.22), 0 14px 30px rgba(0, 0, 0, 0.14);
    border-color: rgba(198, 40, 61, 0.55);
}

.gallery-item-check {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 32px;
    height: 32px;
    background: rgba(14, 180, 22, 0.95);
    border: 2px solid white;
    color: white;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.gallery-item-check svg {
    width: 18px;
    height: 18px;
    stroke-width: 3;
}

.gallery-item-overlay {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    opacity: 0;
    transition: opacity var(--transition-fast);
    pointer-events: none;
    z-index: 5;
}

.gallery-item:hover .gallery-item-overlay {
    opacity: 1;
}

/* O overlay não deve bloquear cliques, apenas os botões */
.gallery-item-overlay {
    pointer-events: none;
}

.gallery-item-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 8px;
    z-index: 10;
    pointer-events: auto;
}

.gallery-item-fullscreen,
.gallery-item-download {
    width: 40px;
    height: 40px;
    background: var(--color-bg-soft);
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-fast);
    color: #ffffff;
}

.gallery-item-fullscreen:hover,
.gallery-item-download:hover {
    background: var(--color-bg-card);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    color: #ffffff;
}

.gallery-item-download:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.gallery-item-fullscreen svg,
.gallery-item-download svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
}

.spinner-small {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid var(--color-border-strong);
    border-top-color: var(--color-text);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* ==========================================
   BARRA DE AÇÕES FLUTUANTE
   ========================================== */
.action-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--color-bg-card);
    padding: 16px 24px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.action-bar.visible {
    transform: translateY(0);
}

.action-bar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 800px;
    gap: 20px;
}

.action-bar-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.selection-count {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.selection-count .current {
    font-size: 2rem;
    font-weight: 800;
    color: var(--color-text-accent);
    line-height: 1;
}

.selection-count .separator {
    color: var(--color-text-muted);
    font-size: 1.2rem;
}

.selection-count .max {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--color-text);
}

.selection-label {
    color: var(--color-text-light);
    font-size: 0.9rem;
}

/* Barra de progresso */
.progress-bar-container {
    flex: 1;
    max-width: 200px;
    height: 8px;
    background: var(--color-bg-soft);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #C41E3A, #E85A71);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-bar.full {
    background: linear-gradient(90deg, #10B981, #34D399);
}

.progress-bar.over {
    background: linear-gradient(90deg, #EF4444, #F87171);
}

.action-bar-buttons {
    display: flex;
    gap: 12px;
}

.btn-clear {
    padding: 12px 20px;
    background: var(--color-bg-soft);
    color: var(--color-text);
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.btn-clear:hover {
    background: var(--color-border-strong);
}

.btn-confirm {
    padding: 12px 28px;
    background: linear-gradient(135deg, var(--color-cta) 0%, var(--color-cta-light) 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    box-shadow: 0 4px 12px rgba(196, 30, 58, 0.3);
}

.btn-confirm:hover {
    background: linear-gradient(135deg, #A01A2E, #C41E3A);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(196, 30, 58, 0.4);
}

.btn-preview {
    padding: 12px 28px;
    background: linear-gradient(135deg, var(--color-cta) 0%, var(--color-cta-light) 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    box-shadow: 0 4px 12px rgba(196, 30, 58, 0.3);
}

.btn-preview:hover {
    background: linear-gradient(135deg, #A01A2E, #C41E3A);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(196, 30, 58, 0.4);
}

.btn-download {
    padding: 12px 28px;
    background: linear-gradient(135deg, var(--color-success) 0%, #059669 100%);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-download:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

.btn-download:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Botão Voltar */
.btn-voltar {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--color-bg-soft) 0%, var(--color-secondary-light) 100%);
    color: var(--color-text);
    text-decoration: none;
    font-weight: 600;
    border-radius: 10px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border-strong);
    cursor: pointer;
    font-family: inherit;
}

.btn-voltar:hover {
    background: linear-gradient(135deg, var(--color-secondary-light) 0%, var(--color-secondary) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
    color: var(--color-text);
    text-decoration: none;
}

.btn-voltar:active {
    transform: translateY(0);
}

.btn-voltar-modal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    background: linear-gradient(135deg, var(--color-bg-soft) 0%, var(--color-secondary-light) 100%);
    color: var(--color-text);
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
    min-width: 140px;
    font-family: inherit;
}

.btn-voltar-modal:hover {
    background: linear-gradient(135deg, var(--color-secondary-light) 0%, var(--color-secondary) 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-voltar-modal:active {
    transform: translateY(0);
}

/* ==========================================
   MODAL / LIGHTBOX
   ========================================== */

.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 20px;
    pointer-events: auto;
}

.lightbox-image {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
    pointer-events: none;
    -webkit-touch-callout: none;
    max-width: 100%;
    max-height: 85vh;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: var(--radius-full);
    color: white;
    font-size: 24px;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: var(--radius-full);
    color: white;
    font-size: 28px;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-actions {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
}

.lightbox-select {
    padding: 14px 32px;
    background: var(--color-cta);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.lightbox-select:hover {
    background: var(--color-cta-dark);
    transform: scale(1.05);
}

.lightbox-select.selected {
    background: var(--color-success);
}

/* ==========================================
   MODAL DE PRÉVIA
   ========================================== */

.preview-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.preview-modal.active {
    opacity: 1;
    visibility: visible;
}

.preview-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
}

.preview-modal-content {
    position: relative;
    background: var(--color-bg-card);
    max-width: 1200px;
    max-height: 90vh;
    margin: 5vh auto;
    border-radius: var(--radius-xl);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 1;
}

.preview-modal-header {
    padding: 24px 32px;
    border-bottom: 2px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--color-bg-soft);
}

.preview-modal-header h2 {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--color-text-accent);
    margin: 0;
}

.preview-modal-close {
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(198, 40, 61, 0.1);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    color: var(--color-text-accent);
}

.preview-modal-close:hover {
    background: rgba(198, 40, 61, 0.2);
    transform: scale(1.05);
}

.preview-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 32px;
}

.preview-folder-section {
    margin-bottom: 50px;
}

.preview-folder-section:last-child {
    margin-bottom: 0;
}

.preview-folder-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid rgba(255, 255, 255, 1);
}

.preview-folder-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--color-text-accent);
    margin: 0;
}

.preview-folder-count {
    font-size: var(--font-size-base);
    font-weight: 500;
    color: var(--color-text-muted);
    margin-left: 4px;
}

.preview-folder-grid {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12px;
    padding: 20px 0 0 0;
    justify-content: space-around;
    align-items: stretch;
    align-content: center;
}

.preview-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: default;
    background: var(--color-bg-card);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
    border: 3px solid transparent;
    display: grid;
    width: calc((100% - (12px * 3)) / 4);
    line-height: 0;
    pointer-events: auto;
    align-content: center;
}

.preview-item img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    background: var(--color-bg-soft);
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
    pointer-events: none;
    -webkit-touch-callout: none;
    transition: transform var(--transition-normal);
    transform: scale(1.02);
}

.preview-item.horizontal {
    width: calc(((100% - (12px * 3)) / 4) * 2 + 12px);
}

.preview-item-number {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 36px;
    height: 36px;
    background: rgba(198, 40, 61, 0.95);
    color: white;
    border: 2px solid white;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: var(--font-size-base);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    z-index: 10;
    backdrop-filter: blur(8px);
}

/* Desktop grande - 5 colunas */
@media (min-width: 1400px) {
    .preview-folder-grid {
        gap: 12px;
    }
    
    .preview-item {
        width: calc((100% - (14px * 4)) / 5);
    }
    
    .preview-item.horizontal {
        width: calc(((100% - (14px * 4)) / 5) * 2 + 14px);
    }
}

/* Desktop médio - 4 colunas */
@media (min-width: 1024px) and (max-width: 1399px) {
    .preview-folder-grid {
        gap: 12px;
    }
    
    .preview-item {
        width: calc((100% - (12px * 3)) / 4);
    }
    
    .preview-item.horizontal {
        width: calc(((100% - (12px * 3)) / 4) * 2 + 12px);
    }
}

/* Tablet - 3 colunas */
@media (min-width: 769px) and (max-width: 1023px) {
    .preview-folder-grid {
        gap: 10px;
    }
    
    .preview-item {
        width: calc((100% - (10px * 2)) / 3);
    }
    
    .preview-item.horizontal {
        width: calc(((100% - (10px * 2)) / 3) * 2 + 10px);
    }
}

.preview-modal-footer {
    padding: 24px 32px;
    border-top: 2px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    background: var(--color-bg-soft);
}

.preview-modal-footer .btn-clear,
.preview-modal-footer .btn-confirm {
    min-width: 140px;
}

/* ==========================================
   APROVAR ÁLBUM
   ========================================== */

.aprovar-album-page .maisbook-main {
    background: var(--color-bg);
    min-height: calc(100vh - 80px);
}

.aprovar-album-page .container {
    max-width: 1000px;
    padding: 40px 20px;
}

.aprovar-breadcrumb {
    margin-bottom: 30px;
}

.aprovar-intro {
    text-align: center;
    margin-bottom: 40px;
}

.aprovar-intro h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 12px;
}

.aprovar-intro p {
    color: var(--color-text-light);
    font-size: 1.1rem;
}

#mensagem-area {
    margin-bottom: 30px;
}

.status-card {
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 30px;
    text-align: center;
}

.status-card-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(16, 185, 129, 0.1));
    border: 2px solid var(--color-success);
    box-shadow: 0 8px 16px rgba(16, 185, 129, 0.15);
}

.status-card-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(245, 158, 11, 0.1));
    border: 2px solid var(--color-warning);
    box-shadow: 0 8px 16px rgba(245, 158, 11, 0.15);
}

.status-card-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.status-card-success .status-card-icon {
    background: var(--color-success);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.status-card-warning .status-card-icon {
    background: var(--color-warning);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.status-card-icon svg {
    stroke: #fff;
}

.status-card-warning .status-card-icon svg {
    stroke: #1A1A2E;
}

.status-card h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.status-card-success h2 {
    color: var(--color-success);
}

.status-card-warning h2 {
    color: var(--color-warning);
}

.status-card-success p,
.status-card-warning p {
    margin-bottom: 20px;
    font-size: 1.05rem;
}

.status-card-success p {
    color: var(--color-text-light);
}

.status-card-warning p {
    color: var(--color-text-light);
}

.status-card-inner {
    background: var(--color-bg-card);
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
    display: inline-block;
}

.status-card-warning .status-card-inner {
    text-align: left;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.status-card-inner p {
    margin: 0 0 10px 0;
    font-weight: 600;
    font-size: 0.95rem;
}

.status-card-success .status-card-inner p {
    color: var(--color-text-light);
    font-size: 1.1rem;
}

.status-card-success .status-card-inner strong {
    color: var(--color-success);
}

.status-card-warning .status-card-inner p:last-child {
    color: var(--color-text-light);
    white-space: pre-wrap;
    line-height: 1.6;
    margin-bottom: 0;
}

.aprovar-card {
    background: var(--color-bg-card);
    border-radius: 20px;
    padding: 35px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-md);
}

.aprovar-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 25px;
}

.aprovar-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.aprovar-card-icon-primary {
    background: linear-gradient(135deg, var(--color-cta), var(--color-cta-light));
}

.aprovar-card-icon-warning {
    background: linear-gradient(135deg, var(--color-warning), #D97706);
}

.aprovar-card-icon svg {
    stroke: #fff;
}

.aprovar-card-icon-warning svg {
    stroke: #1A1A2E;
}

.aprovar-card h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text);
    margin: 0;
}

#galeria-album {
    padding: 20px 0 0 0;
}

.aprovar-card-footer-note {
    color: var(--color-text-light);
    font-size: 0.9rem;
    text-align: center;
    margin-top: 20px;
}

.aprovar-alert-loading {
    background: rgba(245, 158, 11, 0.15);
    border: 2px solid var(--color-warning);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.aprovar-alert-loading p {
    color: var(--color-warning);
    margin: 0;
    font-weight: 500;
}

.aprovar-card p.aprovar-desc {
    color: var(--color-text-light);
    margin-bottom: 20px;
    line-height: 1.6;
}

#comentarios-album {
    width: 100%;
    padding: 16px;
    border: 2px solid var(--color-border);
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
    margin-bottom: 20px;
    transition: border-color 0.2s;
    line-height: 1.6;
    background: var(--color-bg-soft);
    color: var(--color-text);
}

#comentarios-album:focus {
    outline: none;
    border-color: var(--color-warning);
}

.btn-enviar-comentarios {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    background: linear-gradient(135deg, var(--color-warning), #D97706);
    color: #1A1A2E;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    font-size: 1rem;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
    transition: all 0.3s;
}

.btn-enviar-comentarios:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(245, 158, 11, 0.4);
}

.aprovar-success-box {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(16, 185, 129, 0.08));
    border-radius: 20px;
    padding: 35px;
    box-shadow: var(--shadow-md);
    border: 2px solid var(--color-success);
    text-align: center;
}

.aprovar-success-box .status-card-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
}

.aprovar-success-box .status-card-icon svg {
    width: 32px;
    height: 32px;
}

.aprovar-success-box h2 {
    font-size: 1.5rem;
    color: var(--color-success);
    margin-bottom: 15px;
}

.aprovar-success-box p {
    color: var(--color-text-light);
    font-size: 1.05rem;
    line-height: 1.6;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 30px;
}

#modal-confirmacao-aprovacao {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

#modal-confirmacao-aprovacao.active {
    display: flex;
}

.modal-confirmacao-content {
    background: var(--color-bg-card);
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    margin: 20px;
    box-shadow: var(--shadow-lg);
}

.modal-confirmacao-content .status-card-icon {
    width: 64px;
    height: 64px;
}

.modal-confirmacao-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 15px;
    text-align: center;
}

.modal-confirmacao-content > p {
    color: var(--color-text-light);
    margin-bottom: 30px;
    text-align: center;
    line-height: 1.6;
}

.modal-confirmacao-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.btn-cancelar-aprovacao {
    padding: 12px 28px;
    background: var(--color-bg-soft);
    color: var(--color-text-light);
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.btn-cancelar-aprovacao:hover {
    background: var(--color-border-strong);
}

.btn-confirmar-aprovacao {
    padding: 12px 28px;
    background: linear-gradient(135deg, var(--color-success), #059669);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.95rem;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    transition: all 0.2s;
}

.btn-confirmar-aprovacao:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

.btn-aprovar-album {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 40px;
    background: linear-gradient(135deg, var(--color-success), #059669);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    font-size: 1.1rem;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    transition: all 0.3s;
}

.btn-aprovar-album:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

.aprovar-success-note {
    color: var(--color-text-light);
    font-size: 0.95rem;
    margin-top: 20px;
    font-weight: 500;
}

/* ==========================================
   MENSAGENS DE SUCESSO
   ========================================== */

.success-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
}

.success-box {
    max-width: 500px;
}

.success-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--color-success), #00D9A5);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    font-size: 48px;
    color: white;
    animation: bounceIn 0.6s ease;
}

@keyframes bounceIn {
    0% { transform: scale(0); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.success-box h1 {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    margin-bottom: 16px;
}

.success-box p {
    color: var(--color-text-light);
    font-size: var(--font-size-lg);
    margin-bottom: 30px;
}

/* ==========================================
   RESPONSIVIDADE
   ========================================== */

@media (max-width: 768px) {
    .dashboard-welcome h1 {
        font-size: var(--font-size-2xl);
    }
    
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        max-width: 100%;
    }
    
    .selection-card {
        padding: 14px;
        min-height: 200px;
    }
    
    .selection-card .selection-icon {
        width: 44px;
        height: 44px;
        font-size: 20px;
        margin-bottom: 10px;
    }
    
    .selection-card .selection-title {
        font-size: var(--font-size-sm);
        margin-bottom: 4px;
    }
    
    .selection-card .selection-desc {
        font-size: 11px;
        margin-bottom: 10px;
        line-height: 1.3;
    }
    
    .selection-card .selection-progress,
    .selection-card .selection-status {
        margin-bottom: 10px;
    }
    
    .selection-card .progress-bar {
        height: 6px;
        margin-bottom: 4px;
    }
    
    .selection-card .progress-text {
        font-size: 10px;
    }
    
    .selection-card .selection-status {
        padding: 4px 10px;
        font-size: 10px;
    }
    
    .selection-card .btn {
        padding: 8px 12px;
        font-size: var(--font-size-xs);
    }
    
    .selecao-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .gallery-grid {
        gap: 8px;
        padding-bottom: 180px;
    }
    
    .gallery-item {
        width: calc((100% - 8px) / 2);
    }
    
    .gallery-item.horizontal {
        width: 100%;
    }
    
    .action-bar {
        padding: 12px 16px;
    }
    
    .action-bar-content {
        flex-direction: column;
        gap: 12px;
    }
    
    .action-bar-info {
        width: 100%;
        justify-content: center;
    }
    
    .progress-bar-container {
        max-width: 100%;
        width: 100%;
    }
    
    .action-bar-buttons {
        width: 100%;
        justify-content: stretch;
    }
    
    .action-bar-buttons .btn-clear,
    .action-bar-buttons .btn-confirm,
    .action-bar-buttons .btn-preview,
    .action-bar-buttons .btn-download {
        flex: 1;
    }
    
    .preview-modal-content {
        max-width: 95vw;
        max-height: 95vh;
        margin: 2.5vh auto;
    }
    
    .preview-modal-header,
    .preview-modal-body,
    .preview-modal-footer {
        padding: 20px;
    }
    
    .preview-folder-grid {
        gap: 8px;
    }
    
    .preview-item {
        width: calc((100% - 8px) / 2);
    }
    
    .preview-item.horizontal {
        width: 100%;
    }
    
    .preview-folder-section {
        margin-bottom: 30px;
    }
    
    .preview-folder-header {
        margin-bottom: 16px;
        padding-bottom: 12px;
    }
    
    .preview-folder-title {
        font-size: var(--font-size-lg);
    }
    
    .preview-modal-footer {
        flex-direction: column;
    }
    
    .preview-modal-footer .btn-clear,
    .preview-modal-footer .btn-confirm {
        width: 100%;
    }
    
    .selection-count .current {
        font-size: 1.5rem;
    }
    
    .lightbox-nav {
        width: 44px;
        height: 44px;
        font-size: 22px;
    }
    
    .lightbox-prev {
        left: 10px;
    }
    
    .lightbox-next {
        right: 10px;
    }
}

@media (max-width: 480px) {
    .acesso-card {
        padding: 30px 24px;
    }
    
    .gallery-grid {
        gap: 6px;
    }
    
    .gallery-item {
        width: calc((100% - 6px) / 2);
    }
    
    .gallery-item.horizontal {
        width: 100%;
    }
    
    .gallery-item {
        border-radius: var(--radius-sm);
    }
    
    .preview-folder-grid {
        gap: 6px;
    }
    
    .preview-item {
        width: calc((100% - 6px) / 2);
        border-radius: var(--radius-sm);
    }
    
    .preview-item.horizontal {
        width: 100%;
    }
    
    .preview-item-number {
        width: 28px;
        height: 28px;
        font-size: var(--font-size-sm);
        top: 8px;
        left: 8px;
    }
}

/* ==========================================
   BOXES (Área do Cliente - Dashboard)
   ========================================== */
.boxes-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1000px;
    width: 100%;
}

.box {
    position: relative;
    border-radius: var(--radius-xl);
    aspect-ratio: 4/5;
    min-height: 280px;
    overflow: hidden;
    cursor: pointer;
    background: linear-gradient(145deg, var(--color-secondary), #2A2A4E);
    box-shadow: var(--shadow-xl);
    transition: var(--transition-normal);
    text-decoration: none;
    display: block;
}

.box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(26, 26, 46, 0.85) 100%);
    z-index: 1;
    pointer-events: none;
}

.box-label {
    position: absolute;
    bottom: 25px;
    left: 25px;
    color: white;
    font-size: 1.6rem;
    font-weight: 700;
    z-index: 2;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.box:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 0 40px rgba(196, 30, 58, 0.15), var(--shadow-xl);
}

.box:hover img {
    transform: scale(1.1);
}


@media (max-width: 768px) {
    .maisbook-user-info {
        display: none; /* Ocultar informações do plano em telas pequenas */
    }
    
    .boxes-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .box {
        min-height: 240px;
    }
    
    .box-label {
        font-size: 1.3rem;
    }
}

/* ==========================================
   PLANO LINK - GALERIA DE DOWNLOADS
   ========================================== */

/* Item da galeria baixado */
.gallery-item.downloaded {
    border: 3px solid var(--color-success);
}

.gallery-item.downloaded .gallery-item-check {
    background: var(--color-success);
}

/* Item com limite atingido */
.gallery-item.limit-reached {
    opacity: 0.5;
    cursor: not-allowed;
}

.gallery-item.limit-reached:hover {
    transform: none;
}

.gallery-item.limit-reached:hover img {
    transform: none;
}

.gallery-item-limit-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    z-index: 5;
    border-radius: var(--radius-lg);
}

/* Spinner de download */
.spinner-download {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

