/* ============================================
   SOPORTE.CSS — Ticketera SantOps
   Complementa styles.css sin modificarlo
   ============================================ */

/* ---- VARIABLES EXTRA ---- */
:root {
    --ticket-radius: 20px;
    --ticket-radius-sm: 12px;
    --gate-bg: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #0c2341 100%);
}

/* =============================================
   PANTALLA DE ACCESO (GATE)
   ============================================= */

.ticket-gate-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: var(--gate-bg);
    overflow: hidden;
}

/* Fondo animado */
.ticket-gate-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.gate-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    animation: orbFloat 8s ease-in-out infinite;
}

.gate-orb-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(8, 145, 178, 0.25) 0%, transparent 70%);
    top: -20%;
    right: -10%;
    animation-delay: 0s;
}

.gate-orb-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.2) 0%, transparent 70%);
    bottom: -10%;
    left: -5%;
    animation-delay: -4s;
}

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -20px) scale(1.05); }
    66% { transform: translate(-15px, 15px) scale(0.95); }
}

.gate-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(8, 145, 178, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(8, 145, 178, 0.06) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}

/* Contenido del gate */
.ticket-gate-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 520px;
    width: 90%;
    padding: 56px 48px;
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(32px) saturate(180%);
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow:
        0 0 0 1px rgba(8, 145, 178, 0.15),
        0 32px 80px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    animation: gateCardIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes gateCardIn {
    from { opacity: 0; transform: translateY(30px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Ícono de candado animado */
.gate-icon-wrap {
    position: relative;
    width: 96px;
    height: 96px;
    margin: 0 auto 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gate-icon-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid rgba(8, 145, 178, 0.3);
    animation: ringPulse 3s ease-in-out infinite;
}

.gate-icon-ring-2 {
    inset: -12px;
    border-color: rgba(8, 145, 178, 0.15);
    animation-delay: -1.5s;
}

@keyframes ringPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.08); opacity: 0.5; }
}

.gate-lock-icon {
    width: 48px;
    height: 48px;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 0 20px rgba(6, 182, 212, 0.5));
    animation: lockGlow 3s ease-in-out infinite;
}

@keyframes lockGlow {
    0%, 100% { filter: drop-shadow(0 0 20px rgba(6, 182, 212, 0.4)); }
    50% { filter: drop-shadow(0 0 32px rgba(6, 182, 212, 0.7)); }
}

/* Badge de acceso */
.gate-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(8, 145, 178, 0.15);
    border: 1px solid rgba(8, 145, 178, 0.3);
    color: #67e8f9;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 20px;
}

.gate-badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #22d3ee;
    box-shadow: 0 0 8px #22d3ee;
    animation: dotBlink 2s ease-in-out infinite;
}

@keyframes dotBlink {
    0%, 100% { opacity: 1; box-shadow: 0 0 8px #22d3ee; }
    50% { opacity: 0.4; box-shadow: 0 0 4px #22d3ee; }
}

.gate-title {
    font-size: 36px;
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff 0%, #67e8f9 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
    letter-spacing: -0.03em;
    line-height: 1.15;
}

.gate-subtitle {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 36px;
    line-height: 1.65;
}

.gate-subtitle a {
    color: #67e8f9;
    text-decoration: none;
    border-bottom: 1px solid rgba(103, 232, 249, 0.3);
    transition: border-color 0.2s;
}

.gate-subtitle a:hover {
    border-color: #67e8f9;
}

/* Input de código */
.gate-form-wrap {
    text-align: left;
}

.gate-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.gate-input-group {
    margin-bottom: 16px;
}

.gate-input-wrap {
    position: relative;
}

.gate-input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255,255,255,0.35);
    pointer-events: none;
}

.gate-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.07);
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--ticket-radius-sm);
    padding: 14px 14px 14px 44px;
    font-size: 18px;
    font-weight: 700;
    color: white;
    letter-spacing: 0.08em;
    transition: all 0.3s ease;
    outline: none;
}

.gate-input::placeholder {
    color: rgba(255, 255, 255, 0.25);
    font-weight: 400;
    letter-spacing: 0;
}

.gate-input:focus {
    border-color: rgba(8, 145, 178, 0.6);
    background: rgba(8, 145, 178, 0.1);
    box-shadow: 0 0 0 4px rgba(8, 145, 178, 0.15),
                0 0 20px rgba(8, 145, 178, 0.1);
}

.gate-input.shake {
    animation: shakeInput 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97);
    border-color: rgba(239, 68, 68, 0.6) !important;
}

