/**
 * Maisbook V8.2 - 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
   ========================================== */

.maisbook-page,
.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 {
    color: var(--color-text);
}

.maisbook-page input,
.maisbook-page textarea,
.maisbook-page select {
    color: var(--color-text);
}

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

.maisbook-header {
    background: rgba(14, 14, 22, 0.75);
    backdrop-filter: blur(24px) saturate(1.2);
    -webkit-backdrop-filter: blur(24px) saturate(1.2);
    height: 72px;
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    transition: background var(--transition-normal);
}

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

.maisbook-logo {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--color-primary);
    text-decoration: none;
    letter-spacing: -0.5px;
    transition: all var(--transition-normal);
    background: none;
    -webkit-background-clip: initial;
    -webkit-text-fill-color: currentColor;
    background-clip: initial;
}

.maisbook-logo:hover {
    opacity: 0.85;
    transform: scale(1.03);
}

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

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

.maisbook-user-plano {
    font-size: 0.72rem;
    color: var(--color-text-muted);
    font-weight: 500;
    letter-spacing: 0.01em;
}

.maisbook-user-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, rgba(240, 134, 58, 0.2), rgba(240, 134, 58, 0.05));
    border: 1px solid rgba(240, 134, 58, 0.2);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary-light);
    font-weight: 700;
    font-size: var(--font-size-sm);
    transition: all var(--transition-normal);
}

.maisbook-logout-btn {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all var(--transition-normal);
    padding: 0;
    margin-left: 4px;
}

.maisbook-logout-btn:hover {
    background: rgba(248, 113, 113, 0.08);
    border-color: rgba(248, 113, 113, 0.15);
    color: var(--color-error);
    transform: translateY(-1px);
}

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

.maisbook-main {
    flex: 1;
    padding: 50px 0 80px 0;
    animation: fadeIn 0.5s ease;
}

.selecao-page .maisbook-main {
    padding-bottom: 140px;
}

.maisbook-footer {
    background: rgba(14, 14, 22, 0.5);
    backdrop-filter: blur(12px);
    padding: 18px 0;
    text-align: center;
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    border-top: 1px solid var(--color-border);
    letter-spacing: 0.02em;
}

/* ==========================================
   PÁGINA DE ACESSO (LOGIN) — SPLIT LAYOUT (dark + orange)
   ========================================== */

body.acesso-page {
    font-family: var(--font-family, 'Outfit', sans-serif);
    background: var(--color-bg);
    color: var(--color-text);
    min-height: 100vh;
    display: flex;
    margin: 0;
    -webkit-font-smoothing: antialiased;
}

.acesso-split {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* --- Esquerda: formulário (glass card) --- */

.acesso-left {
    flex: 1 1 45%;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 56px;
    background:
        radial-gradient(1200px 600px at -10% -20%, rgba(240, 134, 58, 0.10), transparent 60%),
        radial-gradient(900px 500px at 110% 120%, rgba(240, 134, 58, 0.07), transparent 60%),
        var(--color-bg);
}

.acesso-logo {
    position: absolute;
    top: 28px;
    left: 40px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--color-text);
    font-weight: 700;
    letter-spacing: -0.2px;
    font-size: 1.05rem;
}

.acesso-logo-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: var(--shadow-glow-sm);
}

.acesso-footer {
    position: absolute;
    bottom: 22px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: .78rem;
    color: var(--color-text-muted);
    letter-spacing: .2px;
}

.acesso-form-area {
    width: 100%;
    max-width: 400px;
    padding: 36px 32px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.acesso-title {
    font-size: clamp(1.7rem, 2.4vw, 2.1rem);
    font-weight: 800;
    color: var(--color-text);
    letter-spacing: -0.8px;
    margin: 0 0 8px;
}

.acesso-subtitle {
    font-size: .92rem;
    color: var(--color-text-muted);
    margin: 0 0 28px;
    line-height: 1.5;
}

.acesso-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    margin: 0 0 20px;
    background: rgba(248, 113, 113, 0.10);
    border: 1px solid rgba(248, 113, 113, 0.35);
    border-radius: var(--radius-sm);
    color: #FCA5A5;
    font-size: .85rem;
    text-align: left;
    line-height: 1.4;
}

.acesso-alert svg {
    flex-shrink: 0;
    margin-top: 1px;
    color: var(--color-error);
}

