.master-wrap { min-height: 100vh; background: #F0F6FD; }
.master-header {
    background: #185FA5; padding: 0 2rem;
    display: flex; align-items: center; justify-content: space-between;
    height: 56px;
}
.master-header-left { display: flex; align-items: center; gap: 12px; }
.master-logo {
    width: 36px; height: 36px; border-radius: 10px;
    background: rgba(255,255,255,0.2);
    display: flex; align-items: center; justify-content: center;
}
.master-app-name { color: #fff; font-size: 16px; font-weight: 600; }
.master-header-right { display: flex; align-items: center; gap: 12px; }
.master-badge {
    background: rgba(255,255,255,0.2); color: #fff;
    font-size: 12px; padding: 4px 10px; border-radius: 20px; font-weight: 500;
}
.master-logout {
    background: transparent; border: 1px solid rgba(255,255,255,0.4);
    color: #fff; font-size: 13px; padding: 6px 14px;
    border-radius: 8px; cursor: pointer; transition: background .2s;
}
.master-logout:hover { background: rgba(255,255,255,0.15); }
.master-content { padding: 0; }
.master-title { font-size: 20px; font-weight: 600; color: #0C447C; margin: 0 0 0.5rem; }
.master-count { font-size: 13px; color: #85B7EB; margin-bottom: 1.5rem; }
.master-loading { text-align: center; color: #85B7EB; padding: 3rem; font-size: 15px; }
.master-empty {
    background: #fff; border: 0.5px solid #D0E4F5; border-radius: 12px;
    padding: 3rem; text-align: center; color: #85B7EB;
}
.master-table-wrap {
    background: #fff; border: 0.5px solid #D0E4F5;
    border-radius: 12px; overflow-x: auto;
}
.master-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.master-table thead tr { background: #F0F6FD; border-bottom: 1px solid #D0E4F5; }
.master-table th {
    padding: 12px 16px; text-align: left;
    font-size: 11px; font-weight: 600; color: #378ADD; letter-spacing: 0.5px;
}
.master-table tbody tr { border-bottom: 0.5px solid #EDF4FC; transition: background .15s; }
.master-table tbody tr:last-child { border-bottom: none; }
.master-table tbody tr:hover { background: #F8FBFF; }
.master-table td { padding: 14px 16px; color: #1a2f4a; vertical-align: middle; }
.empresa-nombre { margin: 0; font-weight: 500; color: #1a2f4a; }
.empresa-comercial { margin: 2px 0 0; font-size: 12px; color: #85B7EB; }
.plan-badge {
    background: #E6F1FB; color: #185FA5; font-size: 11px;
    padding: 3px 10px; border-radius: 20px; font-weight: 500;
}
.action-btns { display: flex; gap: 8px; }
.btn-aprobar {
    background: #185FA5; color: #fff; border: none;
    padding: 7px 14px; border-radius: 7px; font-size: 12px;
    font-weight: 500; cursor: pointer; transition: background .2s;
}
.btn-aprobar:hover { background: #0C447C; }
.btn-rechazar {
    background: #fff; color: #E24B4A; border: 1px solid #F09595;
    padding: 7px 14px; border-radius: 7px; font-size: 12px;
    font-weight: 500; cursor: pointer; transition: background .2s;
}
.btn-rechazar:hover { background: #FEE2E2; }

/* ─── Modal ───────────────────────────────────────────── */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex; align-items: center; justify-content: center;
    z-index: 1000; padding: 1rem;
}
.modal-card {
    background: #fff; border-radius: 16px;
    padding: 2rem; width: 100%; max-width: 440px;
    border: 0.5px solid #D0E4F5;
}
.modal-title { font-size: 18px; font-weight: 600; color: #0C447C; margin: 0 0 4px; }
.modal-empresa { font-size: 13px; color: #85B7EB; margin: 0 0 1.5rem; }
.modal-fecha {
    font-size: 13px; color: #378ADD; margin: 0.5rem 0 1.5rem;
    background: #E6F1FB; padding: 8px 12px; border-radius: 8px;
}
.modal-btns { display: flex; gap: 12px; margin-top: 0.5rem; }

/* ─── Tabs ────────────────────────────────────────────── */
.master-tabs {
    background: #fff; border-bottom: 1px solid #D0E4F5;
    padding: 0 2rem; display: flex; gap: 4px;
}
.master-tab {
    padding: 14px 20px; font-size: 14px; font-weight: 500;
    color: #85B7EB; background: transparent; border: none;
    border-bottom: 2px solid transparent; cursor: pointer;
    transition: color .2s; display: flex; align-items: center; gap: 8px;
}
.master-tab:hover { color: #185FA5; }
.master-tab.active { color: #185FA5; border-bottom-color: #185FA5; }
.tab-count {
    background: #E6F1FB; color: #185FA5; font-size: 11px;
    padding: 2px 7px; border-radius: 20px; font-weight: 600;
}
.tab-count.reactivacion-count {
    background: #FFF3CD; color: #856404;
}
.estado-badge {
    font-size: 11px; padding: 3px 10px; border-radius: 20px; font-weight: 500;
}
.estado-badge.success { background: #EAF3DE; color: #3B6D11; }
.estado-badge.warning { background: #FAEEDA; color: #854F0B; }
.estado-badge.danger { background: #FCEBEB; color: #A32D2D; }
.btn-historial {
    background: #fff; color: #185FA5; border: 1px solid #B5D4F4;
    padding: 7px 14px; border-radius: 7px; font-size: 12px;
    font-weight: 500; cursor: pointer; transition: background .2s;
}
.btn-historial:hover { background: #E6F1FB; }
.modal-info {
    font-size: 13px; color: #378ADD; margin-bottom: 1rem;
    background: #E6F1FB; padding: 8px 12px; border-radius: 8px;
}

/* ─── Admin Dashboard ─────────────────────────────────── */
.admin-cards {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px; margin-bottom: 2rem;
}
.admin-card {
    background: #fff; border: 0.5px solid #D0E4F5;
    border-radius: 12px; padding: 1rem 1.25rem;
}
.admin-card-label {
    font-size: 11px; color: #85B7EB; font-weight: 600;
    letter-spacing: 0.5px; margin: 0 0 8px;
}
.admin-card-value { font-size: 18px; font-weight: 500; color: #0C447C; margin: 0; }
.admin-alert-pendiente {
    background: #FAEEDA; border: 0.5px solid #FAC775;
    border-radius: 10px; padding: 14px 18px; font-size: 13px;
    color: #854F0B; margin-bottom: 2rem;
}
.admin-section { margin-bottom: 2rem; }
.admin-section-title {
    font-size: 16px; font-weight: 600; color: #0C447C;
    margin: 0 0 1rem; padding-bottom: 8px;
    border-bottom: 1px solid #D0E4F5;
}
.admin-data-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}
.admin-data-item {
    background: #fff; border: 0.5px solid #D0E4F5;
    border-radius: 10px; padding: 12px 16px;
}
.admin-data-label { font-size: 11px; color: #85B7EB; font-weight: 600; margin: 0 0 4px; }
.admin-data-value { font-size: 14px; color: #1a2f4a; margin: 0; font-weight: 500; }

/* ─── Procesar Correos ─────────────────────────────────── */
.filtros-card {
    background: #fff; border: 0.5px solid #D0E4F5;
    border-radius: 12px; padding: 1.5rem; margin-bottom: 1.5rem;
}
.filtros-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px;
}
.radio-group { display: flex; gap: 16px; align-items: center; padding-top: 8px; }
.radio-label { font-size: 13px; color: #1a2f4a; display: flex; align-items: center; gap: 6px; cursor: pointer; }
.adj-badge {
    font-size: 10px; font-weight: 600; padding: 2px 7px;
    border-radius: 4px; margin-right: 4px; display: inline-block;
}
.adj-badge.json { background: #EAF3DE; color: #3B6D11; }
.adj-badge.pdf { background: #FCEBEB; color: #A32D2D; }
.adj-badge.zip { background: #FAEEDA; color: #854F0B; }
.paginacion {
    display: flex; align-items: center; justify-content: center;
    gap: 16px; margin-top: 1rem;
}
.resultado-stats { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; margin: 1rem 0; }
.resultado-stat {
    background: #F0F6FD; border-radius: 10px; padding: 1rem; text-align: center;
}
.resultado-num { font-size: 28px; font-weight: 600; color: #185FA5; margin: 0; }
.resultado-label { font-size: 12px; color: #85B7EB; margin: 4px 0 0; }
.alerta-exito {
    background: #EAF3DE; border: 0.5px solid #C0DD97;
    border-radius: 8px; padding: 10px 14px; font-size: 13px; color: #3B6D11;
}

.btn-google {
    background: #fff; color: #1a2f4a; border: 1px solid #D0E4F5;
    padding: 7px 14px; border-radius: 7px; font-size: 12px;
    font-weight: 500; cursor: pointer; transition: background .2s;
    display: flex; align-items: center;
}
.btn-google:hover { background: #F0F6FD; }

.ruta-card {
    background: #fff; border: 0.5px solid #D0E4F5;
    border-radius: 12px; padding: 1rem 1.25rem; margin-bottom: 1rem;
}

.gmail-hint {
    background: #FAEEDA; border: 0.5px solid #FAC775;
    border-radius: 8px; padding: 10px 14px;
    font-size: 13px; color: #854F0B; margin-top: 8px;
}
.gmail-hint strong { font-weight: 600; }

/* ─── Logo upload ─────────────────────────────────────── */
.config-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
}
@media (max-width: 768px) {
    .config-grid { grid-template-columns: 1fr; }
    .logo-upload-area { text-align: center; }
    .reg-row { grid-template-columns: 1fr; }
    .admin-data-grid { grid-template-columns: 1fr; }
}
.logo-upload-area {
    background: #fff; border: 0.5px solid #D0E4F5;
    border-radius: 12px; padding: 1.5rem; text-align: center;
}
.logo-preview {
    max-width: 200px; max-height: 120px; object-fit: contain;
    border-radius: 8px; border: 0.5px solid #D0E4F5;
}
.logo-placeholder {
    width: 120px; height: 80px; border-radius: 8px;
    background: #F0F6FD; border: 1px dashed #B5D4F4;
    display: inline-flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 6px;
}
.logo-placeholder p { font-size: 12px; color: #85B7EB; margin: 0; }

@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Dropdown Reportes ───────────────────────────────────── */
.reporte-dropdown-wrap {
    position: relative;
    margin-left: auto;
}
.reporte-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 4px;
}
.reporte-dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    background: #fff;
    border: 1px solid #D0E4F5;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(24,95,165,0.12);
    min-width: 200px;
    z-index: 100;
    overflow: hidden;
}
.reporte-dropdown-item {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 11px 16px;
    background: transparent;
    border: none;
    text-align: left;
    font-size: 13px;
    color: #1a2f4a;
    cursor: pointer;
    transition: background .15s;
}
.reporte-dropdown-item:hover { background: #F0F6FD; }

/* ─── Tarjetas resumen de reporte ─────────────────────────── */
.reporte-card {
    background: #fff;
    border: 1px solid #D0E4F5;
    border-radius: 10px;
    padding: 12px 20px;
    min-width: 120px;
}
.reporte-card.reporte-card-total {
    border-color: #A8D5B8;
    background: #F0FBF4;
}
.reporte-card.danger {
    border-color: #F5B8B8;
    background: #FEF2F2;
}
.reporte-card.warning {
    border-color: #FAC775;
    background: #FFFBEB;
}
.reporte-card-label {
    font-size: 11px;
    color: #85B7EB;
    margin: 0 0 4px;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.reporte-card-valor {
    font-size: 22px;
    font-weight: 700;
    color: #0C447C;
    margin: 0;
}