@keyframes shakeInput {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-8px); }
    40% { transform: translateX(8px); }
    60% { transform: translateX(-5px); }
    80% { transform: translateX(5px); }
}

.gate-error {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    font-size: 13px;
    color: #f87171;
    animation: errorIn 0.3s ease;
}

@keyframes errorIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Botón del gate */
.gate-btn {
    width: 100%;
    background: linear-gradient(135deg, #0891b2 0%, #06b6d4 50%, #3b82f6 100%);
    background-size: 200% 100%;
    color: white;
    border: none;
    border-radius: var(--ticket-radius-sm);
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(8, 145, 178, 0.35),
                0 0 40px rgba(8, 145, 178, 0.15),
                inset 0 1px 0 rgba(255,255,255,0.2);
}

.gate-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
    transition: left 0.5s ease;
}

.gate-btn:hover::before { left: 100%; }

.gate-btn:hover {
    background-position: 100% 0;
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(8, 145, 178, 0.5),
                0 0 60px rgba(8, 145, 178, 0.2);
}

.gate-btn:active { transform: translateY(0); }

.gate-btn-text,
.gate-btn-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Trust items */
.gate-trust {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 28px;
    flex-wrap: wrap;
}

.gate-trust-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: rgba(255,255,255,0.4);
}

/* =============================================
   PANTALLA DEL FORMULARIO
   ============================================= */

.ticket-form-screen {
    min-height: 100vh;
}

/* Hero del formulario */
.ticket-hero {
    padding: 80px 0 60px;
    background: linear-gradient(180deg, #f8fafc 0%, #e0f2fe 100%);
    position: relative;
    overflow: hidden;
}

.ticket-hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.ticket-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    animation: orbFloat 8s ease-in-out infinite;
}

.ticket-orb-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(8, 145, 178, 0.12) 0%, transparent 70%);
    top: -10%;
    right: -5%;
}

.ticket-orb-2 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
    bottom: -20%;
    left: 10%;
    animation-delay: -4s;
}

.ticket-hero-inner {
    text-align: center;
    position: relative;
    z-index: 1;
}

.ticket-client-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(8, 145, 178, 0.1);
    border: 1px solid rgba(8, 145, 178, 0.25);
    color: var(--primary-dark);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 20px;
    animation: slideDown 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-15px); }
    to { opacity: 1; transform: translateY(0); }
}

.ticket-hero-title {
    font-size: 52px;
    font-weight: 800;
    color: var(--secondary);
    margin-bottom: 16px;
    letter-spacing: -0.03em;
    line-height: 1.1;
    animation: heroTitleIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s both;
}

@keyframes heroTitleIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.ticket-hero-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 48px;
    line-height: 1.65;
    animation: heroTitleIn 0.6s ease 0.2s both;
}

/* Stepper */
.ticket-stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    max-width: 480px;
    margin: 0 auto;
    animation: heroTitleIn 0.6s ease 0.3s both;
}

.stepper-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 1;
}

.stepper-dot {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--border);
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

.stepper-check {
    display: none;
    position: absolute;
}

.stepper-num {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.stepper-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    white-space: nowrap;
}

.stepper-line {
    height: 2px;
    width: 80px;
    background: var(--border-light);
    margin: 0 -4px;
    margin-bottom: 24px;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.stepper-line::after {
    content: '';
    position: absolute;
    left: -100%;
    top: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-accent);
    transition: left 0.5s ease;
}