.field-label {
    display: block;
    font-size: .78rem;
    font-weight: 600;
    color: var(--color-text-light);
    margin-bottom: 8px;
    text-align: left;
    letter-spacing: .3px;
    text-transform: uppercase;
}

.input-row {
    position: relative;
}

.input-row svg.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-muted);
    pointer-events: none;
    transition: color var(--transition-fast);
}

.input-row:focus-within svg.input-icon {
    color: var(--color-primary);
}

.acesso-input.form-input {
    width: 100%;
    padding: 14px 16px 14px 44px;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    text-align: center;
    color: var(--color-text);
    background: rgba(255, 255, 255, 0.04);
    border: 1.5px solid var(--color-border-strong);
    border-radius: var(--radius-sm);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

.acesso-input.form-input:hover {
    border-color: rgba(255, 255, 255, 0.22);
}

.acesso-input.form-input:focus,
.acesso-input.form-input:focus-visible {
    outline: none;
    border-color: var(--color-primary);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 0 4px rgba(240, 134, 58, 0.18);
}

.acesso-input.form-input::placeholder {
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: none;
    color: var(--color-text-muted);
    font-size: .9rem;
    opacity: .7;
}

.acesso-input.shake {
    animation: shake .55s cubic-bezier(.36,.07,.19,.97) both;
    border-color: var(--color-error) !important;
}

/* 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-btn {
    margin-top: 22px;
    width: 100%;
    padding: 14px 20px;
    font-size: .95rem;
    font-weight: 700;
    letter-spacing: .3px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: #fff;
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow-glow-sm);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), filter var(--transition-fast);
}

.acesso-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-glow);
    filter: brightness(1.04);
}

.acesso-btn:active {
    transform: translateY(0) scale(.99);
}

.acesso-btn svg {
    transition: transform var(--transition-normal);
}

.acesso-btn:hover svg {
    transform: translateX(3px);
}

.acesso-hint {
    margin: 22px 0 0;
    font-size: .78rem;
    color: var(--color-text-muted);
    text-align: center;
}

/* --- Direita: painel decorativo --- */

.acesso-right {
    flex: 0 0 55%;
    background: linear-gradient(160deg, var(--color-primary-light), var(--color-primary) 45%, var(--color-primary-dark) 85%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 48px;
}

.acesso-right::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(600px 400px at 20% 20%, rgba(255, 255, 255, 0.18), transparent 60%),
        radial-gradient(500px 380px at 80% 80%, rgba(0, 0, 0, 0.18), transparent 65%);
    pointer-events: none;
}

.float-icons {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

.float-icon {
    position: absolute;
    color: rgba(255, 255, 255, .18);
    animation: bobble 6s ease-in-out infinite;
}

.float-icon:nth-child(1) { top: 8%; left: 12%; animation-delay: 0s; }
.float-icon:nth-child(2) { top: 15%; right: 15%; animation-delay: 1.2s; }
.float-icon:nth-child(3) { top: 45%; left: 8%; animation-delay: 2.4s; }
.float-icon:nth-child(4) { top: 38%; right: 10%; animation-delay: .6s; }
.float-icon:nth-child(5) { bottom: 25%; left: 18%; animation-delay: 1.8s; }
.float-icon:nth-child(6) { bottom: 12%; right: 20%; animation-delay: 3s; }
.float-icon:nth-child(7) { top: 70%; right: 35%; animation-delay: .3s; }
.float-icon:nth-child(8) { top: 22%; left: 40%; animation-delay: 2s; }

@keyframes bobble {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.right-illustration {
    position: relative;
    z-index: 2;
    text-align: center;
}

.illust-monitor {
    width: 300px;
    height: 210px;
    background: #14141E;
    border-radius: 18px;
    position: relative;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 30px 70px rgba(0, 0, 0, .35);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.illust-monitor::after {
    content: '';
    position: absolute;
    bottom: -22px;
    left: 50%;
    transform: translateX(-50%);
    width: 90px;
    height: 22px;
    background: #14141E;
    border-radius: 0 0 10px 10px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-top: none;
}

.illust-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 20px;
    width: 100%;
}

.illust-photo {
    aspect-ratio: 1;
    border-radius: 6px;
    opacity: .9;
}

.illust-photo:nth-child(1) { background: var(--color-primary); }
.illust-photo:nth-child(2) { background: var(--color-primary-light); }
.illust-photo:nth-child(3) { background: var(--color-primary-dark); }
.illust-photo:nth-child(4) { background: #E8975A; }
.illust-photo:nth-child(5) { background: rgba(255, 255, 255, .35); }
.illust-photo:nth-child(6) { background: var(--color-primary); }

.illust-check {
    position: absolute;
    bottom: -12px;
    right: -18px;
    width: 52px;
    height: 52px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
}

.illust-check svg {
    color: var(--color-primary);
}

.right-text {
    margin-top: 48px;
    position: relative;
    z-index: 2;
}

.right-text h2 {
    font-size: 1.6rem;
    font-weight: 800;
    color: #fff;
    margin: 0 0 8px;
    letter-spacing: -0.4px;
}

.right-text p {
    font-size: .95rem;
    color: rgba(255, 255, 255, .88);
    line-height: 1.55;
    max-width: 320px;
    margin: 0 auto;
}

@keyframes shake {
    10%, 90% { transform: translateX(-1px); }
    20%, 80% { transform: translateX(2px); }
    30%, 50%, 70% { transform: translateX(-5px); }
    40%, 60% { transform: translateX(5px); }
}

/* --- Responsivo: acesso --- */

@media (max-width: 980px) {
    .acesso-split {
        flex-direction: column;
    }
    .acesso-left {
        order: 2;
        flex: 1 1 auto;
        padding: 56px 28px 72px;
    }
    .acesso-right {
        order: 1;
        flex: 0 0 auto;
        min-height: 280px;
        padding: 64px 24px 40px;
    }
    .acesso-logo { position: static; margin-bottom: 20px; }
    .acesso-footer { position: static; margin-top: 32px; }
    .right-text { margin-top: 36px; }
}

@media (max-width: 560px) {
    .acesso-left { padding: 40px 18px 56px; }
    .acesso-form-area { padding: 28px 20px; }
    .acesso-right { min-height: 220px; padding: 48px 18px 32px; }
    .illust-monitor { width: 220px; height: 150px; }
    .illust-grid { padding: 14px; gap: 6px; }
    .illust-check { width: 40px; height: 40px; bottom: -8px; right: -12px; }
    .illust-check svg { width: 18px; height: 18px; }
    .right-text h2 { font-size: 1.25rem; }
    .right-text p { font-size: .86rem; }
    .acesso-title { font-size: 1.55rem; }
    .acesso-input.form-input { letter-spacing: 2px; font-size: .95rem; }
}

/* Suporte a tema claro (se o toggle global estiver ativo em .maisbook-light) */
.maisbook-light body.acesso-page,
body.acesso-page.maisbook-light {
    background: var(--color-bg);
    color: var(--color-text);
}

.maisbook-light .acesso-input.form-input {
    background: #fff;
    border-color: var(--color-border-strong);
    color: var(--color-text);
}

.maisbook-light .acesso-input.form-input:focus {
    background: #fff;
}

.maisbook-page .gradient-text {
    background: linear-gradient(135deg, var(--color-primary-light), var(--color-primary), #f0a050);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

.maisbook-header.scrolled {
    background: rgba(10, 10, 16, 0.92);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

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

.dashboard-welcome {
    text-align: left;
    margin-bottom: 48px;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 0.6s ease;
}

.dashboard-welcome h1 {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: -1.5px;
    line-height: 1.1;
}

.dashboard-welcome p {
    color: var(--color-text-muted);
    font-size: 1.05rem;
    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: 60px 20px;
    color: var(--color-text-muted);
    background: var(--color-bg-card);
    border-radius: var(--radius-xl);
    border: 1px solid var(--color-border);
}

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

.dashboard-section {
    margin-bottom: 48px;
    animation: fadeInUp 0.6s ease 0.15s both;
}

.dashboard-section h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text-muted);
    margin-bottom: 24px;
    padding-bottom: 0;
    border-bottom: none;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

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

.box-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    padding: 5px 12px;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 700;
    z-index: 3;
    color: #fff;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    backdrop-filter: blur(8px);
}

.box-badge-success {
    background: rgba(52, 211, 153, 0.85);
    box-shadow: 0 2px 12px rgba(52, 211, 153, 0.3);
}

.box-badge-warning {
    background: rgba(251, 191, 36, 0.9);
    color: #1A1A2E;
    font-weight: 700;
    box-shadow: 0 2px 12px rgba(251, 191, 36, 0.3);
}

.dashboard-alert {
    background: rgba(251, 191, 36, 0.06);
    border-radius: var(--radius-xl);
    padding: 48px 40px;
    text-align: center;
    border: 1px solid rgba(251, 191, 36, 0.15);
    animation: fadeInUp 0.6s ease 0.2s both;
}

/* Com classes .alert do design system: manter layout em coluna centrado */
.dashboard-alert.alert {
    display: block;
    align-items: stretch;
}

.dashboard-alert-icon {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, var(--color-warning), #D97706);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    box-shadow: 0 8px 24px rgba(251, 191, 36, 0.2);
    animation: float 4s ease-in-out infinite;
}

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

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

.dashboard-alert p {
    margin: 0 auto;
    color: var(--color-text-muted);
    font-size: 1rem;
    max-width: 460px;
    line-height: 1.7;
}

.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(208, 106, 26, 0.16), rgba(208, 106, 26, 0.06));
    border: 1px solid rgba(208, 106, 26, 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(208, 106, 26, 0.18), rgba(240, 134, 58, 0.08));
    border-color: rgba(208, 106, 26, 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: 14px 20px;
    background: rgba(251, 191, 36, 0.06);
    border: 1px solid rgba(251, 191, 36, 0.15);
    border-radius: var(--radius-md);
    display: inline-block;
}

.selecao-alert p {
    margin: 0;
    color: var(--color-warning);
    font-weight: 600;
    font-size: 0.9rem;
    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: 80px 20px;
    background: var(--color-bg-card);
    border-radius: var(--radius-xl);
    border: 1px solid var(--color-border);
    animation: fadeInUp 0.6s ease;
}

.galeria-empty-icon {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, var(--color-warning), #D97706);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    box-shadow: 0 8px 24px rgba(251, 191, 36, 0.2);
    animation: float 4s ease-in-out infinite;
}

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

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

.galeria-empty p {
    margin: 0;
    color: var(--color-text-muted);
    font-size: 1rem;
    max-width: 400px;
    margin: 0 auto;
    line-height: 1.7;
}

.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: 6px;
    padding: 10px 20px;
    background: rgba(240, 134, 58, 0.08);
    border: 1px solid rgba(240, 134, 58, 0.15);
    border-radius: var(--radius-full);
    font-weight: 600;
}

.selecao-counter .count {
    font-size: var(--font-size-lg);
    color: var(--color-primary-light);
    font-weight: 800;
}

.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: 80px 20px;
    animation: fadeIn 0.4s ease;
}

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

.maisbook-page .gallery-loading p {
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
}

.gallery-skeleton {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    padding: 20px;
}

.skeleton-item {
    aspect-ratio: 1;
    border-radius: 12px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* 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: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

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

.gallery-folder-title svg {
    color: var(--color-primary);
    opacity: 0.7;
}

.gallery-folder-count {
    font-size: var(--font-size-sm);
    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: 14px;
    overflow: hidden;
    cursor: pointer;
    background: var(--color-bg-card);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px 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;
    pointer-events: none;
    -webkit-touch-callout: none;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    transform: scale(1.02);
}

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

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3), 0 0 20px rgba(240, 134, 58, 0.06);
    border-color: rgba(240, 134, 58, 0.25);
    z-index: 10;
}

.gallery-item:hover img {
    transform: scale(1.06);
}

.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 3px rgba(240, 134, 58, 0.3), 0 14px 36px rgba(0, 0, 0, 0.2);
    border-color: rgba(240, 134, 58, 0.5);
}

