/* public/styles.css */

:root {
    --lm-gold: #ffd700;
    --lm-gold-dark: #c5a000;
    --lm-blue-dark: #0a0a2a;
    --lm-blue-light: #1c1c50;
    --lm-red: #ff4444;
    --lm-green: #00cc66;
    --lm-border-glow: 0 0 10px rgba(255, 215, 0, 0.6);
}

body {
    font-family: 'Roboto', sans-serif;
    /* Fondo oscuro estilo noche mágica */
    background: radial-gradient(circle at center, var(--lm-blue-light) 0%, var(--lm-blue-dark) 100%);
    color: #e0e0e0;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

.auth-overlay {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at top left, rgba(245, 158, 11, 0.12), transparent 28%),
        radial-gradient(circle at bottom right, rgba(59, 130, 246, 0.10), transparent 24%),
        rgba(8, 10, 14, 0.92);
    backdrop-filter: blur(14px);
}

.auth-card {
    width: min(460px, 92vw);
    padding: 30px;
    border-radius: 28px;
    border: 1px solid rgba(245, 158, 11, 0.22);
    background: rgba(19, 24, 33, 0.96);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
}

.auth-card h2 {
    margin: 0 0 10px 0;
    color: #f8fafc;
    font-family: 'Roboto', sans-serif;
    font-size: 1.55rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.auth-texto {
    color: #9aa6bb;
    margin-bottom: 22px;
    line-height: 1.6;
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
}

.auth-brand-icon {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    background: linear-gradient(180deg, #fbbf24 0%, #f59e0b 100%);
    color: #17120a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 16px 30px rgba(245, 158, 11, 0.18);
}

.auth-brand-title {
    color: #f8fafc;
    font-size: 1.55rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.03em;
}

.auth-brand-title span {
    color: #fbbf24;
}

.auth-brand-subtitle {
    margin-top: 5px;
    color: #7d8899;
    font-size: 0.82rem;
    letter-spacing: 0.02em;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.auth-field label {
    color: #cbd5e1;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.auth-field .field-optional {
    color: #94a3b8;
    font-size: 0.72rem;
    text-transform: none;
    letter-spacing: 0;
}

.auth-field input {
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid #313847;
    background: #12161d;
    color: white;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-field select {
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid #313847;
    background-color: #12161d;
    color: white;
}

select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    display: block;
    width: 100%;
    border-radius: 16px !important;
    border: 1px solid #313847 !important;
    background-color: #12161d;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23fbbf24' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-position: right 16px center;
    background-size: 14px;
    background-repeat: no-repeat;
    padding-right: 46px !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    box-shadow: none;
}

select:hover {
    border-color: rgba(245, 158, 11, 0.24) !important;
    background-color: #151a22;
}

select:focus {
    outline: none;
    border-color: rgba(245, 158, 11, 0.45) !important;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.08);
}

select option {
    background: #12161d;
    color: #f8fafc;
}

select option:checked {
    background: #2a1f08;
    color: #fbbf24;
}

.auth-field input:focus,
.auth-field select:focus {
    outline: none;
    border-color: rgba(245, 158, 11, 0.45);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.08);
}

.auth-field textarea,
.access-notes-textarea {
    width: 100%;
    min-height: 120px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid #313847;
    background: #12161d;
    color: white;
    font: inherit;
    line-height: 1.5;
    resize: vertical;
}

.auth-field textarea:focus,
.access-notes-textarea:focus {
    outline: none;
    border-color: rgba(245, 158, 11, 0.45);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.08);
}

input[type="number"] {
    appearance: textfield;
    -moz-appearance: textfield;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.auth-status {
    margin: 8px 0 16px 0;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid #313847;
    color: #d7deea;
    background: rgba(255,255,255,0.04);
}

.auth-status.error {
    border-color: rgba(255, 68, 68, 0.7);
    background: rgba(255, 68, 68, 0.12);
    color: #ffb8b8;
}

.auth-submit {
    width: 100%;
    margin-top: 8px;
    min-height: 54px;
    border-radius: 18px;
    font-size: 0.98rem;
}

.ocr-import-box {
    display: none;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
    padding: 12px 14px;
    border: 1px solid rgba(255, 215, 0, 0.22);
    border-radius: 8px;
    background: rgba(255, 215, 0, 0.06);
}

.ocr-import-text {
    color: #bfc4d8;
    font-size: 0.9rem;
    margin-top: 4px;
}

.ocr-import-actions {
    flex: 0 0 auto;
}

.ocr-input-wrap {
    position: relative;
    flex: 1 1 auto;
}

.ocr-input-with-icons {
    width: 100%;
    padding-right: 90px;
    border-radius: 999px;
    background: rgba(255,255,255,0.05);
}

.ocr-inside-actions {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.ocr-icon-btn {
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: #c9c9d4;
    cursor: pointer;
    transition: 0.2s ease;
}

.ocr-icon-btn:hover {
    background: rgba(255,255,255,0.10);
    color: var(--lm-gold);
}

.ocr-name-preview {
    margin: 10px 0 4px 0;
    padding: 18px 16px;
    border-radius: 10px;
    border: 1px solid rgba(255, 215, 0, 0.35);
    background: linear-gradient(180deg, rgba(255, 215, 0, 0.10), rgba(255, 255, 255, 0.03));
    text-align: center;
    box-shadow: inset 0 0 12px rgba(0,0,0,0.2);
}

.ocr-name-preview span {
    color: var(--lm-gold);
    font-size: 1.8rem;
    font-weight: bold;
    letter-spacing: 0.02em;
    word-break: break-word;
}

#modalResultadoAlta .result-modal-content {
    width: min(560px, 92vw);
    max-width: 560px;
    border-radius: 24px;
    border: 1px solid rgba(245, 158, 11, 0.42);
    background: #151a23;
    box-shadow:
        0 28px 70px rgba(0, 0, 0, 0.58),
        0 0 0 1px rgba(245, 158, 11, 0.08),
        0 0 42px rgba(245, 158, 11, 0.10);
    overflow: hidden;
}

#modalResultadoAlta.success .result-modal-content {
    border-color: rgba(34, 197, 94, 0.42);
    box-shadow:
        0 28px 70px rgba(0, 0, 0, 0.58),
        0 0 0 1px rgba(34, 197, 94, 0.08),
        0 0 42px rgba(34, 197, 94, 0.10);
}

#modalResultadoAlta.error .result-modal-content {
    border-color: rgba(248, 113, 113, 0.54);
    box-shadow:
        0 28px 70px rgba(0, 0, 0, 0.58),
        0 0 0 1px rgba(248, 113, 113, 0.10),
        0 0 42px rgba(127, 29, 29, 0.18);
}

#modalResultadoAlta .result-modal-header {
    min-height: 70px;
    padding: 18px 24px;
    background: linear-gradient(180deg, rgba(245, 158, 11, 0.08), rgba(255, 255, 255, 0.015));
    border-bottom: 1px solid rgba(245, 158, 11, 0.28);
}

#modalResultadoAlta.success .result-modal-header {
    background: linear-gradient(180deg, rgba(34, 197, 94, 0.09), rgba(255, 255, 255, 0.015));
    border-bottom-color: rgba(34, 197, 94, 0.26);
}

#modalResultadoAlta.error .result-modal-header {
    background: linear-gradient(180deg, rgba(127, 29, 29, 0.20), rgba(255, 255, 255, 0.015));
    border-bottom-color: rgba(248, 113, 113, 0.30);
}

#modalResultadoAlta #tituloResultadoAlta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    color: #f8fafc;
    font-family: 'Roboto', sans-serif;
    font-size: 1.28rem;
    font-weight: 900;
}

#modalResultadoAlta #tituloResultadoAlta i {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.22);
}

#modalResultadoAlta.success #tituloResultadoAlta i {
    color: #22c55e;
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.24);
}

#modalResultadoAlta.error #tituloResultadoAlta i {
    color: #fca5a5;
    background: rgba(127, 29, 29, 0.22);
    border-color: rgba(248, 113, 113, 0.28);
}

#modalResultadoAlta .result-modal-body {
    display: grid;
    gap: 18px;
    padding: 26px 24px 24px;
    background: #151a23;
}

#modalResultadoAlta #mensajeResultadoAlta {
    margin: 0;
    color: #cbd5e1;
    font-family: 'Roboto', sans-serif;
    font-size: 1rem;
    line-height: 1.55;
}

#modalResultadoAlta .result-modal-detail {
    min-height: 58px;
    display: flex;
    align-items: center;
    padding: 14px 18px;
    border-radius: 14px;
    border: 1px solid rgba(245, 158, 11, 0.24);
    background: linear-gradient(180deg, rgba(245, 158, 11, 0.08), rgba(255, 255, 255, 0.025));
    color: #fbbf24;
    font-family: 'Roboto', sans-serif;
    font-size: 1.05rem;
    font-weight: 900;
    word-break: break-word;
}

#modalResultadoAlta.success .result-modal-detail {
    border-color: rgba(34, 197, 94, 0.24);
    background: linear-gradient(180deg, rgba(34, 197, 94, 0.08), rgba(255, 255, 255, 0.025));
    color: #86efac;
}

#modalResultadoAlta.error .result-modal-detail {
    border-color: rgba(248, 113, 113, 0.24);
    background: linear-gradient(180deg, rgba(127, 29, 29, 0.18), rgba(255, 255, 255, 0.025));
    color: #fca5a5;
}

#modalResultadoAlta .result-modal-buttons {
    margin-top: 2px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

#modalResultadoAlta #btnResultadoAltaSecundario {
    min-height: 44px;
    border-radius: 16px;
    padding: 0 18px;
}

/* --- BARRA DE NAVEGACIÓN --- */
nav {
    background: rgba(0,0,0,0.8);
    border-bottom: 2px solid var(--lm-gold);
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav h1 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--lm-gold);
    font-family: 'Cinzel Decorative', serif;
    letter-spacing: 1px;
}

.nav-links button {
    background: transparent;
    border: 1px solid transparent;
    color: #aaa;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 1rem;
    transition: 0.3s;
    font-family: 'Cinzel Decorative', serif;
}

.nav-links button:hover { color: white; }

.nav-links button.active {
    color: var(--lm-gold);
    border: 1px solid var(--lm-gold);
    border-radius: 5px;
    background: rgba(255, 215, 0, 0.1);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.2);
}

.session-badge {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 215, 0, 0.35);
    background: rgba(255, 215, 0, 0.08);
    color: #f4e08a;
    font-size: 0.9rem;
    white-space: nowrap;
}

/* --- CONTENEDOR PRINCIPAL --- */
.main-container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
}

.seccion { display: none; } /* Ocultamos todas por defecto */
.seccion.activa { display: block; animation: fadeIn 0.5s; }

@keyframes fadeIn { from{opacity:0; transform: translateY(10px);} to{opacity:1; transform: translateY(0);} }

/* --- BARRA DE HERRAMIENTAS (Buscador, Filtros) --- */
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0,0,0,0.4);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #444;
}

.search-box input {
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #555;
    background: #222;
    color: white;
    width: 300px;
}

.users-toolbar {
    gap: 12px;
    justify-content: flex-start;
}

.users-toolbar > * {
    min-width: 0;
}

.search-box-users {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    max-width: 100%;
}

.search-box-users input {
    display: block;
    width: 100% !important;
    min-width: 0;
    max-width: none;
    box-sizing: border-box;
}

.users-toolbar-actions {
    display: flex;
    flex: 0 0 auto;
    margin-left: auto;
    align-items: center;
    gap: 10px;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
}

.users-list-shell {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    gap: 14px;
}

.users-list-viewport {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding-right: 6px;
}

.users-list-viewport::-webkit-scrollbar {
    width: 10px;
}

.users-list-viewport::-webkit-scrollbar-thumb {
    background: rgba(245, 158, 11, 0.22);
    border-radius: 999px;
}

.users-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding-top: 6px;
}

.users-pagination-copy {
    color: #8b98aa;
    font-size: 0.82rem;
    font-weight: 600;
}

.users-pagination-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.search-clear-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: #999;
    cursor: pointer;
    padding: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.search-clear-btn:hover {
    color: #fff;
}

.search-clear-btn-left {
    left: 10px;
    right: auto;
}

.search-icon-floating {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #7b8798;
    pointer-events: none;
}

@media (max-width: 900px) {
    .users-toolbar {
        align-items: stretch;
    }

    .search-box-users {
        flex-basis: 100%;
        min-width: 0;
    }

    .users-toolbar-actions {
        width: 100%;
        justify-content: flex-end;
        flex-wrap: wrap;
    }
}

@media (max-width: 560px) {
    .users-toolbar-actions {
        justify-content: stretch;
    }

    .users-toolbar-actions button {
        flex: 1 1 100%;
    }
}

.toggle-bajas label {
    cursor: pointer;
    color: #bbb;
    display: flex; align-items: center; gap: 5px;
}

/* --- TABLAS --- */
.table-container {
    overflow-x: auto;
    border: 2px solid var(--lm-gold-dark);
    border-radius: 8px;
    box-shadow: var(--lm-border-glow);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(10, 10, 42, 0.6);
}

th {
    background: linear-gradient(to bottom, #2a1a00, #1a0f00);
    color: var(--lm-gold);
    font-family: 'Cinzel Decorative', serif;
    padding: 15px;
    text-align: left;
    border-bottom: 2px solid var(--lm-gold);
}

td {
    padding: 12px;
    border-bottom: 1px solid rgba(255, 215, 0, 0.2);
}

tr:hover td { background: rgba(255, 215, 0, 0.1); }

.status-baja { color: var(--lm-red); font-weight: bold; }
.status-activo { color: var(--lm-green); }

/* --- BOTONES --- */
.btn-epic {
    background: linear-gradient(to bottom, var(--lm-gold) 0%, var(--lm-gold-dark) 100%);
    border: 1px solid #6a4f00;
    color: #2a1a00;
    font-family: 'Cinzel Decorative', serif;
    font-weight: bold;
    padding: 10px 25px;
    border-radius: 5px;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.5);
    transition: all 0.2s;
}

.btn-epic:hover {
    filter: brightness(1.2);
    transform: translateY(-2px);
    box-shadow: 0 0 15px var(--lm-gold);
}

.btn-action {
    background: rgba(255,255,255,0.1);
    border: 1px solid #555;
    color: var(--lm-gold);
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: 0.2s;
}
.btn-action:hover { background: var(--lm-gold); color: black; }

.btn-action.btn-whatsapp-inline {
    color: #25D366;
    border-color: rgba(37, 211, 102, 0.6);
}

.btn-action.btn-whatsapp-inline i {
    color: #25D366;
}

.btn-action.btn-whatsapp-inline:hover {
    background: #25D366;
    color: white;
    border-color: #25D366;
}

.btn-action.btn-whatsapp-inline:hover i {
    color: white;
}

.fab.fa-whatsapp,
.fa-brands.fa-whatsapp {
    color: #25D366;
}

