/* Admin Single Ticket */
.nexlifydesk-admin-single-ticket-ui {
    margin: 20px -20px 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f8f9fa;
}

.nexlifydesk-admin-single-ticket-ui .ticket-container {
    display: grid;
    grid-template-columns: 240px 1fr 280px;
    gap: 20px;
    padding: 20px;
    max-width: 100%;
    overflow-x: auto;
    min-width: 0;
}

.nexlifydesk-admin-single-ticket-ui .sidebar-left,
.nexlifydesk-admin-single-ticket-ui .sidebar-right {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.nexlifydesk-admin-single-ticket-ui .sidebar-block {
    background-color: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
}

.nexlifydesk-admin-single-ticket-ui .sidebar-block label,
.nexlifydesk-admin-single-ticket-ui .sidebar-block h3 {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin: 0 0 8px 0;
}

.nexlifydesk-admin-single-ticket-ui .sidebar-block select,
.nexlifydesk-admin-single-ticket-ui .sidebar-block input {
    width: 100%;
    padding: 8px;
    border-radius: 6px;
    border: 1px solid #d1d5db;
}

.nexlifydesk-admin-single-ticket-ui .sidebar-block p {
    font-size: 14px;
    color: #4b5563;
    margin: 0 0 4px;
}
.nexlifydesk-admin-single-ticket-ui .sidebar-block a {
    font-size: 14px;
    font-weight: 500;
    color: #4f46e5;
    text-decoration: none;
}
.nexlifydesk-admin-single-ticket-ui .sidebar-block a:hover {
    text-decoration: underline;
}

.nexlifydesk-admin-single-ticket-ui .main-content {
    background-color: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-width: 0;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
}

.nexlifydesk-admin-single-ticket-ui .ticket-header h1 {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.nexlifydesk-admin-single-ticket-ui .requester-info p {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
}

.nexlifydesk-admin-single-ticket-ui .response-area .tabs {
    display: flex;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 16px;
}

.nexlifydesk-admin-single-ticket-ui .response-area .tab-link {
    padding: 10px 16px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.nexlifydesk-admin-single-ticket-ui .response-area .tab-link.active {
    color: #4f46e5;
    border-bottom-color: #4f46e5;
}

.nexlifydesk-admin-single-ticket-ui .response-area .tab-content textarea {
    width: 100%;
    min-height: 120px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 12px;
    font-family: inherit;
    font-size: 14px;
}

.nexlifydesk-admin-single-ticket-ui .response-actions {
    margin-top: 12px;
    display: flex;
    gap: 8px;
}

.nexlifydesk-admin-single-ticket-ui .btn {
    padding: 10px 16px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    font-size: 14px;
}
.nexlifydesk-admin-single-ticket-ui .btn-primary {
    background-color: #4f46e5;
    color: #fff;
}
.nexlifydesk-admin-single-ticket-ui .btn-secondary {
    background-color: #fff;
    color: #374151;
    border-color: #d1d5db;
}

.nexlifydesk-admin-single-ticket-ui .conversation-history {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.nexlifydesk-admin-single-ticket-ui .message {
    display: flex;
    gap: 12px;
}

.nexlifydesk-admin-single-ticket-ui .message-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.nexlifydesk-admin-single-ticket-ui .message-content {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px;
    width: 100%;
    min-width: 0;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
}
.nexlifydesk-admin-single-ticket-ui .agent-message .message-content {
    background-color: #dce6ff;
}

.nexlifydesk-admin-single-ticket-ui .message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 14px;
}
.nexlifydesk-admin-single-ticket-ui .message-header strong {
    color: #111827;
}
.nexlifydesk-admin-single-ticket-ui .message-header .timestamp {
    color: #6b7280;
    font-size: 12px;
}

.nexlifydesk-admin-single-ticket-ui .message-content p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: #374151;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
}

.nexlifydesk-admin-single-ticket-ui .attachments-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 14px;
}
.nexlifydesk-admin-single-ticket-ui .attachments-list li a {
    color: #4f46e5;
    text-decoration: none;
    word-break: break-all;
    overflow-wrap: break-word;
    word-wrap: break-word;
}
.nexlifydesk-admin-single-ticket-ui .message .attachments {
    margin-top: 12px;
    border-top: 1px dashed #d1d5db;
    padding-top: 12px;
}

/* Admin Ticket List */
.nexlifydesk-admin-ticket-list-ui {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    max-width: 1440px;
    border-radius: 10px;
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin: 0 auto;
    padding: 20px;
}

.nexlifydesk-admin-ticket-list-ui .header {
    background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.nexlifydesk-admin-ticket-list-ui .header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: white;
}

.nexlifydesk-admin-ticket-list-ui .header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.nexlifydesk-admin-ticket-list-ui .stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.nexlifydesk-admin-ticket-list-ui .stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    text-align: center;
}

