
/* Layout Base e Container */
.cal-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 15px;
    font-family: 'Inter', sans-serif;
    background-color: #f8fafc;
}

.breadcrumb-box {
    font-size: 0.75rem;
    color: #64748b;
    margin-bottom: 15px;
}

/* Dashboard de Estatísticas */
.study-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 15px;
}

.stat-card {
    background: #fff;
    padding: 15px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
}

.stat-card small {
    font-size: 0.65rem;
    text-transform: uppercase;
    font-weight: 700;
    color: #94a3b8;
    letter-spacing: 0.025em;
}

.stat-card span {
    font-size: 1.25rem;
    font-weight: 800;
    color: #1e293b;
    margin: 4px 0;
}

.progress-wrapper {
    height: 4px;
    background: #f1f5f9;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 8px;
}

.progress-bar {
    height: 100%;
    background: #4f46e5;
    transition: width 0.5s ease;
}

/* Barra de Equilíbrio de Áreas */
.area-balance {
    display: flex;
    height: 6px;
    gap: 2px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 20px;
}

.area-bar { height: 100%; }
.label-exatas { background: #ef4444; }
.label-natureza { background: #10b981; }
.label-humanas { background: #f59e0b; }
.label-linguagens { background: #3b82f6; }
.label-redacao { background: #8b5cf6; }

/* Header do Calendário */
.cal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.nav-group { display: flex; align-items: center; gap: 15px; }

.btn-add {
    background: #1e293b;
    color: #fff;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s;
}

.btn-add:hover { background: #0f172a; }

.cal-header-nav { display: flex; align-items: center; gap: 15px; font-size: 0.85rem; }
.cal-header-nav a { color: #64748b; text-decoration: none; }

.view-toggle {
    background: #f1f5f9;
    padding: 4px 10px;
    border-radius: 20px;
    display: flex;
    gap: 8px;
    font-size: 0.7rem;
    border: 1px solid #e2e8f0;
}

/* Grid do Calendário */
.cal-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}

.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.weekday-label {
    background: #f8fafc;
    padding: 10px;
    text-align: center;
    font-weight: 700;
    font-size: 0.7rem;
    color: #64748b;
    border-bottom: 1px solid #e2e8f0;
    border-right: 1px solid #f1f5f9;
}

.cal-cell {
    min-height: 140px;
    padding: 8px;
    border-right: 1px solid #f1f5f9;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: background 0.1s;
}

.cal-cell:hover { background: #fcfcfc; }

.day-n {
    font-size: 0.75rem;
    font-weight: 600;
    color: #94a3b8;
    display: inline-block;
    width: 24px;
    height: 24px;
    text-align: center;
    line-height: 24px;
}

.day-n.is-today {
    background: #4f46e5;
    color: #fff;
    border-radius: 50%;
}

/* Card de Estudo (Study Item) */
.study-item {
    padding: 6px;
    border-radius: 4px;
    margin-top: 6px;
    position: relative;
    font-size: 0.7rem;
    transition: transform 0.1s;
}

.study-item:hover { transform: translateY(-1px); }

.type-badge {
    font-size: 0.55rem;
    padding: 1px 4px;
    border-radius: 3px;
    text-transform: uppercase;
    font-weight: 800;
    background: rgba(0,0,0,0.06);
    margin-bottom: 4px;
}

.study-subject {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.study-info {
    display: block;
    font-size: 0.65rem;
    opacity: 0.8;
    margin-bottom: 2px;
}

.study-info i { width: 12px; margin-right: 3px; }

/* Barra de Performance Interna do Card */
.perf-bar {
    width: 100%;
    height: 3px;
    background: rgba(0,0,0,0.05);
    margin: 6px 0;
    border-radius: 2px;
}

.perf-fill {
    height: 100%;
    background: currentColor;
    border-radius: 2px;
}

/* Ações e Botões de Status */
.btn-delete {
    position: absolute;
    top: 2px;
    right: 2px;
    background: none;
    border: none;
    color: inherit;
    opacity: 0.4;
    cursor: pointer;
    font-size: 1rem;
}

.btn-delete:hover { opacity: 1; }

.status-group {
    display: flex;
    gap: 3px;
    margin-top: 6px;
}

.btn-status-toggle {
    width: 100%;
    font-size: 0.6rem;
    padding: 3px;
    border: 1px solid currentColor;
    background: transparent;
    border-radius: 3px;
    font-weight: 700;
    cursor: pointer;
    opacity: 0.6;
}

.btn-status-toggle.active {
    background: currentColor;
    color: #fff !important;
    opacity: 1;
}

/* Responsividade */
@media (max-width: 768px) {
    .cal-grid { grid-template-columns: 1fr; }
    .weekday-label { display: none; }
    .cal-cell { min-height: auto; border-right: none; }
    .study-dashboard { grid-template-columns: 1fr 1fr; }
}
