/* Partilot — correcciones UI (arreglos_partilot.pdf, solo bugs/estilo) */

/* Login */
.group-login input.form-control {
    font-size: 1.05rem !important;
    font-weight: 600 !important;
    color: #1a1a1a !important;
}
.group-login .input-group-text {
    font-size: 1.1rem;
    color: #333;
}

/* Login móvil (< 768px) */
.partilot-login-mobile {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem 1rem;
    background: #eef1f5;
    box-sizing: border-box;
}
.partilot-login-mobile-inner {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 24px;
    padding: 1.75rem 1.25rem 1.5rem;
    box-shadow: 0 8px 28px rgba(31, 36, 48, 0.08);
}
.partilot-login-mobile .auth-brand h4 {
    font-size: 1.15rem;
    line-height: 1.4;
}
.partilot-login-mobile-form .group-login-mobile {
    width: 100%;
}
.partilot-login-mobile-form .group-login-mobile .form-control {
    font-size: 16px !important;
    min-width: 0;
}
.partilot-login-mobile-submit {
    border-radius: 30px;
    padding: 13px 0;
}

@media (max-width: 575.98px) {
    .partilot-login-mobile {
        padding: 0.85rem 0.75rem;
    }
    .partilot-login-mobile-inner {
        padding: 1.5rem 1rem 1.25rem;
        border-radius: 20px;
    }
    .partilot-login-mobile .group-login div,
    .partilot-login-mobile .group-login input {
        padding: 0.65rem 0.75rem !important;
    }
}

/* Textos más legibles */
.text-muted,
small.text-muted,
.form-text,
.label-control + small {
    color: #4a5568 !important;
}
.table td,
.table th {
    color: #1a1a1a;
}
.table thead th {
    color: #212529;
    font-weight: 600;
}

/* Placeholders */
.form-control::placeholder {
    color: #9aa3af !important;
    opacity: 1;
}
.form-control:focus::placeholder {
    color: transparent !important;
}

/* Badges de estado */
.badge {
    font-size: 0.8rem;
    font-weight: 600;
}

/* Campos con icono: menos hueco entre icono y texto */
.content-page .content .group-form .input-group-text {
    flex: 0 0 42px;
    width: 42px;
    min-width: 42px;
    justify-content: center;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}
.content-page .content .group-form .input-group-text img {
    max-width: 22px;
    max-height: 22px;
}
.content-page .content .group-form .form-control {
    min-width: 0;
}

/* Cabecera: contexto de entidad/administración */
.topbar-user-context {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: 0.72rem;
    font-weight: 600;
    color: #6c757d;
    line-height: 1.25;
    max-width: 300px;
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 1px;
}
.navbar-custom .topbar > .topbar-menu:last-child {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
}
.navbar-custom .topbar .nav-user {
    min-height: 48px;
    height: auto !important;
    padding-top: 6px !important;
    padding-bottom: 6px !important;
    align-items: flex-start !important;
}
.navbar-custom .topbar .nav-user .ms-2 {
    padding-top: 1px;
    padding-bottom: 1px;
}
.nav-user .user-name {
    font-weight: 700;
    color: #1a1a1a;
}
.nav-user .user-role {
    font-size: 0.7rem;
    color: #6c757d;
}

/* Sidebar usuario sin desplegable inútil */
.user-box-panel-context {
    font-size: 0.78rem;
    color: #6c757d;
    margin-bottom: 0.35rem;
    line-height: 1.25;
    padding: 0 0.5rem;
}
.menu-logout-link {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}
.menu-logout-link .menu-link {
    color: #c0392b !important;
}

/* Switches bloqueados para entidad (solo lectura visual) */
.entity-config-locked {
    opacity: 0.55;
    pointer-events: none;
}