.nexlifydesk-admin-ticket-list-ui .stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
}

.nexlifydesk-admin-ticket-list-ui .stat-label {
    color: #64748b;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.nexlifydesk-admin-ticket-list-ui .controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.nexlifydesk-admin-ticket-list-ui .search-bar {
    flex: 1;
    min-width: 300px;
    position: relative;
}

.nexlifydesk-admin-ticket-list-ui .search-bar input {
    width: 100%;
    padding: 12px 16px 12px 45px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.nexlifydesk-admin-ticket-list-ui .search-bar input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.nexlifydesk-admin-ticket-list-ui .search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}

.nexlifydesk-admin-ticket-list-ui .filter-dropdown {
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nexlifydesk-admin-ticket-list-ui .filter-dropdown:hover {
    border-color: #667eea;
}

.nexlifydesk-admin-ticket-list-ui .new-ticket-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

.nexlifydesk-admin-ticket-list-ui .new-ticket-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.3);
}

.nexlifydesk-admin-ticket-list-ui .bulk-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-right: auto;
}

.nexlifydesk-admin-ticket-list-ui .bulk-action-dropdown {
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: white;
    font-size: 14px;
}

.nexlifydesk-admin-ticket-list-ui .ticket-list {
    background: white;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    min-width: auto;
    overflow-x: auto;
}

