/**
 * Changeloger Admin Global Styles
 *
 * This file contains all shared CSS styles for admin pages.
 * It should be loaded on: Releases, Feedback, Settings, and other admin pages.
 */

/* ===============================================
   CSS Variables (Design Tokens)
   =============================================== */
:root {
    /* Brand Colors */
    --cha-primary: #6366f1;
    --cha-primary-dark: #3d46d4;
    --cha-primary-light: #6b77fb;
    --cha-primary-lighter: #8b94fc;
    --cha-secondary: #f0f2ff;

    /* Status Colors */
    --cha-success: #10b981;
    --cha-success-light: #d1fae5;
    --cha-warning: #f59e0b;
    --cha-warning-light: #fef3c7;
    --cha-error: #ef4444;
    --cha-error-light: #fee2e2;
    --cha-info: #3b82f6;
    --cha-info-light: #dbeafe;

    /* Text Colors */
    --cha-text-primary: #1a1a2e;
    --cha-text-secondary: #64748b;
    --cha-text-muted: #94a3b8;

    /* Border & Background */
    --cha-border: #e2e8f0;
    --cha-border-light: #f1f5f9;
    --cha-bg-light: #f8fafc;
    --cha-white: #ffffff;

    /* Sizing */
    --cha-radius: 12px;
    --cha-radius-sm: 8px;
    --cha-radius-xs: 6px;
    --cha-radius-lg: 16px;

    /* Shadows */
    --cha-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    --cha-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --cha-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);

    /* Transitions */
    --cha-transition: 0.2s ease;
}

/* import utilities */
@import url('_utilities.css');

/* Main Container */
.cha-page-wrap {
	padding: 40px 40px 40px 20px;
    margin: 0;
    max-width: 100%;
	* {
		box-sizing: border-box;
	}
}

#wpfooter{
    display: none;
}
/* ===============================================
   Form Inputs - Centralized Styles
   =============================================== */

/* Select inputs */
.wp-core-ui .cha-select {
    padding: 6.5px 14px;
    line-height: 28px;
    border: 1px solid var(--cha-border);
    border-radius: var(--cha-radius-sm);
    background: var(--cha-white);
    font-size: 14px;
    color: var(--cha-text-primary);
    cursor: pointer;
    transition: border-color var(--cha-transition), box-shadow var(--cha-transition);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    padding-right: 36px;
}

.wp-core-ui .cha-select:hover {
    border-color: var(--cha-primary-light);
}

.wp-core-ui .cha-select:focus {
    outline: none;
    border-color: var(--cha-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}


/* ===============================================
   Page Header Component
   =============================================== */
.cha-page-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 28px;
	padding-bottom: 24px;
	border-bottom: 1px solid var(--cha-border);

	.cha-page-header-left {
		display: flex;
		align-items: center;
		gap: 16px;
	}

	.cha-page-header-icon {
		width: 56px;
		height: 56px;
		border-radius: var(--cha-radius);
		background: linear-gradient(135deg, var(--cha-primary) 0%, var(--cha-primary-light) 100%);
		color: #fff;
		display: flex;
		align-items: center;
		justify-content: center;
		box-shadow: 0 4px 14px rgba(99, 102, 241, 0.25);
		flex-shrink: 0;

		svg {
			width: 28px;
			height: 28px;
		}
	}

	.cha-page-header-content {
		display: flex;
		flex-direction: column;
		gap: 5px;

		h1 {
			font-size: 24px;
			font-weight: 700;
			color: var(--cha-text-primary);
			margin: 0;
			padding: 0;
			line-height: 1.2;

			.version {
				font-size: 12px;
				font-weight: 500;
				color: var(--cha-text-secondary);
				background: var(--cha-bg-light);
				padding: 4px 10px;
				border-radius: 12px;
				margin-left: 12px;
				vertical-align: middle;
			}
		}
	}

	.cha-page-header-subtitle {
		margin: 0;
		font-size: 14px;
		color: var(--cha-text-secondary);
		line-height: 1.4;
	}

	.cha-page-header-right {
		display: flex;
		align-items: center;
		gap: 8px;
		flex-shrink: 0;

		.cha-btn-lg {
			padding: 12px 24px;
			font-size: 15px;
			font-weight: 600;
			border-radius: var(--cha-radius-sm);
			box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25);
			transition: all 0.2s ease;

			&:hover {
				transform: translateY(-1px);
				box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
			}
		}
	}

	@media (max-width: 768px) {
		flex-direction: column;
		align-items: flex-start;
		gap: 16px;
	}
}

/* Text inputs */
.cha-input {
    padding: 10px 14px;
    border: 1px solid var(--cha-border);
    border-radius: var(--cha-radius-sm);
    background: var(--cha-white);
    font-size: 14px;
    color: var(--cha-text-primary);
    transition: border-color var(--cha-transition), box-shadow var(--cha-transition);
    width: 100%;
    box-sizing: border-box;
}

.cha-input:hover {
    border-color: var(--cha-primary-light);
}

