/* Auto-generated: migrated inline styles from app/views */
[data-sref="is-03b754948a"] { max-width:220px; }
[data-sref="is-04c6a0a4e8"] { min-width:180px; }
[data-sref="is-0a933d5546"] { width:44px; }
[data-sref="is-1407dfc9a6"] { color:#856404; }
[data-sref="is-17f59caa6a"] { border:1px solid var(--muted);border-radius:5px;color:var(--muted);text-decoration:none;display:inline-block; }
[data-sref="is-1ecfb906b3"] { font-size:2.5rem;margin-bottom:.5rem; }
[data-sref="is-2b6d2b8d30"] { max-width:130px; }
[data-sref="is-2f58115a54"] { width:0%; }
[data-sref="is-30f2d8a4a4"] { height:60px;object-fit:contain;margin-bottom:.5rem;display:block;margin-inline:auto; }
[data-sref="is-312962cb82"] { font-size:1.15rem;font-weight:800; }
[data-sref="is-343d32d32a"] { color:#b52533; }
[data-sref="is-37048201d8"] { font-size:.85rem;color:var(--muted);margin-top:-.25rem;margin-bottom:1rem; }
[data-sref="is-4097ac38a1"] { margin:0;color:var(--muted);font-size:.9rem;line-height:1.6; }
[data-sref="is-40b2ccb7c0"] { margin-top:.25rem; }
[data-sref="is-40d977bb4f"] { margin-top:1.2rem; }
[data-sref="is-4195539da9"] { padding:.5rem 0; }
[data-sref="is-42ac4ce295"] { margin:0;line-height:1.75;white-space:pre-wrap;font-size:.92rem; }
[data-sref="is-441181746a"] { margin-top:.85rem; }
[data-sref="is-46dcee6408"] { margin:0; }
[data-sref="is-499da60b09"] { display:grid;grid-template-columns:1fr 300px;gap:1.5rem;align-items:start; }
[data-sref="is-49a359d2d9"] { word-break:break-all; }
[data-sref="is-4afc785291"] { width:115px; }
[data-sref="is-5230d28aba"] { display:flex;gap:.75rem;justify-content:center; }
[data-sref="is-5236527a4e"] { color:#b52533;background:none;border:1px solid #b52533;border-radius:5px;cursor:pointer;font-weight:600; }
[data-sref="is-52b3ac0885"] { text-align:center;color:#6b7f94;padding:.8rem; }
[data-sref="is-53e96617cb"] { margin:0 0 .45rem;font-size:1.5rem; }
[data-sref="is-54cd26cfd3"] { width:140px; }
[data-sref="is-554dd06c94"] { color:#1a7a5e; }
[data-sref="is-5896cabd48"] { display:flex;justify-content:space-between;align-items:flex-end;padding-top:1.5rem;border-top:1px dashed var(--pr-line);font-size:.8rem;color:var(--pr-muted); }
[data-sref="is-5b214b8371"] { flex-shrink:0; }
[data-sref="is-5ba2166b6c"] { margin:.3rem 0 .1rem; }
[data-sref="is-5c37533a1c"] { opacity:.7;font-weight:400; }
[data-sref="is-5f78f65018"] { margin-bottom:.3rem; }
[data-sref="is-5fb2f00cf0"] { width:70px;height:70px;border-radius:12px;object-fit:cover;border:1px solid #d6e2ef; }
[data-sref="is-6a209bb769"] { margin-bottom:1.25rem; }
[data-sref="is-6c23c434e8"] { font-size:.85rem;color:var(--pr-muted);margin-top:.3rem; }
[data-sref="is-6d06b22c03"] { margin-right:.6rem; }
[data-sref="is-73ee387318"] { background:none;border:1px solid var(--line);border-radius:6px;padding:.18rem .55rem;font-size:.78rem;cursor:pointer;color:var(--muted);font-family:inherit; }
[data-sref="is-757ff2de47"] { width:90px; }
[data-sref="is-7744a555d2"] { width:85px; }
[data-sref="is-7daf6ba907"] { width:130px; }
[data-sref="is-7e692f9430"] { font-size:.9rem; }
[data-sref="is-810f71fe3d"] { flex-wrap:wrap;gap:.5rem;margin-bottom:.75rem;padding:.6rem .75rem;background:var(--surface-soft);border-radius:8px;font-size:.85rem;justify-content:flex-start; }
[data-sref="is-879009d160"] { margin:0 .35rem; }
[data-sref="is-88111d007f"] { width:36px; }
[data-sref="is-8c960343f8"] { margin-bottom:1.2rem; }
[data-sref="is-8fdce8d55b"] { text-decoration:none; }
[data-sref="is-92ea585458"] { background:var(--line); }
[data-sref="is-9384eeb146"] { max-width:180px; }
[data-sref="is-93b8ea5b2f"] { display:none; }
[data-sref="is-9a6061122b"] { background:#d1fae5;color:#065f46;padding:.18rem .55rem;border-radius:6px;font-size:.78rem;font-weight:700; }
[data-sref="is-9f5415eaa9"] { color:#6b7f94; }
[data-sref="is-a4a267c6f7"] { font-weight:400;color:#78350f; }
[data-sref="is-a4c853acac"] { padding:.2rem .6rem;border-radius:999px;font-size:.75rem;font-weight:700;background:#fee2e2;color:#b52533;animation:pulse 1.5s infinite; }
[data-sref="is-a5d2baa139"] { font-weight:600; }
[data-sref="is-a750e30490"] { margin:0;white-space:pre-wrap; }
[data-sref="is-a76419bbab"] { margin:0 0 .5rem;font-size:1.05rem; }
[data-sref="is-a9221c8510"] { width:40px; }
[data-sref="is-adc0599282"] { border:1px solid #b52533;border-radius:5px;color:#b52533;text-decoration:none;font-weight:600;display:inline-block; }
[data-sref="is-b48695bae7"] { display:flex;gap:.4rem;align-items:flex-end; }
[data-sref="is-b7b5d87231"] { align-items:center;flex-wrap:wrap; }
[data-sref="is-c256fb9adb"] { text-align:center;min-width:120px; }
[data-sref="is-c3794abc8f"] { margin-bottom:.5rem; }
[data-sref="is-c484a814cd"] { border-top:1px dashed var(--pr-line);width:100px;margin:2rem auto .3rem; }
[data-sref="is-c835239627"] { opacity:.8;font-size:.85rem;margin-top:.3rem; }
[data-sref="is-cb09b382a1"] { background:var(--surface-soft);color:var(--text); }
[data-sref="is-cc568fe7cb"] { font-weight:700; }
[data-sref="is-d4003bc634"] { margin-top:.1rem; }
[data-sref="is-d8a8eb47ea"] { border:1px solid var(--primary);background:none;border-radius:8px;cursor:pointer;color:var(--primary);font-family:inherit;font-weight:600; }
[data-sref="is-db8a217b50"] { width:120px; }
[data-sref="is-df4478ba75"] { grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); }
[data-sref="is-e061ff0221"] { font-size:1.1rem; }
[data-sref="is-e1106430f7"] { margin:0 0 .75rem;font-size:1rem; }
[data-sref="is-e1f45e14b1"] { color:var(--muted);margin:0 0 1.25rem; }
[data-sref="is-e2f3492e85"] { font-weight:600;color:var(--primary);text-decoration:none;font-size:.9rem; }
[data-sref="is-e65cdc53a6"] { display:grid;grid-template-columns:1fr 320px;gap:1.5rem;align-items:start; }
[data-sref="is-ebc214760b"] { font-size:1.2rem; }
[data-sref="is-ecf3efb3e4"] { margin-top:.2rem; }
[data-sref="is-eda5a84e22"] { display:grid;grid-template-columns:repeat(auto-fill,minmax(165px,1fr));gap:.6rem;margin-bottom:.6rem; }
[data-sref="is-fc3aaf81ad"] { margin:.15rem 0 0; }
[data-sref="is-fd4994001d"] { color:var(--line); }
[data-sref="is-ffd933ba36"] { margin:0 0 .4rem; }

/* Dynamic style replacements */
.is-hidden { display: none; }

.payment-due-normal { color: var(--text); }
.payment-due-overdue { color: var(--danger); font-weight: 700; }

.sbadge--subscription { color: #fff; background: #6b7280; }
.sbadge--subscription-active { background: #10b981; }
.sbadge--subscription-paused { background: #f59e0b; }
.sbadge--subscription-cancelled { background: #ef4444; }
.sbadge--subscription-expired { background: #6b7280; }

.project-status-badge,
.project-status-pill { color: #fff; background: #6b7280; }
.project-status-badge--planned,
.project-status-pill--planned { background: #3b82f6; }
.project-status-badge--in_progress,
.project-status-pill--in_progress { background: #f59e0b; }
.project-status-badge--completed,
.project-status-pill--completed { background: #10b981; }
.project-status-badge--on_hold,
.project-status-pill--on_hold { background: #8b5cf6; }
.project-status-badge--cancelled,
.project-status-pill--cancelled { background: #ef4444; }

.project-status-pill {
    display: inline-flex;
    align-items: center;
    padding: .22rem .75rem;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 700;
}

.project-end-date--late { color: var(--danger); }
.project-end-date--soon { color: #f59e0b; }
.project-end-date--normal { color: var(--text); }

.project-task-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid;
    flex-shrink: 0;
    text-decoration: none;
    font-size: .65rem;
    font-weight: 900;
}
.project-task-dot--done { background: #10b981; border-color: #10b981; color: #fff; }
.project-task-dot--in-progress { background: #fef3c7; border-color: #f59e0b; color: #92400e; }
.project-task-dot--blocked { background: #fee2e2; border-color: #ef4444; color: #991b1b; }
.project-task-dot--todo { background: #fff; border-color: #cbd5e1; color: #94a3b8; }

.project-task-link {
    font-weight: 600;
    font-size: .9rem;
    color: var(--text);
    text-decoration: none;
}
.project-task-link--done {
    text-decoration: line-through;
    opacity: .55;
}

.project-priority {
    font-weight: 700;
    flex-shrink: 0;
}
.project-priority--low { color: #6b7280; }
.project-priority--medium { color: #f59e0b; }
.project-priority--high { color: #ef4444; }
.project-priority--urgent { color: #dc2626; }

.project-task-status,
.project-sub-status {
    display: inline-flex;
    align-items: center;
    padding: .18rem .55rem;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    background: #6b7280;
}
.project-task-status--todo { background: #6b7280; }
.project-task-status--in_progress { background: #f59e0b; }
.project-task-status--done { background: #10b981; }
.project-task-status--blocked { background: #ef4444; }

.project-sub-status--active { background: #10b981; }
.project-sub-status--paused { background: #f59e0b; }
.project-sub-status--cancelled { background: #ef4444; }
.project-sub-status--expired { background: #6b7280; }

/* ── task priority pill (index table + show page) ── */
.task-pri { display: inline-flex; align-items: center; padding: .18rem .55rem; border-radius: 999px; font-size: .72rem; font-weight: 700; color: #fff; white-space: nowrap; }
.task-pri--low    { background: #6b7280; }
.task-pri--medium { background: #f59e0b; }
.task-pri--high   { background: #f97316; }
.task-pri--urgent { background: #ef4444; }

/* ── task show page ── */
.task-show-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.4rem; }
.task-show-header__left { display: flex; flex-direction: column; gap: .4rem; }
.task-show-header__badges { display: flex; gap: .4rem; flex-wrap: wrap; }
.task-show-header h1 { margin: 0; }
.task-services-wrap { display: flex; gap: .4rem; flex-wrap: wrap; }
.task-svc-chip { background: var(--surface-soft); border: 1px solid var(--line); border-radius: 8px; padding: .22rem .7rem; font-size: .8rem; font-weight: 600; color: var(--text); }

/* ── file show page ── */
.file-show-card { display: flex; align-items: center; gap: 1.1rem; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 14px; padding: 1.1rem 1.25rem; margin-bottom: 1.4rem; }
.file-show-badge { width: 52px; height: 52px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: .78rem; font-weight: 800; color: #fff; background: #6b7280; flex-shrink: 0; }
.file-show-badge.ft-pdf    { background: #ef4444; }
.file-show-badge.ft-image  { background: #8b5cf6; }
.file-show-badge.ft-doc    { background: #2563eb; }
.file-show-badge.ft-xls    { background: #16a34a; }
.file-show-badge.ft-zip    { background: #f59e0b; }
.file-show-badge.ft-video  { background: #0891b2; }
.file-show-badge.ft-audio  { background: #db2777; }
.file-show-info { flex: 1; min-width: 0; }
.file-show-name { font-weight: 700; font-size: 1rem; word-break: break-all; }
.file-show-sub  { font-size: .78rem; color: var(--muted); margin-top: .2rem; }
.file-show-actions { display: flex; gap: .4rem; flex-wrap: wrap; }

/* ── notes preview strip in index tables ── */
.notes-preview { font-size: .78rem; color: var(--muted); max-width: 220px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

.inst-status-badge {
    padding: 2px 8px;
    border-radius: 20px;
    font-size: .78rem;
    font-weight: 700;
    background: #f3f4f6;
    color: var(--muted);
}
.inst-status-badge--confirmed { background: #d1fae5; color: #1a7a5e; }
.inst-status-badge--pending { background: #fef3c7; color: #b45309; }
.inst-status-badge--rejected { background: #fee2e2; color: #b52533; }

.invoice-status-chip {
    padding: .25rem .7rem;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 700;
    background: #e8edf3;
    color: #4a5f78;
}
.invoice-status-chip--draft { background: #e8edf3; color: #4a5f78; }
.invoice-status-chip--sent { background: #dbeafe; color: #1e40af; }
.invoice-status-chip--paid { background: #d4f5e9; color: #1a7a5e; }
.invoice-status-chip--partially_paid { background: #fff3cd; color: #856404; }
.invoice-status-chip--overdue { background: #fee2e2; color: #b52533; }
.invoice-status-chip--cancelled { background: #f1f5f9; color: #64748b; }

.invoice-due-overdue { color: #b52533; font-weight: 700; }

.invoice-remaining-hint {
    font-size: .85rem;
    font-weight: 700;
}
.invoice-remaining-hint--due { color: #b52533; }
.invoice-remaining-hint--paid { color: #1a7a5e; }

.invoice-payment-amount--confirmed { color: #1a7a5e; }
.invoice-payment-amount--default { color: var(--text); }

.invoice-payment-status {
    padding: 2px 8px;
    border-radius: 20px;
    font-size: .78rem;
    font-weight: 700;
    background: #f3f4f6;
    color: var(--muted);
}
.invoice-payment-status--confirmed { background: #d4f5e9; color: #1a7a5e; }
.invoice-payment-status--pending { background: #fff3cd; color: #856404; }
.invoice-payment-status--rejected { background: #fee2e2; color: #b52533; }

.invoice-remaining-total--due { color: #b52533; }
.invoice-remaining-total--paid { color: #1a7a5e; }

.print-invoice-status {
    padding: .12rem .55rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: .76rem;
    background: #e8edf3;
    color: #4a5f78;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
}
.print-invoice-status--draft { background: #e8edf3; color: #4a5f78; }
.print-invoice-status--sent { background: #dbeafe; color: #1e40af; }
.print-invoice-status--paid { background: #d4f5e9; color: #1a7a5e; }
.print-invoice-status--partially_paid { background: #fff3cd; color: #856404; }
.print-invoice-status--overdue { background: #fee2e2; color: #b52533; }
.print-invoice-status--cancelled { background: #f1f5f9; color: #64748b; }

.print-remaining--due { color: #b52533; }
.print-remaining--paid { color: #1a7a5e; }

/* ══ MUI-style Autocomplete ══════════════════════════════════════ */
.cmb-wrap { position: relative; display: block; }

/* الحقل الخارجي */
.cmb-field {
    display: flex;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface);
    transition: border-color .15s;
    cursor: text;
}
.cmb-field:hover { border-color: var(--text); }
.cmb-wrap.cmb-open .cmb-field,
.cmb-field:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(14,165,164,.18);
}

/* input */
.cmb-input {
    flex: 1;
    min-width: 0;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
    padding: .45rem .75rem;
    font-size: .875rem;
    color: var(--text);
    font-family: inherit;
}
.cmb-input::placeholder { color: var(--muted); }

/* أزرار end-adornment */
.cmb-endAdornment {
    display: flex;
    align-items: center;
    padding: 0 2px;
    gap: 1px;
    flex-shrink: 0;
}
.cmb-btn-clear,
.cmb-btn-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px; height: 26px;
    border-radius: 50%;
    border: none;
    background: none;
    cursor: pointer;
    padding: 0;
    color: var(--muted);
    transition: background .15s, color .15s;
}
.cmb-btn-clear:hover  { background: rgba(239,68,68,.1);  color: #ef4444; }
.cmb-btn-toggle:hover { background: rgba(0,0,0,.06); color: var(--text); }
.cmb-btn-toggle svg   { transition: transform .2s ease; }
.cmb-wrap.cmb-open .cmb-btn-toggle svg { transform: rotate(180deg); }

/* إخفاء/إظهار زر المسح */
.cmb-btn-clear { display: none; }
.cmb-wrap.cmb-has-val .cmb-btn-clear { display: inline-flex; }

/* Listbox paper */
.cmb-drop {
    display: none;
    position: absolute;
    top: calc(100% + 5px);
    right: 0; left: 0;
    min-width: 180px;
    background: var(--surface);
    border-radius: 6px;
    box-shadow: 0 2px 4px -1px rgba(0,0,0,.12),
                0 4px 5px  0   rgba(0,0,0,.08),
                0 1px 10px 0   rgba(0,0,0,.07);
    z-index: 1400;
    overflow: hidden;
}
.cmb-wrap.cmb-open .cmb-drop { display: block; }

.cmb-drop-list {
    max-height: 240px;
    overflow-y: auto;
    padding: 6px 0;
}

/* option */
.cmb-opt {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: 6px 16px;
    font-size: .875rem;
    cursor: pointer;
    user-select: none;
    transition: background .1s;
    white-space: nowrap;
    overflow: hidden;
}
.cmb-opt-check {
    flex-shrink: 0;
    font-size: .8rem;
    color: var(--accent);
    width: 14px;
    opacity: 0;
    transition: opacity .1s;
}
.cmb-opt.cmb-active .cmb-opt-check { opacity: 1; }
.cmb-opt-label { flex: 1; overflow: hidden; text-overflow: ellipsis; }

.cmb-opt:hover                          { background: rgba(0,0,0,.04); }
.cmb-opt.cmb-focused                    { background: rgba(14,165,164,.08); }
.cmb-opt.cmb-active                     { background: rgba(14,165,164,.06); color: var(--accent); font-weight: 600; }
.cmb-opt.cmb-active:hover               { background: rgba(14,165,164,.12); }
.cmb-opt.cmb-hidden                     { display: none; }

/* تمييز النص المطابق — MUI style: bold فقط */
.cmb-hl { font-weight: 700; color: var(--text); }

.cmb-opt-empty {
    padding: 12px 16px;
    font-size: .85rem;
    color: var(--muted);
    display: none;
    text-align: center;
}

/* dark mode */
body.theme-dark .cmb-field        { background: #0f1b2b; border-color: #3a516d; }
body.theme-dark .cmb-field:hover  { border-color: #6b9ac4; }
body.theme-dark .cmb-input        { color: #e8effa; }
body.theme-dark .cmb-drop         { background: #162030; box-shadow: 0 4px 20px rgba(0,0,0,.5); }
body.theme-dark .cmb-opt:hover    { background: rgba(255,255,255,.05); }
body.theme-dark .cmb-opt.cmb-focused { background: rgba(14,165,164,.15); }
body.theme-dark .cmb-opt.cmb-active  { background: rgba(14,165,164,.12); }
body.theme-dark .cmb-hl           { color: #e8effa; }