.gallery-item-check {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 30px;
    height: 30px;
    background: var(--color-success);
    border: 2px solid white;
    color: white;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(52, 211, 153, 0.4);
    animation: scaleIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.gallery-item-check svg {
    width: 16px;
    height: 16px;
    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: 38px;
    height: 38px;
    background: rgba(10, 10, 16, 0.6);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    transition: all var(--transition-normal);
    color: #ffffff;
}

.gallery-item-fullscreen:hover,
.gallery-item-download:hover {
    background: rgba(240, 134, 58, 0.8);
    border-color: rgba(240, 134, 58, 0.6);
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(240, 134, 58, 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: 25px;
    left: 16px;
    right: 16px;
    background: rgba(20, 20, 30, 0.85);
    backdrop-filter: blur(24px) saturate(1.3);
    -webkit-backdrop-filter: blur(24px) saturate(1.3);
    padding: 16px 28px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255,255,255,0.06);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-xl);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    transform: translateY(120%);
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 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: 1.8rem;
    font-weight: 800;
    color: var(--color-primary-light);
    line-height: 1;
}

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

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

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

/* Barra de progresso */
.progress-bar-container {
    flex: 1;
    max-width: 180px;
    height: 6px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary-dark), var(--color-primary));
    border-radius: 3px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-bar.full {
    background: linear-gradient(90deg, #059669, var(--color-success));
}

.progress-bar.over {
    background: linear-gradient(90deg, #DC2626, var(--color-error));
}

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

.btn-clear {
    padding: 11px 22px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--color-text-light);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    font-family: inherit;
}

.btn-clear:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
}

