/* dashboard.css — DED Express 2.0 */
:root {
    /* ── Cores ── */
    --primary:        #6a1fc2;
    --primary-dark:   #4a0e8f;
    --primary-light:  #9b59d0;
    --primary-glow:   rgba(106, 31, 194, 0.18);
    --accent:         #f5b800;
    --accent-dark:    #d4a000;
    --success:        #22c55e;
    --danger:         #ef4444;
    /* ── Aliases (compatibilidade com global.css) ── */
    --roxo:           #6a1fc2;
    --roxo-escuro:    #2b0060;
    --dourado:        #f5b800;
    /* ── Fundos ── */
    --bg-main:        #f4f0fb;
    --bg-card:        rgba(255, 255, 255, 0.96);
    --sidebar-bg:     linear-gradient(180deg, #0e0020 0%, #1a003a 55%, #2b0060 100%);
    /* ── Texto ── */
    --text-main:      #1a1028;
    --text-muted:     #6b6080;
    --text-on-dark:       #ffffff;
    --text-on-dark-muted: rgba(255, 255, 255, 0.72);
    /* ── Bordas ── */
    --border-color:   rgba(218, 210, 240, 0.7);
    --border-dark:    rgba(255, 255, 255, 0.10);
    /* ── Layout ── */
    --sidebar-width:  248px;
    --sidebar-collapsed: 68px;
    --header-height:  80px;
    --radius:         20px;
    --radius-sm:      12px;
    /* ── Sombras ── */
    --shadow:         0 4px 24px rgba(106, 31, 194, 0.09);
    --shadow-hover:   0 12px 40px rgba(106, 31, 194, 0.17);
    --shadow-card:    0 2px 12px rgba(106, 31, 194, 0.07);
    /* ── Espaçamento ── */
    --space-xs:  4px;
    --space-sm:  8px;
    --space-md:  16px;
    --space-lg:  24px;
    --space-xl:  40px;
    --space-2xl: 60px;
    /* ── Animações ── */
    --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --transition:  all 0.25s var(--ease-smooth);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Outfit', 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--sidebar-bg);
    color: #ffffff; /* Garantir texto branco em fundo roxo escuro */
    padding: 28px 16px;
    position: fixed;
    left: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    box-shadow: 4px 0 32px rgba(0, 0, 0, 0.25);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

/* Garantir que TODOS os textos da sidebar sejam legíveis */
.sidebar * {
    /* Herda cor branca por padrão; sobrescritas abaixo onde necessário */
}

.sidebar p,
.sidebar span,
.sidebar div {
    color: inherit;
}

.sidebar::before {
    content: '';
    position: absolute;
    top: -80px;
    right: -60px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(106,31,194,0.4) 0%, transparent 70%);
    pointer-events: none;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 800;
    color: var(--accent);
    margin-bottom: 36px;
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 14px;
    transition: var(--transition);
}

.sidebar-logo img {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    object-fit: contain;
    border: 2px solid rgba(245, 184, 0, 0.35);
    transition: var(--transition);
}

.sidebar-logo:hover img {
    border-color: var(--accent);
    box-shadow: 0 0 16px rgba(245, 184, 0, 0.35);
}

.nav-menu {
    list-style: none;
    flex: 1;
}

.nav-item {
    margin-bottom: 12px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 12px 14px;
    color: rgba(255, 255, 255, 0.62); /* texto claro em fundo roxo escuro */
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    border-radius: 14px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%) scaleY(0);
    width: 3px;
    height: 60%;
    background: var(--accent);
    border-radius: 0 3px 3px 0;
    transition: transform 0.25s var(--ease-bounce);
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.10);
    color: #ffffff;
    transform: translateX(4px);
}

.nav-link.active {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    font-weight: 700;
    transform: translateX(4px);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.10);
}

.nav-link.active::before {
    transform: translateY(-50%) scaleY(1);
}

.nav-link i {
    font-size: 17px;
    width: 22px;
    text-align: center;
    flex-shrink: 0;
    transition: var(--transition);
}

.nav-link:hover i, .nav-link.active i {
    color: var(--accent);
}

.sidebar-footer {
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* ── Sidebar User ── */
.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.08);
    margin-bottom: 8px;
    overflow: hidden;
}

.sidebar-user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 800;
    color: white;
    flex-shrink: 0;
    letter-spacing: -0.5px;
}

.sidebar-user-info {
    flex: 1;
    min-width: 0;
}

