@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;700&display=swap');

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

body {
    font-family: 'DM Sans', Arial, sans-serif;
    background-color: #F4F7F5;
    color: #1A2332;
    font-size: 14px;
    line-height: 1.5;
    min-height: 100vh;
}

.form-container {
    max-width: 640px;
    margin: 0 auto;
    padding: 12px 16px 24px;
}

/* ===== Cards ===== */
.card {
    background: #fff;
    border: 1px solid #D4DDD8;
    border-radius: 8px;
    margin-bottom: 12px;
    overflow: hidden;
}

.card-body {
    padding: 24px;
}

/* ===== Header Card ===== */
.header-card {
    border-top: 10px solid;
    border-image: linear-gradient(90deg, #1B4D8A 0%, #218349 50%, #D4A017 100%) 1;
}

.header-card h1 {
    font-size: 32px;
    font-weight: 400;
    color: #1A2332;
    line-height: 1.25;
    margin-bottom: 12px;
}

.header-description {
    font-size: 14px;
    color: #1A2332;
    line-height: 1.7;
    margin-bottom: 16px;
}

.header-description strong {
    font-weight: 700;
}

.header-description p {
    margin-bottom: 12px;
}

.required-notice {
    color: #C93B2E;
    font-size: 14px;
    padding-top: 12px;
    border-top: 1px solid #D4DDD8;
}

/* ===== Section Headers ===== */
.section-header {
    background: #1B4D8A;
    color: #fff;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.4;
}

.section-header strong {
    font-weight: 700;
}

/* ===== Question Cards ===== */
.question-card .card-body {
    padding: 24px;
}

.question-title {
    font-size: 14px;
    font-weight: 400;
    color: #1A2332;
    margin-bottom: 16px;
    line-height: 1.6;
}

.question-title .required {
    color: #C93B2E;
    margin-left: 4px;
}

.question-description {
    font-size: 14px;
    color: #1A2332;
    line-height: 1.6;
    margin-bottom: 16px;
}

.question-description p {
    margin-bottom: 8px;
}

/* ===== Text Inputs ===== */
.text-input-wrapper {
    position: relative;
    margin-top: 8px;
}

.text-input {
    width: 100%;
    max-width: 320px;
    border: none;
    border-bottom: 1px solid #D4DDD8;
    padding: 8px 0;
    font-size: 16px;
    font-family: 'DM Sans', Arial, sans-serif;
    color: #1A2332;
    background: transparent;
    outline: none;
    transition: border-color 0.2s;
}

.text-input:focus {
    border-bottom: 2px solid #1B4D8A;
    padding-bottom: 7px;
}

.text-input::placeholder {
    color: #60766F;
}

.text-input.full-width {
    max-width: 100%;
}

/* Textarea */
.textarea-input {
    width: 100%;
    border: none;
    border-bottom: 1px solid #D4DDD8;
    padding: 8px 0;
    font-size: 14px;
    font-family: 'DM Sans', Arial, sans-serif;
    color: #1A2332;
    background: transparent;
    outline: none;
    resize: none;
    min-height: 32px;
    overflow: hidden;
    transition: border-color 0.2s;
}

.textarea-input:focus {
    border-bottom: 2px solid #1B4D8A;
    padding-bottom: 7px;
}

.textarea-input::placeholder {
    color: #60766F;
}

/* ===== Radio Buttons ===== */
.radio-group {
    display: flex;
    flex-direction: column;
}

.radio-option {
    display: flex;
    align-items: center;
    padding: 6px 0;
    cursor: pointer;
    min-height: 40px;
}

.radio-option input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #5A6B63;
    border-radius: 50%;
    margin-right: 12px;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    transition: border-color 0.2s;
}

.radio-option input[type="radio"]:checked {
    border-color: #1B4D8A;
}

.radio-option input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 10px;
    height: 10px;
    background: #1B4D8A;
    border-radius: 50%;
}

.radio-option label {
    font-size: 14px;
    color: #1A2332;
    cursor: pointer;
    flex: 1;
}

/* ===== Checkboxes ===== */
.checkbox-option {
    display: flex;
    align-items: center;
    padding: 6px 0;
    cursor: pointer;
    min-height: 40px;
}

.checkbox-option input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #5A6B63;
    border-radius: 2px;
    margin-right: 12px;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    transition: all 0.2s;
}

.checkbox-option input[type="checkbox"]:checked {
    background: #1B4D8A;
    border-color: #1B4D8A;
}

.checkbox-option input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    top: 1px;
    left: 4px;
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-option label {
    font-size: 14px;
    color: #1A2332;
    cursor: pointer;
    flex: 1;
}

/* "Outro:" inline text input */
.other-input {
    border: none;
    border-bottom: 1px solid #D4DDD8;
    padding: 4px 0;
    font-size: 14px;
    font-family: 'DM Sans', Arial, sans-serif;
    color: #1A2332;
    background: transparent;
    outline: none;
    margin-left: 4px;
    width: 200px;
}

.other-input:focus {
    border-bottom: 2px solid #1B4D8A;
}

.other-input:disabled {
    border-bottom: 1px solid #D4DDD8;
    color: #60766F;
}

/* ===== Grid / Matrix Questions ===== */
.grid-question {
    overflow-x: auto;
}

.grid-table {
    width: 100%;
    border-collapse: collapse;
}

.grid-table th {
    font-size: 12px;
    font-weight: 500;
    color: #1A2332;
    padding: 8px 0;
    text-align: center;
    min-width: 48px;
}

.grid-table td {
    text-align: center;
    padding: 12px 0;
    border-top: 1px solid #D4DDD8;
}

.grid-table td:first-child {
    text-align: left;
    font-size: 14px;
    color: #1A2332;
    padding-right: 16px;
    min-width: 140px;
}

.grid-table input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #5A6B63;
    border-radius: 50%;
    cursor: pointer;
    position: relative;
    transition: border-color 0.2s;
}

.grid-table input[type="radio"]:checked {
    border-color: #1B4D8A;
}

.grid-table input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 10px;
    height: 10px;
    background: #1B4D8A;
    border-radius: 50%;
}