/* Estados del stepper */
.stepper-item.active .stepper-dot {
    border-color: var(--primary);
    background: linear-gradient(135deg, #0891b2, #06b6d4);
    box-shadow: 0 0 0 4px rgba(8, 145, 178, 0.2),
                0 4px 12px rgba(8, 145, 178, 0.3);
    transform: scale(1.1);
}

.stepper-item.active .stepper-num { color: white; }
.stepper-item.active .stepper-label { color: var(--primary-dark); font-weight: 700; }

.stepper-item.completed .stepper-dot {
    border-color: var(--success);
    background: var(--success);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
    transform: scale(1.05);
}

.stepper-item.completed .stepper-num { display: none; }
.stepper-item.completed .stepper-check { display: block; }
.stepper-item.completed .stepper-label { color: var(--success); }

.stepper-item.completed + .stepper-line::after { left: 0; }

/* =============================================
   SECCIÓN DEL FORMULARIO
   ============================================= */

.ticket-form-section {
    padding: 60px 0 100px;
    background: linear-gradient(180deg, #fafbfd 0%, #f0f4f8 100%);
}

.ticket-form-section .container {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 32px;
    align-items: start;
}

/* Card del formulario */
.ticket-form-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: var(--ticket-radius);
    box-shadow: 0 8px 32px rgba(8, 145, 178, 0.1),
                0 2px 8px rgba(0, 0, 0, 0.04),
                inset 0 1px 0 rgba(255, 255, 255, 1);
    border: 1px solid rgba(8, 145, 178, 0.1);
    overflow: hidden;
    animation: cardSlideIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s both;
}

@keyframes cardSlideIn {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Pasos del formulario */
.form-step {
    padding: 48px;
}

.form-step-header {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 40px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border-light);
}

.form-step-number {
    font-size: 48px;
    font-weight: 900;
    background: linear-gradient(135deg, rgba(8, 145, 178, 0.2), rgba(6, 182, 212, 0.1));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    letter-spacing: -2px;
    flex-shrink: 0;
}

.form-step-title {
    font-size: 26px;
    font-weight: 800;
    color: var(--secondary);
    margin-bottom: 4px;
    letter-spacing: -0.02em;
}

.form-step-desc {
    font-size: 15px;
    color: var(--text-secondary);
}

/* Grid de campos */
.ticket-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 32px;
}

.ticket-selects-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

/* Campos individuales */
.ticket-field {
    display: flex;
    flex-direction: column;
}

.ticket-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.ticket-label .req { color: var(--primary); }

.ticket-input {
    background: var(--bg-primary);
    border: 1.5px solid var(--border-light);
    border-radius: var(--ticket-radius-sm);
    padding: 13px 16px;
    font-size: 15px;
    color: var(--text-primary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    font-family: inherit;
}

.ticket-input:hover {
    border-color: rgba(8, 145, 178, 0.3);
    background: white;
}

.ticket-input:focus {
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(8, 145, 178, 0.1),
                0 2px 8px rgba(8, 145, 178, 0.1);
}

.ticket-input.error {
    border-color: var(--error);
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

/* Select estilizado */
.ticket-select-wrap {
    position: relative;
}

.ticket-select {
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
    background: var(--bg-primary);
    border: 1.5px solid var(--border-light);
    border-radius: var(--ticket-radius-sm);
    padding: 13px 40px 13px 16px;
    font-size: 15px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
    font-family: inherit;
}

.ticket-select:hover {
    border-color: rgba(8, 145, 178, 0.3);
    background: white;
}

.ticket-select:focus {
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(8, 145, 178, 0.1);
}

.select-chevron {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--text-secondary);
    transition: transform 0.3s ease;
}

.ticket-select:focus + .select-chevron {
    transform: translateY(-50%) rotate(180deg);
    color: var(--primary);
}

/* Priority indicator */
.priority-indicator {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-primary);
    border-radius: var(--ticket-radius-sm);
    padding: 12px 16px;
    margin-bottom: 24px;
    border: 1px solid var(--border-light);
    animation: slideDown 0.3s ease;
}

.priority-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    animation: priorityPulse 2s ease-in-out infinite;
}

@keyframes priorityPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 currentColor; }
    50% { transform: scale(1.1); }
}