.cha-input:focus {
    outline: none;
    border-color: var(--cha-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.cha-input::placeholder {
    color: var(--cha-text-muted);
}

/* Textarea */
.cha-textarea {
    padding: 10px 14px;
    border: 1px solid var(--cha-border);
    border-radius: var(--cha-radius-sm);
    background: var(--cha-white);
    font-size: 14px;
    color: var(--cha-text-primary);
    transition: border-color var(--cha-transition), box-shadow var(--cha-transition);
    width: 100%;
    min-height: 100px;
    resize: vertical;
    font-family: inherit;
    box-sizing: border-box;
}

.cha-textarea:hover {
    border-color: var(--cha-primary-light);
}

.cha-textarea:focus {
    outline: none;
    border-color: var(--cha-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.cha-textarea::placeholder {
    color: var(--cha-text-muted);
}

/* ===============================================
   Form Groups & Form Rows
   =============================================== */

.cha-form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 16px;
}

/* Form row - grid layout for side-by-side form elements */
.cha-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

.cha-form-row.full {
    grid-template-columns: 1fr;
}

.cha-form-row.three-col {
    grid-template-columns: repeat(3, 1fr);
}

/* Nested form groups inside form-group or form-row */
.cha-form-group > .cha-form-group {
    margin-bottom: 0;
}

.cha-form-row > .cha-form-group {
    margin-bottom: 0;
}

/* Form labels */
.cha-form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--cha-text-primary);
}

.cha-form-group label .required {
    color: var(--cha-error);
}

.cha-form-group .description {
    margin-top: 4px;
    font-size: 12px;
    color: var(--cha-text-muted);
}

/* Form inputs, selects, textareas */
.cha-form-group input,
.cha-form-group select,
.cha-form-group textarea {
    padding: 10px 14px;
    border: 1px solid var(--cha-border);
    border-radius: var(--cha-radius-sm);
    font-size: 14px;
    transition: all 0.2s ease;
    background: var(--cha-white);
    width: 100%;
    box-sizing: border-box;
}
.cha-form-group input[type="checkbox"],
.cha-form-group input[type="radio"] {
    width: 16px;
    border-radius: 50%;
}
.cha-form-group select {
    background: #fff url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M5%206l5%205%205-5%202%201-7%207-7-7%202-1z%22%20fill%3D%22%23555%22%2F%3E%3C%2Fsvg%3E') no-repeat right 14px top 55%;
    appearance: none;
    -webkit-appearance: none;
    padding-right: 36px;
}

.cha-form-group input:focus,
.cha-form-group select:focus,
.cha-form-group textarea:focus {
    outline: none;
    border-color: var(--cha-primary);
    box-shadow: 0 0 0 3px rgba(82, 93, 249, 0.1);
}

.cha-form-group textarea {
    min-height: 100px;
    resize: vertical;
}

/* Responsive form rows */
@media (max-width: 700px) {
    .cha-form-row.three-col {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 500px) {
    .cha-form-row {
        grid-template-columns: 1fr;
    }
}


/* ===============================================
   Buttons
   =============================================== */

.cha-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--cha-radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--cha-transition);
    border: none;
    text-decoration: none;
    line-height: 1.4;

    .cha-spinner{
        width: 20px;
        height: 20px;
    }
}

.cha-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.cha-btn svg {
    width: 16px;
    height: 16px;
}

/* Primary Button */
.cha-btn-primary {
    background: var(--cha-primary);
    color: var(--cha-white);
}
.cha-btn-primary:focus {
    color: var(--cha-white);
}

.cha-btn-primary:hover {
    background: var(--cha-primary-light);
    color: var(--cha-white);
}

/* Secondary Button */
.cha-btn-secondary {
    background: var(--cha-white);
    color: var(--cha-text-primary);
    border: 1px solid var(--cha-border);
}

.cha-btn-secondary:hover {
    background: var(--cha-bg-light);
    color: var(--cha-text-primary);
}

/* Danger Button */
.cha-btn-danger {
    background: var(--cha-error);
    color: var(--cha-white);
}

.cha-btn-danger:hover {
    background: #dc2626;
    color: var(--cha-white);
}

/* Success Button */
.cha-btn-success {
    background: var(--cha-success);
    color: var(--cha-white);
}

.cha-btn-success:hover {
    background: #059669;
    color: var(--cha-white);
}

/* Small Button */
.cha-btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

/* Large Button */
.cha-btn-lg {
    padding: 12px 24px;
    font-size: 16px;
}

/* Icon-only Button */
.cha-btn-icon {
    padding: 8px;
    width: 36px;
    height: 36px;
}

/* ===============================================
   Cards & Containers
   =============================================== */

.cha-card {
    background: var(--cha-white);
    border-radius: var(--cha-radius);
    box-shadow: var(--cha-shadow);
    overflow: hidden;
    flex: 1;
}

.cha-card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--cha-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cha-card-header h2,
.cha-card-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--cha-text-primary);
}

.cha-card-body {
    padding: 20px;
}

.cha-card-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--cha-border);
    background: var(--cha-bg-light);
}

/* ===============================================
   Status Badges
   =============================================== */

.cha-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.cha-badge-primary {
    background: var(--cha-secondary);
    color: var(--cha-primary);
}

.cha-badge-success {
    background: var(--cha-success-light);
    color: var(--cha-success);
}

