:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --dark: #0f172a;
    --bg: #f8fafc;
    --card-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    margin: 0;
    color: #1e293b;
    line-height: 1.5;
}

/* AppBar Moderna */
.appbar {
    background: var(--dark);
    padding: 0.8rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

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

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.logo-icon {
    background: linear-gradient(135deg, #38bdf8, #2563eb);
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.logo-text .top {
    font-size: 1.4rem;
    font-weight: 800;
    color: white;
    display: block;
    line-height: 1;
}

.logo-text .bottom {
    font-size: 0.65rem;
    color: #94a3b8;
    font-weight: 600;
    letter-spacing: 1px;
}

/* Busca Estilizada */
.search-container {
    flex: 1;
    max-width: 500px;
    position: relative;
}

.search-container input {
    width: 100%;
    background: #1e293b;
    border: 1px solid #334155;
    color: white;
    padding: 12px 20px;
    border-radius: 12px;
    outline: none;
    transition: 0.3s;
}

.search-container input:focus {
    background: white;
    color: var(--dark);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.2);
}

.btn-sync {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

.btn-sync:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

/* Layout Geral */
.main-container {
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px;
}

.section-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 30px;
}

/* Grid de Pastas (Home) */
.grid-pastas {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.folder-card {
    background: white;
    border-radius: 24px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    border: 1px solid #e2e8f0;
    transition: 0.3s;
}

.folder-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--card-shadow);
    border-color: var(--primary);
}

.folder-icon {
    font-size: 3.5rem;
    margin-bottom: 15px;
    display: block;
}

.item-count {
    color: var(--primary);
    font-weight: 700;
    font-size: 0.9rem;
}

/* Detalhes da Seção (Página Interna) */
.artigos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 25px;
}

.article-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

.article-card:hover {
    border-color: var(--primary);
    box-shadow: var(--card-shadow);
    transform: translateY(-5px);
}

.badge-sys {
    background: #eff6ff;
    color: var(--primary);
    font-size: 0.7rem;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 99px;
    text-transform: uppercase;
    width: fit-content;
}

.article-card h3 {
    margin: 15px 0 10px;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--dark);
}

.resumo-texto {
    font-size: 0.9rem;
    color: #64748b;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 20px;
}

.article-footer {
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--primary);
    font-weight: 700;
    font-size: 0.8rem;
}

/* Botão Voltar */
.btn-voltar {
    background: white;
    border: 1px solid #e2e8f0;
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 20px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-voltar:hover {
    background: #f8fafc;
    border-color: var(--primary);
}

/* Terminal de Log */
.toast-log {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 350px;
    background: #1e293b;
    color: #10b981;
    border-radius: 15px;
    padding: 20px;
    display: none;
    font-family: monospace;
    font-size: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}