/* ==========================================
   SUPPORT SYSTEM - PREMIUM DESIGN
   ========================================== */

.support-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2.5rem 2rem;
}

/* ==========================================
   HEADER & HERO SECTION
   ========================================== */
.support-hero {
    text-align: center;
    padding: 3rem 1rem;
    position: relative;
    margin-bottom: 3rem;
    background: radial-gradient(circle at center, rgba(168, 85, 247, 0.15) 0%, transparent 70%);
}

.hero-badge {
    background: rgba(168, 85, 247, 0.1);
    color: #d8b4fe;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    border: 1px solid rgba(168, 85, 247, 0.2);
    margin-bottom: 1.5rem;
    display: inline-block;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
    margin: 0 0 1rem 0;
    letter-spacing: -0.03em;
    text-shadow: 0 0 20px rgba(168, 85, 247, 0.3);
}

.hero-subtitle {
    font-size: 1.1rem;
    color: #94a3b8;
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ==========================================
   ACTION CARDS
   ========================================== */
.support-actions-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 4rem;
}

.action-card {
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.action-card.primary {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.1) 0%, rgba(168, 85, 247, 0.05) 100%);
    border-color: rgba(168, 85, 247, 0.2);
}

.action-card:hover {
    transform: translateY(-5px);
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.action-card.primary:hover {
    border-color: var(--accent);
    box-shadow: 0 10px 30px rgba(168, 85, 247, 0.2);
}

.ac-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.action-card.primary .ac-icon {
    background: var(--accent);
    color: black;
}

.ac-info h3 {
    margin: 0 0 0.25rem 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
}

.ac-info p {
    margin: 0;
    font-size: 0.85rem;
    color: #94a3b8;
}

.ac-arrow {
    margin-left: auto;
    color: #64748b;
    width: 20px;
}

.action-card:hover .ac-arrow {
    color: white;
    transform: translateX(4px);
    transition: transform 0.2s;
}

/* ==========================================
   TICKETS SECTION
   ========================================== */
.section-header {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.section-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.empty-tickets-state {
    text-align: center;
    padding: 4rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    border: 1px dashed rgba(255, 255, 255, 0.1);
}

.empty-tickets-state h3 {
    color: white;
    font-size: 1.1rem;
    margin: 0 0 0.5rem 0;
}

.empty-tickets-state p {
    color: #64748b;
    margin: 0;
    font-size: 0.9rem;
}

/* ==========================================
   TICKETS GRID
   ========================================== */
.tickets-grid {
    display: grid;
    gap: 1.25rem;
    margin-top: 2rem;
}

.ticket-card {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.8) 0%, rgba(30, 41, 59, 0.6) 100%);
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 12px;
    padding: 1.75rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.ticket-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), #a855f7);
    opacity: 0;
    transition: opacity 0.3s;
}

.ticket-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(var(--accent-rgb), 0.2),
        0 0 20px rgba(var(--accent-rgb), 0.1);
}

.ticket-card:hover::before {
    opacity: 1;
}

.ticket-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    gap: 1rem;
}

.ticket-subject {
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    line-height: 1.4;
    flex: 1;
}

.ticket-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: #94a3b8;
    margin-top: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.ticket-meta span {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

/* ==========================================
   BADGES
   ========================================== */
.ticket-badge {
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.badge-OPEN {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(59, 130, 246, 0.08));
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.1);
}

.badge-ANSWERED {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(16, 185, 129, 0.08));
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.1);
}

.badge-CLOSED {
    background: linear-gradient(135deg, rgba(107, 114, 128, 0.15), rgba(107, 114, 128, 0.08));
    color: #9ca3af;
    border: 1px solid rgba(107, 114, 128, 0.3);
}

.badge-urgent {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(239, 68, 68, 0.08));
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.15);
}

.badge-high {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.15), rgba(249, 115, 22, 0.08));
    color: #fb923c;
    border: 1px solid rgba(249, 115, 22, 0.3);
}