/* Avisos PNotify (brighttheme + partilot) */
.ui-pnotify .ui-pnotify-container.brighttheme-success,
.ui-pnotify.brighttheme-success .ui-pnotify-container,
.ui-pnotify.partilot-notify .ui-pnotify-container.brighttheme-success {
    background-color: #c7efe9 !important;
    color: #0f766e !important;
    border-color: #8fd7cd !important;
}
.ui-pnotify .ui-pnotify-container.brighttheme-error,
.ui-pnotify.brighttheme-error .ui-pnotify-container,
.ui-pnotify.partilot-notify-error .ui-pnotify-container,
.ui-pnotify.partilot-notify-error,
.ui-pnotify.partilot-notify-error .alert {
    background-color: #f8d7da !important;
    border-radius: 50px !important;
    color: #842029 !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    border-color: #f1aeb5 !important;
}
.ui-pnotify .ui-pnotify-container.brighttheme-notice,
.ui-pnotify.brighttheme-notice .ui-pnotify-container {
    background-color: #fff3cd !important;
    color: #7a5a00 !important;
    border-color: #ffe69c !important;
}
.ui-pnotify .ui-pnotify-container.brighttheme-info,
.ui-pnotify.brighttheme-info .ui-pnotify-container {
    background-color: #cff4fc !important;
    color: #055160 !important;
    border-color: #9eeaf9 !important;
}
.ui-pnotify.partilot-notify-error {
    top: 120px !important;
}

.form-control.is-invalid,
.form-control.is-invalid:focus {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.15rem rgba(220, 53, 69, 0.25) !important;
}

/* Botones de acción en tablas: esquinas poco redondeadas; btn-light con borde visible */
.content-page .table .btn.btn-sm,
.content-page .dataTables_wrapper table .btn.btn-sm {
    padding: 0.28rem 0.5rem;
    min-width: 2rem;
    line-height: 1.15;
    box-shadow: none !important;
}

.content-page .table .btn.btn-sm + .btn.btn-sm,
.content-page .dataTables_wrapper table .btn.btn-sm + .btn.btn-sm {
    margin-left: 4px;
}

.content-page .table .btn.btn-sm.btn-light,
.content-page .dataTables_wrapper table .btn.btn-sm.btn-light {
    background-color: #fff !important;
    border: 1px solid #cfd4dc !important;
    color: #333 !important;
}

.content-page .table .btn.btn-sm.btn-light:hover,
.content-page .table .btn.btn-sm.btn-light:focus,
.content-page .dataTables_wrapper table .btn.btn-sm.btn-light:hover,
.content-page .dataTables_wrapper table .btn.btn-sm.btn-light:focus {
    background-color: #f3f4f7 !important;
    border-color: #b8bec8 !important;
    color: #1a1a1a !important;
}

.content-page .table .btn[title] {
    min-width: 2rem;
}

/* Ficha entidad: cabecera icono + nombre sin solapamiento */
.entity-profile-head .photo-preview-3,
.entity-profile-head .photo-preview-2 {
    float: none !important;
    margin-right: 0 !important;
}
.entity-profile-head h4 {
    word-break: break-word;
    overflow-wrap: anywhere;
    line-height: 1.25;
}
.form-group .row:has(> .col-1 .photo-preview-3),
.form-group .row:has(> .col-1 .photo-preview-2) {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1rem;
}
.form-group .row:has(> .col-1 .photo-preview-3) > .col-1,
.form-group .row:has(> .col-1 .photo-preview-2) > .col-1 {
    flex: 0 0 auto;
    width: auto !important;
    max-width: 100%;
}
.form-group .row:has(> .col-1 .photo-preview-3) > .col-4,
.form-group .row:has(> .col-1 .photo-preview-2) > .col-4 {
    flex: 1 1 12rem;
    min-width: 0;
    width: auto !important;
    max-width: 100%;
}
.form-group .row > .col-1 .photo-preview-3,
.form-group .row > .col-1 .photo-preview-2 {
    float: none !important;
    margin-right: 0 !important;
}
.form-group .row:has(> .col-1 .photo-preview-3) h4,
.form-group .row:has(> .col-1 .photo-preview-2) h4 {
    word-break: break-word;
    overflow-wrap: anywhere;
    line-height: 1.25;
}
@media (max-width: 575.98px) {
    .form-group .row:has(> .col-1 .photo-preview-3),
    .form-group .row:has(> .col-1 .photo-preview-2) {
        justify-content: center;
        text-align: center;
    }
}
.form-switch {
    padding: 0;
}