.priority-dot.baja { background: #22c55e; box-shadow: 0 0 6px rgba(34, 197, 94, 0.5); }
.priority-dot.media { background: #eab308; box-shadow: 0 0 6px rgba(234, 179, 8, 0.5); }
.priority-dot.alta { background: #ef4444; box-shadow: 0 0 6px rgba(239, 68, 68, 0.5); }
.priority-dot.urgente { background: #dc2626; box-shadow: 0 0 10px rgba(220, 38, 38, 0.7); animation: urgentPulse 1s ease-in-out infinite; }

@keyframes urgentPulse {
    0%, 100% { box-shadow: 0 0 6px rgba(220, 38, 38, 0.5); transform: scale(1); }
    50% { box-shadow: 0 0 16px rgba(220, 38, 38, 0.8); transform: scale(1.2); }
}

#priorityLabel {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
}

.priority-bar-wrap {
    width: 80px;
    height: 4px;
    background: var(--border-light);
    border-radius: 2px;
    overflow: hidden;
}

.priority-bar {
    height: 100%;
    border-radius: 2px;
    transition: width 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Textarea */
.ticket-textarea {
    background: var(--bg-primary);
    border: 1.5px solid var(--border-light);
    border-radius: var(--ticket-radius-sm);
    padding: 14px 16px;
    font-size: 15px;
    color: var(--text-primary);
    transition: all 0.3s ease;
    outline: none;
    font-family: inherit;
    resize: vertical;
    min-height: 160px;
    line-height: 1.7;
}

.ticket-textarea:hover { border-color: rgba(8, 145, 178, 0.3); background: white; }

.ticket-textarea:focus {
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(8, 145, 178, 0.1);
}

/* Char counter */
.char-counter {
    text-align: right;
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
    font-weight: 500;
}

/* Errores de campo */
.field-error {
    display: none;
    font-size: 12px;
    color: var(--error);
    margin-top: 6px;
    font-weight: 500;
}

/* Botones del formulario */
.form-step-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 40px;
    padding-top: 32px;
    border-top: 1px solid var(--border-light);
}

.form-step-actions.two-actions {
    justify-content: space-between;
}

.ticket-btn-next {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #0891b2 0%, #06b6d4 100%);
    color: white;
    border: none;
    border-radius: var(--ticket-radius-sm);
    padding: 15px 32px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(8, 145, 178, 0.35),
                inset 0 1px 0 rgba(255,255,255,0.2);
}

.ticket-btn-next::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
}

.ticket-btn-next:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 8px 28px rgba(8, 145, 178, 0.45); }
.ticket-btn-next:hover::before { left: 100%; }
.ticket-btn-next:active { transform: translateY(0) scale(1); }

.ticket-btn-next svg { transition: transform 0.3s ease; }
.ticket-btn-next:hover svg { transform: translateX(4px); }

.ticket-btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    color: var(--text-secondary);
    border: 1.5px solid var(--border);
    border-radius: var(--ticket-radius-sm);
    padding: 15px 24px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ticket-btn-back:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(8, 145, 178, 0.05);
}

/* Transición entre pasos */
.form-step {
    animation: stepIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes stepIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Error genérico */
.ticket-error-msg {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: rgba(239, 68, 68, 0.06);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--ticket-radius-sm);
    padding: 16px 20px;
    margin: 0 48px 24px;
    animation: errorIn 0.3s ease;
}

.ticket-error-msg strong { display: block; font-size: 14px; color: var(--error); margin-bottom: 4px; }
.ticket-error-msg p { font-size: 13px; color: var(--text-secondary); }
.ticket-error-msg p a { color: var(--primary); }

.ticket-error-msg button {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 20px;
    padding: 0;
    margin-left: auto;
    flex-shrink: 0;
    line-height: 1;
}

/* =============================================
   PANTALLA DE ÉXITO
   ============================================= */

.ticket-success-screen {
    padding: 64px 48px;
    text-align: center;
    animation: successIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes successIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.success-animation-wrap {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.success-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3px solid var(--success);
    animation: successRingExpand 1s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    opacity: 0;
}

.success-ring-1 { animation-delay: 0s; }
.success-ring-2 { inset: -14px; animation-delay: 0.15s; opacity: 0; border-color: rgba(16, 185, 129, 0.5); }
.success-ring-3 { inset: -28px; animation-delay: 0.3s; opacity: 0; border-color: rgba(16, 185, 129, 0.25); }

@keyframes successRingExpand {
    0% { opacity: 0; transform: scale(0.8); }
    60% { opacity: 1; }
    100% { opacity: 0.8; transform: scale(1); }
}

.success-checkmark {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #10b981, #059669);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 32px rgba(16, 185, 129, 0.4),
                0 0 0 8px rgba(16, 185, 129, 0.1);
    animation: checkmarkPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s both;
    z-index: 1;
}

@keyframes checkmarkPop {
    from { opacity: 0; transform: scale(0.3); }
    to { opacity: 1; transform: scale(1); }
}

.check-path {
    stroke-dasharray: 50;
    stroke-dashoffset: 50;
    animation: drawCheck 0.5s ease 0.5s forwards;
}

@keyframes drawCheck {
    to { stroke-dashoffset: 0; }
}

/* Ticket ID */
.success-ticket-id {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, rgba(8, 145, 178, 0.08), rgba(59, 130, 246, 0.06));
    border: 1px solid rgba(8, 145, 178, 0.2);
    border-radius: 16px;
    padding: 16px 24px;
    margin-bottom: 28px;
    animation: successIn 0.5s ease 0.3s both;
}

.ticket-id-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.ticket-id-number {
    font-size: 22px;
    font-weight: 900;
    background: linear-gradient(135deg, #0891b2, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.copy-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(8, 145, 178, 0.1);
    border: 1px solid rgba(8, 145, 178, 0.25);
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--primary-dark);
    cursor: pointer;
    transition: all 0.2s ease;
}

.copy-btn:hover {
    background: rgba(8, 145, 178, 0.2);
    transform: translateY(-1px);
}

