html {
    margin: 0;
    padding: 0;
}
body {
    margin: 0;
    font-size: medium;
    font-family: "Roboto", sans-serif;
    line-height: 1.5;
    scroll-behavior: smooth;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    color: #1F2937;
    background: linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
}
.titulo_app{
    font-size: 1.45rem;
    color: #000000;
    font-weight: bold;    
}
.app-topbar {
    position: sticky;
    top: 0;
    z-index: 1030;
    backdrop-filter: saturate(160%) blur(6px);
    background: rgba(255, 255, 255, 0.88);
    border-bottom: 1px solid #e5e7eb;
}
.app-topbar-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 10px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}
.brand-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}
.school-logo {
    max-width: 135px;
    max-height: 76px;
    width: auto;
    height: auto;
}
.app-subtitle {
    color: #475569;
    font-size: 0.92rem;
}
.session-wrap {
    display: flex;
    align-items: center;
}
.session-icon {
    color: #64748b;
    font-size: 1.25rem;
}
.session-user {
    margin-left: 4px;
    font-weight: 600;
    color: #0f172a;
}
.app-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 14px 16px 24px 16px;
}
.app-divider {
    height: 1px;
    background: #e2e8f0;
    margin-bottom: 16px;
}
.footer{
    clear: both;
}
.estudante{
    font-size: smaller;
    color: #1E3A8A;
    font-weight: normal;    
}
.aluno_cabeca{
    clear: both;
}
.nomealuno{
    font-size: large;
    color: #2563EB;
    font-weight: bold;
}
.nomeunidade{
    font-size: medium;
    color: #1E3A8A;
    font-weight: bold;
}
.ano_segmento_serie{
    font-size: small;
    color: #1E3A8A;
    font-weight: bold;
}
.segmento{
    font-size: small;
    color: #1E3A8A;
    font-weight: bold;
}
.valor{
    font-size: medium;
    color: #1E3A8A;
    font-weight: bold;
}
.student-details {
    padding: 20px;
    margin-left: 14px;
    max-width: 800px;
}

.student-details .ano_segmento_serie {
    margin-bottom: 15px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 5px;
    display: inline-block;
}

.opcoes {
    clear: both;
    margin-top: 14px;
    margin-left: 0;
    font-size: medium;
    color: #1F2937;
    padding: 18px;
    background-color: #ffffff;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.07);
}
.wizard-header {
    margin-bottom: 16px;
}
.wizard-heading-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 8px;
}
.wizard-title {
    font-size: 1.08rem;
    font-weight: 700;
    margin: 0;
    color: #0f172a;
}
.wizard-subtitle {
    font-size: 0.9rem;
    color: #64748b;
    margin: 2px 0 0 0;
}
.wizard-step {
    font-size: 0.78rem;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
    white-space: nowrap;
}
.wizard-progress {
    margin-top: 8px;
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
}
.wizard-progress > span {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 999px;
    background: var(--e-global-color-primary, #1E3A8A);
    transition: width 260ms ease-in-out;
}

.text-bg-purple {
    color: #fff !important;
    background-color: #6f42c1 !important;
}
.intro-alert {
    position: relative;
    background: #0f172a;
    color: #ffffff;
    border-radius: 16px;
    padding: 28px;
    overflow: hidden;
    box-shadow: 0 22px 36px rgba(15, 23, 42, 0.35);
}
.intro-layout {
    font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}
.intro-alert-title {
    margin-bottom: 16px;
}
.intro-alert-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}
.intro-alert-title h2 {
    margin: 0;
    color: #facc15;
    font-size: clamp(1.5rem, 2.8vw, 2.3rem);
    font-weight: 900;
    letter-spacing: -0.01em;
    text-transform: none;
    line-height: 1.1;
}
.intro-alert-title h3 {
    margin: 8px 0 0 0;
    color: #22d3ee;
    font-size: clamp(1rem, 2vw, 1.25rem);
    font-weight: 700;
}

