@import url('https://fonts.googleapis.com/css2?family=Noto+Kufi+Arabic:wght@100..900&display=swap');
/* ============================================================
   documents-shared.css
   Shared styles for All Documents & Holding Documents views
   ============================================================ */

/* ── Typography Scaling (driven by floating settings panel via :root CSS vars) ── */
h1 {
    font-size: var(--fs-title, 28px) !important;
}

h2 {
    font-size: var(--fs-subtitle, 16px) !important;
}

h3 {
    font-size: var(--fs-subtitle, 16px) !important;
}

label, .form-label {
    font-size: var(--fs-label, 12px) !important;
}

input:not([type="range"]):not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]),
textarea,
select,
.form-input {
    font-size: var(--fs-input, 16px) !important;
}

/* ── Input with icon ── */
.input-icon-wrap {
    position: relative;
}

.input-icon-wrap .input-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #d1d5db;
    pointer-events: none;
    width: 14px;
    height: 14px;
}

.input-icon-wrap .form-input {
    padding-left: 32px;
}

/* ── Form inputs ── */
.form-input {
    width: 100%;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 8px 12px;
    color: #374151;
    background: #fff;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
    font-size: var(--fs-input, 16px);
}

.form-input:focus {
    border-color: #6ee7b7;
    box-shadow: 0 0 0 3px rgba(110, 231, 183, .15);
}

.form-label {
    display: block;
    font-size: var(--fs-label, 12px);
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: 5px;
}

/* ── Table ── */
table {
    width: 100%;
    border-collapse: collapse;
}

thead th {
    text-align: left;
    font-size: var(--fs-table-hd, 11px);
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: 10px 14px;
    border-bottom: 1px solid #f3f4f6;
    white-space: nowrap;
}

tbody td {
    padding: 11px 14px;
    font-size: var(--fs-paragraph, 13px);
    color: #374151;
    border-bottom: 1px solid #f9fafb;
    white-space: nowrap;
}

tbody td a {
    font-size: var(--fs-paragraph);
}

tbody tr:hover td {
    background: #fafafa;
}

tbody tr:last-child td {
    border-bottom: none;
}

/* ── Row status accents ── */
tbody tr {
    transition: background .15s;
}

tbody tr.row-valid {
    background: #05966809;
}

tbody tr.row-invalid {
    background: #ef44440d;
}

tbody tr.row-hold {
    background: #d977060a;
}

tbody tr.row-submitted {
    background: #3b82f60a;
}

tbody tr.row-inprocess {
    background: #7c3aed0a;
}

tbody tr.row-freeze {
    background: #4338ca0a;
}

tbody tr.row-cancelled {
    background: #9ca3af10;
}

/* ── Chips ── */
.chip {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.chip-green {
    background: #d1fae5;
    color: #059669;
}

.chip-blue {
    background: #dbeafe;
    color: #3b82f6;
}

.chip-yellow {
    background: #fef3c7;
    color: #d97706;
}

.chip-red {
    background: #fee2e2;
    color: #ef4444;
}

.chip-purple {
    background: #ede9fe;
    color: #7c3aed;
}

.chip-indigo {
    background: #e0e7ff;
    color: #4338ca;
}

.chip-gray {
    background: #f3f4f6;
    color: #6b7280;
}

/* ── Error badges ── */
.error-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    background: #fee2e2;
    color: #ef4444;
    cursor: pointer;
    border: 1px solid #fecaca;
    transition: background .15s;
}

.error-badge:hover {
    background: #fecaca;
}

.no-error-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    background: #d1fae5;
    color: #059669;
}

/* ── Amount highlighting ── */
.amount-large {
    color: #059669;
    font-weight: 700;
}

/* ── Action icon buttons ── */
.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #6b7280;
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s;
    text-decoration: none;
    flex-shrink: 0;
}

.action-btn:hover {
    background: #f3f4f6;
    color: #1f2937;
    border-color: #d1d5db;
}

.action-btn.btn-blue:hover {
    background: #eff6ff;
    color: #3b82f6;
    border-color: #bfdbfe;
}

.action-btn.btn-green:hover {
    background: #f0fdf4;
    color: #059669;
    border-color: #bbf7d0;
}

.action-btn.btn-amber:hover {
    background: #fffbeb;
    color: #d97706;
    border-color: #fde68a;
}

.action-btn.btn-red:hover {
    background: #fef2f2;
    color: #ef4444;
    border-color: #fecaca;
}

/* ── Pagination ── */
.page-btn {
    padding: 4px 10px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    font-size: 12px;
    color: #6b7280;
    background: #fff;
    cursor: pointer;
    transition: background .15s;
}

.page-btn:hover {
    background: #f9fafb;
}

.page-btn.active {
    background: #111827;
    color: #fff;
    border-color: #111827;
    font-weight: 600;
}