.btn-whatsapp .fab.fa-whatsapp,
.btn-whatsapp .fa-brands.fa-whatsapp,
.btn-action.btn-whatsapp-inline:hover .fab.fa-whatsapp,
.btn-action.btn-whatsapp-inline:hover .fa-brands.fa-whatsapp,
#btnEnviarWhatsappDirecto .fab.fa-whatsapp,
#btnEnviarWhatsappDirecto .fa-brands.fa-whatsapp,
.quick-action-item:hover .fab.fa-whatsapp,
.quick-action-item:hover .fa-brands.fa-whatsapp {
    color: inherit;
}

.quick-actions-menu {
    position: relative;
    display: inline-block;
    z-index: 2;
}

.quick-actions-menu.open {
    z-index: 120;
}

.entity-card.quick-actions-open {
    z-index: 80;
}

.quick-actions-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    min-width: 220px;
    display: none;
    z-index: 40;
    padding: 8px;
    border-radius: 10px;
    border: 1px solid rgba(255, 215, 0, 0.22);
    background: rgba(12, 14, 34, 0.98);
    box-shadow: 0 12px 28px rgba(0,0,0,0.4);
}

.quick-actions-menu.open .quick-actions-dropdown {
    display: grid;
    gap: 8px;
}

.quick-action-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    background: rgba(255,255,255,0.04);
    color: white;
    cursor: pointer;
    text-align: left;
    transition: 0.2s ease;
}

.quick-action-item:hover {
    background: rgba(37, 211, 102, 0.18);
    border-color: rgba(37, 211, 102, 0.38);
}

.quick-action-item i {
    width: 30px;
    flex: 0 0 30px;
    text-align: center;
}

.quick-action-hero-icon {
    width: 30px;
    height: 30px;
    object-fit: contain;
    flex: 0 0 30px;
    filter: drop-shadow(0 2px 3px rgba(0,0,0,0.45));
    transform: scale(1.08);
    transform-origin: center;
}

.quick-action-fire:hover {
    background: rgba(255, 106, 0, 0.16);
    border-color: rgba(255, 106, 0, 0.42);
}

.quick-action-fire i {
    color: #ff8a2a;
}

.quick-action-rally:hover {
    background: rgba(78, 167, 255, 0.16);
    border-color: rgba(78, 167, 255, 0.40);
}

.quick-action-rally i {
    color: #63b3ff;
}

.quick-action-hunt:hover {
    background: rgba(255, 215, 0, 0.14);
    border-color: rgba(255, 215, 0, 0.35);
}

.quick-action-hunt i {
    color: #ffd54a;
}

.quick-action-dragon:hover {
    background: rgba(186, 104, 255, 0.15);
    border-color: rgba(186, 104, 255, 0.38);
}

.quick-action-dragon i {
    color: #cf8cff;
}

.whatsapp-target-card {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid rgba(37, 211, 102, 0.35);
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(37, 211, 102, 0.12), rgba(10, 10, 42, 0.75));
}

.valor-destino {
    margin-top: 4px;
    color: white;
    font-weight: bold;
    word-break: break-word;
}

.textarea-whatsapp {
    min-height: 180px;
    resize: vertical;
    box-sizing: border-box;
    margin-top: 6px;
}

.whatsapp-status {
    margin-top: 14px;
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid #444;
    background: rgba(255,255,255,0.05);
    color: #ddd;
}

.whatsapp-status.ok {
    border-color: rgba(37, 211, 102, 0.6);
    color: #9ef0bb;
    background: rgba(37, 211, 102, 0.12);
}

.guild-whatsapp-modal-content {
    max-width: 680px;
    width: min(680px, 92vw);
}

.guild-whatsapp-modal-body {
    padding: 22px;
}

.guild-whatsapp-message-card {
    padding: 22px;
}

.guild-whatsapp-target-card {
    margin-bottom: 18px;
    border-radius: 20px;
    background:
        linear-gradient(135deg, rgba(20, 45, 42, 0.72), rgba(22, 25, 32, 0.96) 58%, rgba(24, 21, 44, 0.9));
    border: 1px solid rgba(37, 211, 102, 0.28);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.guild-whatsapp-target-card .label-dato {
    margin-bottom: 6px;
}

.guild-whatsapp-field + .guild-whatsapp-field {
    margin-top: 18px;
}

.guild-whatsapp-select {
    width: 100%;
    min-height: 54px;
    padding: 0 18px;
    border-radius: 18px;
    background-color: #10141c;
    border: 1px solid #313847;
    color: #f8fafc;
    box-sizing: border-box;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
}

.guild-whatsapp-select:focus {
    border-color: rgba(245, 158, 11, 0.65);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.12);
    outline: none;
}

.guild-whatsapp-textarea {
    margin-top: 8px;
    min-height: 210px;
    padding: 16px 18px;
    background: #10141c;
    border: 1px solid #313847;
    border-radius: 20px;
    color: #f8fafc;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
}

.guild-whatsapp-textarea:focus {
    border-color: rgba(245, 158, 11, 0.65);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.12);
    outline: none;
}

.guild-whatsapp-status {
    margin-top: 18px;
}

.guild-whatsapp-modal-actions {
    justify-content: flex-end;
}

.whatsapp-status.error {
    border-color: rgba(255, 68, 68, 0.7);
    color: #ffb3b3;
    background: rgba(255, 68, 68, 0.12);
}

.whatsapp-modal-buttons {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.btn-whatsapp {
    background: #25D366;
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
}

.btn-whatsapp:disabled {
    opacity: 0.6;
    cursor: wait;
}

#btnEnviarWhatsappDirecto {
    display: inline-flex;
}

#btnEnviarWhatsappDirecto .btn-whatsapp {
    background: linear-gradient(180deg, #25D366 0%, #1faa52 100%);
    color: #ffffff;
    border: 1px solid rgba(37, 211, 102, 0.72);
    border-radius: 16px;
    box-shadow: 0 14px 28px rgba(37, 211, 102, 0.18);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 0 24px;
    font-family: 'Roboto', sans-serif;
    font-size: 0.98rem;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

#btnEnviarWhatsappDirecto .btn-whatsapp i {
    color: #ffffff;
}

#btnEnviarWhatsappDirecto .btn-whatsapp:hover {
    background: linear-gradient(180deg, #2cde73 0%, #22b85c 100%);
    border-color: rgba(37, 211, 102, 0.95);
    box-shadow: 0 16px 30px rgba(37, 211, 102, 0.24);
    transform: translateY(-1px);
}

.whatsapp-dashboard {
    display: grid;
    grid-template-columns: minmax(320px, 1.15fr) minmax(280px, 0.85fr);
    gap: 20px;
}

.reports-layout {
    display: grid;
    grid-template-columns: minmax(340px, 1.15fr) minmax(260px, 0.85fr);
    gap: 14px;
}

#seccion-reportes.activa {
    overflow: hidden;
    min-height: 0;
}

.reports-scroll-shell {
    overflow-y: auto;
    min-height: 0;
    height: 100%;
    padding: 10px 6px 12px 0;
}

.reports-scroll-shell::-webkit-scrollbar {
    width: 10px;
}

.reports-scroll-shell::-webkit-scrollbar-thumb {
    background: rgba(245, 158, 11, 0.22);
    border-radius: 999px;
}

.reports-table-card {
    grid-column: span 2;
}

.reports-table-header {
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 18px;
}

.reports-table-header-copy {
    flex: 1 1 auto;
    min-width: 0;
}

.reports-search-box {
    flex: 0 1 360px;
    max-width: 360px;
    min-width: 280px;
    margin-left: auto;
}

.reports-controls-grid {
    grid-template-columns: minmax(0, 1fr) 0;
    justify-content: center;
    align-items: start;
    column-gap: 0;
    row-gap: 8px;
}

.reports-layout {
    display: grid;
    grid-template-columns: minmax(414px, 430px) minmax(760px, 1fr);
    gap: 24px;
    align-items: stretch;
}

.reports-target-field input {
    text-align: center;
}

.reports-target-field input[readonly] {
    color: #f8fafc;
    cursor: default;
    background: linear-gradient(180deg, #151a23 0%, #10141b 100%);
    border-color: rgba(148, 163, 184, 0.26);
}

.reports-date-source {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    min-width: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.reports-calendar-field {
    min-width: 0;
    margin: 0;
}

.reports-calendar-label {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.reports-calendar {
    border: 1px solid rgba(245, 158, 11, 0.42);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(15, 19, 27, 0.96), rgba(10, 13, 18, 0.94));
    padding: 12px;
    box-shadow:
        0 22px 44px rgba(0, 0, 0, 0.30),
        0 0 0 1px rgba(245, 158, 11, 0.08),
        0 0 28px rgba(245, 158, 11, 0.08),
        inset 0 0 0 1px rgba(255, 255, 255, 0.025);
}

.reports-calendar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin-bottom: 3px;
}

.reports-calendar-head strong {
    color: #f8fafc;
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: capitalize;
}

.reports-calendar-nav {
    width: 21px;
    height: 21px;
    border: 1px solid #313847;
    border-radius: 8px;
    background: #111722;
    color: #fbbf24;
    cursor: pointer;
    display: inline-grid;
    place-items: center;
}

.reports-calendar-weekdays,
.reports-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 3px;
}

.reports-calendar-weekdays {
    margin-bottom: 2px;
}

.reports-calendar-weekdays span {
    color: #8aa0c2;
    font-size: 0.52rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-align: center;
}

.reports-calendar-day {
    min-height: 38px;
    border: 1px solid rgba(49, 56, 71, 0.8);
    border-radius: 7px;
    background: rgba(12, 16, 23, 0.86);
    color: #dbeafe;
    display: grid;
    place-items: center;
    gap: 0;
    cursor: default;
    font-family: 'Roboto', sans-serif;
    font-size: 0.66rem;
    font-weight: 800;
}

button.reports-calendar-day {
    cursor: pointer;
}

.reports-calendar-day.is-empty {
    visibility: hidden;
}

.reports-calendar-day.has-report {
    border-color: rgba(245, 158, 11, 0.42);
    background: rgba(245, 158, 11, 0.08);
}

.reports-calendar-day.is-processed {
    border-color: rgba(34, 197, 94, 0.54);
    background: linear-gradient(180deg, rgba(34, 197, 94, 0.20), rgba(12, 16, 23, 0.92));
    color: #dcfce7;
    box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.08);
}

.reports-calendar-day.is-processed .bot-icon-blood {
    color: #22c55e;
}

.reports-calendar-day.is-pending:not(.is-processed) {
    border-color: rgba(245, 158, 11, 0.42);
    background: rgba(245, 158, 11, 0.08);
}

.reports-calendar-day.is-selected {
    border-color: rgba(251, 191, 36, 0.9);
    background: linear-gradient(180deg, rgba(245, 158, 11, 0.24), rgba(27, 31, 40, 0.96));
    box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.18), 0 8px 18px rgba(0, 0, 0, 0.22);
    transform: translateY(-1px);
}

.reports-calendar-day.is-processed.is-selected {
    border-color: rgba(74, 222, 128, 0.92);
    background: linear-gradient(180deg, rgba(34, 197, 94, 0.34), rgba(15, 23, 42, 0.94));
    box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.20), 0 8px 18px rgba(0, 0, 0, 0.22);
}

.reports-calendar-day .bot-icon-blood {
    font-size: 0.58rem;
}

.reports-calendar-empty {
    border: 1px dashed rgba(148, 163, 184, 0.24);
    border-radius: 18px;
    color: #9fb4d8;
    padding: 18px;
    text-align: center;
    font-weight: 700;
}

.reports-status-slot {
    display: flex;
    align-items: end;
    justify-content: center;
    min-height: 0;
    width: 0;
    overflow: hidden;
}

.reports-actions-stack {
    display: grid;
    grid-template-columns: repeat(5, minmax(138px, 1fr));
    gap: 16px;
    justify-content: center;
    align-items: stretch;
}

.reports-action-btn {
    width: 100%;
    min-height: 54px;
    height: 54px;
    justify-content: center;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0 16px;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
    font-size: 0.98rem;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.01em;
    border-radius: 18px;
    text-align: center;
}

.reports-actions-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-block: 14px;
}

.reports-controls-card {
    display: block;
    padding: 0;
    margin: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.reports-actions-card {
    justify-content: flex-start;
    border-color: rgba(245, 158, 11, 0.34);
    box-shadow:
        0 22px 44px rgba(0, 0, 0, 0.24),
        0 0 0 1px rgba(245, 158, 11, 0.06),
        0 0 30px rgba(245, 158, 11, 0.07),
        inset 0 0 0 1px rgba(255, 255, 255, 0.018);
}

.reports-actions-card .guild-form-card-header {
    margin-bottom: 4px;
}

.reports-actions-card .guild-form-card-header {
    align-items: flex-start;
}

.reports-actions-card .guild-form-card-header > div:last-child {
    max-width: 100%;
}

.reports-action-btn-accent {
    border-color: rgba(59, 130, 246, 0.28);
    color: #93c5fd;
}

.reports-action-btn-accent:hover {
    border-color: rgba(59, 130, 246, 0.45);
    color: #bfdbfe;
}

.reports-actions-stack .btn-action {
    background: #171d27;
    border: 1px solid #313847;
    color: #f0c35d;
    box-shadow: none;
}

.reports-actions-stack .btn-action:hover {
    background: #fbbf24;
    color: #16120b;
    border-color: rgba(245, 158, 11, 0.45);
}

.reports-actions-stack .btn-epic {
    background: linear-gradient(180deg, #fbbf24 0%, #f59e0b 100%);
    border: 1px solid rgba(245, 158, 11, 0.35);
    color: #17120a;
    box-shadow: 0 16px 30px rgba(245, 158, 11, 0.15);
}

.reports-actions-stack .btn-action i,
.reports-actions-stack .btn-epic i {
    font-size: 1rem;
}

.bot-icon-blood {
    color: #9a2329;
    font-size: 1.28rem;
    text-shadow:
        0 0 0 rgba(0, 0, 0, 0),
        0 1px 0 rgba(0, 0, 0, 0.75),
        0 0 10px rgba(48, 4, 7, 0.28);
    filter: saturate(0.95) brightness(0.92);
}

.stats-dashboard {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
}

#seccion-estadisticas.activa {
    overflow-y: auto;
    min-height: 0;
    padding-right: 6px;
}

#seccion-estadisticas.activa::-webkit-scrollbar {
    width: 10px;
}

#seccion-estadisticas.activa::-webkit-scrollbar-thumb {
    background: rgba(245, 158, 11, 0.22);
    border-radius: 999px;
}

.stats-section-header {
    align-items: center;
}

.stats-filter-bar {
    display: grid;
    grid-template-columns: minmax(190px, 220px) minmax(170px, 210px) minmax(190px, 240px) minmax(240px, 1fr);
    gap: 16px;
    align-items: end;
    margin: 4px 0 18px;
    padding: 14px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(8, 13, 24, 0.38);
}

.stats-filter-field {
    margin: 0;
}

.stats-filter-field .select-field,
.stats-filter-field .input-dato {
    width: 100%;
    min-height: 48px;
    box-sizing: border-box;
}

