/* Matrícula online — tema escuro conforme prints de referência */
:root {
    --mat-bg: #0a0e1a;
    --mat-bg-card: rgba(20, 28, 48, 0.85);
    --mat-border: rgba(100, 130, 200, 0.2);
    --mat-text: #e8ecf4;
    --mat-muted: #8b95a8;
    --mat-purple: #7c3aed;
    --mat-blue: #3b82f6;
    --mat-gradient: linear-gradient(135deg, #7c3aed 0%, #3b82f6 100%);
    --mat-gradient-btn: linear-gradient(135deg, #6366f1 0%, #3b82f6 50%, #06b6d4 100%);
    --mat-green: #22c55e;
    --mat-orange: #f59e0b;
    --mat-red: #ef4444;
    --mat-radius: 16px;
}

.matricula-page {
    background: var(--mat-bg);
    background-image:
        radial-gradient(ellipse at 50% 0%, rgba(59, 130, 246, 0.12) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 80%, rgba(124, 58, 237, 0.08) 0%, transparent 50%);
    min-height: 100vh;
    color: var(--mat-text);
    padding-bottom: 80px;
    font-family: 'Roboto', sans-serif;
}

.matricula-page .auth-admin {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(8px);
}

/* Hero */
.mat-hero {
    text-align: center;
    padding: 2.5rem 1.25rem 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}
.mat-badge {
    display: inline-block;
    padding: 0.35rem 1rem;
    border-radius: 50px;
    background: rgba(255,255,255,0.08);
    border: 1px solid var(--mat-border);
    font-size: 0.8rem;
    color: var(--mat-muted);
    margin-bottom: 1.25rem;
}
.mat-hero h1 {
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 0.75rem;
    color: #fff;
}
.mat-hero p {
    color: var(--mat-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

/* Cards grid */
.mat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1.25rem 1.5rem;
}
@media (max-width: 700px) {
    .mat-grid { grid-template-columns: 1fr; }
}

.mat-card {
    background: var(--mat-bg-card);
    border: 1px solid var(--mat-border);
    border-radius: var(--mat-radius);
    padding: 1.25rem;
    backdrop-filter: blur(12px);
}
.mat-card-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #fff;
}
.mat-card-title .icon { opacity: 0.7; }

/* Etapas buttons */
.mat-etapas {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.mat-etapa-btn {
    flex: 1;
    min-width: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.75rem 0.6rem;
    border-radius: 12px;
    border: 1px solid var(--mat-border);
    background: rgba(255,255,255,0.04);
    color: var(--mat-muted);
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    text-align: center;
    line-height: 1.3;
}
.mat-etapa-btn:hover:not(:disabled) {
    background: rgba(255,255,255,0.08);
    color: #fff;
}
.mat-etapa-btn.active {
    background: var(--mat-gradient);
    border-color: transparent;
    color: #fff;
    font-weight: 600;
}
.mat-etapa-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}
.mat-etapa-btn .sub { display: block; font-size: 0.65rem; opacity: 0.8; }

.mat-info-text {
    font-size: 0.85rem;
    color: var(--mat-muted);
    line-height: 1.55;
    margin-bottom: 1rem;
}
.mat-btn-quem {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1rem;
    border-radius: 10px;
    background: var(--mat-gradient);
    border: none;
    color: #fff;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
}

/* Formulário de cadastro */
.mat-form-section {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1.25rem 2rem;
    display: none;
}
.mat-form-section.visible { display: block; }

.mat-form-card {
    background: var(--mat-bg-card);
    border: 1px solid var(--mat-border);
    border-radius: var(--mat-radius);
    padding: 1.5rem;
    backdrop-filter: blur(12px);
}
.mat-form-card h2 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #fff;
}
.mat-autosave-status {
    font-size: 0.78rem;
    color: var(--mat-muted);
    min-height: 1.2rem;
    margin-bottom: 0.75rem;
    transition: color 0.2s;
}
.mat-autosave-status.saving { color: var(--mat-orange); }
.mat-autosave-status.saved { color: var(--mat-green); }
.mat-autosave-status.error { color: var(--mat-red); }
.mat-required { color: #f87171; }

/* Stepper */
.mat-stepper {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 1.5rem;
    overflow-x: auto;
}
.mat-step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--mat-muted);
    white-space: nowrap;
}
.mat-step-num {
    width: 28px; height: 28px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid var(--mat-border);
    font-weight: 600;
    font-size: 0.75rem;
}
.mat-step.active .mat-step-num {
    background: var(--mat-gradient);
    border-color: transparent;
    color: #fff;
}
.mat-step.active { color: #fff; font-weight: 600; }
.mat-step-line {
    flex: 1;
    height: 2px;
    background: var(--mat-border);
    min-width: 30px;
    margin: 0 0.5rem;
}
.mat-step.done .mat-step-num {
    background: var(--mat-green);
    border-color: var(--mat-green);
    color: #fff;
}

/* Form fields */
.mat-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
@media (max-width: 600px) {
    .mat-form-grid { grid-template-columns: 1fr; }
}
.mat-field { margin-bottom: 0.25rem; }
.mat-field.full { grid-column: 1 / -1; }
.mat-field label {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    color: var(--mat-muted);
    margin-bottom: 0.35rem;
}
.mat-field input,
.mat-field select {
    width: 100%;
    padding: 0.7rem 0.85rem;
    border-radius: 10px;
    border: 1px solid var(--mat-border);
    background-color: #1a2438;
    color: #fff;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
    -webkit-appearance: menulist;
    appearance: menulist;
}
.mat-field input:focus,
.mat-field select:focus {
    border-color: var(--mat-blue);
}
.mat-field input::placeholder { color: #8b95a8; }
.mat-field select:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}
.mat-field select option {
    background: #1a2438;
    color: #fff;
}
.mat-field input.cidade-fallback {
    -webkit-appearance: none;
    appearance: none;
}

/* Upload boxes */
.mat-upload-section { margin-top: 1.25rem; }
.mat-upload-section h3 {
    font-size: 0.9rem;
    color: #fff;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.mat-upload-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
}
.mat-upload-box {
    position: relative;
    border: 2px dashed var(--mat-border);
    border-radius: 12px;
    padding: 1.25rem 0.75rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    min-height: 130px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    overflow: hidden;
}
.mat-upload-box:hover {
    border-color: var(--mat-blue);
    background: rgba(59,130,246,0.05);
}
.mat-upload-box.has-file {
    border-color: var(--mat-green);
    border-style: solid;
    padding: 0.5rem;
}
.mat-upload-box.uploading {
    border-color: var(--mat-orange);
    border-style: solid;
}
.mat-upload-box.has-preview .upload-icon,
.mat-upload-box.has-preview .upload-label {
    display: none;
}
.mat-upload-box input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}
.mat-upload-box .upload-thumb {
    width: 100%;
    max-height: 110px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}