.nexlifydesk-admin-ticket-list-ui .ticket-list-header {
    display: grid;
    grid-template-columns: 40px 2.5fr 1.8fr 85px 85px 130px 120px 120px;
    gap: 12px;
    padding: 12px 16px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.nexlifydesk-admin-ticket-list-ui .ticket-list-header > div {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    min-width: 0;
}

.nexlifydesk-admin-ticket-list-ui .ticket-row {
    display: grid;
    grid-template-columns: 40px 2.5fr 1.8fr 85px 85px 130px 120px 120px;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid #f1f5f9;
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.nexlifydesk-admin-ticket-list-ui .ticket-row.unread {
    background-color: #f8fafc;
    border-left: 4px solid #3b82f6;
}

@media (max-width: 1200px) {
    .nexlifydesk-admin-ticket-list-ui .ticket-list-header,
    .nexlifydesk-admin-ticket-list-ui .ticket-row {
        grid-template-columns: 40px 3fr 1.5fr 80px 80px 110px 110px 110px;
        gap: 8px;
    }
}

@media (max-width: 992px) {
    .nexlifydesk-admin-ticket-list-ui .ticket-list-header,
    .nexlifydesk-admin-ticket-list-ui .ticket-row {
        grid-template-columns: 40px 4fr 2fr 70px 70px 90px 100px 100px;
        gap: 6px;
    }
}

@media (max-width: 768px) {
    .nexlifydesk-admin-ticket-list-ui .ticket-list {
        min-width: 800px;
    }
    
    .nexlifydesk-admin-ticket-list-ui .ticket-list-header,
    .nexlifydesk-admin-ticket-list-ui .ticket-row {
        grid-template-columns: 30px 3fr 1.5fr 60px 60px 80px 90px 90px;
        gap: 4px;
        padding: 12px 8px;
        font-size: 11px;
    }
    
    .nexlifydesk-admin-ticket-list-ui .ticket-list-header {
        font-size: 10px;
    }
    
    .nexlifydesk-admin-ticket-list-ui .date-time {
        font-size: 10px;
    }
    
    .nexlifydesk-admin-ticket-list-ui .time-ago {
        font-size: 9px;
    }
}

.nexlifydesk-admin-ticket-list-ui .ticket-row:hover {
    background-color: #f8fafc;
}

.nexlifydesk-admin-ticket-list-ui .ticket-row:last-child {
    border-bottom: none;
}

.nexlifydesk-admin-ticket-list-ui .row-checkbox,
.nexlifydesk-admin-ticket-list-ui .header-checkbox {
    display: flex;
    align-items: center;
    justify-content: center;
}

.nexlifydesk-admin-ticket-list-ui .row-subject {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.nexlifydesk-admin-ticket-list-ui .ticket-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.nexlifydesk-admin-ticket-list-ui .ticket-id {
    font-size: 12px;
    color: #667eea;
    font-weight: 600;
    flex-shrink: 0;
}

.nexlifydesk-admin-ticket-list-ui .ticket-title {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.nexlifydesk-admin-ticket-list-ui .ticket-title.unread-title {
    font-weight: 700;
    color: #1e40af;
}

.nexlifydesk-admin-ticket-list-ui .unread-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: #3b82f6;
    border-radius: 50%;
    margin-right: 8px;
    flex-shrink: 0;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        opacity: 1;
    }
}

.nexlifydesk-admin-ticket-list-ui .ticket-preview {
    font-size: 12px;
    color: #64748b;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nexlifydesk-admin-ticket-list-ui .row-customer {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.nexlifydesk-admin-ticket-list-ui .customer-name {
    font-size: 14px;
    font-weight: 500;
    color: #1e293b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nexlifydesk-admin-ticket-list-ui .customer-email {
    font-size: 12px;
    color: #64748b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nexlifydesk-admin-ticket-list-ui .status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-block;
}

.nexlifydesk-admin-ticket-list-ui .status-open {
    background: #dbeafe;
    color: #1e40af;
}

.nexlifydesk-admin-ticket-list-ui .status-in_progress,
.nexlifydesk-admin-ticket-list-ui .status-in-progress {
    background: #fef3c7;
    color: #92400e;
}

.nexlifydesk-admin-ticket-list-ui .status-resolved {
    background: #d1fae5;
    color: #065f46;
}

.nexlifydesk-admin-ticket-list-ui .status-closed {
    background: #f3f4f6;
    color: #374151;
}

.nexlifydesk-admin-ticket-list-ui .priority-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-block;
}

.nexlifydesk-admin-ticket-list-ui .priority-high {
    background: #fee2e2;
    color: #dc2626;
}

.nexlifydesk-admin-ticket-list-ui .priority-medium {
    background: #fef3c7;
    color: #d97706;
}

.nexlifydesk-admin-ticket-list-ui .priority-low {
    background: #f0f9ff;
    color: #0369a1;
}

.nexlifydesk-admin-ticket-list-ui .assignee-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nexlifydesk-admin-ticket-list-ui .assignee-info .avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 10px;
    font-weight: 600;
}

.nexlifydesk-admin-ticket-list-ui .assignee-info span {
    font-size: 12px;
    color: #1e293b;
}

.nexlifydesk-admin-ticket-list-ui .unassigned {
    font-size: 12px;
    color: #94a3b8;
    font-style: italic;
}

.nexlifydesk-admin-ticket-list-ui .row-date,
.nexlifydesk-admin-ticket-list-ui .row-created,
.nexlifydesk-admin-ticket-list-ui .row-updated {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
}