.cha-badge-warning {
    background: var(--cha-warning-light);
    color: var(--cha-warning);
}

.cha-badge-error {
    background: var(--cha-error-light);
    color: var(--cha-error);
}

.cha-badge-info {
    background: var(--cha-info-light);
    color: var(--cha-info);
}

/* ===============================================
   Modal
   =============================================== */

.cha-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    padding: 20px;
}

.cha-modal-overlay.active {
    display: flex;
}

.cha-modal {
    background: var(--cha-white);
    border-radius: var(--cha-radius);
    box-shadow: var(--cha-shadow-lg);
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: cha-modal-in 0.2s ease;
}

.cha-modal.cha-upgrade-bg-modal {
   position: relative;
}

.cha-modal.cha-upgrade-bg-modal .cha-modal-close{
    position: absolute;
    top: 1px;
    right: 1px;
    color: #fff;
}
.cha-modal.cha-upgrade-bg-modal .cha-modal-close:hover{
    background-color: rgba(255, 255, 255, 0.1);
}

/* Upgrade Modal Component */
.cha-upgrade-modal-header {
    background: var(--cha-primary);
    padding: 30px;
    text-align: center;
    border-radius: var(--cha-radius) var(--cha-radius) 0 0;
}

.cha-upgrade-modal-icon {
    width: 54px;
    height: 54px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--cha-radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.cha-upgrade-modal-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    color: var(--cha-white);
}

.cha-upgrade-modal-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    color: var(--cha-white);
    margin-top: 14px;
    text-transform: uppercase;
    font-weight: 600;
}

.cha-upgrade-modal-body {
    padding: 30px;
}

.cha-upgrade-modal-desc {
    font-size: 15px;
    color: var(--cha-text-secondary);
    margin: 0 0 24px;
    line-height: 1.6;
    text-align: center;
}

.cha-upgrade-features {
    background: var(--cha-bg-light);
    border-radius: var(--cha-radius);
    padding: 20px;
    margin-bottom: 24px;
}

.cha-upgrade-features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.cha-upgrade-feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
}

.cha-upgrade-feature-icon {
    width: 40px;
    height: 40px;
    background: #e0e7ff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cha-primary);
}

.cha-upgrade-feature-title {
    margin: 0 0 2px;
    font-size: 13px;
    font-weight: 600;
    color: var(--cha-text-primary);
}

.cha-upgrade-feature-desc {
    margin: 0;
    font-size: 12px;
    color: var(--cha-text-muted);
}

.cha-upgrade-cta-wrap {
    text-align: center;
}

.cha-btn.cha-upgrade-cta {
    padding: 14px 32px;
    font-size: 16px;
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

/* Upgrade Modal Variation Component Classes */
.cha-modal.cha-modal-variation-1 {
    max-width: 480px;
    text-align: center;
}

.cha-modal.cha-modal-variation-2 {
    max-width: 600px;
    text-align: center;
}

.cha-modal-variation-body {
    padding: 40px 30px;
}

.cha-modal-variation-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.cha-modal-variation-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 12px;
    color: #1f2937;
}

.cha-modal-variation-desc {
    font-size: 16px;
    color: #6b7280;
    line-height: 1.5;
}
.cha-modal-variation-1 .cha-modal-variation-desc {
    margin: 0 0 24px;
}
.cha-modal-variation-2 .cha-modal-variation-desc {
    margin: 0 0 32px;
}

/* Call to Action styles */
.cha-btn.cha-modal-cta-main {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    font-size: 16px;
    background: var(--cha-primary);
    border: none;
    border-radius: 10px;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

.cha-btn.cha-modal-cta-full {
    display: flex;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
}

/* Product Limit Grid (Variation 2) */
.cha-modal-options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    text-align: left;
}

.cha-modal-option-card {
    border: 1px solid var(--cha-border);
    border-radius: 12px;
    padding: 24px;
    background: var(--cha-bg-light);
    position: relative;
}

.cha-modal-option-card.primary {
    border: 2px solid var(--cha-primary);
    background: #fff;
}

.cha-modal-option-card.secondary .cha-btn.cha-modal-cta-full {
    background: #fff;
}

.cha-modal-option-badge {
    position: absolute;
    top: -12px;
    right: 20px;
    background: var(--cha-primary);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cha-modal-option-icon {
    width: 48px;
    height: 48px;
    background: #f3f4f6;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    color: var(--cha-text-muted);
}

.cha-modal-option-card.primary .cha-modal-option-icon {
    background: #e0e7ff;
    color: var(--cha-primary);
}

.cha-modal-option-title {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
}

.cha-modal-option-desc {
    margin: 0 0 20px;
    font-size: 14px;
    color: #6b7280;
    line-height: 1.5;
}

/* ===============================================
   AI Parser Upgrade Modal
   =============================================== */

.cha-ai-upgrade-demo {
    background: var(--cha-bg-light);
    border: 1px solid var(--cha-border);
    border-radius: var(--cha-radius);
    overflow: hidden;
    margin-bottom: 24px;
}

.cha-ai-upgrade-demo img {
    width: 100%;
    height: auto;
    display: block;
}

.cha-ai-upgrade-demo-placeholder {
    padding: 40px 20px;
    text-align: center;
    color: var(--cha-text-muted);
    font-size: 13px;
}

.cha-ai-upgrade-demo-placeholder svg {
    display: block;
    margin: 0 auto 10px;
    opacity: 0.4;
}

.cha-ai-how-it-works {
    margin-bottom: 24px;
}

.cha-ai-how-it-works h4 {
    font-size: 13px;
    font-weight: 700;
    color: var(--cha-text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 14px;
}

.cha-ai-steps {
    display: flex;
    gap: 12px;
}

.cha-ai-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    padding: 16px 12px;
    background: var(--cha-bg-light);
    border-radius: var(--cha-radius-sm);
    border: 1px solid var(--cha-border-light);
}

.cha-ai-step-num {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cha-primary);
    color: #fff;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

.cha-ai-step h5 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--cha-text-primary);
}

