/* 
   MERITUS AGENCY FLOW - ESTÚDIO IA v1.0
   Design: Glassmorphism / Dark Mode Premium
*/

:root {
    --bg-dark: #060910;
    --sidebar-bg: #0b0f1a;
    --card-bg: rgba(20, 25, 40, 0.6);
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --accent-orange: #ff6b1a;
    --accent-orange-bright: #ff8c42;
    --accent-red: #ef4444;
    --accent-purple: #8b5cf6;
    --accent-blue: #3b82f6;
    --accent-green: #10b981;
    --glass-border: rgba(255, 255, 255, 0.08);
    --meritus-gradient: linear-gradient(135deg, #ff6b1a, #ff9d00);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

html,
body {
    overflow-x: hidden !important;
    position: relative;
    max-width: 100vw;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    transition: background 0.3s;
}

.app-container {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    padding: 1.5rem 0;
    flex-shrink: 0;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: visible;
}

.sidebar.collapsed {
    width: 80px;
}

.sidebar.collapsed .logo {
    justify-content: center;
}

.sidebar.collapsed .logo span,
.sidebar.collapsed .app-insignia,
.sidebar.collapsed .brand-slogan {
    display: none !important;
}

.sidebar.collapsed .nav-item a {
    justify-content: center;
    padding: 1rem 0;
}

.sidebar.collapsed .nav-item a span {
    display: none !important;
}

.sidebar.collapsed .nav-item a i {
    margin: 0;
    font-size: 1.2rem;
}

.sidebar.collapsed .sidebar-header {
    justify-content: center;
    padding: 0;
}

.sidebar.collapsed .user-info,
.sidebar.collapsed .credits-info,
.sidebar.collapsed .btn-logout {
    display: none !important;
}

/* AUTH OVERLAY */
.auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at center, #1a1f2e, #060910);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
}

.image-action-btn {
    background: rgba(15, 20, 35, 0.95) !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    color: #fff !important;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
}

.image-action-btn i {
    font-size: 0.95rem;
    color: #fff !important;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
    pointer-events: none;
}

.image-action-btn:hover {
    background: var(--accent-orange) !important;
    border-color: var(--accent-orange-bright) !important;
    transform: scale(1.15) translateY(-2px);
}

.image-action-btn:hover i {
    color: #000 !important;
    text-shadow: none;
}

/* Container de ações para as imagens */
.image-actions-dock {
    position: absolute;
    top: 10px;
    left: 10px;
    display: none;
    gap: 6px;
    z-index: 100;
    pointer-events: all;
}

.image-slot:hover .image-actions-dock {
    display: flex;
}

.btn-download-single:hover,
.btn-open-external:hover,
.btn-open-modal:hover {
    background: var(--accent-orange);
    transform: scale(1.1);
    border-color: transparent;
}

.auth-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    padding: 2.5rem;
    border-radius: 20px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    animation: fadeInScale 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* GENERATION MODE SELECTOR */
.mode-options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.mode-card {
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.2rem;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.mode-card:hover {
    border-color: rgba(255, 107, 26, 0.4);
    transform: translateY(-2px);
}

.mode-card.active {
    border-color: var(--accent-orange);
    background: rgba(255, 107, 26, 0.05);
    box-shadow: 0 0 20px rgba(255, 107, 26, 0.15);
}

.mode-icon {
    font-size: 1.8rem;
}

.mode-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.mode-info strong {
    font-size: 1.05rem;
    color: var(--text-main);
    margin-bottom: 2px;
}

.mode-info span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.mode-check {
    opacity: 0;
    color: var(--accent-orange);
    font-size: 1.2rem;
    transition: 0.2s;
}

.mode-card.active .mode-check {
    opacity: 1;
}

.mode-badge {
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.mode-badge.high-volume {
    background: rgba(0, 122, 255, 0.15);
    color: #4da3ff;
    border: 1px solid rgba(0, 122, 255, 0.3);
}

.mode-badge.low-volume {
    background: rgba(52, 199, 89, 0.15);
    color: #4cd964;
    border: 1px solid rgba(52, 199, 89, 0.3);
}



.btn-logout {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--accent-red);
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 10px;
    width: 100%;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.8rem;
}

.btn-logout:hover {
    background: var(--accent-red);
    color: white;
}

.sidebar.collapsed .user-profile {
    justify-content: center;
    padding: 10px 0;
    flex-direction: column;
    align-items: center;
}

.sidebar.collapsed .user-profile img {
    margin: 0;
    width: 45px;
    height: 45px;
    border-radius: 12px;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    min-height: 70px;
    position: relative;
    margin-bottom: 2rem;
}

#toggleSidebar,
.btn-icon-toggle {
    position: absolute;
    right: -14px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    background: var(--accent-purple);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    border: none;
    color: white;
    transition: 0.3s;
}

.btn-icon-toggle:hover,
#toggleSidebar:hover {
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 0 15px var(--accent-purple);
}

.sidebar.collapsed .btn-icon-toggle,
.sidebar.collapsed #toggleSidebar {
    right: -14px;
    top: 50%;
    transform: translateY(-50%) rotate(180deg);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: inherit;
    text-decoration: none;
}

.logo-icon {
    width: 34px;
    height: 34px;
    background: url('logo-meritus.png') no-repeat center center / contain;
    border-radius: 8px;
}

.logo span {
    font-size: 1.3rem;
    font-weight: 700;
    display: flex;
    align-items: center;
}