/* ── Toast ── */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
    max-width: calc(100vw - 32px);
}

.toast-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 500;
    max-width: 340px;
    width: 100%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, .12);
    pointer-events: all;
    border: 1px solid transparent;
    animation: toastIn .3s cubic-bezier(.22, 1, .36, 1) forwards;
    transition: opacity .3s, transform .3s;
    box-sizing: border-box;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(20px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

.toast-item.toast-out {
    opacity: 0;
    transform: translateX(20px) scale(0.96);
}

.toast-success {
    background: #f0fdf4;
    color: #166534;
    border-color: #bbf7d0;
}

.toast-error {
    background: #fef2f2;
    color: #991b1b;
    border-color: #fecaca;
}

.toast-info {
    background: #eff6ff;
    color: #1e40af;
    border-color: #bfdbfe;
}

.toast-icon {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    margin-top: 1px;
}

.toast-body {
    flex: 1;
    min-width: 0;
}

.toast-title {
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 2px;
}

.toast-msg {
    font-size: 13px;
    line-height: 1.4;
    word-break: break-word;
}

.toast-close {
    flex-shrink: 0;
    background: none;
    border: none;
    cursor: pointer;
    color: currentColor;
    opacity: .5;
    padding: 0;
    font-size: 16px;
    line-height: 1;
}

.toast-close:hover {
    opacity: 1;
}

/* ── Skeleton ── */
.skeleton-row td {
    padding: 13px 14px;
}

.skeleton-cell {
    height: 12px;
    border-radius: 6px;
    background: linear-gradient(90deg, #f3f4f6 25%, #e9ecef 50%, #f3f4f6 75%);
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ── Column Manager ── */
.col-manager-wrapper {
    position: relative;
    display: inline-block;
}

.col-manager-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 10px;
    border: 1.5px solid #e5e7eb;
    background: #fff;
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    transition: border-color .15s, background .15s;
    white-space: nowrap;
}

.col-manager-btn:hover {
    border-color: #6ee7b7;
    background: #f0fdf4;
}

.col-manager-btn .badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #059669;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
}

.col-manager-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 320px;
    max-width: calc(100vw - 32px);
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .12);
    z-index: 500;
    overflow: hidden;
    animation: dropdownIn .18s cubic-bezier(.22, 1, .36, 1);
}

@keyframes dropdownIn {
    from {
        opacity: 0;
        transform: translateY(-6px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.col-manager-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px 10px;
    border-bottom: 1px solid #f3f4f6;
}

.col-manager-header span {
    font-size: 12px;
    font-weight: 700;
    color: #111827;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.col-manager-header button {
    font-size: 11px;
    color: #059669;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 600;
    padding: 0;
}

.col-manager-header button:hover {
    text-decoration: underline;
}

.col-manager-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
    padding: 10px 12px 12px;
    max-height: 340px;
    overflow-y: auto;
}

.col-toggle-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: background .12s;
    user-select: none;
}

.col-toggle-item:hover {
    background: #f9fafb;
}

.col-toggle-item input[type="checkbox"] {
    display: none;
}

.toggle-track {
    width: 30px;
    height: 16px;
    border-radius: 999px;
    background: #e5e7eb;
    position: relative;
    flex-shrink: 0;
    transition: background .2s;
}

.toggle-track::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
    transition: transform .2s cubic-bezier(.22, 1, .36, 1);
}

.col-toggle-item input:checked+.toggle-track {
    background: #059669;
}

.col-toggle-item input:checked+.toggle-track::after {
    transform: translateX(14px);
}

.col-toggle-label {
    font-size: 12px;
    color: #374151;
    font-weight: 500;
}

.col-toggle-item.locked {
    opacity: .5;
    cursor: not-allowed;
}

.col-manager-footer {
    padding: 8px 16px 12px;
    border-top: 1px solid #f3f4f6;
    display: flex;
    align-items: center;
    gap: 6px;
}

.col-manager-footer span {
    font-size: 11px;
    color: #9ca3af;
}

.col-manager-overlay {
    position: fixed;
    inset: 0;
    z-index: 499;
}

/* ── Filter Open Button ── */
/* Base buttons */
.filter-open-btn,
.create-btn,
.outlined-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 16px;
    border-radius: 12px;
    border: 1.5px solid #e5e7eb;
    background: #fff;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    transition: border-color .15s, background .15s, box-shadow .15s;
    white-space: nowrap;
    min-height: 40px;
}

/* Filled buttons */
.upload-btn {
    background-color: #4ade80;
    color: #fff;
    border-color: transparent;
}

.create-btn {
    background-color: #4ade80;
    color: #fff;
    border-color: transparent;
}

.create-btn:hover {
    background-color: #059669;
    color: #fff;
    border-color: #059669;
}