.cha-ai-step p {
    margin: 0;
    font-size: 12px;
    color: var(--cha-text-muted);
    line-height: 1.4;
}

@keyframes cha-modal-in {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-10px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.cha-modal-sm {
    width: 400px;
}

.cha-modal-md {
    width: 560px;
}

.cha-modal-lg {
    width: 700px;
}

.cha-modal-xl {
    width: 900px;
}

.cha-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--cha-border);
}

.cha-modal-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--cha-text-primary);
}

.cha-modal-close {
    padding: 4px 8px;
    background: transparent;
    border: none;
    margin-left: auto;
    cursor: pointer;
    font-size: 16px;
    color: var(--cha-text-muted);
    border-radius: var(--cha-radius-sm);
    transition: all var(--cha-transition);
}

.cha-modal-close:hover {
    background: var(--cha-bg-light);
    color: var(--cha-text-primary);
}

.cha-modal-close svg {
    width: 20px;
    height: 20px;
}

.cha-modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
    max-height: calc( 90vh - 198px);
}

.cha-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 20px;
    border-top: 1px solid var(--cha-border);
    background: var(--cha-bg-light);
}

/* ===============================================
   Loading & Empty States
   =============================================== */

.cha-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--cha-border);
    border-top-color: var(--cha-primary);
    border-radius: 50%;
    animation: cha-spin 1s linear infinite;
}

.cha-spinner-sm {
    width: 20px;
    height: 20px;
    border-width: 2px;
}

@keyframes cha-spin {
    to {
        transform: rotate(360deg);
    }
}

.cha-loading-state,
.cha-empty-state {
    text-align: center;
    padding: 60px 20px;
}

.cha-loading-state .cha-spinner,
.cha-empty-state svg {
    margin: 0 auto 16px;
}

.cha-empty-state svg {
    width: 64px;
    height: 64px;
    color: var(--cha-text-muted);
}

.cha-empty-state h3,
.cha-loading-state h3 {
    margin: 0 0 8px;
    font-size: 18px;
    color: var(--cha-text-primary);
}

.cha-empty-state p,
.cha-loading-state p {
    margin: 0;
    color: var(--cha-text-secondary);
}

/* ===============================================
   Tables
   =============================================== */

.cha-table {
    width: 100%;
    border-collapse: collapse;
}

.cha-table th,
.cha-table td {
    padding: 14px 24px;
    text-align: left;
    border-bottom: 1px solid var(--cha-border-light);
}

.cha-table th {
    font-size: 12px;
    font-weight: 600;
    color: var(--cha-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--cha-bg-light);
}

.cha-table td {
    font-size: 14px;
    color: var(--cha-text-primary);
}

.cha-table tbody tr:hover td {
    background: var(--cha-bg-light);
}


/* Table Header */
.cha-table-header {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--cha-border);
    flex-wrap: wrap;
    gap: 16px;
}

.cha-table-header h2 {
    font-size: 16px;
    font-weight: 600;
    color: var(--cha-text-primary);
    margin: 0;
}