.app-insignia {
    font-size: 0.85rem;
    color: var(--accent-purple);
    margin-left: 6px;
    text-shadow: 0 0 10px rgba(139, 92, 246, 0.6);
}

.brand-slogan {
    font-size: 0.65rem;
    font-weight: 300;
    color: var(--text-muted);
    margin-top: 2px;
    letter-spacing: 0.3px;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.sidebar.collapsed .logo span {
    display: none;
}

nav ul {
    list-style: none;
}

nav ul li a {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1.5rem;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: 0.2s;
}

nav ul li.active a {
    color: var(--accent-orange);
    background: rgba(255, 107, 26, 0.05);
    border-left: 3px solid var(--accent-orange);
}

.sidebar-footer {
    margin-top: auto;
    padding: 1.5rem;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid var(--glass-border);
}

.credits-info {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1.2rem;
    background: rgba(255, 107, 26, 0.08);
    border-radius: 10px;
    border: 1px solid rgba(255, 107, 26, 0.2);
    margin-top: 1rem;
    color: var(--accent-orange-bright);
    font-size: 0.8rem;
    font-weight: 600;
}

.sidebar.collapsed .credits-info span {
    display: none;
}

.user-info .name {
    font-size: 0.75rem;
    font-weight: 600;
    display: block;
}

.user-info .role {
    font-size: 0.65rem;
    color: var(--text-muted);
}

/* Main Area */
.main-content {
    padding-bottom: 140px;
    flex: 1;
    padding: 2rem 2.5rem;
    overflow-y: auto;
}

header {
    margin-bottom: 2rem;
}

header h1 {
    font-size: 1.7rem;
    font-weight: 700;
}

header p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Cards & Components */
.saas-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.saas-card h3 {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

/* Global Assets Grid */
.global-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    align-items: flex-start;
}

.full-width {
    grid-column: span 2;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
}

input[type="file"],
textarea {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 0.8rem;
    border-radius: 10px;
    outline: none;
    transition: 0.2s;
}

textarea {
    resize: vertical;
    min-height: 60px;
    padding: 0.6rem;
}

.label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.btn-ai-refine {
    background: rgba(255, 107, 26, 0.1);
    border: 1px solid rgba(255, 107, 26, 0.2);
    color: var(--accent-orange-bright);
    font-size: 0.7rem;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: 0.2s;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-ai-refine:hover {
    background: var(--meritus-gradient);
    color: white;
    border-color: transparent;
    box-shadow: 0 0 15px rgba(255, 107, 26, 0.3);
}

.btn-ai-refine i {
    font-size: 0.8rem;
}

/* IMAGE PREVIEW STYLES */
.image-preview {
    height: 120px;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border: 2px dashed var(--glass-border);
    background-color: rgba(255, 255, 255, 0.02);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.5rem;
}

.image-preview::after {
    content: 'Nenhuma foto carregada';
    font-size: 0.75rem;
    color: var(--text-muted);
    opacity: 0.5;
}

.image-preview.has-image::after {
    display: none;
}

.style-templates-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
    margin-bottom: 1.5rem;
    overflow-x: auto;
    padding: 10px 5px;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
    -webkit-overflow-scrolling: touch;
}

.style-templates-row::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

.style-pill {
    background: #1a1f2e;
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    padding: 10px 18px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.style-pill:hover {
    background: rgba(255, 107, 26, 0.1);
    color: var(--accent-orange-bright);
    border-color: var(--accent-orange);
    transform: translateY(-2px);
}

.style-pill.active {
    background: #ff6b1a20;
    color: var(--accent-orange);
    border-color: var(--accent-orange);
    box-shadow: 0 0 15px rgba(255, 107, 26, 0.2);
}

.style-pill i {
    font-size: 0.9rem;
}

/* VARIATION CARDS */
.variations-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 2rem 0 1rem;
}

/* FILTERS & BADGES */
.filter-bar {
    display: flex;
    gap: 12px;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
}

.filter-btn.active {
    background: var(--meritus-gradient);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(255, 107, 26, 0.3);
}

.style-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(139, 92, 246, 0.9);
    /* Purple for AI/Art */
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    z-index: 10;
    backdrop-filter: blur(4px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.style-badge.photo {
    background: rgba(59, 130, 246, 0.9);
    /* Blue for Photo */
}

/* ADMIN SLOT COUNTERS */
.counter-pill {
    background: rgba(255, 255, 255, 0.05);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid var(--glass-border);
}

.counter-pill span {
    color: var(--accent-orange);
}

/* INSPIRATIONS GALLERY GRID */
.inspiration-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* 4 Colunas fixas para estabilidade */
    gap: 15px;
    padding-bottom: 2rem;
}

.inspiration-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    flex-direction: column;
}

.inspiration-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-orange);
    box-shadow: 0 10px 30px rgba(255, 107, 26, 0.15);
}

.inspiration-card .img-wrapper {
    width: 100%;
    overflow: hidden;
    position: relative;
    background: #000;
}

.inspiration-card.format-feed .img-wrapper,
.inspiration-card.format-4-3 .img-wrapper {
    aspect-ratio: 1 / 1;
    /* Feed use square base for simplicity or actual ratio */
}

.inspiration-card.format-4-3 .img-wrapper {
    aspect-ratio: 4 / 3;
}

.inspiration-card.format-stories .img-wrapper {
    aspect-ratio: 9 / 16;
}

