.cs-portal {
    position: relative;
    min-height: 70vh;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    direction: rtl;
    width: 100%;
}

.cs-portal__bg {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at top left, #2563eb, #111827);
    opacity: 0.9;
    z-index: -1;
}

.cs-portal__auth-card {
    max-width: 420px;
    margin: 6rem auto;
    background: rgba(17, 24, 39, 0.96);
    border-radius: 1.25rem;
    padding: 2rem 2.25rem 2.5rem;
    color: #f9fafb;
    box-shadow:
        0 20px 25px -5px rgba(0, 0, 0, 0.4),
        0 10px 10px -5px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(148, 163, 184, 0.4);
    backdrop-filter: blur(16px);
}

.cs-portal__logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: linear-gradient(120deg, #22c55e, #3b82f6);
    color: #0b1120;
    margin-bottom: 1.25rem;
}

.cs-portal__title {
    font-size: 1.5rem;
    margin: 0 0 0.4rem;
}

.cs-portal__subtitle {
    margin: 0 0 1.5rem;
    color: #9ca3af;
    font-size: 0.95rem;
}

.cs-portal__alert {
    margin-bottom: 1.5rem;
    padding: 0.9rem 1rem;
    border-radius: 0.9rem;
    font-size: 0.9rem;
}

.cs-portal__alert--error {
    background: rgba(248, 113, 113, 0.08);
    border: 1px solid rgba(248, 113, 113, 0.6);
    color: #fecaca;
}

.cs-portal__alert ul {
    margin: 0;
    padding-left: 1.1rem;
}

.cs-portal__form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cs-portal__field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.cs-portal__field label {
    font-size: 0.9rem;
    color: #e5e7eb;
}

.cs-portal__field input {
    border-radius: 0.75rem;
    border: 1px solid rgba(148, 163, 184, 0.7);
    padding: 0.6rem 0.8rem;
    font-size: 0.95rem;
    background-color: rgba(15, 23, 42, 0.9);
    color: #f9fafb;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.cs-portal__field input::placeholder {
    color: #6b7280;
}

.cs-portal__field input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.6);
    background-color: rgba(15, 23, 42, 1);
}

.cs-portal__button {
    margin-top: 0.5rem;
    border-radius: 999px;
    border: none;
    padding: 0.7rem 1.1rem;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #022c22;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 15px 30px -10px rgba(16, 185, 129, 0.6);
    transition: transform 0.1s ease, box-shadow 0.1s ease, filter 0.15s ease;
}

.cs-portal__button:hover {
    filter: brightness(1.03);
    transform: translateY(-1px);
    box-shadow: 0 20px 35px -15px rgba(16, 185, 129, 0.8);
}

.cs-portal__button:active {
    transform: translateY(0);
    box-shadow: 0 10px 20px -10px rgba(16, 185, 129, 0.8);
}

/* Layout بعد الدخول */
.cs-portal__layout {
    /* خلي البوابة بعرض الشاشة بدل كونها مضغوطة */
    margin: 1.5rem auto;
    max-width: none;
    width: calc(100% - 2rem);
    background: #020617;
    border-radius: 1.5rem;
    border: 1px solid rgba(148, 163, 184, 0.35);
    box-shadow:
        0 20px 40px -20px rgba(15, 23, 42, 0.9),
        0 0 0 1px rgba(15, 23, 42, 0.9);
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    overflow: hidden;
    min-height: 520px;
}

@media (max-width: 900px) {
    .cs-portal__layout {
        width: calc(100% - 1rem);
        margin: 1rem auto;
        grid-template-columns: 1fr;
    }
    .cs-portal__sidebar {
        border-inline-end: none;
        border-bottom: 1px solid rgba(31, 41, 55, 0.9);
    }
}

.cs-portal__sidebar {
    background: radial-gradient(circle at top right, rgba(56, 189, 248, 0.1), transparent),
    radial-gradient(circle at bottom, rgba(34, 197, 94, 0.12), #020617);
    border-inline-end: 1px solid rgba(31, 41, 55, 0.9);
    padding: 1.6rem 1.4rem 1.4rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.cs-portal__brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.cs-portal__brand-mark {
    width: 26px;
    height: 26px;
    border-radius: 0.9rem;
    background: conic-gradient(from 150deg, #22c55e, #22c55e, #0ea5e9, #6366f1, #22c55e);
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.9);
}

.cs-portal__brand-text {
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #e5e7eb;
}

.cs-portal__user {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.9rem 0.8rem;
    border-radius: 1rem;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.4);
}

.cs-portal__avatar {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    background: radial-gradient(circle at 30% 20%, #22c55e, #0f172a);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f9fafb;
    font-weight: 700;
    font-size: 0.95rem;
}

.cs-portal__user-info {
    display: flex;
    flex-direction: column;
}

.cs-portal__user-name {
    font-size: 0.95rem;
    color: #f9fafb;
    font-weight: 600;
}

.cs-portal__user-role {
    font-size: 0.8rem;
    color: #9ca3af;
}

.cs-portal__nav {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin-top: 0.5rem;
}

.cs-portal__nav-item {
    text-align: start;
    border-radius: 0.85rem;
    border: none;
    padding: 0.55rem 0.75rem;
    background: transparent;
    color: #9ca3af;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    transition: background-color 0.12s ease, color 0.12s ease, transform 0.08s ease;
}

.cs-portal__nav-item:hover {
    background: rgba(15, 23, 42, 0.9);
    color: #e5e7eb;
}

.cs-portal__nav-item--active {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.9), rgba(16, 185, 129, 0.9));
    color: #f9fafb;
}