.cache-refresh-modal .modal-content {
    border-radius: 16px;
    background: linear-gradient(165deg, #ffffff 0%, #f8fafc 100%);
}

.cache-refresh-modal .modal-body h5 {
    color: #0f172a;
    font-weight: 700;
}

.cache-refresh-modal .modal-body p {
    color: #475569;
}

.cache-refresh-loader {
    display: inline-flex;
    align-items: flex-end;
    gap: 6px;
    height: 24px;
}

.cache-refresh-loader span {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #f59e0b;
    box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.2);
    animation: cacheRefreshPulse 1s infinite ease-in-out;
}

.cache-refresh-loader span:nth-child(2) {
    animation-delay: 0.15s;
}

.cache-refresh-loader span:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes cacheRefreshPulse {
    0%, 100% {
        transform: translateY(0);
        opacity: 0.55;
    }
    50% {
        transform: translateY(-8px);
        opacity: 1;
    }
}
.intro-alert-toggle {
    width: 34px;
    height: 34px;
    border: 1px solid rgba(148, 163, 184, 0.45);
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.45);
    color: #cbd5e1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex: 0 0 auto;
}
.intro-alert-toggle .material-icons {
    font-size: 1.18rem;
}
.intro-alert-toggle:hover,
.intro-alert-toggle:focus {
    border-color: #facc15;
    color: #facc15;
}
.intro-alert--collapsed .intro-alert-title {
    margin-bottom: 0;
}
.intro-alert--collapsed .intro-alert-title h3,
.intro-alert--collapsed .intro-alert-text {
    display: none;
}
.intro-alert-text {
    color: #cbd5e1;
    line-height: 1.65;
    font-size: 0.96rem;
}
.intro-alert-text p {
    margin-bottom: 12px;
}
.intro-alert-text strong {
    color: #ffffff;
}
.intro-callout {
    background: rgba(30, 41, 59, 0.6);
    border-left: 4px solid #f59e0b;
    color: #fde68a;
    border-radius: 10px;
    padding: 12px 14px;
    font-style: italic;
}
.intro-start-box {
    border: 1px solid #d5dce6;
    border-radius: 16px;
    background: #f3f4f6;
    padding: 18px 14px;
}
.person-start-header {
    display: flex;
    align-items: center;
    gap: 14px;
    max-width: 680px;
    margin: 0 auto 10px auto;
}
.person-start-header-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #c7d2fe;
    color: #4338ca;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.person-start-header-icon .material-icons {
    font-size: 1.4rem;
}
.person-start-header-text h4 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
    color: #0f172a;
}
.person-start-header-text p {
    margin: 2px 0 0 0;
    color: #64748b;
    font-size: 0.94rem;
}
.person-start-progress-pill {
    max-width: fit-content;
    margin: 0 auto 14px auto;
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid #d5dce6;
    background: #f8fafc;
    color: #334155;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}
.progress-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #fbbf24;
}