/* NEW BADGES & INFO */
.origin-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.65rem;
    font-weight: 700;
    z-index: 10;
    backdrop-filter: blur(4px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.badge-ai-pure {
    background: rgba(16, 185, 129, 0.9);
    color: white;
}

/* ADMIN MANAGEMENT LIST */
.admin-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

.admin-item-mini {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 8px;
    position: relative;
    transition: 0.3s;
}

.admin-item-mini:hover {
    border-color: var(--accent-red);
    background: rgba(239, 68, 68, 0.05);
}

.admin-item-mini .thumb {
    width: 100%;
    aspect-ratio: 1/1;
    border-radius: 6px;
    object-fit: cover;
    margin-bottom: 6px;
}

.admin-item-mini .title {
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.admin-item-mini .btn-delete-item {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--accent-red);
    color: white;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: scale(0.8);
    transition: 0.2s;
}

.admin-item-mini:hover .btn-delete-item {
    opacity: 1;
    transform: scale(1);
}

.ratio-info {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 5px;
}

.prompt-box {
    margin: 10px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    font-size: 0.7rem;
    color: var(--text-muted);
    max-height: 60px;
    overflow-y: auto;
    position: relative;
    cursor: pointer;
}

.prompt-box:hover {
    border-color: var(--accent-purple);
    color: var(--text-main);
}

.prompt-box::before {
    content: 'Comando:';
    display: block;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--accent-purple);
}

.inspiration-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

/* Mobile Responsiveness for Grid */
@media (max-width: 1024px) {
    .inspiration-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .inspiration-card.format-feed,
    .inspiration-card.format-stories {
        grid-column: span 1;
    }
}