.stats-calendar-field {
    max-width: 250px;
}

.stats-date-source {
    display: none !important;
}

.stats-calendar-dropdown {
    position: relative;
    width: 100%;
}

.stats-calendar-trigger {
    width: 100%;
    min-height: 48px;
}

.stats-calendar-trigger i {
    color: #fbbf24;
}

.stats-calendar-popover {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 130;
    display: none;
    padding: 6px;
    border: 1px solid rgba(245, 158, 11, 0.34);
    border-radius: 18px;
    background: #10141b;
    box-shadow: 0 22px 44px rgba(0, 0, 0, 0.42);
}

.stats-calendar-dropdown.is-open .stats-calendar-popover {
    display: block;
}

.stats-calendar {
    width: 250px;
    max-width: 100%;
}

.stats-period-note {
    min-height: 48px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    border-radius: 16px;
    border: 1px solid rgba(245, 158, 11, 0.16);
    background: rgba(245, 158, 11, 0.06);
    color: #d7b56d;
    font-size: 0.9rem;
    font-weight: 700;
}

.stats-loads-chip {
    min-height: 48px;
    display: grid;
    align-content: center;
    gap: 3px;
    padding: 0 16px;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: linear-gradient(180deg, rgba(18, 24, 34, 0.92), rgba(12, 16, 23, 0.92));
    box-sizing: border-box;
}

.stats-loads-chip strong {
    color: #f8fafc;
    font-size: 1.2rem;
    line-height: 1;
}

.stats-loads-chip small {
    color: #9fb0d0;
    font-size: 0.78rem;
    font-weight: 600;
}

.stats-kpi-grid {
    display: grid;
    grid-template-columns: minmax(380px, 1.2fr) minmax(260px, 0.8fr);
    gap: 16px;
}

.stats-kpi-card,
.stats-mode-card {
    min-width: 0;
    padding: 18px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(180deg, rgba(18, 24, 34, 0.92), rgba(12, 16, 23, 0.92));
}

.stats-kpi-card-primary {
    display: grid;
    justify-items: center;
    text-align: center;
    border-color: rgba(255, 255, 255, 0.08);
    background: linear-gradient(180deg, rgba(18, 24, 34, 0.92), rgba(12, 16, 23, 0.92));
}

.stats-kpi-card-danger {
    border-color: rgba(248, 113, 113, 0.28);
    background: linear-gradient(135deg, rgba(127, 29, 29, 0.24), rgba(12, 16, 23, 0.94));
}

.stats-kpi-card-coffers {
    display: grid;
    grid-template-columns: minmax(150px, 0.8fr) minmax(260px, 1.2fr);
    gap: 18px;
    align-items: center;
    border-color: rgba(245, 158, 11, 0.28);
    background:
        radial-gradient(circle at 10% 20%, rgba(245, 158, 11, 0.16), transparent 34%),
        linear-gradient(135deg, rgba(245, 158, 11, 0.09), rgba(12, 16, 23, 0.94));
}

.stats-coffer-breakdown {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.stats-coffer-breakdown div {
    padding: 12px 10px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(7, 11, 18, 0.46);
    text-align: center;
}

.stats-coffer-breakdown span {
    margin-bottom: 6px;
    color: #fbbf24;
}

.stats-coffer-breakdown strong {
    font-size: 1.35rem;
}

.stats-kpi-card span,
.stats-mode-card span,
.stats-guild-item span {
    display: block;
    margin-bottom: 8px;
    color: #8ba2c7;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    line-height: 1.2;
    text-transform: uppercase;
}

.stats-kpi-card strong {
    display: block;
    color: #f8fafc;
    font-size: 2rem;
    line-height: 1;
}

.stats-kpi-progress {
    width: 100%;
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.14);
    margin: 4px 0 2px;
}

.stats-kpi-progress i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
    box-shadow: 0 0 18px rgba(245, 158, 11, 0.22);
}

.stats-kpi-card small,
.stats-guild-main small {
    display: block;
    margin-top: 8px;
    color: #9fb0d0;
    font-size: 0.84rem;
}

.stats-guild-list {
    display: grid;
    gap: 12px;
}

.stats-guild-item {
    display: grid;
    grid-template-columns: minmax(180px, 1.1fr) minmax(240px, 1.3fr) 100px 100px;
    gap: 18px;
    align-items: center;
    padding: 18px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(8, 13, 24, 0.48);
}

.stats-guild-main strong {
    color: #f8fafc;
    font-size: 1.02rem;
}

.stats-guild-meter-copy {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 8px;
}

.stats-guild-meter-copy span {
    margin: 0;
}

.stats-guild-meter-copy strong {
    color: #fbbf24;
}

.stats-progress {
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.14);
}

.stats-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #ef4444, #f59e0b 45%, #22c55e);
}

.stats-guild-mini {
    text-align: center;
}

.stats-guild-mini strong {
    color: #f8fafc;
    font-size: 1.35rem;
}

.stats-guild-mini-danger strong {
    color: #f87171;
}

.stats-mode-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.stats-mode-card strong {
    color: #9fb0d0;
}

.stats-mode-card.is-active {
    border-color: rgba(245, 158, 11, 0.28);
    background: rgba(245, 158, 11, 0.08);
}

.stats-mode-card.is-active strong {
    color: #fbbf24;
}

.stats-loading,
.stats-empty {
    grid-column: 1 / -1;
    padding: 18px;
    border-radius: 18px;
    border: 1px dashed rgba(148, 163, 184, 0.24);
    color: #9fb4d8;
    text-align: center;
    font-weight: 700;
}

@media (max-width: 1180px) {
    .stats-kpi-grid,
    .stats-mode-grid,
    .stats-filter-bar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .stats-guild-item {
        grid-template-columns: minmax(180px, 1fr) minmax(220px, 1fr);
    }
}

@media (max-width: 760px) {
    .stats-kpi-grid,
    .stats-mode-grid,
    .stats-guild-item,
    .stats-filter-bar {
        grid-template-columns: 1fr;
    }

    .stats-guild-mini {
        text-align: left;
    }

    .stats-kpi-card-coffers {
        grid-column: span 1;
        grid-template-columns: 1fr;
    }
}

.reports-actions-stack .btn-action i.bot-icon-blood,
.reports-actions-stack .btn-epic i.bot-icon-blood {
    font-size: 1.28rem;
    color: #9a2329;
}

.btn-action:hover .bot-icon-blood,
.btn-epic:hover .bot-icon-blood {
    color: #82191f;
}

.reports-table-wrap {
    overflow: auto;
    min-height: 0;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.03);
}

.reports-table {
    width: 100%;
    min-width: 940px;
}

.reports-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #171c25;
    color: #dbe3f0;
    font-size: 0.74rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    text-align: center;
}

.reports-table thead th:hover {
    color: #f8fafc;
}

.reports-table td,
.reports-table th {
    white-space: nowrap;
    text-align: center;
    vertical-align: middle;
}

.reports-table tbody td {
    text-align: center;
}

.reports-table tbody td:first-child,
.reports-table thead th:first-child {
    text-align: center;
}

.reports-empty-state {
    text-align: center;
    color: #8b98aa;
    font-weight: 600;
    padding: 22px 14px !important;
}

.reports-col-debt {
    color: #fca5a5 !important;
}

.reports-col-actions {
    text-align: center;
    width: 88px;
}

.reports-row-action {
    width: 40px;
    min-width: 40px;
    height: 40px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #f0c35d;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1;
}

.reports-row-action i {
    color: #f0c35d;
    font-size: 0.95rem;
    line-height: 1;
}

.report-edit-modal-content {
    max-width: 980px;
    width: min(980px, 92vw);
}

.report-edit-layout {
    display: grid;
    gap: 18px;
}

.report-edit-meta {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.report-edit-levels {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
}

.report-edit-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    align-items: start;
}

.report-edit-summary .account-profile-field {
    display: grid;
    grid-template-rows: 18px 48px;
    gap: 6px;
    align-items: start;
}

.report-edit-summary .guild-field-label {
    display: flex;
    align-items: end;
    min-height: 18px;
    line-height: 1;
    white-space: nowrap;
}

.report-edit-readonly {
    min-height: 48px;
    display: flex;
    align-items: center;
    padding: 0 14px;
    border-radius: 16px;
    border: 1px solid #313847;
    background: #12161d;
    color: #f8fafc;
    font-weight: 600;
}

.report-edit-readonly.is-accent {
    color: #fbbf24;
}

.report-edit-readonly.is-danger {
    color: #fca5a5;
}

#modalMensaje .modal-content {
    width: min(960px, 88vw) !important;
    max-width: min(960px, 88vw) !important;
    padding: 0 !important;
    position: relative !important;
    box-sizing: border-box !important;
    max-height: min(86vh, 820px) !important;
    background: rgba(19, 24, 33, 0.98) !important;
    border: 1px solid rgba(245, 158, 11, 0.22) !important;
    border-radius: 30px !important;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.45) !important;
    overflow: hidden !important;
}

#modalMensaje h3 {
    margin: 0 !important;
    padding: 22px 26px !important;
    color: #f8fafc !important;
    font-family: 'Roboto', sans-serif !important;
    font-size: 1.3rem !important;
    font-weight: 700 !important;
    letter-spacing: -0.03em !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    background:
        radial-gradient(circle at top left, rgba(245, 158, 11, 0.10), transparent 40%),
        rgba(19, 24, 33, 0.98) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
}

#modalMensaje h3 i {
    color: #fbbf24 !important;
}

.report-message-preview,
#previewMensajeWhatsapp {
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: calc(100vh - 320px) !important;
    margin: 0 !important;
    background: #12161d !important;
    color: #e5ebf5 !important;
    border: 1px solid #313847 !important;
    border-radius: 18px !important;
    padding: 20px !important;
    font-family: 'Roboto', sans-serif !important;
    line-height: 1.6 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow-wrap: anywhere !important;
    box-sizing: border-box !important;
}

.report-message-shell {
    display: grid;
    gap: 18px;
}

.upload-result-panel {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.upload-result-heading {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.upload-result-heading-icon,
.upload-result-summary-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: rgba(245, 158, 11, 0.12);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.22);
}

.upload-result-heading h2,
.upload-result-summary h3 {
    margin: 0;
    color: #f8fafc;
    font-size: 1.15rem;
}

.upload-result-heading p,
.upload-result-summary p {
    margin: 4px 0 0;
    color: #9fb0d0;
    font-size: 0.9rem;
}

.upload-result-summary {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border: 1px solid rgba(34, 197, 94, 0.22);
    border-radius: 18px;
    background: rgba(22, 101, 52, 0.14);
}

.upload-result-summary-icon {
    color: #34d399;
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.22);
}

.upload-result-summary.has-incidents .upload-result-summary-icon {
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.28);
}

.upload-result-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.upload-result-card {
    min-width: 0;
    border: 1px solid #313847;
    border-radius: 18px;
    background: #111720;
    overflow: hidden;
}

.upload-result-card.is-warning {
    border-color: rgba(245, 158, 11, 0.28);
}

.upload-result-card.is-danger {
    border-color: rgba(239, 68, 68, 0.28);
}

.upload-result-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    color: #dbe4f0;
    font-weight: 900;
}

.upload-result-card.is-warning .upload-result-card-head {
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.08);
}

.upload-result-card.is-danger .upload-result-card-head {
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.08);
}

.upload-result-card-head span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.upload-result-card-head strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #f8fafc;
    font-size: 0.86rem;
}

.upload-result-list {
    display: grid;
    gap: 8px;
    max-height: 260px;
    margin: 0;
    padding: 14px 16px 16px;
    list-style: none;
    overflow: auto;
}

.upload-result-list li {
    padding: 9px 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.035);
    color: #e5ebf5;
    font-size: 0.9rem;
    font-weight: 700;
}

.upload-result-empty {
    margin: 0;
    padding: 16px;
    color: #8fa0bf;
    font-size: 0.9rem;
    font-weight: 700;
}

.upload-result-incidents {
    display: grid;
    gap: 14px;
    border: 0;
    border-radius: 0;
    background: transparent;
    padding: 0;
}

.upload-result-incidents-head {
    padding: 0 2px 2px;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.upload-result-incidents-head h3 {
    margin: 0;
    color: #f8fafc;
    font-size: 1.05rem;
    font-weight: 900;
}

.upload-result-incidents-head p {
    margin: 0;
    color: #9fb0d0;
    font-family: 'Roboto', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
}

.upload-result-incidents-head strong {
    display: none;
}

.upload-incident-list {
    display: grid;
    gap: 12px;
    overflow: visible;
    padding-right: 0;
}

.upload-incident-card {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid #313847;
    border-radius: 16px;
    background: #0f151f;
}

.upload-incident-card.is-baja {
    border-color: rgba(239, 68, 68, 0.32);
}

.upload-incident-card.is-nueva {
    border-color: rgba(245, 158, 11, 0.30);
}

.upload-incident-main {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.upload-incident-main strong {
    display: inline-flex;
    width: fit-content;
    max-width: 100%;
    align-items: center;
    min-height: 28px;
    padding: 3px 10px;
    border: 1px solid rgba(245, 158, 11, 0.24);
    border-radius: 10px;
    color: #fbbf24;
    background: linear-gradient(180deg, rgba(245, 158, 11, 0.13), rgba(245, 158, 11, 0.055));
    font-size: 1rem;
    font-weight: 900;
    box-shadow: 0 10px 22px rgba(245, 158, 11, 0.08);
}

.upload-incident-main span,
.upload-incident-card p,
.upload-incident-note,
.upload-incident-matches span {
    color: #9fb0d0;
    font-size: 0.86rem;
}

.upload-incident-main em {
    flex: 0 0 auto;
    color: #fecaca;
    font-size: 0.78rem;
    font-style: normal;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.upload-incident-card p {
    margin: 0;
}

.upload-incident-note {
    color: #fca5a5;
}

.upload-incident-matches {
    display: grid;
    gap: 6px;
    padding: 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.035);
}

.upload-incident-action {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(112px, auto) auto;
    gap: 8px;
}

.upload-incident-action label {
    grid-column: 1 / -1;
    color: #c8d2e4;
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.upload-incident-action .custom-select {
    width: 100%;
    min-width: 0;
}

.upload-incident-open-account,
.upload-incident-apply-one {
    width: 46px;
    height: 46px;
    justify-content: center;
    padding: 0;
}

.upload-incident-ignore-one {
    width: auto;
    min-width: 112px;
    height: 46px;
    justify-content: center;
    padding: 0 14px;
    gap: 8px;
    white-space: nowrap;
}

.upload-incident-apply-one {
    background: linear-gradient(180deg, #fbbf24 0%, #f59e0b 100%);
    border-color: rgba(245, 158, 11, 0.45);
    color: #17120a;
    box-shadow: 0 14px 26px rgba(245, 158, 11, 0.16);
}

.upload-incident-apply-one:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 34px rgba(245, 158, 11, 0.22);
}

.upload-incident-ignore-one {
    color: #fca5a5;
    background: rgba(127, 29, 29, 0.16);
    border-color: rgba(248, 113, 113, 0.28);
}

.upload-incident-ignore-one:hover {
    transform: translateY(-1px);
    color: #fecaca;
    border-color: rgba(248, 113, 113, 0.42);
    box-shadow: 0 14px 28px rgba(127, 29, 29, 0.22);
}

.upload-incident-submit {
    justify-self: end;
}

.report-message-intro {
    padding: 18px 20px;
    border-radius: 20px;
    border: 1px solid rgba(245, 158, 11, 0.18);
    background: linear-gradient(180deg, rgba(245, 158, 11, 0.08), rgba(255, 255, 255, 0.02));
}

.report-message-intro-head {
    display: grid;
    gap: 6px;
}

.report-message-intro-kicker {
    color: #94a3b8;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.report-message-intro h4 {
    margin: 0;
    color: #f8fafc;
    font-size: 1.18rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.report-message-intro-date {
    margin: 0;
    color: #fbbf24;
    font-weight: 700;
}

.report-message-intro-body {
    margin-top: 12px;
    color: #d9e2ef;
    line-height: 1.7;
}

.report-message-intro-body strong {
    color: #fbbf24;
}

.report-message-cards {
    display: grid;
    gap: 14px;
}

.report-message-card {
    padding: 18px 20px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(14, 18, 25, 0.88);
}

.report-message-card.is-debe {
    border-color: rgba(245, 158, 11, 0.26);
}

.report-message-card.is-expulsar {
    border-color: rgba(239, 68, 68, 0.28);
    background: linear-gradient(180deg, rgba(127, 29, 29, 0.16), rgba(14, 18, 25, 0.92));
}

.report-message-card.is-cumple {
    border-color: rgba(16, 185, 129, 0.24);
}

.report-message-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.report-message-card-copy h4 {
    margin: 0 0 4px;
    color: #f8fafc;
    font-size: 1.02rem;
    font-weight: 800;
}

.report-message-card-copy p {
    margin: 0;
    color: #94a3b8;
    font-size: 0.84rem;
}

.report-message-card-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    white-space: nowrap;
}

.report-message-card-status.is-cumple {
    background: rgba(16, 185, 129, 0.10);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.22);
}

.report-message-card-status.is-debe {
    background: rgba(245, 158, 11, 0.10);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.22);
}

.report-message-card-status.is-expulsar {
    background: rgba(239, 68, 68, 0.10);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.22);
}