.nexlifydesk-admin-ticket-list-ui .date-time {
    font-size: 12px;
    color: #1e293b;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nexlifydesk-admin-ticket-list-ui .time-ago {
    font-size: 11px;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nexlifydesk-admin-ticket-list-ui .no-tickets {
    text-align: center;
    padding: 2rem;
    font-size: 16px;
    color: #64748b;
}

.nexlifydesk-admin-ticket-list-ui .loading-tickets {
    text-align: center;
    padding: 2rem;
    font-size: 16px;
    color: #64748b;
}

.nexlifydesk-admin-ticket-list-ui .loading-tickets .spinner {
    float: none;
    margin-right: 10px;
}

/* Real-time updates - smooth transitions */
.nexlifydesk-admin-ticket-list-ui .ticket-row {
    transition: all 0.3s ease;
}

.nexlifydesk-admin-ticket-list-ui .ticket-row.updating {
    opacity: 0.7;
}

.nexlifydesk-admin-ticket-list-ui .ticket-row.new-reply {
    animation: highlight 3s ease-out;
}

@keyframes highlight {
    0% {
        background-color: #dbeafe;
        border-left-color: #3b82f6;
    }
    100% {
        background-color: inherit;
        border-left-color: inherit;
    }
}

/* Bulk action modals */
.bulk-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.bulk-modal .modal-content {
    background: white;
    padding: 24px;
    border-radius: 8px;
    min-width: 400px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.bulk-modal h3 {
    margin: 0 0 16px 0;
    font-size: 18px;
    color: #1e293b;
}

.bulk-modal select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    margin-bottom: 16px;
}

.bulk-modal .modal-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

/* Delete modal specific styles */
.bulk-modal .selected-tickets-info {
    background-color: #f8f9fa;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
    color: #555;
    margin: 12px 0;
}

.bulk-modal .delete-option {
    color: #d63638;
}

@media (max-width: 768px) {
    .nexlifydesk-admin-ticket-list-ui .header {
        padding: 1.5rem;
    }

    .nexlifydesk-admin-ticket-list-ui .header h1 {
        font-size: 2rem;
    }

    .nexlifydesk-admin-ticket-list-ui .controls {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .nexlifydesk-admin-ticket-list-ui .bulk-actions {
        order: 2;
    }

    .nexlifydesk-admin-ticket-list-ui .search-bar {
        min-width: unset;
        order: 1;
    }

    .nexlifydesk-admin-ticket-list-ui .ticket-list-header {
        display: none;
    }

    .nexlifydesk-admin-ticket-list-ui .ticket-row {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 12px;
    }

    .nexlifydesk-admin-ticket-list-ui .row-checkbox {
        position: absolute;
        top: 12px;
        right: 12px;
    }

    .nexlifydesk-admin-ticket-list-ui .stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .bulk-modal .modal-content {
        min-width: 90vw;
        margin: 20px;
    }
}
@media (max-width: 1200px) {
    .nexlifydesk-admin-single-ticket-ui .ticket-container {
        grid-template-columns: 240px 1fr;
    }
    .nexlifydesk-admin-single-ticket-ui .sidebar-right {
        grid-column: 1 / -1;
        flex-direction: row;
        flex-wrap: wrap;
    }
    .nexlifydesk-admin-single-ticket-ui .sidebar-right .sidebar-block {
        flex: 1 1 200px;
    }
}
@media (max-width: 782px) {
    .nexlifydesk-admin-single-ticket-ui .ticket-container {
        grid-template-columns: 1fr;
    }
}

/* NexlifyDesk Reports Page */
.nexlifydesk-reports-page-ui {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    max-width: 1200px;
    margin: 20px auto;
    color: #1e293b;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.nexlifydesk-reports-page-ui .reports-header {
    background: linear-gradient(135deg, #d9d7ff 0%, #dfb9ff 100%);
    padding: 24px 32px;
    display: flex;
    align-items: center;
    color: black;
    margin-bottom: 24px;
}

.nexlifydesk-reports-page-ui .reports-header img {
    height: 48px;
    width: auto;
    margin-right: 16px;
}

.nexlifydesk-reports-page-ui .reports-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: black;
    margin: 0;
    line-height: 1.2;
}

.nexlifydesk-reports-page-ui .reports-header p {
    margin: 4px 0 0;
    opacity: 0.9;
    font-size: 14px;
}

.nexlifydesk-reports-page-ui .reports-container {
    padding: 0 24px 24px;
}

.nexlifydesk-reports-page-ui .date-filter {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
}

.nexlifydesk-reports-page-ui .date-filter select {
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background-color: #fff;
    font-size: 14px;
    color: #475569;
    cursor: pointer;
}

.nexlifydesk-reports-page-ui .metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.nexlifydesk-reports-page-ui .metric-card {
    background-color: white;
    border-radius: 12px;
    padding: 24px;
    position: relative;
    display: flex;
    flex-direction: column;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
}

.nexlifydesk-reports-page-ui .metric-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
}

.nexlifydesk-reports-page-ui .metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

.nexlifydesk-reports-page-ui .metric-card:nth-child(1)::before {
    background-color: #4f46e5; /* Indigo */
}

.nexlifydesk-reports-page-ui .metric-card:nth-child(2)::before {
    background-color: #0ea5e9; /* Sky */
}

.nexlifydesk-reports-page-ui .metric-card:nth-child(3)::before {
    background-color: #10b981; /* Emerald */
}

.nexlifydesk-reports-page-ui .metric-card:nth-child(4)::before {
    background-color: #f59e0b; /* Amber */
}

.nexlifydesk-reports-page-ui .metric-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.nexlifydesk-reports-page-ui .metric-card:nth-child(1) .metric-icon {
    background-color: rgba(79, 70, 229, 0.1);
    color: #4f46e5;
}

.nexlifydesk-reports-page-ui .metric-card:nth-child(2) .metric-icon {
    background-color: rgba(14, 165, 233, 0.1);
    color: #0ea5e9;
}

.nexlifydesk-reports-page-ui .metric-card:nth-child(3) .metric-icon {
    background-color: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.nexlifydesk-reports-page-ui .metric-card:nth-child(4) .metric-icon {
    background-color: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.nexlifydesk-reports-page-ui .metric-label {
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
    margin-bottom: 8px;
}

.nexlifydesk-reports-page-ui .metric-value {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 4px;
}

.nexlifydesk-reports-page-ui .metric-trend {
    font-size: 13px;
}

.nexlifydesk-reports-page-ui .trend-up {
    color: #10b981;
}

.nexlifydesk-reports-page-ui .trend-down {
    color: #ef4444;
}

.nexlifydesk-reports-page-ui .charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.nexlifydesk-reports-page-ui .charts-grid .full-width {
    grid-column: 1 / -1;
}

.nexlifydesk-reports-page-ui .chart-container {
    background-color: white;
    border-radius: 12px;
    padding: 24px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
}

.nexlifydesk-reports-page-ui .chart-container h3 {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 16px 0;
    padding-bottom: 12px;
    border-bottom: 1px solid #f1f5f9;
}

.nexlifydesk-reports-page-ui .chart-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nexlifydesk-reports-page-ui .chart-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 16px;
}

.nexlifydesk-reports-page-ui .legend-item {
    display: flex;
    align-items: center;
    font-size: 13px;
    color: #475569;
}

.nexlifydesk-reports-page-ui .legend-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    margin-right: 6px;
}

.nexlifydesk-reports-page-ui .legend-color.status-open {
    background-color: #4f46e5;
}

.nexlifydesk-reports-page-ui .legend-color.status-pending {
    background-color: #f59e0b;
}

.nexlifydesk-reports-page-ui .legend-color.status-closed {
    background-color: #94a3b8;
}

.nexlifydesk-reports-page-ui .legend-color.status-resolved {
    background-color: #10b981;
}

.nexlifydesk-reports-page-ui .legend-color.status-in_progress {
    background-color: #0ea5e9;
}

.nexlifydesk-reports-page-ui .legend-color.priority-low {
    background-color: #60a5fa;
}

.nexlifydesk-reports-page-ui .legend-color.priority-medium {
    background-color: #f59e0b;
}

.nexlifydesk-reports-page-ui .legend-color.priority-high {
    background-color: #ef4444;
}

.nexlifydesk-reports-page-ui .legend-color.priority-urgent {
    background-color: #dc2626;
}

.nexlifydesk-reports-page-ui .agent-performance {
    background-color: white;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
}

.nexlifydesk-reports-page-ui .agent-performance h3 {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 16px 0;
    padding-bottom: 12px;
    border-bottom: 1px solid #f1f5f9;
}

.nexlifydesk-reports-page-ui .agent-performance table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.nexlifydesk-reports-page-ui .agent-performance th {
    text-align: left;
    padding: 12px;
    font-weight: 600;
    color: #64748b;
    border-bottom: 2px solid #f1f5f9;
}

.nexlifydesk-reports-page-ui .agent-performance td {
    padding: 12px;
    border-bottom: 1px solid #f1f5f9;
    color: #475569;
}

.nexlifydesk-reports-page-ui .agent-performance tr:hover td {
    background-color: #f8fafc;
}

.nexlifydesk-reports-page-ui .agent-name {
    font-weight: 500;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nexlifydesk-reports-page-ui .agent-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
}

.nexlifydesk-reports-page-ui .response-rate {
    display: flex;
    align-items: center;
}

.nexlifydesk-reports-page-ui .rate-bar {
    width: 100px;
    height: 8px;
    background-color: #e2e8f0;
    border-radius: 4px;
    margin-right: 8px;
    overflow: hidden;
}

.nexlifydesk-reports-page-ui .rate-fill {
    height: 100%;
    background-color: #4f46e5;
    border-radius: 4px;
}

.nexlifydesk-reports-page-ui .recent-activity {
    background-color: white;
    border-radius: 12px;
    padding: 24px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
}

.nexlifydesk-reports-page-ui .recent-activity h3 {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 16px 0;
    padding-bottom: 12px;
    border-bottom: 1px solid #f1f5f9;
}

.nexlifydesk-reports-page-ui .activity-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.nexlifydesk-reports-page-ui .activity-item {
    display: flex;
    align-items: flex-start;
    padding: 12px;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.nexlifydesk-reports-page-ui .activity-item:hover {
    background-color: #f8fafc;
}

.nexlifydesk-reports-page-ui .activity-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.nexlifydesk-reports-page-ui .activity-icon.status-new {
    background-color: rgba(79, 70, 229, 0.1);
    color: #4f46e5;
}

.nexlifydesk-reports-page-ui .activity-icon.status-reply {
    background-color: rgba(14, 165, 233, 0.1);
    color: #0ea5e9;
}

.nexlifydesk-reports-page-ui .activity-content {
    flex: 1;
}

.nexlifydesk-reports-page-ui .activity-text {
    font-size: 14px;
    margin-bottom: 4px;
    color: #1e293b;
}

.nexlifydesk-reports-page-ui .activity-time {
    font-size: 12px;
    color: #94a3b8;
}

@media (max-width: 992px) {
    .nexlifydesk-reports-page-ui .metrics-grid,
    .nexlifydesk-reports-page-ui .charts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nexlifydesk-reports-page-ui .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .nexlifydesk-reports-page-ui .charts-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .nexlifydesk-reports-page-ui .metrics-grid {
        grid-template-columns: 1fr;
    }
    .nexlifydesk-reports-page-ui .reports-header {
        flex-direction: column;
        text-align: center;
    }
    .nexlifydesk-reports-page-ui .reports-header img {
        margin-right: 0;
        margin-bottom: 12px;
    }
}

/* Encryption Key Instructions Styling */
.nexlifydesk-encryption-key-instructions {
    background: #f8f9fa;
    border: 1px solid #e1e5e9;
    border-radius: 5px;
    padding: 20px;
    margin: 20px 0;
}

.nexlifydesk-encryption-key-instructions h3 {
    margin-top: 0;
    color: #2c3e50;
}

.nexlifydesk-encryption-key-instructions h4 {
    color: #34495e;
    margin-top: 20px;
    margin-bottom: 10px;
}

.nexlifydesk-key-generation {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 3px;
    padding: 15px;
    margin: 15px 0;
}

.nexlifydesk-key-installation {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 3px;
    padding: 15px;
    margin: 15px 0;
}

.nexlifydesk-key-status {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 3px;
    padding: 15px;
    margin: 15px 0;
}

.nexlifydesk-key-status p {
    margin: 5px 0;
}

.nexlifydesk-key-status .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    margin-right: 5px;
}

#encryption-key-output {
    background: #f9f9f9;
    border: 1px solid #ccc;
    border-radius: 3px;
    padding: 10px;
    font-family: Consolas, Monaco, monospace;
    font-size: 12px;
    resize: vertical;
}

