.hero-guild-management-slot {
    display: none;
}

body.is-guild-management-page .hero-default-content {
    display: none;
}

body.is-guild-management-page .hero-guild-management-slot {
    display: block;
    padding: 18px 24px;
}

body.is-guild-management-page .hero-reportes-primary-column > .hero-card {
    min-height: 155px;
    padding: 0;
}

.guild-management-context {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
}

.guild-management-eyebrow {
    color: #fbbf24;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.14em;
}

.guild-management-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.guild-management-heading h2 {
    min-width: 0;
    margin: 0;
    color: #f8fafc;
    font: 700 clamp(2rem, 2.6vw + 1rem, 3rem)/1.08 'Roboto', sans-serif;
    letter-spacing: -0.03em;
    overflow-wrap: anywhere;
}

.guild-management-switch {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(245, 158, 11, 0.4);
    border-radius: 12px;
    background: rgba(245, 158, 11, 0.12);
    color: #fbbf24;
    cursor: pointer;
}

.guild-management-switch[hidden] {
    display: none !important;
}

.guild-management-context-main > p {
    margin: 9px 0 0;
    color: var(--text-soft);
    font-size: 0.94rem;
}

.guild-management-context-side {
    display: flex;
    justify-self: end;
    align-items: center;
    gap: 10px;
}

.guild-management-context-side.is-admin-layout {
    display: grid;
    justify-items: center;
}

.guild-management-status {
    padding: 7px 12px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 12px;
    color: #cbd5e1;
    font-size: 0.82rem;
    font-weight: 800;
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.guild-management-status.is-active {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-color: rgba(74, 222, 128, 0.68);
    background: rgba(13, 84, 43, 0.4);
    color: #b8ffd1;
    animation: guild-management-active-pulse 2.1s ease-in-out infinite;
}

.guild-management-status.is-active::before {
    content: '';
    flex: 0 0 8px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4ade80;
    animation: guild-management-active-dot 1.7s ease-out infinite;
}

.guild-management-status.is-active:hover {
    animation: none;
    transform: translateY(-2px) scale(1.08);
    border-color: #6cf29d;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.18), 0 0 24px rgba(34, 197, 94, 0.38);
}

@keyframes guild-management-active-pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.08); }
    50% { transform: scale(1.06); box-shadow: 0 0 0 5px rgba(34, 197, 94, 0.16), 0 0 22px rgba(34, 197, 94, 0.3); }
}

@keyframes guild-management-active-dot {
    0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.68); }
    70%, 100% { box-shadow: 0 0 0 7px rgba(74, 222, 128, 0); }
}

.guild-management-status.is-inactive {
    border-color: rgba(248, 113, 113, 0.35);
    color: #fca5a5;
}

.guild-management-picker {
    z-index: 2260;
    padding: 16px;
}

.guild-management-picker[hidden] {
    display: none !important;
}

.guild-management-picker:not([hidden]) {
    display: flex;
}

.guild-management-picker-content {
    width: min(900px, calc(100vw - 32px));
    max-width: 900px;
}

.guild-management-results {
    max-height: min(56vh, 520px);
}

.guild-management-option {
    grid-template-columns: 38px minmax(0, 1fr) 26px;
}

.guild-management-option:hover,
.guild-management-option.is-selected {
    border-color: rgba(245, 158, 11, 0.52);
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.16), transparent 58%), rgba(30, 41, 59, 0.68);
}

.guild-management-option .guild-management-option-state {
    width: 26px;
    color: #fbbf24;
    text-align: center;
    background: none;
    border: 0;
}

body.is-guild-management-page #seccion-gremios {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    overflow-x: hidden;
    overflow-y: hidden;
}

body.is-guild-management-page #guildManagementToolbar,
body.is-guild-management-page #gremiosList {
    display: none !important;
}

.guild-management-editor-host {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}