.report-message-metrics-grid {
    display: grid;
    gap: 8px;
}

.report-message-metric {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px;
    align-items: start;
    padding: 10px 14px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.03);
}

.report-message-metric-label {
    color: #fbbf24;
    font-size: 0.9rem;
    font-weight: 800;
    line-height: 1.45;
}

.report-message-metric-value {
    color: #f8fafc;
    font-size: 0.98rem;
    font-weight: 700;
    line-height: 1.5;
}

.report-message-empty,
.report-message-prose {
    color: #d9e2ef;
    line-height: 1.7;
}

.report-message-card-account {
    margin: 0 0 6px;
    color: #67e8f9;
    font-size: 0.92rem;
    font-weight: 700;
}

.report-message-card-name {
    margin: 0;
    color: #f8fafc;
    font-size: 1rem;
    font-weight: 800;
}

.report-wa-shell {
    color: #e5e7eb;
    line-height: 1.45;
}

.report-wa-topline {
    margin-bottom: 8px;
    color: #a78bfa;
    font-size: 0.95rem;
    font-weight: 700;
}

.report-wa-title {
    margin: 0 0 18px;
    color: #f8fafc;
    font-size: 1.15rem;
    font-weight: 800;
}

.report-wa-intro {
    margin-bottom: 18px;
}

.report-wa-intro p {
    margin: 0 0 6px;
    color: #f3f4f6;
    font-size: 0.98rem;
    font-weight: 700;
}

.report-wa-block {
    margin-bottom: 18px;
}

.report-wa-account {
    margin: 0 0 4px;
    color: #f8fafc;
    font-size: 1rem;
    font-weight: 700;
}

.report-wa-handle {
    color: #22c55e;
    font-weight: 800;
}

.report-wa-name {
    margin: 0 0 6px;
    color: #f8fafc;
    font-size: 1rem;
    font-weight: 800;
}

.report-wa-list {
    margin: 0;
    padding-left: 22px;
    color: #f3f4f6;
}

.report-wa-list li {
    margin: 0 0 3px;
    font-size: 0.98rem;
    font-weight: 700;
}

.report-wa-empty {
    color: #cbd5e1;
    font-size: 0.96rem;
}

#modalMensaje .modal-buttons {
    margin: 0 !important;
    padding: 18px 26px 22px !important;
    display: flex !important;
    gap: 12px !important;
    justify-content: flex-end !important;
    align-items: center !important;
    background:
        radial-gradient(circle at bottom right, rgba(245, 158, 11, 0.08), transparent 42%),
        rgba(23, 28, 37, 0.98) !important;
    box-shadow:
        inset 0 1px 0 rgba(251, 191, 36, 0.22),
        0 -18px 36px rgba(0, 0, 0, 0.22) !important;
    border-top: none !important;
}

#modalMensaje .modal-buttons button {
    min-height: 48px !important;
    border-radius: 16px !important;
    font-family: 'Roboto', sans-serif !important;
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    padding: 0 22px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    cursor: pointer !important;
}

#modalMensaje .modal-buttons > button:first-child,
#modalMensaje .modal-buttons > button:nth-child(2) {
    background: #171d27 !important;
    border: 1px solid #313847 !important;
    color: #f0c35d !important;
}

#modalMensaje .modal-buttons > button:first-child:hover,
#modalMensaje .modal-buttons > button:nth-child(2):hover {
    background: #fbbf24 !important;
    color: #16120b !important;
    border-color: rgba(245, 158, 11, 0.45) !important;
}

#modalMensaje .modal-buttons a {
    text-decoration: none !important;
}

#modalMensaje .modal-buttons a button {
    background: linear-gradient(180deg, #fbbf24 0%, #f59e0b 100%) !important;
    border: 1px solid rgba(245, 158, 11, 0.35) !important;
    color: #17120a !important;
    box-shadow: 0 16px 30px rgba(245, 158, 11, 0.15) !important;
}

#modalMensaje.is-upload-result .modal-content {
    height: min(86vh, 780px) !important;
    display: flex !important;
    flex-direction: column !important;
}

#modalMensaje.is-upload-result #previewMensajeWhatsapp {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    padding: 20px 26px 24px !important;
    overflow-y: auto !important;
    background: #12161d !important;
}

#modalMensaje.is-upload-result .modal-buttons {
    flex: 0 0 auto !important;
}

#modalMensaje.is-upload-result #btnCopiarModalMensaje,
#modalMensaje.is-upload-result #btnEnviarWhatsappDirecto {
    display: none !important;
}

#modalMensaje.is-upload-result #btnAplicarAccionesModalMensaje {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(180deg, #fbbf24 0%, #f59e0b 100%) !important;
    border: 1px solid rgba(245, 158, 11, 0.35) !important;
    color: #17120a !important;
    box-shadow: 0 16px 30px rgba(245, 158, 11, 0.15) !important;
}

#modalMensaje .modal-title-icon {
    display: inline-flex;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.22);
}

#modalMensaje .modal-title-count {
    margin-left: auto;
    min-width: 0;
    height: 30px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.14);
    font-size: 0.9rem;
    white-space: nowrap;
}

@media (max-width: 1100px) {
    #modalMensaje .modal-content {
        width: min(820px, 92vw) !important;
        max-width: min(820px, 92vw) !important;
    }
}

@media (max-width: 768px) {
    #modalMensaje .modal-content {
        width: 94vw !important;
        max-width: 94vw !important;
        max-height: 88vh !important;
    }

    #modalMensaje h3 {
        padding: 18px 18px !important;
        font-size: 1.12rem !important;
    }

    .report-message-preview,
    #previewMensajeWhatsapp {
        max-height: calc(100vh - 300px) !important;
        padding: 16px !important;
        border-radius: 16px !important;
    }

    #modalMensaje .modal-buttons {
        padding: 16px 18px 18px !important;
        flex-wrap: wrap !important;
    }
}

.report-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 110px;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.report-status-pill.ok {
    color: #86efac;
    background: rgba(22, 101, 52, 0.24);
    border-color: rgba(34, 197, 94, 0.32);
}

.report-status-pill.deuda {
    color: #fbbf24;
    background: rgba(120, 53, 15, 0.24);
    border-color: rgba(245, 158, 11, 0.3);
}

.report-status-pill.expulsion {
    color: #fca5a5;
    background: rgba(127, 29, 29, 0.3);
    border-color: rgba(239, 68, 68, 0.35);
}

.report-row-ok td:first-child {
    border-left: 3px solid rgba(34, 197, 94, 0.55);
}

.report-row-deuda td:first-child {
    border-left: 3px solid rgba(245, 158, 11, 0.55);
}

.report-row-expulsion td:first-child {
    border-left: 3px solid rgba(239, 68, 68, 0.65);
}

.whatsapp-card-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.whatsapp-inline-btn {
    min-width: 188px;
    min-height: 50px;
    white-space: nowrap;
}

.whatsapp-groups-card-legacy {
    display: none !important;
}

.whatsapp-groups-summary {
    margin-bottom: 16px;
}

.whatsapp-inline-status {
    min-height: 24px;
    flex: 1 1 auto;
    color: #9fb0d0;
    font-size: 0.95rem;
    line-height: 1.45;
}

.whatsapp-inline-status.ok {
    color: #34d399;
}

.whatsapp-inline-status.error {
    color: #f87171;
}

#seccion-whatsapp.activa {
    overflow-y: auto;
    min-height: 0;
    padding-right: 6px;
}

#seccion-whatsapp.activa::-webkit-scrollbar {
    width: 10px;
}

#seccion-whatsapp.activa::-webkit-scrollbar-thumb {
    background: rgba(245, 158, 11, 0.22);
    border-radius: 999px;
}

.whatsapp-admin-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.whatsapp-card {
    background: rgba(0,0,0,0.38);
    border: 1px solid rgba(255, 215, 0, 0.25);
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 10px 24px rgba(0,0,0,0.25);
}

.whatsapp-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.whatsapp-card-header h2 {
    margin: 0;
    color: var(--lm-gold);
    font-size: 1.1rem;
}

.whatsapp-state-box,
.whatsapp-groups-box {
    min-height: 80px;
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.03);
    color: #ddd;
}

.whatsapp-state-box.ok {
    border-color: rgba(37, 211, 102, 0.65);
    background: rgba(37, 211, 102, 0.12);
    color: #b7f3ca;
}

.whatsapp-state-box.warn {
    border-color: rgba(255, 215, 0, 0.55);
    background: rgba(255, 215, 0, 0.10);
    color: #ffe79f;
}

.whatsapp-state-box.error {
    border-color: rgba(255, 68, 68, 0.65);
    background: rgba(255, 68, 68, 0.12);
    color: #ffb9b9;
}

.whatsapp-detail-list {
    margin-top: 16px;
    display: grid;
    gap: 10px;
}

.whatsapp-detail-item {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
}

.whatsapp-detail-item span:first-child {
    color: #999;
}

.whatsapp-detail-item span:last-child {
    color: white;
    font-weight: bold;
    text-align: right;
    word-break: break-word;
}

.whatsapp-actions-row {
    margin-top: 16px;
    display: flex;
    justify-content: flex-end;
}

.whatsapp-guide-stack {
    display: grid;
    gap: 14px;
}

.whatsapp-guide-item {
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.03);
}

.whatsapp-guide-label {
    display: inline-flex;
    margin-bottom: 10px;
    color: var(--muted-text);
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.72rem;
    font-weight: 700;
}

.whatsapp-guide-item strong {
    display: block;
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 700;
}

.whatsapp-guide-item p {
    margin: 8px 0 0 0;
    color: #aeb4cf;
    line-height: 1.55;
}

.whatsapp-guide-note {
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(255, 193, 7, 0.18);
    background: rgba(255, 193, 7, 0.08);
    color: #f7e2a4;
    line-height: 1.55;
}

.whatsapp-help-text {
    margin: 14px 0 0 0;
    color: #aeb4cf;
    font-size: 0.92rem;
}

.whatsapp-group-item {
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
    margin-bottom: 12px;
}

.whatsapp-group-item:last-child {
    margin-bottom: 0;
}

.whatsapp-group-type {
    color: var(--lm-gold);
    font-weight: bold;
    margin-bottom: 4px;
}

.whatsapp-group-name {
    color: white;
    margin-bottom: 4px;
}

.whatsapp-group-badge {
    display: inline-flex;
    align-items: center;
    margin-bottom: 8px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 193, 7, 0.14);
    border: 1px solid rgba(255, 193, 7, 0.28);
    color: var(--lm-gold);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.whatsapp-group-id {
    color: #96a0bf;
    font-family: monospace;
    font-size: 0.85rem;
    word-break: break-all;
}

.whatsapp-global-guilds {
    display: grid;
    gap: 16px;
}

.whatsapp-global-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.whatsapp-global-stat {
    min-width: 0;
    padding: 14px 12px;
    border-radius: 16px;
    border: 1px solid rgba(245, 158, 11, 0.16);
    background: rgba(245, 158, 11, 0.08);
}

.whatsapp-global-stat span,
.whatsapp-guild-summary-item span {
    display: block;
    margin-bottom: 6px;
    color: #8ba2c7;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    line-height: 1.2;
    text-transform: uppercase;
}

.whatsapp-global-stat strong {
    color: #f8fafc;
    font-size: 1.45rem;
    line-height: 1;
}

.whatsapp-global-list {
    display: grid;
    gap: 12px;
}

.whatsapp-guild-summary-item {
    display: grid;
    grid-template-columns: minmax(180px, 1.2fr) 92px minmax(210px, 1fr);
    gap: 14px;
    align-items: center;
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(8, 13, 24, 0.48);
}

.whatsapp-guild-summary-item.has-groups {
    border-color: rgba(37, 211, 102, 0.22);
    background: linear-gradient(135deg, rgba(37, 211, 102, 0.08), rgba(8, 13, 24, 0.48));
}

.whatsapp-guild-summary-item.is-empty {
    border-color: rgba(245, 158, 11, 0.22);
}

.whatsapp-guild-summary-main strong,
.whatsapp-guild-summary-excel strong {
    display: block;
    color: #f8fafc;
    font-size: 0.96rem;
    line-height: 1.25;
}

.whatsapp-guild-summary-main small,
.whatsapp-guild-summary-excel small {
    display: block;
    margin-top: 4px;
    color: #8ea2c7;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.78rem;
    word-break: break-all;
}

.whatsapp-guild-summary-metric {
    text-align: center;
}

.whatsapp-guild-summary-metric strong {
    color: #fbbf24;
    font-size: 1.35rem;
}

