* {
    box-sizing: border-box;
}

body.support-page {
    margin: 0;
    font-family: 'DM Sans', sans-serif;
    color: #1f2937;
    background: #f6f8f7;
}

.support-main .container {
    width: min(1180px, calc(100% - 2rem));
    margin: 0 auto;
}

.support-main {
    padding: 1.5rem 0 3rem;
}

.support-hero {
    margin-bottom: 1.5rem;
}

.support-hero-inner {
    background: linear-gradient(130deg, #ffffff 0%, #f1f7f4 100%);
    border-radius: 18px;
    border: 1px solid #e2e8f0;
    padding: 1.8rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.support-hero h1 {
    margin: 0 0 0.4rem;
    font-size: clamp(1.8rem, 2.8vw, 2.4rem);
}

.support-hero p {
    margin: 0;
    color: #4b5563;
    max-width: 680px;
}

.support-quick-meta {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    font-weight: 600;
    color: #2d6a4f;
}

.support-quick-meta i {
    margin-right: 0.35rem;
}

.support-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.support-form-card,
.support-contact-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 1.3rem;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.support-form-card h2,
.support-contact-card h2,
.support-categories h2,
.support-faq-section h2 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.45rem;
}

.support-form {
    display: grid;
    gap: 0.8rem;
}

.form-field {
    display: grid;
    gap: 0.35rem;
}

.form-field label {
    font-size: 0.85rem;
    font-weight: 700;
    color: #374151;
}

.form-field input,
.form-field textarea,
.form-field select {
    width: 100%;
    border: 1px solid #cfd7e2;
    border-radius: 10px;
    padding: 0.72rem 0.8rem;
    font: inherit;
    background: #fff;
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
    outline: none;
    border-color: #2d6a4f;
    box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.15);
}

.support-submit-btn {
    border: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, #2d6a4f, #1b4332);
    color: #fff;
    font-weight: 700;
    padding: 0.85rem;
    cursor: pointer;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 0.55rem;
}

.support-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.support-contact-eyebrow {
    margin: 0;
    color: #a57f3d;
    font-weight: 600;
}

.support-contact-copy {
    margin: 0 0 1rem;
    color: #6b7280;
}

.support-contact-list {
    display: grid;
    gap: 0.7rem;
}

.support-contact-list a,
.support-contact-list p {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin: 0;
    color: #1f2937;
    text-decoration: none;
}

.support-contact-list i {
    color: #c89c52;
}

.support-social-row {
    margin-top: 1rem;
    display: flex;
    gap: 0.6rem;
}

.support-social-row a {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: #f3f4f6;
    color: #c89c52;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.support-categories,
.support-faq-section {
    margin-top: 1.8rem;
}

/* Ticket Section - Professional Boxed Layout */
.support-ticket-section {
    margin: 2rem 0;
}

/* Boxed Container */
.support-ticket-box {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    overflow: hidden;
}

.support-ticket-header {
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.support-ticket-header h2 {
    margin: 0;
    font-size: 1.25rem;
    color: #111827;
    font-family: 'Lora', serif;
}

.support-ticket-header p {
    margin: 0.25rem 0 0;
    color: #6b7280;
    font-size: 0.9rem;
}

.support-refresh-btn {
    border: 1px solid #d1d5db;
    background: #fff;
    color: #374151;
    font: inherit;
    font-weight: 600;
    font-size: 0.85rem;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

.support-refresh-btn:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
    color: #111827;
}

.support-refresh-btn:active {
    background: #e5e7eb;
}

/* Ticket List Container */
.support-ticket-list {
    max-height: 500px;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: #fff;
}

/* Custom Scrollbar for Ticket List */
.support-ticket-list::-webkit-scrollbar {
    width: 8px;
}

.support-ticket-list::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.support-ticket-list::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}

.support-ticket-list::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Individual Ticket Card */
.support-ticket-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.25rem;
    transition: all 0.2s ease;
}

.support-ticket-card:hover {
    border-color: #d1d5db;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.support-ticket-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.support-ticket-top h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
}