.cs-portal__nav-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.7);
}

.cs-portal__nav-item--active .cs-portal__nav-dot {
    background: #fefce8;
}

.cs-portal__badge {
    min-width: 18px;
    height: 18px;
    border-radius: 999px;
    background: #ef4444;
    color: #fee2e2;
    font-size: 11px;
    padding: 0 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: auto;
}

.cs-portal__logout {
    margin-top: auto;
    font-size: 0.85rem;
    color: #f87171;
    text-decoration: none;
    padding: 0.55rem 0.75rem;
    border-radius: 0.85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    background: rgba(248, 113, 113, 0.08);
    border: 1px solid rgba(248, 113, 113, 0.4);
    transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.cs-portal__logout:hover {
    background: rgba(248, 113, 113, 0.18);
    border-color: rgba(248, 113, 113, 0.7);
    color: #fee2e2;
}

.cs-portal__main {
    padding: 1.7rem 1.7rem 1.5rem;
    background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.18), transparent),
    radial-gradient(circle at bottom right, rgba(16, 185, 129, 0.16), #020617);
    color: #e5e7eb;
}

.cs-portal__section-header h1 {
    font-size: 1.3rem;
    margin: 0 0 0.4rem;
}

.cs-portal__section-header p {
    margin: 0 0 1.4rem;
    font-size: 0.92rem;
    color: #9ca3af;
}

.cs-portal__cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.cs-portal__stat-card {
    border-radius: 1.1rem;
    padding: 1rem 1.1rem;
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid rgba(55, 65, 81, 0.9);
    box-shadow: 0 10px 25px -15px rgba(15, 23, 42, 0.9);
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.cs-portal__stat-label {
    font-size: 0.85rem;
    color: #9ca3af;
}

.cs-portal__stat-value {
    font-size: 1.4rem;
    font-weight: 700;
}

.cs-portal__stat-hint {
    font-size: 0.8rem;
    color: #6b7280;
}

.cs-portal__empty {
    border-radius: 1rem;
    padding: 1rem 1.2rem;
    background: rgba(15, 23, 42, 0.9);
    border: 1px dashed rgba(148, 163, 184, 0.7);
    font-size: 0.9rem;
    color: #d1d5db;
}

.cs-portal__section--hidden {
    display: none;
}

.cs-portal__dashboard-alert {
    margin-bottom: 1.1rem;
}

/* مهام الموظفين */
.cs-tasks {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.cs-tasks__messages {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.cs-tasks__alert {
    border-radius: 0.9rem;
    padding: 0.7rem 0.9rem;
    font-size: 0.9rem;
}

.cs-tasks__alert--success {
    background: rgba(22, 163, 74, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.6);
    color: #bbf7d0;
}

.cs-tasks__alert--error {
    background: rgba(248, 113, 113, 0.08);
    border: 1px solid rgba(248, 113, 113, 0.6);
    color: #fecaca;
}

.cs-tasks__actions {
    display: flex;
    justify-content: flex-end;
}

.cs-tasks__assign-card {
    border-radius: 1rem;
    padding: 1rem 1.1rem;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(55, 65, 81, 0.9);
    display: none;
}

.cs-tasks__assign-card--visible {
    display: block;
}

.cs-tasks__form {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.8rem 1rem;
    align-items: flex-end;
}

.cs-tasks__field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.cs-tasks__field label {
    font-size: 0.85rem;
    color: #e5e7eb;
}

.cs-tasks__field input,
.cs-tasks__field select {
    border-radius: 0.75rem;
    border: 1px solid rgba(148, 163, 184, 0.7);
    padding: 0.55rem 0.75rem;
    font-size: 0.9rem;
    background-color: rgba(15, 23, 42, 0.9);
    color: #f9fafb;
    outline: none;
}

.cs-tasks__field textarea {
    border-radius: 0.75rem;
    border: 1px solid rgba(148, 163, 184, 0.7);
    padding: 0.55rem 0.75rem;
    font-size: 0.9rem;
    background-color: rgba(15, 23, 42, 0.9);
    color: #f9fafb;
    outline: none;
    resize: vertical;
    min-height: 90px;
}

.cs-tasks__field textarea:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.6);
}

.cs-achievements__field--full {
    grid-column: 1 / -1;
}

.cs-tasks__field select {
    cursor: pointer;
}

.cs-tasks__field input:focus,
.cs-tasks__field select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.6);
}

