/* =========================================
   SOPORTE PÚBLICO ADTECH
   ========================================= */

.support-page {
    min-height: calc(100vh - 82px);
    background: #ffffff;
    padding: 42px 20px 70px;
}

.support-messages {
    bottom: 24px;
    display: grid;
    gap: 10px;
    max-width: min(420px, calc(100vw - 32px));
    position: fixed;
    right: 24px;
    width: 100%;
    z-index: 1100;
}

.support-messages .alert {
    align-items: center;
    display: flex;
    gap: 14px;
    justify-content: space-between;
    border-radius: 14px;
    font-weight: 600;
    margin: 0;
    padding: 14px 16px;
}

.support-toast-close {
    background: transparent;
    border: 0;
    color: inherit;
    cursor: pointer;
    font-size: 1.4rem;
    line-height: 1;
    padding: 0 2px;
}

.support-toast-close:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

/* CABECERA */

.support-hero {
    text-align: center;
    margin-bottom: 52px;
}

.support-hero h1 {
    color: #000000;
    font-size: 2.3rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.support-hero p {
    color: #222222;
    font-size: 0.98rem;
    margin-bottom: 22px;
}

.support-actions {
    display: flex;
    justify-content: center;
    gap: 22px;
    flex-wrap: wrap;
}

.btn-support-main,
.btn-submit-ticket,
.btn-create-small {
    border: none;
    background-color: #6CE5CC;
    color: #000000;
    font-weight: 800;
    border-radius: 12px;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-support-main {
    min-width: 170px;
    padding: 11px 28px;
}

.btn-submit-ticket {
    width: 100%;
    padding: 12px 20px;
    margin-top: 24px;
    font-size: 1rem;
}

.btn-create-small {
    padding: 10px 18px;
    background-color: #27b8f2;
    color: white;
    border-radius: 8px;
}

.btn-support-main:hover,
.btn-submit-ticket:hover,
.btn-create-small:hover {
    background-color: #58d0b7;
    color: #000000;
    transform: translateY(-1px);
}

.btn-support-main.is-active {
    background-color: #32207b;
    color: #ffffff;
}

.btn-create-small:hover {
    background-color: #159ed5;
    color: white;
}

.support-user-btn {
    border: none;
    background: transparent;
    color: #000000;
    font-size: 2rem;
    line-height: 1;
    text-decoration: none;
}

/* SESIÓN */

.support-session {
    width: fit-content;
    max-width: 100%;
    margin: 0 auto 20px;
    background: #f2f4f8;
    border: 1px solid #dce2eb;
    border-radius: 999px;
    padding: 8px 14px;
    color: #111827;
    font-size: 0.9rem;
}

.support-logout-form {
    display: inline;
}

.support-session button {
    border: none;
    background: transparent;
    color: #32207b;
    font-weight: 800;
    margin-left: 8px;
    padding: 0;
}

/* TARJETAS */

.support-card {
    width: 100%;
    max-width: 760px;
    margin: 0 auto 44px;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.13);
    overflow: hidden;
}

.support-card-header {
    background-color: #32207b;
    color: white;
    text-align: center;
    font-weight: 800;
    padding: 13px 20px;
}

.ticket-form-card {
    scroll-margin-top: 110px;
}

/* FORMULARIOS */

.support-form {
    padding: 28px 52px 38px;
}

.support-form-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 42px;
    margin-bottom: 24px;
}

.support-form label {
    display: block;
    color: #1e293b;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.support-form select,
.support-form input,
.support-form textarea {
    width: 100%;
    background: #f2f4f8;
    border: 1px solid #dce2eb;
    border-radius: 10px;
    padding: 10px 14px;
    color: #374151;
    outline: none;
    margin-bottom: 16px;
}

.support-form textarea {
    min-height: 100px;
    resize: vertical;
}

.support-form select:focus,
.support-form input:focus,
.support-form textarea:focus {
    background: #ffffff;
    border-color: #6CE5CC;
    box-shadow: 0 0 0 0.22rem rgba(108, 229, 204, 0.22);
}

.support-form input[type="file"] {
    padding: 12px;
}

.support-form small {
    display: block;
    text-align: center;
    color: #6b7280;
    margin-top: -8px;
    font-size: 0.8rem;
}

/* LOGIN Y REGISTRO */

.login-support-card {
    max-width: 430px;
    padding: 34px 44px;
    text-align: center;
    scroll-margin-top: 110px;
}

.login-support-card h2 {
    font-weight: 800;
    color: #000000;
    margin-bottom: 4px;
}

.login-support-card p {
    font-size: 0.85rem;
    color: #222222;
    margin-bottom: 24px;
}

.login-support-card .support-form {
    padding: 0;
    text-align: left;
}

.support-auth-panel {
    display: none;
}

.support-auth-panel.is-visible {
    display: block;
}

.register-card {
    margin-top: 34px;
}

.input-icon-group {
    display: flex;
    align-items: center;
    background: #f2f4f8;
    border: 1px solid #dce2eb;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 16px;
}

.input-icon-group i {
    padding: 0 11px;
    color: #475569;
}

.input-icon-group input {
    border: none;
    border-radius: 0;
    flex: 1;
    margin-bottom: 0;
}

.support-password-toggle {
    align-items: center;
    align-self: stretch;
    background: transparent;
    border: none;
    color: #475569;
    cursor: pointer;
    display: inline-flex;
    flex: 0 0 44px;
    justify-content: center;
    padding: 0;
}

.support-password-toggle:hover,
.support-password-toggle:focus-visible {
    color: #32207b;
    outline: none;
}

.support-password-toggle i {
    padding: 0;
}

.support-link {
    display: inline-block;
    margin-top: 14px;
    color: #64748b;
    text-decoration: none;
    font-size: 0.85rem;
}

.support-link:hover {
    color: #32207b;
}

/* TABLA DE TICKETS */

.tickets-section {
    max-width: 920px;
    margin: 0 auto;
    scroll-margin-top: 110px;
}

.tickets-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 18px;
    gap: 18px;
}