/* Outlined button */
.outlined-btn {
    background: #fff;
    color: #059669;
    border: 1.5px solid #4ade80;
}

.outlined-btn:hover {
    background: #f0fdf4;
    border-color: #059669;
    color: #047857;
}

.upload-btn:hover {
    background-color: #059669;
    color: #fff;
    border-color: #059669;
}

.filter-open-btn.has-filters {
    background: #f0fdf4;
    border-color: #6ee7b7;
    color: #059669;
}

.filter-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #059669;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
}

/* ── Danger Filter Button ── */
.filter-open-btn.btn-danger-outline {
    border-color: #fecaca;
    color: #ef4444;
}

.filter-open-btn.btn-danger-outline:hover {
    background: #fef2f2;
    border-color: #ef4444;
}

/* ── Active Filter Pills ── */
.active-filters-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-bottom: 14px;
}

.af-label {
    font-size: 11px;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-right: 2px;
    flex-shrink: 0;
}

.af-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 6px 4px 10px;
    border-radius: 999px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    font-size: 12px;
    font-weight: 500;
    color: #065f46;
    white-space: nowrap;
}

.af-pill .af-key {
    color: #065f46;
    font-weight: 600;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-right: 1px;
}

.af-pill-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: none;
    background: #bbf7d0;
    color: #065f46;
    cursor: pointer;
    font-size: 10px;
    line-height: 1;
    padding: 0;
    transition: background .12s, color .12s;
    margin-left: 2px;
    flex-shrink: 0;
}

.af-pill-remove:hover {
    background: #ef4444;
    color: #fff;
}

.af-clear-all {
    font-size: 11px;
    font-weight: 600;
    color: #ef4444;
    background: none;
    border: 1px solid #fecaca;
    border-radius: 999px;
    cursor: pointer;
    padding: 4px 10px;
    transition: background .12s;
}

.af-clear-all:hover {
    background: #fee2e2;
}

/* ── Filter Modal Overlay ── */
.filter-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 1080;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 16px;
    backdrop-filter: blur(2px);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateX(20px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

.filter-modal {
    width: 440px;
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 32px);
    background: #fff;
    border-radius: 20px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: modalSlideIn .22s cubic-bezier(.22, 1, .36, 1);
}

.filter-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 14px;
    border-bottom: 1px solid #f3f4f6;
    flex-shrink: 0;
    gap: 8px;
}

.filter-modal-head h2 {
    font-size: 15px;
    font-weight: 700;
    color: #111827;
    margin: 0;
    flex-shrink: 0;
}

.filter-modal-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-modal-clear {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    background: none;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    padding: 5px 12px;
    transition: background .12s;
    white-space: nowrap;
}

.btn-modal-clear:hover {
    background: #f3f4f6;
}

.btn-modal-apply {
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    background: #059669;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    padding: 6px 14px;
    transition: background .12s;
    white-space: nowrap;
}

.btn-modal-apply:hover {
    background: #047857;
}

.btn-modal-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #6b7280;
    cursor: pointer;
    transition: background .12s;
    padding: 0;
    flex-shrink: 0;
}

.btn-modal-close:hover {
    background: #f3f4f6;
}

.filter-modal-body {
    overflow-y: auto;
    flex: 1;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    -webkit-overflow-scrolling: touch;
}

.filter-section-title {
    font-size: 10px;
    font-weight: 700;
    color: #6a6a6aff;
    text-transform: uppercase;
    letter-spacing: .07em;
    margin-bottom: 10px;
    border-bottom: 1px solid #80808036;
    padding-bottom: 8px;
}

.filter-divider {
    height: 1px;
    background: #f3f4f6;
}

.filter-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.filter-grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
}

/* Status pills in modal */
.modal-status-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.modal-s-pill {
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    border: 1.5px solid #e5e7eb;
    background: transparent;
    color: #374151;
    transition: background .12s, border-color .12s, color .12s;
    white-space: nowrap;
    min-height: 32px;
}

.modal-s-pill:hover {
    background: #f3f4f6;
}

.modal-s-pill.active {
    background: #059669;
    color: #fff;
    border-color: #059669;
}

/* ── Bootstrap Modal overrides ── */
.modal {
    background: #00000042;
}

.modal-header {
    border-bottom: 1px solid #f3f4f6 !important;
    padding: 16px 20px 12px !important;
}

.modal-footer {
    border-top: 1px solid #f3f4f6 !important;
    padding: 12px 20px 16px !important;
}

.modal-body {
    padding: 16px 20px !important;
}

.modal-title {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #111827 !important;
}

.modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    display: none !important;
    z-index: 1090 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
}

.modal.show {
    display: block !important;
}

.modal-backdrop {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 1070 !important;
}

.modal-dialog {
    background: white;
    max-width: 640px;
    position: absolute;
    width: calc(100% - 32px);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 20px !important;
    border: none !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .15) !important;
}

