.wc-ticket-dashboard {
    --wc-ticket-navy: #17324d;
    --wc-ticket-sky: #2f80ed;
    --wc-ticket-cyan: #44c7f4;
    --wc-ticket-gold: #f4b544;
    --wc-ticket-green: #22a06b;
    --wc-ticket-red: #d64545;
    --wc-ticket-ink: #203040;
    --wc-ticket-muted: #6b7785;
    --wc-ticket-border: #dbe6f1;
    --wc-ticket-panel: #ffffff;
    --wc-ticket-soft: linear-gradient(180deg, #f6fbff 0%, #ffffff 100%);
    margin: 0 0 32px;
    color: var(--wc-ticket-ink);
}

.wc-ticket-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 28px 32px;
    border-radius: 24px;
    background:
        radial-gradient(circle at top right, rgba(68, 199, 244, 0.28), transparent 32%),
        radial-gradient(circle at left bottom, rgba(244, 181, 68, 0.2), transparent 28%),
        linear-gradient(135deg, #17324d 0%, #235784 58%, #2f80ed 100%);
    box-shadow: 0 20px 55px rgba(21, 50, 77, 0.18);
    color: #fff;
    margin-bottom: 24px;
}

.wc-ticket-eyebrow {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.wc-ticket-hero__title {
    margin: 0 0 10px;
    color: #fff;
    font-size: clamp(28px, 4vw, 40px);
    line-height: 1.08;
}

.wc-ticket-hero__text {
    margin: 0;
    max-width: 680px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 15px;
    line-height: 1.7;
}

.wc-ticket-toggle-btn.theme-btn.style-one,
.wc-ticket-submit-btn.theme-btn.style-one,
.wc-ticket-action-btn.theme-btn.style-one {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 20px;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, #f4b544 0%, #ff8a3d 100%);
    box-shadow: 0 14px 30px rgba(244, 138, 61, 0.22);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.wc-ticket-action-btn.theme-btn.style-one {
    min-height: 40px;
    padding: 10px 16px;
    border-radius: 12px;
    box-shadow: 0 10px 22px rgba(47, 128, 237, 0.18);
    background: linear-gradient(135deg, #2f80ed 0%, #245dbe 100%);
}

.wc-ticket-toggle-btn.theme-btn.style-one:hover,
.wc-ticket-submit-btn.theme-btn.style-one:hover,
.wc-ticket-action-btn.theme-btn.style-one:hover {
    transform: translateY(-2px);
    filter: brightness(1.02);
}

.wc-ticket-card,
.wc-ticket-detail-card {
    background: var(--wc-ticket-soft);
    border: 1px solid var(--wc-ticket-border);
    border-radius: 22px;
    box-shadow: 0 14px 38px rgba(20, 46, 79, 0.08);
}

.wc-ticket-form-wrap,
.wc-ticket-list-card,
.wc-ticket-detail-card {
    overflow: hidden;
    margin-bottom: 24px;
}

.wc-ticket-form {
    padding: 24px;
}

.wc-ticket-form__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.wc-ticket-form p {
    margin: 0 0 18px;
}

.wc-ticket-form label,
#chat-reply-form label {
    display: inline-block;
    margin-bottom: 8px;
    color: var(--wc-ticket-navy);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.wc-ticket-form input[type="text"],
.wc-ticket-form input[type="file"],
.wc-ticket-form textarea,
#chat-reply-form input[type="file"],
#chat-reply-form textarea {
    width: 100%;
    border: 1px solid #cad9e8;
    border-radius: 14px;
    background: #fff;
    box-shadow: inset 0 1px 2px rgba(20, 46, 79, 0.04);
}

.wc-ticket-form input[type="text"],
.wc-ticket-form input[type="file"],
#chat-reply-form input[type="file"] {
    min-height: 48px;
    padding: 10px 14px;
}

.wc-ticket-form textarea,
#chat-reply-form textarea {
    min-height: 140px;
    padding: 14px 16px;
    resize: vertical;
}

.wc-ticket-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 24px 0;
}

.wc-ticket-card__title {
    margin: 0;
    color: var(--wc-ticket-navy);
    font-size: 22px;
}

.wc-ticket-card__meta {
    margin: 0;
    color: var(--wc-ticket-muted);
    font-size: 14px;
}

.wc-ticket-table-wrap {
    padding: 18px 24px 24px;
    overflow-x: auto;
}

.wc-ticket-table {
    margin: 0;
    border: 0;
    border-collapse: separate;
    border-spacing: 0 14px;
    background: transparent;
}

