html,
body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

a,
.btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred."
}

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating>.form-control-plaintext::placeholder,
.form-floating>.form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating>.form-control-plaintext:focus::placeholder,
.form-floating>.form-control:focus::placeholder {
    text-align: start;
}

/* ===== عام ===== */
.page {
    max-width: 1000px;
    margin: 0 auto;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.page-header h1 {
    font-size: 1.4rem;
    color: #1e293b;
}

.filter-card {
    background: white;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.filter-row {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    flex-wrap: wrap;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-group label {
    font-size: 0.85rem;
    color: #374151;
}

.form-group input[type="date"],
.select-input {
    padding: 0.6rem 0.875rem;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.9rem;
    background: white;
}

.loading {
    text-align: center;
    padding: 3rem;
    color: #64748b;
}

.report-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.sum-card {
    border-radius: 10px;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    position: center;
}

.sum-card span {
    font-size: 0.82rem;
}

.sum-card strong {
    font-size: 1.5rem;
    font-weight: 700;
    padding-right: 30%;
}

.sum-card.blue {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.sum-card.green {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.sum-card.amber {
    background: #fffbeb;
    color: #d97706;
    border: 1px solid #fde68a;
}

.sum-card.purple {
    background: #faf5ff;
    color: #7e22ce;
    border: 1px solid #e9d5ff;
}

/* ===== صفحة الغلاف ===== */
.cover-page {
    background: #0f172a;
    min-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    text-align: center;
    color: white;
    page-break-after: always;
}

.cover-logo {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

.cover-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.5rem;
}

.cover-subtitle {
    font-size: 1rem;
    color: #64748b;
    margin-bottom: 3rem;
}

.cover-meta {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 3rem;
}

.cover-meta-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.meta-label {
    font-size: 0.75rem;
    color: #475569;
    text-transform: uppercase;
}

.meta-value {
    font-size: 1rem;
    color: #e2e8f0;
    font-weight: 600;
}

.cover-stats {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.cover-stat {
    padding: 1.25rem 2rem;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    min-width: 100px;
}

.cover-stat strong {
    font-size: 2rem;
    font-weight: 700;
}

.cover-stat span {
    font-size: 0.82rem;
}

.cover-stat.green {
    background: #14532d;
    color: #86efac;
}

.cover-stat.amber {
    background: #78350f;
    color: #fde68a;
}

.cover-stat.red {
    background: #7f1d1d;
    color: #fca5a5;
}

.cover-stat.gray {
    background: #1e293b;
    color: #94a3b8;
}

/* ===== صفحة الثابت ===== */
.constant-page {
    page-break-after: always;
    padding: 1.5rem;
    direction: rtl;
    font-family: 'Segoe UI', Tahoma, sans-serif;
    min-height: 95vh;
}

.constant-page:last-child {
    page-break-after: avoid;
}

.const-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid #e2e8f0;
}

.const-header-right {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.const-number {
    width: 44px;
    height: 44px;
    background: #1e293b;
    color: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 700;
    flex-shrink: 0;
}

.const-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.4rem;
}

.const-badges {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.freq-badge {
    font-size: 0.72rem;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-weight: 500;
}

.badge-daily {
    background: #dcfce7;
    color: #166534;
}

.badge-twice {
    background: #e0f2fe;
    color: #0369a1;
}

.badge-three {
    background: #bbf7d0;
    color: #166534;
}

.badge-weekly {
    background: #dbeafe;
    color: #1e40af;
}

.badge-monthly {
    background: #fef9c3;
    color: #854d0e;
}

.badge-yearly {
    background: #fce7f3;
    color: #9d174d;
}

.type-badge {
    font-size: 0.72rem;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    background: #f1f5f9;
    color: #475569;
}

.end-badge {
    font-size: 0.72rem;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    background: #fff7ed;
    color: #c2410c;
}

.const-overall {
    padding: 0.875rem 1.25rem;
    border-radius: 12px;
    text-align: center;
    min-width: 100px;
    flex-shrink: 0;
}

.overall-pct {
    display: block;
    font-size: 1.75rem;
    font-weight: 800;
}

.overall-label {
    font-size: 0.78rem;
    font-weight: 600;
}

.green-bg {
    background: #dcfce7;
    color: #166534;
}

.amber-bg {
    background: #fef9c3;
    color: #854d0e;
}

.red-bg {
    background: #fef2f2;
    color: #dc2626;
}

.gray-bg {
    background: #f1f5f9;
    color: #94a3b8;
}

/* body layout */
.const-body {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 1rem;
}

/* التحليل */
.analysis-section {
    margin-bottom: 0.875rem;
}

.section-title {
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    display: inline-block;
    margin-bottom: 0.4rem;
}

.blue-title {
    background: #dbeafe;
    color: #1e40af;
}

.purple-title {
    background: #f3e8ff;
    color: #7e22ce;
}

.green-title {
    background: #dcfce7;
    color: #166534;
}

.red-title {
    background: #fef2f2;
    color: #dc2626;
}

.amber-title {
    background: #fef9c3;
    color: #854d0e;
}

.gray-title {
    background: #f1f5f9;
    color: #475569;
}

.section-text {
    font-size: 0.875rem;
    color: #334155;
    line-height: 1.7;
    margin: 0;
}

.points-list {
    margin: 0;
    padding-right: 1.25rem;
    font-size: 0.875rem;
    line-height: 1.8;
}

.green-list {
    color: #166534;
}

.red-list {
    color: #dc2626;
}

.amber-list {
    color: #92400e;
}

.no-analysis {
    padding: 2rem;
    text-align: center;
    color: #94a3b8;
    font-size: 0.875rem;
    border: 2px dashed #e2e8f0;
    border-radius: 10px;
}

/* الأداء */
.perf-card {
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    padding: 1rem;
    margin-bottom: 0.875rem;
}

.perf-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.75rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid #e2e8f0;
}

.perf-row,
.sub-row,
.assignee-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.5rem;
    font-size: 0.78rem;
}

.perf-label,
.sub-name {
    min-width: 90px;
    color: #475569;
}

.perf-bar-wrap {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex: 1;
}

.perf-bar {
    flex: 1;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.perf-fill {
    height: 100%;
    border-radius: 4px;
}

.perf-fill.fill-green {
    background: #16a34a;
}

.perf-fill.fill-amber {
    background: #d97706;
}

.perf-fill.fill-red {
    background: #dc2626;
}

.perf-fill.target-fill {
    background: #7c3aed;
}

.perf-pct {
    font-size: 0.75rem;
    font-weight: 600;
    min-width: 36px;
    text-align: left;
}

.text-green {
    color: #16a34a;
}

.text-amber {
    color: #d97706;
}

.text-red {
    color: #dc2626;
}

.target-text {
    color: #7c3aed;
}

.perf-counts {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.count-chip {
    flex: 1;
    text-align: center;
    padding: 0.4rem;
    background: white;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.count-chip span {
    font-size: 0.68rem;
    color: #94a3b8;
}

.count-chip strong {
    font-size: 1rem;
    color: #1e293b;
}

.assignee-info {
    min-width: 90px;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.assignee-name {
    font-size: 0.75rem;
    color: #334155;
}

.role-chip {
    font-size: 0.65rem;
    padding: 0.1rem 0.35rem;
    border-radius: 10px;
}

.role-chip.sup {
    background: #dbeafe;
    color: #1e40af;
}

.role-chip.exe {
    background: #dcfce7;
    color: #166534;
}

.no-stats-card {
    text-align: center;
    padding: 2rem 1rem;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    color: #94a3b8;
    font-size: 0.875rem;
}

.no-stats-card span {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
}

/* ===== أزرار ===== */
.btn-primary {
    background: #1d4ed8;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.6rem 1.25rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background 0.2s;
    align-self: flex-end;
}

.btn-primary:hover:not(:disabled) {
    background: #1e40af;
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-print {
    background: #0f172a;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.6rem 1.25rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-print:hover {
    background: #1e293b;
}

.perf-fill.last-year-fill {
    background: #6366f1;
}

.last-year-text {
    color: #6366f1;
}

.sum-card.indigo {
    background: #eef2ff;
    color: #4338ca;
    border: 1px solid #c7d2fe;
}

.sum-card.trend-up {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.sum-card.trend-down {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.sum-card.trend-same {
    background: #f8fafc;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.cover-trend {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-top: 2rem;
    padding: 1.25rem 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    justify-content: center;
}

.trend-item {
    text-align: center;
}

.trend-label {
    display: block;
    font-size: 0.75rem;
    color: #64748b;
    margin-bottom: 0.25rem;
}

.trend-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
}

.trend-arrow {
    font-size: 2rem;
}

.trend-arrow.up {
    color: #86efac;
}

.trend-arrow.down {
    color: #fca5a5;
}

.trend-arrow.same {
    color: #94a3b8;
}

.const-people {
    margin-top: 0.5rem;
    display: block;
    flex-direction: row;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.people-row {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.people-label {
    font-size: 0.72rem;
    color: #64748b;
    font-weight: 600;
    white-space: nowrap;
}

.people-chip {
    font-size: 0.72rem;
    padding: 0.15rem 0.5rem;
    border-radius: 20px;
    font-weight: 500;
}

.people-chip.sup {
    background: #dbeafe;
    color: #1e40af;
}

.people-chip.exe {
    background: #dcfce7;
    color: #166534;
}

.columns-control {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.control-label {
    font-size: 0.85rem;
    color: #64748b;
}

.col-toggle {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    border: 1.5px solid #e2e8f0;
    background: #f8fafc;
    font-size: 0.82rem;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.col-toggle input {
    display: none;
}

.col-toggle.active {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #93c5fd;
}

.success-steps-section {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    padding: 0.875rem 1rem;
}

.success-title {
    background: #dcfce7 !important;
    color: #166534 !important;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 0.3rem 0.75rem;
    border-radius: 6px;
    display: inline-block;
    margin-bottom: 0.75rem;
}

.success-steps-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

    .success-steps-list li {
        display: flex;
        align-items: flex-start;
        gap: 0.5rem;
        font-size: 0.875rem;
        color: #166534;
        line-height: 1.6;
    }

.step-num-icon {
    width: 20px;
    height: 20px;
    background: #16a34a;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 0.1rem;
}
.ai-section {
    margin-top: 1rem;
}

.btn-ai {
    width: 100%;
    padding: 0.75rem;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: opacity 0.2s;
    font-weight: 600;
}

    .btn-ai:hover:not(:disabled) {
        opacity: 0.9;
    }

    .btn-ai:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }

.ai-loading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
}

.ai-error {
    margin-top: 0.75rem;
    background: #fef2f2;
    color: #dc2626;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
}

.ai-panel {
    margin-top: 1rem;
    background: white;
    border-radius: 12px;
    border: 2px solid #e0e7ff;
    overflow: hidden;
}

.ai-panel-header {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    padding: 1rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.ai-panel-title {
    display: block;
    color: white;
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.ai-panel-hint {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.75);
}

.btn-close-panel {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    border-radius: 6px;
    width: 28px;
    height: 28px;
    cursor: pointer;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.ai-items-list {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 400px;
    overflow-y: auto;
}

.ai-item {
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.875rem;
    background: #f8fafc;
    transition: border-color 0.2s;
}

    .ai-item.selected {
        border-color: #818cf8;
        background: #eef2ff;
    }

.ai-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.6rem;
}

.ai-checkbox {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: #4f46e5;
    cursor: pointer;
}

    .ai-checkbox input {
        accent-color: #4f46e5;
    }

.freq-select {
    padding: 0.3rem 0.6rem;
    border: 1.5px solid #c7d2fe;
    border-radius: 6px;
    font-size: 0.78rem;
    color: #4338ca;
    background: white;
    cursor: pointer;
}

.ai-item-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.875rem;
    direction: rtl;
    box-sizing: border-box;
    resize: vertical;
    font-family: inherit;
    background: white;
    line-height: 1.5;
}

    .ai-item-input:focus {
        outline: none;
        border-color: #818cf8;
    }

.ai-panel-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
}

.selected-count {
    font-size: 0.82rem;
    color: #64748b;
}

.ai-footer-actions {
    display: flex;
    gap: 0.6rem;
}

.btn-select-all-ai {
    background: white;
    color: #4f46e5;
    border: 1.5px solid #c7d2fe;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.2s;
}

    .btn-select-all-ai:hover {
        background: #eef2ff;
    }

.btn-approve-ai {
    background: #4f46e5;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
}

    .btn-approve-ai:hover:not(:disabled) {
        background: #4338ca;
    }

    .btn-approve-ai:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }
.steps-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.4rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

    .steps-label-row label {
        margin-bottom: 0 !important;
    }

.btn-ai-steps {
    background: linear-gradient(135deg, #0ea5e9, #6366f1);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.4rem 0.875rem;
    font-size: 0.78rem;
    cursor: pointer;
    font-weight: 600;
    transition: opacity 0.2s;
    white-space: nowrap;
}

    .btn-ai-steps:hover:not(:disabled) {
        opacity: 0.9;
    }

    .btn-ai-steps:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }
.ai-item-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.priority-badge {
    font-size: 0.72rem;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-weight: 600;
    white-space: nowrap;
}

.priority-high {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.priority-medium {
    background: #fef9c3;
    color: #854d0e;
    border: 1px solid #fde68a;
}

.priority-low {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.ai-field {
    margin-bottom: 0.6rem;
}

.ai-field-label {
    display: block;
    font-size: 0.72rem;
    color: #64748b;
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.ai-title-input {
    width: 100%;
    padding: 0.45rem 0.75rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.9rem;
    direction: rtl;
    box-sizing: border-box;
    font-family: inherit;
    font-weight: 600;
    color: #1e293b;
    background: white;
}

    .ai-title-input:focus {
        outline: none;
        border-color: #818cf8;
    }

.reason-field {
    background: #fffbeb;
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0;
}

.reason-label {
    color: #92400e !important;
}

.ai-reason-text {
    font-size: 0.82rem;
    color: #78350f;
    line-height: 1.5;
}
.btn-remove-small {
    background: #fef2f2;
    color: #dc2626;
    border: none;
    border-radius: 6px;
    width: 28px;
    cursor: pointer;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.btn-add-small {
    background: none;
    color: #1d4ed8;
    border: 1.5px dashed #93c5fd;
    border-radius: 6px;
    padding: 0.3rem 0.75rem;
    font-size: 0.78rem;
    cursor: pointer;
    margin-top: 0.25rem;
    width: 100%;
}




/* ===== طباعة ===== */
@media print {
    .no-print {
        display: none !important;
    }

    #report-print-area {
        display: block;
    }

    .cover-page {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .cover-stat,
    .perf-fill,
    .freq-badge,
    .section-title,
    .type-badge,
    .end-badge,
    .const-overall,
    .role-chip,
    .count-chip,
    .perf-card,
    .points-list {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .const-header {
        border-bottom-color: #1e293b;
    }
    .success-steps-section {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}