.ticket-status {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.ticket-status.pending {
    background: #fef3c7;
    color: #92400e;
}

.ticket-status.replied {
    background: #d1fae5;
    color: #065f46;
}

.ticket-status.solved {
    background: #f3f4f6;
    color: #374151;
}

.ticket-status.closed {
    background: #f3f4f6;
    color: #374151;
}

.support-ticket-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    color: #6b7280;
    font-size: 0.85rem;
}

.support-ticket-meta span {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.support-ticket-message {
    margin: 0;
    color: #374151;
    line-height: 1.6;
    font-size: 0.95rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f3f4f6;
}

/* Admin Reply Section */
.support-ticket-replies {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 200px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

/* Custom Scrollbar for Replies */
.support-ticket-replies::-webkit-scrollbar {
    width: 4px;
}

.support-ticket-replies::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.support-ticket-reply {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 1rem;
    position: relative;
}

.support-ticket-reply::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 16px;
    width: 10px;
    height: 10px;
    background: #f0fdf4;
    border-left: 1px solid #bbf7d0;
    border-bottom: 1px solid #bbf7d0;
    transform: rotate(45deg);
}

.support-ticket-reply-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.support-ticket-reply-author {
    color: #166534;
    font-size: 0.85rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.support-ticket-reply-time {
    font-size: 0.75rem;
    color: #166534;
    opacity: 0.8;
}

.support-ticket-reply-content {
    margin: 0;
    color: #1f2937;
    line-height: 1.5;
    font-size: 0.9rem;
}

.ticket-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0.24rem 0.6rem;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.ticket-status.pending {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #b45309;
}

.ticket-status.replied {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
}

.ticket-status.solved {
    background: #ecfdf5;
    border: 1px solid #86efac;
    color: #166534;
}

.ticket-status.closed {
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    color: #374151;
}

.support-ticket-empty {
    display: none;
    background: #fff;
    border: 1px dashed #cbd5e1;
    border-radius: 14px;
    padding: 1.4rem;
    text-align: center;
    color: #6b7280;
}

.support-ticket-empty i {
    font-size: 1.3rem;
    color: #2d6a4f;
    margin-bottom: 0.5rem;
}

.support-ticket-empty h3 {
    margin: 0.2rem 0 0.35rem;
    color: #1f2937;
    font-size: 1.05rem;
}

.support-ticket-empty p {
    margin: 0;
}

.support-category-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.8rem;
}

.support-category-grid article {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 1rem;
}

.support-category-grid i {
    color: #2d6a4f;
    font-size: 1.1rem;
}

.support-category-grid h3 {
    margin: 0.55rem 0 0.3rem;
    font-size: 1rem;
}

.support-category-grid p {
    margin: 0;
    color: #6b7280;
    font-size: 0.9rem;
}

.support-faq-list {
    display: grid;
    gap: 0.7rem;
}

.faq-item {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
}

.faq-toggle {
    width: 100%;
    border: 0;
    background: #fff;
    padding: 0.9rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.22s ease;
}

.faq-content p {
    margin: 0;
    padding: 0 1rem 1rem;
    color: #6b7280;
}

.faq-item.active .faq-content {
    max-height: 180px;
}

.faq-item.active .faq-toggle i {
    transform: rotate(180deg);
}

.support-toast {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    background: #1f2937;
    color: #fff;
    border-radius: 10px;
    padding: 0.75rem 0.9rem;
    transform: translateY(130%);
    opacity: 0;
    transition: all 0.2s ease;
    z-index: 1900;
}

.support-toast.show {
    transform: translateY(0);
    opacity: 1;
}

.support-toast.success {
    background: #2d6a4f;
}

.support-toast.error {
    background: #b91c1c;
}

/* Header/footer intentionally inherit from global styles.css for exact cross-page consistency. */

@media (min-width: 900px) {
    .support-grid {
        grid-template-columns: 1.15fr 0.85fr;
        align-items: start;
    }

    .support-category-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .support-ticket-header {
        padding: 0.9rem;
        flex-direction: column;
        align-items: stretch;
    }

    .support-refresh-btn {
        width: 100%;
        justify-content: center;
    }

    .support-ticket-top {
        flex-direction: column;
        align-items: flex-start;
    }
}