/* Switches en tarjetas laterales: label a la izquierda, switch a la derecha */
.form-card .form-check.form-switch {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    clear: both;
    min-height: 2rem;
}
.form-card .form-check.form-switch .form-check-input {
    float: none !important;
    margin-left: 0 !important;
    flex: 0 0 auto;
    order: 2;
}
.form-card .form-check.form-switch .form-check-label {
    float: none !important;
    width: auto !important;
    max-width: calc(100% - 3.25rem);
    margin-right: 0 !important;
    padding-left: 0 !important;
    flex: 1 1 auto;
    order: 1;
    min-width: 0;
    line-height: 1.35;
    text-align: left;
}
.col-md-3 .form-card .form-check.form-switch .form-check-label {
    font-size: 0.84rem;
}

/* Selector entidad activa (gestor multi-entidad) */
.partilot-entity-switcher__menu {
    min-width: 280px;
    max-width: min(420px, calc(100vw - 24px));
    white-space: normal;
    padding-top: 0.35rem;
    padding-bottom: 0.35rem;
}
.partilot-entity-switcher__menu .dropdown-header h6 {
    white-space: normal;
}
.partilot-entity-switcher__menu .dropdown-item.active {
    background-color: #f0f2f8;
}
.partilot-entity-switcher__menu button.dropdown-item {
    width: 100%;
    border: none;
    background: transparent;
    text-align: left;
    white-space: normal;
}
.partilot-entity-switcher__name {
    display: block;
    width: 100%;
    white-space: normal;
    word-break: break-word;
    line-height: 1.35;
}
@media (max-width: 991.98px) {
    .partilot-entity-switcher {
        display: list-item !important;
    }
}

/* Pestañas horizontales en Ajustes (app.min.css fuerza .nav-item { width: 100% }) */
.config-inline-tabs {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0;
    border-bottom: 1px solid #dee2e6;
}
.config-inline-tabs .nav-item {
    width: auto;
    flex: 0 0 auto;
}
.config-inline-tabs .nav-link {
    white-space: nowrap;
}

/* (Overlay bloqueante de PDF eliminado: solo notificación arriba derecha) */

/*
 * Utilidades de panel (card + footer como listado Sorteos).
 * No usar flex/min-height en .content: rompe el footer absoluto del tema.
 */
.partilot-page-panel--centered > .card-body {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.partilot-page-panel__inner {
    width: 100%;
}

.partilot-page-panel__narrow {
    width: 100%;
    max-width: 540px;
}

.partilot-page-panel__section + .partilot-page-panel__section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eef1f6;
}

@media (min-width: 992px) {
    .partilot-page-panel__aside {
        padding-left: 1.5rem;
        border-left: 1px solid #eef1f6;
    }
}

.partilot-page-panel__col-main,
.partilot-page-panel__col-side {
    height: 100%;
}

.partilot-page-panel__col-side {
    display: flex;
    flex-direction: column;
}

@media (min-width: 992px) {
    .partilot-page-panel__col-side {
        padding-left: 1.5rem;
        border-left: 1px solid #eef1f6;
    }
}

/* Paginación tablas: todos los botones redondeados (pill) */
.content-page .pagination {
    gap: 4px;
    flex-wrap: wrap;
    justify-content: center;
}

