.zd-portal,
.zd-detail-wrap {
    max-width: 1160px;
    margin: 0 auto;
    color: #2f3941;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.zd-toolbar {
    display: flex;
    gap: 40px;
    align-items: flex-end;
    justify-content: space-between;
    margin: 0 0 34px;
    flex-wrap: wrap;
}

.zd-search-wrap {
    position: relative;
    flex: 1 1 700px;
    max-width: 950px;
}

.zd-search-input {
    width: 100%;
    height: 42px;
    border: 1px solid #87929d;
    border-radius: 999px;
    padding: 0 20px;
    font-size: 16px;
    color: #2f3941;
    background: #fff;
    box-sizing: border-box;
}

    .zd-search-input:focus,
    .zd-filter-select:focus,
    .zd-reply-textarea:focus {
        outline: none;
        border-color: #1f73b7;
        box-shadow: 0 0 0 1px #1f73b7;
    }

.zd-filter-group {
    width: 172px;
    flex: 0 0 172px;
}

.zd-filter-label {
    display: block;
    font-size: 14px;
    line-height: 20px;
    color: #2f3941;
    margin-bottom: 6px;
}

.zd-filter-select {
    width: 100%;
    height: 42px;
    border: 1px solid #87929d;
    border-radius: 4px;
    padding: 0 38px 0 14px;
    font-size: 16px;
    color: #2f3941;
    background: #fff;
    box-sizing: border-box;
}

.zd-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.zd-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

    .zd-table thead th {
        text-align: left;
        font-size: 14px;
        font-weight: 700;
        color: #4f5d6b;
        padding: 18px 12px;
        border-bottom: 1px solid #d8dcde;
    }

    .zd-table tbody td {
        padding: 18px 12px;
        border-bottom: 1px solid #e6e8eb;
        vertical-align: middle;
        font-size: 16px;
        color: #2f3941;
    }

.zd-col-subject {
    width: 48%;
}

.zd-col-id {
    width: 12%;
}

.zd-col-created {
    width: 17%;
}

.zd-col-updated {
    width: 17%;
}

.zd-col-status {
    width: 12%;
}

.zd-subject-link {
    color: #1f73b7;
    text-decoration: none;
    font-size: 16px;
    line-height: 1.4;
}

    .zd-subject-link:hover {
        text-decoration: underline;
    }

.zd-ticket-id {
    white-space: nowrap;
    color: #2f3941;
}

.zd-status-badge {
    display: inline-block;
    min-width: 56px;
    text-align: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    line-height: 18px;
    text-transform: capitalize;
    background: #e6eef5;
    color: #2f3941;
}

.zd-status-open,
.zd-status-new,
.zd-status-pending,
.zd-status-hold {
    background: #e8f1fb;
    color: #1f73b7;
}

.zd-status-solved {
    background: #eef2f5;
    color: #4f5d6b;
}

.zd-status-closed {
    background: #f1f3f5;
    color: #5f6b76;
}

.zd-empty {
    padding: 28px 0;
    color: #68737d;
    font-size: 16px;
}

.zd-detail-breadcrumbs {
    margin-bottom: 28px;
    font-size: 14px;
}

    .zd-detail-breadcrumbs a {
        color: #1f73b7;
        text-decoration: none;
    }

        .zd-detail-breadcrumbs a:hover {
            text-decoration: underline;
        }

.zd-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 350px;
    gap: 48px;
    align-items: start;
}

.zd-detail-title {
    font-size: 34px;
    line-height: 1.25;
    font-weight: 700;
    margin: 0 0 24px;
    color: #243b53;
}

.zd-detail-comment {
    padding: 24px 0;
    border-top: 1px solid #d8dcde;
}

.zd-detail-comment-head {
    display: flex;
    gap: 14px;
    align-items: center;
    margin-bottom: 18px;
}

.zd-detail-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #d8dcde;
    flex: 0 0 40px;
}

.zd-detail-author {
    font-size: 16px;
    color: #2f3941;
    line-height: 1.2;
    font-weight: 600;
}

.zd-detail-date {
    font-size: 14px;
    color: #68737d;
    margin-top: 4px;
}