.btn-confirm {
    padding: 11px 28px;
    background: linear-gradient(135deg, var(--color-cta) 0%, var(--color-cta-dark) 100%);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    font-family: inherit;
    box-shadow: 0 6px 20px rgba(240, 134, 58, 0.25);
}

.btn-confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(240, 134, 58, 0.35);
}

.btn-preview {
    padding: 11px 28px;
    background: rgba(240, 134, 58, 0.12);
    color: var(--color-primary-light);
    border: 1px solid rgba(240, 134, 58, 0.2);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    font-family: inherit;
}

.btn-preview:hover {
    background: rgba(240, 134, 58, 0.18);
    border-color: rgba(240, 134, 58, 0.3);
    transform: translateY(-2px);
}

.btn-download {
    padding: 11px 28px;
    background: linear-gradient(135deg, var(--color-success) 0%, #059669 100%);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    font-family: inherit;
    box-shadow: 0 6px 20px rgba(52, 211, 153, 0.25);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(52, 211, 153, 0.35);
}

.btn-download:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    filter: saturate(0.6);
}

/* Botão Voltar */
.btn-voltar {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--color-text-light);
    text-decoration: none;
    font-weight: 600;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    transition: all var(--transition-normal);
    border: 1px solid rgba(255, 255, 255, 0.08);
    cursor: pointer;
    font-family: inherit;
}