/* MOBILE ADAPTATION FOR CLIENT SUPPORT */
@media (max-width: 768px) {
    .support-container {
        padding: 1rem;
    }

    .support-hero {
        padding: 2rem 1rem;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .support-actions-row,
    .tickets-grid {
        grid-template-columns: 1fr;
    }

    .view-ticket-layout {
        grid-template-columns: 1fr;
    }
}

.badge-medium {
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.15), rgba(234, 179, 8, 0.08));
    color: #fbbf24;
    border: 1px solid rgba(234, 179, 8, 0.3);
}

.badge-low {
    background: linear-gradient(135deg, rgba(148, 163, 184, 0.15), rgba(148, 163, 184, 0.08));
    color: #cbd5e1;
    border: 1px solid rgba(148, 163, 184, 0.3);
}

/* ==========================================
   TICKET DETAIL VIEW
   ========================================== */
.ticket-detail {
    display: grid;
    grid-template-rows: auto 1fr auto;
    height: calc(100vh - 240px);
    min-height: 600px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.85) 100%);
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.td-header {
    padding: 2rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.td-header h2 {
    margin: 0.5rem 0 0 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    letter-spacing: -0.01em;
}

.td-messages {
    padding: 2rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    background: rgba(0, 0, 0, 0.2);
}

.td-messages::-webkit-scrollbar {
    width: 8px;
}

.td-messages::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.td-messages::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.3);
    border-radius: 4px;
}

.td-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.5);
}

.td-composer {
    padding: 1.5rem 2rem;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    display: flex;
    gap: 1rem;
    align-items: flex-end;
}

.td-composer textarea {
    flex: 1;
    resize: vertical;
    min-height: 50px;
    max-height: 150px;
}

/* ==========================================
   CHAT BUBBLES & LAYOUT
   ========================================== */
.chat-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.5rem;
    align-items: flex-end;
}

.chat-row-me {
    justify-content: flex-end;
}

.chat-row-other {
    justify-content: flex-start;
}

.chat-avatar {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    padding: 2px;
}

.chat-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.chat-bubble {
    max-width: 70%;
    padding: 1.25rem;
    border-radius: 12px;
    line-height: 1.6;
    font-size: 0.95rem;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.chat-row-me .chat-bubble {
    background: linear-gradient(135deg, var(--accent) 0%, #a855f7 100%);
    color: #000000;
    border-bottom-right-radius: 2px;
}

.chat-row-other .chat-bubble {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.2);
    color: #e2e8f0;
    border-bottom-left-radius: 2px;
}

.bubble-meta {
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
    display: block;
    line-height: 1.2;
}

.chat-row-me .bubble-meta {
    color: rgba(0, 0, 0, 0.6);
    text-align: right;
    font-weight: 600;
}

.chat-row-other .bubble-meta {
    color: #94a3b8;
}

.bubble-content {
    word-wrap: break-word;
}

/* ==========================================
   EMPTY STATE
   ========================================== */
.empty-tickets {
    text-align: center;
    padding: 6rem 2rem;
    color: #94a3b8;
}

.empty-tickets i {
    opacity: 0.4;
    margin-bottom: 1.5rem;
}

.empty-tickets h3 {
    margin: 0 0 0.75rem 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
}

.empty-tickets p {
    margin: 0 0 1.5rem 0;
    font-size: 1rem;
    color: #94a3b8;
}

/* ==========================================
   FORM CONTAINER
   ========================================== */
.form-container {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.8) 0%, rgba(30, 41, 59, 0.6) 100%);
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.form-container h2 {
    margin: 0 0 2rem 0;
    font-size: 1.75rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent) 0%, #a855f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 0;
}

/* ==========================================
   LOADER
   ========================================== */
.loader {
    text-align: center;
    padding: 4rem;
    color: var(--accent);
    font-weight: 600;
    font-size: 1.1rem;
}

.error-state {
    text-align: center;
    padding: 4rem;
    color: #ef4444;
    font-weight: 600;
    font-size: 1.1rem;
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 768px) {
    .support-container {
        padding: 1.5rem 1rem;
    }

    .support-title {
        font-size: 1.5rem;
    }

    .tickets-grid {
        gap: 1rem;
    }

    .ticket-card {
        padding: 1.25rem;
    }

    .ticket-subject {
        font-size: 1rem;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .chat-bubble {
        max-width: 85%;
        padding: 1rem;
    }

    .td-header,
    .td-composer {
        padding: 1.25rem;
    }
}