/* ===== Linear Scale ===== */
.linear-scale {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.linear-scale .radio-option {
    padding: 4px 0;
}

/* ===== Buttons ===== */
.nav-buttons {
    display: flex;
    align-items: center;
    padding: 12px 0;
    gap: 8px;
}

.btn {
    font-family: 'DM Sans', Arial, sans-serif;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 24px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    background: none;
}

.btn-outlined {
    color: #1B4D8A;
    background: #fff;
    border: 1px solid #D4DDD8;
}

.btn-outlined:hover {
    background: #EDF2F7;
}

.btn-filled {
    color: #fff;
    background: #1B4D8A;
}

.btn-filled:hover {
    background: #143D6E;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.btn-text {
    color: #1B4D8A;
    font-weight: 500;
    cursor: pointer;
    background: none;
    border: none;
    font-size: 14px;
    font-family: 'DM Sans', Arial, sans-serif;
    margin-left: auto;
}

.btn-text:hover {
    text-decoration: underline;
}

.clear-selection {
    color: #1B4D8A;
    font-size: 13px;
    cursor: pointer;
    background: none;
    border: none;
    font-family: 'DM Sans', Arial, sans-serif;
    padding: 4px 0;
    margin-top: 4px;
    display: none;
}

.clear-selection.visible {
    display: inline-block;
}

.clear-selection:hover {
    text-decoration: underline;
}

/* ===== Validation Errors ===== */
.card.error {
    border-left: 4px solid #C93B2E;
}

.error-message {
    color: #C93B2E;
    font-size: 12px;
    margin-top: 8px;
    display: none;
}

.error-message.visible {
    display: block;
}

.grid-error {
    color: #C93B2E;
    font-size: 12px;
    margin-top: 8px;
    display: none;
}

.grid-error.visible {
    display: block;
}

/* ===== Footer ===== */
.form-footer {
    text-align: center;
    padding: 16px 0 24px;
    font-size: 12px;
    color: #60766F;
}

.form-footer p {
    margin-bottom: 4px;
}

.form-footer .brand {
    font-size: 16px;
    color: #60766F;
    margin-top: 12px;
    font-weight: 500;
}

.form-footer .brand strong {
    font-weight: 700;
}

/* ===== Confirmation Page ===== */
.confirmation-card .card-body {
    padding: 24px;
}

.confirmation-card .message {
    font-size: 14px;
    color: #1A2332;
    margin-bottom: 16px;
}

.confirmation-card .link {
    color: #218349;
    text-decoration: none;
    font-size: 14px;
}

.confirmation-card .link:hover {
    text-decoration: underline;
}

/* ===== Logo ===== */
.header-logo {
    display: block;
    width: 80px;
    height: auto;
    margin: 0 auto 16px;
}

/* ===== Page visibility ===== */
.form-page {
    display: none;
}

.form-page.active {
    display: block;
}

/* ===== Responsive ===== */
@media (max-width: 680px) {
    .form-container {
        padding: 8px;
    }

    .card-body {
        padding: 16px;
    }

    .header-card h1 {
        font-size: 24px;
    }

    .header-logo {
        width: 64px;
    }

    .grid-table td:first-child {
        min-width: 100px;
        font-size: 12px;
    }

    .grid-table th {
        font-size: 11px;
        min-width: 36px;
    }

    .text-input {
        max-width: 100%;
    }

    .other-input {
        width: 100%;
        max-width: 160px;
    }
}

/* ===== Mobile-first: small screens ===== */
@media (max-width: 480px) {
    .header-card h1 {
        font-size: 20px;
        word-break: break-word;
    }

    .grid-table td:first-child {
        min-width: 80px;
    }

    .grid-table th {
        min-width: 28px;
        font-size: 10px;
    }

    .badge {
        padding: 4px 8px;
        font-size: 11px;
    }

    .detail-card {
        padding: 12px;
    }

    .section-header {
        padding: 12px 16px;
        font-size: 14px;
    }

    .other-input {
        max-width: 120px;
    }
}

/* ============================================================
   PAINÉIS — Navbar, Cards, Dashboard, Tabelas
   ============================================================ */

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #1B4D8A;
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 12px;
}

.navbar-brand {
    color: #fff;
    font-size: 14px;
    font-weight: 500;
}