.btn-voltar:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
    color: var(--color-text);
    text-decoration: none;
    transform: translateX(-3px);
}

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

.btn-voltar-modal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    background: linear-gradient(135deg, var(--color-bg-soft) 0%, var(--color-secondary-light) 100%);
    color: var(--color-text);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
    min-width: 40px;
    font-family: inherit;
}

.btn-voltar-modal svg {
    width: 16px;
    height: 16px;
}

.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;
    inset: 0;
    background: rgba(0, 0, 0, 0.96);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

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

.lightbox.active .lightbox-image {
    animation: scaleIn 0.4s ease;
}

.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;
    -moz-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: 12px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}

.lightbox-close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    color: white;
    font-size: 22px;
    cursor: pointer;
    transition: all var(--transition-normal);
    z-index: 10;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: rotate(90deg);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-full);
    color: white;
    font-size: 24px;
    cursor: pointer;
    transition: all var(--transition-normal);
    z-index: 10;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-50%) scale(1.08);
}

.lightbox-prev {
    left: 24px;
}

.lightbox-next {
    right: 24px;
}

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

.lightbox-select {
    padding: 14px 36px;
    background: var(--color-cta);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: 0 8px 24px rgba(240, 134, 58, 0.3);
    font-family: var(--font-family);
    font-size: var(--font-size-sm);
}

.lightbox-select:hover {
    background: var(--color-cta-dark);
    transform: scale(1.05);
    box-shadow: 0 12px 32px rgba(240, 134, 58, 0.4);
}

.lightbox-select.selected {
    background: var(--color-success);
    box-shadow: 0 8px 24px rgba(52, 211, 153, 0.3);
}

/* ==========================================
   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;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(8px);
}

.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 30px 80px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 1;
    border: 1px solid rgba(255, 255, 255, 0.06);
    animation: scaleIn 0.4s ease;
}

.preview-modal-header {
    padding: 24px 32px;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(30, 30, 44, 0.5);
}

.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(208, 106, 26, 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(208, 106, 26, 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: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.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(208, 106, 26, 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: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background: rgba(30, 30, 44, 0.5);
}

.preview-modal-footer .btn-clear,
.preview-modal-footer .btn-confirm {
    min-width: 120px;
    padding: 10px 16px;
    font-size: 0.9rem;
}

/* ==========================================
   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: 2px solid transparent;
    outline-offset: 2px;
    border-color: var(--color-warning);
}

#comentarios-album:focus-visible {
    outline-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 .btn-clear,
    .preview-modal-footer .btn-confirm {
        width: auto;
        min-width: 110px;
    }
    
    .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) {
    .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: 20px;
    max-width: 1000px;
    width: 100%;
}

.box {
    position: relative;
    border-radius: var(--radius-xl);
    aspect-ratio: 3/4;
    min-height: 300px;
    overflow: hidden;
    cursor: pointer;
    background: var(--color-bg-card);
    box-shadow: var(--shadow-lg);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: block;
    border: 1px solid rgba(255, 255, 255, 0.04);
    animation: fadeInUp 0.6s ease both;
}

/* Com .card do design system: sem padding do card, mantém hover do dashboard */
.box.card {
    padding: 0;
}