.sidebar-user-email {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.80); /* garantir legibilidade em fundo roxo */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-plan {
    display: block;
    font-size: 10px;
    color: var(--accent); /* dourado — alto contraste com o fundo escuro */
    font-weight: 700;
    margin-top: 2px;
    letter-spacing: 0.3px;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 36px 48px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: margin-left 0.3s var(--ease-smooth);
}

/* ── Animação de entrada das páginas ── */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

.main-content > * {
    animation: fadeInUp 0.4s var(--ease-smooth) both;
}

.main-content > *:nth-child(1) { animation-delay: 0.04s; }
.main-content > *:nth-child(2) { animation-delay: 0.08s; }
.main-content > *:nth-child(3) { animation-delay: 0.13s; }
.main-content > *:nth-child(4) { animation-delay: 0.18s; }

/* ── Dashboard Main Grid (Calendar + Panel) ── */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 20px;
    flex: 1;
    min-height: 0;
}

/* ── Quick Action Buttons ── */
.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
    margin-bottom: 28px;
}

.quick-action-btn {
    all: unset;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 14px;
    background: white;
    border: 1.5px solid var(--border-color);
    border-radius: 16px;
    padding: 16px 20px;
    box-shadow: var(--shadow);
    transition: all 0.22s var(--ease-smooth);
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

.quick-action-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(106, 31, 194, 0.04), transparent);
    opacity: 0;
    transition: opacity 0.22s ease;
    pointer-events: none;
}

.quick-action-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.quick-action-btn:hover::before {
    opacity: 1;
}

.quick-action-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.22s var(--ease-bounce);
}

.quick-action-btn:hover .quick-action-icon {
    transform: scale(1.1) rotate(-4deg);
}

.quick-action-icon i {
    color: white;
    font-size: 18px;
}

.quick-action-text {
    text-align: left;
    min-width: 0;
}

