/* ملائم — طبقة التصميم الموحّدة (2026-10-05).
   تُحمَّل آخر ملف أنماط في الصفحات الثلاث (صفحة المشاريع projects.html، والـCRM crm/index.html، وصفحة العميل crm/share.html)،
   فتعيد تعريف الألوان والخط والأزرار والحقول فوق css/style.css وcrm/crm.css دون أن تمس منطق الصفحات.
   - لونان من الشعار: أزرق مخضرّ للأزرار والتنقل، وذهبي للأرقام والإبراز. كل نص على لون يحقق تباين 4.5:1 على الأقل.
   - خط واحد واضح (IBM Plex Sans Arabic)، و16px في الحقول حتى لا يكبّر آيفون الصفحة عند لمسها.
   - أزرار بحجم الإصبع (44px للأساسي)، وإطار تركيز ظاهر للوحة المفاتيح.
   - على الجوال: ترويسة بسطر واحد، وشريط تنقل سفلي (يبنيه crm/js/app.js)، والجداول بطاقات (تسميات الأعمدة من app.js). */

:root {
    --font: 'IBM Plex Sans Arabic', 'Tajawal', system-ui, -apple-system, 'Segoe UI', sans-serif;

    --brand: #2f5f67;
    --brand-hover: #264e55;
    --brand-soft: #e8f0f1;
    --brand-line: #c9dcdf;
    --brand-ink: #2f5f67;
    --on-brand: #ffffff;
    --accent: #8a6a3d;
    --accent-soft: #f6efe4;

    --ink: #0f172a;
    --ink-2: #334155;
    --muted: #5b6b7f;
    --page: #f3f5f8;
    --card: #ffffff;
    --soft: #f8fafc;
    --line: #e2e8f0;
    --line-strong: #cbd5e1;

    --ok: #047857;
    --ok-soft: #e7f6ef;
    --warn: #b45309;
    --warn-soft: #fdf3e3;
    --danger: #b91c1c;
    --danger-soft: #fdecec;
    --info: #1d4ed8;
    --info-soft: #e8effd;

    --radius: 12px;
    --radius-sm: 8px;
    --tap: 44px;
    --ring: 0 0 0 3px rgba(47, 95, 103, 0.32);
    --lift: 0 1px 2px rgba(15, 23, 42, 0.05), 0 2px 8px rgba(15, 23, 42, 0.04);

    /* الأسماء القديمة تشير إلى الجديدة، فكل قاعدة قديمة تأخذ اللوحة الجديدة تلقائياً */
    --primary-gold: var(--accent);
    --text-primary: var(--ink);
    --text-secondary: var(--ink-2);
    --text-muted: var(--muted);
    --bg-page: var(--page);
    --bg-card: var(--card);
    --bg-light: var(--soft);
    --border-light: var(--line);
    --gradient-primary: var(--brand);
    --shadow-sm: var(--lift);
    --shadow-card: var(--lift);
}

body.crm-dark {
    --brand: #8fc0c6;
    --brand-hover: #a6ced3;
    --brand-soft: rgba(143, 192, 198, 0.14);
    --brand-line: rgba(143, 192, 198, 0.35);
    --brand-ink: #9cc7cc;
    --on-brand: #111820;
    --accent: #d6b98a;
    --accent-soft: rgba(214, 185, 138, 0.14);

    --ink: #edf1f6;
    --ink-2: #c3ccd6;
    --muted: #9aa6b2;
    --page: #0f1419;
    --card: #171d26;
    --soft: #1d2530;
    --line: rgba(255, 255, 255, 0.10);
    --line-strong: rgba(255, 255, 255, 0.18);

    --ok: #34d399;
    --ok-soft: rgba(52, 211, 153, 0.12);
    --warn: #fbbf24;
    --warn-soft: rgba(251, 191, 36, 0.12);
    --danger: #f87171;
    --danger-soft: rgba(248, 113, 113, 0.12);
    --info: #93b4fd;
    --info-soft: rgba(147, 180, 253, 0.12);

    --ring: 0 0 0 3px rgba(143, 192, 198, 0.4);
    --lift: 0 1px 2px rgba(0, 0, 0, 0.3);

    --primary-gold: var(--accent);
    --text-primary: var(--ink);
    --text-secondary: var(--ink-2);
    --text-muted: var(--muted);
    --bg-page: var(--page);
    --bg-card: var(--card);
    --bg-light: var(--soft);
    --border-light: var(--line);
    --gradient-primary: var(--brand);
    --primary-dark: #0b1015;
    --primary-blue: #202b37;
}

/* ===================== الخط والأساس ===================== */

html { -webkit-text-size-adjust: 100%; }

body {
    background: var(--page);
    color: var(--ink);
    font-size: 16px;
    line-height: 1.6;
}

/* خط واحد في كل مكان: قواعد قديمة كثيرة تفرض Almarai أو Tajawal على عناصر بعينها */
body,
body *:not(svg):not(svg *):not(code):not(pre):not(kbd):not(.leaflet-container *) {
    font-family: var(--font) !important;
}

h1, h2, h3, h4 { color: var(--ink); letter-spacing: 0; }

a { color: var(--brand-ink); }

:focus-visible {
    outline: none;
    box-shadow: var(--ring);
}

::selection { background: var(--brand-soft); color: var(--ink); }

/* ===================== الترويسة ===================== */