@media (hover: hover) {
    .maisbook-page a.box.card:hover {
        transform: translateY(-8px);
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(240, 134, 58, 0.08);
    }
}

.box:nth-child(1) { animation-delay: 0.1s; }
.box:nth-child(2) { animation-delay: 0.18s; }
.box:nth-child(3) { animation-delay: 0.26s; }
.box:nth-child(4) { animation-delay: 0.34s; }
.box:nth-child(5) { animation-delay: 0.42s; }
.box:nth-child(6) { animation-delay: 0.5s; }

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

.box::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, 
        transparent 30%, 
        rgba(10, 10, 16, 0.4) 60%, 
        rgba(10, 10, 16, 0.92) 100%);
    z-index: 1;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.box::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-xl);
    border: 1px solid transparent;
    z-index: 3;
    pointer-events: none;
    transition: border-color 0.5s ease;
}

.box-label {
    position: absolute;
    bottom: 24px;
    left: 24px;
    right: 24px;
    color: white;
    font-size: 1.4rem;
    font-weight: 700;
    z-index: 2;
    letter-spacing: -0.3px;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (hover: hover) {
    .box:hover {
        transform: translateY(-8px);
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(240, 134, 58, 0.08);
    }

    .box:hover img {
        transform: scale(1.08);
        filter: brightness(0.95);
    }

    .box:hover::after {
        border-color: rgba(240, 134, 58, 0.15);
    }

    .box:hover .box-label {
        transform: translateY(-4px);
    }
}

@media (max-width: 768px) {
    .maisbook-user-info {
        display: none;
    }
    
    .boxes-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }
    
    .box {
        min-height: 200px;
        aspect-ratio: 3/4;
    }
    
    .box-label {
        font-size: 1.1rem;
        bottom: 18px;
        left: 18px;
        right: 18px;
    }
}

@media (max-width: 480px) {
    .boxes-container {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    
    .box {
        aspect-ratio: 16/10;
        min-height: 180px;
    }
}

/* ==========================================
   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); }
}

/* ==========================================
   CONTROLE INDIVIDUAL - CARDS DE PASTAS
   ========================================== */

.pastas-container {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 18px;
}

.box.card.pasta-card {
    aspect-ratio: auto;
    min-height: 150px;
    padding: 0;
    display: block;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.pasta-card-inner {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 22px 22px;
    height: 100%;
    color: var(--color-text, #fff);
}

.pasta-card-icon {
    flex: 0 0 auto;
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(240, 134, 58, 0.14);
    color: var(--color-primary, #F0863A);
    transition: transform .2s ease, background .2s ease;
}

.box.card.pasta-card:hover .pasta-card-icon {
    transform: scale(1.05);
    background: rgba(240, 134, 58, 0.22);
}

.pasta-card-body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pasta-card-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: inherit;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pasta-card-badge {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .2px;
    line-height: 1;
}

.pasta-card-badge.badge-livre {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.35);
}

.pasta-card-badge.badge-link {
    background: rgba(240, 134, 58, 0.15);
    color: var(--color-primary, #F0863A);
    border: 1px solid rgba(240, 134, 58, 0.35);
}

.pasta-card-badge.badge-full {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.35);
}

.pasta-breadcrumb {
    margin-top: 4px;
}

.pasta-breadcrumb-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .9rem;
    color: var(--color-text-muted, rgba(255, 255, 255, 0.65));
    text-decoration: none;
    transition: color .15s ease;
}

.pasta-breadcrumb-link:hover {
    color: var(--color-primary, #F0863A);
}

@media (max-width: 640px) {
    .pastas-container {
        grid-template-columns: 1fr;
    }
    .pasta-card-inner {
        padding: 18px;
    }
}

