/* ================================================================
   Unit Sales Module CSS — ثمن
================================================================ */

/* ── Toolbar ───────────────────────────────────────────────────── */
.unit-toolbar {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

/* ── KPI Row ───────────────────────────────────────────────────── */
.unit-kpi-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.unit-kpi {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 14px;
    text-align: center;
}

.unit-kpi-label { font-size: 11px; color: #64748b; margin-bottom: 4px; }
.unit-kpi-value { font-size: 22px; font-weight: 800; color: #1e293b; }
.unit-kpi-sub   { font-size: 10px; color: #94a3b8; margin-top: 2px; }

/* ── Floor Plan ────────────────────────────────────────────────── */
.unit-floor-plan {
    direction: rtl;
}

.unit-floor {
    margin-bottom: 16px;
}

.unit-floor-label {
    font-size: 13px;
    font-weight: 700;
    color: #475569;
    margin-bottom: 8px;
    padding: 4px 10px;
    background: #f1f5f9;
    border-radius: 6px;
    display: inline-block;
}

.unit-floor-cells {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* ── Unit Cell ─────────────────────────────────────────────────── */
.unit-cell {
    width: 100px;
    min-height: 80px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    transition: all 0.15s;
    text-align: center;
    direction: rtl;
}

.unit-cell:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,.1);
    transform: translateY(-2px);
}

.unit-cell-icon   { font-size: 18px; margin-bottom: 2px; }
.unit-cell-num    { font-size: 13px; font-weight: 800; color: #1e293b; }
.unit-cell-area   { font-size: 10px; color: #94a3b8; }
.unit-cell-status { font-size: 9px;  font-weight: 700; margin-top: 2px; }
.unit-cell-buyer  { font-size: 9px;  color: #64748b; margin-top: 2px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

/* ── Sales Pipeline ────────────────────────────────────────────── */
.sales-pipeline { direction: rtl; }

.sales-kanban {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.sales-kanban-col {
    min-width: 280px;
    flex: 1;
    background: #f8fafc;
    border-radius: 10px;
    padding: 12px;
}

.sales-kanban-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    margin-bottom: 6px;
    border-radius: 6px 6px 0 0;
    font-weight: 700;
    font-size: 13px;
    color: #1e293b;
    background: #fff;
}

.sales-kanban-count {
    background: #e2e8f0;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
}

.sales-kanban-body { display: flex; flex-direction: column; gap: 8px; }

/* ── Sale Card ─────────────────────────────────────────────────── */
.sale-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px;
    transition: all 0.15s;
}

.sale-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,.08); }

.sales-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
}

/* ── Customers Grid ────────────────────────────────────────────── */
.customer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.customer-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px;
    direction: rtl;
    transition: box-shadow 0.15s;
}

.customer-card:hover { box-shadow: 0 2px 10px rgba(0,0,0,.08); }

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .unit-kpi-row    { grid-template-columns: repeat(2,1fr); }
    .sales-kanban    { flex-direction: column; }
    .sales-kanban-col{ min-width: 100%; }
    .customer-grid   { grid-template-columns: 1fr; }
}
