/* RESET & VARIABLES GLOBALES */
:root {
    --bg-dark: #080a09;
    --card-bg: rgba(18, 22, 19, 0.75);
    --card-border: rgba(45, 58, 48, 0.6);
    --green-primary: #38b000;
    --green-glow: rgba(56, 176, 0, 0.4);
    --green-hover: #44c702;
    --red-error: #ff3333;
    --red-glow: rgba(255, 51, 51, 0.35);
    --text-main: #ffffff;
    --text-muted: #9ba89e;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(circle at 50% 0%, rgba(56, 176, 0, 0.12) 0%, transparent 60%),
        radial-gradient(circle at 85% 90%, rgba(20, 30, 22, 0.5) 0%, transparent 50%);
    background-attachment: fixed;
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow-x: hidden;
}

body.dashboard-active {
    display: block;
    padding: 0;
}

/* CLASE PARA BLOQUEAR EL SCROLL DEL FONDO CUANDO HAY UN MODAL ABIERTO */
body.modal-open {
    overflow: hidden !important;
    height: 100vh !important;
}

/* UTILITY CLASSES */
.margin-top-2px { margin-top: 2px; }
.margin-top-12px { margin-top: 12px; }
.margin-top-16px { margin-top: 16px; }
.margin-top-20px { margin-top: 20px; }

/* BADGES Y PALETA DE COLORES DE ROLES STAFF */
.staff-role-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: transform 0.2s ease;
}

.staff-role-badge:hover {
    transform: scale(1.05);
}