.mat-upload-box .upload-thumb[hidden] {
    display: none !important;
}
.mat-upload-box.has-pdf .upload-icon {
    font-size: 2.2rem;
    opacity: 1;
}
.mat-upload-box .upload-icon { font-size: 1.5rem; opacity: 0.5; }
.mat-upload-box .upload-label {
    font-size: 0.72rem;
    color: var(--mat-muted);
    line-height: 1.3;
}
.mat-upload-box .upload-status {
    font-size: 0.68rem;
    color: var(--mat-orange);
    min-height: 1em;
}
.mat-upload-box.has-file .upload-status {
    color: var(--mat-green);
}
.mat-upload-box .upload-name {
    font-size: 0.68rem;
    color: var(--mat-green);
    word-break: break-all;
    display: none;
    max-width: 100%;
}
.mat-upload-box.has-file .upload-name { display: block; }

.mat-form-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}
.mat-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    background: var(--mat-gradient-btn);
    border: none;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}
.mat-btn-primary:hover { opacity: 0.9; }
.mat-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--mat-border);
    color: var(--mat-muted);
    font-size: 0.85rem;
    cursor: pointer;
}
.mat-btn-secondary:hover { color: #fff; }

/* Alerts */
.mat-alert {
    max-width: 900px;
    margin: 0 auto 1rem;
    padding: 0 1.25rem;
}
.mat-alert-box {
    padding: 0.75rem 1rem;
    border-radius: 10px;
    font-size: 0.85rem;
}
.mat-alert-box.erro { background: rgba(239,68,68,0.15); color: #fca5a5; border: 1px solid rgba(239,68,68,0.3); }
.mat-alert-box.sucesso { background: rgba(34,197,94,0.15); color: #86efac; border: 1px solid rgba(34,197,94,0.3); }

/* ========== MODAIS ========== */
.mat-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(6px);
    z-index: 500;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    overflow-y: auto;
}
.mat-overlay.open { display: flex; }

/* Modal Bem-vindo */
.mat-modal {
    background: #111827;
    border: 1px solid var(--mat-border);
    border-radius: var(--mat-radius);
    width: 100%;
    max-width: 480px;
    overflow: hidden;
    animation: matSlideUp 0.3s ease;
}
@keyframes matSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.mat-modal-header {
    background: var(--mat-gradient);
    padding: 1rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}
.mat-modal-header h3 { font-size: 1.1rem; color: #fff; }
.mat-modal-header small { font-size: 0.75rem; opacity: 0.85; color: #fff; }
.mat-modal-close {
    background: rgba(255,255,255,0.2);
    border: none;
    color: #fff;
    width: 32px; height: 32px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1rem;
    flex-shrink: 0;
}
.mat-modal-body { padding: 1.25rem; }
.mat-modal-body h4 { font-size: 1rem; margin-bottom: 0.5rem; color: #fff; }
.mat-modal-body p { font-size: 0.85rem; color: var(--mat-muted); line-height: 1.55; margin-bottom: 1rem; }
.mat-warning-box {
    background: rgba(239,68,68,0.12);
    border: 1px solid rgba(239,68,68,0.25);
    border-radius: 10px;
    padding: 0.75rem;
    font-size: 0.8rem;
    color: #fca5a5;
    margin-bottom: 1rem;
    display: flex;
    gap: 0.5rem;
    line-height: 1.45;
}
.mat-whatsapp-box {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--mat-border);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
}
.mat-whatsapp-box .wa-icon { font-size: 1.5rem; }
.mat-whatsapp-box strong { display: block; font-size: 0.95rem; color: #fff; }
.mat-whatsapp-box small { font-size: 0.75rem; color: var(--mat-muted); }
.mat-modal-footer { padding: 0 1.25rem 1.25rem; }
.mat-modal-footer .mat-btn-primary { width: 100%; justify-content: center; padding: 0.85rem; }

/* Modal CPF */
.mat-cpf-card {
    background: #111827;
    border: 1px solid var(--mat-border);
    border-radius: var(--mat-radius);
    width: 100%;
    max-width: 480px;
    padding: 1.5rem;
    animation: matSlideUp 0.3s ease;
}
.mat-cpf-card h3 { font-size: 0.85rem; color: var(--mat-muted); margin-bottom: 0.25rem; }
.mat-cpf-card h2 { font-size: 1.3rem; color: #fff; margin-bottom: 0.5rem; }
.mat-cpf-card .desc { font-size: 0.85rem; color: var(--mat-muted); margin-bottom: 1.25rem; line-height: 1.5; }
.mat-cpf-card .mat-field input {
    background: rgba(0,0,0,0.4);
    border-color: rgba(255,255,255,0.15);
    padding: 0.85rem 1rem;
    font-size: 1rem;
}
.mat-cpf-card .hint { font-size: 0.72rem; color: var(--mat-muted); margin-top: 0.25rem; }
.mat-cpf-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.25rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.mat-cpf-footer .lock-hint {
    font-size: 0.72rem;
    color: var(--mat-muted);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}
.mat-cpf-footer .ready-hint { font-size: 0.72rem; color: var(--mat-green); }
.mat-cpf-erro { color: #fca5a5; font-size: 0.8rem; margin-top: 0.5rem; display: none; }

/* ========== CAPTURA SELFIE ========== */
.mat-overlay.captura-open {
    padding: 0;
    align-items: stretch;
}
.mat-captura {
    background: #f0f2f5;
    color: #1a1a2e;
    width: 100%;
    max-width: 960px;
    border-radius: var(--mat-radius);
    overflow: hidden;
    animation: matSlideUp 0.3s ease;
    display: flex;
    flex-direction: column;
    max-height: 100vh;
    max-height: 100dvh;
}
.mat-overlay.captura-open .mat-captura {
    max-width: 100%;
    border-radius: 0;
    min-height: 100vh;
    min-height: 100dvh;
}
.mat-captura-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #ddd;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.mat-captura-header .shield { font-size: 1.5rem; }
.mat-captura-header h2 { font-size: 1rem; color: #1a1a2e; }
.mat-captura-header small { font-size: 0.75rem; color: #666; }
.mat-captura-bar {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 1.25rem;
    background: #e8eaf0;
    font-size: 0.78rem;
    color: #555;
}
.mat-captura-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    padding: 1rem 1.25rem;
    overflow-y: auto;
    flex: 1;
}
@media (max-width: 700px) {
    .mat-captura-body { grid-template-columns: 1fr; padding: 0.75rem; }
    .mat-captura-header { padding: 0.75rem 1rem; }
    .mat-captura-header h2 { font-size: 0.9rem; }
    .mat-captura-bar { flex-direction: column; gap: 0.25rem; font-size: 0.72rem; }
    .mat-captura-actions {
        position: sticky;
        bottom: 0;
        background: #fff;
        z-index: 5;
        box-shadow: 0 -2px 8px rgba(0,0,0,0.08);
    }
}

.mat-camera-wrap {
    position: relative;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    width: 100%;
    min-height: 280px;
}
@media (max-width: 700px) {
    .mat-camera-wrap {
        min-height: 55vw;
        max-height: 70vh;
        max-height: 70dvh;
        border-radius: 8px;
    }
}
@media (min-width: 701px) {
    .mat-camera-wrap {
        aspect-ratio: 3/4;
        max-height: 520px;
    }
}
.mat-camera-wrap video,
.mat-camera-wrap canvas {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    background: #000;
}
.mat-camera-wrap video.mirrored {
    transform: scaleX(-1);
}
.mat-face-oval {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 55%;
    height: 70%;
    border: 3px solid rgba(59,130,246,0.7);
    border-radius: 50%;
    pointer-events: none;
    box-shadow: 0 0 0 9999px rgba(0,0,0,0.35);
}
.mat-camera-hint {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.6);
    color: #fff;
    padding: 0.35rem 0.75rem;
    border-radius: 8px;
    font-size: 0.75rem;
    white-space: nowrap;
}
.mat-camera-status {
    margin-top: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-size: 0.78rem;
    text-align: center;
}
.mat-camera-status.waiting { background: #fce4ec; color: #c62828; }
.mat-camera-status.ok { background: #e8f5e9; color: #2e7d32; }

/* Quality indicators */
.mat-quality-list { list-style: none; }
.mat-quality-list li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0;
    font-size: 0.82rem;
    color: #333;
}
.mat-quality-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.mat-quality-dot.ok { background: var(--mat-green); }
.mat-quality-dot.warn { background: var(--mat-orange); }
.mat-quality-dot.bad { background: var(--mat-red); }
.mat-quality-dot.wait { background: #bbb; }
.mat-quality-bar {
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    margin: 0.5rem 0 1rem;
    overflow: hidden;
}
.mat-quality-bar-fill {
    height: 100%;
    background: var(--mat-gradient);
    border-radius: 2px;
    transition: width 0.3s;
    width: 0%;
}
.mat-captura-controls {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}
.mat-captura-controls select {
    flex: 1;
    min-width: 120px;
    padding: 0.4rem 0.5rem;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 0.78rem;
}
.mat-tips {
    background: #f8f9fb;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 0.75rem;
    margin-top: 0.75rem;
    font-size: 0.75rem;
    color: #555;
    line-height: 1.5;
}
.mat-tips strong { display: block; margin-bottom: 0.35rem; color: #333; }
.mat-captura-actions {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem 1rem;
    border-top: 1px solid #ddd;
    flex-wrap: wrap;
}
.mat-captura-actions button {
    padding: 0.55rem 1rem;
    border-radius: 8px;
    border: 1px solid #ccc;
    background: #fff;
    font-size: 0.82rem;
    cursor: pointer;
    color: #333;
}
.mat-captura-actions .btn-capture {
    background: var(--mat-blue);
    color: #fff;
    border-color: var(--mat-blue);
    font-weight: 600;
    margin-left: auto;
}
.mat-captura-actions .btn-capture:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}
.mat-captura-actions .btn-capture.ready {
    background: var(--mat-green);
    border-color: var(--mat-green);
    animation: capturePulse 1.5s ease infinite;
}
@keyframes capturePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0.4); }
    50% { box-shadow: 0 0 0 8px rgba(34,197,94,0); }
}
.mat-captura-legal {
    padding: 0 1.25rem 1rem;
    font-size: 0.68rem;
    color: #888;
    line-height: 1.4;
}

/* ========== BIOMETRIA DIGITAL ========== */
.mat-bio-full {
    position: fixed;
    inset: 0;
    z-index: 600;
    background: #0a1a0f;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.mat-bio-full.open { display: flex; }

.mat-bio-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(34,197,94,0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(34,197,94,0.06) 1px, transparent 1px);
    background-size: 40px 40px;
}
.mat-bio-scan-line {
    position: absolute;
    left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(34,197,94,0.6), transparent);
    animation: bioScan 3s linear infinite;
}
@keyframes bioScan {
    0% { top: 10%; }
    100% { top: 90%; }
}

.mat-bio-scanner {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}
.mat-bio-diamond {
    width: 280px;
    height: 280px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.mat-bio-diamond::before {
    content: '';
    position: absolute;
    inset: 0;
    border: 2px solid rgba(34,197,94,0.5);
    transform: rotate(45deg);
    border-radius: 8px;
    animation: bioPulse 2s ease-in-out infinite;
}
@keyframes bioPulse {
    0%, 100% { box-shadow: 0 0 20px rgba(34,197,94,0.2); }
    50% { box-shadow: 0 0 40px rgba(34,197,94,0.4); }
}

.mat-bio-btn {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #666, #333);
    border: 3px solid rgba(34,197,94,0.4);
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.mat-bio-btn:active,
.mat-bio-btn.holding {
    border-color: var(--mat-green);
    box-shadow: 0 0 30px rgba(34,197,94,0.5);
}
.mat-bio-btn-text {
    font-size: 0.72rem;
    color: #ccc;
    text-align: center;
    line-height: 1.3;
    padding: 0 0.5rem;
    pointer-events: none;
}

.mat-bio-progress-ring {
    position: absolute;
    inset: -8px;
    pointer-events: none;
}
.mat-bio-progress-ring svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}
.mat-bio-progress-ring circle {
    fill: none;
    stroke-width: 4;
}
.mat-bio-progress-ring .bg { stroke: rgba(34,197,94,0.15); }
.mat-bio-progress-ring .fg {
    stroke: var(--mat-green);
    stroke-dasharray: 377;
    stroke-dashoffset: 377;
    transition: stroke-dashoffset 0.1s linear;
}

.mat-bio-adherence {
    width: 200px;
    text-align: center;
}
.mat-bio-adherence label {
    font-size: 0.75rem;
    color: rgba(34,197,94,0.8);
    display: block;
    margin-bottom: 0.35rem;
}
.mat-bio-adherence-bar {
    height: 4px;
    background: rgba(34,197,94,0.15);
    border-radius: 2px;
    overflow: hidden;
}
.mat-bio-adherence-fill {
    height: 100%;
    background: var(--mat-green);
    width: 0%;
    transition: width 0.1s linear;
    border-radius: 2px;
}

.mat-bio-footer {
    position: absolute;
    bottom: 2rem;
    left: 0; right: 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: 0 2rem;
    z-index: 2;
}
.mat-bio-footer p {
    font-size: 0.78rem;
    color: rgba(34,197,94,0.7);
    max-width: 300px;
    line-height: 1.4;
}
.mat-bio-badges {
    display: flex;
    gap: 0.5rem;
}
.mat-bio-badges span {
    font-size: 0.68rem;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    background: rgba(34,197,94,0.1);
    border: 1px solid rgba(34,197,94,0.25);
    color: rgba(34,197,94,0.8);
}

/* Loading overlay */
.mat-loading {
    position: fixed;
    inset: 0;
    z-index: 700;
    background: rgba(0,0,0,0.85);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}
.mat-loading.open { display: flex; }
.mat-spinner {
    width: 48px; height: 48px;
    border: 4px solid rgba(255,255,255,0.1);
    border-top-color: var(--mat-blue);
    border-radius: 50%;
    animation: matSpin 0.8s linear infinite;
}
@keyframes matSpin { to { transform: rotate(360deg); } }
.mat-loading p { color: var(--mat-muted); font-size: 0.9rem; }

/* Bottom nav dark */
.matricula-page .public-bottom-nav {
    background: rgba(10,14,26,0.95);
    border-top-color: var(--mat-border);
    backdrop-filter: blur(12px);
}
.matricula-page .public-bottom-nav a { color: var(--mat-muted); }
.matricula-page .public-bottom-nav a.active {
    color: #fff;
    border-top-color: var(--mat-blue);
}