.quick-action-label {
    display: block;
    font-size: 14px;
    font-weight: 800;
    color: var(--primary-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.quick-action-sub {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.quick-action-arrow {
    color: var(--border-color);
    font-size: 12px;
    margin-left: auto;
    flex-shrink: 0;
    transition: transform 0.22s ease, color 0.22s ease;
}

.quick-action-btn:hover .quick-action-arrow {
    transform: translateX(3px);
    color: var(--primary-light);
}

/* Header */
header {
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin-bottom: 28px;
}

.welcome-msg h1 {
    font-size: 32px; /* Aumentado de 24px */
    font-weight: 800;
    color: var(--primary-dark);
    letter-spacing: -0.5px;
}

.welcome-msg p {
    color: var(--text-muted);
    font-size: 14px;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    padding: 8px 16px;
    border-radius: 99px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: var(--primary-light);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.user-info .user-name {
    display: block;
    font-weight: 600;
    font-size: 14px;
}

.user-info .user-plan {
    font-size: 11px;
    color: var(--primary);
    font-weight: 700;
    text-transform: uppercase;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Aumentado min-width */
    gap: 30px; /* Aumentado de 20px */
    margin-bottom: 40px;
}

.card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    padding: 30px; /* Aumentado */
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(106, 31, 194, 0.3);
}

.card-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.card-value {
    font-size: 36px; /* Aumentado de 28px */
    font-weight: 800;
    color: var(--primary-dark);
    line-height: 1;
}

/* Calendar Container */
.calendar-card {
    background: white;
    border-radius: var(--radius);
    padding: 16px 12px 12px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    min-width: 0;
    overflow: hidden;
}

.day-details-card {
    background: white;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
}

.details-header {
    padding: 24px;
    background: #fdfbff;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.details-header h3 {
    font-size: 16px;
    font-weight: 800;
    color: var(--primary-dark); /* roxo escuro em fundo claro — OK */
}

.badge-count {
    background: var(--primary-light);
    color: white;
    padding: 4px 12px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 700;
}

.details-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.details-placeholder {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-muted);
    padding: 40px;
}

.details-placeholder i {
    font-size: 40px;
    margin-bottom: 16px;
    opacity: 0.3;
}

.event-item {
    background: #f8f9fe;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 12px;
    transition: all 0.2s;
    cursor: pointer;
}

.event-item:hover {
    border-color: var(--primary);
    background: white;
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(106, 31, 194, 0.05);
}

.event-item h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 4px;
}

.event-meta {
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    gap: 12px;
}

.event-actions {
    margin-top: 12px;
    display: flex;
    gap: 8px;
}

.btn-mini {
    padding: 6px 12px;
    font-size: 10px;
    border-radius: 6px;
    font-weight: 700;
}

/* ═══════════════════════════════════════════
   CALENDÁRIO COMPACTO — Alturas reduzidas
   ═══════════════════════════════════════════ */

/* Toolbar compacta */
.fc .fc-toolbar {
    gap: 8px;
    flex-wrap: wrap;
}
.fc .fc-toolbar-title {
    font-size: 14px !important;
    font-weight: 800;
    color: var(--primary-dark);
}
.fc .fc-button {
    padding: 4px 10px !important;
    font-size: 11px !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
}
.fc .fc-button-primary {
    background: var(--primary) !important;
    border: none !important;
}
.fc .fc-button-primary:hover {
    background: var(--primary-dark) !important;
}

/* Células do mês compactas */
.fc .fc-daygrid-day {
    height: 22px !important;
    min-height: 22px !important;
}
.fc .fc-daygrid-day-frame {
    min-height: 22px !important;
    padding: 1px 2px !important;
}
.fc .fc-daygrid-day-top {
    padding: 1px 2px !important;
}
.fc .fc-daygrid-day-number {
    font-weight: 600;
    font-size: 10px !important;
    padding: 1px 3px !important;
    color: var(--primary-dark);
    line-height: 1;
}

/* Dia atual: círculo roxo */
.fc .fc-day-today .fc-daygrid-day-number {
    background: var(--primary);
    color: white !important;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 9px !important;
}

/* Eventos compactos */
.fc .fc-daygrid-event {
    border-radius: 3px !important;
    font-size: 9px !important;
    padding: 0 3px !important;
    line-height: 14px !important;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    margin-top: 1px !important;
    background: var(--primary) !important;
    border: none !important;
}
.fc .fc-daygrid-event:hover {
    background: var(--primary-dark) !important;
}
.fc .fc-daygrid-more-link {
    font-size: 9px;
    font-weight: 700;
    color: var(--primary-light);
    padding: 0 2px;
}

/* Linhas do grid mais sutis */
.fc-theme-standard td, .fc-theme-standard th {
    border-color: rgba(218, 210, 240, 0.35) !important;
}
.fc .fc-highlight {
    background: rgba(106, 31, 194, 0.1) !important;
}

/* Hover nas células */
.fc .fc-daygrid-day:hover {
    background: rgba(106, 31, 194, 0.04);
    cursor: pointer;
}

/* Fins de semana destacados */
.fc .fc-day-sat, .fc .fc-day-sun {
    background: rgba(106, 31, 194, 0.02);
}

/* Header do calendário */
.fc .fc-col-header-cell {
    padding: 4px 0 !important;
    background: #f9f7ff;
}
.fc .fc-col-header-cell-cushion {
    font-size: 11px !important;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Responsividade do calendário compacto */
@media (max-width: 1200px) {
    .fc .fc-daygrid-day {
        height: 20px !important;
    }
    .fc .fc-toolbar-title {
        font-size: 12px !important;
    }
}
@media (max-width: 900px) {
    .fc .fc-daygrid-day {
        height: 28px !important;
    }
}

/* Modals — see dashboard-modals.css for full modal styles */

/* Config Groups */
.config-section {
    margin-bottom: 24px;
}

.config-section h3 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.input-group {
    margin-bottom: 16px;
}

.input-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-main);
}

.input-group input, .input-group select, .input-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--border-color);
    border-radius: 12px;
    font-family: inherit;
    font-size: 14px;
    transition: all 0.2s;
}

.input-group input:focus, .input-group select:focus, .input-group textarea:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 4px rgba(106, 31, 194, 0.1);
}