/* ── Danger Action Banner ── */
.danger-action-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #fff;
    border: 1.5px solid #f3f4f6;
    border-radius: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.danger-action-bar .bar-label {
    font-size: 12px;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-right: auto;
}

.btn-action-secondary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 10px;
    border: 1.5px solid #e5e7eb;
    background: #fff;
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    transition: border-color .15s, background .15s;
    white-space: nowrap;
}

.btn-action-secondary:hover {
    border-color: #6ee7b7;
    background: #f0fdf4;
    color: #059669;
}

.btn-action-danger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 10px;
    border: 1.5px solid #fecaca;
    background: #fef2f2;
    font-size: 12px;
    font-weight: 600;
    color: #ef4444;
    cursor: pointer;
    transition: border-color .15s, background .15s;
    white-space: nowrap;
}

.btn-action-danger:hover {
    background: #fee2e2;
    border-color: #ef4444;
}

/* ── Table Card ── */
.table-card {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 30px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .05);
    padding: 24px;
}

.info-card {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 30px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .05);
    overflow: hidden;
    padding: 24px;
}

/* ── Responsive ── */
@media (max-width: 991px) {
    .stat-count {
        font-size: 1.4rem;
    }

    .stat-label {
        font-size: 9px;
    }

    .stat-card {
        padding: 12px;
        border-radius: 14px;
    }
}

@media (max-width: 767px) {
    .filter-overlay {
        padding: 8px;
        align-items: flex-end;
        justify-content: center;
    }

    @keyframes modalSlideIn {
        from {
            opacity: 0;
            transform: translateY(30px) scale(0.98);
        }

        to {
            opacity: 1;
            transform: translateY(0) scale(1);
        }
    }

    .filter-modal {
        width: 100%;
        max-width: 100%;
        max-height: 90vh;
        border-radius: 20px 20px 12px 12px;
    }

    .filter-modal-body {
        padding: 14px 16px;
    }

    .filter-modal-head {
        padding: 14px 16px 12px;
    }

    .filter-grid-2,
    .filter-grid-3 {
        grid-template-columns: 1fr;
    }

    .filter-grid-2>div[style*="grid-column"] {
        grid-column: 1 / -1 !important;
    }

    .stat-card {
        min-width: calc(33.33% - 8px);
        flex: 0 0 calc(33.33% - 8px);
        padding: 10px;
    }

    .stat-count {
        font-size: 1.2rem;
    }

    .stat-label {
        font-size: 8px;
        letter-spacing: 0;
    }

    .overflow-x-auto {
        -webkit-overflow-scrolling: touch;
    }

    .page-btn {
        padding: 4px 8px;
        font-size: 11px;
    }

    .action-btn {
        width: 34px;
        height: 34px;
    }

    .active-filters-bar {
        padding: 0 2px;
    }

    .col-manager-dropdown {
        width: calc(100vw - 32px);
        right: -8px;
    }

    .col-manager-grid {
        grid-template-columns: 1fr;
    }

    .modal-dialog {
        width: calc(100% - 24px);
    }

    .danger-action-bar {
        gap: 6px;
    }

    .btn-action-secondary,
    .btn-action-danger {
        font-size: 11px;
        padding: 6px 10px;
    }
}

@media (max-width: 399px) {
    .stat-card {
        min-width: calc(50% - 6px);
        flex: 0 0 calc(50% - 6px);
    }

    .filter-modal-actions {
        gap: 5px;
    }

    .btn-modal-clear,
    .btn-modal-apply {
        padding: 5px 8px;
        font-size: 11px;
    }
}

.action-texted-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.15s, transform 0.1s;
    border: 0.5px solid transparent;
    white-space: nowrap;
}

.action-texted-btn:hover {
    opacity: 0.85;
}

.action-texted-btn:active {
    transform: scale(0.97);
}

/* Change Password — primary action */
.texted-btn-blue {
    background: #378ADD;
    color: #E6F1FB;
    border-color: #185FA5;
}

/* Change Role — elevated/permission action */
.texted-btn-amber {
    background: #BA7517;
    color: #FAEEDA;
    border-color: #854F0B;
}

/* Companies — neutral navigation */
.texted-btn-gray {
    background: #f1efea;
    color: #2c2c2a;
    border-color: #b4b2a9;
}

/* Branches — conditional/contextual */
.texted-btn-green {
    background: #639922;
    color: #EAF3DE;
    border-color: #3B6D11;
}

.ar * {
    font-family: "Noto Kufi Arabic", sans-serif !important;
}

.ar thead th {
    text-align: right;
}

.ar .col-manager-dropdown {
    right: auto;
    left: 0;
}

p,
ul,
ol {
    font-size: var(--fs-paragraph, 16px) !important;
}