.whatsapp-global-empty {
    display: grid;
    gap: 6px;
    padding: 16px;
    border-radius: 16px;
    border: 1px solid rgba(245, 158, 11, 0.16);
    background: rgba(245, 158, 11, 0.06);
}

.whatsapp-global-empty strong {
    color: #f8fafc;
}

.whatsapp-global-empty span {
    color: #9fb0d0;
}

/* --- UPLOAD AREA --- */
.upload-card {
    background: rgba(0,0,0,0.5);
    border: 2px dashed var(--lm-gold);
    padding: 40px;
    text-align: center;
    border-radius: 15px;
}

/* --- MODAL (VENTANA FLOTANTE) --- */
.modal-overlay {
    display: none;
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    justify-content: center; align-items: center;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: #0a0a2a;
    border: 3px solid var(--lm-gold);
    width: 90%; max-width: 900px;
    max-height: 90vh;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 0 30px var(--lm-gold);
    animation: zoomIn 0.3s;
    display: flex;
    flex-direction: column;
}

@keyframes zoomIn { from{transform: scale(0.8); opacity:0;} to{transform: scale(1); opacity:1;} }

.modal-header {
    background: linear-gradient(to right, #2a1a00, #4a3a00);
    padding: 15px 20px;
    border-bottom: 2px solid var(--lm-gold);
    display: flex; justify-content: space-between; align-items: center;
}

.modal-header h2 { margin: 0; color: var(--lm-gold); font-family: 'Cinzel Decorative'; }

.modal-body {
    padding: 25px;
    overflow-y: auto;
    min-height: 0;
    flex: 1 1 auto;
}

.modal-content > .modal-buttons {
    flex: 0 0 auto;
    margin: 0;
    padding: 16px 25px 22px;
    background: #1a1f29;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-close {
    background: var(--lm-red); color: white; border: 1px solid white;
    padding: 5px 12px; cursor: pointer; font-weight: bold; border-radius: 4px;
}

/* Input editable en tabla modal */
.input-nota {
    background: rgba(0,0,0,0.3);
    border: 1px solid #666; color: white;
    width: 100%; padding: 8px; border-radius: 4px;
}
.input-nota:focus { border-color: var(--lm-gold); outline: none; }

.btn-save-mini {
    background: none; border: none; font-size: 1.3em; cursor: pointer;
}

/* --- NUEVOS ESTILOS FICHA DE USUARIO (Mejorados) --- */
.user-header-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr; /* Izquierda datos, Derecha notas */
    gap: 30px;
    margin-bottom: 30px; /* Separación con la tabla de abajo */
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #444;
}

.user-info-card h2 {
    color: var(--lm-gold);
    margin: 0 0 10px 0;
    font-size: 2rem;
    text-shadow: 0 2px 4px black;
    border-bottom: 1px solid var(--lm-gold-dark);
    display: inline-block;
    padding-bottom: 5px;
}

.user-dates {
    display: flex;
    gap: 20px;
    font-size: 0.95rem;
    color: #ccc;
    margin-top: 10px;
}

.label-dato { color: #aaa; font-weight: bold; font-size: 0.8em; text-transform: uppercase; }
.valor-dato { color: white; font-weight: bold; }

/* Botones de Gestión de Baja */
.btn-baja {
    background: none; border: 1px solid var(--lm-red); color: var(--lm-red);
    cursor: pointer; border-radius: 4px; padding: 2px 8px; transition: 0.3s;
}
.btn-baja:hover { background: var(--lm-red); color: white; }

.btn-reactivar {
    background: none; border: 1px solid var(--lm-green); color: var(--lm-green);
    cursor: pointer; border-radius: 4px; padding: 2px 8px; transition: 0.3s;
}
.btn-reactivar:hover { background: var(--lm-green); color: white; }

.btn-baja-user {
    background: #330000; color: var(--lm-red); border: 1px solid var(--lm-red);
    padding: 5px 15px; cursor: pointer; font-weight: bold; margin-top: 5px;
}
.btn-reactivar-user {
    background: #003300; color: var(--lm-green); border: 1px solid var(--lm-green);
    padding: 5px 15px; cursor: pointer; font-weight: bold; margin-top: 5px;
}

/* --- ESTILOS DE GESTIÓN DE BAJAS (NUEVO) --- */

/* Botón pequeño en la tabla de cuentas */
.btn-baja {
    background: transparent;
    border: 1px solid var(--lm-red);
    color: var(--lm-red);
    cursor: pointer;
    border-radius: 4px;
    padding: 4px 8px;
    transition: 0.3s;
}
.btn-baja:hover {
    background: var(--lm-red);
    color: white;
}

.btn-reactivar {
    background: transparent;
    border: 1px solid var(--lm-green);
    color: var(--lm-green);
    cursor: pointer;
    border-radius: 4px;
    padding: 4px 8px;
    transition: 0.3s;
}
.btn-reactivar:hover {
    background: var(--lm-green);
    color: white;
}

/* Botón grande de Usuario (arriba a la derecha) */
.btn-baja-user {
    background: rgba(50, 0, 0, 0.6);
    color: var(--lm-red);
    border: 1px solid var(--lm-red);
    padding: 8px 15px;
    cursor: pointer;
    font-weight: bold;
    font-family: 'Roboto', sans-serif;
    border-radius: 5px;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}
.btn-baja-user:hover {
    background: var(--lm-red);
    color: white;
    box-shadow: 0 0 10px var(--lm-red);
}

.btn-reactivar-user {
    background: rgba(0, 50, 0, 0.6);
    color: var(--lm-green);
    border: 1px solid var(--lm-green);
    padding: 8px 15px;
    cursor: pointer;
    font-weight: bold;
    border-radius: 5px;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}
.btn-reactivar-user:hover {
    background: var(--lm-green);
    color: white;
    box-shadow: 0 0 10px var(--lm-green);
}

/* Ajuste fino para la tabla dentro del modal */
.modal-body table th {
    text-align: left;
    padding-bottom: 10px;
    color: #888;
    border-bottom: 1px solid #444;
}
.modal-body table td {
    padding: 8px 5px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    vertical-align: middle;
}
/* =========================================
   SCROLLBAR PERSONALIZADO (GLOBAL)
   ========================================= */

/* El ancho de la barra */
::-webkit-scrollbar {
    width: 10px;
    height: 10px; /* Para scroll horizontal */
}

/* El fondo de la barra (el carril) */
::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3); 
    border-radius: 5px;
}

/* La parte que se mueve (el pulgar) */
::-webkit-scrollbar-thumb {
    background: #444; /* Gris oscuro discreto por defecto */
    border-radius: 5px;
    border: 2px solid rgba(0,0,0,0.5); /* Borde para separarlo del fondo */
}

/* Efecto al pasar el ratón: ¡Se pone dorado! */
::-webkit-scrollbar-thumb:hover {
    background: var(--lm-gold); 
    box-shadow: 0 0 5px var(--lm-gold);
}

/* =========================================
   LAYOUT DE "APP DE ESCRITORIO" (FIJO + SCROLL INTERNO)
   ========================================= */

/* 1. Bloqueamos el scroll de la página entera */
html, body {
    height: 100%;
    overflow: hidden; /* Adiós scroll global */
    display: flex;
    flex-direction: column;
}

/* 2. El contenedor principal ocupa todo el espacio sobrante */
.main-container {
    flex: 1; /* Ocupa el resto de altura tras el nav */
    overflow: hidden; 
    padding-bottom: 10px;
    display: flex;
    flex-direction: column;
}

/* 3. Las secciones se convierten en columnas flexibles */
/* Usamos !important para asegurar que gane al 'display: block' del JS */
.seccion.activa {
    display: flex !important; 
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

/* 4. La tabla es la que hace SCROLL */
.table-container {
    flex: 1;             /* Ocupa todo el espacio vertical disponible */
    overflow-y: auto;    /* Scroll vertical AQUÍ */
    overflow-x: auto;    /* Scroll horizontal si hace falta */
    min-height: 0;       /* Truco vital para que flexbox calcule bien el scroll */
    border-bottom: 1px solid #444;
}

/* 5. Cabeceras de tabla FIJAS (Sticky Header) */
/* Esto hace que los títulos (ID GG, Nombre...) no se muevan al bajar */
thead th {
    position: sticky;
    top: 0;
    z-index: 10;
    /* Fondo oscuro para que no se trasluzca el texto al hacer scroll */
    background: #0a0a2a; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.5); /* Sombra para separar del contenido */
}

/* Ajuste visual para el borde superior de la tabla */
table {
    border-collapse: separate; 
    border-spacing: 0;
}
/* =========================================
   ESTILOS PARA MÓVIL (RESPONSIVE)
   ========================================= */
@media (max-width: 768px) {

    .whatsapp-admin-grid {
        grid-template-columns: 1fr;
    }

    .whatsapp-dashboard {
        grid-template-columns: 1fr;
    }

    .whatsapp-target-card {
        grid-template-columns: 1fr;
    }

    .ocr-import-box {
        flex-direction: column;
        align-items: stretch;
    }

    .ocr-input-with-icons {
        padding-right: 84px;
    }

    /* 1. Cabecera de Herramientas (Botones y Fechas) */
    .header-tools {
        flex-direction: column; /* Poner uno debajo de otro */
        align-items: stretch !important;
        gap: 15px;
    }

    .header-tools > div {
        width: 100%;
        justify-content: space-between;
    }

    /* Los selectores ocupan todo el ancho para poder tocarlos bien */
    .header-tools select, 
    .header-tools input {
        width: 100% !important; 
        font-size: 16px; /* Evita que el iPhone haga zoom al escribir */
    }

    /* 2. Botones grandes y fáciles de tocar */
    .header-tools button {
        flex: 1; /* Que se estiren */
        padding: 12px !important;
        justify-content: center;
    }

    /* --- AQUÍ ESTÁ EL CAMBIO PARA TU CLASE EXISTENTE --- */
    .table-container {
        display: block;
        width: 100%;
        overflow-x: auto; /* Esto activa el scroll horizontal */
        -webkit-overflow-scrolling: touch; /* Suavidad en iPhone */
    }

    /* 3. Tabla con Scroll Horizontal (Para que no rompa la web) */
    .table-responsive {
        display: block;
        width: 100%;
        overflow-x: auto; /* Scroll solo en la tabla */
        -webkit-overflow-scrolling: touch; /* Scroll suave en iPhone */
    }

    /* 4. Ventanas Modales (Popups) */
    .modal-content {
        width: 95% !important; /* Casi todo el ancho */
        margin: 10% auto;
        padding: 15px;
    }

    /* 5. Navegación (Menú de arriba) */
    nav {
        flex-wrap: wrap;
        gap: 10px;
        justify-content: center;
    }
    
    nav button {
        padding: 10px 15px;
        font-size: 0.9em;
    }
}

.empty-state-card {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid #444;
    border-radius: 12px;
    padding: 24px;
    color: #ddd;
}

.empty-state-card h3 {
    margin-top: 0;
    color: var(--lm-gold);
}

/* =========================================
   REDISEÑO BASE TIPO SIDEBAR + PANEL
   ========================================= */

:root {
    --app-bg: #0f1115;
    --card-bg: #161920;
    --card-bg-soft: #1b1f28;
    --card-border: #232833;
    --text-muted: #7c8799;
    --text-soft: #a5b0c3;
    --amber-soft: rgba(245, 158, 11, 0.12);
}

body {
    background: #0f1115;
    color: #e8edf7;
    font-family: 'Roboto', sans-serif;
}

*, *::before, *::after {
    box-sizing: border-box;
}

.app-shell {
    height: 100vh;
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    background:
        radial-gradient(circle at top left, rgba(245, 158, 11, 0.08), transparent 30%),
        linear-gradient(180deg, #0e1014 0%, #121722 100%);
    overflow: hidden;
}

.app-sidebar {
    display: flex;
    flex-direction: column;
    position: relative;
    height: 100%;
    min-height: 0;
    box-sizing: border-box;
    padding: 26px 20px;
    background: rgba(11, 13, 18, 0.92);
    border-right: 1px solid var(--card-border);
    gap: 24px;
    overflow: hidden;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.sidebar-brand-copy {
    min-width: 0;
    flex: 1 1 auto;
}

.sidebar-brand-title {
    display: flex;
    align-items: center;
    color: #f8fafc;
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    min-width: 0;
}

.sidebar-brand-icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: linear-gradient(180deg, #fbbf24 0%, #f59e0b 100%);
    color: #17120a;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 16px 30px rgba(245, 158, 11, 0.18);
    font-size: 1.1rem;
}

.sidebar-brand-wordmark {
    display: inline-flex;
    align-items: center;
    gap: 0;
    min-width: 0;
    font-weight: inherit;
    font-size: inherit;
    line-height: 1;
    letter-spacing: inherit;
}

.sidebar-brand-wordmark span {
    color: #fbbf24;
}

.sidebar-brand-subtitle {
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 0.8rem;
    line-height: 1.35;
}

.sidebar-context-btn {
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    border: 1px solid rgba(245, 158, 11, 0.16);
    background: rgba(255, 255, 255, 0.03);
    color: #9aa6bb;
    cursor: pointer;
    transition: all 0.22s ease;
}

.sidebar-context-btn:hover {
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.09);
    border-color: rgba(245, 158, 11, 0.24);
}

.sidebar-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: 150px;
    padding-right: 4px;
}

.sidebar-section + .sidebar-section {
    margin-top: 22px;
}

.sidebar-label {
    margin: 0 0 10px;
    padding: 0 10px;
    color: #586272;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.sidebar-nav-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-link {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 14px;
    border: 1px solid transparent;
    border-radius: 16px;
    background: transparent;
    color: #738095;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: 'Roboto', sans-serif;
}

.sidebar-link i {
    width: 20px;
    text-align: center;
}

.sidebar-link:hover,
.sidebar-link.active {
    color: #fbbf24;
    background: var(--amber-soft);
    border-color: rgba(245, 158, 11, 0.22);
    box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.04);
}

.sidebar-footer {
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex: 0 0 auto;
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 26px;
    z-index: 3;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(180deg, rgba(11, 13, 18, 0), rgba(11, 13, 18, 0.96) 16%, rgba(11, 13, 18, 0.99) 100%);
    backdrop-filter: blur(10px);
}

.sidebar-user-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 14px;
    background:
        radial-gradient(circle at 12% 50%, rgba(245, 158, 11, 0.14), transparent 34%),
        linear-gradient(180deg, #171c26 0%, #121720 100%);
    border: 1px solid rgba(245, 158, 11, 0.42);
    border-radius: 22px;
    min-width: 0;
    cursor: pointer;
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.03),
        0 0 0 1px rgba(245, 158, 11, 0.08),
        0 14px 30px rgba(0, 0, 0, 0.32),
        0 0 22px rgba(245, 158, 11, 0.10);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.sidebar-user-card:hover,
.sidebar-user-card:focus-visible {
    border-color: rgba(251, 191, 36, 0.78);
    transform: translateY(-1px);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.045),
        0 0 0 1px rgba(245, 158, 11, 0.18),
        0 18px 34px rgba(0, 0, 0, 0.38),
        0 0 30px rgba(245, 158, 11, 0.18);
    outline: none;
}

