/* ==========================================================================
   LAYOUT MASTER DO PAINEL FULLSCREEN
   ========================================================================== */
:root { --mrc-header-bg: #000000; --mrc-header-text: #ffffff; --mrc-primary: #1EC329; --mrc-body-bg: #ffffff; --mrc-sidebar-width: 280px; }
html.painel-ativo, body.painel-ativo { overflow: hidden !important; height: 100vh !important; margin: 0; padding: 0; }

.mrc-fullscreen-wrapper { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: var(--mrc-body-bg); z-index: 999999; display: flex; flex-direction: column; font-family: 'Inter', sans-serif; }
body.admin-bar .mrc-fullscreen-wrapper { top: 32px; height: calc(100vh - 32px); }
@media screen and (max-width: 782px) { body.admin-bar .mrc-fullscreen-wrapper { top: 46px; height: calc(100vh - 46px); } }

.mrc-black-header { height: 70px; background-color: var(--mrc-header-bg); color: var(--mrc-header-text); display: flex; align-items: center; justify-content: space-between; padding: 0 25px; box-shadow: 0 4px 10px rgba(0,0,0,0.1); flex-shrink: 0; z-index: 200; }
.mrc-header-left { display: flex; align-items: center; gap: 30px; }
.mrc-site-logo img { max-height: 45px; width: auto; display: block; }
.mrc-text-logo { font-size: 1.2rem; font-weight: bold; color: #fff; text-transform: uppercase; letter-spacing: 1px; }

.mrc-toggle-btn { display: none; background: transparent !important; border: 1px solid rgba(255,255,255,0.2) !important; border-radius: 6px; color: #fff !important; font-size: 1.4rem; cursor: pointer; width: 42px; height: 42px; align-items: center; justify-content: center; transition: all 0.3s ease; -webkit-tap-highlight-color: transparent; padding: 0; }
.mrc-toggle-btn:hover { border-color: var(--mrc-primary) !important; color: var(--mrc-primary) !important; background: rgba(30, 195, 41, 0.1) !important; }

.mrc-back-link { text-decoration: none; color: rgba(255,255,255,0.8); font-size: 0.9rem; font-weight: 500; display: flex; align-items: center; gap: 8px; padding: 8px 15px; border-radius: 30px; border: 1px solid rgba(255,255,255,0.2); transition: all 0.3s; }
.mrc-back-link:hover { border-color: var(--mrc-primary); color: var(--mrc-primary); background: rgba(255,255,255,0.05); }

.mrc-body-layout { display: flex; flex-grow: 1; overflow: hidden; position: relative; }
.mrc-sidebar { width: var(--mrc-sidebar-width); background: #fff; border-right: 1px solid #f0f0f0; display: flex; flex-direction: column; transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); z-index: 100; padding-top: 25px; }

.mrc-nav-item { display: flex; align-items: center; gap: 12px; padding: 15px 30px; color: #666; text-decoration: none; font-weight: 500; border-left: 4px solid transparent; transition: all 0.2s; }
.mrc-nav-item:hover { background: #f9f9f9; color: var(--mrc-primary); }
.mrc-nav-item.ativo { background: #f0fdf4; color: var(--mrc-primary); border-left-color: var(--mrc-primary); font-weight: 700; }
.mrc-content { flex-grow: 1; padding: 40px; overflow-y: auto; background: #fff; scroll-behavior: smooth; }

/* ==========================================================================
   FICHA DE DADOS & MODAL DE EDIÇÃO
   ========================================================================== */
.a3-ficha-leitura { background: #fff; padding: 30px; border-radius: 12px; border: 1px solid #eaeaea; box-shadow: 0 4px 15px rgba(0,0,0,0.02); }
.a3-grid-leitura { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 25px; }
.a3-item-leitura { border-bottom: 1px solid #f5f5f5; padding-bottom: 10px; }
.a3-item-leitura label { display: block; font-size: 0.8rem; text-transform: uppercase; color: #888; font-weight: 700; margin-bottom: 5px; }
.a3-item-leitura span { font-size: 1rem; color: #111; font-weight: 500; }
.a3-btn-editar { background: #111 !important; color: #fff; border: none; padding: 12px 25px; border-radius: 6px; font-weight: bold; cursor: pointer; width: 100%; transition: 0.3s; }
.a3-btn-editar:hover { background: #1EC329 !important; color: #fff; }
.a3-log-box { font-size: 0.75rem; color: #999; text-align: right; margin-top: 15px; font-family: monospace; }

/* ==========================================================================
   MINHAS INSCRIÇÕES (Abas, Grid e Cards)
   ========================================================================== */
.a3-tabs-ui { display: flex; gap: 15px; margin-bottom: 20px; border-bottom: 2px solid #eee; }
.a3-tab-link { background: #000 !important; border: none; border-radius: 8px 8px 0 0; padding: 10px 15px; font-weight: bold; color: #fff; cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px; font-size: 1rem; }
.a3-tab-link.active { color: #1EC329; border-bottom-color: #1EC329; }  
.a3-tab-content-ui { display: none; }
.a3-tab-content-ui.active { display: block; animation: mrcFadeIn 0.3s; }

.mrc-grid-inscricoes { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.mrc-card { background: #fff; border: 1px solid #e0e0e0; border-radius: 12px; overflow: hidden; cursor: pointer; transition: all 0.3s ease; position: relative; }
.mrc-card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.1); border-color: #1EC329; }
.mrc-card-header { padding: 15px; display: flex; gap: 15px; background: #fafafa; border-bottom: 1px solid #eee; align-items: center; }
.mrc-thumb img { width: 60px; height: 60px; object-fit: cover; border-radius: 8px; }
.mrc-card-body { padding: 15px; color: #555; font-size: 0.9rem; }
.mrc-card-footer { padding: 10px; background: #fff; border-top: 1px solid #eee; text-align: center; }
.mrc-tag-inscrito { background: #d4edda; color: #155724; padding: 5px 12px; border-radius: 20px; font-size: 0.8em; font-weight: bold; text-transform: uppercase; }

/* ==========================================================================
   MODAIS (Geral para Edição de Dados e Detalhes da Inscrição)
   ========================================================================== */
.a3-modal-edit, .mrc-modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.7); z-index: 999999; align-items: center; justify-content: center; backdrop-filter: blur(4px); }
.a3-modal-edit.ativo, .mrc-modal.ativo { display: flex; }
.a3-modal-box, .mrc-modal-content { background: #fff; width: 100%; max-width: 600px; border-radius: 12px; box-shadow: 0 15px 30px rgba(0,0,0,0.2); animation: mrcFadeIn 0.3s; overflow: hidden; max-height: 90vh; overflow-y: auto; position: relative; }

/* Componentes internos do Modal Edição */
.a3-modal-box { padding: 30px; }
.a3-close-modal { position: absolute; top: 20px; right: 20px; cursor: pointer; font-size: 24px; color: #dc3545; background: none !important; border: none; font-weight: bold; }
.a3-aviso-desclassificacao { background: #fff3cd; color: #856404; border-left: 4px solid #ffeeba; padding: 15px; margin-bottom: 20px; font-size: 0.9rem; border-radius: 4px; }
.a3-form-group { margin-bottom: 15px; }
.a3-form-group label { display: block; font-weight: bold; margin-bottom: 5px; font-size: 0.9rem; color: #333; }
.a3-form-group input, .a3-form-group select { width: 100%; padding: 10px; border: 1px solid #ccc; border-radius: 6px; }
.a3-btn-salvar { background: #1EC329 !important; color: #fff; border: none; padding: 15px; border-radius: 6px; font-weight: bold; font-size: 1rem; width: 100%; cursor: pointer; margin-top: 10px; }

/* Componentes internos do Modal Inscrições */
.mrc-modal-header { background: #1EC329; color: #fff; padding: 20px; display: flex; justify-content: space-between; align-items: center; }
.mrc-modal-header h3 { margin: 0; color: #fff; font-size: 1.2em; }
.mrc-close { color: #fff; font-size: 28px; font-weight: bold; cursor: pointer; line-height: 1; border: none; background: transparent; }
.mrc-modal-body { padding: 25px; }
.mrc-section-title { font-size: 0.9em; text-transform: uppercase; color: #888; border-bottom: 2px solid #eee; padding-bottom: 5px; margin-bottom: 15px; margin-top: 20px; font-weight: bold; }
.mrc-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-bottom: 10px; }
.mrc-info-item label { display: block; font-size: 0.8em; color: #777; font-weight: 600; }
.mrc-info-item span { display: block; font-size: 1em; color: #333; font-weight: 500; }
.mrc-total-price { font-size: 1.5em; color: #1EC329; font-weight: bold; text-align: right; margin-top: 10px; }

@keyframes mrcFadeIn { from {opacity: 0; transform: translateY(20px);} to {opacity: 1; transform: translateY(0);} }

/* Responsividade Mobile do Painel */
@media (max-width: 900px) {
    .mrc-toggle-btn { display: flex; } 
    .mrc-sidebar { position: absolute; top: 0; bottom: 0; left: 0; transform: translateX(-100%); box-shadow: 5px 0 20px rgba(0,0,0,0.2); }
    .mrc-sidebar.ativo { transform: translateX(0); }
    .mrc-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.7); z-index: 90; opacity: 0; visibility: hidden; transition: opacity 0.3s; backdrop-filter: blur(2px); }
    .mrc-overlay.ativo { opacity: 1; visibility: visible; }
}
@media (max-width: 600px) { 
    .mrc-content { padding: 20px; } 
    .mrc-info-grid { grid-template-columns: 1fr; } 
}