.cs-tasks__lists {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.cs-tasks__list {
    border-radius: 1rem;
    padding: 0.9rem 1rem;
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid rgba(55, 65, 81, 0.9);
}

.cs-tasks__list-title {
    font-size: 0.95rem;
    margin: 0 0 0.6rem;
    color: #e5e7eb;
}

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

.cs-tasks__item {
    border-radius: 0.75rem;
    padding: 0.55rem 0.6rem;
    background: rgba(15, 23, 42, 0.9);
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.cs-tasks__item--open {
    border: 1px solid rgba(239, 68, 68, 0.65);
    background: rgba(239, 68, 68, 0.08);
}

.cs-tasks__item--open .cs-tasks__item-title {
    font-weight: 700;
}

.cs-tasks__item--done {
    border: 1px solid rgba(59, 130, 246, 0.65);
    background: rgba(59, 130, 246, 0.08);
}

.cs-tasks__item--cancelled {
    border: 1px solid rgba(34, 197, 94, 0.65);
    background: rgba(34, 197, 94, 0.08);
}

.cs-tasks__cancel-reason--hidden {
    display: none;
}

/* تبويب المهام المتأخرة */
.cs-overdue__filters {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.8rem;
}

.cs-overdue__filter-form {
    display: flex;
    align-items: end;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.cs-overdue__filter-label {
    display: grid;
    gap: 0.25rem;
    font-size: 0.85rem;
    color: #cbd5e1;
}

.cs-overdue__filter-select {
    background: rgba(2, 6, 23, 0.6);
    border: 1px solid rgba(55, 65, 81, 0.75);
    color: #e5e7eb;
    border-radius: 0.6rem;
    padding: 0.45rem 0.6rem;
    min-width: 210px;
}

.cs-overdue__reset {
    font-size: 0.9rem;
    color: #93c5fd;
    text-decoration: underline;
}

.cs-overdue__item {
    position: relative;
    overflow: hidden;
}

.cs-overdue__badge {
    font-size: 0.78rem;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: rgba(148, 163, 184, 0.10);
    color: #e5e7eb;
    white-space: nowrap;
}

.cs-overdue__item--minor {
    border-color: rgba(234, 179, 8, 0.65) !important;
    background: rgba(234, 179, 8, 0.08) !important;
}

.cs-overdue__item--minor .cs-overdue__badge {
    border-color: rgba(234, 179, 8, 0.55);
    background: rgba(234, 179, 8, 0.14);
}

.cs-overdue__item--moderate {
    border-color: rgba(249, 115, 22, 0.70) !important;
    background: rgba(249, 115, 22, 0.10) !important;
}

.cs-overdue__item--moderate .cs-overdue__badge {
    border-color: rgba(249, 115, 22, 0.60);
    background: rgba(249, 115, 22, 0.15);
}

.cs-overdue__item--severe {
    border-color: rgba(239, 68, 68, 0.80) !important;
    background: rgba(239, 68, 68, 0.12) !important;
}

.cs-overdue__item--severe .cs-overdue__badge {
    border-color: rgba(239, 68, 68, 0.60);
    background: rgba(239, 68, 68, 0.16);
}

/* تبويب التقارير */
.cs-reports__toolbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.9rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.cs-reports__filters {
    display: flex;
    align-items: flex-end;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.cs-reports__label {
    display: grid;
    gap: 0.25rem;
    font-size: 0.85rem;
    color: #cbd5e1;
}

.cs-reports__select {
    background: rgba(2, 6, 23, 0.6);
    border: 1px solid rgba(55, 65, 81, 0.75);
    color: #e5e7eb;
    border-radius: 0.6rem;
    padding: 0.45rem 0.6rem;
    min-width: 220px;
}

.cs-reports__actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.cs-reports__reset {
    font-size: 0.9rem;
    color: #93c5fd;
    text-decoration: underline;
}

.cs-reports__cards {
    margin-bottom: 1rem;
}

.cs-reports__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
}

@media (max-width: 900px) {
    .cs-reports__grid {
        grid-template-columns: 1fr;
    }
}

.cs-reports__card {
    border: 1px solid rgba(55, 65, 81, 0.75);
    border-radius: 0.9rem;
    background: rgba(15, 23, 42, 0.55);
    padding: 0.85rem;
}

.cs-reports__title {
    margin: 0 0 0.55rem;
    font-size: 1rem;
    font-weight: 800;
    color: #e5e7eb;
}

.cs-reports__sub {
    margin: 0.65rem 0 0.35rem;
    font-size: 0.88rem;
    color: #cbd5e1;
    font-weight: 700;
}

.cs-reports__split {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
}

@media (max-width: 720px) {
    .cs-reports__split {
        grid-template-columns: 1fr;
    }
}

.cs-reports__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.4rem;
}

.cs-reports__list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    padding: 0.45rem 0.55rem;
    border-radius: 0.7rem;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(2, 6, 23, 0.35);
    color: #e5e7eb;
    font-size: 0.9rem;
}

.cs-reports__kpis {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.6rem;
}

@media (max-width: 720px) {
    .cs-reports__kpis {
        grid-template-columns: 1fr;
    }
}

.cs-reports__kpis > div {
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(2, 6, 23, 0.35);
    border-radius: 0.8rem;
    padding: 0.6rem;
    color: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    font-size: 0.9rem;
}

.cs-reports__table {
    display: grid;
    gap: 0.35rem;
}

.cs-reports__thead,
.cs-reports__tr {
    display: grid;
    grid-template-columns: repeat(var(--cs-cols, 5), minmax(0, 1fr));
    gap: 0.5rem;
    align-items: center;
}

.cs-reports__thead {
    font-size: 0.78rem;
    color: #9ca3af;
    font-weight: 700;
    padding: 0 0.2rem;
}

.cs-reports__tr {
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(2, 6, 23, 0.35);
    border-radius: 0.8rem;
    padding: 0.55rem;
    color: #e5e7eb;
    font-size: 0.88rem;
}

.cs-reports__link {
    color: #93c5fd;
    text-decoration: underline;
    font-weight: 700;
}

.cs-portal--pdf .cs-portal__sidebar {
    display: none !important;
}

.cs-portal--pdf .cs-portal__main {
    padding: 0 !important;
}

/* PDF/Print: اجعل الصفحة بيضاء وبالعرض الكامل */
.cs-portal--pdf .cs-portal__bg {
    display: none !important;
}

.cs-portal--pdf {
    background: #fff !important;
    color: #111827 !important;
}

.cs-portal--pdf .cs-portal__layout {
    max-width: none !important;
    width: 100% !important;
    margin: 0 !important;
    border-radius: 0 !important;
    background: #fff !important;
    border: none !important;
    box-shadow: none !important;
    display: block !important;
    min-height: auto !important;
}

.cs-portal--pdf .cs-portal__section-header h1,
.cs-portal--pdf .cs-portal__section-header p {
    color: #111827 !important;
}

.cs-portal--pdf .cs-portal__stat-card,
.cs-portal--pdf .cs-reports__card,
.cs-portal--pdf .cs-reports__tr,
.cs-portal--pdf .cs-reports__list li,
.cs-portal--pdf .cs-reports__kpis > div,
.cs-portal--pdf .cs-sales-report__card,
.cs-portal--pdf .cs-sales-report__tr {
    background: #fff !important;
    color: #111827 !important;
    border-color: #d1d5db !important;
}

.cs-portal--pdf .cs-portal__stat-label,
.cs-portal--pdf .cs-portal__stat-hint,
.cs-portal--pdf .cs-reports__sub,
.cs-portal--pdf .cs-reports__thead,
.cs-portal--pdf .cs-sales-report__title,
.cs-portal--pdf .cs-sales-report__thead,
.cs-portal--pdf .cs-sales-report__bar-head,
.cs-portal--pdf .cs-sales-report__bar-meta {
    color: #374151 !important;
}

.cs-portal--pdf .cs-sales-report__bar-track {
    background: #f3f4f6 !important;
    border-color: #e5e7eb !important;
}

.cs-portal--pdf .cs-sales-report__bar-fill {
    background: #111827 !important;
}

.cs-portal--pdf-reports [data-tab-panel]:not([data-tab-panel="reports"]) {
    display: none !important;
}

.cs-portal--pdf-sales [data-tab-panel]:not([data-tab-panel="sales_reports"]) {
    display: none !important;
}

.cs-portal--pdf-maintenance [data-tab-panel]:not([data-tab-panel="maintenance_reports"]) {
    display: none !important;
}

.cs-portal--pdf .cs-print-hide {
    display: none !important;
}

.cs-portal--pdf .cs-print-only {
    display: block !important;
}

.cs-reports__tr a {
    color: #93c5fd;
    text-decoration: underline;
}

@media (max-width: 900px) {
    .cs-reports__thead {
        display: none;
    }
    .cs-reports__tr {
        grid-template-columns: 1fr;
    }
}

.cs-print-only {
    display: none;
}

@media print {
    @page {
        margin: 12mm;
    }

    html,
    body {
        background: #fff !important;
        color: #111827 !important;
        width: 100% !important;
    }

    .cs-portal__bg {
        display: none !important;
    }

    .cs-print-hide,
    .cs-portal__sidebar,
    .cs-portal__logout {
        display: none !important;
    }
    .cs-print-only {
        display: block !important;
    }
    .cs-portal__layout {
        display: block !important;
        padding: 0 !important;
        max-width: none !important;
        width: 100% !important;
        margin: 0 !important;
        border-radius: 0 !important;
        background: #fff !important;
        border: none !important;
        box-shadow: none !important;
    }
    .cs-portal__main {
        padding: 0 !important;
    }
    .cs-portal__section {
        display: block !important;
    }
    .cs-reports__card,
    .cs-portal__stat-card,
    .cs-reports__tr,
    .cs-reports__list li,
    .cs-reports__kpis > div,
    .cs-sales-report__card,
    .cs-sales-report__tr {
        background: #fff !important;
        color: #111827 !important;
        border-color: #d1d5db !important;
    }
    .cs-portal__stat-label,
    .cs-portal__stat-hint,
    .cs-reports__sub,
    .cs-reports__thead,
    .cs-sales-report__title,
    .cs-sales-report__thead,
    .cs-sales-report__bar-head,
    .cs-sales-report__bar-meta {
        color: #374151 !important;
    }

    /* امنع قص الجداول أثناء الطباعة */
    .cs-sales-report__table,
    .cs-reports__table {
        overflow: visible !important;
    }
}

.cs-reports__print-head {
    margin-bottom: 0.8rem;
}

.cs-reports__print-title {
    font-size: 1.2rem;
    font-weight: 900;
}

.cs-reports__print-meta {
    font-size: 0.9rem;
    color: #6b7280;
}

/* تبويب تقارير المبيعات (رئيسي) */
.cs-sales-report__toolbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.9rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.cs-sales-report__filters {
    display: flex;
    align-items: flex-end;
    gap: 0.6rem;
    flex-wrap: wrap;
}

/* تحسين عرض الجداول داخل تقارير المبيعات عند تزاحم الأعمدة */
.cs-sales-report__table,
.cs-reports__table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.cs-sales-report__label {
    display: grid;
    gap: 0.25rem;
    font-size: 0.85rem;
    color: #cbd5e1;
}

.cs-sales-report__select,
.cs-sales-report__input {
    background: rgba(2, 6, 23, 0.6);
    border: 1px solid rgba(55, 65, 81, 0.75);
    color: #e5e7eb;
    border-radius: 0.6rem;
    padding: 0.45rem 0.6rem;
    min-width: 210px;
}

.cs-sales-report__actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.cs-sales-report__reset {
    font-size: 0.9rem;
    color: #93c5fd;
    text-decoration: underline;
}

.cs-sales-report__cards {
    margin-bottom: 1rem;
}

.cs-sales-report__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
}