.badge-management { background: rgba(255, 140, 0, 0.18); color: #FF8C00; border: 1px solid rgba(255, 140, 0, 0.4); }
.badge-head-property { background: rgba(255, 215, 0, 0.18); color: #FFD700; border: 1px solid rgba(255, 215, 0, 0.4); }
.badge-assistant-head { background: rgba(255, 253, 208, 0.15); color: #FFFDD0; border: 1px solid rgba(255, 253, 208, 0.35); }
.badge-prop-senior { background: rgba(255, 51, 51, 0.18); color: #FF3333; border: 1px solid rgba(255, 51, 51, 0.4); }
.badge-prop-coordinator { background: rgba(30, 86, 49, 0.35); color: #5CD682; border: 1px solid rgba(30, 86, 49, 0.7); }
.badge-prop-member { background: rgba(57, 255, 20, 0.18); color: #39FF14; border: 1px solid rgba(57, 255, 20, 0.4); }
.badge-prop-support { background: rgba(208, 240, 192, 0.15); color: #D0F0C0; border: 1px solid rgba(208, 240, 192, 0.35); }
.badge-event-team { background: rgba(0, 35, 102, 0.35); color: #4A90E2; border: 1px solid rgba(0, 35, 102, 0.7); }
.badge-mapping-team { background: rgba(0, 245, 255, 0.18); color: #00F5FF; border: 1px solid rgba(0, 245, 255, 0.4); }

/* PANTALLA DE CARGA (SPLASH) */
.splash-screen {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background-color: var(--bg-dark);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.splash-screen.fade-out {
    opacity: 0;
    visibility: hidden;
}

.splash-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.splash-logo-wrapper {
    position: relative;
    margin-bottom: 30px;
}

.splash-logo {
    max-width: 180px;
    height: auto;
    filter: drop-shadow(0 0 20px var(--green-glow));
    animation: pulse 2.2s infinite ease-in-out;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 15px var(--green-glow)); }
    50% { transform: scale(1.04); filter: drop-shadow(0 0 30px rgba(56, 176, 0, 0.7)); }
}

.loader-bar {
    width: 220px;
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 16px;
    position: relative;
}

.loader-progress {
    width: 0%;
    height: 100%;
    background: var(--green-primary);
    box-shadow: 0 0 12px var(--green-primary);
    border-radius: 4px;
    transition: width 0.1s linear;
}

.loading-text {
    font-family: 'Montserrat', sans-serif;
    color: var(--green-primary);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 3px;
}

/* VISTA 1: CARD DE LOGIN */
.login-card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 48px 40px;
    max-width: 440px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(56, 176, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.login-card:hover {
    border-color: rgba(56, 176, 0, 0.4);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 40px rgba(56, 176, 0, 0.12);
}

.logo-container { margin-bottom: 24px; }
.logo { max-width: 150px; height: auto; transition: transform 0.3s ease; }
.logo:hover { transform: scale(1.03); }

.badge-container { margin-bottom: 12px; }
.badge {
    background: rgba(56, 176, 0, 0.12);
    color: var(--green-primary);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 2px;
    padding: 6px 14px;
    border-radius: 30px;
    border: 1px solid rgba(56, 176, 0, 0.25);
    transition: all 0.2s ease;
}

.badge:hover {
    background: rgba(56, 176, 0, 0.2);
    box-shadow: 0 0 10px rgba(56, 176, 0, 0.2);
}

h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.7rem;
    font-weight: 900;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

.subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 32px;
}

.btn-discord {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background-color: #5865F2;
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 15px 24px;
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 6px 20px rgba(88, 101, 242, 0.25);
}

.btn-discord:hover {
    background-color: #4752C4;
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 12px 30px rgba(88, 101, 242, 0.45);
}

.btn-discord:active {
    transform: translateY(-1px) scale(0.99);
}

.discord-icon { width: 20px; height: 20px; transition: transform 0.2s ease; }
.btn-discord:hover .discord-icon { transform: rotate(10deg); }
.footer-note { font-size: 0.75rem; color: #5a665c; margin-top: 24px; }

/* VISTA 2: DASHBOARD */
.dashboard-container { width: 100%; min-height: 100vh; }

.topbar {
    background: rgba(13, 17, 14, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--card-border);
    padding: 16px 48px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

.topbar.topbar-hidden {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
}

.brand { display: flex; align-items: center; gap: 16px; }
.brand-logo { width: 42px; height: auto; transition: transform 0.3s ease; }
.brand-logo:hover { transform: rotate(-5deg) scale(1.05); }

.brand-text h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    font-weight: 900;
    letter-spacing: 1px;
}

.status-online {
    font-size: 0.65rem;
    color: var(--green-primary);
    font-weight: 700;
    letter-spacing: 1.5px;
}

/* WIDGET PERFIL DISCORD */
.user-profile {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(25, 33, 27, 0.6);
    padding: 6px 16px 6px 8px;
    border-radius: 40px;
    border: 1px solid var(--card-border);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.user-profile:hover { 
    border-color: var(--green-primary);
    box-shadow: 0 0 15px rgba(56, 176, 0, 0.15);
    transform: translateY(-1px);
}

.user-profile:active {
    transform: translateY(0);
}

.avatar-wrapper { position: relative; width: 38px; height: 38px; }

.user-avatar {
    width: 100%; height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--green-primary);
    transition: transform 0.3s ease;
}

.user-profile:hover .user-avatar { transform: scale(1.05); }

.status-indicator {
    position: absolute;
    bottom: 0; right: 0;
    width: 10px; height: 10px;
    background-color: var(--green-primary);
    border-radius: 50%;
    border: 2px solid #141a16;
    box-shadow: 0 0 8px var(--green-primary);
}

.user-info { display: flex; flex-direction: column; }
.username { font-size: 0.85rem; font-weight: 700; color: var(--text-main); }
.user-tag { font-size: 0.7rem; color: var(--text-muted); }

.logout-btn {
    background: none; border: none;
    color: #7a8a7d;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    margin-left: 4px;
}

.logout-btn:hover {
    color: #ff4d4d;
    background: rgba(255, 77, 77, 0.15);
    transform: scale(1.1) rotate(90deg);
}

.logout-btn:active {
    transform: scale(0.95) rotate(90deg);
}

/* CONTENIDO Y TARJETAS INTERACTIVAS */
.dashboard-content {
    max-width: 1200px;
    margin: 50px auto;
    padding: 0 30px;
}

.welcome-banner { margin-bottom: 40px; }

.welcome-banner h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.2rem;
    font-weight: 900;
    margin-bottom: 10px;
}

.welcome-banner p { color: var(--text-muted); font-size: 1rem; max-width: 650px; line-height: 1.6; }

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 28px;
}

.card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 32px;
    display: flex;
    flex-direction: column;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.card-interactive:hover {
    border-color: var(--green-primary);
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 25px rgba(56, 176, 0, 0.15);
}

.card-interactive:active {
    transform: translateY(-2px);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.icon-box {
    width: 48px; height: 48px;
    background: rgba(56, 176, 0, 0.1);
    border: 1px solid rgba(56, 176, 0, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--green-primary);
    transition: all 0.3s ease;
}

.card-interactive:hover .icon-box {
    background: rgba(56, 176, 0, 0.2);
    transform: scale(1.08);
}

.icon-box-staff {
    background: rgba(88, 101, 242, 0.12);
    border-color: rgba(88, 101, 242, 0.3);
    color: #5865F2;
}
.card-interactive:hover .icon-box-staff {
    background: rgba(88, 101, 242, 0.22);
}

.icon-box-admin {
    background: rgba(255, 140, 0, 0.12);
    border-color: rgba(255, 140, 0, 0.3);
    color: #FF8C00;
}
.card-interactive:hover .icon-box-admin {
    background: rgba(255, 140, 0, 0.22);
}

.card-badge {
    background: rgba(56, 176, 0, 0.15);
    color: var(--green-primary);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    transition: transform 0.2s ease;
}

.card-interactive:hover .card-badge {
    transform: scale(1.05);
}

.badge-staff { background: rgba(88, 101, 242, 0.15); color: #5865F2; }
.badge-admin { background: rgba(255, 140, 0, 0.15); color: #FF8C00; }

.btn-admin { background: #FF8C00 !important; }
.btn-admin:hover {
    background: #e07b00 !important;
    box-shadow: 0 0 20px rgba(255, 140, 0, 0.4) !important;
}

.card h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 28px;
    flex-grow: 1;
}

.btn-primary {
    background: var(--green-primary);
    color: #ffffff;
    border: none;
    padding: 14px 20px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-primary:hover {
    background: var(--green-hover);
    box-shadow: 0 6px 20px var(--green-glow);
    transform: translateY(-2px);
}

.btn-primary:active {
    transform: translateY(0) scale(0.98);
}

.btn-primary svg {
    transition: transform 0.25s ease;
}

.btn-primary:hover svg {
    transform: translateX(4px);
}

.status-box {
    display: flex; align-items: center; gap: 10px;
    background: rgba(255, 255, 255, 0.03);
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.card-interactive:hover .status-box {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-main);
}

.status-dot {
    width: 8px; height: 8px;
    background-color: var(--green-primary);
    border-radius: 50%;
    box-shadow: 0 0 6px var(--green-primary);
    animation: pulse 2s infinite ease-in-out;
}

.card-link {
    color: var(--green-primary);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    display: flex; align-items: center; gap: 6px;
    transition: gap 0.25s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s ease;
}

.card-link:hover { 
    gap: 12px;
    color: var(--green-hover);
}

.card-link svg {
    transition: transform 0.25s ease;
}

.card-link:hover svg {
    transform: translate(2px, -2px);
}

/* MODALES Y ANIMACIONES OPTIMIZADAS (SIN RETRASO EN CRUCES) */
.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(10px);
    z-index: 999;
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.fade-in {
    opacity: 1;
    visibility: visible;
}

.modal-overlay.fade-out {
    opacity: 0;
    visibility: hidden;
}

.modal-container {
    background: rgba(15, 20, 16, 0.95);
    border: 1px solid var(--card-border);
    border-radius: 18px;
    width: 100%;
    max-width: 620px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9), 0 0 40px rgba(56, 176, 0, 0.1);
    overflow: hidden;
    transform: scale(0.92) translateY(20px);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.fade-in .modal-container {
    transform: scale(1) translateY(0);
}

.modal-overlay.fade-out .modal-container {
    transform: scale(0.92) translateY(20px);
}

.modal-lg { max-width: 820px; }

.modal-header {
    padding: 24px 30px;
    border-bottom: 1px solid var(--card-border);
    display: flex; justify-content: space-between; align-items: flex-start;
}

.modal-header h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.35rem; font-weight: 800;
}

.modal-subtitle {
    font-size: 0.82rem; color: var(--text-muted); margin-top: 4px;
}

.btn-close {
    background: none; border: none;
    color: var(--text-muted);
    font-size: 1.8rem; line-height: 1;
    cursor: pointer;
    width: 36px; height: 36px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-close:hover { 
    color: #ffffff; 
    background: rgba(255, 77, 77, 0.25);
    transform: rotate(90deg) scale(1.1);
}

.btn-close:active {
    transform: rotate(90deg) scale(0.95);
}

.modal-body { 
    padding: 30px;
    max-height: 75vh;
    overflow-y: auto;
}

.form-group {
    margin-bottom: 20px;
    display: flex; flex-direction: column; gap: 8px;
}

.form-group label {
    font-size: 0.82rem;
    font-weight: 700;
    color: #c4d1c7;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.required { color: var(--green-primary); }

.form-control {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    padding: 12px 16px;
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    outline: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.form-control:hover {
    border-color: rgba(56, 176, 0, 0.3);
}

.form-control:focus {
    border-color: var(--green-primary);
    background: rgba(56, 176, 0, 0.04);
    box-shadow: 0 0 15px rgba(56, 176, 0, 0.2);
    transform: translateY(-1px);
}

.form-control.input-error {
    border-color: var(--red-error) !important;
    background: rgba(255, 51, 51, 0.05) !important;
    box-shadow: 0 0 12px var(--red-glow) !important;
    animation: shake 0.4s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-4px); }
    40%, 80% { transform: translateX(4px); }
}

.error-text {
    color: var(--red-error);
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 2px;
}

select.form-control option {
    background-color: #0e120f;
    color: #ffffff;
}

textarea.form-control { resize: vertical; min-height: 100px; }

.modal-footer {
    display: flex; justify-content: flex-end; gap: 12px;
    margin-top: 10px;
}

.btn-secondary {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--card-border);
    padding: 12px 20px;
    border-radius: 10px;
    font-weight: 600; font-size: 0.88rem;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.btn-secondary:active {
    transform: translateY(0);
}

/* LISTA DE TICKETS Y CHAT */
.tickets-list { display: flex; flex-direction: column; gap: 14px; max-height: 480px; overflow-y: auto; padding-right: 6px; }

.ticket-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 18px 20px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.ticket-item:hover {
    border-color: var(--green-primary);
    background: rgba(56, 176, 0, 0.05);
    transform: translateX(6px) translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.ticket-item:active {
    transform: translateX(3px) translateY(0);
}

.ticket-item-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.ticket-id { font-weight: 800; font-family: 'Montserrat', sans-serif; color: var(--green-primary); font-size: 0.85rem; margin-right: 8px; }
.ticket-cat-badge { font-size: 0.7rem; background: rgba(255, 255, 255, 0.06); padding: 3px 8px; border-radius: 6px; color: var(--text-muted); transition: background 0.2s ease; }
.ticket-item:hover .ticket-cat-badge { background: rgba(255, 255, 255, 0.1); color: var(--text-main); }

.ticket-status { font-size: 0.72rem; font-weight: 700; color: #ffb703; background: rgba(255, 183, 3, 0.12); padding: 4px 10px; border-radius: 20px; border: 1px solid rgba(255, 183, 3, 0.25); transition: transform 0.2s ease; }
.ticket-status:hover { transform: scale(1.05); }
.ticket-status.status-answered { color: var(--green-primary); background: rgba(56, 176, 0, 0.12); border-color: rgba(56, 176, 0, 0.25); }
.ticket-status.status-closed { color: #a29bfe; background: rgba(162, 155, 254, 0.12); border-color: rgba(162, 155, 254, 0.3); }

.claimed-badge {
    font-size: 0.7rem;
    font-weight: 700;
    color: #38b000;
    background: rgba(56, 176, 0, 0.1);
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid rgba(56, 176, 0, 0.3);
}

.ticket-item-title { font-size: 1rem; font-weight: 700; margin-bottom: 6px; transition: color 0.2s ease; }
.ticket-item:hover .ticket-item-title { color: var(--green-primary); }

.ticket-item-footer { display: flex; justify-content: space-between; align-items: center; font-size: 0.72rem; color: #6b7a6d; }
.view-ticket-link { 
    color: var(--green-primary); 
    font-weight: 700; 
    transition: transform 0.25s ease, color 0.2s ease;
}
.ticket-item:hover .view-ticket-link {
    transform: translateX(4px);
    color: var(--green-hover);
}

.empty-tickets { text-align: center; padding: 40px 20px; color: var(--text-muted); }
.empty-tickets svg { margin-bottom: 12px; opacity: 0.4; color: var(--green-primary); animation: pulse 2s infinite ease-in-out; }

/* VISTA CHAT DE SOPORTE Y MESA */
.ticket-chat-view { display: flex; flex-direction: column; gap: 16px; }

.chat-top-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.btn-back-tickets {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    font-size: 0.8rem;
}

.btn-back-tickets svg {
    transition: transform 0.25s ease;
}

.btn-back-tickets:hover svg {
    transform: translateX(-4px);
}

.staff-actions-bar {
    display: flex;
    gap: 8px;
}

.btn-staff-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-staff-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn-staff-action:active {
    transform: translateY(0);
}

.btn-claim {
    background: rgba(88, 101, 242, 0.2);
    color: #7289da;
    border: 1px solid rgba(88, 101, 242, 0.4);
}
.btn-claim:hover { background: #5865F2; color: #ffffff; }

.btn-close-tk {
    background: rgba(255, 51, 51, 0.15);
    color: #ff4d4d;
    border: 1px solid rgba(255, 51, 51, 0.3);
}
.btn-close-tk:hover { background: #ff3333; color: #ffffff; }

.btn-reopen {
    background: rgba(162, 155, 254, 0.18);
    color: #a29bfe;
    border: 1px solid rgba(162, 155, 254, 0.4);
}
.btn-reopen:hover {
    background: #6c5ce7;
    color: #ffffff;
}

.chat-header-info {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--card-border);
    padding: 16px;
    border-radius: 12px;
    transition: border-color 0.2s ease;
}

.chat-header-info:hover {
    border-color: rgba(56, 176, 0, 0.3);
}

.chat-header-main { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.chat-header-info h3 { font-family: 'Montserrat', sans-serif; font-size: 1.1rem; }

.ticket-initial-details {
    background: rgba(0, 0, 0, 0.3);
    border-left: 3px solid var(--green-primary);
    padding: 12px 16px;
    border-radius: 4px 8px 8px 4px;
}

.details-label { font-size: 0.68rem; font-weight: 800; color: var(--green-primary); letter-spacing: 1px; margin-bottom: 6px; }
.details-content { font-size: 0.85rem; color: var(--text-muted); white-space: pre-wrap; line-height: 1.5; }

.chat-separator {
    text-align: center;
    border-bottom: 1px solid var(--card-border);
    line-height: 0.1em;
    margin: 10px 0;
}

.chat-separator span {
    background: #0f1410;
    padding: 0 12px;
    font-size: 0.65rem;
    font-weight: 800;
    color: #5a665c;
    letter-spacing: 1.5px;
}

.chat-messages-container {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-height: 280px;
    min-height: 140px;
    overflow-y: auto;
    padding: 10px 6px;
}

.empty-chat-notice {
    text-align: center;
    padding: 20px;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.chat-message {
    display: flex;
    gap: 12px;
    max-width: 85%;
}

.chat-message.user-message { align-self: flex-start; }
.chat-message.staff-message { align-self: flex-end; flex-direction: row-reverse; }

.chat-avatar img {
    width: 34px; height: 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--card-border);
    transition: transform 0.2s ease;
}

.chat-avatar img:hover { transform: scale(1.1); }

.staff-message .chat-avatar img { border-color: var(--green-primary); }

.chat-bubble {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 12px 16px;
    transition: border-color 0.2s ease;
}

.chat-bubble:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

.staff-message .chat-bubble {
    background: rgba(56, 176, 0, 0.08);
    border-color: rgba(56, 176, 0, 0.25);
}

.chat-msg-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.chat-sender-name { font-size: 0.78rem; font-weight: 700; color: var(--text-main); }
.chat-msg-time { font-size: 0.68rem; color: var(--text-muted); margin-left: auto; }

.staff-badge {
    background: var(--green-primary);
    color: #ffffff;
    font-size: 0.6rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
}

.chat-msg-body {
    font-size: 0.85rem;
    color: #e0e6e1;
    line-height: 1.4;
    white-space: pre-wrap;
}

.chat-input-box {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    margin-top: 6px;
}

.chat-input-box textarea {
    flex-grow: 1;
    min-height: 46px;
}

.chat-input-box button {
    height: 46px;
    padding: 0 18px;
}

/* ADMIN ROLES LISTING */
.staff-members-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
}

.staff-admin-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--card-border);
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.staff-admin-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(56, 176, 0, 0.3);
    transform: translateX(3px);
}

.btn-remove-role {
    background: none;
    border: none;
    color: var(--red-error);
    font-size: 1.3rem;
    cursor: pointer;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.btn-remove-role:hover {
    background: rgba(255, 51, 51, 0.2);
    transform: scale(1.1);
}

/* CONTENEDOR TOAST NOTIFICACIONES */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    background: rgba(15, 22, 17, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(56, 176, 0, 0.4);
    border-left: 4px solid var(--green-primary);
    color: #ffffff;
    padding: 14px 20px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 15px rgba(56, 176, 0, 0.15);
    font-size: 0.88rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
    pointer-events: auto;
    animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.toast.toast-error {
    border-color: rgba(255, 51, 51, 0.4);
    border-left-color: var(--red-error);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 15px var(--red-glow);
}

.toast.toast-error svg { color: var(--red-error); }
.toast svg { color: var(--green-primary); flex-shrink: 0; }

@keyframes toastSlideIn {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.toast.fade-out {
    animation: toastSlideOut 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes toastSlideOut {
    from { opacity: 1; transform: translateY(0) scale(1); }
    to { opacity: 0; transform: translateY(10px) scale(0.95); }
}

/* CLASES DE UTILIDAD PARA TRANSICIONES DE VISTAS Y MODALES */
.hidden { display: none !important; }

.fade-in {
    animation: fadeInWindow 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeInWindow {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-out-down {
    animation: fadeOutDownWindow 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeOutDownWindow {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(15px); }
}

.fade-in-up {
    animation: fadeInUpWindow 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeInUpWindow {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}