.zd-detail-comment-body {
    font-size: 16px;
    line-height: 1.7;
    color: #2f3941;
}

.zd-detail-sidebar {
    position: sticky;
    top: 24px;
}

.zd-detail-sidebox {
    background: #f7f7f7;
    padding: 22px 20px;
    border-radius: 4px;
}

    .zd-detail-sidebox hr {
        border: 0;
        border-top: 1px solid #d8dcde;
        margin: 18px 0;
    }

.zd-meta-row {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 16px;
    margin-bottom: 18px;
    align-items: start;
}

    .zd-meta-row span {
        color: #4f5d6b;
        font-size: 15px;
    }

    .zd-meta-row strong {
        color: #2f3941;
        font-size: 15px;
        font-weight: 500;
    }

.zd-thread-note {
    margin: 18px 0 0;
    font-size: 15px;
    color: #68737d;
}

.zd-reply-form {
    margin-top: 24px;
}

.zd-reply-textarea {
    width: 100%;
    min-height: 140px;
    border: 1px solid #87929d;
    border-radius: 6px;
    padding: 14px 16px;
    font-size: 15px;
    line-height: 1.5;
    color: #2f3941;
    box-sizing: border-box;
    resize: vertical;
}

.zd-reply-upload {
    margin-top: 16px;
}

.zd-upload-label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    color: #4f5d6b;
}

.zd-upload-help {
    margin-top: 6px;
    font-size: 12px;
    color: #68737d;
}

.zd-reply-actions {
    margin-top: 14px;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.zd-reply-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    height: 42px;
    border: 0 !important;
    border-radius: 4px;
    background: #0f5132 !important;
    color: #fff !important;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    padding: 0 18px;
    box-shadow: none !important;
    appearance: none;
    -webkit-appearance: none;
    text-decoration: none;
}

    .zd-reply-btn:hover,
    .zd-reply-btn:focus {
        background: #0a3622 !important;
        color: #fff !important;
        border: 0 !important;
        box-shadow: none !important;
        outline: none;
    }

    .zd-reply-btn:disabled {
        opacity: 0.65;
        cursor: not-allowed;
    }

.zd-reply-status {
    font-size: 14px;
    color: #4f5d6b;
}

.zd-detail-attachments {
    margin-top: 12px;
}

.zd-detail-attachment {
    font-size: 14px;
    margin-bottom: 6px;
}

    .zd-detail-attachment a {
        color: #1f73b7;
        text-decoration: none;
    }

        .zd-detail-attachment a:hover {
            text-decoration: underline;
        }

.zd-attachment-size {
    color: #68737d;
    font-size: 13px;
}

.zd-sidebar-attachment {
    margin-bottom: 12px;
    font-size: 14px;
}

.zd-sidebar-attachment-line {
    display: flex;
    align-items: center;
    gap: 8px;
}

.zd-sidebar-attachment a {
    color: #1f73b7;
    text-decoration: none;
}

    .zd-sidebar-attachment a:hover {
        text-decoration: underline;
    }

.zd-sidebar-attachment-size {
    font-size: 12px;
    color: #68737d;
}

.zd-file-icon {
    display: inline-block;
    min-width: 38px;
    font-size: 11px;
    font-weight: 700;
    color: #68737d;
    letter-spacing: 0.02em;
}

.zd-status-message-success {
    color: #2f3941;
}

.zd-status-message-error {
    color: #b42318;
}

.zd-status-message-service {
    color: #b54708;
}

.zd-status-message-warning {
    color: #b54708;
}

.zd-refresh-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 18px;
    font-size: 13px;
    color: #68737d;
}

.zd-refresh-note {
    color: #68737d;
    font-size: 13px;
}
.zd-refresh-inline-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    margin: 0;
    border: 0 !important;
    outline: none;
    box-shadow: none !important;
    background: transparent !important;
    color: #0f5132 !important;
    cursor: pointer;
    border-radius: 4px;
    appearance: none;
    -webkit-appearance: none;
    transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.zd-refresh-inline-btn:hover,