.cha-table-filters {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ===============================================
   Search Box Component
   =============================================== */

.cha-search-box {
    display: flex;
    align-items: center;
    padding: 5.5px 12px;
    background: var(--cha-bg-light);
    border-radius: var(--cha-radius-sm);
    border: 1px solid var(--cha-border);
    transition: border-color var(--cha-transition), box-shadow var(--cha-transition);
}

.cha-search-box:focus-within {
    border-color: var(--cha-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.cha-search-box svg {
    width: 16px;
    height: 16px;
    color: var(--cha-text-muted);
    flex-shrink: 0;
}

.cha-search-box .cha-input {
    border: none;
    background: none;
    outline: none;
    box-shadow: none;
    font-size: 14px;
    width: 200px;
    color: var(--cha-text-primary);
    min-height: 30px;
}

.cha-search-box .cha-input:focus {
    border: none;
    background: none;
    outline: none;
    box-shadow: none;
}

.cha-search-box .cha-input::placeholder {
    color: var(--cha-text-muted);
}

/* ===============================================
   Action Buttons Component
   =============================================== */

.cha-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 8px;
    background: transparent;
    border: 0;
    border-radius: 0;
    cursor: pointer;
    color: var(--cha-text-secondary);
    transition: all var(--cha-transition);
}

.cha-action-btn:hover {
    background: var(--cha-bg-light);
    color: var(--cha-primary);
    border-color: var(--cha-primary);
}

.cha-action-btn:focus {
    outline: none;
    box-shadow: none;
}

.cha-action-btn svg {
    width: 16px;
    height: 16px;
}

.cha-action-btn.delete:hover {
    color: var(--cha-error);
    border-color: var(--cha-error);
}

/* ===============================================
   Stats Cards Component
   =============================================== */

.cha-stats-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 28px;

    @media (max-width: 1200px) {
        grid-template-columns: repeat(2, 1fr);
    }

    @media (max-width: 600px) {
        grid-template-columns: 1fr;
    }

    .cha-stat-card {
        display: flex;
        align-items: center;
        gap: 18px;
        padding: 24px;
        background: var(--cha-white);
        border: 1px solid var(--cha-border);
        border-radius: var(--cha-radius-lg);
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    }

    .cha-stat-icon {
        width: 52px;
        height: 52px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 14px;
        flex-shrink: 0;

        svg {
            width: 24px;
            height: 24px;
            stroke-width: 2px;
        }

        &.cha-stat-total {
            background: var(--cha-info-light);
            color: var(--cha-info);
        }

        &.cha-stat-review {
            background: var(--cha-warning-light);
            color: var(--cha-warning);
        }

        &.cha-stat-progress {
            background: #fff3cd;
            color: #d97706;
        }

        &.cha-stat-completed {
            background: var(--cha-success-light);
            color: var(--cha-success);
        }

        &.votes {
            background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
            color: #2563eb;
        }

        &.comments {
            background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
            color: #d97706;
        }
    }

    .cha-stat-content {
        display: flex;
        flex-direction: column;
        gap: 6px;
    }

    .cha-stat-number {
        font-size: 28px;
        font-weight: 800;
        color: var(--cha-text-primary);
        line-height: 1;
        letter-spacing: -0.02em;
    }

    .cha-stat-label {
        font-size: 12px;
        font-weight: 600;
        color: var(--cha-text-secondary);
        text-transform: uppercase;
        letter-spacing: 0.05em;
    }
}

/* ===============================================
   Sidebar Component
   =============================================== */

.cha-products-sidebar {
    min-width: 300px;
    flex-shrink: 0;
    background: var(--cha-white);
    border: 1px solid var(--cha-border);
    border-radius: var(--cha-radius);
    box-shadow: var(--cha-shadow);
    overflow: hidden;
    align-self: flex-start;
    position: sticky;
    top: 32px;
}

.cha-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 18px;
    border-bottom: 1px solid var(--cha-border);
    background: var(--cha-bg-light);
}

.cha-sidebar-header h3 {
    font-size: 13px;
    font-weight: 600;
    color: var(--cha-text-primary);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Product/Category Tabs in Sidebar */
.cha-product-tabs {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px;
}

.cha-product-tab {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    width: 100%;
    text-align: left;
    background: transparent;
    border: none;
    border-radius: var(--cha-radius-sm);
    cursor: pointer;
    transition: all 0.15s ease;
    color: var(--cha-text-secondary);
    position: relative;
    font-size: 14px;
    transition: all var(--cha-transition);
    /* Ensure content stacks correctly */
}


.cha-add-product-btn {
	width: 28px;
	height: 28px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--cha-border);
	background: var(--cha-white);
	border-radius: var(--cha-radius-xs);
	cursor: pointer;
	color: var(--cha-text-muted);
	transition: all 0.15s ease;
}

.cha-add-product-btn:hover {
	border-color: var(--cha-primary);
	color: var(--cha-primary);
	background: var(--cha-secondary);
}

.cha-product-tab-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-grow: 1;
    pointer-events: none;
    /* Let clicks pass through to parent button */
}

.cha-product-tab:hover {
    background: var(--cha-border-light);
    color: var(--cha-text-primary);
}

.cha-product-tab.active {
    background: var(--cha-primary);
    color: var(--cha-white);
    box-shadow: var(--cha-shadow);
}

.cha-product-tab.active .tab-count {
    background: rgba(255, 255, 255, 0.2);
    color: var(--cha-white);
}

.cha-product-tab-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
    opacity: 0;
    /* Hidden by default */
    transition: opacity 0.2s ease;
}

.cha-product-tab:hover .cha-product-tab-actions {
    opacity: 1;
    /* Show on hover */
}

.cha-product-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    /* Transparent by default */
    border-radius: 4px;
    cursor: pointer;
    color: currentColor;
    /* Inherit color from tab */
    padding: 0;
    transition: all 0.15s ease;
}

.cha-product-tab.active .cha-product-action-btn {
    color: rgba(255, 255, 255, 0.7);
}

.cha-product-action-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    /* Slight dark bg on hover */
    color: var(--cha-text-primary);
}

.cha-product-tab.active .cha-product-action-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--cha-white);
}

.cha-product-action-btn.delete:hover {
    color: var(--cha-error);
    background: var(--cha-error-light);
}

.cha-product-tab.active .cha-product-action-btn.delete:hover {
    color: #ffcccc;
    /* Lighter red for active tab */
    background: rgba(239, 68, 68, 0.8);
}

/* Ensure tab name truncates if too long */
.cha-product-tab .tab-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 8px;
}