.header {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--lift);
    padding: 12px 18px;
    margin-bottom: 14px;
}

.header-content { gap: 12px; }

.header-content h1 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--ink);
    background: none;
    -webkit-text-fill-color: currentColor;
    margin: 0;
    line-height: 1.3;
}

.header-content p { color: var(--muted); font-size: 0.85rem; margin: 0; }

.header-logo, .crm-logo { width: 42px; height: 42px; border-radius: 10px; border: 1px solid var(--line); }

.user-info { gap: 8px; }

.user-badge {
    background: var(--soft);
    border: 1px solid var(--line);
    color: var(--ink-2);
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 600;
}

.user-badge.role-admin { color: var(--accent); border-color: var(--accent-soft); background: var(--accent-soft); }
.user-badge.role-field { color: var(--info); border-color: var(--info-soft); background: var(--info-soft); }
.user-badge.role-callcenter { color: var(--ok); border-color: var(--ok-soft); background: var(--ok-soft); }

.logout-btn,
.theme-toggle {
    min-height: 38px;
    border: 1px solid var(--line-strong);
    background: var(--card);
    color: var(--ink-2);
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 600;
}

.theme-toggle { width: 38px; border-radius: 10px; }
.logout-btn { padding: 6px 16px; }
.logout-btn:hover { background: var(--danger-soft); border-color: var(--danger); color: var(--danger); }
.theme-toggle:hover { background: var(--soft); color: var(--ink); }

/* ===================== شريط التنقل (الكمبيوتر) ===================== */

.crm-nav {
    gap: 4px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: var(--lift);
    top: 8px;
    margin-bottom: 18px;
    align-items: center;
}

.crm-nav a,
.crm-nav .nav-more > summary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    min-height: 40px;
    border-radius: var(--radius-sm);
    color: var(--ink-2);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    white-space: nowrap;
}

.crm-nav a:hover,
.crm-nav .nav-more > summary:hover { background: var(--brand-soft); color: var(--ink); }

.crm-nav a.active,
.crm-nav .nav-more.active > summary { background: var(--brand); color: var(--on-brand); box-shadow: none; }

body.crm-dark .crm-nav a { color: var(--ink-2); }
body.crm-dark .crm-nav a.active { background: var(--brand); color: var(--on-brand); }

/* «المزيد»: صفحات المدير الأقل استعمالاً في قائمة منسدلة بدل صف ثانٍ من البنود */
.nav-more { position: relative; }
.nav-more > summary { list-style: none; cursor: pointer; user-select: none; }
.nav-more > summary::-webkit-details-marker { display: none; }
.nav-more > summary::after { content: '▾'; font-size: 0.8em; opacity: 0.7; }
.nav-more-menu {
    position: absolute;
    top: calc(100% + 6px);
    inset-inline-end: 0;
    min-width: 210px;
    display: grid;
    gap: 2px;
    padding: 6px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
    z-index: 30;
}
.nav-more-menu a { width: 100%; }

/* عدّاد على بند القائمة (طلبات بانتظار الاعتماد) */
.nav-count {
    display: inline-grid;
    place-items: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--danger);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
}
body.crm-dark .nav-count { color: #111820; }
.nav-count[hidden] { display: none; }

/* شريط التنقل السفلي ونافذة «المزيد» يظهران على الجوال وحده */
.tabbar, .nav-sheet { display: none; }

/* ===================== البطاقات والعناوين ===================== */

.crm-card,
.admin-dashboard,
.form-section,
.map-section,
.projects-section {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--lift);
}

.crm-card { padding: 22px; margin-bottom: 18px; }

.crm-card > h2,
.crm-card-head h2,
.page-intro h1,
.dashboard-intro h1,
.client-head h2,
.modal-content h2.crm-modal-title {
    font-weight: 700;
    color: var(--ink);
    letter-spacing: 0;
}

.crm-card > h2, .crm-card-head h2 { font-size: 1.15rem; }
.crm-card-head { margin-bottom: 14px; padding-bottom: 12px; border-bottom-color: var(--line); }
.page-intro h1, .dashboard-intro h1 { font-size: 1.4rem; }
.client-head h2 { font-size: 1.45rem; }

.crm-subtle, .form-group .hint, .page-intro p, .dashboard-intro p { color: var(--muted); }

/* ===================== بطاقات الأرقام ===================== */

.stats-bar { gap: 12px; margin-bottom: 18px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }

.stat-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-right: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--lift);
    padding: 16px 18px;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.stat-card::before { display: none; }
.stat-card:hover { transform: none; box-shadow: var(--lift); border-color: var(--line-strong); }

.stat-card h3 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--ink);
    margin: 0 0 2px;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}

.stat-card p { color: var(--muted); font-size: 0.9rem; font-weight: 600; margin: 0; }

/* بطاقة تفتح قائمتها عند الضغط (عملي اليوم) */
.stat-card.is-link { cursor: pointer; }
.stat-card.is-link:hover { border-color: var(--brand); }
.stat-card.is-alert { border-color: rgba(185, 28, 28, 0.35); background: var(--danger-soft); }
.stat-card.is-alert h3 { color: var(--danger); }