.sidebar-user-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.sidebar-user-avatar-ring {
    width: 46px;
    height: 46px;
    border-radius: 999px;
    padding: 2px;
    background: linear-gradient(180deg, #5a3d1c 0%, #2c3240 100%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.08);
}

.sidebar-user-avatar-core {
    width: 100%;
    height: 100%;
    border-radius: 999px;
    background: radial-gradient(circle at 30% 30%, #3c4456 0%, #242a35 55%, #1a1f29 100%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: #f7b945;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.sidebar-user-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1 1 auto;
}

.sidebar-user-name {
    color: #f8fafc;
    font-size: 0.96rem;
    font-weight: 800;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-role {
    color: #f59e0b;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: 0.01em;
    white-space: normal;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.sidebar-user-logout {
    margin-left: auto;
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border: 1px solid rgba(245, 158, 11, 0.24);
    border-radius: 12px;
    background: rgba(245, 158, 11, 0.06);
    color: #9fb0d0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transition: all 0.2s ease;
}

.sidebar-user-card:hover .sidebar-user-logout,
.sidebar-user-card:focus-visible .sidebar-user-logout {
    color: #fbbf24;
    border-color: rgba(251, 191, 36, 0.52);
    background: rgba(245, 158, 11, 0.12);
    transform: translateX(1px);
}

.context-modal-copy {
    margin-bottom: 18px;
}

.context-modal-content {
    background: rgba(19, 24, 33, 0.98);
    border: 1px solid rgba(245, 158, 11, 0.22);
    border-radius: 28px;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
    overflow: hidden;
}

.context-modal-header {
    background:
        radial-gradient(circle at top left, rgba(245, 158, 11, 0.10), transparent 42%),
        rgba(19, 24, 33, 0.98);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 20px 24px;
}

.context-modal-header h2 {
    margin: 0;
    color: #f8fafc;
    font-family: 'Roboto', sans-serif;
    font-size: 1.24rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.context-modal-header h2 i {
    color: #fbbf24;
}

.context-modal-close {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: #cbd5e1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.context-modal-close:hover {
    background: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.24);
    color: #f8fafc;
}

.context-modal-body {
    padding: 24px;
}

.context-modal-lead {
    margin: 0;
    color: #cbd5e1;
    line-height: 1.6;
}

.context-admin-action {
    margin-bottom: 18px;
}

.context-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0 14px;
    color: #7d8899;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.context-divider::before,
.context-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: rgba(125, 136, 153, 0.22);
}

.context-guild-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.context-option-card {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid #2a3140;
    background: #151922;
    color: #e5ebf5;
    cursor: pointer;
    transition: all 0.22s ease;
    text-align: left;
}

.context-option-card:hover {
    transform: translateY(-1px);
    border-color: rgba(245, 158, 11, 0.32);
    background: rgba(245, 158, 11, 0.08);
}

.context-option-card.is-active {
    border-color: rgba(245, 158, 11, 0.42);
    background: rgba(245, 158, 11, 0.11);
    box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.08);
}

.context-option-card-admin {
    background: linear-gradient(180deg, rgba(245, 158, 11, 0.09), rgba(255, 255, 255, 0.02));
}

.context-option-icon {
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
    color: #fbbf24;
    font-size: 1rem;
}

.context-option-copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.context-option-copy strong {
    color: #f8fafc;
    font-size: 0.98rem;
}

.context-option-copy small {
    color: #8b98aa;
    font-size: 0.84rem;
    line-height: 1.5;
}

.guild-modal-content {
    background: rgba(19, 24, 33, 0.98);
    border: 1px solid rgba(245, 158, 11, 0.22);
    border-radius: 30px;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 48px);
}

.guild-modal-form-shell {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1 1 auto;
}

.guild-modal-header {
    background:
        radial-gradient(circle at top left, rgba(245, 158, 11, 0.10), transparent 40%),
        rgba(19, 24, 33, 0.98);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 22px 26px;
}

.guild-modal-header h2 {
    margin: 0;
    color: #f8fafc;
    font-family: 'Roboto', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.guild-modal-header h2 i {
    color: #fbbf24;
}

.guild-modal-close {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: #cbd5e1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.guild-modal-close:hover {
    background: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.24);
    color: #f8fafc;
}

.guild-modal-body {
    padding: 26px;
}

.guild-form-layout {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.guild-form-card {
    padding: 20px;
    border-radius: 24px;
    background: #161920;
    border: 1px solid var(--card-border);
}

.guild-form-card-wide {
    grid-column: 1 / -1;
}

.guild-modal-header {
    background: #171c25;
    border-bottom: 1px solid rgba(245, 158, 11, 0.24);
}

.guild-modal-header h2 {
    margin: 0;
    color: #f8fafc;
    font-family: 'Roboto', sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.guild-modal-body {
    padding: 24px;
    overflow-y: auto;
    min-height: 0;
    flex: 1 1 auto;
}

.guild-form-card-avatar {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.guild-form-card-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.guild-avatar-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(10, 14, 20, 0.72);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.guild-form-card-avatar:hover .guild-avatar-overlay,
.guild-form-card-avatar:focus-within .guild-avatar-overlay {
    opacity: 1;
}

.guild-avatar-fab {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: 1px solid rgba(245, 158, 11, 0.24);
    background: rgba(255, 255, 255, 0.08);
    color: #f8fafc;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.82rem;
}

.guild-avatar-fab:hover {
    background: rgba(245, 158, 11, 0.18);
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.4);
}

.guild-status-line {
    min-height: 18px;
    padding: 0;
    border-radius: 0;
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    font-size: 0.86rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    line-height: 1.2;
}

.guild-status-label {
    color: #f8fafc;
}

.guild-status-value {
    margin-left: 0.35rem;
}

.guild-status-line.is-active .guild-status-value {
    color: #34d399;
}

.guild-status-line.is-inactive .guild-status-value {
    color: #f87171;
}

.guild-form-card-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 18px;
}

.guild-form-card-icon {
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(245, 158, 11, 0.10);
    border: 1px solid rgba(245, 158, 11, 0.20);
    color: #fbbf24;
}

.guild-form-card-avatar {
    width: 72px;
    height: 72px;
    border-radius: 22px;
}

.guild-form-card-header h3 {
    margin: 0 0 4px;
    color: #f8fafc;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.guild-form-card-header p {
    margin: 0;
    color: #8b98aa;
    font-size: 0.84rem;
    line-height: 1.5;
}

.guild-form-grid {
    display: grid;
    gap: 16px;
}

.guild-whatsapp-groups-list {
    display: grid;
    gap: 14px;
}

.guild-hunt-bot-grid {
    grid-template-columns: minmax(260px, 1fr) minmax(150px, 0.35fr);
    gap: 14px;
    align-items: end;
    margin-bottom: 16px;
}

.guild-hunt-bot-grid .auth-field {
    margin-bottom: 0;
}

.guild-hunt-bot-wait input {
    max-width: 170px;
}

.guild-whatsapp-group-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 1.1fr) minmax(160px, 0.7fr) 150px 42px;
    gap: 14px;
    align-items: end;
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.guild-whatsapp-group-row .auth-field {
    align-self: end;
    margin-bottom: 0;
}

.guild-whatsapp-flag {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 46px;
    height: 46px;
    width: 150px;
    box-sizing: border-box;
    padding: 0 12px;
    border-radius: 16px;
    border: 1px solid rgba(255, 193, 7, 0.22);
    background: rgba(255, 193, 7, 0.08);
    color: #f4f7ff;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.1;
    text-align: center;
    align-self: end;
    margin: 0;
}

.guild-whatsapp-flag input {
    width: 18px;
    height: 18px;
    accent-color: var(--lm-gold);
}

.guild-whatsapp-remove {
    align-self: end;
    margin: 0 0 2px;
}

.guild-whatsapp-actions {
    margin-top: 16px;
    display: flex;
    justify-content: flex-start;
}

.guild-whatsapp-empty {
    margin: 0;
}

.guild-capacity-progress {
    margin-bottom: 18px;
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.guild-capacity-progress-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.guild-capacity-progress-label {
    color: #8b98aa;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.guild-capacity-progress-value {
    color: #f8fafc;
    font-size: 0.85rem;
    font-weight: 700;
}

.guild-capacity-progress-bar {
    width: 100%;
    height: 10px;
    border-radius: 999px;
    background: #1f2530;
    overflow: hidden;
}

.guild-capacity-progress-bar span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    transition: width 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.guild-capacity-progress-bar span.is-low {
    background: linear-gradient(90deg, #ef4444 0%, #f87171 100%);
    box-shadow: 0 0 14px rgba(239, 68, 68, 0.28);
}

.guild-capacity-progress-bar span.is-mid {
    background: linear-gradient(90deg, #f59e0b 0%, #fbbf24 100%);
    box-shadow: 0 0 14px rgba(245, 158, 11, 0.28);
}

.guild-capacity-progress-bar span.is-high {
    background: linear-gradient(90deg, #10b981 0%, #34d399 100%);
    box-shadow: 0 0 14px rgba(16, 185, 129, 0.28);
}

.guild-hunt-progress {
    margin-bottom: 18px;
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.guild-hunt-progress-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.guild-hunt-progress-label {
    color: #8b98aa;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.guild-hunt-progress-value {
    color: #f8fafc;
    font-size: 0.85rem;
    font-weight: 700;
}

.guild-hunt-progress-bar {
    width: 100%;
    height: 10px;
    border-radius: 999px;
    background: #1f2530;
    overflow: hidden;
}

.guild-hunt-progress-bar span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    transition: width 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.guild-hunt-progress-bar span.is-low {
    background: linear-gradient(90deg, #ef4444 0%, #f87171 100%);
    box-shadow: 0 0 14px rgba(239, 68, 68, 0.28);
}

.guild-hunt-progress-bar span.is-mid {
    background: linear-gradient(90deg, #f59e0b 0%, #fbbf24 100%);
    box-shadow: 0 0 14px rgba(245, 158, 11, 0.28);
}

.guild-hunt-progress-bar span.is-high {
    background: linear-gradient(90deg, #10b981 0%, #34d399 100%);
    box-shadow: 0 0 14px rgba(16, 185, 129, 0.28);
}

.guild-form-grid-two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.guild-form-grid-three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.guild-form-grid-four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.guild-form-grid-levels {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.guild-form-grid-caza-principal .auth-field input {
    padding-inline: 14px;
}

.guild-modal-actions {
    margin: 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 18px 26px 22px;
    background:
        radial-gradient(circle at bottom right, rgba(245, 158, 11, 0.08), transparent 42%),
        rgba(23, 28, 37, 0.98);
    box-shadow:
        inset 0 1px 0 rgba(251, 191, 36, 0.22),
        0 -18px 36px rgba(0, 0, 0, 0.22);
    flex: 0 0 auto;
}

.access-user-modal-content {
    background: rgba(19, 24, 33, 0.98);
    border: 1px solid rgba(245, 158, 11, 0.22);
    border-radius: 30px;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.access-user-modal-header {
    background: #171c25;
    border-bottom: 1px solid rgba(245, 158, 11, 0.24);
    padding: 18px 24px;
}

.access-user-form-shell {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1 1 auto;
}

.access-user-modal-body {
    padding: 24px;
    overflow-y: auto;
    min-height: 0;
    flex: 1 1 auto;
}

.access-user-layout {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.access-user-status-wrap {
    display: flex;
    align-items: center;
    min-height: 52px;
    align-self: end;
}

.access-user-select,
.auth-field .custom-select[data-for="accessRole"],
.auth-field .custom-select[data-for="accessGremio"] {
    width: 100%;
    min-width: 0;
}

.access-user-modal-actions {
    margin: 0;
}

.app-confirm-modal-content {
    width: min(520px, 92vw);
}

.app-confirm-modal-body {
    padding-bottom: 12px;
}

.app-confirm-message {
    margin: 0;
    color: #dbe4f0;
    font-size: 1rem;
    line-height: 1.55;
}

.app-confirm-reason {
    margin-top: 18px;
}

.app-confirm-reason label {
    display: block;
    margin-bottom: 8px;
    color: #cbd5e1;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.app-confirm-reason textarea {
    width: 100%;
    min-height: 92px;
    padding: 14px 16px;
    border: 1px solid #313847;
    border-radius: 16px;
    background: #12161d;
    color: #f8fafc;
    font-family: 'Roboto', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.45;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
    resize: vertical;
}

.app-confirm-reason textarea::placeholder {
    color: #6f7b8d;
    font-weight: 600;
}

.app-confirm-reason textarea:focus {
    border-color: rgba(245, 158, 11, 0.58);
    background: #10141b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.08);
    outline: none;
}

.app-confirm-modal-actions {
    justify-content: flex-end;
}

.password-modal-content {
    width: min(520px, 92vw);
}

.password-modal-body {
    min-height: 0;
}

.inactive-user-modal-content {
    width: min(760px, 92vw);
}

.inactive-user-modal-header h2 {
    color: #fca5a5;
}

.inactive-user-modal-body {
    min-height: 0;
}

.inactive-user-warning-card {
    border-color: rgba(239, 68, 68, 0.24);
    background: rgba(127, 29, 29, 0.10);
}

.inactive-user-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.inactive-user-summary-grid > div {
    padding: 12px 14px;
    border: 1px solid #313847;
    border-radius: 16px;
    background: #12161d;
}

.inactive-user-summary-grid span {
    display: block;
    margin-bottom: 6px;
    color: #8fa0bf;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.inactive-user-summary-grid strong {
    display: block;
    color: #f8fafc;
    font-size: 0.95rem;
    line-height: 1.35;
}

.inactive-user-summary-wide {
    grid-column: 1 / -1;
}

.inactive-user-history {
    margin-top: 18px;
}

.inactive-user-history h3 {
    margin: 0 0 10px;
    color: #f8fafc;
    font-size: 1rem;
}

.inactive-user-table-wrap {
    overflow: auto;
    border: 1px solid #313847;
    border-radius: 16px;
}

.inactive-user-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 560px;
}

.inactive-user-table th,
.inactive-user-table td {
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    text-align: left;
}

.inactive-user-table th {
    color: #9fb0d0;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.03);
}

.inactive-user-table td {
    color: #dbe4f0;
    font-size: 0.9rem;
    font-weight: 700;
}

.inactive-user-table td.is-danger {
    color: #fca5a5;
}

.inactive-user-table tr:last-child td {
    border-bottom: none;
}

.inactive-user-modal-actions {
    margin: 0;
}

.user-picker-card.is-inactive-user {
    border-color: rgba(239, 68, 68, 0.28);
    background: rgba(127, 29, 29, 0.10);
}

.user-picker-card.is-inactive-user .context-option-icon {
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.28);
    background: rgba(239, 68, 68, 0.10);
}

.user-picker-card.is-inactive-user .context-option-copy small {
    color: #fca5a5;
}

.user-picker-card .context-option-copy em {
    display: block;
    margin-top: 3px;
    color: #8fa0bf;
    font-size: 0.78rem;
    font-style: normal;
    font-weight: 700;
}

.user-picker-card-expanded {
    display: block;
    cursor: default;
}

.user-picker-card-head {
    display: flex;
    align-items: center;
    gap: 14px;
}

.user-account-picker-list {
    display: grid;
    gap: 8px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.user-account-picker-row {
    display: grid;
    grid-template-columns: minmax(84px, 120px) minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #313847;
    border-radius: 14px;
    background: #111720;
    color: #dbe4f0;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.user-account-picker-row:hover {
    border-color: rgba(245, 158, 11, 0.45);
    background: rgba(245, 158, 11, 0.08);
    transform: translateY(-1px);
}

.user-account-picker-row.is-inactive {
    border-color: rgba(239, 68, 68, 0.26);
    background: rgba(127, 29, 29, 0.10);
}

.user-account-picker-row.is-new {
    border-style: dashed;
    color: #fbbf24;
}

.user-account-picker-id {
    color: #fbbf24;
    font-size: 0.86rem;
    font-weight: 900;
}

.user-account-picker-main {
    min-width: 0;
}

.user-account-picker-main strong,
.user-account-picker-main small {
    display: block;
}

.user-account-picker-main strong {
    color: #f8fafc;
    font-size: 0.92rem;
}

.user-account-picker-main small {
    margin-top: 3px;
    color: #9fb0d0;
    font-size: 0.78rem;
    font-weight: 700;
}

.user-account-picker-empty {
    margin: 0;
    color: #8fa0bf;
    font-size: 0.86rem;
}

.password-form-card {
    padding: 18px;
}

.password-form-grid {
    display: grid;
    gap: 12px;
}

.password-modal-actions {
    justify-content: flex-end;
}

.guild-modal-actions::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(245, 158, 11, 0.42);
    box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.08);
}

.sidebar-icon-btn {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    border: 1px solid var(--card-border);
    background: var(--card-bg);
    color: #ced6e3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
}

.sidebar-icon-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(245, 158, 11, 0.28);
    color: #fbbf24;
}

.sidebar-icon-btn-danger:hover {
    border-color: rgba(255, 68, 68, 0.4);
    color: #ff7676;
}

.app-main {
    min-width: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 28px;
    min-height: 0;
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 0.9fr);
    gap: 18px;
}

.hero-card,
.hero-stat-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 28px;
    padding: 28px 30px;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 14px;
    color: var(--text-muted);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hero-eyebrow-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: #f59e0b;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.6);
}

.hero-card h1 {
    margin: 0;
    color: #f8fafc;
    font-family: 'Roboto', sans-serif;
    font-size: clamp(1.8rem, 2vw + 1rem, 3rem);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.03em;
}

.hero-card h1 span {
    color: #f59e0b;
}

.hero-description {
    margin: 12px 0 0;
    color: var(--text-soft);
    max-width: 58ch;
    font-size: 0.96rem;
    line-height: 1.6;
}

.hero-stat-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
}

.hero-stat-value {
    margin: 0 0 6px;
    color: #fff;
    font-size: 2.6rem;
    font-weight: 700;
}

.hero-stat-label {
    margin: 8px 0 0;
    color: var(--text-muted);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hero-stat-detail {
    min-height: 1.1rem;
    margin: 8px 0 0;
    color: #9fb7df;
    font-size: 0.86rem;
    font-weight: 600;
}

.hero-stat-detail:empty {
    display: none;
}

.hero-stat-bar {
    width: 100%;
    height: 10px;
    margin-top: 18px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.14);
    overflow: hidden;
    box-shadow:
        inset 0 1px 2px rgba(0, 0, 0, 0.35),
        0 0 18px rgba(34, 197, 94, 0.08);
}

.hero-stat-bar span {
    display: block;
    width: 64%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #ef4444 0%, #f59e0b 45%, #22c55e 100%);
    box-shadow:
        0 0 12px rgba(245, 158, 11, 0.26),
        0 0 22px rgba(34, 197, 94, 0.16);
}

.entity-card-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.entity-card {
    display: grid;
    grid-template-columns: minmax(240px, 280px) minmax(0, 1fr) auto;
    align-items: center;
    gap: 22px;
    padding: 22px 24px;
    border-radius: 24px;
    border: 1px solid var(--card-border);
    background: #161920;
    transition: all 0.25s ease;
    position: relative;
    z-index: 1;
    overflow: visible;
}

.entity-card:hover {
    border-color: rgba(245, 158, 11, 0.22);
    transform: translateY(-1px);
}

.guild-selector-card {
    cursor: pointer;
}

.guild-selector-card.is-context-active {
    border-color: rgba(251, 191, 36, 0.72);
    background: linear-gradient(180deg, rgba(245, 158, 11, 0.14), rgba(22, 25, 32, 0.98));
    box-shadow: inset 0 0 0 1px rgba(251, 191, 36, 0.30), 0 20px 44px rgba(0, 0, 0, 0.22), 0 0 0 3px rgba(245, 158, 11, 0.08);
    transform: translateY(-2px) scale(1.01);
}

.entity-card.is-inactive {
    opacity: 0.64;
    filter: grayscale(0.22);
}

.entity-card-main {
    display: flex;
    align-items: center;
    gap: 18px;
    min-width: 0;
}

.entity-card-badge {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    background: rgba(245, 158, 11, 0.10);
    border: 1px solid rgba(245, 158, 11, 0.20);
    color: #fbbf24;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex: 0 0 auto;
}

.entity-card-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
    display: block;
}

.entity-card-copy {
    min-width: 0;
}

.entity-card-title {
    margin: 0 0 4px;
    color: #f8fafc;
    font-size: 1.08rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.entity-card-subtitle {
    margin: 0;
    color: #8b98aa;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.10em;
    text-transform: uppercase;
}

.entity-card-details {
    display: grid;
    grid-template-columns: minmax(180px, 1.4fr) minmax(120px, 0.9fr) minmax(120px, 0.9fr) minmax(100px, 0.8fr);
    gap: 18px 22px;
    align-items: start;
    min-width: 0;
}

.access-user-card {
    grid-template-columns: minmax(240px, 280px) minmax(0, 1fr) auto;
}

.access-user-badge {
    font-size: 1.1rem;
    font-weight: 800;
}

.access-user-details {
    grid-template-columns: minmax(140px, 1fr) minmax(140px, 0.9fr) minmax(180px, 1.2fr) minmax(180px, 1.2fr) minmax(100px, 0.8fr);
}

.access-user-group {
    border: 1px solid color-mix(in srgb, var(--access-user-group-color) 36%, var(--card-border));
    border-radius: 24px;
    background:
        linear-gradient(90deg, color-mix(in srgb, var(--access-user-group-color) 7%, transparent), transparent 38%),
        rgba(12, 16, 23, 0.44);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.025);
    padding: 10px;
}

.access-user-group-list {
    display: grid;
    gap: 14px;
}

.access-account-card {
    grid-template-columns: minmax(190px, 240px) minmax(0, 1fr) auto;
    gap: 14px;
    padding: 18px 20px;
    border-color: color-mix(in srgb, var(--access-user-group-color) 34%, var(--card-border));
    background: #161920;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18);
}

.access-account-badge {
    background: color-mix(in srgb, var(--access-user-group-color) 16%, transparent);
    border-color: color-mix(in srgb, var(--access-user-group-color) 42%, transparent);
    color: color-mix(in srgb, var(--access-user-group-color) 86%, #ffffff);
    font-size: 1.1rem;
    font-weight: 800;
}

.access-account-details {
    grid-template-columns: minmax(140px, 1fr) minmax(128px, 0.9fr) minmax(86px, 0.62fr) minmax(70px, 0.45fr) minmax(74px, 0.48fr);
    gap: 12px;
    align-items: center;
}

.access-user-empty-account {
    margin: 0;
}

.access-user-empty-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.account-card {
    grid-template-columns: minmax(240px, 280px) minmax(0, 1fr) auto;
}

.account-card-badge {
    font-size: 1.1rem;
    font-weight: 800;
}

.account-card-details {
    grid-template-columns: minmax(150px, 1fr) minmax(150px, 1fr) minmax(150px, 1fr) minmax(110px, 0.8fr) minmax(110px, 0.8fr) minmax(110px, 0.8fr) minmax(220px, 1.4fr);
}

.account-card-notes {
    white-space: normal;
    word-break: break-word;
}

.account-card-value-danger {
    color: var(--lm-red);
    font-weight: 700;
}

.account-card-value-ok {
    color: var(--lm-green);
    font-weight: 700;
}

.account-profile-modal-content {
    max-width: 1180px;
    width: min(1180px, 92vw);
    max-height: 88vh;
    display: flex;
    flex-direction: column;
}

.account-profile-modal-body {
    min-height: 0;
    overflow-y: auto;
}

.account-profile-layout {
    display: grid;
    grid-template-columns: minmax(320px, 1fr) minmax(320px, 1fr);
    gap: 18px;
    margin-bottom: 18px;
}

.account-detail-top-grid {
    display: grid;
    grid-template-columns: minmax(320px, 1fr) minmax(360px, 1fr);
    gap: 18px;
    margin-bottom: 18px;
}

.account-profile-card {
    min-height: 100%;
}

.account-titlebar {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
}

.account-titlebar-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #f8fafc;
    font-weight: 700;
    font-size: 1.24rem;
    letter-spacing: -0.03em;
    flex: 1 1 auto;
    min-width: 0;
}

.account-titlebar-label i {
    color: #fbbf24;
}

.account-titlebar-trigger {
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: #fbbf24;
    cursor: pointer;
    transition: all 0.18s ease;
}

.account-titlebar-trigger:hover {
    background: rgba(245, 158, 11, 0.10);
    border-color: rgba(245, 158, 11, 0.28);
    color: #f8fafc;
}

.account-titlebar-inline-status {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}

.account-titlebar-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.18);
    color: #fca5a5;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.account-picker-modal-content {
    max-height: min(72vh, 640px);
}

.alta-cuenta-modal-content {
    max-width: 920px;
}

.alta-cuenta-modal-body {
    overflow-y: auto;
    min-height: 0;
    flex: 1 1 auto;
}

.alta-cuenta-layout {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.alta-cuenta-full {
    grid-column: 1 / -1;
}

.alta-cuenta-field {
    display: grid;
    gap: 8px;
}

.alta-cuenta-field label {
    margin: 0;
    color: #cfd7e5;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.alta-cuenta-select {
    width: 100%;
    background-color: #12161d;
}

.alta-cuenta-field .custom-select[data-for="altaGremio"],
.alta-cuenta-field .custom-select[data-for="altaNuevoUsuarioRol"] {
    width: 100%;
    min-width: 0;
}

.alta-player-picker {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
}

.alta-player-selected,
.alta-player-phone {
    min-height: 48px;
}

#altaGremioVisible {
    justify-content: flex-start;
    text-align: left;
}

.alta-player-picker-btn {
    height: 48px;
    white-space: nowrap;
}

.alta-player-search-box {
    margin-bottom: 16px;
}

.alta-cuenta-status {
    color: var(--lm-gold);
    font-size: 0.8rem;
    display: none;
    margin: 0;
}

.alta-cuenta-status-block {
    margin-top: 12px;
}

.alta-cuenta-import-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 0;
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid rgba(245, 158, 11, 0.18);
    background: linear-gradient(180deg, rgba(245, 158, 11, 0.08), rgba(255, 255, 255, 0.02));
}

.ocr-import-copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.account-profile-identity-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 14px 16px;
    align-items: start;
}