@media (max-width: 900px) {
    .cs-sales-report__grid {
        grid-template-columns: 1fr;
    }
}

.cs-sales-report__card {
    border: 1px solid rgba(55, 65, 81, 0.75);
    border-radius: 0.9rem;
    background: rgba(15, 23, 42, 0.55);
    padding: 0.85rem;
}

.cs-sales-report__title {
    margin: 0 0 0.55rem;
    font-size: 1rem;
    font-weight: 900;
    color: #e5e7eb;
}

.cs-sales-report__bars {
    display: grid;
    gap: 0.7rem;
}

.cs-sales-report__bar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    color: #e5e7eb;
    font-size: 0.92rem;
    font-weight: 800;
}

.cs-sales-report__bar-meta {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    font-size: 0.78rem;
    color: #9ca3af;
    margin-top: 0.25rem;
}

.cs-sales-report__bar-track {
    height: 10px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.14);
    border: 1px solid rgba(148, 163, 184, 0.18);
    overflow: hidden;
    margin-top: 0.4rem;
}

.cs-sales-report__bar-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.95), rgba(34, 197, 94, 0.95));
}

.cs-sales-report__table {
    display: grid;
    gap: 0.35rem;
}

.cs-sales-report__thead,
.cs-sales-report__tr {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.5rem;
    align-items: center;
}