.guild-management-empty {
    display: grid;
    justify-items: center;
    gap: 8px;
    padding: 48px 20px;
    border: 1px solid var(--card-border);
    border-radius: 28px;
    background: var(--card-bg);
    color: #9fb4d8;
    text-align: center;
}

.guild-management-empty h3,
.guild-management-empty p {
    margin: 0;
}

.guild-management-empty[hidden] {
    display: none !important;
}

#seccion-gremios #modalGremio.is-creating .guild-modal-tab:not([data-guild-modal-tab="general"]) {
    display: none !important;
}

#seccion-gremios #modalGremio {
    position: static;
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: 0;
    background: none;
    backdrop-filter: none;
    z-index: auto;
}

#seccion-gremios #modalGremio .guild-modal-content {
    width: 100% !important;
    max-width: none !important;
    max-height: none !important;
    height: 100%;
    min-height: 0;
    overflow: hidden !important;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
    animation: none;
}

#seccion-gremios #modalGremio .guild-modal-header {
    display: none;
}

#seccion-gremios #modalGremio .guild-modal-form-shell {
    min-height: 0;
    overflow: hidden;
}

#seccion-gremios #modalGremio .guild-modal-body {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden !important;
    padding: 0 !important;
}

#seccion-gremios #modalGremio .guild-modal-tabs {
    position: relative;
    top: auto;
    flex: 0 0 auto;
    margin: 0;
    padding: 8px 0 0;
    background: transparent;
    box-shadow: none;
}

#seccion-gremios #modalGremio .guild-modal-tab:first-child {
    transform-origin: left bottom;
}

#seccion-gremios #modalGremio .guild-modal-panel.is-active {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 24px;
    border-right: 1px solid var(--card-border);
    border-left: 1px solid var(--card-border);
    background: var(--card-bg);
}

#seccion-gremios #modalGremio .guild-modal-actions {
    position: relative;
    bottom: auto;
    flex: 0 0 auto;
    justify-content: space-between;
    gap: 16px;
    margin: 0;
    border-right: 1px solid var(--card-border);
    border-bottom: 1px solid var(--card-border);
    border-left: 1px solid var(--card-border);
    border-radius: 0 0 28px 28px;
    background: #171c25;
}

.guild-management-footer-options {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
}

#seccion-gremios #modalGremio .guild-management-footer-options button {
    display: inline-flex;
    flex: 0 1 auto;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    white-space: nowrap;
}

#seccion-gremios #modalGremio .guild-management-footer-options button[hidden] {
    display: none !important;
}

#seccion-gremios #modalGremio #guildManagementWhatsappAction {
    border-color: rgba(37, 211, 102, 0.48);
    color: #b8ffd1;
}

#seccion-gremios #modalGremio #guildManagementWhatsappAction i {
    color: #25d366;
}

#seccion-gremios #modalGremio #btnGuardarGremio {
    flex: 0 0 auto;
}

@media (max-width: 768px) {
    .guild-management-context {
        grid-template-columns: 1fr;
    }

    .guild-management-context-side {
        justify-self: start;
        flex-wrap: wrap;
    }

    .guild-management-context-side.is-admin-layout {
        justify-self: start;
    }

    .guild-management-heading h2 {
        font-size: clamp(1.5rem, 7vw, 2.2rem);
    }

    #seccion-gremios #modalGremio .guild-modal-panel.is-active {
        padding: 16px;
    }

    #seccion-gremios #modalGremio .guild-modal-actions {
        align-items: stretch;
        flex-direction: column;
    }

    #seccion-gremios #modalGremio .guild-management-footer-options {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    #seccion-gremios #modalGremio .guild-management-footer-options button {
        width: 100%;
        min-width: 0;
        white-space: normal;
    }

    #seccion-gremios #modalGremio #btnGuardarGremio {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .guild-management-status.is-active,
    .guild-management-status.is-active::before {
        animation: none;
    }
}