.zd-refresh-inline-btn:focus {
    border: 0 !important;
    outline: none;
    box-shadow: none !important;
    background: rgba(15, 81, 50, 0.08) !important;
    color: #0a3622 !important;
}

.zd-refresh-inline-btn:active {
    transform: scale(0.92);
}

.zd-refresh-inline-btn svg {
    display: block;
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
}

/* Toast container */
.zd-toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Toast base */
.zd-toast {
    min-width: 260px;
    max-width: 360px;
    padding: 14px 16px;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.4;
    color: #fff;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
    opacity: 0;
    transform: translateY(-10px);
    animation: zd-toast-in 0.25s ease forwards;
}

/* Toast types */
.zd-toast-success {
    background: #1f9d55;
}

.zd-toast-error {
    background: #d92d20;
}

.zd-toast-service {
    background: #b54708;
}

/* Exit animation */
.zd-toast.hide {
    animation: zd-toast-out 0.25s ease forwards;
}

@keyframes zd-toast-in {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes zd-toast-out {
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

@media (max-width: 900px) {
    .zd-toolbar {
        gap: 18px;
    }

    .zd-search-wrap,
    .zd-filter-group {
        flex: 1 1 100%;
        max-width: none;
        width: 100%;
    }

    .zd-table {
        min-width: 920px;
    }

    .zd-detail-grid {
        grid-template-columns: 1fr;
    }

    .zd-detail-title {
        font-size: 28px;
    }

    .zd-detail-sidebar {
        position: static;
    }

    .zd-toast-container {
        right: 12px;
        left: 12px;
        top: 12px;
    }

    .zd-toast {
        min-width: 0;
        max-width: none;
    }
}
.zd-file-upload {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.zd-file-input {
    display: none !important;
}

.zd-file-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    padding: 0 16px;
    border-radius: 4px;
    border: 1px solid #0f5132 !important;
    background: #0f5132 !important;
    color: #fff !important;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
    box-shadow: none !important;
    text-decoration: none !important;
    appearance: none;
    -webkit-appearance: none;
}

    .zd-file-btn:hover,
    .zd-file-btn:focus {
        background: #0a3622 !important;
        color: #fff !important;
        border-color: #0a3622 !important;
        box-shadow: none !important;
        outline: none !important;
    }

.zd-file-label {
    font-size: 13px;
    color: #6b7280 !important;
}

.zd-file-chip-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.zd-file-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
    padding: 6px 10px;
    border-radius: 999px;
    background: #f3f4f6;
    color: #2f3941;
    font-size: 13px;
    line-height: 1;
}

.zd-file-chip-icon {
    font-size: 11px;
    font-weight: 700;
    color: #68737d;
    letter-spacing: 0.02em;
    flex: 0 0 auto;
}

.zd-file-chip-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 240px;
}

.zd-file-chip-remove {
    border: 0 !important;
    background: transparent !important;
    color: #68737d !important;
    cursor: pointer;
    padding: 0 !important;
    margin: 0 !important;
    font-size: 16px;
    line-height: 1;
    box-shadow: none !important;
    appearance: none;
    -webkit-appearance: none;
}

    .zd-file-chip-remove:hover,
    .zd-file-chip-remove:focus {
        color: #2f3941 !important;
        outline: none !important;
        box-shadow: none !important;
    }
.zd-file-chip-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border: 0 !important;
    background: transparent !important;
    color: #68737d !important;
    cursor: pointer;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    appearance: none;
    -webkit-appearance: none;
    line-height: 1;
}

    .zd-file-chip-remove:hover,
    .zd-file-chip-remove:focus {
        color: #2f3941 !important;
        outline: none !important;
        box-shadow: none !important;
    }

    .zd-file-chip-remove svg {
        display: block;
        width: 12px;
        height: 12px;
    }
@keyframes zd-spin {
    to {
        transform: rotate(360deg);
    }
}

.zd-refresh-inline-btn.loading svg {
    animation: zd-spin 0.8s linear infinite;
}

.zd-loading {
    opacity: 0.5;
    pointer-events: none;
    transition: opacity 0.2s ease;
}