.cs-sales-report__thead {
    font-size: 0.78rem;
    color: #9ca3af;
    font-weight: 800;
    padding: 0 0.2rem;
}

.cs-sales-report__tr {
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(2, 6, 23, 0.35);
    border-radius: 0.8rem;
    padding: 0.55rem;
    color: #e5e7eb;
    font-size: 0.88rem;
}

@media (max-width: 900px) {
    .cs-sales-report__thead {
        display: none;
    }
    .cs-sales-report__tr {
        grid-template-columns: 1fr !important;
    }
}

.cs-sales-report__print-head {
    margin-bottom: 0.8rem;
}

.cs-sales-report__print-title {
    font-size: 1.25rem;
    font-weight: 900;
}

.cs-sales-report__print-meta {
    font-size: 0.9rem;
    color: #6b7280;
}

.cs-tasks__finish-control {
    position: relative;
    width: 100%;
}

.cs-tasks__finish-btn {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.55rem 0.7rem;
    border-radius: 0.65rem;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(148, 163, 184, 0.08);
    color: #e5e7eb;
    cursor: pointer;
}

.cs-tasks__finish-menu {
    position: absolute;
    top: calc(100% + 0.35rem);
    right: 0;
    left: 0;
    z-index: 20;
    border-radius: 0.65rem;
    border: 1px solid rgba(55, 65, 81, 0.7);
    background: rgba(17, 24, 39, 0.98);
    padding: 0.35rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.cs-tasks__finish-menu--hidden {
    display: none;
}

.cs-tasks__finish-option {
    width: 100%;
    text-align: right;
    padding: 0.5rem 0.6rem;
    border-radius: 0.55rem;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: rgba(148, 163, 184, 0.08);
    color: #e5e7eb;
    cursor: pointer;
}

.cs-tasks__finish-option:hover {
    background: rgba(148, 163, 184, 0.14);
}

.cs-tasks__finish-option--cancel {
    border-color: rgba(239, 68, 68, 0.45);
    background: rgba(239, 68, 68, 0.10);
}

.cs-tasks__item-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.cs-tasks__item-title {
    font-size: 0.9rem;
}

.cs-tasks__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 0.6rem;
    font-size: 0.78rem;
    color: #9ca3af;
}

.cs-tasks__client-link a {
    color: #60a5fa;
    text-decoration: none;
}
.cs-tasks__client-link a:hover {
    text-decoration: underline;
}

.cs-tasks__client-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.45rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(96, 165, 250, 0.45);
    background: rgba(96, 165, 250, 0.08);
    color: #93c5fd;
    text-decoration: none;
}

.cs-tasks__client-btn:hover {
    background: rgba(96, 165, 250, 0.14);
}

.cs-tasks__status {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: 999px;
    padding: 0.15rem 0.6rem;
    font-size: 0.78rem;
}

.cs-tasks__status--new {
    background: rgba(59, 130, 246, 0.16);
    color: #bfdbfe;
}

.cs-tasks__status--seen {
    background: rgba(34, 197, 94, 0.18);
    color: #bbf7d0;
}

.cs-tasks__status-dot {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: currentColor;
}

.cs-tasks__empty-text {
    font-size: 0.85rem;
    color: #9ca3af;
}

/* تبويب مبيعاتك */
.cs-sales__filters {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.8rem;
}