/* AI Option Cards */
.ai-options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.option-card {
    border: 1.5px solid var(--border-color);
    padding: 16px;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.option-card:hover {
    border-color: var(--primary-light);
    background: #fcfaff;
}

.option-card.active {
    border-color: var(--primary);
    background: rgba(106, 31, 194, 0.05);
    box-shadow: 0 4px 12px rgba(106, 31, 194, 0.1);
}

.option-card i {
    font-size: 20px;
    color: var(--primary);
    margin-bottom: 8px;
    display: block;
}

.option-card span {
    font-size: 12px;
    font-weight: 700;
}

/* Buttons — .btn-primary-modal and .btn-ghost defined in dashboard-modals.css */

/* Image Placement Selector */
.placement-grid {
    display: flex;
    gap: 10px;
}

.placement-box {
    flex: 1;
    aspect-ratio: 1;
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.placement-box.active {
    border-color: var(--primary);
    background: rgba(106, 31, 194, 0.05);
}

/* Smart Prompts */
.smart-prompts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.smart-prompt-btn {
    background: rgba(106, 31, 194, 0.08);
    color: var(--primary-dark);
    border: 1px solid rgba(106, 31, 194, 0.2);
    padding: 6px 12px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.smart-prompt-btn:hover {
    background: var(--primary-light);
    color: white;
    border-color: var(--primary-light);
}

/* Chips (Seleção Rápida) */
.chips-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.chip-btn {
    background: white;
    border: 1px solid var(--border-color);
    padding: 8px 14px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
    flex-grow: 1;
    text-align: center;
}

.chip-btn:hover {
    border-color: var(--primary-light);
    color: var(--primary-dark);
}

.chip-btn.active {
    background: var(--primary-dark);
    color: white;
    border-color: var(--primary-dark);
}

/* Resumo da Geração */
.ai-summary {
    background: linear-gradient(135deg, rgba(245, 184, 0, 0.1), rgba(245, 184, 0, 0.05));
    border: 1px dashed var(--accent);
    padding: 12px 16px;
    border-radius: 12px;
    margin-top: 20px;
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 12px;
}

.ai-summary i {
    color: var(--accent);
    font-size: 20px;
}

.ai-summary span {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-dark);
}

/* ========== TOAST NOTIFICATIONS ========== */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    background: white;
    border-radius: 14px;
    padding: 16px 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border-left: 4px solid var(--primary);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 320px;
    max-width: 440px;
    animation: toastIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
}

.toast i {
    font-size: 20px;
    color: var(--primary);
}

.toast.toast-success { border-left-color: #22c55e; }
.toast.toast-success i { color: #22c55e; }
.toast.toast-error { border-left-color: #ef4444; }
.toast.toast-error i { color: #ef4444; }
.toast.toast-warning { border-left-color: var(--accent); }
.toast.toast-warning i { color: var(--accent); }

.toast.toast-out {
    animation: toastOut 0.3s ease forwards;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(40px) scale(0.95); }
    to { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes toastOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(40px); }
}

/* ========== DROPDOWN MENU ========== */
.dropdown-wrapper {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: white;
    border-radius: 16px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-color);
    min-width: 240px;
    overflow: hidden;
    z-index: 100;
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.dropdown-menu.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    cursor: pointer;
    transition: all 0.15s;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
}

.dropdown-item:hover {
    background: rgba(106, 31, 194, 0.06);
    color: var(--primary);
}

.dropdown-item i {
    font-size: 18px;
    width: 24px;
    text-align: center;
    color: var(--primary-light);
}

.dropdown-item .item-desc {
    display: block;
    font-size: 11px;
    font-weight: 400;
    color: var(--text-muted);
    margin-top: 2px;
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 4px 0;
}

/* ========== PAGE CARD (shared by atividade, planejador, etc) ========== */
.page-card {
    background: white;
    border-radius: var(--radius);
    border: 1.5px solid var(--border-color);
    box-shadow: var(--shadow-card);
    padding: 24px;
    transition: box-shadow 0.2s ease;
}

.page-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1.5px solid var(--border-color);
}

.page-card-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.page-card-icon i {
    color: white;
    font-size: 17px;
}

.page-card-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--primary-dark);
    line-height: 1.2;
}

.page-card-sub {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Summary rows inside sticky panel */
.summary-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px solid var(--border-color);
}

.summary-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.summary-value {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary-dark);
    text-align: right;
    max-width: 180px;
    word-break: break-word;
}

/* Resource check labels hover */
.resource-check:has(input:checked) {
    border-color: var(--primary) !important;
    background: rgba(106, 31, 194, 0.05) !important;
    color: var(--primary-dark) !important;
}

/* ========== STEP WIZARD — see dashboard-modals.css ========== */

/* ========== AJUSTES DE RESPONSIVIDADE E BANNERS ========== */

img, .banner-img {
    max-width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 12px;
}

/* ════════════════════════════════════════════════
   CORREÇÕES DE CONTRASTE — texto em fundos coloridos
   ════════════════════════════════════════════════ */

/* Banner / cards de destaque com fundo roxo escuro */
.banner-dark,
[style*="background: #0e0020"],
[style*="background:#0e0020"],
[style*="background: #1a003a"],
[style*="background:#1a003a"],
[style*="background: #2b0060"],
[style*="background:#2b0060"] {
    color: #ffffff !important;
}