.progress-dot--done {
    background: #22c55e;
}
.person-start-actions {
    display: grid;
    gap: 12px;
    max-width: 100%;
    margin: 0 auto;
}
@media (min-width: 769px) {
    .person-start-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
.person-card {
    border: 1px solid #cbd5e1;
    border-radius: 18px;
    background: #ffffff;
    min-height: 106px;
    width: 100%;
    padding: 14px 16px;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 12px;
    text-align: left;
    cursor: pointer;
    font: inherit;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.person-card:hover,
.person-card:focus {
    border-color: #94a3b8;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
}
.person-card-main {
    min-width: 0;
}
.person-card-role {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 4px 9px;
    text-transform: uppercase;
}
.person-card-role.role-responsavel {
    background: #f3e8ff; /* Fundo roxo bem claro */
    color: #6b21a8;      /* Texto roxo escuro */
}
.person-card-role.role-estudante {
    background: #dbeafe;
    color: #1d4ed8;
}
.person-card-role .material-icons {
    font-size: 0.82rem;
}
.person-card-name {
    display: block;
    margin-top: 7px;
    font-size: 0.98rem;
    font-weight: 700;
    color: #0f172a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.person-card-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}
.person-card-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border-radius: 9px;
    padding: 4px 9px;
    font-size: 0.84rem;
    font-weight: 500;
    border: 1px solid;
}
.person-card-status .material-icons {
    font-size: 0.92rem;
}
.status-pending {
    color: #d97706;
    background: #fef3c7;
    border-color: #fcd34d;
}
.status-done {
    color: #166534;
    background: #dcfce7;
    border-color: #86efac;
}
.person-card-chevron {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #94a3b8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.person-card-chevron .material-icons {
    font-size: 1.1rem;
}
.person-card--done {
    border-color: #15803d;
    background: #16a34a;
}
.person-card--done .person-card-name {
    color: #ffffff;
}
.person-card--done .person-card-role.role-responsavel {
    background: rgba(20, 83, 45, 0.28);
    color: #dcfce7;
}
.person-card--done .person-card-role.role-estudante {
    background: rgba(30, 64, 175, 0.28);
    color: #dbeafe;
}
.person-card--done .person-card-chevron {
    display: none;
}

.person-card--done {
    cursor: default;
}

.person-card:disabled {
    opacity: 1;
    pointer-events: none;
}
.person-card-review-btn {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.2s;
}
.person-card-review-btn:hover,
.person-card-review-btn:focus {
    background: rgba(255, 255, 255, 0.32);
    transform: translateY(-1px);
}
.person-card-review-btn .material-icons {
    font-size: 1.05rem;
}
.person-card--pending {
    border-color: #cbd5e1;
    background: #ffffff;
}

.form-control:focus,
.form-select:focus {
    border-color: #94a3b8;
    box-shadow: 0 0 0 0.18rem rgba(30, 58, 138, 0.16);
}

.form-label {
    font-weight: 700;
    color: #334155;
}

.wizard-panel .card {
    border: 1px solid #d8e0eb;
    border-radius: 12px;
    background: #f5f7fb;
}

.wizard-panel .card-body {
    background: #f5f7fb;
    border-radius: 12px;
}

.wizard-panel .form-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
    color: #66758a;
    margin-bottom: 0.35rem;
}

.wizard-panel .form-control,
.wizard-panel .form-select {
    min-height: 44px;
    border-radius: 10px;
    border-color: #c9d3e1;
    background: #eef2f7;
    color: #11253d;
}

.wizard-panel .form-control::placeholder {
    color: #8a97a8;
}

.wizard-panel .form-select {
    padding-right: 34px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2392A0B2' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 20h9'/%3E%3Cpath d='M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4 12.5-12.5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 14px 14px;
}

.wizard-panel input.form-control:not([type]),
.wizard-panel input.form-control[type="text"],
.wizard-panel input.form-control[type="tel"],
.wizard-panel input.form-control[type="email"] {
    padding-right: 34px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2392A0B2' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 20h9'/%3E%3Cpath d='M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4 12.5-12.5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 14px 14px;
}

.wizard-panel input.form-control[readonly],
.wizard-panel input.form-control:disabled {
    background-image: none;
    padding-right: 12px;
}

.wizard-panel .form-select:disabled {
    background-image: none;
    padding-right: 12px;
}

.wizard-panel .autofill-readonly {
    background-color: #e8edf5;
    color: #5e6e82;
}
.wizard-panel .cpf-frozen-input {
    background-color: #eff6ff;
    border-color: #93c5fd;
    color: #1d4ed8;
    cursor: not-allowed;
}

.confirm-box {
    margin: 2px 0 0 0;
    border: 2px solid #e6c957;
    border-radius: 14px;
    background: #f7f4e8;
    padding: 18px 22px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    color: #1e2f49;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.35;
    cursor: pointer;
}

.confirm-box input[type="checkbox"] {
    width: 24px;
    height: 24px;
    margin-top: 1px;
    accent-color: #1f4fd2;
    cursor: pointer;
    flex: 0 0 auto;
}

.review-editable-field .review-editable-input {
    border-color: #dc3545;
    background: #fff5f5;
}

.review-editable-field .review-editable-input:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.22rem rgba(220, 53, 69, 0.15);
}

