.boletim-escolar-app { font-size: 14px; }
.boletim-escolar-app body { background: #f5f7fa; }
.boletim-escolar-app .boletim-header-bar {
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    color: white;
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 24px;
}
.boletim-escolar-app .boletim-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.boletim-escolar-app .boletim-card-header {
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    color: white;
    border-radius: 12px 12px 0 0 !important;
    padding: 14px 20px;
}
.boletim-escolar-app .upload-zone {
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    padding: 32px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: #fafafa;
}
.boletim-escolar-app .upload-zone:hover { border-color: #4f46e5; background: #f0f0ff; }
.boletim-escolar-app .upload-zone.dragover { border-color: #4f46e5; background: #eef2ff; }
.boletim-escolar-app .upload-icon { font-size: 40px; color: #4f46e5; margin-bottom: 12px; line-height: 1; }
.boletim-escolar-app .turma-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
}
.boletim-escolar-app .turma-item:hover { background: #f8f9ff; }
.boletim-escolar-app .turma-item:last-child { border-bottom: none; }
.boletim-escolar-app .turma-info { flex: 1; }
.boletim-escolar-app .turma-name { font-weight: 600; color: #1f2937; }
.boletim-escolar-app .turma-meta { font-size: 12px; color: #9ca3af; }
.boletim-escolar-app .badge-turma {
    background: #eef2ff;
    color: #4f46e5;
    font-size: 11px;
    padding: 2px 10px;
    border-radius: 12px;
    font-weight: 600;
}
.boletim-escolar-app .btn-sm-icon { padding: 4px 10px; font-size: 12px; }
.boletim-escolar-app .empty-state {
    text-align: center;
    padding: 32px 20px;
    color: #9ca3af;
}
.boletim-escolar-app .empty-state .icon { font-size: 36px; margin-bottom: 8px; }
.boletim-escolar-app .turma-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    margin-bottom: 32px;
    overflow: hidden;
}
.boletim-escolar-app .turma-header {
    background: #f8f9ff;
    padding: 14px 20px;
    border-bottom: 2px solid #e8eaff;
    font-weight: 600;
    color: #4f46e5;
}
.boletim-escolar-app .table-container { overflow-x: auto; }
.boletim-escolar-app .table { margin: 0; white-space: nowrap; }
.boletim-escolar-app .table th {
    background: #fafbff;
    text-align: center;
    vertical-align: middle;
    font-size: 12px;
    padding: 8px 4px;
    border-bottom: 2px solid #e5e7eb;
    color: #374151;
}
.boletim-escolar-app .table td {
    text-align: center;
    vertical-align: middle;
    padding: 6px 4px;
}
.boletim-escolar-app .table td:first-child { text-align: center; font-weight: 500; }
.boletim-escolar-app .table td:nth-child(2) {
    text-align: left;
    font-weight: 500;
    min-width: 200px;
    position: sticky;
    left: 0;
    background: white;
    z-index: 2;
}
.boletim-escolar-app .table th:nth-child(2) {
    position: sticky;
    left: 0;
    z-index: 3;
    background: #fafbff;
}
.boletim-escolar-app .bimester-group { background: #f0f4ff; }
.boletim-escolar-app .grade-cell { min-width: 44px; font-weight: 600; font-size: 13px; }
.boletim-escolar-app .grade-cell.MB { color: #059669; }
.boletim-escolar-app .grade-cell.B  { color: #2563eb; }
.boletim-escolar-app .grade-cell.R  { color: #d97706; }
.boletim-escolar-app .grade-cell.I  { color: #dc2626; }
.boletim-escolar-app .grade-cell.NF { color: #9ca3af; }
.boletim-escolar-app .grade-cell.none { color: #d1d5db; }
.boletim-escolar-app .grade-cell input.grade-input {
    width: 52px;
    padding: 2px 4px;
    font-size: 12px;
    border-radius: 4px;
    border: 1px solid #cbd5e1;
    text-align: center;
    font-weight: 600;
    text-transform: uppercase;
}
.boletim-escolar-app .grade-cell input.grade-input.invalid {
    border-color: #dc2626;
    background: #fef2f2;
}
.boletim-escolar-app .bg-label {
    background: #eef2ff;
    border-radius: 4px;
    padding: 2px 10px;
    font-size: 11px;
    color: #4f46e5;
    font-weight: 600;
}
.boletim-escolar-app .back-btn {
    color: white; opacity: 0.85; text-decoration: none; margin-right: 16px; cursor: pointer; background: none; border: none;
}
.boletim-escolar-app .back-btn:hover { opacity: 1; color: white; }
.boletim-escolar-app .edit-controls { display: none; gap: 8px; }
body.editing .boletim-escolar-app .edit-controls { display: flex; }
body.editing .boletim-escolar-app .view-controls { display: none; }
body.editing .boletim-escolar-app .grade-cell { padding: 4px; }
body.editing .boletim-escolar-app .grade-cell span { display: none; }
body.editing .boletim-escolar-app .grade-cell input.grade-input { display: inline-block; }
.boletim-escolar-app .grade-cell input.grade-input { display: none; }
.boletim-escolar-app .btn-outline-light { color: white; border-color: rgba(255,255,255,0.5); }
.boletim-escolar-app .btn-outline-light:hover { background: rgba(255,255,255,0.15); color: white; }
.boletim-escolar-app .btn-calc {
    display: none;
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 4px;
    border: 1px solid #4f46e5;
    background: white;
    color: #4f46e5;
    cursor: pointer;
    font-weight: 600;
    margin-top: 4px;
    white-space: nowrap;
}
.boletim-escolar-app .btn-calc:hover { background: #eef2ff; }
body.editing .boletim-escolar-app .btn-calc { display: inline-block; }
.boletim-escolar-app .spinner-border { width: 1.5rem; height: 1.5rem; }
