/* ── Project overrides on top of the W3CRM theme ─────────────────────────── */

body, .deznav, .header, h1, h2, h3, h4, h5, h6, .btn, .form-control, .form-select {
    font-family: "Cairo", "Tajawal", "Segoe UI", Tahoma, sans-serif;
}

/* Numbers stay LTR inside RTL text so money and dates never read backwards. */
.num, .amount, td.num, .table td .num {
    direction: ltr;
    unicode-bidi: embed;
    display: inline-block;
    font-variant-numeric: tabular-nums;
}

/* Status pills — colour is always paired with a written label (spec §48). */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .25rem .65rem;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 600;
    line-height: 1.6;
    white-space: nowrap;
}
.status-pill .dot { width: .5rem; height: .5rem; border-radius: 50%; background: currentColor; flex: none; }
.status-pill.s-success { background: rgba(43,193,85,.12); color: #1f9d47; }
.status-pill.s-warning { background: rgba(255,169,0,.14); color: #c47f00; }
.status-pill.s-danger  { background: rgba(255,64,64,.12); color: #d63333; }
.status-pill.s-info    { background: rgba(31,138,255,.12); color: #1b74d8; }
.status-pill.s-primary { background: rgba(136,108,255,.12); color: #6c4ee3; }
.status-pill.s-secondary { background: rgba(120,130,140,.12); color: #6a7885; }
.status-pill.s-dark    { background: rgba(30,30,30,.10); color: #444; }

/* KPI cards on the dashboard */
.kpi-card { border: 0; height: 100%; }
.kpi-card .kpi-icon {
    width: 52px; height: 52px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.25rem; flex: none;
}
.kpi-card .kpi-value { font-size: 1.5rem; font-weight: 700; line-height: 1.2; }
.kpi-card .kpi-label { font-size: .85rem; color: var(--bs-body-color); opacity: .8; }

/* Client 360 header */
.client-hero { border-radius: 1rem; }
.client-hero .avatar-lg {
    width: 72px; height: 72px; border-radius: 1rem;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.6rem; font-weight: 700;
}
.metric-box { padding: .85rem 1rem; border-radius: .75rem; background: var(--bs-body-bg); height: 100%; }
.metric-box .label { font-size: .78rem; opacity: .75; margin-bottom: .15rem; }
.metric-box .value { font-size: 1.15rem; font-weight: 700; }

/* Timeline (client activity) */
.timeline-list { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline-list::before {
    content: ""; position: absolute; top: 0; bottom: 0; inset-inline-start: 11px;
    width: 2px; background: var(--bs-border-color);
}
.timeline-list > li { position: relative; padding-inline-start: 2.25rem; padding-bottom: 1.15rem; }
.timeline-list > li .tl-dot {
    position: absolute; inset-inline-start: 0; top: .15rem;
    width: 24px; height: 24px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: .7rem; color: #fff;
}
.timeline-list > li .tl-time { font-size: .75rem; opacity: .7; }

/* Pipeline board (leads) */
.pipeline { display: flex; gap: .85rem; overflow-x: auto; padding-bottom: .75rem; }
.pipeline-col { min-width: 265px; flex: 1 0 265px; }
.pipeline-col .col-head {
    display: flex; justify-content: space-between; align-items: center;
    padding: .6rem .85rem; border-radius: .6rem .6rem 0 0; font-weight: 600; font-size: .88rem;
}
.pipeline-col .col-body {
    background: var(--bs-body-bg); border-radius: 0 0 .6rem .6rem;
    padding: .6rem; min-height: 140px; max-height: 62vh; overflow-y: auto;
}
.lead-card { background: var(--bs-card-bg, #fff); border-radius: .55rem; padding: .7rem .8rem; margin-bottom: .55rem; box-shadow: 0 1px 3px rgba(0,0,0,.07); }
.lead-card:last-child { margin-bottom: 0; }

/* Tables */
.table thead th { white-space: nowrap; font-size: .82rem; }
.table td { vertical-align: middle; }
.table-hover tbody tr { cursor: default; }
.table-linked tbody tr { cursor: pointer; }

/* Filter bar */
.filter-bar { background: var(--bs-card-bg, #fff); border-radius: .75rem; padding: .85rem 1rem; margin-bottom: 1.1rem; }
.filter-bar .form-control, .filter-bar .form-select { min-height: 42px; }

/* Notification list */
.reminder-item { display: flex; gap: .75rem; padding: .8rem .25rem; border-bottom: 1px solid var(--bs-border-color); }
.reminder-item:last-child { border-bottom: 0; }
.reminder-item.unread { background: rgba(136,108,255,.05); }
.reminder-item .r-icon { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex: none; }

/* Print — account statement (spec §13) */
@media print {
    .deznav, .header, .nav-header, .footer, .no-print, .btn { display: none !important; }
    .content-body { margin: 0 !important; padding: 0 !important; }
    .card { box-shadow: none !important; border: 1px solid #ddd !important; }
    body { background: #fff !important; }
}

/* Empty states */
.empty-state { text-align: center; padding: 2.5rem 1rem; }
.empty-state i { font-size: 2.5rem; opacity: .25; margin-bottom: .75rem; display: block; }
.empty-state p { margin: 0; opacity: .7; }

/* ── Icon fix ────────────────────────────────────────────────────────────
   The theme forces `font-family: "Material Icons"` on sidebar/menu <i>
   elements, which swallows Font Awesome glyphs. Re-assert FA wherever we
   use it. */
.fa-solid, .fas,
.deznav .metismenu > li a > i.fa-solid,
.deznav .metismenu > li a > i.fas {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
    font-style: normal !important;
}
.fa-regular, .far {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 400 !important;
    font-style: normal !important;
}
.fa-brands, .fab {
    font-family: "Font Awesome 6 Brands" !important;
    font-weight: 400 !important;
    font-style: normal !important;
}

/* The theme's .badge-light is white-on-transparent, which disappears on a
   white card. Give it a real chip appearance. */
.badge-light {
    background-color: rgba(120, 130, 140, .12) !important;
    color: var(--bs-body-color) !important;
    border: 0;
}
.badge-light small { color: inherit; opacity: .7; }