/* ===================== الأزرار ===================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: var(--tap);
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
    box-shadow: none;
    filter: none;
    transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.btn-primary,
.view-toggle-bar .btn.active {
    background: var(--brand);
    color: var(--on-brand);
    border: 1px solid var(--brand);
    box-shadow: none;
}
.btn-primary:hover:not(:disabled) { background: var(--brand-hover); border-color: var(--brand-hover); filter: none; box-shadow: none; }

.btn-success,
.btn-approve {
    background: var(--ok);
    color: #fff;
    border: 1px solid var(--ok);
    box-shadow: none;
}
.btn-success:hover:not(:disabled), .btn-approve:hover:not(:disabled) { filter: brightness(0.92); box-shadow: none; }

.btn-danger,
.btn-reject {
    background: var(--danger);
    color: #fff;
    border: 1px solid var(--danger);
    box-shadow: none;
}
.btn-danger:hover:not(:disabled), .btn-reject:hover:not(:disabled) { filter: brightness(0.92); box-shadow: none; }

body.crm-dark .btn-success, body.crm-dark .btn-approve,
body.crm-dark .btn-danger, body.crm-dark .btn-reject { color: #111820; }

.btn-outline,
.btn-secondary {
    background: var(--card);
    color: var(--ink);
    border: 1px solid var(--line-strong);
    box-shadow: none;
}
.btn-outline:hover:not(:disabled),
.btn-secondary:hover:not(:disabled) { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-ink); }

.btn:disabled, .btn[disabled] { opacity: 0.5; cursor: not-allowed; filter: none; }

.btn-sm { min-height: 40px; padding: 8px 16px; font-size: 0.95rem; box-shadow: none; }
.btn-small { min-height: 36px; padding: 6px 14px; font-size: 0.9rem; }
.btn-xs { min-height: 34px; padding: 5px 12px; font-size: 0.88rem; border-radius: 8px; }

.btn-row { gap: 8px; }

/* ===================== الحقول والنماذج ===================== */