.cs-sales__filter-form {
    display: flex;
    align-items: end;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.cs-sales__filter-label {
    display: grid;
    gap: 0.25rem;
    font-size: 0.85rem;
    color: #cbd5e1;
}

.cs-sales__filter-input {
    background: rgba(2, 6, 23, 0.6);
    border: 1px solid rgba(55, 65, 81, 0.75);
    color: #e5e7eb;
    border-radius: 0.6rem;
    padding: 0.45rem 0.6rem;
}

.cs-sales__reset {
    font-size: 0.9rem;
    color: #93c5fd;
    text-decoration: underline;
}

.cs-sales__cards {
    margin-bottom: 0.8rem;
}

.cs-sales__header {
    display: grid;
    grid-template-columns: 1.4fr 1.2fr 0.7fr 0.9fr;
    gap: 0.5rem;
    padding: 0.6rem 0.8rem;
    border: 1px solid rgba(55, 65, 81, 0.75);
    border-radius: 0.85rem;
    background: rgba(15, 23, 42, 0.55);
    font-weight: 700;
    color: #e5e7eb;
    margin-bottom: 0.6rem;
}

.cs-sales__items {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.6rem;
}

.cs-sales__item {
    display: grid;
    grid-template-columns: 1.4fr 1.2fr 0.7fr 0.9fr;
    gap: 0.5rem;
    padding: 0.75rem 0.8rem;
    border: 1px solid rgba(55, 65, 81, 0.75);
    border-radius: 0.85rem;
    background: rgba(15, 23, 42, 0.55);
}

.cs-sales__cell {
    font-size: 0.92rem;
    color: #e5e7eb;
    word-break: break-word;
}

@media (max-width: 720px) {
    .cs-sales__header,
    .cs-sales__item {
        grid-template-columns: 1fr;
    }
}

/* فلترة التنبيهات */
.cs-alerts-list__filters {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.8rem;
}

.cs-alerts-list__filter-form {
    display: flex;
    align-items: end;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.cs-alerts-list__filter-label {
    display: grid;
    gap: 0.25rem;
    font-size: 0.85rem;
    color: #cbd5e1;
}

.cs-alerts-list__filter-select {
    background: rgba(2, 6, 23, 0.6);
    border: 1px solid rgba(55, 65, 81, 0.75);
    color: #e5e7eb;
    border-radius: 0.6rem;
    padding: 0.45rem 0.6rem;
    min-width: 200px;
}

.cs-alerts-list__reset {
    font-size: 0.9rem;
    color: #93c5fd;
    text-decoration: underline;
}

/* تبويب طلبات الصيانة */
.cs-maintenance__filters {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.8rem;
}

.cs-maintenance__filter-form {
    display: flex;
    align-items: end;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.cs-maintenance__filter-label {
    display: grid;
    gap: 0.25rem;
    font-size: 0.85rem;
    color: #cbd5e1;
}

.cs-maintenance__filter-select {
    background: rgba(2, 6, 23, 0.6);
    border: 1px solid rgba(55, 65, 81, 0.75);
    color: #e5e7eb;
    border-radius: 0.6rem;
    padding: 0.45rem 0.6rem;
    min-width: 200px;
}

.cs-maintenance__reset {
    font-size: 0.9rem;
    color: #93c5fd;
    text-decoration: underline;
}

.cs-maintenance__header {
    display: grid;
    grid-template-columns: 1fr 1fr 1.4fr 0.8fr 0.9fr 0.7fr;
    gap: 0.5rem;
    padding: 0.6rem 0.8rem;
    border: 1px solid rgba(55, 65, 81, 0.75);
    border-radius: 0.85rem;
    background: rgba(15, 23, 42, 0.55);
    font-weight: 700;
    color: #e5e7eb;
    margin-bottom: 0.6rem;
}

.cs-maintenance__items {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.6rem;
}

.cs-maintenance__item {
    display: grid;
    grid-template-columns: 1fr 1fr 1.4fr 0.8fr 0.9fr 0.7fr;
    gap: 0.5rem;
    padding: 0.75rem 0.8rem;
    border: 1px solid rgba(55, 65, 81, 0.75);
    border-radius: 0.85rem;
    background: rgba(15, 23, 42, 0.55);
}

.cs-maintenance__cell {
    font-size: 0.9rem;
    color: #e5e7eb;
    word-break: break-word;
}

.cs-maintenance__cell a {
    color: #93c5fd;
    text-decoration: underline;
}

.cs-maintenance__detail-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

@media (max-width: 900px) {
    .cs-maintenance__header,
    .cs-maintenance__item {
        grid-template-columns: 1fr;
    }
}

/* قائمة العملاء */
.cs-clients__list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.6rem;
}

@media (min-width: 900px) {
    .cs-clients__list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.8rem;
    }
}

.cs-clients__item {
    padding: 0.8rem 0.9rem;
    border: 1px solid rgba(55, 65, 81, 0.75);
    border-radius: 0.85rem;
    background: rgba(15, 23, 42, 0.55);
}

.cs-clients__item--archived {
    opacity: 0.8;
    border-style: dashed;
}

.cs-clients__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.4rem;
}

.cs-clients__name {
    font-weight: 700;
    font-size: 1rem;
    color: #e5e7eb;
}

.cs-clients__phone {
    font-size: 0.9rem;
    color: #e5e7eb;
}

.cs-clients__meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.35rem 0.8rem;
    font-size: 0.85rem;
    color: #d1d5db;
}

.cs-clients__meta strong {
    color: #e5e7eb;
    margin-left: 0.25rem;
}

