/* =====================================================
   RESET & VARIÁVEIS
===================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2563EB;
    --primary-light: #DBEAFE;
    --green: #22C55E;
    --purple: #8B5CF6;
    --orange: #F97316;
    --text: #1E293B;
    --text-light: #64748B;
    --border: #E2E8F0;
    --background: #213546;
    --card: #f0f2f5;
    --shadow: 0 8px 24px rgba(15, 23, 42, .05);
    --radius: 18px;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--background);
    color: var(--text);
    transition: background 0.3s ease, color 0.3s ease;
    -webkit-font-smoothing: antialiased;
}

.page {
    width: min(1400px, 95%);
    margin: auto;
    padding: 40px 0;
}

/* =====================================================
   TOOLBAR (BARRA SUPERIOR)
===================================================== */
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.search-box {
    flex: 1;
    display: flex;
    align-items: center;
    background: var(--card);
    border-radius: 14px;
    padding: 14px 18px;
    box-shadow: var(--shadow);F
    border: 1px solid transparent;
    transition: 0.2s;
}

.search-box:focus-within {
    border-color: #BFDBFE;
}

.search-box i { color: #94A3B8; margin-right: 12px; }
.search-box input {
    width: 100%;
    border: none;
    outline: none;
    font-size: 15px;
    font-family: inherit;
    background: none;
    color: inherit;
}

#darkMode, #showFavorites {
    border: none;
    padding: 14px 20px;
    border-radius: 14px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: 0.2s ease;
    box-shadow: var(--shadow);
}

#darkMode { background: var(--card); color: #bbafaf; font-size: 16px; }
#showFavorites { background: var(--card); color: #b6b7b4; border: 1px solid var(--primary-light); }
#darkMode:hover, #showFavorites:hover { transform: translateY(-2px); }

#showFavorites.active-filter {
    background: 213546;
    color: #213546;
    border-color: #F59E0B;
}

/* =====================================================
   DASHBOARD
===================================================== */
.dashboard {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

.dashboard-card {
    background: var(--card);
    padding: 20px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    gap: 18px;
    box-shadow: var(--shadow);
    transition: transform .3s ease;
}

.dashboard-card:hover { transform: translateY(-4px); }
.dashboard-card i { font-size: 26px; color: var(--primary); }
.dashboard-card h3 { font-size: 28px; margin-bottom: 2px; }
.dashboard-card span { color: var(--text-light); font-size: 13px; }

/* =====================================================
   NOVA SEÇÃO: ACESSO RÁPIDO (FAVORITOS FIXOS)
===================================================== */
.quick-links-section {
    background: var(--card);
    padding: 20px;
    border-radius: var(--radius);
    margin-bottom: 25px;
    box-shadow: var(--shadow);
    animation: fadeIn 0.4s ease;
}

.quick-header h2 {
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.text-amber { color: #D97706; }

.quick-links-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.quick-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--background);
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    transition: 0.2s;
    border: 1px solid var(--border);
}

.quick-chip a {
    text-decoration: none;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 6px;
}

.quick-chip a:hover { color: var(--primary); }
.quick-chip i.remove-quick {
    cursor: pointer;
    color: var(--text-light);
    transition: color 0.2s;
}
.quick-chip i.remove-quick:hover { color: #EF4444; }

/* =====================================================
   HERO HEADER
===================================================== */
.hero {
    background: var(--card);
    border-radius: 22px;
    padding: 30px 40px;
    display: flex;
    align-items: center;
    gap: 25px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}

.hero-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 26px;
    flex-shrink: 0;
}

.hero h1 { font-size: 28px; font-weight: 700; margin-bottom: 6px; }
.hero p { color: var(--text-light); font-size: 15px; line-height: 1.6; }

/* =====================================================
   CARDS GRID & ACORDEÃO
==================================================== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    margin-bottom: 30px;
}

.card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
    border: 1px solid transparent;
    transition: border-color 0.3s, box-shadow 0.3s;
    height: fit-content;
}

.card:hover {
    border-color: #BFDBFE;
    box-shadow: 0 12px 30px rgba(37, 99, 235, .08);
}

.card-header {
    display: flex;
    gap: 16px;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.accordion-icon {
    color: var(--text-light);
    transition: transform 0.3s ease;
}

.card-icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 22px;
    flex-shrink: 0;
}

.icon-blue { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.icon-green { background: linear-gradient(135deg, #22c55e, #16a34a); }
.icon-purple { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.icon-orange { background: linear-gradient(135deg, #fb923c, #ea580c); }

.card-title { font-size: 20px; font-weight: 700; margin-bottom: 2px; }
.card-description { color: var(--text-light); font-size: 13.5px; }

.card hr { border: none; border-top: 1px solid var(--border); margin: 16px 0; }

/* RECOLHIMENTO DA LISTA (SANFONA) */
.collapsible-list {
    max-height: 0;
    overflow: hidden;
    list-style: none;
    transition: max-height 0.35s cubic-bezier(0, 1, 0, 1);
}

.collapsible-list.visible {
    max-height: 1000px;
    transition: max-height 0.4s cubic-bezier(1, 0, 1, 0);
}

/* =====================================================
   LINKS INTERNOS & BOTÕES DE AÇÃO
===================================================== */
.links li { margin-bottom: 6px; }

.link-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-right: 12px;
    border-radius: 12px;
    transition: background 0.2s ease;
}