.form-group label {
    color: var(--ink-2);
    font-size: 0.92rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea,
.crm-toolbar input,
.crm-toolbar select,
.crm-note,
.wa-kind {
    font-size: 16px;
    color: var(--ink);
    background: var(--card);
    border: 1px solid var(--line-strong);
    border-radius: 10px;
}

.form-group input,
.form-group select,
.crm-toolbar input,
.crm-toolbar select { min-height: var(--tap); padding: 10px 14px; }

.form-group textarea { padding: 10px 14px; line-height: 1.7; }

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.crm-toolbar input:focus,
.crm-toolbar select:focus,
.crm-note:focus {
    outline: none;
    background: var(--card);
    border-color: var(--brand);
    box-shadow: var(--ring);
}

input[type="checkbox"], input[type="radio"] { accent-color: var(--brand); }

.form-group input:disabled, .form-group select:disabled { background: var(--soft); color: var(--muted); }

/* ===================== الشارات والرقائق ===================== */

.badge { font-weight: 700; font-size: 0.82rem; padding: 3px 10px; }
.badge-neutral { background: var(--soft); color: var(--ink-2); border-color: var(--line); }
.badge-green { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.badge-gold { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.badge-orange { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.badge-red { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.badge-blue { background: var(--info-soft); color: var(--info); border-color: transparent; }

.chip { color: var(--ink-2); border-color: var(--line-strong); background: var(--card); min-height: 36px; }
.chip:hover { border-color: var(--brand); }
.chip.on { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-ink); }
.chip input { accent-color: var(--brand); }

.chips { border: 1px solid var(--line-strong); background: var(--soft); }
.crm-chip-filter { border: 0; background: none; }

/* ===================== الجداول ===================== */

.users-table th,
.crm-table th {
    background: var(--soft);
    color: var(--ink-2);
    font-size: 0.88rem;
    font-weight: 700;
    border-bottom: 1px solid var(--line);
}

.users-table td, .crm-table td { border-bottom: 1px solid var(--line); }
.users-table tr:hover td { background: var(--soft); }

/* ===================== الإشعار والنافذة ===================== */

.notification {
    border-radius: var(--radius);
    padding: 14px 22px;
    font-weight: 600;
    color: var(--ink);
    background: var(--card);
    border: 1px solid var(--line);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.16);
    max-width: min(92vw, 560px);
}
.notification.success { border-right: 5px solid var(--ok); color: var(--ok); }
.notification.info { border-right: 5px solid var(--brand); color: var(--brand-ink); }
.notification.error { border-right: 5px solid var(--danger); color: var(--danger); }

.modal { background: rgba(15, 23, 42, 0.55); backdrop-filter: blur(4px); }
.modal-content { border-radius: 18px; padding: 28px; }
.modal-content h2.crm-modal-title { font-size: 1.25rem; margin-bottom: 18px; }
.modal-close { width: 40px; height: 40px; font-size: 1.6rem; top: 16px; left: 16px; }
.modal-close:hover { transform: none; }

/* ===================== حالات فارغة وأخطاء ===================== */

.crm-empty { color: var(--muted); font-weight: 600; padding: 32px 16px; }
.crm-error { background: var(--danger-soft); border-color: rgba(185, 28, 28, 0.3); color: var(--danger); }
.crm-warn-box { background: var(--warn-soft); border-color: rgba(180, 83, 9, 0.3); color: var(--warn); }
.crm-warn, .form-group .hint.crm-warn { color: var(--warn); }

/* ===================== الاتصال والواتساب بجانب الرقم ===================== */

.phone-cell { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; }
.phone-num { direction: ltr; unicode-bidi: isolate; font-variant-numeric: tabular-nums; }
.phone-act {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 3px 10px;
    border-radius: 999px;
    border: 1px solid var(--brand-line);
    background: var(--brand-soft);
    color: var(--brand-ink);
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}
.phone-act:hover { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
.phone-act.phone-wa { border-color: rgba(4, 120, 87, 0.3); background: var(--ok-soft); color: var(--ok); }
.phone-act.phone-wa:hover { background: var(--ok); color: #fff; border-color: var(--ok); }

/* ===================== شاشة الدخول ===================== */

.login-container { background: var(--page); }
.login-container::before { display: none; }

.login-box {
    background: var(--brand);
    width: min(100%, 420px);
    max-width: 420px;
    padding: 32px 28px 26px;
    border: 0;
    border-radius: 18px;
    box-shadow: 0 16px 48px rgba(15, 23, 42, 0.16);
}
.login-box::after { display: none; }

.login-logo { width: 72px; height: 72px; object-fit: cover; border-radius: 16px; margin: 0 auto 14px; filter: none; }

.login-box h1 { font-size: 1.5rem; font-weight: 700; letter-spacing: 0; line-height: 1.3; color: #fff; margin-bottom: 4px; }
.login-box > p { color: rgba(255, 255, 255, 0.85); font-size: 0.95rem; margin-bottom: 8px; }

.login-form { width: 100%; text-align: right; }
.login-box .form-group { margin-bottom: 16px; }
.login-box .form-group label { color: #f5f3ef; text-align: right; }
.login-box .form-group input { background: #fff; color: #0f172a; border: 1px solid transparent; }
.login-box .form-group input:focus { border-color: #fff; box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.45); }

.login-box .btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; width: 100%; margin-top: 6px; }
.login-box .btn-primary:hover:not(:disabled) { background: #7a5c31; border-color: #7a5c31; }

body.crm-dark .login-box { background: #1d3b40; }

.login-error {
    background: #fdecec;
    color: #991b1b;
    border: 1px solid rgba(185, 28, 28, 0.3);
    border-radius: 10px;
    padding: 10px 14px;
    font-weight: 600;
    margin-bottom: 14px;
}

/* ===================== صفحة العميل (crm/share.html) ===================== */

.share-page { max-width: 1040px; padding: 28px 16px 56px; }
/* ترويسة فاتحة بلا شريط داكن، كبقية النظام (طلب المالك 2026-10-06) */
.share-hero {
    text-align: center;
    padding: 24px 16px;
    margin-bottom: 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--card);
    color: var(--ink);
}
.share-hero h1 { color: var(--ink); font-size: 1.45rem; font-weight: 700; margin: 12px 0 6px; }
.share-hero p { color: var(--ink-2); margin: 0 0 6px; }
.share-hero .crm-subtle { color: var(--muted); }
.share-logo { width: 60px; height: 60px; border-radius: 14px; border: 1px solid var(--line); }

.share-grid { gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); }
.share-property {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--lift);
}
.share-property h2 { font-size: 1.15rem; font-weight: 700; margin: 0 0 2px; }
.share-location { color: var(--ink-2); margin: 0; }
.share-facts { color: var(--muted); margin: 0; }
.share-price {
    color: var(--accent);
    font-size: 1.35rem;
    font-weight: 700;
    margin: 12px 0 14px;
    font-variant-numeric: tabular-nums;
}
.share-property .btn { width: 100%; }
/* صورة العقار وأزراره: «أنا مهتم» أولاً، ثم الخريطة، ثم النسخ (029) */
.share-photo { display: block; width: calc(100% + 40px); max-width: none; margin: -20px -20px 10px; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 16px 16px 0 0; background: var(--soft); }
.share-actions { display: grid; gap: 8px; margin-top: auto; }
.share-broker { font-weight: 600; }

/* ===================== الجوال ===================== */

@media (max-width: 700px) {
    .container { padding: 10px 12px 16px; }

    /* ترويسة بسطر واحد: الشعار والاسم يميناً، والحساب والخروج يساراً */
    .header { flex-wrap: nowrap; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; margin-bottom: 10px; border-radius: 12px; }
    .header-content { min-width: 0; flex: 1 1 auto; }
    .header-brand { gap: 8px; min-width: 0; }
    .header-content h1 { font-size: 0.98rem; white-space: nowrap; }
    .header-content p { display: none; }
    .header-logo, .crm-logo { width: 34px; height: 34px; border-radius: 8px; }
    .user-info { flex-wrap: nowrap; gap: 6px; }
    .user-info { flex: 0 0 auto; }
    .user-badge { padding: 4px 9px; font-size: 0.78rem; white-space: nowrap; max-width: 104px; overflow: hidden; text-overflow: ellipsis; }
    .user-badge small { display: none; }
    .logout-btn { padding: 4px 10px; font-size: 0.78rem; min-height: 34px; }
    .theme-toggle { width: 34px; min-height: 34px; height: 34px; }

    .crm-card { padding: 16px 14px; margin-bottom: 12px; }
    .page-intro h1, .dashboard-intro h1 { font-size: 1.2rem; }

    /* بطاقات الأرقام: شريط من ثلاثة أعمدة صغيرة بدل خمس بطاقات تملأ الشاشة */
    .stats-bar { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
    .stat-card { padding: 10px; border-radius: 10px; }
    .stat-card h3 { font-size: 1.3rem; }
    .stat-card p { font-size: 0.74rem; line-height: 1.35; }

    /* النافذة تصعد من أسفل الشاشة بعرضها كله */
    .modal { align-items: flex-end; padding: 0; }
    .modal-content {
        width: 100%;
        max-width: 100%;
        max-height: 92vh;
        border-radius: 18px 18px 0 0;
        padding: 20px 16px calc(20px + env(safe-area-inset-bottom));
    }
    .modal-content h2.crm-modal-title { font-size: 1.1rem; padding-left: 48px; }

    .notification {
        top: auto;
        bottom: calc(80px + env(safe-area-inset-bottom));
        left: 12px;
        right: 12px;
        transform: none;
        max-width: none;
        animation: none;
    }

    /* شريط التنقل السفلي (الـCRM): يحل محل الشريط العلوي على الجوال */
    body.has-tabbar { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
    body.has-tabbar .crm-nav { display: none; }

    .tabbar {
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: minmax(0, 1fr);
        position: fixed;
        inset-inline: 0;
        bottom: 0;
        z-index: 60;
        gap: 2px;
        padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
        background: var(--card);
        border-top: 1px solid var(--line);
        box-shadow: 0 -4px 18px rgba(15, 23, 42, 0.07);
    }

    .tabbar a, .tabbar button {
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        min-height: 54px;
        padding: 4px 2px;
        border: 0;
        border-radius: 12px;
        background: none;
        color: var(--muted);
        font-size: 0.72rem;
        font-weight: 600;
        line-height: 1.2;
        text-align: center;
        text-decoration: none;
        cursor: pointer;
    }

    .tabbar a.active, .tabbar button.active { color: var(--brand-ink); background: var(--brand-soft); }
    .tabbar .nav-count { position: absolute; top: 2px; inset-inline-start: calc(50% + 6px); min-width: 18px; height: 18px; font-size: 0.68rem; padding: 0 4px; }

    .tab-icon {
        width: 22px;
        height: 22px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.8;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .nav-sheet {
        position: fixed;
        inset: 0;
        z-index: 59;
        background: rgba(15, 23, 42, 0.45);
    }
    .nav-sheet.open { display: block; }
    .nav-sheet-panel {
        position: absolute;
        inset-inline: 0;
        bottom: calc(66px + env(safe-area-inset-bottom));
        max-height: 70vh;
        overflow-y: auto;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        padding: 16px 14px;
        background: var(--card);
        border-radius: 18px 18px 0 0;
        box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.12);
    }
    .nav-sheet-panel a {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        min-height: 48px;
        padding: 10px 14px;
        border: 1px solid var(--line);
        border-radius: 12px;
        background: var(--soft);
        color: var(--ink);
        font-weight: 600;
        text-decoration: none;
    }
    .nav-sheet-panel a.active { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-ink); }

    /* الجداول بطاقات: كل صف بطاقة، وكل خانة سطر «التسمية … القيمة»، والأزرار ظاهرة دائماً */
    #view .crm-table-wrap { overflow: visible; }
    #view table.crm-table:not(.crm-table-keep),
    #view table.crm-table:not(.crm-table-keep) > tbody { display: block; width: 100%; min-width: 0; margin-top: 0; }
    #view table.crm-table:not(.crm-table-keep) > thead { display: none; }
    #view table.crm-table:not(.crm-table-keep) > tbody > tr {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 4px;
        padding: 12px 14px;
        margin-bottom: 10px;
        background: var(--card);
        border: 1px solid var(--line);
        border-radius: var(--radius);
        box-shadow: var(--lift);
    }
    #view table.crm-table:not(.crm-table-keep) > tbody > tr > td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        min-width: 0;
        padding: 3px 0;
        border: 0;
        background: none;
        text-align: start;
        overflow-wrap: anywhere;
    }
    #view table.crm-table:not(.crm-table-keep) > tbody > tr > td[data-label]::before {
        content: attr(data-label);
        flex: 0 0 auto;
        max-width: 45%;
        color: var(--muted);
        font-size: 0.82rem;
        font-weight: 600;
    }
    /* خانة الأرقام اتجاهها من اليسار، فيُعكس ترتيبها لتبقى التسمية يميناً كباقي الخانات */
    #view table.crm-table:not(.crm-table-keep) > tbody > tr > td.num { flex-direction: row-reverse; }
    #view table.crm-table:not(.crm-table-keep) > tbody > tr > td:empty { display: none; }
    #view table.crm-table:not(.crm-table-keep) > tbody > tr > td.cell-actions,
    #view table.crm-table:not(.crm-table-keep) > tbody > tr > td:not([data-label]):has(.btn) {
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 8px;
        margin-top: 6px;
        padding-top: 10px;
        border-top: 1px dashed var(--line);
        white-space: normal;
    }
    #view table.crm-table:not(.crm-table-keep) > tbody > tr > td .btn-xs { min-height: 40px; padding: 8px 18px; font-size: 0.95rem; }
    #view table.crm-table:not(.crm-table-keep) > tbody > tr:hover > td { background: none; }
    #view table.crm-table:not(.crm-table-keep) > tbody > tr.crm-total-row { background: var(--soft); }

    .share-hero { padding: 22px 14px; border-radius: 16px; }
    .share-hero h1 { font-size: 1.3rem; }
}

@media (prefers-reduced-motion: reduce) {
    .tabbar a, .nav-sheet, .modal-content, .notification { animation: none !important; transition: none !important; }
}

@media print {
    .tabbar, .nav-sheet, .crm-nav { display: none !important; }
    body.has-tabbar { padding-bottom: 0; }
}

/* القفز إلى قائمة من بطاقة رقم: لا تختفي بداية البطاقة خلف شريط التنقل الثابت */
#view .crm-card { scroll-margin-top: 84px; }
@media (max-width: 700px) { #view .crm-card { scroll-margin-top: 10px; } }

/* أضيق الجوالات: الاسم والشعار والخروج تكفي في الترويسة، واسم الحساب يبقى في «المزيد» */
@media (max-width: 420px) {
    .header .user-badge { display: none; }
}
.nav-sheet-who { grid-column: 1 / -1; padding: 0 4px 6px; color: var(--muted); font-size: 0.9rem; font-weight: 600; }

/* الجوال: أزرار الحفظ والإلغاء في آخر النافذة تبقى ظاهرة أسفلها أثناء التمرير، فلا يبحث الموظف عن «حفظ» */
@media (max-width: 700px) {
    .modal-content form > .btn-row-end:last-child,
    .modal-content > .btn-row-end:last-child {
        position: sticky;
        bottom: calc(-20px - env(safe-area-inset-bottom));
        z-index: 2;
        margin: 8px -16px calc(-20px - env(safe-area-inset-bottom));
        padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
        background: var(--card);
        border-top: 1px solid var(--line);
    }
    .modal-content form > .btn-row-end:last-child .btn,
    .modal-content > .btn-row-end:last-child .btn { flex: 1 1 0; min-height: 44px; }
}

/* مرشّحات تُطوى على الجوال (العقارات): على الكمبيوتر الغلاف شفاف فيبقى الشريط صفاً واحداً كما كان */
.crm-toolbar-extra { display: contents; }
.crm-filter-toggle { display: none; }
@media (max-width: 700px) {
    .crm-toolbar .crm-search { flex: 1 1 0; min-width: 0; }
    .crm-filter-toggle { display: inline-flex; flex: 0 0 auto; }
    .crm-filter-toggle[aria-expanded="true"] { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-ink); }
    .crm-toolbar-extra { display: none; }
    .crm-toolbar-extra.open { display: flex; flex-wrap: wrap; gap: 10px; width: 100%; }
    .crm-toolbar-extra.open > * { flex: 1 1 140px; }
}

/* ===================== جولة 2 (2026-10-05): أنماط مكوّنات عصرية بلا مكتبة =====================
   مستوحاة من مكتبات المكوّنات الحديثة (21st.dev / shadcn) ومن إرشادات مهارة ui-ux-pro-max، ومكتوبة بـ CSS عادي
   لأن الموقع بلا React ولا Tailwind: أيقونة في بطاقات الأرقام، حالات فارغة توجّه، هيكل رمادي أثناء التحميل،
   أيقونة بحث، ألسنة بشكل مفتاح مقسّم، ومساحات أرحب على الكمبيوتر. الأيقونات أقنعة SVG تأخذ لونها من الرموز. */

/* بطاقات الأرقام: أيقونة صغيرة في الطرف المقابل للرقم */
.stat-card[data-key] { padding-inline-end: 64px; }
.stat-card[data-key]::before {
    content: "";
    display: block;
    position: absolute;
    left: auto;
    right: auto;
    top: 16px;
    inset-inline-end: 16px;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--brand-soft);
}
.stat-card[data-key]::after {
    content: "";
    position: absolute;
    top: 24px;
    inset-inline-end: 24px;
    width: 20px;
    height: 20px;
    background-color: var(--brand);
    -webkit-mask: var(--stat-icon) center / contain no-repeat;
    mask: var(--stat-icon) center / contain no-repeat;
}
.stat-card.is-alert[data-key]::before { background: rgba(185, 28, 28, 0.12); }
.stat-card.is-alert[data-key]::after { background-color: var(--danger); }
.stat-card[data-key="follow_ups_today"] { --stat-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2024%2024'%20fill%3D'none'%20stroke%3D'black'%20stroke-width%3D'1.8'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'%3E%3Cpath%20d%3D'M8%202v4M16%202v4M3%209h18'%2F%3E%3Cpath%20d%3D'M5%204h14a2%202%200%200%201%202%202v13a2%202%200%200%201-2%202H5a2%202%200%200%201-2-2V6a2%202%200%200%201%202-2z'%2F%3E%3Cpath%20d%3D'M9%2015l2%202%204-4'%2F%3E%3C%2Fsvg%3E"); }
.stat-card[data-key="follow_ups_overdue"] { --stat-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2024%2024'%20fill%3D'none'%20stroke%3D'black'%20stroke-width%3D'1.8'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'%3E%3Cpath%20d%3D'M12%2021a9%209%200%201%200%200-18%209%209%200%200%200%200%2018z'%2F%3E%3Cpath%20d%3D'M12%207v5l3%202'%2F%3E%3C%2Fsvg%3E"); }
.stat-card[data-key="new_requirements_7d"] { --stat-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2024%2024'%20fill%3D'none'%20stroke%3D'black'%20stroke-width%3D'1.8'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'%3E%3Cpath%20d%3D'M22%2012h-6l-2%203h-4l-2-3H2'%2F%3E%3Cpath%20d%3D'M5.45%205.11L2%2012v6a2%202%200%200%200%202%202h16a2%202%200%200%200%202-2v-6l-3.45-6.89A2%202%200%200%200%2016.76%204H7.24a2%202%200%200%200-1.79%201.11z'%2F%3E%3C%2Fsvg%3E"); }
.stat-card[data-key="viewings_today"] { --stat-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2024%2024'%20fill%3D'none'%20stroke%3D'black'%20stroke-width%3D'1.8'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'%3E%3Cpath%20d%3D'M2%2012s3.5-7%2010-7%2010%207%2010%207-3.5%207-10%207S2%2012%202%2012z'%2F%3E%3Cpath%20d%3D'M12%2015a3%203%200%201%200%200-6%203%203%200%200%200%200%206z'%2F%3E%3C%2Fsvg%3E"); }
.stat-card[data-key="active_clients"] { --stat-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2024%2024'%20fill%3D'none'%20stroke%3D'black'%20stroke-width%3D'1.8'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'%3E%3Cpath%20d%3D'M16%2021v-2a4%204%200%200%200-4-4H6a4%204%200%200%200-4%204v2'%2F%3E%3Cpath%20d%3D'M9%2011a4%204%200%201%200%200-8%204%204%200%200%200%200%208z'%2F%3E%3Cpath%20d%3D'M22%2021v-2a4%204%200%200%200-3-3.87M16%203.13a4%204%200%200%201%200%207.75'%2F%3E%3C%2Fsvg%3E"); }
.stat-card[data-key="new_clients"] { --stat-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2024%2024'%20fill%3D'none'%20stroke%3D'black'%20stroke-width%3D'1.8'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'%3E%3Cpath%20d%3D'M16%2021v-2a4%204%200%200%200-4-4H6a4%204%200%200%200-4%204v2'%2F%3E%3Cpath%20d%3D'M9%2011a4%204%200%201%200%200-8%204%204%200%200%200%200%208z'%2F%3E%3Cpath%20d%3D'M19%208v6M22%2011h-6'%2F%3E%3C%2Fsvg%3E"); }
.stat-card[data-key="new_requirements"] { --stat-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2024%2024'%20fill%3D'none'%20stroke%3D'black'%20stroke-width%3D'1.8'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'%3E%3Cpath%20d%3D'M22%2012h-6l-2%203h-4l-2-3H2'%2F%3E%3Cpath%20d%3D'M5.45%205.11L2%2012v6a2%202%200%200%200%202%202h16a2%202%200%200%200%202-2v-6l-3.45-6.89A2%202%200%200%200%2016.76%204H7.24a2%202%200%200%200-1.79%201.11z'%2F%3E%3C%2Fsvg%3E"); }
.stat-card[data-key="requirements_matched"] { --stat-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2024%2024'%20fill%3D'none'%20stroke%3D'black'%20stroke-width%3D'1.8'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'%3E%3Cpath%20d%3D'M10%2013a5%205%200%200%200%207.54.54l3-3a5%205%200%200%200-7.07-7.07l-1.72%201.71'%2F%3E%3Cpath%20d%3D'M14%2011a5%205%200%200%200-7.54-.54l-3%203a5%205%200%200%200%207.07%207.07l1.71-1.71'%2F%3E%3C%2Fsvg%3E"); }
.stat-card[data-key="viewings"] { --stat-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2024%2024'%20fill%3D'none'%20stroke%3D'black'%20stroke-width%3D'1.8'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'%3E%3Cpath%20d%3D'M2%2012s3.5-7%2010-7%2010%207%2010%207-3.5%207-10%207S2%2012%202%2012z'%2F%3E%3Cpath%20d%3D'M12%2015a3%203%200%201%200%200-6%203%203%200%200%200%200%206z'%2F%3E%3C%2Fsvg%3E"); }
.stat-card[data-key="negotiations"] { --stat-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2024%2024'%20fill%3D'none'%20stroke%3D'black'%20stroke-width%3D'1.8'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'%3E%3Cpath%20d%3D'M21%2012a8%208%200%200%201-11.6%207.1L4%2020l1-4.6A8%208%200%201%201%2021%2012z'%2F%3E%3C%2Fsvg%3E"); }
.stat-card[data-key="won"] { --stat-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2024%2024'%20fill%3D'none'%20stroke%3D'black'%20stroke-width%3D'1.8'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'%3E%3Cpath%20d%3D'M8%2021h8M12%2017v4'%2F%3E%3Cpath%20d%3D'M7%204h10v5a5%205%200%200%201-10%200z'%2F%3E%3Cpath%20d%3D'M17%205h3v2a3%203%200%200%201-3%203M7%205H4v2a3%203%200%200%200%203%203'%2F%3E%3C%2Fsvg%3E"); }

/* حالة فارغة: أيقونة ورسالة في إطار منقّط بدل سطر رمادي */
.crm-empty {
    display: grid;
    justify-items: center;
    gap: 10px;
    padding: 34px 16px;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius);
    background: var(--soft);
    color: var(--ink-2);
    font-weight: 600;
    text-align: center;
}
.crm-empty::before {
    content: "";
    width: 40px;
    height: 40px;
    background-color: var(--muted);
    -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2024%2024'%20fill%3D'none'%20stroke%3D'black'%20stroke-width%3D'1.8'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'%3E%3Cpath%20d%3D'M21%208l-9-5-9%205%209%205%209-5z'%2F%3E%3Cpath%20d%3D'M3%208v8l9%205%209-5V8'%2F%3E%3Cpath%20d%3D'M12%2013v8'%2F%3E%3C%2Fsvg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2024%2024'%20fill%3D'none'%20stroke%3D'black'%20stroke-width%3D'1.8'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'%3E%3Cpath%20d%3D'M21%208l-9-5-9%205%209%205%209-5z'%2F%3E%3Cpath%20d%3D'M3%208v8l9%205%209-5V8'%2F%3E%3Cpath%20d%3D'M12%2013v8'%2F%3E%3C%2Fsvg%3E") center / contain no-repeat;
}

/* التحميل: هيكل رمادي ثابت مكان المحتوى (بلا قفز)، والنص تحته لمن لا يرى الهيكل */
.loading {
    padding: 22px 8px;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
}
.loading::after {
    content: "";
    display: block;
    order: -1;
    width: min(100%, 560px);
    height: 66px;
    margin: 0 auto 12px;
    border: 0;
    border-radius: 6px;
    background:
        linear-gradient(var(--line), var(--line)) right 0 top 0 / 100% 14px no-repeat,
        linear-gradient(var(--line), var(--line)) right 0 top 26px / 82% 14px no-repeat,
        linear-gradient(var(--line), var(--line)) right 0 top 52px / 60% 14px no-repeat;
    animation: mulaem-pulse 1.4s ease-in-out infinite;
}
.loading { display: flex; flex-direction: column; align-items: center; }
@keyframes mulaem-pulse { 50% { opacity: 0.45; } }

/* حقول البحث: عدسة في بدايتها */
input[type="search"] {
    background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2024%2024'%20fill%3D'none'%20stroke%3D'%235b6b7f'%20stroke-width%3D'2'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'%3E%3Cpath%20d%3D'M11%2019a8%208%200%201%200%200-16%208%208%200%200%200%200%2016z'%2F%3E%3Cpath%20d%3D'M21%2021l-4.3-4.3'%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-size: 18px;
    background-position: right 14px center;
    padding-inline-start: 42px !important;
}
body.crm-dark input[type="search"] { background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2024%2024'%20fill%3D'none'%20stroke%3D'%239aa6b2'%20stroke-width%3D'2'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'%3E%3Cpath%20d%3D'M11%2019a8%208%200%201%200%200-16%208%208%200%200%200%200%2016z'%2F%3E%3Cpath%20d%3D'M21%2021l-4.3-4.3'%2F%3E%3C%2Fsvg%3E"); }

/* الألسنة (ملف العميل ولوحة التحكم): مفتاح مقسّم، والنشط أبيض بارز؛ على الجوال صف يتمرر لا عمود */
.admin-tabs {
    display: inline-flex;
    flex-direction: row;
    gap: 4px;
    padding: 4px;
    background: var(--soft);
    border: 1px solid var(--line);
    border-radius: 12px;
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
}
.admin-tab {
    min-height: 38px;
    padding: 7px 16px;
    border-radius: 9px;
    color: var(--ink-2);
    font-size: 0.92rem;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
}
.admin-tab:hover { background: var(--card); color: var(--ink); }
.admin-tab.active {
    background: var(--card);
    color: var(--brand-ink);
    font-weight: 700;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
}
body.crm-dark .admin-tab.active { background: var(--brand-soft); }

/* الأزرار: رفعة خفيفة للأساسي، وضغطة محسوسة */
.btn { transition: background-color 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s, transform 0.1s; }
.btn-primary { box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08), 0 6px 14px -8px rgba(47, 95, 103, 0.6); }
.btn:not(:disabled):active { transform: translateY(1px); }

/* مساحات أرحب على الكمبيوتر */
@media (min-width: 701px) {
    .container { padding: 24px 28px; }
    .crm-card { padding: 24px 26px; margin-bottom: 20px; }
    .stats-bar { gap: 14px; margin-bottom: 20px; }
    .users-table th, .users-table td, .crm-table th, .crm-table td { padding: 14px 16px; }
    .form-grid { gap: 0 20px; }
}

/* الجوال: بطاقات الأرقام صغيرة، فلا أيقونات فيها */
@media (max-width: 700px) {
    .stat-card[data-key] { padding-inline-end: 10px; }
    .stat-card[data-key]::before, .stat-card[data-key]::after { display: none; }
    .admin-tabs { display: flex; width: 100%; }
    .admin-tab { flex: 1 0 auto; }
}

@media (prefers-reduced-motion: reduce) {
    .loading::after { animation: none; }
    .btn:not(:disabled):active { transform: none; }
}

/* استجابة اللمس في الشريط السفلي (قائمة فحص ui-ux-pro-max: «Tap feedback») */
@media (max-width: 700px) {
    .tabbar a:active, .tabbar button:active { background: var(--brand-soft); }
    .nav-sheet-panel a:active { border-color: var(--brand); }
}

/* الجوال في ملف العميل: قاعدة .kv (span:first-child / span:last-child) كانت تجعل الرقم رمادياً صغيراً في سطر وحده */
.kv span.phone-cell { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.kv span.phone-num { display: inline; margin: 0; color: var(--ink); font-size: 1em; font-weight: 700; }