.banner-dark h1,
.banner-dark h2,
.banner-dark h3,
.banner-dark h4,
.banner-dark p,
.banner-dark span,
.banner-dark label {
    color: #ffffff !important;
}

/* Cards de gradiente com fundo primário */
.card-gradient-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #ffffff;
}

.card-gradient-primary h1,
.card-gradient-primary h2,
.card-gradient-primary h3,
.card-gradient-primary p,
.card-gradient-primary span {
    color: #ffffff;
}

.card-gradient-primary .card-title,
.card-gradient-primary .card-value {
    color: #ffffff;
}

/* Botões secundários/ghost sobre fundos escuros */
.on-dark .btn-ghost {
    color: rgba(255, 255, 255, 0.80) !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
}

.on-dark .btn-ghost:hover {
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    background: rgba(255, 255, 255, 0.10) !important;
}

/* ── Quick Action Buttons (header do dashboard) ── */
/* Texto dos botões de ação rápida em fundo branco = cor escura OK */
.quick-action-label {
    color: var(--text-main);
    font-weight: 800;
    font-size: 14px;
}

.quick-action-sub {
    color: var(--text-muted);
    font-size: 11px;
}

.step {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    flex-shrink: 0;
}

.step .step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--border-color);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    transition: all 0.3s;
}

.step.active { color: var(--primary-dark); }
.step.active .step-num { background: var(--primary); color: white; }
.step.done { color: #22c55e; }
.step.done .step-num { background: #22c55e; color: white; }

.step-connector {
    flex: 1;
    height: 2px;
    background: var(--border-color);
    margin: 0 16px;
    min-width: 30px;
    border-radius: 2px;
}

.step-connector.done {
    background: #22c55e;
}

/* Step content panels */
.step-panel {
    display: none;
}

.step-panel.active {
    display: block;
}

.step-panel .panel-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--primary-dark);
    margin-bottom: 4px;
}

.step-panel .panel-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

/* ========== DISCIPLINE CHIPS ========== */
.disc-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.disc-chip {
    background: white;
    border: 1.5px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
}

.disc-chip:hover {
    border-color: var(--primary-light);
    color: var(--primary-dark);
}

.disc-chip.active {
    background: var(--primary-dark);
    color: white;
    border-color: var(--primary-dark);
}

/* ========== TEMPLATE CARDS ========== */
.template-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.template-card {
    border: 1.5px solid var(--border-color);
    padding: 16px;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    background: white;
}

.template-card:hover {
    border-color: var(--primary-light);
    background: #fcfaff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(106, 31, 194, 0.08);
}

.template-card i {
    font-size: 24px;
    color: var(--primary-light);
    margin-bottom: 8px;
    display: block;
}

.template-card span {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
}

.template-card .template-desc {
    display: block;
    font-size: 11px;
    font-weight: 400;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ========== BNCC SELECTOR ========== */
.bncc-search {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--border-color);
    border-radius: 12px;
    font-family: inherit;
    font-size: 13px;
    margin-bottom: 8px;
}

.bncc-search:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 4px rgba(106, 31, 194, 0.1);
}

.bncc-list {
    max-height: 180px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 4px;
}

.bncc-item {
    padding: 8px 12px;
    font-size: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bncc-item:hover {
    background: rgba(106, 31, 194, 0.06);
}

.bncc-item .bncc-code {
    font-weight: 800;
    color: var(--primary);
    font-size: 11px;
    min-width: 70px;
}

.bncc-item .bncc-text {
    color: var(--text-muted);
}

.bncc-item.selected {
    background: rgba(106, 31, 194, 0.1);
}

.bncc-item.selected .bncc-code {
    color: var(--primary-dark);
}

/* ========== LOADING OVERLAY ========== */
.loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.9);
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 16px;
    border-radius: 24px;
    z-index: 10;
}

.loading-overlay.active {
    display: flex;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    font-size: 15px;
    font-weight: 700;
    color: var(--primary-dark);
}

.loading-subtext {
    font-size: 12px;
    color: var(--text-muted);
}

/* ═══════════════════════════════════════════
   SCROLLBAR CUSTOMIZADA
   ═══════════════════════════════════════════ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(106,31,194,0.2); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: rgba(106,31,194,0.4); }

/* ═══════════════════════════════════════════
   RESPONSIVIDADE TOTAL
   ═══════════════════════════════════════════ */