.navbar-links {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.navbar-links a,
.navbar-links button {
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    padding: 6px 12px;
    border-radius: 4px;
    background: none;
    border: 1px solid rgba(255,255,255,0.3);
    cursor: pointer;
    font-family: inherit;
}

.navbar-links a:hover,
.navbar-links button:hover {
    background: rgba(255,255,255,0.15);
}

.navbar-links a.active {
    background: rgba(255,255,255,0.2);
    border-color: #fff;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.stat-card {
    background: #fff;
    border: 1px solid #D4DDD8;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
}

.stat-card .stat-number {
    font-size: 32px;
    font-weight: 700;
    color: #1B4D8A;
    line-height: 1.2;
}

.stat-card .stat-label {
    font-size: 12px;
    color: #60766F;
    margin-top: 4px;
}

.chart-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.chart-card {
    background: #fff;
    border: 1px solid #D4DDD8;
    border-radius: 8px;
    padding: 16px;
}

.chart-card h3 {
    font-size: 14px;
    font-weight: 500;
    color: #1A2332;
    margin-bottom: 12px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.data-table th {
    background: #F4F7F5;
    border-bottom: 2px solid #D4DDD8;
    padding: 10px 12px;
    text-align: left;
    font-weight: 500;
    color: #1A2332;
    font-size: 12px;
}

.data-table td {
    border-bottom: 1px solid #D4DDD8;
    padding: 10px 12px;
    color: #1A2332;
}

.data-table tr:hover td {
    background: #F4F7F5;
}

.data-table .actions {
    display: flex;
    gap: 6px;
}

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.badge-admin {
    background: #1B4D8A;
    color: #fff;
}

.badge-user {
    background: #D4DDD8;
    color: #1A2332;
}

.panel-section {
    margin-bottom: 20px;
}

.panel-section h2 {
    font-size: 16px;
    font-weight: 500;
    color: #1A2332;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #D4DDD8;
}

.detail-card {
    background: #fff;
    border: 1px solid #D4DDD8;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
}

.detail-card .detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.detail-card .detail-header h3 {
    font-size: 14px;
    font-weight: 500;
    color: #1B4D8A;
    margin: 0;
}

.detail-card .detail-header .detail-date {
    font-size: 12px;
    color: #60766F;
}

.detail-row {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 4px 12px;
    font-size: 13px;
    padding: 4px 0;
    border-bottom: 1px solid #F4F7F5;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-row .detail-label {
    font-weight: 500;
    color: #60766F;
}

.detail-row .detail-value {
    color: #1A2332;
}

.password-cell {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.password-masked {
    font-family: 'DM Sans', monospace;
    font-size: 13px;
    color: #60766F;
    letter-spacing: 2px;
}

.password-plain {
    font-family: 'DM Sans', monospace;
    background: #F4F7F5;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
    letter-spacing: 1px;
    user-select: all;
}

.btn-eye {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    padding: 2px;
    line-height: 1;
    opacity: 0.6;
}

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

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #60766F;
    font-size: 14px;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}

.pagination a,
.pagination span {
    padding: 6px 12px;
    border: 1px solid #D4DDD8;
    border-radius: 4px;
    font-size: 13px;
    text-decoration: none;
    color: #1B4D8A;
}

.pagination span.current {
    background: #1B4D8A;
    color: #fff;
    border-color: #1B4D8A;
}

.flash-message {
    padding: 10px 16px;
    border-radius: 6px;
    margin-bottom: 12px;
    font-size: 13px;
}

.flash-error {
    background: #fef2f2;
    color: #C93B2E;
    border: 1px solid #fecaca;
}

.flash-success {
    background: #f0fdf4;
    color: #218349;
    border: 1px solid #bbf7d0;
}

@media (max-width: 680px) {
    .navbar {
        flex-direction: column;
        gap: 8px;
    }

    .stat-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .chart-grid {
        grid-template-columns: 1fr;
    }

    .detail-row {
        grid-template-columns: 1fr;
    }

    .data-table {
        font-size: 11px;
    }

    .data-table th,
    .data-table td {
        padding: 8px 6px;
    }
}

/* ============================================================
   INLINE EDIT — Edição de campos na carteirinha
   ============================================================ */
.btn-edit { font-size: 11px; padding: 2px 8px; border: 1px solid #D4DDD8; border-radius: 4px; cursor: pointer; background: #fff; color: #1B4D8A; margin-left: 8px; white-space: nowrap; }
.btn-edit:hover { background: #EDF2F7; border-color: #1B4D8A; }
.edit-mode { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 4px; }
.edit-input-group { display: flex; gap: 4px; flex: 1; min-width: 0; align-items: center; flex-wrap: wrap; }
.edit-input { flex: 1; min-width: 120px; padding: 4px 8px; border: 1px solid #1B4D8A; border-radius: 4px; font-size: 13px; font-family: inherit; }
.btn-edit-save { font-size: 11px; padding: 4px 10px; border: none; border-radius: 4px; cursor: pointer; background: #218349; color: #fff; font-family: inherit; white-space: nowrap; }
.btn-edit-save:hover { background: #1a6e3c; }
.btn-edit-save:disabled { background: #999; cursor: wait; }
.btn-edit-cancel { font-size: 11px; padding: 4px 10px; border: 1px solid #D4DDD8; border-radius: 4px; cursor: pointer; background: #fff; color: #60766F; font-family: inherit; white-space: nowrap; }
.btn-edit-cancel:hover { background: #F4F7F5; }
.edit-error { display: none; color: #C93B2E; font-size: 11px; width: 100%; margin-top: 2px; }

/* ============================================================
   ASAAS — Badges de status, Toggle, Per-page selector
   ============================================================ */
.badge-habilitado { background: #218349; color: #fff; }
.badge-desabilitado { background: #999; color: #fff; }
.badge-pendente { background: #D4A017; color: #fff; }
.badge-matriculado { background: #1B4D8A; color: #fff; }
.badge-experimental { background: #E67E22; color: #fff; }
.toggle-btn { border: none; cursor: pointer; padding: 4px 10px; border-radius: 12px; font-size: 12px; font-weight: 600; }
.toggle-btn:hover { opacity: 0.85; }
.per-page-selector { display: inline-flex; align-items: center; gap: 8px; }
.per-page-selector select { padding: 6px 10px; border: 1px solid #D4DDD8; border-radius: 4px; font-size: 13px; }
.data-table-compact { table-layout: fixed; width: 100%; }
.data-table-compact th, .data-table-compact td { font-size: 12px; padding: 6px 8px; overflow: hidden; text-overflow: ellipsis; word-break: break-word; }
.data-table-compact th:first-child, .data-table-compact td:first-child { width: 22%; }
.data-table-compact th:nth-child(2), .data-table-compact td:nth-child(2) { width: 20%; }
.data-table-compact th:nth-child(3), .data-table-compact td:nth-child(3) { width: 18%; }
.data-table-compact th:nth-child(4), .data-table-compact td:nth-child(4) { width: 10%; text-align: center; }
.data-table-compact th:nth-child(5), .data-table-compact td:nth-child(5) { width: 16%; }
.data-table-compact th:nth-child(6), .data-table-compact td:nth-child(6) { width: 14%; }

/* ============================================================
   MATRÍCULA — Enrollment flow styles
   ============================================================ */
.matricula-section { margin-top: 16px; padding: 16px; background: rgba(255,255,255,0.03); border-radius: 10px; border: 1px solid rgba(255,255,255,0.06); }
.contrato-container {
    max-height: 380px;
    overflow-y: auto;
    padding: 28px 28px 28px 24px;
    background: linear-gradient(180deg, rgba(255,255,255,0.035) 0%, rgba(255,255,255,0.02) 100%);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    margin: 12px 0;
    font-size: 13.5px;
    line-height: 1.75;
    color: rgba(255,255,255,0.65);
    scrollbar-width: thin;
    scrollbar-color: rgba(212,160,23,0.25) transparent;
}
.contrato-container::-webkit-scrollbar { width: 6px; }
.contrato-container::-webkit-scrollbar-track { background: transparent; margin: 8px 0; }
.contrato-container::-webkit-scrollbar-thumb { background: rgba(212,160,23,0.25); border-radius: 3px; }
.contrato-container::-webkit-scrollbar-thumb:hover { background: rgba(212,160,23,0.45); }
.contrato-container p { color: rgba(255,255,255,0.60); margin-bottom: 12px; }
.contrato-container p:last-child { margin-bottom: 0; }
.contrato-container strong { color: rgba(255,255,255,0.88); }
.payment-options { display: flex; flex-direction: column; gap: 12px; margin: 16px 0; }
.payment-option { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border: 1px solid rgba(255,255,255,0.08); border-radius: 12px; cursor: pointer; background: rgba(255,255,255,0.02); transition: all 0.15s; color: rgba(255,255,255,0.80); }
.payment-option:hover { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.12); }
.payment-option.selected { border-color: rgba(27,77,138,0.5); background: rgba(27,77,138,0.10); }
.payment-option input[type="radio"] { accent-color: #3B82F6; }
.payment-option strong { color: rgba(255,255,255,0.90); }
.payment-option div { font-size: 12px; color: rgba(255,255,255,0.40); }
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-top: 12px; }
.parcelas-table { width: 100%; border-collapse: collapse; }
.parcelas-table th, .parcelas-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid rgba(255,255,255,0.06); font-size: 13px; white-space: nowrap; color: rgba(255,255,255,0.75); }
.parcelas-table th { background: rgba(255,255,255,0.04); font-weight: 600; color: rgba(255,255,255,0.50); text-transform: uppercase; font-size: 11px; letter-spacing: 0.3px; }
.parcelas-table td:last-child { white-space: nowrap; }
.btn-action { font-size: 11px; padding: 6px 12px; min-height: 28px; text-decoration: none; display: inline-block; border-radius: 8px; border: 1px solid rgba(255,255,255,0.12); color: rgba(255,255,255,0.65); background: rgba(255,255,255,0.04); transition: all 0.15s; }
.btn-action:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.20); color: #fff; }
.badge-pago { background: rgba(33,131,73,0.15); color: #6EE7B7; border: 1px solid rgba(33,131,73,0.20); }
.badge-vencido { background: rgba(201,59,46,0.15); color: #F87171; border: 1px solid rgba(201,59,46,0.20); }
.badge-a-vencer { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.50); border: 1px solid rgba(255,255,255,0.08); }
.pix-qrcode { text-align: center; margin: 16px 0; }
.pix-qrcode img { max-width: 200px; }
.pix-payload { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.06); padding: 12px; border-radius: 8px; font-family: monospace; font-size: 12px; word-break: break-all; margin: 8px 0; color: rgba(255,255,255,0.75); }

/* ── Matricula Ativa Redesign ── */
.mat-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.mat-title { font-family: 'Bebas Neue', Impact, sans-serif; font-size: 18px; color: rgba(255,255,255,0.85); letter-spacing: 1.5px; }
.mat-refresh-btn { display: inline-flex; align-items: center; gap: 6px; background: none; border: 1px solid rgba(255,255,255,0.08); border-radius: 8px; color: rgba(255,255,255,0.35); font-size: 11px; font-weight: 600; padding: 6px 12px; cursor: pointer; transition: all 0.15s; }
.mat-refresh-btn:hover { border-color: rgba(212,160,23,0.3); color: #D4A017; }
.mat-refresh-btn.refreshing { animation: matSpin 1s linear infinite; pointer-events: none; opacity: 0.5; }
@keyframes matSpin { to { transform: rotate(360deg); } }

/* Progress */
.mat-progress { margin-bottom: 20px; }
.mat-progress-bar { height: 6px; background: rgba(255,255,255,0.06); border-radius: 3px; overflow: hidden; }
.mat-progress-fill { height: 100%; background: linear-gradient(90deg, #218349, #6EE7B7); border-radius: 3px; transition: width 0.6s ease; }
.mat-progress-info { display: flex; justify-content: space-between; margin-top: 8px; font-size: 12px; color: rgba(255,255,255,0.35); font-weight: 600; }

/* Installment rows */
.mat-installments { display: flex; flex-direction: column; gap: 2px; }
.mat-inst { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 10px; background: rgba(255,255,255,0.02); border-left: 3px solid transparent; transition: all 0.15s; }
.mat-inst:hover { background: rgba(255,255,255,0.04); }
.mat-inst-paid { border-left-color: #218349; opacity: 0.65; }
.mat-inst-paid:hover { opacity: 0.85; }
.mat-inst-overdue { border-left-color: #C93B2E; background: rgba(201,59,46,0.04); }
.mat-inst-next { border-left-color: #D4A017; background: rgba(212,160,23,0.04); }
.mat-inst-num { width: 28px; height: 28px; border-radius: 50%; background: rgba(255,255,255,0.06); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: rgba(255,255,255,0.50); flex-shrink: 0; }
.mat-inst-next .mat-inst-num { background: rgba(212,160,23,0.15); color: #D4A017; }
.mat-inst-paid .mat-inst-num { background: rgba(33,131,73,0.12); color: #6EE7B7; }
.mat-inst-info { flex: 1; min-width: 0; display: flex; align-items: center; gap: 16px; }
.mat-inst-date { font-size: 13px; color: rgba(255,255,255,0.65); font-weight: 600; min-width: 90px; }
.mat-inst-value { font-size: 13px; color: rgba(255,255,255,0.50); font-weight: 500; }
.mat-inst-status { flex-shrink: 0; }
.mat-inst-action { flex-shrink: 0; }
.mat-action-btn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); color: rgba(255,255,255,0.50); cursor: pointer; transition: all 0.15s; text-decoration: none; }
.mat-action-btn:hover { background: rgba(212,160,23,0.10); border-color: rgba(212,160,23,0.25); color: #D4A017; }

/* PIX expandable area */
.mat-pix-area { overflow: hidden; border-radius: 12px; margin: -1px 0 4px; animation: matPixSlide 0.3s ease-out; }
@keyframes matPixSlide { from { opacity: 0; max-height: 0; } to { opacity: 1; max-height: 500px; } }
.mat-pix-content { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06); border-radius: 12px; padding: 24px; }
.mat-pix-grid { display: flex; align-items: flex-start; gap: 24px; }
.mat-pix-qr { flex-shrink: 0; background: #fff; border-radius: 12px; padding: 12px; display: flex; align-items: center; justify-content: center; }
.mat-pix-qr img { width: 160px; height: 160px; display: block; }
.mat-pix-info { flex: 1; min-width: 0; }
.mat-pix-info-title { font-size: 14px; font-weight: 700; color: rgba(255,255,255,0.85); margin-bottom: 6px; }
.mat-pix-info-desc { font-size: 12px; color: rgba(255,255,255,0.40); line-height: 1.5; margin-bottom: 14px; }
.mat-pix-code { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); border-radius: 8px; padding: 10px 14px; font-family: monospace; font-size: 11px; word-break: break-all; color: rgba(255,255,255,0.60); line-height: 1.4; max-height: 60px; overflow: hidden; }
.mat-pix-copy-btn { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; background: #D4A017; color: #0c1a2e; font-size: 12px; font-weight: 800; padding: 8px 18px; border-radius: 50px; border: none; cursor: pointer; transition: all 0.15s; font-family: inherit; }
.mat-pix-copy-btn:hover { background: #f0c040; box-shadow: 0 2px 12px rgba(212,160,23,0.3); }
.mat-pix-copy-btn.copied { background: #218349; color: #fff; }

/* Boleto action */
.mat-boleto-btn { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: rgba(255,255,255,0.50); text-decoration: none; transition: color 0.15s; }
.mat-boleto-btn:hover { color: #D4A017; }

/* Change payment method link */
.mat-change-method { display: inline-flex; align-items: center; gap: 6px; margin-top: 16px; font-size: 12px; color: rgba(255,255,255,0.25); cursor: pointer; background: none; border: none; transition: color 0.15s; font-family: inherit; }
.mat-change-method:hover { color: rgba(255,255,255,0.50); }

/* Responsive */
@media (max-width: 640px) {
    .mat-pix-grid { flex-direction: column; align-items: center; text-align: center; }
    .mat-pix-qr img { width: 140px; height: 140px; }
    .mat-inst { gap: 10px; padding: 12px; }
    .mat-inst-info { flex-direction: column; gap: 2px; }
    .mat-inst-date { min-width: unset; }
}
.btn-matricular { background: #218349; color: #fff; border: none; padding: 12px 24px; border-radius: 10px; font-size: 16px; font-weight: 600; cursor: pointer; width: 100%; margin-top: 16px; font-family: 'DM Sans', Arial, sans-serif; }
.btn-matricular:hover { background: #1a6e3c; }
.installment-preview { margin: 16px 0; }
.installment-preview h4 { color: rgba(255,255,255,0.75); }
.contrato-signature { display: flex; flex-direction: column; gap: 12px; margin: 16px 0; padding: 20px; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08); border-radius: 12px; }
.contrato-signature label { color: rgba(255,255,255,0.65); }
.contrato-signature input { padding: 10px 14px; border: 1px solid rgba(255,255,255,0.10); border-radius: 10px; font-size: 14px; background: rgba(255,255,255,0.04); color: rgba(255,255,255,0.85); }
.contrato-signature input:focus { outline: none; border-color: rgba(212,160,23,0.35); box-shadow: 0 0 0 3px rgba(212,160,23,0.06); }

/* Loading spinner */
.loading-spinner { display: flex; align-items: center; gap: 12px; justify-content: center; padding: 16px; font-size: 14px; color: rgba(255,255,255,0.45); }
.spinner { width: 24px; height: 24px; border: 3px solid rgba(255,255,255,0.1); border-top-color: #3B82F6; border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   EASTER EGG — Quick Login Modal
   ============================================================ */
.ee-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 35, 50, 0.6);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}
.ee-overlay.visible {
    display: flex;
}
.ee-modal {
    background: #fff;
    border-radius: 12px;
    padding: 28px 24px;
    max-width: 360px;
    width: 90%;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    text-align: center;
}
.ee-modal h3 {
    font-size: 16px;
    font-weight: 600;
    color: #1A2332;
    margin-bottom: 6px;
}
.ee-modal p {
    font-size: 12px;
    color: #60766F;
    margin-bottom: 16px;
}
.ee-btn {
    display: block;
    width: 100%;
    padding: 10px 16px;
    margin-bottom: 8px;
    border: 1px solid #D4DDD8;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    font-family: 'DM Sans', Arial, sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #1A2332;
    transition: background 0.15s, border-color 0.15s;
}
.ee-btn:hover {
    background: #F4F7F5;
    border-color: #1B4D8A;
}
.ee-btn.ee-admin {
    background: #1B4D8A;
    color: #fff;
    border-color: #1B4D8A;
}
.ee-btn.ee-admin:hover {
    background: #164070;
}
.ee-btn:last-child {
    margin-bottom: 0;
}
.ee-icon {
    margin-right: 6px;
}

/* ============================================================
   SUPPORT FAB — Floating Action Button + Modal
   ============================================================ */
.support-fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    height: 48px;
    border-radius: 24px;
    background: linear-gradient(135deg, #1B4D8A 0%, #2563EB 100%);
    color: #fff;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(27, 77, 138, 0.4);
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 20px 0 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    line-height: 1;
    animation: supportFadeIn 0.6s ease-out;
    font-family: 'Inter', 'DM Sans', sans-serif;
}
.support-fab-label {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.2px;
    white-space: nowrap;
}
.support-fab::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 28px;
    border: 2px solid rgba(37, 99, 235, 0.35);
    animation: supportPulse 3s infinite;
    pointer-events: none;
}
.support-fab::after {
    display: none;
}
.support-fab:hover {
    background: linear-gradient(135deg, #2563EB 0%, #3B82F6 100%);
    transform: scale(1.05);
    box-shadow: 0 6px 28px rgba(37, 99, 235, 0.45);
}
.support-fab:hover::before {
    animation: none;
    opacity: 0;
}
@keyframes supportPulse {
    0% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.15); opacity: 0; }
    100% { transform: scale(1); opacity: 0; }
}
@keyframes supportFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.support-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 35, 50, 0.6);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}
.support-overlay.visible {
    display: flex;
}
.support-modal {
    background: #fff;
    border-radius: 12px;
    padding: 28px 24px;
    max-width: 360px;
    width: 90%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    text-align: center;
}
.support-modal h3 {
    font-size: 16px;
    font-weight: 600;
    color: #1A2332;
    margin-bottom: 6px;
}
.support-modal p {
    font-size: 13px;
    color: #60766F;
    margin-bottom: 16px;
}

@media (max-width: 680px) {
    .support-fab {
        height: 44px;
        bottom: 16px;
        right: 16px;
        padding: 0 16px 0 14px;
        gap: 6px;
    }
    .support-fab svg { width: 18px; height: 18px; }
    .support-fab-label { font-size: 12px; }
}

/* ============================================================
   ADMIN LAYOUT — Sidebar + Main Content
   ============================================================ */
body.admin-layout {
    display: flex;
    min-height: 100vh;
    background: #0B1A2E;
}

/* ===== Sidebar ===== */
/* ============================================================
   SIDEBAR — Redesign Premium
   ============================================================ */
.admin-sidebar {
    width: 310px;
    background: linear-gradient(180deg, #050d1a 0%, #081425 50%, #060e1c 100%);
    border-right: 1px solid rgba(255,255,255,0.04);
    color: #fff;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    height: 100%;
    z-index: 100;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.admin-sidebar::-webkit-scrollbar { width: 0; }

/* --- Header --- */
.sidebar-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 28px 20px 26px;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: padding 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.sidebar-logo {
    width: 44px;
    height: auto;
    flex-shrink: 0;
    object-fit: contain;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-header-text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    padding-right: 30px;
    transition: opacity 0.25s ease, max-width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1;
    max-width: 220px;
}

.sidebar-brand-name {
    font-family: 'Bebas Neue', Impact, sans-serif;
    font-size: 20px;
    color: #D4A017;
    letter-spacing: 1.5px;
    line-height: 1;
    white-space: nowrap;
}

.sidebar-brand-sub {
    display: block;
    font-size: 11.5px;
    color: rgba(255,255,255,0.30);
    margin-top: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.2px;
}

/* --- Navigation --- */
.sidebar-nav {
    flex: 1;
    padding: 6px 14px 16px;
    overflow-y: auto;
    transition: padding 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Section divider line + label */
.sidebar-group-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(255,255,255,0.18);
    padding: 8px 14px 10px;
    margin-top: 8px;
    position: relative;
    transition: font-size 0.2s ease, padding 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}
.sidebar-group-label::before {
    content: '';
    position: absolute;
    top: 0;
    left: 14px;
    right: 14px;
    height: 1px;
    background: linear-gradient(90deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
}

/* --- Links --- */
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    color: rgba(255,255,255,0.45);
    text-decoration: none;
    font-size: 14.5px;
    font-weight: 500;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 12px;
    margin: 3px 0;
    border: 1px solid transparent;
    position: relative;
    letter-spacing: 0.15px;
}

.sidebar-link:hover {
    color: rgba(255,255,255,0.90);
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.04);
}

.sidebar-link.active {
    color: #fff;
    background: linear-gradient(135deg, rgba(212,160,23,0.18) 0%, rgba(212,160,23,0.10) 100%);
    border-color: rgba(212,160,23,0.15);
    font-weight: 600;
    box-shadow: 0 2px 12px rgba(212,160,23,0.08), inset 0 1px 0 rgba(255,255,255,0.04);
}

.sidebar-icon {
    width: 20px;
    text-align: center;
    font-size: 14px;
    flex-shrink: 0;
}

.sidebar-link i,
.sidebar-link svg {
    flex-shrink: 0;
    opacity: 0.40;
    transition: all 0.2s;
    width: 22px;
    height: 22px;
}

.sidebar-link:hover i,
.sidebar-link:hover svg {
    opacity: 0.90;
    transform: scale(1.05);
}

.sidebar-link.active i,
.sidebar-link.active svg {
    opacity: 1;
    color: #EAB308;
    stroke: #EAB308;
    filter: drop-shadow(0 0 6px rgba(234,179,8,0.25));
}

/* --- Footer --- */
.sidebar-footer {
    padding: 16px 14px 20px;
    flex-shrink: 0;
    margin-top: auto;
    transition: padding 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-footer .sidebar-logout {
    margin: 0;
    color: rgba(255,255,255,0.35);
    border: 1px solid rgba(255,255,255,0.05);
    background: rgba(255,255,255,0.02);
    border-radius: 12px;
    justify-content: center;
    gap: 10px;
    padding: 11px 14px;
    font-size: 13px;
}

.sidebar-footer .sidebar-logout i,
.sidebar-footer .sidebar-logout svg {
    opacity: 0.4;
    width: 16px;
    height: 16px;
}

.sidebar-footer .sidebar-logout:hover {
    color: #f87171 !important;
    background: rgba(239,68,68,0.08) !important;
    border-color: rgba(239,68,68,0.15) !important;
}
.sidebar-footer .sidebar-logout:hover i,
.sidebar-footer .sidebar-logout:hover svg {
    opacity: 0.9;
    color: #f87171;
}

/* --- Sidebar toggle --- */
.sidebar-toggle {
    width: 38px;
    height: 38px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    color: rgba(255,255,255,0.40);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    position: absolute;
    top: 50%;
    right: 18px;
    transform: translateY(-50%);
    flex-shrink: 0;
}

.sidebar-toggle:hover {
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.75);
    border-color: rgba(255,255,255,0.15);
}

/* ============================================================
   SIDEBAR — Fluid text hide/show for collapse
   ============================================================ */
.sidebar-link-text {
    white-space: nowrap;
    overflow: hidden;
    transition: opacity 0.25s ease, max-width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1;
    max-width: 200px;
}

.sidebar-hide-collapsed {
    transition: opacity 0.25s ease, max-width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1;
    max-width: 200px;
    overflow: hidden;
    white-space: nowrap;
}

/* ============================================================
   SIDEBAR COLLAPSED
   ============================================================ */
body.admin-layout.sidebar-collapsed .admin-sidebar {
    width: 76px;
}

body.admin-layout.sidebar-collapsed .sidebar-header {
    flex-direction: column;
    align-items: center;
    padding: 20px 0 14px;
    gap: 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
body.admin-layout.sidebar-collapsed .sidebar-logo {
    width: 34px;
}
body.admin-layout.sidebar-collapsed .sidebar-hide-collapsed {
    opacity: 0;
    max-width: 0;
    max-height: 0;
    pointer-events: none;
    overflow: hidden;
    padding: 0;
    margin: 0;
    border: none;
}
body.admin-layout.sidebar-collapsed .sidebar-toggle {
    position: static;
    transform: none;
    margin: 8px auto 0;
    width: 32px;
    height: 32px;
}
body.admin-layout.sidebar-collapsed .sidebar-nav {
    padding: 8px 10px;
}
body.admin-layout.sidebar-collapsed .sidebar-group-label {
    font-size: 0;
    padding: 8px 0 4px;
    margin-top: 4px;
    overflow: hidden;
}
body.admin-layout.sidebar-collapsed .sidebar-group-label::before {
    left: 6px;
    right: 6px;
}

body.admin-layout.sidebar-collapsed .sidebar-link {
    padding: 12px 0;
    justify-content: center;
    gap: 0;
    border-radius: 12px;
    margin: 3px 2px;
    border-color: transparent;
}
body.admin-layout.sidebar-collapsed .sidebar-link-text {
    opacity: 0;
    max-width: 0;
    pointer-events: none;
}

body.admin-layout.sidebar-collapsed .sidebar-link i,
body.admin-layout.sidebar-collapsed .sidebar-link svg {
    width: 22px !important;
    height: 22px !important;
}

body.admin-layout.sidebar-collapsed .sidebar-link.active {
    background: linear-gradient(135deg, rgba(212,160,23,0.18), rgba(212,160,23,0.08));
    border-color: rgba(212,160,23,0.12);
}

body.admin-layout.sidebar-collapsed .sidebar-footer {
    padding: 12px 10px 20px;
}

body.admin-layout.sidebar-collapsed .sidebar-footer a {
    padding: 12px 0;
    justify-content: center;
    gap: 0;
    margin: 0;
    border-radius: 12px;
}
body.admin-layout.sidebar-collapsed .sidebar-footer .sidebar-link-text {
    opacity: 0;
    max-width: 0;
    pointer-events: none;
}

body.admin-layout.sidebar-collapsed .admin-main {
    margin-left: 76px;
    width: calc(100% - 76px);
}

/* Tooltip on hover (collapsed) */
body.admin-layout.sidebar-collapsed .sidebar-link {
    position: relative;
}
body.admin-layout.sidebar-collapsed .sidebar-link:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    left: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%);
    background: #111d30;
    color: rgba(255,255,255,0.90);
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    z-index: 200;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    pointer-events: none;
    border: 1px solid rgba(255,255,255,0.06);
    letter-spacing: 0.2px;
    animation: tooltipFadeIn 0.15s ease;
}

@keyframes tooltipFadeIn {
    from { opacity: 0; transform: translateY(-50%) translateX(-4px); }
    to { opacity: 1; transform: translateY(-50%) translateX(0); }
}

/* ===== Main Content ===== */
.admin-main {
    flex: 1;
    margin-left: 310px;
    padding: 32px 40px;
    min-height: 100vh;
    width: calc(100% - 310px);
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1), width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.admin-page-header {
    margin-bottom: 24px;
}

.admin-page-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: rgba(255,255,255,0.9);
    margin: 0;
    line-height: 1.3;
}

.admin-page-header p {
    font-size: 13px;
    color: rgba(255,255,255,0.35);
    margin-top: 4px;
}

.admin-footer {
    text-align: center;
    padding: 32px 0 16px;
    font-size: 12px;
    color: rgba(255,255,255,0.2);
}

/* Dark theme inputs */
.admin-main .text-input,
.admin-main select,
.admin-main textarea {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.85);
}

.admin-main .text-input:focus {
    border-bottom-color: #D4A017;
}

.admin-main .text-input::placeholder {
    color: rgba(255,255,255,0.25);
}

.admin-main label {
    color: rgba(255,255,255,0.5) !important;
}

.admin-main .empty-state {
    color: rgba(255,255,255,0.35);
}

.admin-main .detail-card .detail-header h3 {
    color: #D4A017;
}

.admin-main .detail-row .detail-label {
    color: rgba(255,255,255,0.4);
}

.admin-main .detail-row .detail-value {
    color: rgba(255,255,255,0.8);
}

.admin-main .detail-row {
    border-bottom-color: rgba(255,255,255,0.05);
}

/* ===== Mobile Header (hidden desktop) ===== */
.admin-mobile-header {
    display: none;
}

.sidebar-overlay {
    display: none;
}

/* ===== Enhanced Admin Components ===== */
.admin-main .card,
.admin-main .detail-card,
.admin-main .chart-card {
    border: 1px solid rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.03);
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
    border-radius: 10px;
    color: rgba(255,255,255,0.8);
}

.admin-main .stat-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.admin-main .stat-card {
    border: none;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
    border-radius: 10px;
    position: relative;
    overflow: hidden;
    padding: 20px 16px;
}

.admin-main .stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #1B4D8A, #D4A017);
}

.admin-main .stat-card .stat-number {
    font-size: 28px;
    color: #fff;
}

.admin-main .stat-card .stat-label {
    font-size: 11px;
    color: rgba(255,255,255,0.4);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 6px;
}

.admin-main .panel-section {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    padding: 20px 24px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.admin-main .panel-section h2 {
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding-bottom: 12px;
    font-size: 17px;
    font-weight: 600;
    color: rgba(255,255,255,0.85);
}

.admin-main .chart-grid {
    gap: 20px;
    margin-bottom: 20px;
}

.admin-main .chart-card {
    padding: 20px;
}

.admin-main .chart-card h3 {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255,255,255,0.7);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.admin-main .data-table {
    border-radius: 8px;
    overflow: hidden;
}

.admin-main .data-table th {
    background: rgba(255,255,255,0.04);
    color: rgba(255,255,255,0.6);
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.admin-main .data-table td {
    color: rgba(255,255,255,0.75);
    border-bottom-color: rgba(255,255,255,0.05);
}

.admin-main .data-table tr:hover td {
    background: rgba(255,255,255,0.03);
}

.admin-main .flash-message {
    border-radius: 8px;
    font-size: 13px;
    padding: 12px 16px;
    margin-bottom: 16px;
}

.admin-main .btn-filled {
    background: #1B4D8A;
    border-radius: 6px;
    font-weight: 600;
    padding: 10px 20px;
    transition: all 0.15s ease;
}

.admin-main .btn-filled:hover {
    background: #2563EB;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.admin-main .btn-outlined {
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.6);
    font-weight: 500;
    transition: all 0.15s ease;
}

.admin-main .btn-outlined:hover {
    border-color: rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.06);
    color: #fff;
}

.admin-main .badge {
    border-radius: 6px;
    font-weight: 600;
    font-size: 11px;
    padding: 3px 10px;
}

.admin-main .pagination a,
.admin-main .pagination span {
    border-radius: 6px;
    border-color: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.6);
}

.admin-main .pagination span.current {
    background: #1B4D8A;
    border-color: #1B4D8A;
    color: #fff;
}

/* ===== Fail-safe banner shared (admin) ===== */
.admin-main .fail-safe-banner {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 20px;
    font-weight: 500;
}

.admin-main .banner-green {
    background: #ECFDF5;
    border: 1px solid #10b981;
    color: #065f46;
}

.admin-main .banner-red {
    background: #FEF2F2;
    border: 2px solid #dc2626;
    color: #7f1d1d;
}

.admin-main .banner-red.pulsing {
    animation: pulse 1.5s infinite;
}

.admin-main .banner-black {
    background: #1f2937;
    border: 1px solid #111827;
    color: #f3f4f6;
    border-radius: 8px;
}

/* ===== Mobile Responsive (Admin) ===== */
@media (max-width: 768px) {
    .admin-sidebar {
        width: 280px;
        transform: translateX(-100%);
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: none;
    }

    .admin-sidebar.open {
        transform: translateX(0);
        box-shadow: 8px 0 32px rgba(0,0,0,0.5);
    }

    .admin-main {
        margin-left: 0;
        width: 100%;
        max-width: 100%;
        padding: 68px 16px 24px;
    }

    .admin-mobile-header {
        display: flex;
        align-items: center;
        gap: 14px;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 58px;
        background: linear-gradient(90deg, #050d1a, #081425);
        border-bottom: 1px solid rgba(255,255,255,0.04);
        color: #fff;
        padding: 0 18px;
        z-index: 99;
        box-shadow: 0 4px 16px rgba(0,0,0,0.25);
    }

    .hamburger-btn {
        background: rgba(255,255,255,0.04);
        border: 1px solid rgba(255,255,255,0.06);
        border-radius: 10px;
        color: #EAB308;
        cursor: pointer;
        padding: 8px 10px;
        font-family: inherit;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.15s;
    }
    .hamburger-btn:hover {
        background: rgba(255,255,255,0.08);
    }

    .mobile-title {
        font-size: 15px;
        font-weight: 600;
        color: #D4A017;
    }

    .sidebar-overlay.open {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.60);
        z-index: 99;
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
    }

    .admin-main .panel-section {
        padding: 16px;
        border-radius: 10px;
    }

    .admin-main .stat-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .admin-main .chart-grid {
        grid-template-columns: 1fr;
    }

    .admin-page-header h1 {
        font-size: 20px;
    }

    .sidebar-toggle {
        display: none;
    }

    body.admin-layout.sidebar-collapsed .admin-main {
        margin-left: 0;
        width: 100%;
    }
}

/* ============================================================
   PAINEL DO ALUNO — Carteirinha
   ============================================================ */

/* Painel content sections */
.pnl-content-section {
    margin-bottom: 36px;
}

/* Painel section headers */
.pnl-section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 22px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.pnl-section-icon {
    width: 34px; height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.pnl-section-title {
    font-family: 'Bebas Neue', Impact, sans-serif;
    font-size: 22px;
    color: rgba(255,255,255,0.85);
    letter-spacing: 2px;
    flex: 1;
}
.pnl-section-count {
    background: linear-gradient(135deg, #D4A017, #E8B830);
    color: #0B1A2E;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(212,160,23,0.25);
    flex-shrink: 0;
}

/* Painel navbar */
.painel-navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 12px 20px;
    border-radius: 12px;
    margin-bottom: 16px;
}

.painel-navbar .nav-brand {
    color: #D4A017;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.painel-navbar .nav-links {
    display: flex;
    gap: 6px;
    align-items: center;
}

.painel-navbar .nav-links a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 12px;
    padding: 6px 14px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.15);
    transition: all 0.15s;
    font-weight: 500;
}

.painel-navbar .nav-links a:hover {
    color: #fff;
    background: rgba(255,255,255,0.08);
}

.painel-navbar .nav-links a.active {
    background: rgba(212, 160, 23, 0.15);
    border-color: rgba(212, 160, 23, 0.4);
    color: #D4A017;
}

.painel-navbar .nav-links a.nav-logout {
    border-color: rgba(201, 59, 46, 0.3);
    color: rgba(255,255,255,0.5);
}

.painel-navbar .nav-links a.nav-logout:hover {
    color: #C93B2E;
    background: rgba(201, 59, 46, 0.1);
}

/* Section headers */
.painel-section-title {
    font-size: 17px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 8px;
}

.painel-section-title .section-count {
    background: #D4A017;
    color: #0B1A2E;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
}

/* Inscription cards */
.painel-card {
    background: rgba(255,255,255,0.025);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.10);
    margin-bottom: 12px;
    overflow: hidden;
    transition: border-color 0.2s;
}
.painel-card:hover {
    border-color: rgba(255,255,255,0.10);
}

.painel-card-header {
    background: linear-gradient(135deg, #1B4D8A 0%, #143D6E 100%);
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.painel-card-header h3 {
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    margin: 0;
}

.painel-card-header .card-date {
    font-size: 11px;
    color: rgba(255,255,255,0.5);
}

.painel-card-body {
    padding: 24px 28px;
    background: rgba(255,255,255,0.02);
}

.painel-detail-row {
    display: grid;
    grid-template-columns: 110px 1fr auto;
    gap: 4px 12px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    font-size: 13px;
    align-items: center;
}

.painel-detail-row:last-child {
    border-bottom: none;
}

.painel-detail-label {
    font-weight: 600;
    color: rgba(255,255,255,0.40);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.painel-detail-value {
    color: rgba(255,255,255,0.80);
    font-weight: 500;
}

/* Status badge in card */
.painel-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 18px;
    border-radius: 20px;
    font-family: 'Inter', 'DM Sans', sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    white-space: nowrap;
    flex-shrink: 0;
}

.painel-status-matriculado { background: rgba(27,77,138,0.18); color: #60A5FA; border: 1px solid rgba(96,165,250,0.20); }
.painel-status-habilitado { background: rgba(33,131,73,0.15); color: #6EE7B7; border: 1px solid rgba(110,231,183,0.20); }
.painel-status-experimental { background: rgba(251,191,36,0.12); color: #FBBF24; border: 1px solid rgba(251,191,36,0.20); }
.painel-status-pendente { background: rgba(255,255,255,0.05); color: rgba(255,255,255,0.40); border: 1px solid rgba(255,255,255,0.08); }
.painel-status-cancelado { background: rgba(201,59,46,0.12); color: #F87171; border: 1px solid rgba(201,59,46,0.18); }

/* Action sections */
.painel-action-section {
    margin-top: 20px;
    padding: 24px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.025);
}

.painel-action-section h4 {
    font-size: 15px;
    font-weight: 700;
    color: rgba(255,255,255,0.85);
    margin: 0 0 12px;
}

/* CTA Button */
.painel-btn-primary {
    display: block;
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, #218349, #1a6e3c);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    font-family: 'DM Sans', Arial, sans-serif;
    cursor: pointer;
    transition: all 0.15s;
    text-align: center;
    box-shadow: 0 2px 8px rgba(33, 131, 73, 0.3);
}

.painel-btn-primary:hover {
    background: linear-gradient(135deg, #1a6e3c, #15593a);
    box-shadow: 0 4px 12px rgba(33, 131, 73, 0.4);
    transform: translateY(-1px);
}

.painel-btn-primary:disabled {
    opacity: 0.6;
    cursor: wait;
    transform: none;
}

/* WhatsApp buttons */
.painel-wa-btn {
    display: block;
    padding: 12px 16px;
    background: rgba(37, 211, 102, 0.08);
    border: 1px solid rgba(37, 211, 102, 0.25);
    border-radius: 12px;
    color: #6EE7B7;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: all 0.2s;
}

.painel-wa-btn:hover {
    background: rgba(37, 211, 102, 0.18);
    border-color: rgba(37, 211, 102, 0.40);
    color: #A7F3D0;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.15);
    transform: translateY(-1px);
}

/* Password section */
.painel-password-section {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 16px;
}

.painel-password-section .painel-section-title {
    border-bottom-color: rgba(255,255,255,0.08);
}

.painel-password-section p {
    color: rgba(255,255,255,0.5);
}

.painel-password-section .btn-outlined {
    color: rgba(255,255,255,0.7);
    border-color: rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.04);
}

.painel-password-section .btn-outlined:hover {
    color: #fff;
    border-color: rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.08);
}

/* Responsive */
@media (max-width: 680px) {
    .pnl-section-header {
        gap: 8px;
    }
    .pnl-section-icon {
        width: 28px; height: 28px;
        border-radius: 8px;
    }
    .pnl-section-title {
        font-size: 18px;
    }
    .painel-navbar {
        flex-direction: column;
        gap: 8px;
        padding: 12px 16px;
    }
    .painel-card-body {
        padding: 16px;
    }
    .painel-detail-row {
        grid-template-columns: 1fr;
        gap: 2px;
    }
    .painel-detail-label {
        font-size: 11px;
    }
    .painel-action-section {
        padding: 16px;
    }
}
