/* Variáveis CSS Globais */
:root {
    --brand-primary: #dc3545;
    --brand-hover: #bb2d3b;
    --brand-light: #fff8f8;
    --text-main: #212529;
    --text-muted: #6c757d;
    --bg-body: #f8f9fa;
    --bg-card: #ffffff;
    --bg-ad: #e9ecef;
    --border-color: #dee2e6;
    --border-radius-lg: 1rem;
    --border-radius-sm: 0.5rem;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-lg: 0 1rem 3rem rgba(0,0,0,.175);
    --transition-speed: 0.2s;
    --font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--bg-body);
    font-family: var(--font-family);
    color: var(--text-main);
}

/* Layout Grid */
.layout-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 1200px) {
    .layout-grid {
        grid-template-columns: 180px 1fr 180px;
    }
    .sidebar-ad { display: block !important; }
}

.sidebar-ad { display: none; }

.ad-skyscraper {
    background-color: var(--bg-ad);
    border: 1px dashed #ced4da;
    height: 600px; width: 100%;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted); font-size: 0.8rem; text-transform: uppercase;
    position: sticky; top: 100px;
}

.ad-banner {
    background-color: var(--bg-ad);
    border: 1px dashed #ced4da;
    min-height: 100px; width: 100%;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted); margin: 2rem 0;
}

/* Navbar & UI */
.navbar-brand { font-weight: 800; letter-spacing: -0.5px; }

.drop-zone {
    border: 2px dashed var(--border-color);
    background-color: var(--bg-card);
    border-radius: var(--border-radius-lg);
    transition: all var(--transition-speed) ease-in-out;
    cursor: pointer;
    position: relative;
}
.drop-zone:hover, .drop-zone.drag-active {
    border-color: var(--brand-primary);
    background-color: var(--brand-light);
    transform: scale(1.01);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.1);
}

/* Preview Items */
.preview-item {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-speed);
    cursor: grab;
}
.preview-item:active { cursor: grabbing; }
.preview-item:hover { transform: translateY(-2px); border-color: var(--brand-primary); }

/* Estilo Específico para Lista de PDFs (Merge) */
.pdf-list-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    margin-bottom: 0.5rem;
    cursor: grab;
}
.pdf-list-item:hover { background-color: var(--bg-body); }
.pdf-list-item .file-info { flex-grow: 1; padding: 0 1rem; overflow: hidden; }
.pdf-list-item .file-name { font-weight: 600; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block;}
.pdf-list-item .file-size { font-size: 0.75rem; color: var(--text-muted); }

.delete-btn {
    background: rgba(220, 53, 69, 0.1);
    color: var(--brand-primary);
    border: none;
    width: 32px; height: 32px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    transition: all var(--transition-speed);
}
.delete-btn:hover { background: var(--brand-primary); color: white; }

/* Image Preview Style */
.img-preview-box { aspect-ratio: 3/4; position: relative; }
.img-preview-box img { width: 100%; height: 100%; object-fit: cover; }
.img-delete-absolute { position: absolute; top: 5px; right: 5px; background: rgba(255,255,255,0.9); z-index: 2; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }

/* Article & Content */
.seo-content {
    background: var(--bg-card); padding: 3rem; border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-color); color: var(--text-main); line-height: 1.8;
}
.seo-content h2 { color: var(--text-main); font-weight: 800; }
.highlight-box {
    background: var(--bg-body); border-left: 4px solid var(--brand-primary);
    padding: 1.5rem; border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0; margin: 2rem 0;
}

.nav-pills .nav-link { color: var(--text-muted); font-weight: 600; border-radius: var(--border-radius-sm); }
.nav-pills .nav-link.active { background-color: var(--brand-primary); color: white; }

#loading-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(255,255,255,0.95); z-index: 9999;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
}