.review-approved-field .review-approved-input {
    border-color: #198754;
    background: #f1fbf5;
}

.review-approved-field .review-approved-input:focus {
    border-color: #198754;
    box-shadow: 0 0 0 0.22rem rgba(25, 135, 84, 0.15);
}

.review-status-ok {
    margin-top: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #198754;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.review-status-ok-icon {
    width: 16px;
    height: 16px;
    border-radius: 999px;
    background: #198754;
    position: relative;
    flex: 0 0 16px;
}

.review-status-ok-icon::before {
    content: "\2713";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -54%);
    color: #ffffff;
    font-size: 0.72rem;
    line-height: 1;
}

.cep-highlight-field .form-label {
    color: var(--e-global-color-primary, #1E3A8A);
}

.cep-highlight-input {
    border-width: 2px;
    border-color: var(--e-global-color-primary, #1E3A8A);
    background: #eff6ff;
}

.cep-highlight-input:focus {
    border-color: var(--e-global-color-primary, #1E3A8A);
    box-shadow: 0 0 0 0.22rem rgba(30, 58, 138, 0.2);
}

.autofill-readonly {
    background: #f1f5f9;
    color: #475569;
    cursor: not-allowed;
}
.escola_da_vila {
    --e-global-color-primary: #1E3A8A;     /* azul escuro predominante */
    --e-global-color-secondary: #FACC15;   /* amarelo vibrante */
    --e-global-color-text: #1F2937;        /* quase preto, tom de cinza muito escuro */
    --e-global-color-accent: #F97316;      /* laranja/chama para destaques */
    --e-global-color-9758276: #2563EB;     /* azul mais claro para hover / links */
    --e-global-color-64d92d1: #10B981;     /* verde para elementos específicos */
    --e-global-color-3ec0a29: #DC2626;     /* vermelho forte para alertas ou erros */
    --e-global-color-d61cbf1: #9333EA;     /* roxo para toques decorativos ou seções especiais */
}

.btn-primary:disabled {
    background-color: #cccccc;
    border-color: #cccccc;
    color: #666666;
    opacity: 0.65;
    cursor: not-allowed;
}

/* Estilo para o modal de loading */
#loadingModal .modal-content {
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
}

#loadingModal .spinner-border {
    color: #ffffff !important;
}

#loadingModal .modal-body {
    padding: 2rem;
}

/* Escurece o fundo quando o modal está aberto */
.modal-backdrop.show {
    opacity: 0.7;
}

.custom-dropdown {
    position: relative;
    max-width: 600px;
}

.selected-student {
    padding: 10px;
    border-radius: 6px;
    background-color: #f9fafb;
}

.selected-student .student-label {
    font-size: smaller;
    color: #1E3A8A;
    margin-bottom: 4px;
}

.student-info-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.student-info-row .ano_segmento_serie {
    font-size: small;
    color: #4B5563;
    margin-top: 8px;
    font-weight: normal;
    padding: 4px 8px;
    background-color: #f3f4f6;
    border-radius: 4px;
    display: inline-block;
}