.cha-product-tab-actions {
    pointer-events: auto;
    margin-right: 8px;
}

.cha-product-tab .tab-count {
    font-size: 12px;
    font-weight: 500;
    color: var(--cha-text-muted);
    background: var(--cha-bg-light);
    padding: 2px 8px;
    border-radius: 10px;
    text-align: center;
}



/* ===============================================
   Status Badges Component
   =============================================== */

.cha-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.cha-status-badge.in_review,
.cha-status-badge.in-review {
    background: #9333ea20;
    color: #9333ea;
}

.cha-status-badge.in_progress,
.cha-status-badge.in-progress {
    background: var(--cha-warning-light);
    color: var(--cha-warning);
}

.cha-status-badge.completed {
    background: var(--cha-success-light);
    color: var(--cha-success);
}


.cha-status-badge.planned {
    background: var(--cha-info-light);
    color: var(--cha-info);
}

.cha-status-badge.rejected,
.cha-status-badge.declined {
    background: var(--cha-error-light);
    color: var(--cha-error);
}

/* Category Badge */
.cha-category-badge {
    display: inline-block;
    padding: 4px 10px;
    background: var(--cha-secondary);
    color: var(--cha-primary);
    border-radius: var(--cha-radius-sm);
    font-size: 12px;
    font-weight: 500;
}

/* ===============================================
   Vote Button Component
   =============================================== */

.cha-vote-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 16px;
    background: var(--cha-bg-light);
    border: 1px solid var(--cha-border);
    border-radius: var(--cha-radius-sm);
    cursor: pointer;
    transition: all var(--cha-transition);
    color: var(--cha-text-secondary);
}

.cha-vote-button:hover:not(:disabled) {
    background: var(--cha-secondary);
    border-color: var(--cha-primary);
    color: var(--cha-primary);
}

.cha-vote-button.voted {
    background: var(--cha-primary);
    border-color: var(--cha-primary);
    color: var(--cha-white);
}

.cha-vote-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.cha-vote-button svg {
    width: 20px;
    height: 20px;
}

.cha-vote-count {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    font-weight: 600;
}

/* ===============================================
   Pagination Component
   =============================================== */

.cha-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 16px 20px;
    border-top: 1px solid var(--cha-border-light);
}

.cha-pagination-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cha-pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    background: var(--cha-white);
    border: 1px solid var(--cha-border);
    border-radius: var(--cha-radius-sm);
    font-size: 14px;
    color: var(--cha-text-primary);
    cursor: pointer;
    transition: all var(--cha-transition);
}

.cha-pagination-btn:hover:not(:disabled) {
    background: var(--cha-bg-light);
    border-color: var(--cha-primary-light);
}

.cha-pagination-btn.active {
    background: var(--cha-primary);
    border-color: var(--cha-primary);
    color: var(--cha-white);
}

.cha-pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===============================================
   Avatar Component
   =============================================== */

.cha-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.cha-avatar-sm {
    width: 24px;
    height: 24px;
}

.cha-avatar-lg {
    width: 48px;
    height: 48px;
}

/* ===============================================
   Filter Dropdowns Component
   =============================================== */

.cha-filter-group {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.cha-status-filter,
.cha-category-filter {
    padding: 8px 12px;
    border: 1px solid var(--cha-border);
    border-radius: var(--cha-radius-sm);
    background: var(--cha-white);
    font-size: 14px;
    color: var(--cha-text-primary);
    cursor: pointer;
}

/* ===============================================
   Responsive
   =============================================== */

@media (max-width: 768px) {

    .cha-modal-sm,
    .cha-modal-md,
    .cha-modal-lg,
    .cha-modal-xl {
        width: 95%;
    }

    .cha-modal-footer {
        flex-direction: column;
    }

    .cha-modal-footer .cha-btn {
        width: 100%;
    }
}

/* Empty State */
.cha-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    background: var(--cha-bg);
    border-radius: var(--cha-radius);
    margin: 40px auto;
    max-width: 600px;
}

.cha-empty-state-icon {
    color: var(--cha-text-secondary);
    margin-bottom: 24px;
    opacity: 0.6;
}

.cha-empty-state h3 {
    margin: 0 0 12px 0;
    font-size: 20px;
    color: var(--cha-text-primary);
}

.cha-empty-state p {
    color: var(--cha-text-secondary);
    font-size: 15px;
    line-height: 1.6;
    max-width: 400px;
    margin: 0 auto 32px auto;
}

.cha-empty-state-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.cha-btn-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.cha-btn-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin: -8px 0 0 -8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: cha-spin 0.8s infinite linear;
}

.cha-btn-secondary.cha-btn-loading::after {
    border-color: rgba(0, 0, 0, 0.1);
    border-top-color: var(--cha-text-primary);
}

@keyframes cha-spin {
    to {
        transform: rotate(360deg);
    }
}



.cha-pro-notice.csf-field:not([class*=active-theme])::before {
  content: "Pro";
  background-color: #f1bd6c;
  color: #000;
  padding: 3px 10px;
  border-radius: 3px;
  margin-bottom: 10px;
}
.cha-pro-notice.csf-field:not([class*=active-theme])::after {
  position: absolute;
  content: "";
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background-color: transparent;
  z-index: 2;
}
.cha-pro-notice:not([class*=active-theme]) .csf-title,
.cha-pro-notice:not([class*=active-theme]) .csf-fieldset {
  opacity: 0.5;
  pointer-events: none;
}