/* GENERATION MODE SELECTOR */
.mode-options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.mode-card {
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.2rem;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.mode-card:hover {
    border-color: rgba(255, 107, 26, 0.4);
    transform: translateY(-2px);
}

.mode-card.active {
    border-color: var(--accent-orange);
    background: rgba(255, 107, 26, 0.05);
    box-shadow: 0 0 20px rgba(255, 107, 26, 0.15);
}

.mode-icon {
    font-size: 1.8rem;
}

.mode-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.mode-info strong {
    font-size: 1.05rem;
    color: var(--text-main);
    margin-bottom: 2px;
}

.mode-info span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.mode-check {
    opacity: 0;
    color: var(--accent-orange);
    font-size: 1.2rem;
    transition: 0.2s;
}

.mode-card.active .mode-check {
    opacity: 1;
}

.mode-badge {
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.mode-badge.high-volume {
    background: rgba(0, 122, 255, 0.15);
    color: #4da3ff;
    border: 1px solid rgba(0, 122, 255, 0.3);
}

.mode-badge.low-volume {
    background: rgba(52, 199, 89, 0.15);
    color: #4cd964;
    border: 1px solid rgba(52, 199, 89, 0.3);
}



@media (max-width: 600px) {
    .inspiration-grid {
        grid-template-columns: 1fr;
    }
}

/* GENERATION MODE SELECTOR */
.mode-options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.mode-card {
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.2rem;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.mode-card:hover {
    border-color: rgba(255, 107, 26, 0.4);
    transform: translateY(-2px);
}

.mode-card.active {
    border-color: var(--accent-orange);
    background: rgba(255, 107, 26, 0.05);
    box-shadow: 0 0 20px rgba(255, 107, 26, 0.15);
}

.mode-icon {
    font-size: 1.8rem;
}

.mode-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.mode-info strong {
    font-size: 1.05rem;
    color: var(--text-main);
    margin-bottom: 2px;
}

.mode-info span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.mode-check {
    opacity: 0;
    color: var(--accent-orange);
    font-size: 1.2rem;
    transition: 0.2s;
}

.mode-card.active .mode-check {
    opacity: 1;
}

.mode-badge {
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.mode-badge.high-volume {
    background: rgba(0, 122, 255, 0.15);
    color: #4da3ff;
    border: 1px solid rgba(0, 122, 255, 0.3);
}

.mode-badge.low-volume {
    background: rgba(52, 199, 89, 0.15);
    color: #4cd964;
    border: 1px solid rgba(52, 199, 89, 0.3);
}



.inspiration-card:hover img {
    transform: scale(1.05);
}

.card-actions {
    padding: 1.2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
}

.card-actions span {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-main);
}

.btn-download-insp {
    background: var(--meritus-gradient);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: 0.2s;
}

.btn-download-insp:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.variations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
    position: relative;
    z-index: 1;
    padding-bottom: 120px;
}



.variation-card {
    background: linear-gradient(145deg, #1a1f2e, #111521);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    padding: 1rem;
    position: relative;
    z-index: 2;
    pointer-events: all !important;
    animation: fadeIn 0.3s ease-out;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.variation-card:hover {
    border-color: rgba(255, 107, 26, 0.2);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.variation-card h4 {
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding-right: 45px;
    /* Espaço para a lixeira */
}

.variation-card .card-title-group {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--accent-blue);
}

.btn-remove-variation {
    position: absolute;
    top: 14px;
    right: 14px;
    background: rgba(239, 68, 68, 0.2);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.btn-remove-variation:hover {
    background: var(--accent-red);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

/* PILL GROUPS UI */
.pill-group {
    display: flex;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 3px;
    gap: 3px;
    margin-top: 0.5rem;
}

.pill-group .pill {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 0.35rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.72rem;
    font-weight: 600;
    transition: 0.2s;
}

.pill-group .pill.active {
    background: var(--meritus-gradient);
    color: white;
    box-shadow: 0 4px 10px rgba(255, 107, 26, 0.3);
}

.row-pills {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

/* BUTTONS */
.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: 0.2s;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-primary-mega {
    background: var(--meritus-gradient);
    color: white;
    border: none;
    width: fit-content;
    min-width: 280px;
    margin: 1rem auto;
    padding: 0.8rem 2rem;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    box-shadow: 0 10px 30px rgba(255, 107, 26, 0.2);
    transition: 0.3s;
}

.btn-primary-mega:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(255, 107, 26, 0.4);
}

.btn-primary-mega:active {
    transform: translateY(1px);
}

.divider {
    border: 0;
    border-top: 1px solid var(--glass-border);
    margin: 1.5rem 0 1rem;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
}

.results-grid img {
    width: 100%;
    border-radius: 8px;
    object-fit: cover;
    aspect-ratio: 1/1;
    border: 1px solid var(--glass-border);
    transition: 0.3s;
    cursor: pointer;
}

.results-grid img:hover {
    transform: scale(1.05);
    filter: brightness(1.2);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
}

.variation-results {
    animation: fadeIn 0.4s ease-in;
}

/* IMAGE MODAL (LIGHTBOX) */
.image-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(15px);
}

.modal-content-img {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 80vh;
    border-radius: 12px;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.82);
    animation: zoomIn 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid var(--glass-border);
}

#caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: var(--text-main);
    padding: 20px 0;
    font-size: 1rem;
    font-weight: 500;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 40px;
    color: #fff;
    font-size: 40px;
    transition: 0.2s;
    cursor: pointer;
    z-index: 2001;
}

.close-modal:hover {
    color: var(--accent-orange);
    transform: scale(1.1);
}

/* TERMS MODAL SLIM */
.terms-modal {
    display: none;
    position: fixed;
    z-index: 99999 !important;
    /* Over everything */
    inset: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(6, 9, 16, 0.98);
    backdrop-filter: blur(15px);
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.terms-content {
    background: #0f1423;
    border: 1px solid rgba(255, 107, 26, 0.5);
    border-radius: 24px;
    width: 100%;
    max-width: 360px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.9);
    animation: zoomIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.terms-content h2 {
    color: var(--accent-orange);
    margin-bottom: 1rem;
    font-size: 1.25rem;
    font-weight: 800;
}

.terms-content p {
    color: var(--text-main);
    line-height: 1.5;
    margin-bottom: 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

.btn-accept-terms {
    background: var(--meritus-gradient);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    font-size: 1rem;
    transition: all 0.3s;
    margin-top: 1.5rem;
}

/* DROP ZONE STYLES */
.drop-zone {
    width: 100%;
    min-height: 90px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    border: 2px dashed var(--glass-border);
    border-radius: 12px;
    cursor: pointer;
    transition: 0.3s;
    position: relative;
    background: rgba(255, 255, 255, 0.02);
}

.drop-zone--over {
    border-color: var(--accent-orange);
    background: rgba(255, 107, 26, 0.05);
}

.drop-zone-text {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.drop-zone-input {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    top: 0;
    left: 0;
}

.image-preview {
    width: 100%;
    height: 160px;
    margin-top: 10px;
    border-radius: 12px;
    overflow: hidden;
    display: none;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 5;
    position: relative;
    animation: fadeInScale 0.3s ease-out;
    background-color: rgba(0, 0, 0, 0.3);
}

.btn-clear-image {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #ff4444;
    color: white;
    border: none;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: 0.2s;
    font-size: 0.8rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.btn-clear-image:hover {
    background: #cc0000;
    transform: scale(1.1);
}

/* Esconder texto quando a drop-zone tem imagem */
.drop-zone.has-image .drop-zone-text {
    display: none;
}

/* Efeito de hover na drop-zone com imagem */
.drop-zone.has-image:hover {
    border-color: var(--accent-orange);
}

/* GENERATION MODE SELECTOR */
.mode-options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.mode-card {
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.2rem;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.mode-card:hover {
    border-color: rgba(255, 107, 26, 0.4);
    transform: translateY(-2px);
}

.mode-card.active {
    border-color: var(--accent-orange);
    background: rgba(255, 107, 26, 0.05);
    box-shadow: 0 0 20px rgba(255, 107, 26, 0.15);
}

.mode-icon {
    font-size: 1.8rem;
}

.mode-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.mode-info strong {
    font-size: 1.05rem;
    color: var(--text-main);
    margin-bottom: 2px;
}

.mode-info span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.mode-check {
    opacity: 0;
    color: var(--accent-orange);
    font-size: 1.2rem;
    transition: 0.2s;
}

.mode-card.active .mode-check {
    opacity: 1;
}

.mode-badge {
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.mode-badge.high-volume {
    background: rgba(0, 122, 255, 0.15);
    color: #4da3ff;
    border: 1px solid rgba(0, 122, 255, 0.3);
}

.mode-badge.low-volume {
    background: rgba(52, 199, 89, 0.15);
    color: #4cd964;
    border: 1px solid rgba(52, 199, 89, 0.3);
}



@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* GENERATION MODE SELECTOR */
.mode-options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.mode-card {
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.2rem;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.mode-card:hover {
    border-color: rgba(255, 107, 26, 0.4);
    transform: translateY(-2px);
}

.mode-card.active {
    border-color: var(--accent-orange);
    background: rgba(255, 107, 26, 0.05);
    box-shadow: 0 0 20px rgba(255, 107, 26, 0.15);
}

.mode-icon {
    font-size: 1.8rem;
}

.mode-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.mode-info strong {
    font-size: 1.05rem;
    color: var(--text-main);
    margin-bottom: 2px;
}

.mode-info span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.mode-check {
    opacity: 0;
    color: var(--accent-orange);
    font-size: 1.2rem;
    transition: 0.2s;
}

.mode-card.active .mode-check {
    opacity: 1;
}

.mode-badge {
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.mode-badge.high-volume {
    background: rgba(0, 122, 255, 0.15);
    color: #4da3ff;
    border: 1px solid rgba(0, 122, 255, 0.3);
}

.mode-badge.low-volume {
    background: rgba(52, 199, 89, 0.15);
    color: #4cd964;
    border: 1px solid rgba(52, 199, 89, 0.3);
}



.ai-updated {
    animation: glowSuccess 1s ease-out;
}

@keyframes glowSuccess {
    from {
        box-shadow: 0 0 0px var(--accent-orange);
        border-color: var(--accent-orange);
    }

    50% {
        box-shadow: 0 0 20px rgba(255, 107, 26, 0.4);
        border-color: var(--accent-orange);
    }

    to {
        box-shadow: 0 0 0px transparent;
    }
}

/* GENERATION MODE SELECTOR */
.mode-options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.mode-card {
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.2rem;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.mode-card:hover {
    border-color: rgba(255, 107, 26, 0.4);
    transform: translateY(-2px);
}

.mode-card.active {
    border-color: var(--accent-orange);
    background: rgba(255, 107, 26, 0.05);
    box-shadow: 0 0 20px rgba(255, 107, 26, 0.15);
}

.mode-icon {
    font-size: 1.8rem;
}

.mode-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.mode-info strong {
    font-size: 1.05rem;
    color: var(--text-main);
    margin-bottom: 2px;
}

.mode-info span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.mode-check {
    opacity: 0;
    color: var(--accent-orange);
    font-size: 1.2rem;
    transition: 0.2s;
}

.mode-card.active .mode-check {
    opacity: 1;
}

.mode-badge {
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.mode-badge.high-volume {
    background: rgba(0, 122, 255, 0.15);
    color: #4da3ff;
    border: 1px solid rgba(0, 122, 255, 0.3);
}

.mode-badge.low-volume {
    background: rgba(52, 199, 89, 0.15);
    color: #4cd964;
    border: 1px solid rgba(52, 199, 89, 0.3);
}



/* Responsiveness */
/* MOTOR BADGES */
.motor-badge {
    background: var(--meritus-gradient);
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    box-shadow: 0 4px 10px rgba(255, 107, 26, 0.3);
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.motor-badge.motor-fast {
    background: #3b82f6;
}

.motor-badge.motor-pro {
    background: #8b5cf6;
}

.motor-badge.motor-premium {
    background: var(--meritus-gradient);
}

/* TUDO PARA MOBILE (MAX-WIDTH 768PX) */


/* INPUTS BOX SIZING */
input,
textarea,
select {
    box-sizing: border-box !important;
    width: 100%;
    font-size: 16px !important;
    /* Previne auto-zoom no iOS/Android */
}

.advanced-uploads-global {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1;
    max-height: 500px;
    margin-bottom: 2rem;
    overflow: visible;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.variation-reference-group {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1;
    max-height: 500px;
    margin-bottom: 1rem;
    overflow: visible;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.variation-reference-group .drop-zone {
    min-height: 100px;
    /* Mais compacto nas variações */
    padding: 10px;
}

.variation-reference-group .image-preview {
    height: 200px;
    /* Mais alto para formatos verticais */
}

.variation-reference-group.hidden-field,
.advanced-uploads-global.hidden-field {
    opacity: 0;
    max-height: 0;
    margin: 0;
    pointer-events: none;
    padding: 0;
}

/* BATCH SUMMARY DESKTOP */


.sidebar.collapsed~.main-content .batch-impact p {
    font-size: 0.85rem !important;
    font-weight: 500;
    color: var(--text-muted);
}

#total-cost-value {
    color: var(--accent-orange);
    font-size: 1.1rem;
    font-weight: 700;
}

@media (max-width: 768px) {}


/* drop-zone focus fixed */

.drop-zone-input {
    cursor: pointer;
}

/* CATEGORY TABS */
.category-tabs {
    display: flex;
    gap: 15px;
    margin: 1.5rem 0;
    padding: 8px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 14px;
    border: 1px solid var(--glass-border);
}

.category-tab {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: var(--text-muted);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.category-tab.active {
    background: var(--accent-orange);
    color: #fff;
    box-shadow: 0 4px 15px rgba(255, 107, 26, 0.2);
}

.category-tab:hover:not(.active) {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

/* IA SELECTOR PER CARD */
.ia-mode-selector-mini {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.ia-pill {
    flex: 1;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 10px 5px;
    color: var(--text-muted);
    font-size: 0.725rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    line-height: 1.2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.ia-pill:hover {
    background: rgba(255, 107, 26, 0.08);
    border-color: rgba(255, 107, 26, 0.3);
    color: var(--text-main);
}

.ia-pill.active {
    background: var(--accent-orange);
    color: #fff;
    border-color: var(--accent-orange);
    box-shadow: 0 4px 12px rgba(255, 107, 26, 0.25);
}

/* BATCH COST FEEDBACK */
#batch-cost-text strong {
    color: var(--accent-orange);
    font-size: 1.15rem;
}

.insufficient-balance {
    color: #ff4444 !important;
    font-weight: 700;
}

.insufficient-balance strong {
    color: #ff4444 !important;
}

/* GENERATION MODE SELECTOR */
.mode-options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.mode-card {
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.2rem;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.mode-card:hover {
    border-color: rgba(255, 107, 26, 0.4);
    transform: translateY(-2px);
}

.mode-card.active {
    border-color: var(--accent-orange);
    background: rgba(255, 107, 26, 0.05);
    box-shadow: 0 0 20px rgba(255, 107, 26, 0.15);
}

.mode-icon {
    font-size: 1.8rem;
}

.mode-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.mode-info strong {
    font-size: 1.05rem;
    color: var(--text-main);
    margin-bottom: 2px;
}

.mode-info span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.mode-check {
    opacity: 0;
    color: var(--accent-orange);
    font-size: 1.2rem;
    transition: 0.2s;
}

.mode-card.active .mode-check {
    opacity: 1;
}

.mode-badge {
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.mode-badge.high-volume {
    background: rgba(0, 122, 255, 0.15);
    color: #4da3ff;
    border: 1px solid rgba(0, 122, 255, 0.3);
}

.mode-badge.low-volume {
    background: rgba(52, 199, 89, 0.15);
    color: #4cd964;
    border: 1px solid rgba(52, 199, 89, 0.3);
}



.variation-result {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px dashed rgba(255, 255, 255, 0.1);
}

.variation-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.image-slot {
    width: 100%;
    aspect-ratio: 1/1;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 2px dashed rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease;
}

.image-slot i {
    font-size: 1.5rem;
    color: var(--text-muted);
    opacity: 0.2;
}

.image-slot i.fa-spin {
    opacity: 1;
    color: var(--accent-orange);
}

.image-slot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 14px;
    display: none;
    /* Escondido por padrão */
    animation: fadeInScale 0.4s ease-out forwards;
    cursor: pointer;
}

.btn-download-single {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: white;
    color: black;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 2px solid var(--accent-orange);
    font-size: 0.9rem;
    transition: 0.2s;
    opacity: 0;
    transform: translateY(10px);
    z-index: 20;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.image-slot.has-image:hover .btn-download-single {
    opacity: 1;
    transform: translateY(0);
}

.btn-download-single i {
    color: black !important;
    opacity: 1 !important;
    display: block !important;
    font-size: 1rem;
}

.btn-download-single:hover {
    background: var(--accent-orange);
    color: white;
}

.btn-download-single:hover i {
    color: white !important;
}

.modal-download-btn {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--meritus-gradient);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 10px 25px rgba(255, 107, 26, 0.4);
    transition: 0.3s;
    z-index: 2002;
    text-decoration: none;
}

.modal-download-btn:hover {
    transform: translateX(-50%) translateY(-5px);
    box-shadow: 0 15px 35px rgba(255, 107, 26, 0.6);
}

.image-slot.has-image {
    border: none;
    background: #000;
}

.image-slot.has-image i {
    display: none;
}

.image-slot.has-image img {
    display: block;
}

.image-slot img:hover {
    transform: scale(1.05);
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* GENERATION MODE SELECTOR */
.mode-options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.mode-card {
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.2rem;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.mode-card:hover {
    border-color: rgba(255, 107, 26, 0.4);
    transform: translateY(-2px);
}

.mode-card.active {
    border-color: var(--accent-orange);
    background: rgba(255, 107, 26, 0.05);
    box-shadow: 0 0 20px rgba(255, 107, 26, 0.15);
}

.mode-icon {
    font-size: 1.8rem;
}

.mode-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.mode-info strong {
    font-size: 1.05rem;
    color: var(--text-main);
    margin-bottom: 2px;
}

.mode-info span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.mode-check {
    opacity: 0;
    color: var(--accent-orange);
    font-size: 1.2rem;
    transition: 0.2s;
}

.mode-card.active .mode-check {
    opacity: 1;
}

.mode-badge {
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.mode-badge.high-volume {
    background: rgba(0, 122, 255, 0.15);
    color: #4da3ff;
    border: 1px solid rgba(0, 122, 255, 0.3);
}

.mode-badge.low-volume {
    background: rgba(52, 199, 89, 0.15);
    color: #4cd964;
    border: 1px solid rgba(52, 199, 89, 0.3);
}



.download-all-btn {
    margin-top: 14px;
    width: 100%;
    padding: 12px;
    border-radius: 14px;
    border: none;
    font-weight: 700;
    background: #ffffff;
    color: #111111;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.download-all-btn:hover {
    background: var(--accent-orange);
    color: white;
}

@media (max-width: 900px) {
    .global-grid {
        grid-template-columns: 1fr;
    }

    .full-width {
        grid-column: auto;
    }
}



.hidden-field {
    display: none !important;
}


/* NOTIFICAÇÕES TOAST */
.merit-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(15, 20, 35, 0.95);
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    padding: 12px 24px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 9999;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0;
}

.merit-toast.active {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.merit-toast.error {
    border-left: 4px solid var(--accent-red);
}

.merit-toast.success {
    border-left: 4px solid var(--accent-green);
}



@media (max-width: 992px) {

    .variations-grid,
    .inspiration-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -100% !important;
        height: 100vh !important;
        z-index: 5000 !important;
        transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
        width: 280px !important;
    }

    .sidebar.active {
        left: 0 !important;
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.7);
        z-index: 4000;
        backdrop-filter: blur(5px);
    }

    .sidebar-overlay.active {
        display: block !important;
    }

    .variations-grid,
    .inspiration-grid {
        grid-template-columns: 1fr !important;
    }

    .variation-card {
        width: 100% !important;
        margin-bottom: 1.5rem;
    }



    .sidebar.collapsed~.main-content .batch-impact p {
        font-size: 0.85rem !important;
        font-weight: 500;
        color: var(--text-muted);
    }

    #total-cost-value {
        color: var(--accent-orange);
        font-size: 1.1rem;
        font-weight: 700;
    }

    @media (max-width: 768px) {}


    .main-content {
        padding-bottom: 140px;
        padding: 1rem !important;
        padding-bottom: 150px !important;
        /* Space for sticky footer */
    }

    .header-mobile {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        padding: 0.8rem 1rem;
        margin-bottom: 1rem;
        background: rgba(11, 15, 26, 0.85);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 0 0 16px 16px;
        position: sticky;
        top: 0;
        z-index: 900;
    }

    .header-mobile .logo {
        margin: 0 auto;
        text-align: center;
    }

    .header-mobile .btn-hamburger {
        background: var(--accent-purple);
        border: none;
        color: #fff;
        width: 36px;
        height: 36px;
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1rem;
        cursor: pointer;
        box-shadow: 0 2px 8px rgba(124, 58, 237, 0.3);
    }

    .logo-mobile {
        display: flex;
        align-items: center;
        gap: 8px;
        font-weight: 700;
        font-size: 1.1rem;
        color: #fff;
    }

    .logo-mobile .logo-icon {
        width: 32px;
        height: 32px;
    }
}


#generationTimer {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 0.7;
    }

    50% {
        opacity: 1;
        text-shadow: 0 0 10px rgba(255, 107, 26, 0.3);
    }

    100% {
        opacity: 0.7;
    }
}




/* ========================================
   PAINEL DE CONSUMO FLUTUANTE
   ======================================== */

.batch-summary {
    position: fixed;
    bottom: 20px;
    left: 300px;
    right: 20px;
    height: 80px;
    background: rgba(11, 15, 26, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 107, 26, 0.2);
    border-radius: 20px;
    z-index: 1000;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Sidebar recolhida — painel se expande suavemente */
.sidebar.collapsed~.main-content .batch-summary {
    left: 100px;
    right: 20px;
}

.batch-info-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.batch-info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.batch-info-item i {
    opacity: 0.7;
    font-size: 0.9rem;
}

.batch-info-item strong {
    color: var(--accent-orange);
    font-weight: 700;
}

.batch-timer {
    display: none;
    color: var(--accent-orange) !important;
    font-weight: 700;
}

/* Botão Gerar — contido e elegante */
.batch-summary #generateAI {
    display: none !important;
}

.batch-summary #generateAI:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(255, 107, 26, 0.4);
}

.batch-summary #generateAI:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Respiro para cards não ficarem sob o painel */
.main-content {
    padding-bottom: 180px !important;
}

@media (max-width: 768px) {

    /* TRAVA GLOBAL */
    html,
    body {
        overflow-x: hidden !important;
        max-width: 100vw !important;
    }

    *,
    *::before,
    *::after {
        box-sizing: border-box !important;
    }

    /* Header glass transparente */
    .header-mobile {
        background: rgba(11, 15, 26, 0.75) !important;
        backdrop-filter: blur(10px) !important;
        -webkit-backdrop-filter: blur(10px) !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    }

    /* Esconder seção 1.1 Escolha Visual no mobile */
    .style-section-global {
        display: none !important;
    }

    /* Prompt e campos não vazam */
    .main-content {
        padding: 1rem !important;
        padding-bottom: 180px !important;
        overflow-x: hidden !important;
    }

    textarea,
    input,
    .saas-card,
    .form-group {
        max-width: 100% !important;
        width: 100% !important;
    }

    #globalPrompt {
        max-width: 100% !important;
    }

    /* Cards de variação */
    .variation-card {
        width: 100% !important;
        padding: 15px !important;
    }

    .ia-mode-selector-mini {
        flex-wrap: wrap !important;
        gap: 5px !important;
    }

    .ia-pill {
        font-size: 0.65rem !important;
        padding: 6px 10px !important;
    }

    /* PAINEL DE DISPARO — 70% centralizado */
    .batch-summary {
        width: 70% !important;
        margin: 0 auto 20px auto !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 10px !important;
        height: auto !important;
        flex-direction: column !important;
        padding: 15px !important;
        gap: 10px !important;
        border-radius: 16px !important;
        overflow: visible !important;
    }

    .sidebar.collapsed~.main-content .batch-summary {
        left: 0 !important;
        right: 0 !important;
        width: 70% !important;
    }

    .batch-info-left {
        width: 100% !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        gap: 4px !important;
        border-bottom: none !important;
        padding-bottom: 0 !important;
    }

    .batch-info-item {
        justify-content: center !important;
        font-size: 0.8rem !important;
    }

    .batch-summary #generateAI {
        width: 100% !important;
        min-width: unset !important;
        flex: unset !important;
        margin-left: 0 !important;
        height: 44px !important;
        font-size: 0.9rem !important;
    }

    h1 {
        font-size: 1.3rem !important;
        word-break: break-word;
    }
}

/* ========================================
   GALERIA 10+10 — Seções e Votação
   ======================================== */

.gallery-section-title {
    font-family: 'Inter', 'Plus Jakarta Sans', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    padding: 1.5rem 0 0.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid rgba(255, 107, 26, 0.15);
    margin-bottom: 0.5rem;
}

.admin-pick-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg, #ff6b1a, #ffb347);
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    z-index: 5;
    box-shadow: 0 2px 8px rgba(255, 107, 26, 0.4);
}

.card-actions-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 15px 12px;
    gap: 10px;
}

.vote-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.vote-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
    font-size: 0.85rem;
}

.vote-btn:hover {
    background: rgba(255, 107, 26, 0.15);
    border-color: rgba(255, 107, 26, 0.3);
    color: var(--text-main);
}

.vote-btn.active.vote-up {
    background: linear-gradient(135deg, #ff6b1a, #ff9a44);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 2px 10px rgba(255, 107, 26, 0.35);
}

.vote-btn.active.vote-down {
    background: rgba(255, 80, 80, 0.3);
    border-color: rgba(255, 80, 80, 0.4);
    color: #ff6b6b;
}

.vote-count {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-main);
    min-width: 24px;
    text-align: center;
}

.card-actions-row .btn-download-insp {
    width: 34px;
    height: 34px;
    min-width: 34px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 0.85rem;
}

/* Animação fadeInScale para imagens geradas */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.92);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Botão download individual nos slots de resultado */
.btn-download-single {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease;
    font-size: 0.8rem;
    z-index: 5;
}

.image-slot:hover .btn-download-single {
    opacity: 1;
}

.btn-download-single:hover {
    background: var(--accent-orange);
}

/* ============================================================ */
/* NEW PREMIUM GENERATION UI - INDIVIDUAL CARD CONTROLS */
/* ============================================================ */

.card-execution-row {
    margin-top: 1.5rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.btn-generate-card {
    background: rgba(255, 107, 26, 0.08);
    border: 1px solid rgba(255, 107, 26, 0.25);
    color: var(--accent-orange-bright);
    padding: 10px 18px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    justify-content: center;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-generate-card:hover:not(:disabled) {
    background: var(--meritus-gradient);
    color: white;
    border-color: transparent;
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(255, 107, 26, 0.4);
}

.btn-generate-card:active:not(:disabled) {
    transform: translateY(0);
}

.btn-generate-card:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--glass-border);
    color: var(--text-muted);
}

.card-status-info {
    display: none;
    align-items: center;
    gap: 10px;
    background: rgba(255, 107, 26, 0.05);
    padding: 8px 16px;
    border-radius: 10px;
    border: 1px solid rgba(255, 107, 26, 0.15);
    backdrop-filter: blur(8px);
    animation: slideRightFade 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.status-text {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent-orange-bright);
    letter-spacing: 0.4px;
}

/* IMAGE GRID & PREVIEW ENGINE */
.variation-result {
    margin-top: 1.5rem;
    padding: 2px;
}

.variation-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.image-slot {
    aspect-ratio: 1/1;
    background: #080b13;
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.4);
}

.image-slot.has-image {
    background: #000;
    border-color: rgba(255, 255, 255, 0.12);
}

.image-slot i {
    font-size: 1.8rem;
    color: #fff;
    opacity: 0.08;
    z-index: 1;
}

.image-slot .generated-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 2;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.image-slot:hover .generated-img {
    transform: scale(1.1);
}

.image-slot:hover {
    border-color: rgba(255, 107, 26, 0.4);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* NOVAS AÇÕES DO CARD DE CRIATIVOS (SVGs INLINE) */
.card-image-actions {
    position: absolute;
    top: 15px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 10px;
    z-index: 100;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.image-slot:hover .card-image-actions {
    opacity: 1;
    pointer-events: all;
}

.card-image-actions .action-btn-square {
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.2) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 10px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.card-image-actions .action-btn-square:hover,
.card-image-actions .action-btn-square.active {
    background: #ff6b1a !important; /* Laranja Meritus */
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 20px rgba(255, 107, 26, 0.5);
    border-color: transparent !important;
}

/* Força o SVG a ser branco e ter o tamanho correto */
.card-image-actions .action-btn-square svg {
    display: block;
    width: 20px;
    height: 20px;
    stroke: #ffffff !important;
}

.card-image-actions .action-btn-square svg path,
.card-image-actions .action-btn-square svg polyline,
.card-image-actions .action-btn-square svg line {
    stroke: #ffffff !important;
}

/* ANIMATIONS */
@keyframes slideRightFade {
    from { opacity: 0; transform: translateX(-15px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInDeep {
    from { opacity: 0; filter: blur(10px); }
    to { opacity: 1; filter: blur(0); }
}

@keyframes pulseBorder {
    0% { border-color: rgba(255, 107, 26, 0.2); }
    50% { border-color: rgba(255, 107, 26, 0.6); }
    100% { border-color: rgba(255, 107, 26, 0.2); }
}

.image-slot.loading {
    animation: pulseBorder 1.5s infinite ease-in-out;
}

#addVariationBtn {
    cursor: pointer !important;
    pointer-events: auto !important;
    z-index: 100 !important;
}