.link-container:hover { background: #EFF6FF; }

.links a {
    flex: 1;
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text);
    padding: 12px;
    font-size: 14.5px;
    font-weight: 500;
    transition: padding 0.2s ease;
}

.links a:hover { color: var(--primary); padding-left: 18px; }
.links span { display: flex; align-items: center; gap: 12px; }
.links span i { color: var(--primary); font-size: 14px; width: 20px; text-align: center; }

/* BOTÕES AUXILIARES (COPIAR E FAVORITO) */
.action-buttons { display: flex; gap: 4px; }

.action-btn {
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 16px;
    padding: 6px;
    border-radius: 8px;
    color: #94A3B8;
    transition: all 0.2s;
}

.action-btn:hover { background: rgba(0,0,0,0.04); color: var(--text); }
.fav-btn:hover { color: #F59E0B; }
.fav-btn.active { color: #FBBF24; }
.copy-btn:hover { color: var(--primary); }

/* DESIGN HIGHLIGHTER (PROCURA) */
mark {
    background: #FEF08A;
    color: #1E293B;
    padding: 0 2px;
    border-radius: 3px;
}

/* =====================================================
   NOTIFICAÇÃO FLUTUANTE (TOAST)
===================================================== */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #1E293B;
    color: #F8FAFC;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    z-index: 1000;
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.2s;
    pointer-events: none;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* =====================================================
   INFO BOX & OUTROS
===================================================== */
.info-box {
    background: var(--card);
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 22px;
    box-shadow: var(--shadow);
    margin-bottom: 25px;
}

.info-icon {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--primary-light);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--primary);
    font-size: 20px;
    flex-shrink: 0;
}

.info-box h3 { margin-bottom: 2px; font-size: 16px; }
.info-box p { color: var(--text-light); font-size: 13.5px; line-height: 1.5; }

footer { text-align: center; color: var(--text-light); padding: 15px; font-size: 13px; }

#topButton {
    position: fixed;
    right: 30px;
    bottom: 30px;
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
    transition: .3s;
    z-index: 999;
}

#topButton:hover { transform: translateY(-3px); background: #1D4ED8; }

/* =====================================================
   MODO ESCURO SUAVIZADO (FUNDO MAIS LEVE)
===================================================== */
body.dark {
    --background: #0B0F19;
    --card: #213546;
    --text: #E2E8F0;
    --text-light: #64748B;
    --border: #222F47;
    --primary-light: #162A54;
}

body.dark .link-container:hover { background: #1E293B; }
body.dark .quick-chip { background: #121929; }
body.dark .action-btn:hover { background: rgba(255,255,255,0.05); }
body.dark mark { background: #854D0E; color: #E8E1DD; }
body.dark .toast { background: #F8FAFC; color: #0F172A; }

/* ANIMAÇÕES */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =====================================================
   RESPONSIVIDADE
===================================================== */
@media(max-width: 980px) {
    .cards-grid { grid-template-columns: 1fr; }
    .hero { padding: 25px; }
}

@media(max-width: 640px) {
    .dashboard { grid-template-columns: 1fr; gap: 12px; }
    .toolbar { flex-direction: column; align-items: stretch; }
    #darkMode, #showFavorites { justify-content: center; }
    .hero { flex-direction: column; align-items: flex-start; gap: 15px; }
}