/* Internal Notes */
.nexlifydesk-admin-single-ticket-ui .message.internal-note {
    background-color: #ffffff !important;
    border-left: 4px solid #4f46e5 !important;
    border-radius: 10px;
    position: relative;
}

.nexlifydesk-admin-single-ticket-ui .message.internal-note::before {
    display: inline-block;
    color: black;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 3px;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nexlifydesk-admin-single-ticket-ui .message.internal-note .message-content {
    padding-top: 8px;
}

.nexlifydesk-admin-single-ticket-ui .message.internal-note .message-header strong {
    color: #92400e;
}

.nexlifydesk-admin-single-ticket-ui .internal-note-label {
    display: inline-block;  
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nexlifydesk-admin-single-ticket-ui .message.internal-note {
    margin-bottom: 16px;
}

/* IMAP Authentication Spam Protection */
.nexlifydesk-spam-protection {
    border-top: 1px solid #ccd0d4;
    padding-top: 20px;
    margin-top: 20px;
}

.nexlifydesk-spam-protection h3 {
    color: #23282d;
    margin-bottom: 15px;
}

.nexlifydesk-spam-protection .form-table th {
    width: 200px;
}

.nexlifydesk-spam-protection textarea {
    font-family: 'Courier New', monospace;
    font-size: 12px;
}

.nexlifydesk-spam-protection .description {
    color: #666;
    font-style: italic;
}

/* Category Form Improvements */
.nexlifydesk-form-messages {
    margin: 15px 0;
    padding: 12px 16px;
    border-radius: 4px;
    font-weight: 500;
    display: none;
}

.nexlifydesk-form-messages:not(:empty) {
    display: block;
}

.nexlifydesk-form-messages.success {
    background-color: #d1e7dd;
    border: 1px solid #badbcc;
    color: #0f5132;
}

.nexlifydesk-form-messages.error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.nexlifydesk-form-messages.notice {
    background-color: #fff3cd;
    border: 1px solid #ffecb5;
    color: #664d03;
}

/* Loading state for forms */
.nexlifydesk-form-loading {
    opacity: 0.7;
    pointer-events: none;
    position: relative;
}

.nexlifydesk-form-loading::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.8);
    z-index: 1;
}

.nexlifydesk-form-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #ccc;
    border-top-color: #0073aa;
    border-radius: 50%;
    animation: nexlifydesk-spin 1s linear infinite;
    z-index: 2;
}

@keyframes nexlifydesk-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Category form specific improvements */
#nexlifydesk-category-form {
    background-color: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
}

#nexlifydesk-category-form .form-table th {
    width: 200px;
    padding: 15px 10px 15px 0;
}

#nexlifydesk-category-form .form-table td {
    padding: 15px 10px;
}

#nexlifydesk-category-form input[type="text"],
#nexlifydesk-category-form textarea {
    width: 100%;
    max-width: 500px;
}

#nexlifydesk-category-form input[type="text"]:disabled,
#nexlifydesk-category-form textarea:disabled {
    background-color: #f7f7f7;
    cursor: not-allowed;
}

/* Category Button */
.page-title-action {
    text-decoration: none !important;
}

/* Category Management Table */
.wp-list-table .column-actions {
    width: 150px;
}

.wp-list-table .delete-category {
    color: #d63638;
}

.wp-list-table .delete-category:hover {
    color: #d63638;
    text-decoration: underline;
}