@media (max-width: 1200px) {
    .main-content {
        padding: 30px 32px;
    }
    .dashboard-grid {
        grid-template-columns: 1fr 300px;
    }
}

@media (max-width: 1024px) {
    .main-content {
        padding: 24px 24px;
    }
    .dashboard-grid {
        grid-template-columns: 1fr 280px;
        gap: 16px;
    }
}

@media (max-width: 900px) {
    .main-content {
        padding: 20px 16px;
    }
    /* Stack calendar below panel on medium screens */
    .dashboard-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
    }
    .day-details-card {
        min-height: 280px;
        max-height: 320px;
    }
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    .quick-actions-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    /* Sidebar colapsada — só ícones */
    .sidebar {
        width: var(--sidebar-collapsed);
        padding: 20px 10px;
        overflow: visible;
    }
    .sidebar::before { display: none; }
    .sidebar-logo span,
    .nav-link span,
    .sidebar-user-info,
    .sidebar-user {
        display: none;
    }
    .sidebar-logo {
        justify-content: center;
        padding: 4px;
        margin-bottom: 28px;
    }
    .sidebar-logo img {
        width: 36px;
        height: 36px;
    }
    .nav-link {
        justify-content: center;
        padding: 12px;
        border-radius: 12px;
    }
    .nav-link::before { display: none; }
    .nav-link i {
        font-size: 18px;
        width: auto;
    }
    .main-content {
        margin-left: var(--sidebar-collapsed);
        padding: 16px 14px;
    }
    .quick-actions-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    .quick-action-btn {
        padding: 12px 14px;
        gap: 10px;
    }
    .quick-action-icon {
        width: 36px;
        height: 36px;
    }
}

@media (max-width: 600px) {
    .quick-actions-grid {
        grid-template-columns: 1fr;
    }
    .header-user {
        display: none; /* hidden on small — user info in sidebar */
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 12px 10px;
    }
    .card { padding: 20px; }
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Responsive: Atividade and Planejador pages ── */
@media (max-width: 1100px) {
    /* Collapse to single column at 1100 */
    .main-content > div[style*="grid-template-columns:1fr 340px"],
    .main-content > div[style*="grid-template-columns: 1fr 340px"] {
        grid-template-columns: 1fr !important;
    }
    .main-content > div[style*="position:sticky"],
    .main-content > div[style*="top:24px"] {
        position: static !important;
    }
}

@media (max-width: 900px) {
    /* 3-col template-grid → 2 cols */
    .template-grid[style*="grid-template-columns:repeat(3,1fr)"],
    .template-grid[style*="grid-template-columns: repeat(3, 1fr)"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .page-card { padding: 18px; }
}

@media (max-width: 540px) {
    /* 2-col template-grid → 1 col on mobile */
    .template-grid {
        grid-template-columns: 1fr !important;
    }
    .ai-options-grid {
        grid-template-columns: 1fr 1fr !important;
    }
    .page-card { padding: 14px; }
    .page-card-header { gap: 10px; margin-bottom: 14px; }
}

/* ========== COMPACT CALENDAR OVERRIDES ========== */
.calendar-card {
    max-height: 430px !important;
    overflow: hidden !important;
}
.fc {
    max-height: 350px !important;
}
.fc-toolbar {
    margin-bottom: 6px !important;
    padding: 0 !important;
}
.fc-toolbar-title {
    font-size: 13px !important;
    font-weight: 800 !important;
    color: var(--primary-dark) !important;
    text-transform: capitalize;
}
.fc-button {
    padding: 4px 8px !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    border-radius: 6px !important;
    background-color: var(--primary-light) !important;
    border: none !important;
}
.fc-button:hover {
    background-color: var(--primary) !important;
}
.fc-button-active {
    background-color: var(--primary-dark) !important;
}
.fc .fc-daygrid-body {
    overflow: hidden !important;
}
.fc .fc-daygrid-day-frame {
    min-height: 44px !important;
    padding: 1px !important;
}
.fc-daygrid-day-top {
    font-size: 10px !important;
    font-weight: 700 !important;
}
.fc-event {
    font-size: 9px !important;
    padding: 0px 2px !important;
    border-radius: 3px !important;
    margin-top: 1px !important;
    line-height: 1.2 !important;
}
.fc-scroller {
    overflow: hidden !important;
}

/* ========== QUICK STATS BAR RESPONSIVE ========== */
@media (max-width: 768px) {
    .quick-stats-bar {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }
}