.cha-pro-notice.csf-field[class*=active-theme]::before {
  content: "Pro";
  background-color: #f1bd6c;
  color: #000;
  padding: 3px 10px;
  border-radius: 3px;
  margin-bottom: 10px;
}
.cha-pro-notice.csf-field[class*=active-theme]::after {
  position: absolute;
  content: "";
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background-color: transparent;
  z-index: 2;
}
.cha-pro-notice[class*=active-theme] .csf-title,
.cha-pro-notice[class*=active-theme] .csf-fieldset {
  opacity: 0.5;
  pointer-events: none;
}

/* ===============================================
   Embed Modal Styles
   =============================================== */

.cha-embed-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    background: var(--cha-bg-light);
    padding: 4px;
    border-radius: var(--cha-radius-sm);
}

.cha-embed-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    background: transparent;
    border: none;
    border-radius: var(--cha-radius-xs);
    font-size: 13px;
    font-weight: 600;
    color: var(--cha-text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
}

.cha-embed-tab:hover {
    color: var(--cha-text-primary);
}

.cha-embed-tab.active {
    background: var(--cha-white);
    color: var(--cha-primary);
    box-shadow: var(--cha-shadow-sm);
}

.cha-embed-tab svg {
    flex-shrink: 0;
}

.cha-embed-tab-content {
    display: none;
}

.cha-embed-tab-content.active {
    display: block;
}

/* SDK Tab Styles */
.cha-embed-sdk-intro {
    margin: 0 0 16px;
    font-size: 13px;
    color: var(--cha-text-secondary);
    line-height: 1.5;
}

.cha-embed-step {
    margin-bottom: 20px;
}

.cha-step-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--cha-text-primary);
    margin-bottom: 12px;
}

.cha-step-number {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cha-primary);
    color: var(--cha-white);
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
}

.cha-code-block {
    position: relative;
}

.cha-code-block .cha-textarea {
    width: 100%;
    padding: 12px;
    padding-right: 80px;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
    font-size: 12px;
    line-height: 1.5;
    background: var(--cha-bg-light);
    border: 1px solid var(--cha-border);
    border-radius: var(--cha-radius-sm);
    resize: none;
}

.cha-copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: var(--cha-white);
    border: 1px solid var(--cha-border);
    border-radius: var(--cha-radius-xs);
    font-size: 12px;
    font-weight: 500;
    color: var(--cha-text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
}

.cha-copy-btn:hover {
    border-color: var(--cha-primary);
    color: var(--cha-primary);
}

/* SDK Examples */
.cha-sdk-examples {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cha-sdk-example {
    background: var(--cha-bg-light);
    border: 1px solid var(--cha-border);
    border-radius: var(--cha-radius-sm);
    padding: 12px;
}

.cha-sdk-example-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.cha-sdk-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--cha-primary);
    background: var(--cha-secondary);
    padding: 3px 8px;
    border-radius: var(--cha-radius-xs);
}

.cha-sdk-desc {
    font-size: 12px;
    color: var(--cha-text-muted);
}

.cha-sdk-example-code {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 12px;
    background: var(--cha-white);
    border: 1px solid var(--cha-border);
    border-radius: var(--cha-radius-xs);
}

.cha-sdk-example-code code {
    flex: 1;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
    font-size: 12px;
    color: var(--cha-text-primary);
    overflow-x: auto;
    white-space: nowrap;
}

.cha-copy-inline {
    flex-shrink: 0;
    padding: 4px 10px;
    background: var(--cha-secondary);
    border: none;
    border-radius: var(--cha-radius-xs);
    font-size: 11px;
    font-weight: 600;
    color: var(--cha-primary);
    cursor: pointer;
    transition: all 0.15s ease;
}

.cha-copy-inline:hover {
    background: var(--cha-primary);
    color: var(--cha-white);
}

/* ===============================================
   Detail Modal Styles (Feedback/Roadmap Shared)
   =============================================== */

.cha-feedback-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.cha-feedback-header-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.cha-feedback-title-input {
    flex: 1;
    font-size: 18px;
    font-weight: 600;
    padding: 8px 12px;
    border: 1px solid transparent;
    border-radius: var(--cha-radius-sm);
    background: transparent;
    color: var(--cha-text-primary);
    transition: all 0.2s;
}

.cha-feedback-title-input:hover {
    background: var(--cha-bg-light);
}

.cha-feedback-title-input:focus {
    outline: none;
    background: var(--cha-white);
    border-color: var(--cha-primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.cha-type-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 20px;
    background: var(--cha-secondary);
    color: var(--cha-primary);
    white-space: nowrap;
}

.cha-type-badge.manual {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #fff;
}

.cha-feedback-modal-body {
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 24px;
    padding: 24px;
}

/* Author Section */
.cha-feedback-author {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--cha-border-light);
}

.cha-feedback-author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--cha-border-light);
}

.cha-feedback-author-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cha-feedback-author-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--cha-text-primary);
}