.content-page .pagination .page-item .page-link {
    border-radius: 999px !important;
    min-width: 32px;
    height: 32px;
    line-height: 30px;
    padding: 0 10px !important;
    text-align: center;
    border: 1px solid #d9dde8 !important;
    margin: 0 2px;
    color: #525a6d;
    background: #fff;
    box-shadow: none;
}

.content-page .pagination .page-item:first-child .page-link,
.content-page .pagination .page-item:last-child .page-link {
    border-radius: 999px !important;
}

.content-page .pagination .page-item.active .page-link,
.content-page .pagination .page-link.active,
.content-page .pagination .active > .page-link {
    background-color: #1f2430 !important;
    border-color: #1f2430 !important;
    color: #fff !important;
    border-radius: 999px !important;
    height: 32px;
    line-height: 30px;
    font-weight: 600;
}

.content-page .pagination .page-item.disabled .page-link,
.content-page .pagination .page-link.disabled,
.content-page .pagination .disabled > .page-link {
    opacity: 0.55;
    height: 32px;
    line-height: 30px;
    border-radius: 999px !important;
}

.content-page .dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: 999px !important;
}

.content-page .dataTables_wrapper .dataTables_paginate .paginate_button.current,
.content-page .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    border-radius: 999px !important;
}

/* Botones del panel: esquinas redondeadas (30px, como formularios y asistente diseño) */
.content-page .btn:not(.btn-link):not(.btn-close):not(.page-link):not(.paginate_button) {
    border-radius: 30px !important;
}

/* Tablas: menos redondeado — debe ir después y con más especificidad que la regla anterior */
.content-page .table .btn.btn-sm:not(.btn-link):not(.btn-close):not(.page-link):not(.paginate_button),
.content-page .dataTables_wrapper table .btn.btn-sm:not(.btn-link):not(.btn-close):not(.page-link):not(.paginate_button) {
    border-radius: 6px !important;
}

/* Herramientas del editor de diseño: grupo continuo (solo esquinas exteriores redondeadas) */
.content-page .format-btn-group button.btn:not(.btn-link):not(.btn-close):not(.page-link):not(.paginate_button),
.content-page .format-btn-group label.btn:not(.btn-link):not(.page-link) {
    border-radius: 0 !important;
}

.content-page .format-btn-group button.btn:not(.btn-link):not(.btn-close):not(.page-link):not(.paginate_button):first-of-type:not(:last-of-type) {
    border-radius: 0.25rem 0 0 0.25rem !important;
}

.content-page .format-btn-group button.btn:not(.btn-link):not(.btn-close):not(.page-link):not(.paginate_button):last-of-type:not(:first-of-type) {
    border-radius: 0 0.25rem 0.25rem 0 !important;
}

.content-page .format-btn-group button.btn:not(.btn-link):not(.btn-close):not(.page-link):not(.paginate_button):only-of-type {
    border-radius: 0.25rem !important;
}

.content-page .btn-group:not(.format-btn-group) > .btn:not(.btn-link):not(.page-link) {
    border-radius: 0 !important;
}

.content-page .btn-group:not(.format-btn-group) > .btn:first-child {
    border-radius: 30px 0 0 30px !important;
}

.content-page .btn-group:not(.format-btn-group) > .btn:last-child,
.content-page .btn-group:not(.format-btn-group) > .dropdown-toggle-split {
    border-radius: 0 30px 30px 0 !important;
}

.content-page .btn-group:not(.format-btn-group) > .btn:only-child,
.content-page .btn-group:not(.format-btn-group) > .dropdown-toggle:only-child {
    border-radius: 30px !important;
}

.content-page .input-group > .btn:last-child,
.content-page .input-group > .btn:not(:first-child):not(:last-child) {
    border-radius: 0 30px 30px 0 !important;
}

.content-page .input-group > .btn:first-child:only-child {
    border-radius: 30px !important;
}

.form-card .input-group:has(.input-group-text + input.form-control) input.form-control {
    padding-left: 0px !important;
}