.wc-ticket-table thead th {
    border: 0;
    padding: 0 14px 10px;
    background: transparent;
    color: var(--wc-ticket-muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.wc-ticket-table tbody tr {
    background: #fff;
    box-shadow: 0 10px 28px rgba(21, 50, 77, 0.08);
}

.wc-ticket-table tbody td {
    padding: 18px 14px;
    border-top: 1px solid #edf3f8;
    border-bottom: 1px solid #edf3f8;
    background: #fff;
    vertical-align: middle;
}

.wc-ticket-table tbody td:first-child {
    border-left: 1px solid #edf3f8;
    border-radius: 16px 0 0 16px;
}

.wc-ticket-table tbody td:last-child {
    border-right: 1px solid #edf3f8;
    border-radius: 0 16px 16px 0;
}

.wc-ticket-id {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: #eef6ff;
    color: var(--wc-ticket-sky);
    font-weight: 700;
}

.wc-ticket-subject {
    display: block;
    color: var(--wc-ticket-navy);
    font-weight: 700;
}

.wc-ticket-date {
    color: var(--wc-ticket-muted);
    font-size: 14px;
}

.wc-ticket-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.wc-ticket-badge--open {
    background: rgba(68, 199, 244, 0.14);
    color: #0b79a5;
}

.wc-ticket-badge--pending {
    background: rgba(244, 181, 68, 0.18);
    color: #a25b00;
}

.wc-ticket-badge--closed {
    background: rgba(214, 69, 69, 0.14);
    color: #b12f2f;
}

.ticket-status-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 24px;
    margin: 0;
    border-left: 0;
    border-bottom: 1px solid var(--wc-ticket-border);
    background:
        linear-gradient(90deg, rgba(47, 128, 237, 0.08), transparent 55%),
        #fff;
}

.ticket-status-box__label {
    display: block;
    margin-bottom: 6px;
    color: var(--wc-ticket-muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ticket-status-box__title {
    display: block;
    color: var(--wc-ticket-navy);
    font-size: 22px;
    line-height: 1.3;
}

.chat-container {
    max-height: 460px;
    overflow-y: auto;
    padding: 24px;
    background:
        radial-gradient(circle at top left, rgba(68, 199, 244, 0.1), transparent 26%),
        linear-gradient(180deg, #f8fbfe 0%, #edf5fb 100%);
    margin-bottom: 0;
}

.chat-container::after {
    content: '';
    display: table;
    clear: both;
}

.chat-bubble {
    margin: 0 0 14px;
    padding: 14px 16px;
    border-radius: 18px;
    width: auto;
    position: relative;
    float: right;
    clear: both;
    max-width: min(78%, 620px);
    box-shadow: 0 12px 28px rgba(19, 50, 77, 0.12);
}

.chat-left {
    background: #fff;
    color: var(--wc-ticket-ink);
    text-align: left;
    float: left;
}

.chat-left:before {
    display: block;
    clear: both;
    content: '';
    position: absolute;
    top: 12px;
    left: -7px;
    width: 14px;
    height: 14px;
    background: #fff;
    transform: rotate(45deg);
    border-radius: 3px;
}

.chat-right {
    background: linear-gradient(135deg, #2f80ed 0%, #245dbe 100%);
    color: #fff;
    text-align: right;
    margin-left: auto;
}

.chat-right:before {
    display: block;
    clear: both;
    content: '';
    position: absolute;
    right: -7px;
    bottom: 12px;
    width: 14px;
    height: 14px;
    background: #245dbe;
    transform: rotate(45deg);
    border-radius: 3px;
}

.chat-author {
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    opacity: 0.78;
}

.chat-message {
    line-height: 1.7;
    word-break: break-word;
}

.chat-attachment {
    margin-top: 10px;
}

.chat-attachment a {
    font-size: 13px;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    text-decoration: none;
}

.chat-left .chat-attachment a {
    color: var(--wc-ticket-sky);
    justify-content: flex-start;
}

.chat-attachment a i,
.chat-left .chat-attachment a i {
    color: var(--wc-ticket-gold) !important;
    font-size: 16px;
    margin-left: 0;
}

#chat-reply-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px auto;
    gap: 14px;
    align-items: end;
    padding: 24px;
    background: #fff;
}

#chat-reply-form textarea {
    min-height: 110px;
    margin-bottom: 0;
}

#chat-reply-form button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 20px;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, #17324d 0%, #2f80ed 100%);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 14px 28px rgba(23, 50, 77, 0.16);
}

#chat-reply-form button[disabled] {
    background: #b9c3ce !important;
    box-shadow: none;
}

@media (max-width: 991px) {
    .wc-ticket-hero,
    .wc-ticket-card__header,
    .ticket-status-box,
    #chat-reply-form {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: flex-start;
    }

    .wc-ticket-hero {
        padding: 24px;
    }

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

    .wc-ticket-table {
        min-width: 720px;
    }

    #chat-reply-form {
        display: grid;
    }
}

@media (max-width: 767px) {
    .wc-ticket-dashboard {
        margin-bottom: 24px;
    }

    .wc-ticket-hero,
    .wc-ticket-form,
    .wc-ticket-table-wrap,
    .chat-container,
    #chat-reply-form {
        padding: 18px;
    }

    .wc-ticket-card__header {
        padding: 18px 18px 0;
    }

    .ticket-status-box__title {
        font-size: 18px;
    }

    .chat-bubble {
        max-width: 90%;
    }
}