.account-profile-field {
    min-width: 0;
}

.account-profile-field--owner {
    grid-column: 1 / -1;
}

.account-profile-identity-grid .alta-player-picker {
    grid-template-columns: minmax(210px, 1fr) max-content;
}

.account-profile-identity-grid .alta-player-picker-btn {
    padding-inline: 14px;
}

.account-profile-identity-grid .alta-player-selected {
    justify-content: flex-start;
    text-align: left;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.18;
}

.account-profile-identity-grid .input-nota,
.account-profile-identity-grid .custom-select,
.account-profile-identity-grid .account-profile-readonly {
    width: 100%;
    box-sizing: border-box;
}

.account-profile-identity-grid .input-nota {
    min-height: 52px;
    padding: 0 18px;
    border-radius: 16px;
    border: 1px solid #313847;
    background: #12161d;
    color: #f8fafc;
    font-family: 'Roboto', sans-serif;
    font-size: 1rem;
    font-weight: 600;
}

#fichaNuevoUsuarioTelefono {
    color: #9ca3af;
}

#fichaNuevoUsuarioTelefono::placeholder {
    color: #f8fafc;
    opacity: 1;
}

.account-profile-identity-grid .input-nota:focus {
    border-color: rgba(245, 158, 11, 0.58);
    background: #10141b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.08);
    outline: none;
}

.account-profile-field--status {
    display: flex;
    align-items: end;
    min-height: 78px;
}

.account-profile-readonly {
    min-height: 52px;
    display: flex;
    align-items: center;
    padding: 0 18px;
    border-radius: 16px;
    border: 1px solid #313847;
    background: #12161d;
    color: #f8fafc;
    font-weight: 600;
}

.account-profile-state-note {
    margin: 8px 0 0;
    color: #fca5a5;
    font-size: 0.84rem;
}

.account-profile-state-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.account-profile-state-card.is-inactive {
    padding: 12px 14px;
    border: 1px solid rgba(239, 68, 68, 0.22);
    border-radius: 16px;
    background: rgba(127, 29, 29, 0.12);
}

.account-profile-state-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    color: #fca5a5;
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1.35;
}

.account-profile-state-meta span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
}

.account-profile-state-meta i {
    color: #f87171;
    font-size: 0.8rem;
}

.account-profile-notes-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: start;
}

.account-profile-notes-block {
    margin-top: 18px;
}

.account-profile-note-input {
    width: 100%;
    min-height: 104px;
    box-sizing: border-box;
    border-radius: 18px;
    border: 1px solid #313847;
    background: #12161d;
    color: #f8fafc;
    padding: 14px 16px;
    font-family: 'Roboto', sans-serif;
    font-size: 0.94rem;
    font-weight: 600;
    line-height: 1.5;
    resize: vertical;
    outline: none;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.account-profile-note-input:focus {
    border-color: rgba(245, 158, 11, 0.58);
    background: #10141b;
    box-shadow:
        inset 0 0 0 1px rgba(245, 158, 11, 0.08),
        0 0 0 3px rgba(245, 158, 11, 0.08);
}

.account-profile-player-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.account-accounts-card {
    margin-top: 0;
}

.account-profile-table-wrap {
    overflow-x: auto;
}

.account-profile-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
}

.account-profile-table thead th {
    background: transparent;
    border-bottom: 1px solid #2c3442;
}

.account-profile-table tbody tr td {
    background: rgba(17, 21, 28, 0.76);
    border-top: 1px solid rgba(255,255,255,0.04);
    border-bottom: 1px solid rgba(255,255,255,0.04);
    padding: 12px 14px;
    vertical-align: top;
}