.student-selector {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.student-selector select {
    width: 100%;
    padding: 8px 32px 8px 0;
    font-size: large;
    color: #2563EB;
    font-weight: bold;
    border: none;
    background: transparent;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.selected-student .ano_segmento_serie {
    font-size: small;
    color: #4B5563;
    padding: 4px 8px;
    background-color: #f3f4f6;
    border-radius: 4px;
    margin-top: 4px;
    display: inline-block;
}

.student-selector select:focus {
    outline: none;
    box-shadow: none;
}

.student-selector select option {
    background-color: white;
    color: #1F2937;
    font-size: medium;
    font-weight: normal;
}

.dropdown-toggle-icon {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    pointer-events: none;
}

/* Estilos para o seletor de dias da semana */
.dias-semana-container {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    margin-bottom: 15px;
}

.dia-semana-label {
    display: block;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    cursor: pointer;
    text-align: center;
    font-weight: bold;
    transition: background-color 0.2s, color 0.2s;
}

.dia-semana-label:hover {
    background-color: #f0f0f0;
}

.dia-semana-input {
    display: none; /* Esconde o checkbox original */
}

.dia-semana-input:checked + .dia-semana-label {
    background-color: var(--e-global-color-primary, #1E3A8A);
    color: white;
    border-color: var(--e-global-color-primary, #1E3A8A);
}

.admin-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.admin-toolbar-btn {
    flex: 0 0 auto;
}

.admin-toolbar-meta {
    flex: 1 1 100%;
    width: 100%;
}

.snapshot-open-trigger {
    cursor: pointer;
}

.snapshot-open-trigger:focus {
    outline: 2px solid rgba(37, 99, 235, 0.45);
    outline-offset: 2px;
}

.snapshot-badge-btn {
    border: 0;
    line-height: 1.25;
}

@media (max-width: 768px) {
    body {
        margin: 0;
        font-size: 15px;
    }

    .app-topbar-inner {
        padding: 10px 12px;
    }

    .brand-wrap {
        gap: 8px;
    }

    .school-logo {
        max-width: 92px;
        max-height: 56px;
    }

    .titulo_app {
        font-size: 1rem;
        line-height: 1.3;
    }

    .app-subtitle {
        font-size: 0.8rem;
    }

    .session-user {
        display: none;
    }

    .app-content {
        padding: 12px 10px 20px 10px;
    }

    .opcoes {
        margin-left: 0;
        margin-right: 0;
        padding: 12px;
        border-radius: 10px;
    }

    .intro-alert {
        padding: 18px;
    }

    .intro-alert-title h2 {
        font-size: 1.45rem;
    }

    .intro-alert-title h3 {
        font-size: 0.96rem;
    }

    .intro-alert-toggle {
        width: 30px;
        height: 30px;
    }

    .intro-start-box {
        padding: 16px 12px;
    }

    .person-start-header {
        align-items: flex-start;
    }

    .person-start-header-icon {
        width: 44px;
        height: 44px;
    }

    .person-start-header-text h4 {
        font-size: 0.98rem;
    }

    .person-start-header-text p {
        font-size: 0.86rem;
    }

    .person-card {
        grid-template-columns: 1fr auto;
        padding: 12px;
        min-height: 98px;
    }

    .person-card-name {
        font-size: 0.92rem;
        white-space: normal;
    }

    .person-card-status {
        font-size: 0.76rem;
    }

    .person-card-chevron {
        width: 32px;
        height: 32px;
    }

    .card-body {
        padding: 0.85rem;
    }

    .wizard-panel .form-label {
        font-size: 0.66rem;
        margin-bottom: 0.3rem;
    }

    .wizard-panel .form-control,
    .wizard-panel .form-select {
        min-height: 44px;
        font-size: 16px;
    }

    .btn {
        min-height: 44px;
    }

    .d-flex.gap-2 {
        flex-direction: column;
    }

    .d-flex.gap-2 .btn {
        width: 100%;
    }

    .admin-page .admin-toolbar {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
    }

    .admin-page .admin-toolbar-btn {
        width: 100%;
        min-height: 40px;
        padding: 0.35rem 0.4rem;
        font-size: 0.78rem;
        line-height: 1.2;
        white-space: normal;
    }

    .admin-page .admin-kpi-row .display-6 {
        font-size: 1.55rem;
    }

    .admin-page .admin-kpi-row .card-body {
        padding: 0.75rem;
    }
}