.cs-clients__badge {
    border-radius: 999px;
    padding: 0.15rem 0.6rem;
    background: rgba(37, 99, 235, 0.2);
}

.cs-clients__notes {
    margin-top: 0.4rem;
    font-size: 0.85rem;
    color: #d1d5db;
    display: flex;
    gap: 0.35rem;
}

.cs-clients__notes strong {
    color: #e5e7eb;
}

.cs-clients__edit {
    font-size: 0.8rem;
    border-radius: 999px;
    padding: 0.25rem 0.75rem;
    background: rgba(16, 185, 129, 0.18);
    color: #d1fae5;
    text-decoration: none;
}

.cs-clients__form-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.cs-clients__cancel {
    font-size: 0.85rem;
    color: #cbd5e1;
    text-decoration: none;
}

.cs-clients__delete-form {
    margin: 0;
}

.cs-clients__delete {
    font-size: 0.8rem;
    border-radius: 999px;
    padding: 0.25rem 0.75rem;
    border: 1px solid rgba(239, 68, 68, 0.5);
    background: rgba(127, 29, 29, 0.25);
    color: #fecaca;
    cursor: pointer;
}

.cs-clients__restore {
    font-size: 0.8rem;
    border-radius: 999px;
    padding: 0.25rem 0.75rem;
    border: 1px solid rgba(16, 185, 129, 0.45);
    background: rgba(6, 95, 70, 0.2);
    color: #a7f3d0;
    cursor: pointer;
}

.cs-clients__status-history {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #d1d5db;
}

.cs-clients__status-history strong {
    color: #e5e7eb;
    display: block;
    margin-bottom: 0.3rem;
}

.cs-clients__status-timeline {
    list-style: none;
    padding: 0;
    margin: 0.3rem 0 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.cs-clients__status-timeline li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding: 0.35rem 0.5rem;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 0.5rem;
    border-right: 3px solid rgba(59, 130, 246, 0.5);
}

.cs-clients__status-label {
    font-weight: 600;
    color: #bfdbfe;
}

.cs-clients__status-date {
    color: #9ca3af;
    font-size: 0.8rem;
}

.cs-clients__status-user {
    color: #6b7280;
    font-size: 0.78rem;
    margin-right: auto;
}

.cs-client-products {
    grid-column: 1 / -1;
    width: 100%;
    margin: 0.2rem 0 0.8rem;
    border: 1px solid rgba(55, 65, 81, 0.7);
    border-radius: 0.75rem;
    padding: 0.6rem;
    background: rgba(15, 23, 42, 0.45);
}

.cs-client-products--hidden {
    display: none;
}

.cs-client-maintenance {
    grid-column: 1 / -1;
    width: 100%;
    margin: 0.2rem 0 0.8rem;
    border: 1px solid rgba(55, 65, 81, 0.7);
    border-radius: 0.75rem;
    padding: 0.6rem;
    background: rgba(15, 23, 42, 0.45);
}

.cs-client-maintenance--hidden {
    display: none;
}

.cs-client-maintenance__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.cs-client-maintenance__fields {
    display: grid;
    gap: 0.6rem;
}

.cs-client-products__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.cs-client-products__head-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cs-client-products__notice {
    font-size: 0.78rem;
    color: #86efac;
    background: rgba(22, 101, 52, 0.25);
    border: 1px solid rgba(74, 222, 128, 0.4);
    border-radius: 999px;
    padding: 0.2rem 0.55rem;
    transition: opacity 0.2s ease;
}

.cs-client-products__notice--hidden {
    opacity: 0;
    visibility: hidden;
}

.cs-client-status {
    grid-column: 1 / -1;
    width: 100%;
    border: 1px solid rgba(55, 65, 81, 0.7);
    border-radius: 0.75rem;
    padding: 0.6rem;
    background: rgba(15, 23, 42, 0.45);
}

.cs-client-status__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.cs-client-status__box--hidden {
    display: none;
}

.cs-client-status__sold-by-wrap--hidden {
    display: none;
}

.cs-client-status__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem 1rem;
}

@media (max-width: 800px) {
    .cs-client-status__grid {
        grid-template-columns: 1fr;
    }
}

.cs-client-followups {
    grid-column: 1 / -1;
    width: 100%;
    border: 1px solid rgba(55, 65, 81, 0.7);
    border-radius: 0.75rem;
    padding: 0.6rem;
    background: rgba(15, 23, 42, 0.45);
}

.cs-client-followups__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.cs-client-followups__box--hidden {
    display: none;
}