.cha-feedback-date {
    font-size: 12px;
    color: var(--cha-text-muted);
}

/* Detail Sidebar */
.cha-detail-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cha-detail-meta label,
.cha-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--cha-text-muted);
    margin-bottom: 6px;
    text-transform: uppercase;
}

.cha-detail-meta select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--cha-border);
    border-radius: var(--cha-radius-sm);
    font-size: 14px;
}

/* Feedback Badges */
.cha-feedback-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.cha-feedback-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 6px;
    background: var(--cha-bg-light);
    color: var(--cha-text-secondary);
    border: 1px solid var(--cha-border-light);
}

.cha-feedback-badge svg {
    opacity: 0.7;
}

.cha-feedback-badge.product {
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    color: #4338ca;
    border-color: #a5b4fc;
}

.cha-feedback-badge.category {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #047857;
    border-color: #6ee7b7;
}

.cha-feedback-description {
    width: 100%;
    min-height: 120px;
    padding: 12px;
    font-size: 14px;
    line-height: 1.6;
    border: 1px solid var(--cha-border);
    border-radius: var(--cha-radius-sm);
    resize: vertical;
    transition: all 0.2s;
}

.cha-feedback-description:focus {
    outline: none;
    border-color: var(--cha-primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Select Wrapper & Status Indicator */
.cha-select-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cha-status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--cha-text-muted);
    flex-shrink: 0;
}

.cha-status-indicator.in_review {
    background: #6b7280;
}

.cha-status-indicator.planned {
    background: #3b82f6;
}

.cha-status-indicator.in_progress {
    background: #f59e0b;
}

.cha-status-indicator.completed {
    background: #10b981;
}

.cha-status-indicator.closed {
    background: #ef4444;
}

/* Detail Stats */
.cha-detail-stats {
    display: flex;
    gap: 12px;
    padding: 10px 0;
}

.cha-detail-stat {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.cha-stat-info {
    display: flex;
    flex-direction: column;
}

.cha-stat-info .cha-stat-count {
    font-size: 18px;
    font-weight: 700;
    color: var(--cha-text-primary);
    line-height: 1.2;
}

.cha-stat-info .cha-stat-label {
    font-size: 11px;
    color: var(--cha-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Created Date */
.cha-detail-created {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--cha-text-muted);
}

.cha-detail-created svg {
    opacity: 0.6;
}

/* ===============================================
   Simple Rich Editor Styles
   =============================================== */

.cha-simple-editor {
    border-radius: 8px;
    overflow: hidden;
}

.cha-editor-toolbar {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 8px 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-bottom: none;
    border-radius: 8px 8px 0 0;
}

.cha-toolbar-btn {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    color: #64748b;
    font-size: 14px;
    transition: all 0.15s;
}

.cha-toolbar-btn:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.cha-toolbar-btn.active {
    background: #6366f1;
    color: #fff;
}

.cha-toolbar-divider {
    width: 1px;
    height: 20px;
    background: #e2e8f0;
    margin: 0 6px;
}

.cha-editor-content-wrapper {
    position: relative;
}

.cha-editor-content {
    width: auto;
    min-height: 150px;
    padding: 14px;
    border: 1px solid #e2e8f0;
    border-radius: 0 0 8px 8px;
    font-size: 14px;
    line-height: 1.6;
    color: #1e293b;
    background: #fff;
    outline: none;
    overflow-y: auto;
}

.cha-editor-content:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.cha-editor-content:empty:before {
    content: attr(data-placeholder);
    color: #94a3b8;
    pointer-events: none;
}

.cha-editor-content ul,
.cha-editor-content ol {
    margin: 8px 0;
    padding-left: 24px;
}

.cha-editor-content li {
    margin: 4px 0;
}

.cha-editor-content a {
    color: #6366f1;
    text-decoration: underline;
}

/* Responsive for Detail Modal */
@media (max-width: 768px) {
    .cha-feedback-modal-body {
        grid-template-columns: 1fr;
    }

    .cha-form-row {
        grid-template-columns: 1fr;
    }

    .cha-feedback-header-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .cha-feedback-title-input {
        width: 100%;
    }
}

/* ===============================================
   Toast Notifications (Global)
   =============================================== */
#cha-toast-container {
    position: fixed;
    top: 50px;
    right: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cha-toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: var(--cha-radius-sm);
    font-size: 14px;
    font-weight: 500;
    box-shadow: var(--cha-shadow-lg);
    animation: cha-toast-in 0.3s ease;
    max-width: 400px;
    background: var(--cha-white);
    color: var(--cha-text-primary);
}

.cha-toast.success {
    background: var(--cha-success);
    color: var(--cha-white);
}

.cha-toast.error {
    background: var(--cha-error);
    color: var(--cha-white);
}

.cha-toast-close {
    margin-left: 8px;
    cursor: pointer;
    opacity: 0.8;
    background: none;
    border: none;
    color: inherit;
    font-size: 18px;
    line-height: 1;
    padding: 0;
    display: flex;
    align-items: center;
}

.cha-toast-close:hover {
    opacity: 1;
}

.cha-toast-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.cha-toast-msg {
    flex: 1;
}

@keyframes cha-toast-in {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}