.success-title {
    font-size: 32px;
    font-weight: 800;
    color: var(--secondary);
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.success-message {
    font-size: 16px;
    color: var(--text-secondary);
    max-width: 480px;
    margin: 0 auto 40px;
    line-height: 1.7;
}

/* Próximos pasos */
.success-next-steps {
    background: var(--bg-primary);
    border-radius: var(--ticket-radius);
    padding: 32px;
    margin-bottom: 40px;
    text-align: left;
    border: 1px solid var(--border-light);
}

.success-next-steps h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 13px;
}

.next-steps-list { display: flex; flex-direction: column; gap: 16px; }

.next-step {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px;
    background: white;
    border-radius: var(--ticket-radius-sm);
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
}

.next-step:hover {
    border-color: rgba(8, 145, 178, 0.2);
    box-shadow: 0 4px 12px rgba(8, 145, 178, 0.08);
    transform: translateX(4px);
}

.next-step-icon {
    font-size: 24px;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.next-step strong {
    display: block;
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.next-step span {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Botones de éxito */
.success-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.ticket-btn-new {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #0891b2, #06b6d4);
    color: white;
    border: none;
    border-radius: var(--ticket-radius-sm);
    padding: 13px 24px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px rgba(8, 145, 178, 0.35);
}

.ticket-btn-new:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(8, 145, 178, 0.45); }

.ticket-btn-home {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: white;
    color: var(--text-secondary);
    border: 1.5px solid var(--border);
    border-radius: var(--ticket-radius-sm);
    padding: 13px 24px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.ticket-btn-home:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(8, 145, 178, 0.04);
}

/* =============================================
   SIDEBAR
   ============================================= */

.ticket-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 100px;
    animation: cardSlideIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.35s both;
}

.sidebar-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 24px;
    border: 1px solid rgba(8, 145, 178, 0.1);
    box-shadow: 0 4px 16px rgba(8, 145, 178, 0.08);
    transition: all 0.3s ease;
}

.sidebar-card:hover {
    box-shadow: 0 8px 28px rgba(8, 145, 178, 0.14);
    transform: translateY(-2px);
}

.sidebar-card-icon {
    font-size: 28px;
    margin-bottom: 12px;
    display: block;
}

.sidebar-card h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 14px;
}

.sidebar-card p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* SLA list */
.sla-list { display: flex; flex-direction: column; gap: 10px; }

.sla-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.sla-badge {
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 50px;
}

.sla-badge.baja { background: rgba(34, 197, 94, 0.12); color: #166534; }
.sla-badge.media { background: rgba(234, 179, 8, 0.12); color: #854d0e; }
.sla-badge.alta { background: rgba(239, 68, 68, 0.12); color: #991b1b; }
.sla-badge.urgente { background: rgba(220, 38, 38, 0.15); color: #7f1d1d; }

.sla-time {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

/* WhatsApp sidebar button */
.sidebar-wa-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #25d366, #128c7e);
    color: white;
    text-decoration: none;
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    margin-top: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.sidebar-wa-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
    color: white;
}

/* Spinner */
.spinner {
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* =============================================
   RESPONSIVE
   ============================================= */

@media (max-width: 1024px) {
    .ticket-form-section .container {
        grid-template-columns: 1fr;
    }

    .ticket-sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .ticket-gate-content {
        padding: 40px 28px;
    }

    .gate-title { font-size: 28px; }

    .ticket-hero-title { font-size: 36px; }
    .ticket-hero-subtitle { font-size: 16px; }

    .ticket-stepper { gap: 0; }
    .stepper-line { width: 48px; }
    .stepper-label { font-size: 11px; }

    .form-step { padding: 28px 20px; }
    .ticket-form-grid { grid-template-columns: 1fr; }
    .ticket-selects-row { grid-template-columns: 1fr; }

    .form-step-header { flex-direction: column; gap: 12px; }
    .form-step-number { font-size: 36px; }

    .ticket-sidebar { grid-template-columns: 1fr; }

    .ticket-success-screen { padding: 40px 24px; }
    .success-ticket-id { flex-direction: column; text-align: center; }

    .success-next-steps { padding: 20px; }
}

@media (max-width: 480px) {
    .gate-trust { gap: 12px; }
    .gate-trust-item { font-size: 11px; }
    .stepper-line { width: 28px; }
    .form-step-actions.two-actions { flex-direction: column; gap: 12px; }
    .ticket-btn-back { order: 2; justify-content: center; }
    .ticket-btn-next { justify-content: center; }
}
