@layer screens {
/* [MIGRATED 2026-07-27] home-screen.css — تحقّق حسابى مسبق أثبت صفر تعارض محدّدات مع themes.css/a11y-responsive.css/base.html inline وصفر تعارض بين ملفات screens الثلاثة نفسها. */

/* ==========================================================================
   SWANCO ERP — Home Screen (Company Selection) — Light Redwood/Fiori style
   [ADDED 2026-07-23]
   ==========================================================================
   شاشة اختيار الشركة (s-home) — أعيد بناؤها بالكامل بألوان فاتحة متسقة مع
   design-tokens.css (بادئة --sw-)، بنمط بطاقات KPI شبيه بـ SAP Fiori
   Dynamic/KPI Tiles وOracle Redwood Cards بدل الكروت الداكنة القديمة
   (.co-card فى core_style.css — أُبقيت فى مكانها لتفادي كسر شاشات أخرى،
   لكن s-home لم يعد يستخدمها؛ كل الأصناف هنا مسبوقة بـ "hm-").
   ========================================================================== */

#s-home.hm-screen {
    background: linear-gradient(180deg, #F7FBF9 0%, #F3F8F5 100%);
}

/* ==========================================================================
   1. الرأس (Hero)
   ========================================================================== */

.hm-hero {
    width: 100%; position: relative; overflow: hidden;
    background: #FFFFFF;
    border-bottom: 1px solid var(--sw-neutral-200, #E6EAE9);
}

.hm-hero-bg {
    position: absolute; inset: 0; z-index: 0; pointer-events: none;
    background:
        radial-gradient(ellipse 55% 70% at 15% -10%, rgba(15,110,86,0.06) 0%, transparent 60%),
        radial-gradient(ellipse 35% 50% at 95% 60%, rgba(45,200,143,0.05) 0%, transparent 55%);
}

.hm-hero-inner { position: relative; z-index: 1; padding: 44px 32px 40px; }

/* [2026-07-23] هيدر متمركز: هوية بصرية + بحث فقط — لا بيانات مجمّعة
   عبر الشركات (راجع تعليق s-home فى base.html لسبب الحذف) */
.hm-hero-centered { display: flex; flex-direction: column; align-items: center; text-align: center; }

.hm-logo-mark { width: 50px; height: 50px; flex-shrink: 0; margin-bottom: 14px; filter: drop-shadow(0 8px 18px rgba(15,110,86,0.28)); }

.hm-brand-title { display: flex; align-items: baseline; gap: 9px; }
.hm-brand-title .hm-word {
    font-size: 24px; font-weight: 900; letter-spacing: .04em;
    background: linear-gradient(135deg, #0F6E56 0%, #2DC88F 55%, #8FE3C4 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hm-brand-title .hm-badge {
    font-size: 9.5px; font-weight: 800; color: var(--sw-primary-700, #0D5442);
    background: var(--sw-primary-50, #EFFAF8); border: 1px solid var(--sw-primary-200, #B6EDDF);
    border-radius: 999px; padding: 2px 8px;
}
.hm-brand-sub { font-size: 11.5px; color: var(--sw-text-secondary, #63746F); font-weight: 500; margin-top: 6px; }

/* شريط بحث بارز بنمط command-bar — يحل محل صف البيانات المحذوف */
.hm-hero-search {
    position: relative; width: 100%; max-width: 460px; margin-top: 26px;
}
.hm-hero-search i {
    position: absolute; inset-inline-end: 18px; top: 50%; transform: translateY(-50%);
    color: var(--sw-neutral-400, #ACB9B6); font-size: 16px; pointer-events: none;
}
.hm-hero-search input {
    width: 100%; height: 46px; padding: 0 46px 0 16px; border-radius: 999px;
    background: var(--sw-neutral-50, #FBFBFB); border: 1.5px solid var(--sw-neutral-200, #E6EAE9);
    color: var(--sw-text-primary, #1E2422); font-size: 13px; font-family: 'Cairo', sans-serif;
    outline: none; transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.hm-hero-search input:focus {
    border-color: var(--sw-primary-500, #1BB18C); background: #FFFFFF;
    box-shadow: 0 0 0 4px var(--sw-primary-50, #EFFAF8);
}

/* ==========================================================================
   2. عنوان الاختيار
   ========================================================================== */

.hm-select-row {
    width: 100%; max-width: 1280px; margin: 0 auto;
    padding: 22px 28px 8px; display: flex; align-items: center;
}
.hm-select-title { font-size: 15px; font-weight: 800; color: var(--sw-text-primary, #1E2422); }

/* ==========================================================================
   3. شبكة بطاقات الشركات (KPI Tiles)
   ========================================================================== */

.hm-grid {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px;
    width: 100%; max-width: 1280px; margin: 0 auto; padding: 16px 28px 24px;
}
@media (min-width: 900px)  { .hm-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1280px) { .hm-grid { grid-template-columns: repeat(5, 1fr); } }

.hm-card {
    position: relative; cursor: pointer; text-align: center;
    background: #FFFFFF; border: 1px solid var(--sw-neutral-200, #E6EAE9);
    border-radius: 18px; padding: 18px 14px 16px;
    box-shadow: var(--sw-shadow-sm, 0 1px 2px rgba(9,42,34,.06));
    transition: transform .2s var(--sw-ease-standard, ease), box-shadow .2s ease, border-color .2s ease;
    animation: hm-card-in .4s var(--sw-ease-standard, ease) both;
}
@keyframes hm-card-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.hm-card:hover {
    transform: translateY(-4px);
    border-color: var(--sw-primary-300, #81E4CB);
    box-shadow: var(--sw-shadow-lg, 0 12px 32px rgba(9,42,34,.12));
}
.hm-card:active { transform: translateY(-1px); }
.hm-card.is-locked { cursor: default; opacity: .55; filter: grayscale(0.6); }
.hm-card.is-locked:hover { transform: none; box-shadow: var(--sw-shadow-sm, 0 1px 2px rgba(9,42,34,.06)); border-color: var(--sw-neutral-200, #E6EAE9); }

.hm-card-badge {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 9.5px; font-weight: 700; color: var(--sw-primary-700, #0D5442);
    background: var(--sw-primary-50, #EFFAF8); border: 1px solid var(--sw-primary-200, #B6EDDF);
    border-radius: 999px; padding: 2px 9px; margin-bottom: 10px;
}
.hm-card-badge-spacer { height: 20px; margin-bottom: 10px; }

.hm-logo-wrap {
    width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    background: var(--sw-neutral-50, #FBFBFB); border: 1px solid var(--sw-neutral-200, #E6EAE9);
    overflow: hidden; transition: transform .2s ease, border-color .2s ease;
}
.hm-card:hover .hm-logo-wrap { transform: translateY(-2px); border-color: var(--sw-primary-300, #81E4CB); }
.hm-logo-wrap img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }

.hm-monogram {
    width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 900; font-size: 24px; color: #FFFFFF;
    box-shadow: var(--sw-shadow-md, 0 4px 14px rgba(9,42,34,.08));
    transition: transform .2s ease;
}
.hm-card:hover .hm-monogram { transform: translateY(-2px) scale(1.04); }

.hm-card-name { font-size: 13.5px; font-weight: 800; color: var(--sw-text-primary, #1E2422); line-height: 1.35; min-height: 36px; }
.hm-card-type { font-size: 10.5px; color: var(--sw-text-secondary, #63746F); margin: 3px 0 12px; }

.hm-card-stats { display: flex; gap: 7px; }
.hm-mini-stat {
    flex: 1; border-radius: 10px; padding: 6px 4px;
    background: var(--sw-neutral-50, #FBFBFB); border: 1px solid var(--sw-neutral-200, #E6EAE9);
}
.hm-mini-stat.is-active { background: var(--sw-primary-50, #EFFAF8); border-color: var(--sw-primary-200, #B6EDDF); }
.hm-mini-stat .hm-mini-icon { font-size: 12px; color: var(--sw-primary-600, #0F6E56); }
.hm-mini-stat.is-locked .hm-mini-icon { color: var(--sw-neutral-400, #ACB9B6); }
.hm-mini-stat .hm-mini-val { font-size: 12.5px; font-weight: 800; color: var(--sw-text-primary, #1E2422); }
.hm-mini-stat .hm-mini-label { font-size: 9px; color: var(--sw-text-secondary, #63746F); margin-top: 1px; }

.hm-card-arrow {
    margin-top: 10px; color: var(--sw-neutral-400, #ACB9B6); transition: color .15s ease, transform .15s ease;
}
.hm-card:hover .hm-card-arrow { color: var(--sw-primary-600, #0F6E56); transform: translateX(-2px); }

/* ==========================================================================
   4. تذييل
   ========================================================================== */

.hm-footer { width: 100%; max-width: 1280px; margin: 0 auto; padding: 8px 28px 28px; text-align: center; }
.hm-footer-text { font-size: 9.5px; color: var(--sw-neutral-400, #ACB9B6); letter-spacing: .03em; }

@media (prefers-reduced-motion: reduce) {
    .hm-card { animation: none !important; }
}


} /* end @layer screens [MIGRATED 2026-07-27] */