.tickets-header h2 {
    color: #000000;
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 0;
}

.tickets-header p {
    font-size: 0.95rem;
    margin-bottom: 0;
    color: #222222;
}

.tickets-table-wrapper {
    overflow-x: auto;
    background: white;
    border-radius: 12px;
}

.tickets-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

.tickets-table th,
.tickets-table td {
    padding: 11px 10px;
    border-bottom: 1px solid #d9d9d9;
    font-size: 0.88rem;
    color: #000000;
    vertical-align: middle;
}

.tickets-table th {
    font-weight: 900;
    background: #fbfdff;
}

.btn-ver-detalle {
    border: none;
    background: transparent;
    color: #000000;
    font-weight: 700;
    font-size: 0.82rem;
}

.btn-ver-detalle:hover {
    color: #32207b;
}

.tickets-count {
    background: #f5f5f5;
    padding: 8px 12px;
    border-radius: 8px;
    width: fit-content;
    margin-left: auto;
    margin-top: 12px;
    font-size: 0.82rem;
    color: #444444;
}

/* BADGES */

.status-badge,
.priority-badge {
    display: inline-block;
    border-radius: 12px;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 800;
}

/* Prioridades */
.priority-alta,
.priority-ALTA,
.priority-urgente,
.priority-URGENTE {
    background-color: #ef5350;
    color: #ffffff;
}

.priority-media,
.priority-MEDIA {
    background-color: #ffd54f;
    color: #5f4700;
}

.priority-baja,
.priority-BAJA {
    background-color: #81c784;
    color: #093b16;
}

/* Estados */
.status-abierto,
.status-ABIERTO,
.status-nuevo,
.status-NUEVO {
    background-color: #4fc3f7;
    color: #06364a;
}

.status-en_proceso,
.status-EN_PROCESO,
.status-proceso,
.status-PROCESO {
    background-color: #ffd54f;
    color: #5f4700;
}

.status-resuelto,
.status-RESUELTO {
    background-color: #66bb6a;
    color: #063c12;
}

.status-cerrado,
.status-CERRADO {
    background-color: #9ca3af;
    color: #111827;
}

/* MODAL DETALLE */

.support-modal-content {
    border: none;
    border-radius: 18px;
    padding: 10px;
}

.support-modal-content .modal-title {
    font-size: 1.8rem;
    font-weight: 900;
    color: #000000;
}

.support-modal-content .modal-header p {
    color: #222222;
    font-size: 0.9rem;
}

.modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.modal-box {
    border: 1px solid #d9d9d9;
    border-radius: 10px;
    padding: 14px;
    background: #ffffff;
}

.modal-box.full {
    grid-column: 1 / -1;
}

.modal-box h3 {
    font-size: 1rem;
    font-weight: 900;
    color: #000000;
    margin-bottom: 8px;
}

.modal-box p {
    font-size: 0.88rem;
    color: #111111;
    margin-bottom: 0;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

.info-grid span {
    display: block;
    font-size: 0.74rem;
    font-weight: 900;
    color: #000000;
    margin-bottom: 4px;
}

.info-grid strong {
    display: block;
    font-size: 0.82rem;
    color: #000000;
}

/* FOOTER */

.support-footer {
    background-color: #4b4d52;
    color: rgba(255, 255, 255, 0.65);
    text-align: center;
    padding: 20px;
    border-top: 4px solid #2D68C4;
}

.support-footer p {
    margin: 0;
    font-size: 0.85rem;
}

/* RESPONSIVE */

@media (max-width: 991.98px) {
    .support-page {
        padding-top: 34px;
    }

    .support-hero {
        margin-bottom: 40px;
    }

    .support-hero h1 {
        font-size: 1.9rem;
    }

    .support-card {
        max-width: 680px;
    }

    .info-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .support-page {
        padding: 28px 14px 50px;
    }

    .support-hero h1 {
        font-size: 1.7rem;
    }

    .support-hero p {
        font-size: 0.92rem;
    }

    .support-actions {
        flex-direction: column;
        gap: 12px;
        max-width: 290px;
        margin: 0 auto;
    }

    .btn-support-main {
        width: 100%;
    }

    .support-session {
        width: 100%;
        border-radius: 16px;
    }

    .support-logout-form {
        display: block;
        margin-top: 6px;
    }

    .support-session button {
        margin-left: 0;
    }

    .support-form {
        padding: 24px 20px 30px;
    }

    .support-form-grid {
        grid-template-columns: 1fr;
        gap: 0;
        margin-bottom: 0;
    }

    .login-support-card {
        padding: 30px 22px;
    }

    .tickets-header {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-create-small {
        width: 100%;
    }

    .modal-grid,
    .info-grid {
        grid-template-columns: 1fr;
    }

    .support-modal-content {
        border-radius: 14px;
        padding: 4px;
    }

    .support-modal-content .modal-title {
        font-size: 1.4rem;
    }
}

@media (max-width: 480px) {
    .support-page {
        padding-left: 12px;
        padding-right: 12px;
    }

    .support-hero h1 {
        font-size: 1.55rem;
    }

    .support-card {
        border-radius: 12px;
    }

    .support-form {
        padding: 22px 16px 26px;
    }

    .login-support-card {
        padding: 26px 18px;
    }

    .tickets-header h2 {
        font-size: 1.6rem;
    }

    .tickets-count {
        margin-left: 0;
        width: 100%;
        text-align: center;
    }
}