.cs-client-followups__rows {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cs-client-followups__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.cs-client-followups__row select {
    min-width: 120px;
}

.cs-client-followups__row input[type="datetime-local"] {
    min-width: 160px;
}

.cs-alerts-list__items {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cs-alerts-list__item {
    display: grid;
    grid-template-columns: minmax(160px, 1fr) minmax(110px, 1fr) minmax(90px, 1fr) minmax(140px, 1fr) minmax(140px, 1fr) auto;
    gap: 0.75rem 1rem;
    align-items: center;
    padding: 0.6rem 0.75rem;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(55, 65, 81, 0.5);
    border-radius: 0.5rem;
}

.cs-alerts-list__item--new {
    border-color: rgba(239, 68, 68, 0.65);
    background: rgba(239, 68, 68, 0.08);
}

.cs-alerts-list__item--done {
    border-color: rgba(59, 130, 246, 0.65);
    background: rgba(59, 130, 246, 0.08);
}

.cs-alerts-list__actions {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    justify-content: flex-end;
    white-space: nowrap;
}

.cs-alerts-list__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.2rem 0.6rem;
    border-radius: 0.55rem;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(148, 163, 184, 0.08);
    color: #e5e7eb;
    text-decoration: none;
    font-size: 0.85rem;
    cursor: pointer;
}

.cs-alerts-list__btn--done {
    border-color: rgba(59, 130, 246, 0.45);
    background: rgba(59, 130, 246, 0.12);
}

.cs-alerts-list__btn--reason {
    border-color: rgba(34, 197, 94, 0.45);
    background: rgba(34, 197, 94, 0.12);
}

.cs-alerts-list__btn[disabled] {
    opacity: 0.6;
    cursor: default;
}

.cs-alerts-list__name,
.cs-alerts-list__phone,
.cs-alerts-list__type,
.cs-alerts-list__by,
.cs-alerts-list__date {
    font-size: 0.9rem;
}

.cs-alerts-list__by {
    color: #cbd5e1;
}

.cs-alerts-list__date {
    color: #94a3b8;
}

.cs-alerts-list__day-arrow {
    color: #fbbf24;
    font-weight: 800;
}

.cs-client-products__rows {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.cs-client-products__row {
    display: grid;
    grid-template-columns: minmax(180px, 2fr) 90px minmax(110px, 1fr) minmax(130px, 1fr) minmax(110px, 1fr) auto;
    gap: 0.45rem;
    align-items: center;
}

.cs-client-products__row select,
.cs-client-products__row input {
    width: 100%;
}

.cs-client-products__row .cs-clients__delete {
    min-height: 38px;
    white-space: nowrap;
}

.cs-client-products__summary {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 0.6rem;
    font-size: 0.85rem;
    color: #d1d5db;
}

.cs-client-products__summary strong {
    color: #e5e7eb;
}

@media (max-width: 800px) {
    .cs-clients__header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
}

/* قائمة المنتجات */
.cs-products__list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.cs-products__item {
    padding: 0.8rem 0.9rem;
    display: grid;
    grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr);
    gap: 0.75rem 1rem;
    align-items: flex-start;
}

.cs-products__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
    grid-column: 1;
}

.cs-products__name {
    font-weight: 700;
    font-size: 1rem;
    color: #e5e7eb;
}

.cs-products__serial {
    font-size: 0.85rem;
    color: #e5e7eb;
}

.cs-products__meta {
    grid-column: 1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.35rem 0.8rem;
    font-size: 0.85rem;
    color: #d1d5db;
}

.cs-products__meta strong {
    color: #e5e7eb;
    margin-left: 0.25rem;
}

.cs-products__image {
    grid-column: 2;
    grid-row: 1 / span 3;
    justify-self: center;
}

.cs-products__image img {
    max-width: 140px;
    border-radius: 0.5rem;
    border: 1px solid rgba(55, 65, 81, 0.8);
}

.cs-products__notes {
    grid-column: 1;
    margin-top: 0.2rem;
    font-size: 0.85rem;
    color: #d1d5db;
    display: flex;
    gap: 0.35rem;
}

.cs-products__notes strong {
    color: #e5e7eb;
}

.cs-products__notes span {
    max-height: 150px;
    overflow: auto;
}

.cs-products__links {
    grid-column: 1;
    margin-top: 0.4rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.cs-products__link {
    font-size: 0.8rem;
    border-radius: 999px;
    padding: 0.25rem 0.7rem;
    background: rgba(37, 99, 235, 0.2);
    color: #bfdbfe;
    text-decoration: none;
}

.cs-products__edit {
    background: rgba(16, 185, 129, 0.18);
    color: #d1fae5;
}

@media (max-width: 800px) {
    .cs-products__item {
        grid-template-columns: minmax(0, 1fr);
    }

    .cs-products__image {
        grid-column: 1;
        grid-row: auto;
        justify-self: flex-start;
        margin-top: 0.3rem;
    }

    .cs-client-products__row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1200px) and (min-width: 801px) {
    .cs-client-products__row {
        grid-template-columns: minmax(160px, 1.8fr) 85px minmax(100px, 1fr) minmax(120px, 1fr);
    }

    .cs-client-products__row .cs-clients__delete {
        grid-column: 1 / -1;
        justify-self: flex-start;
    }
}

/* استجابة للأجهزة الصغيرة */
@media (max-width: 960px) {
    .cs-portal__layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .cs-portal__sidebar {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
        border-inline-end: none;
        border-bottom: 1px solid rgba(31, 41, 55, 0.9);
    }

    .cs-portal__nav {
        flex-direction: row;
        justify-content: center;
    }

    .cs-portal__nav-item {
        font-size: 0.8rem;
        padding-inline: 0.7rem;
    }

    .cs-portal__user {
        display: none;
    }

    .cs-portal__cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cs-tasks__form {
        grid-template-columns: minmax(0, 1fr);
    }

    .cs-tasks__lists {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 640px) {
    .cs-portal__auth-card {
        margin: 4rem 1.25rem;
    }

    .cs-portal__cards {
        grid-template-columns: minmax(0, 1fr);
    }

    .cs-portal__main {
        padding-inline: 1.15rem;
    }

    .cs-tasks__actions {
        justify-content: center;
    }
}