.account-profile-table tbody tr td:first-child {
    border-left: 1px solid rgba(255,255,255,0.04);
    border-top-left-radius: 14px;
    border-bottom-left-radius: 14px;
}

.account-profile-table tbody tr td:last-child {
    border-right: 1px solid rgba(255,255,255,0.04);
    border-top-right-radius: 14px;
    border-bottom-right-radius: 14px;
}

.account-profile-table tbody tr.is-inactive td {
    opacity: 0.7;
    background: rgba(60, 10, 10, 0.28);
}

.account-profile-mono {
    font-family: monospace;
    color: #9ca3af;
}

.account-profile-account-name {
    color: var(--lm-gold);
    font-weight: 700;
}

.account-profile-account-note {
    margin-top: 4px;
    color: #fca5a5;
    font-size: 0.78rem;
    font-style: italic;
}

.account-profile-mini-input {
    width: 68px;
    min-height: 40px;
    text-align: center;
    border-radius: 12px;
    border: 1px solid #313847;
    background: #12161d;
    color: #f8fafc;
}

.account-profile-mini-input--small {
    width: 56px;
}

.account-profile-note-input {
    min-width: 220px;
    font-size: 0.9rem;
}

.account-profile-row-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.account-profile-add-row {
    display: flex;
    justify-content: center;
    margin-top: 18px;
}

.account-profile-add-btn {
    background: transparent;
    border: 1px dashed #666;
    color: #aab2bf;
    padding: 10px 16px;
    border-radius: 14px;
    cursor: pointer;
}

.account-profile-add-btn:hover {
    border-color: rgba(245, 158, 11, 0.45);
    color: #fbbf24;
}

.account-profile-readonly--accent {
    color: var(--lm-gold);
}

.account-profile-readonly--mono {
    font-family: monospace;
}

.account-detail-summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.account-detail-state-row {
    margin-top: 18px;
}

.account-detail-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.account-detail-metric {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.account-detail-metric-label {
    color: #94a3b8;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 700;
}

.account-detail-metric-input {
    width: 100%;
    min-height: 48px;
    text-align: left;
    padding-inline: 14px;
    border-radius: 16px;
    border: 1px solid #313847;
    background-color: #12161d;
    color: #f8fafc;
    box-sizing: border-box;
}

.account-detail-metric-input:focus {
    outline: none;
    border-color: rgba(245, 158, 11, 0.45);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.08);
}

.account-detail-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.account-switcher-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 12px;
}

.account-switcher-chip {
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: #12161d;
    border-radius: 18px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    color: #e5e7eb;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.account-switcher-chip:hover {
    border-color: rgba(245, 158, 11, 0.28);
    transform: translateY(-1px);
}

.account-switcher-chip.is-selected {
    border-color: rgba(245, 158, 11, 0.48);
    box-shadow: inset 0 0 0 1px rgba(251, 191, 36, 0.18);
    background: linear-gradient(180deg, rgba(245, 158, 11, 0.10), rgba(18, 22, 29, 0.98));
}

.account-switcher-chip-name {
    color: #f8fafc;
    font-weight: 700;
}

.account-switcher-chip-meta {
    color: #94a3b8;
    font-size: 0.82rem;
}

.access-user-accounts {
    white-space: normal;
    word-break: break-word;
}

@media (max-width: 900px) {
    .reports-actions-stack {
        grid-template-columns: 1fr;
    }

    .reports-search-box {
        flex-basis: 100%;
        max-width: none;
        min-width: 0;
    }

    .users-pagination {
        flex-direction: column;
        align-items: stretch;
    }

    .users-pagination-actions {
        width: 100%;
        justify-content: stretch;
    }

    .users-pagination-actions button {
        flex: 1 1 0;
    }

    .account-detail-top-grid,
    .account-detail-summary-grid,
    .account-detail-metrics,
    .account-profile-layout,
    .account-profile-identity-grid,
    .reports-layout,
    .reports-controls-grid {
        grid-template-columns: 1fr;
    }

    .reports-table-card {
        grid-column: span 1;
    }

    .report-edit-meta,
    .report-edit-levels,
    .report-edit-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .account-titlebar {
        gap: 12px;
    }
}

.entity-card-detail {
    min-width: 0;
}

.entity-card-detail-label {
    margin: 0 0 5px;
    color: #64748b;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.entity-card-detail-value {
    margin: 0;
    color: #d8e1ee;
    font-size: 0.84rem;
    font-weight: 600;
    line-height: 1.45;
}

.entity-card-detail-value--accent {
    color: #fbbf24;
}

.entity-card-detail-stack {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.entity-card-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    border: 1px solid transparent;
    white-space: nowrap;
}

.entity-card-pill.is-active {
    background: rgba(16, 185, 129, 0.10);
    color: #34d399;
    border-color: rgba(16, 185, 129, 0.22);
}

.entity-card-pill.is-inactive {
    background: rgba(239, 68, 68, 0.10);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.22);
}

.entity-card-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}

.toolbar-select {
    min-width: 170px;
    padding: 12px 46px 12px 14px;
    height: 48px;
    box-sizing: border-box;
    border-radius: 18px;
    border: 1px solid #313847;
    background:
        linear-gradient(45deg, transparent 50%, #fbbf24 50%) calc(100% - 22px) 50% / 6px 6px no-repeat,
        linear-gradient(135deg, #fbbf24 50%, transparent 50%) calc(100% - 18px) 50% / 6px 6px no-repeat,
        linear-gradient(180deg, #151a23 0%, #10141b 100%);
    color: #f8fafc;
    font-family: 'Roboto', sans-serif;
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 0;
    appearance: none;
    -webkit-appearance: none;
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.025),
        0 10px 22px rgba(0, 0, 0, 0.16);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.toolbar-select:hover,
.toolbar-select:focus {
    border-color: rgba(245, 158, 11, 0.52);
    box-shadow:
        inset 0 0 0 1px rgba(245, 158, 11, 0.08),
        0 0 0 3px rgba(245, 158, 11, 0.08),
        0 12px 24px rgba(0, 0, 0, 0.18);
}

.toolbar-select option {
    background: #11151c;
    color: #f8fafc;
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
}

.toolbar-select.custom-select-source,
.custom-select-source {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    min-width: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.custom-select {
    position: relative;
    min-width: 170px;
    height: 48px;
    font-family: 'Roboto', sans-serif;
}

.custom-select-trigger {
    width: 100%;
    height: 100%;
    border: 1px solid #313847;
    border-radius: 18px;
    background: linear-gradient(180deg, #151a23 0%, #10141b 100%);
    color: #f8fafc;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 0 16px;
    cursor: pointer;
    font-family: 'Roboto', sans-serif;
    font-size: 0.9rem;
    font-weight: 800;
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.025),
        0 10px 22px rgba(0, 0, 0, 0.16);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.custom-select-trigger i {
    color: #fbbf24;
    font-size: 0.78rem;
}

.custom-select.is-open .custom-select-trigger,
.custom-select-trigger:hover,
.custom-select-trigger:focus-visible {
    border-color: rgba(245, 158, 11, 0.56);
    box-shadow:
        inset 0 0 0 1px rgba(245, 158, 11, 0.08),
        0 0 0 3px rgba(245, 158, 11, 0.08),
        0 12px 24px rgba(0, 0, 0, 0.18);
    outline: none;
}

.custom-select-options {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 8px);
    z-index: 120;
    display: none;
    padding: 5px;
    border: 1px solid rgba(245, 158, 11, 0.34);
    border-radius: 18px;
    background: #10141b;
    box-shadow: 0 22px 44px rgba(0, 0, 0, 0.42);
    overflow: hidden;
}

.custom-select.is-open .custom-select-options {
    display: grid;
    gap: 1px;
}

.custom-select-option {
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: #f8fafc;
    padding: 6px 12px;
    cursor: pointer;
    font-family: 'Roboto', sans-serif;
    font-size: 0.88rem;
    font-weight: 700;
    text-align: left;
}

.custom-select-option:hover,
.custom-select-option.is-selected {
    background: rgba(245, 158, 11, 0.14);
    color: #fbbf24;
}

.toolbar-order-btn {
    min-width: 46px;
    padding-inline: 0;
}

#seccion-cuentas .users-toolbar {
    display: flex;
    align-items: center !important;
    gap: 18px;
}

.accounts-toolbar-filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
}

#seccion-cuentas .accounts-toolbar-filter-group .search-box-users-compact {
    flex: 0 1 430px !important;
    max-width: 430px;
    min-width: 280px;
}

#seccion-cuentas .accounts-toolbar-filter-group .toolbar-select {
    min-width: 136px;
    max-width: 150px;
    padding-left: 14px;
    padding-right: 38px;
}

#seccion-cuentas .accounts-toolbar-filter-group .custom-select {
    min-width: 136px;
    max-width: 150px;
}

.accounts-toolbar-actions {
    gap: 12px;
}

.accounts-sort-group {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 52px;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
}

.accounts-sort-label {
    color: #d7deea;
    font-size: 0.84rem;
    font-weight: 700;
    white-space: nowrap;
}

#seccion-cuentas .accounts-sort-group .toolbar-select {
    min-width: 176px;
}

#seccion-cuentas .accounts-sort-group .custom-select {
    min-width: 176px;
}

#seccion-gremios .users-toolbar-actions .custom-select {
    min-width: 196px;
}

.main-container {
    max-width: none;
    margin: 0;
    padding: 0;
    min-height: 0;
    overflow: hidden;
}

.seccion {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 28px;
    padding: 22px;
}

.seccion.activa {
    display: flex !important;
    flex-direction: column;
}

.toolbar,
.header-tools {
    background: transparent !important;
    padding: 0 !important;
    margin-bottom: 18px !important;
    border: none !important;
}

.toolbar,
.header-tools {
    align-items: stretch !important;
}

.toolbar > *:not(.table-container),
.header-tools > *:not(.table-container) {
    min-height: 52px;
}

.search-box input,
.search-box-users input,
.toolbar select,
.header-tools select,
.header-tools input[type="number"] {
    background-color: #12161d !important;
    border: 1px solid #313847 !important;
    border-radius: 16px !important;
    color: #f8fafc !important;
}

.search-box input,
.search-box-users input {
    padding-top: 14px !important;
    padding-bottom: 14px !important;
    padding-left: 44px !important;
    padding-right: 42px !important;
}

.toolbar .search-box,
.users-toolbar .search-box-users {
    flex: 1 1 340px !important;
}

#seccion-usuarios .search-box-users-compact,
#seccion-gremios .search-box-users-compact,
#seccion-cuentas .search-box-users-compact {
    flex: 0 1 430px !important;
    max-width: 430px;
}

.toolbar > div:not(.search-box):not(.search-box-users),
.header-tools > div {
    background: #12161d;
    border: 1px solid #313847;
    border-radius: 16px;
}

.toolbar > div:not(.search-box):not(.search-box-users) label {
    color: #d7deea !important;
}

.toolbar button,
.header-tools button {
    min-height: 52px;
    font-weight: 700;
}

#btnOrdenUsuarios,
#btnOrdenGremios,
#btnOrdenCuentas,
#btnNuevoJugador,
#btnNuevoGremio,
#btnNuevaCuenta {
    min-width: 196px;
    white-space: nowrap;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 48px;
    box-sizing: border-box;
    padding: 0 22px;
    font-family: 'Roboto', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.01em;
    border-radius: 16px;
    box-shadow: 0 16px 30px rgba(245, 158, 11, 0.15);
}

#btnOrdenUsuarios,
#btnOrdenGremios,
#btnOrdenCuentas {
    min-width: 48px;
    width: 48px;
    padding: 0;
    gap: 0;
}

#btnNuevoJugador i,
#btnNuevoGremio i,
#btnNuevaCuenta i {
    font-size: 0.9rem;
}

.table-container {
    border: 1px solid var(--card-border);
    border-radius: 22px;
    box-shadow: none;
    background: #11151c;
}

table {
    background: transparent;
}

th {
    background: #131821;
    color: #fbbf24;
    font-family: 'Roboto', sans-serif;
    font-size: 0.86rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    border-bottom: 1px solid #2c3442;
}

td {
    color: #dee6f2;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.95rem;
}

tr:hover td {
    background: rgba(255, 255, 255, 0.03);
}

tbody tr td:first-child {
    color: #f8fafc;
    font-weight: 600;
}

tbody tr td:last-child {
    white-space: nowrap;
}

.btn-action {
    background: #171d27;
    border: 1px solid #313847;
    color: #f0c35d;
    padding: 8px 12px;
}

.btn-action:hover {
    background: #fbbf24;
    color: #16120b;
    border-color: rgba(245, 158, 11, 0.45);
}

.btn-epic {
    background: linear-gradient(180deg, #fbbf24 0%, #f59e0b 100%);
    border: 1px solid rgba(245, 158, 11, 0.35);
    color: #17120a;
    font-family: 'Roboto', sans-serif;
    border-radius: 16px;
    box-shadow: 0 16px 30px rgba(245, 158, 11, 0.15);
}

.btn-action,
.btn-whatsapp,
.modal-buttons button,
#btnNuevaCuenta {
    border-radius: 16px;
}

.upload-card,
.whatsapp-card,
.empty-state-card {
    background: #11151c;
    border: 1px solid var(--card-border);
    box-shadow: none;
}

.whatsapp-card-header h2,
.empty-state-card h3 {
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.report-wa-list {
    display: grid;
    gap: 6px;
    margin-top: 10px;
}

.report-wa-line {
    color: #f8fafc;
    line-height: 1.55;
    font-weight: 600;
}

.modal-content {
    background: #141821;
    border: 1px solid rgba(245, 158, 11, 0.35);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.modal-header {
    background: #171c25;
    border-bottom: 1px solid rgba(245, 158, 11, 0.24);
}

@media (max-width: 1180px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .app-sidebar {
        min-height: auto;
        border-right: none;
        border-bottom: 1px solid var(--card-border);
    }

    .hero-grid {
        grid-template-columns: 1fr;
    }

    .entity-card {
        grid-template-columns: 1fr;
    }

    .entity-card-details {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .guild-form-layout,
    .guild-form-grid-two,
    .guild-form-grid-three,
    .guild-form-grid-four,
    .access-user-layout {
        grid-template-columns: 1fr;
    }

    .guild-identity-layout {
        grid-template-columns: 1fr;
    }

    .guild-form-grid-levels {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .guild-whatsapp-group-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .app-main {
        padding: 16px;
    }

    .app-sidebar {
        padding: 18px 14px;
    }

    .sidebar-footer {
        left: 14px;
        right: 14px;
        bottom: 18px;
    }

    .hero-card,
    .hero-stat-card,
    .seccion {
        padding: 18px;
        border-radius: 22px;
    }

    .sidebar-footer-actions {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .entity-card-details {
        grid-template-columns: 1fr;
    }

    .guild-form-grid-levels {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .guild-whatsapp-group-row {
        padding: 14px;
    }
}
