/* ===================================================
   الصيانة الآمنة - نظام التصميم الرئيسي
   Safe Maintenance Design System
   =================================================== */

/* ---- Google Fonts ---- */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800;900&display=swap');
/* ---- CSS Variables (Design Tokens) ---- */
:root {
    /* Primary Palette */
    --primary:       #1d4ed8;
    --primary-hover: #1e40af;
    --primary-light: #eff6ff;
    --primary-muted: rgba(29,78,216,0.08);

    /* Accent */
    --accent:        #f59e0b;
    --accent-hover:  #d97706;
    --accent-light:  #fffbeb;

    /* Status */
    --success:       #059669;
    --success-light: #ecfdf5;
    --danger:        #dc2626;
    --danger-light:  #fef2f2;
    --warning:       #d97706;
    --warning-light: #fffbeb;
    --info:          #0284c7;
    --info-light:    #f0f9ff;

    /* Neutrals */
    --dark:          #0f172a;
    --body-bg:       #f8fafc;
    --card-bg:       #ffffff;
    --border:        #e2e8f0;
    --border-focus:  #1d4ed8;
    --text-main:     #1e293b;
    --text-muted:    #64748b;
    --text-light:    #94a3b8;

    /* Spacing */
    --radius-sm:  6px;
    --radius:     10px;
    --radius-lg:  16px;
    --radius-xl:  24px;

    /* Shadows */
    --shadow-xs:  0 1px 2px rgba(0,0,0,.05);
    --shadow-sm:  0 2px 8px rgba(15,23,42,.07);
    --shadow:     0 4px 16px rgba(15,23,42,.10);
    --shadow-lg:  0 12px 32px rgba(15,23,42,.14);
    --shadow-xl:  0 24px 48px rgba(15,23,42,.18);

    /* Transition */
    --transition: all 0.28s cubic-bezier(0.4,0,0.2,1);
    --transition-fast: all 0.18s cubic-bezier(0.4,0,0.2,1);
    --transition-slow: all 0.45s cubic-bezier(0.4,0,0.2,1);

    /* Navbar height */
    --navbar-h:   70px;
}

/* ===================================================
   Base
   =================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Cairo', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    direction: rtl;
    background-color: var(--body-bg);
    color: var(--text-main);
    line-height: 1.7;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; transition: var(--transition); }
img { max-width: 100%; }
ul { list-style: none; padding: 0; margin: 0; }

/* ===================================================
   Typography helpers
   =================================================== */
.section-tag {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .8px;
    text-transform: uppercase;
    padding: 4px 14px;
    border-radius: 50px;
    margin-bottom: 1rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: .5rem;
    line-height: 1.3;
}

.section-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.8;
}

/* ===================================================
   Navbar
   =================================================== */
.navbar-safe {
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid var(--border);
    height: var(--navbar-h);
    position: sticky;
    top: 0;
    z-index: 1040;
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.navbar-safe.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.10);
    border-bottom-color: #cbd5e1;
}

.navbar-safe .container-xl {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

/* Logo */
.nav-logo {
    display: flex;
    align-items: center;
    gap: .625rem;
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--dark);
    white-space: nowrap;
    text-decoration: none;
}

.nav-logo .logo-icon {
    width: 40px;
    height: 40px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.nav-logo .logo-img {
    width: 48px;
    height: 48px;
    max-width: 48px;
    max-height: 48px;
    border-radius: 50%;
    object-fit: contain;
    flex-shrink: 0;
    display: block;
}

.auth-logo-img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    margin: 0 auto 1rem;
    border: 3px solid rgba(255,255,255,.3);
}

.nav-logo .logo-sub {
    font-size: .68rem;
    color: var(--text-muted);
    font-weight: 500;
    display: block;
    line-height: 1;
}

/* Nav links */
.nav-links {
    display: flex;
    align-items: center;
    gap: .25rem;
}

.nav-links a {
    display: flex;
    align-items: center;
    gap: .4rem;
    padding: .45rem .9rem;
    border-radius: var(--radius-sm);
    font-size: .88rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: var(--transition);
    text-decoration: none;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: .9rem;
    left: .9rem;
    height: 2px;
    border-radius: 2px;
    background: var(--primary);
    transform: scaleX(0);
    transition: transform 0.25s cubic-bezier(0.4,0,0.2,1);
    transform-origin: center;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    transform: scaleX(1);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
    background: var(--primary-light);
}

.nav-links a i { font-size: .85rem; }

/* Nav actions */
.nav-actions { display: flex; align-items: center; gap: .5rem; }

/* Hamburger */
.nav-toggle {
    display: none;
    width: 38px;
    height: 38px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: none;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    font-size: 1.1rem;
}

/* Mobile menu */
.nav-mobile {
    display: none;
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: .75rem 1rem;
    position: absolute;
    top: var(--navbar-h);
    left: 0;
    right: 0;
    z-index: 1039;
    box-shadow: var(--shadow);
    max-height: calc(100vh - var(--navbar-h));
    overflow-y: auto;
}

.nav-mobile.open { display: block; }

/* ── رأس القائمة ── */
.nm-header {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .85rem 1rem .9rem;
    background: linear-gradient(135deg, var(--primary) 0%, #1d4ed8 100%);
    border-radius: 14px;
    margin-bottom: .85rem;
}
.nm-header-avatar {
    width: 42px; height: 42px;
    border-radius: 50%;
    background: rgba(255,255,255,.22);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.05rem; color: #fff; flex-shrink: 0;
    border: 2px solid rgba(255,255,255,.35);
}
.nm-header-info { flex: 1; min-width: 0; }
.nm-header-name  { font-weight: 700; font-size: .9rem; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nm-header-role  { font-size: .72rem; color: rgba(255,255,255,.7); margin-top: .08rem; }
.nm-close-btn {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,.18);
    border: none; color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: .82rem; cursor: pointer; flex-shrink: 0;
    transition: background .18s;
}
.nm-close-btn:hover { background: rgba(255,255,255,.35); }

/* ── عنوان المجموعة ── */
.nm-grid-label {
    font-size: .67rem;
    font-weight: 800;
    color: #94a3b8;
    letter-spacing: .8px;
    text-transform: uppercase;
    padding: .55rem .25rem .3rem;
}

/* ── شبكة المربعات ── */
.nm-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .42rem;
    margin-bottom: .35rem;
}
.nm-grid a {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: .3rem !important;
    padding: .72rem .35rem !important;
    border-radius: 14px !important;
    border: 1.5px solid var(--border) !important;
    background: #f8fafc !important;
    color: #475569 !important;
    font-size: .68rem !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    text-align: center !important;
    text-decoration: none !important;
    transition: all .18s !important;
    margin-bottom: 0 !important;
    min-height: unset !important;
    position: relative;
}
.nm-grid a i {
    font-size: 1.1rem !important;
    display: block;
    width: auto !important;
}
.nm-grid a:hover {
    border-color: #bfdbfe !important;
    background: #eff6ff !important;
    color: var(--primary) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59,130,246,.14) !important;
}
.nm-grid a.nm-grid-logout {
    background: #fff5f5 !important;
    color: var(--danger, #dc2626) !important;
    border-color: #fecaca !important;
}
.nm-grid a.nm-grid-logout:hover {
    background: var(--danger, #dc2626) !important;
    color: #fff !important;
    border-color: var(--danger, #dc2626) !important;
}

.nav-mobile a:hover { color: var(--primary); background: var(--primary-light); }

/* ── Mobile nav enhancements ── */
.nm-user {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .65rem .75rem .5rem;
    font-weight: 700;
    font-size: .92rem;
    color: var(--text-main);
}
.nm-user i { font-size: 1.3rem; color: var(--primary); }
.nm-divider { height: 1px; background: var(--border); margin: .3rem 0; }
.nm-section-label {
    padding: .45rem .75rem .15rem;
    font-size: .72rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .05em;
    display: flex;
    align-items: center;
    gap: .4rem;
}
.nm-lang-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .3rem;
    padding: .3rem .5rem .5rem;
}
.nm-lang-btn {
    padding: .5rem .4rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: none;
    font-family: inherit;
    font-size: .82rem;
    cursor: pointer;
    color: var(--text-main);
    transition: background .18s, border-color .18s;
    text-align: center;
}
.nm-lang-btn:hover,
.nm-lang-btn.active {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary);
    font-weight: 700;
}

/* ===================================================
   Buttons
   =================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    padding: .6rem 1.4rem;
    font-size: .9rem;
    font-weight: 700;
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    line-height: 1.4;
    white-space: nowrap;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0);
    transition: background 0.2s ease;
}

.btn:active::before {
    background: rgba(255,255,255,0.12);
}

.btn i { font-size: .85rem; }

.btn-primary {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}
.btn-primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    box-shadow: 0 4px 14px rgba(29,78,216,.35);
    transform: translateY(-1px);
    color: white;
}

.btn-outline-primary {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}
.btn-outline-primary:hover {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 14px rgba(29,78,216,.25);
    transform: translateY(-1px);
}

.btn-success {
    background: var(--success);
    color: white;
    border-color: var(--success);
}
.btn-success:hover {
    background: #047857;
    border-color: #047857;
    box-shadow: 0 4px 14px rgba(5,150,105,.35);
    transform: translateY(-1px);
    color: white;
}

.btn-accent {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}
.btn-accent:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    box-shadow: 0 4px 14px rgba(245,158,11,.35);
    transform: translateY(-1px);
    color: white;
}

.btn-ghost {
    background: var(--body-bg);
    color: var(--text-main);
    border-color: var(--border);
}
.btn-ghost:hover {
    background: #fff;
    border-color: var(--text-muted);
    color: var(--text-main);
}

.btn-danger {
    background: var(--danger);
    color: white;
    border-color: var(--danger);
}
.btn-danger:hover {
    background: #b91c1c;
    border-color: #b91c1c;
    color: white;
}

.btn-sm { padding: .4rem 1rem; font-size: .82rem; }
.btn-lg { padding: .8rem 2rem; font-size: 1rem; }
.btn-xl { padding: 1rem 2.5rem; font-size: 1.05rem; border-radius: var(--radius); }

.btn-block { width: 100%; }

/* ===================================================
   Cards
   =================================================== */
.card-safe {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
}

.card-safe:hover {
    box-shadow: var(--shadow-lg);
    border-color: #cbd5e1;
    transform: translateY(-3px);
}

.card-safe .card-body { padding: 1.75rem; }
.card-safe .card-header-safe {
    padding: 1.25rem 1.75rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: .75rem;
}

.card-safe .card-header-safe h5 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-main);
}

/* ===================================================
   Forms
   =================================================== */
.form-label-safe {
    display: block;
    font-size: .88rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: .45rem;
}

.form-label-safe i {
    color: var(--primary);
    margin-left: .35rem;
}

.form-control-safe {
    width: 100%;
    padding: .7rem 1rem;
    font-size: .92rem;
    font-family: inherit;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--text-main);
    transition: var(--transition);
    line-height: 1.5;
}

.form-control-safe::placeholder { color: var(--text-light); }

.form-control-safe:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(29,78,216,.10);
    background: #fafcff;
}

textarea.form-control-safe { resize: vertical; min-height: 110px; }

select.form-control-safe { cursor: pointer; }

.form-group-safe { margin-bottom: 1.25rem; }

/* Input group with icon */
.input-icon-wrap { position: relative; }
.input-icon-wrap .form-control-safe { padding-right: 2.6rem; }
.input-icon-wrap .input-icon {
    position: absolute;
    right: .85rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: .9rem;
    pointer-events: none;
}

/* ===================================================
   Badges & Pills
   =================================================== */
.badge-safe {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .25rem .75rem;
    border-radius: 50px;
    font-size: .75rem;
    font-weight: 700;
}

.badge-primary   { background: var(--primary-light); color: var(--primary); }
.badge-success   { background: var(--success-light); color: var(--success); }
.badge-danger    { background: var(--danger-light);  color: var(--danger); }
.badge-warning   { background: var(--warning-light); color: var(--warning); }
.badge-info      { background: var(--info-light);    color: var(--info); }
.badge-muted     { background: #f1f5f9;              color: var(--text-muted); }

/* Status dot */
.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-left: .4rem;
}

.dot-success { background: var(--success); }
.dot-warning { background: var(--warning); }
.dot-danger  { background: var(--danger); }
.dot-muted   { background: var(--text-light); }

/* ===================================================
   Stars Rating
   =================================================== */
.stars { display: inline-flex; align-items: center; gap: .15rem; }
.stars i { color: var(--accent); font-size: .9rem; }
.stars .star-empty { color: #cbd5e1; }
.stars-count { font-size: .82rem; color: var(--text-muted); margin-right: .35rem; font-weight: 600; }

/* ===================================================
   Alert
   =================================================== */
.alert-safe {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    border: 1px solid;
    margin-bottom: 1.25rem;
    font-size: .9rem;
    animation: fadeSlideDown .3s ease;
}

.alert-safe i { font-size: 1rem; margin-top: .1rem; flex-shrink: 0; }

.alert-success-safe { background: var(--success-light); color: #065f46; border-color: #a7f3d0; }
.alert-error-safe   { background: var(--danger-light);  color: #991b1b; border-color: #fca5a5; }
.alert-warning-safe { background: var(--warning-light); color: #92400e; border-color: #fcd34d; }
.alert-info-safe    { background: var(--info-light);    color: #0c4a6e; border-color: #7dd3fc; }

@keyframes fadeSlideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ===================================================
   Hero Section
   =================================================== */
.hero-section {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 55%, #1d4ed8 100%);
    color: white;
    padding: 6rem 0 5rem;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(29,78,216,.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(245,158,11,.15) 0%, transparent 40%);
    pointer-events: none;
}

.hero-section .hero-tag {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.2);
    color: rgba(255,255,255,.9);
    font-size: .8rem;
    font-weight: 600;
    padding: .35rem 1rem;
    border-radius: 50px;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(4px);
}

.hero-section h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 1.25rem;
    color: white;
}

.hero-section h1 span { color: var(--accent); }

.hero-section .hero-desc {
    font-size: 1.05rem;
    color: rgba(255,255,255,.8);
    max-width: 540px;
    line-height: 1.9;
    margin-bottom: 2rem;
}

.hero-stats {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 1.5rem;
    margin-top: 2.5rem;
    align-items: center;
    justify-content: center;
}

@media (min-width: 992px) {
    .hero-stats { justify-content: flex-start; }
}

.hero-stat { text-align: center; flex: 1; min-width: 0; }
.hero-stat .stat-num {
    font-size: 1.75rem;
    font-weight: 900;
    color: white;
    display: block;
    line-height: 1;
}
.hero-stat .stat-label {
    font-size: .78rem;
    color: rgba(255,255,255,.65);
    margin-top: .2rem;
    font-weight: 500;
}

.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-cards-demo {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    max-width: 340px;
}

.demo-card {
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.15);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    gap: 1rem;
}

@media (min-width: 992px) {
    .hero-cards-demo .demo-card {
        animation: softFloat 5.5s ease-in-out infinite;
    }

    .hero-cards-demo .demo-card:nth-child(2) {
        animation-delay: .6s;
    }

    .hero-cards-demo .demo-card:nth-child(3) {
        animation-delay: 1.2s;
    }
}

.demo-card .demo-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.demo-card .demo-info h6 {
    color: white;
    font-size: .9rem;
    font-weight: 700;
    margin: 0 0 .15rem;
}

.demo-card .demo-info small { color: rgba(255,255,255,.6); font-size: .78rem; }

/* ===================================================
   How It Works - Steps
   =================================================== */
.steps-section { padding: 5rem 0; }

.step-item {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    transition: var(--transition);
    position: relative;
}

.step-item:hover { background: #fff; box-shadow: var(--shadow); }

.step-num {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 1.1rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 2px solid var(--primary);
}

.step-item h5 {
    font-size: .95rem;
    font-weight: 700;
    margin-bottom: .3rem;
    color: var(--text-main);
}

.step-item p {
    font-size: .86rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.7;
}

/* ===================================================
   Service Cards
   =================================================== */
.service-card-safe {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem 1.5rem;
    text-align: center;
    transition: var(--transition);
    height: 100%;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.service-card-safe::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transform: scaleX(0);
    transition: var(--transition);
    transform-origin: right;
}

.service-card-safe:hover::after { transform: scaleX(1); }

.service-card-safe:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: #cbd5e1;
}

.service-icon-wrap {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 1.6rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    transition: var(--transition);
}

.service-card-safe:hover .service-icon-wrap {
    background: var(--primary);
    color: white;
    transform: scale(1.08);
}

.service-card-safe h5 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: .5rem;
    color: var(--text-main);
}

.service-card-safe p {
    font-size: .86rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    line-height: 1.7;
    flex: 1;
}

/* ===================================================
   Technician Card
   =================================================== */
.tech-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: var(--transition);
}

.tech-card:hover {
    box-shadow: var(--shadow);
    border-color: #cbd5e1;
    transform: translateY(-2px);
}

.tech-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-weight: 700;
    border: 2px solid var(--border);
}

/* غلاف الصورة + التاق */
.tech-avatar-wrap {
    position: relative;
    flex-shrink: 0;
    width: 64px;
}

/* تاق التوثيق */
.verify-badge {
    position: absolute;
    bottom: -6px;
    right: 50%;
    transform: translateX(50%);
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 7px;
    border-radius: 20px;
    font-size: .63rem;
    font-weight: 700;
    white-space: nowrap;
    border: 1.5px solid;
    line-height: 1.4;
    box-shadow: 0 1px 4px rgba(0,0,0,.12);
}
.verify-badge.verified   { background: #d1fae5; color: #065f46; border-color: #6ee7b7; }
.verify-badge.unverified { background: #fef3c7; color: #92400e; border-color: #fcd34d; }

.tech-info { flex: 1; min-width: 0; }

.tech-info h5 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: .2rem;
    color: var(--text-main);
}

.tech-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: .5rem;
    align-items: center;
}

.tech-price {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--success);
}

.tech-price small {
    font-size: .75rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ===================================================
   Dashboard Layout
   =================================================== */
.dashboard-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: calc(100vh - var(--navbar-h));
    gap: 0;
}

/* Sidebar */
.dashboard-sidebar {
    background: #fff;
    border-left: 1px solid var(--border);
    padding: 1.5rem 0;
    position: sticky;
    top: var(--navbar-h);
    height: calc(100vh - var(--navbar-h));
    overflow-y: auto;
}

.sidebar-user {
    padding: 1.25rem 1.5rem 1.5rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1rem;
    text-align: center;
}

.sidebar-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    font-size: 1.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto .75rem;
    font-weight: 700;
}

.sidebar-user .user-name {
    font-size: .95rem;
    font-weight: 700;
    color: var(--text-main);
    display: block;
}

.sidebar-user .user-role {
    font-size: .78rem;
    color: var(--text-muted);
    margin-top: .2rem;
    display: block;
}

.sidebar-nav { padding: 0 .75rem; }

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .65rem .9rem;
    border-radius: var(--radius-sm);
    font-size: .88rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: .2rem;
    transition: var(--transition);
    text-decoration: none;
}

.sidebar-nav a i { width: 18px; text-align: center; font-size: .9rem; }

.sidebar-nav a:hover,
.sidebar-nav a.active {
    color: var(--primary);
    background: var(--primary-light);
}

.sidebar-nav a.active { font-weight: 700; }

.sidebar-nav .nav-section-label {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: var(--text-light);
    padding: 1rem .9rem .4rem;
    display: block;
}

/* Dashboard main */
.dashboard-main {
    background: var(--body-bg);
    padding: 2rem;
    overflow-y: auto;
}

/* Stat cards */
.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: var(--transition);
    height: 100%;
}

.stat-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.stat-icon.blue   { background: var(--primary-light);  color: var(--primary); }
.stat-icon.green  { background: var(--success-light);  color: var(--success); }
.stat-icon.amber  { background: var(--warning-light);  color: var(--warning); }
.stat-icon.red    { background: var(--danger-light);   color: var(--danger); }
.stat-icon.sky    { background: var(--info-light);     color: var(--info); }

.stat-info { flex: 1; min-width: 0; }

.stat-info .stat-value {
    font-size: 1.65rem;
    font-weight: 900;
    color: var(--text-main);
    line-height: 1;
    display: block;
    margin-bottom: .3rem;
}

.stat-info .stat-label {
    font-size: .82rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ===================================================
   Order / Request Table
   =================================================== */
.orders-table {
    width: 100%;
    border-collapse: collapse;
}

.orders-table th {
    font-size: .8rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .5px;
    padding: .75rem 1rem;
    background: #f8fafc;
    border-bottom: 1px solid var(--border);
    text-align: right;
    white-space: nowrap;
}

.orders-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    font-size: .88rem;
    color: var(--text-main);
    vertical-align: middle;
}

.orders-table tr:last-child td { border-bottom: none; }

.orders-table tr:hover td { background: #f8fafc; }

/* ===================================================
   Notification Item
   =================================================== */
.notif-item {
    display: flex;
    align-items: flex-start;
    gap: .9rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
    cursor: pointer;
}

.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: #f8fafc; }
.notif-item.unread { background: var(--primary-light); }

.notif-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .9rem;
    flex-shrink: 0;
}

.notif-text h6 {
    font-size: .88rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0 0 .2rem;
}

.notif-text p { font-size: .82rem; color: var(--text-muted); margin: 0 0 .15rem; line-height: 1.5; }
.notif-text time { font-size: .75rem; color: var(--text-light); }

/* ===================================================
   Auth Pages
   =================================================== */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: stretch;
}

.auth-page .auth-visual {
    animation: authSlideVisual .55s cubic-bezier(.22,.61,.36,1);
}

.auth-page .auth-form-wrap {
    animation: authSlideForm .55s cubic-bezier(.22,.61,.36,1);
}

.auth-visual {
    flex: 1;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 50%, #1d4ed8 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    position: relative;
    overflow: hidden;
}

.auth-visual::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 70%, rgba(245,158,11,.15) 0%, transparent 50%);
    pointer-events: none;
}

.auth-visual .brand-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 3rem;
    position: relative;
    z-index: 1;
}

.auth-visual .brand-logo .logo-box {
    width: 72px;
    height: 72px;
    background: rgba(255,255,255,.15);
    border: 2px solid rgba(255,255,255,.25);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    backdrop-filter: blur(8px);
}

.auth-visual .brand-logo h2 {
    color: white;
    font-size: 1.5rem;
    font-weight: 800;
    text-align: center;
    margin: 0;
}

.auth-visual .brand-logo span {
    color: rgba(255,255,255,.6);
    font-size: .8rem;
    font-weight: 500;
}

.auth-features {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 320px;
}

.auth-feature-item {
    display: flex;
    align-items: center;
    gap: .9rem;
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    margin-bottom: .75rem;
    backdrop-filter: blur(4px);
}

.auth-feature-item {
    animation: authFadeUp .5s ease both;
}

.auth-feature-item:nth-child(2) { animation-delay: .08s; }
.auth-feature-item:nth-child(3) { animation-delay: .16s; }
.auth-feature-item:nth-child(4) { animation-delay: .24s; }

.auth-feature-item i {
    font-size: 1.2rem;
    color: var(--accent);
    flex-shrink: 0;
}

.auth-feature-item span {
    font-size: .88rem;
    color: rgba(255,255,255,.85);
    font-weight: 500;
}

.auth-form-wrap {
    flex: 0 0 480px;
    background: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3rem 3.5rem;
    overflow-y: auto;
}

.auth-form-wrap .auth-header { margin-bottom: 2.25rem; }

.auth-form-wrap .auth-header h3 {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: .4rem;
}

.auth-form-wrap .auth-header p {
    font-size: .9rem;
    color: var(--text-muted);
    margin: 0;
}

.auth-form-wrap .form-group-safe,
.auth-form-wrap .role-selector,
.auth-form-wrap button[type="submit"],
.auth-form-wrap .auth-divider,
.auth-form-wrap p.text-center,
.auth-form-wrap #formSection,
.auth-form-wrap #successSection,
.auth-form-wrap #actionButtons,
.auth-form-wrap .info-steps,
.auth-form-wrap .rejection-box {
    animation: authFadeUp .45s ease both;
}

.auth-form-wrap .form-group-safe:nth-of-type(2) { animation-delay: .06s; }
.auth-form-wrap .form-group-safe:nth-of-type(3) { animation-delay: .12s; }

.pending-card {
    animation: pendingPop .55s cubic-bezier(.22,.61,.36,1);
}

.pending-card .status-icon {
    animation: softFloat 4.8s ease-in-out infinite;
}

@keyframes authSlideVisual {
    from {
        opacity: 0;
        transform: translateX(24px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes authSlideForm {
    from {
        opacity: 0;
        transform: translateX(-24px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes authFadeUp {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes pendingPop {
    from {
        opacity: 0;
        transform: translateY(16px) scale(.98);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
    color: var(--text-light);
    font-size: .82rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.role-selector {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: .75rem;
    margin-bottom: 1.5rem;
}

.role-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .5rem;
    padding: 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    background: #fff;
}

.role-option i { font-size: 1.5rem; color: var(--text-muted); }
.role-option span { font-size: .85rem; font-weight: 600; color: var(--text-muted); }

.role-option:hover { border-color: var(--primary); background: var(--primary-light); }
.role-option:hover i, .role-option:hover span { color: var(--primary); }

.role-option input[type="radio"] { display: none; }

.role-option.selected {
    border-color: var(--primary);
    background: var(--primary-light);
}

.role-option.selected i,
.role-option.selected span { color: var(--primary); }

/* ===================================================
   Section: Why Us / Features
   =================================================== */
.feature-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem 1.5rem;
    transition: var(--transition);
    height: 100%;
}

.feature-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-3px);
    border-color: #cbd5e1;
}

.feature-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.feature-card h5 {
    font-size: .98rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: .5rem;
}

.feature-card p {
    font-size: .86rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.75;
}

/* ===================================================
   CTA Section
   =================================================== */
.cta-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    border-radius: var(--radius-xl);
    padding: 4rem 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin: 4rem 0;
}

.cta-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 80% 20%, rgba(255,255,255,.1) 0%, transparent 50%);
    pointer-events: none;
}

.cta-section::after {
    content: '';
    position: absolute;
    inset: -30% -20%;
    background: linear-gradient(120deg, transparent 35%, rgba(255,255,255,.14) 50%, transparent 65%);
    transform: translateX(-70%);
    animation: ctaShimmer 6.5s linear infinite;
    pointer-events: none;
}

.cta-section h2 {
    font-size: 2rem;
    font-weight: 800;
    color: white;
    margin-bottom: .75rem;
}

.cta-section p {
    font-size: 1rem;
    color: rgba(255,255,255,.8);
    margin-bottom: 2rem;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

/* ===================================================
   Motion Effects (Public Pages)
   =================================================== */
.reveal-ready {
    opacity: 0;
    transform: translateY(18px) scale(.985);
    transition: opacity .55s ease, transform .55s cubic-bezier(.22,.61,.36,1);
    transition-delay: var(--reveal-delay, 0ms);
}

.reveal-ready.reveal-left {
    transform: translateX(22px);
}

.reveal-ready.reveal-right {
    transform: translateX(-22px);
}

.reveal-ready.reveal-zoom {
    transform: scale(.94);
}

.reveal-ready.in-view {
    opacity: 1;
    transform: none;
}

.feature-card,
.service-card-safe,
.step-item,
.demo-card {
    will-change: transform;
}

@keyframes softFloat {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-7px);
    }
}

@keyframes ctaShimmer {
    from {
        transform: translateX(-70%);
    }
    to {
        transform: translateX(70%);
    }
}

@media (prefers-reduced-motion: reduce) {
    .reveal-ready,
    .hero-cards-demo .demo-card,
    .cta-section::after {
        animation: none !important;
        transition: none !important;
        opacity: 1 !important;
        transform: none !important;
    }

    .auth-page .auth-visual,
    .auth-page .auth-form-wrap,
    .auth-feature-item,
    .auth-form-wrap .form-group-safe,
    .auth-form-wrap .role-selector,
    .auth-form-wrap button[type="submit"],
    .auth-form-wrap .auth-divider,
    .auth-form-wrap p.text-center,
    .auth-form-wrap #formSection,
    .auth-form-wrap #successSection,
    .pending-card,
    .pending-card .status-icon {
        animation: none !important;
        transition: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}

/* ===================================================
   Footer
   =================================================== */
footer.site-footer {
    background: var(--dark);
    color: rgba(255,255,255,.7);
    padding: 4rem 0 2rem;
}

.footer-brand .nav-logo { color: white; }
.footer-brand p {
    font-size: .86rem;
    line-height: 1.8;
    margin-top: .75rem;
    max-width: 280px;
}

.footer-heading {
    font-size: .82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: rgba(255,255,255,.4);
    margin-bottom: 1rem;
}

.footer-links a {
    display: block;
    font-size: .88rem;
    color: rgba(255,255,255,.6);
    margin-bottom: .5rem;
    transition: var(--transition);
    text-decoration: none;
}

.footer-links a:hover { color: white; padding-right: .25rem; }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.08);
    margin-top: 3rem;
    padding-top: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-bottom p { font-size: .82rem; margin: 0; }

.footer-social { display: flex; gap: .5rem; }

.footer-social a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,.08);
    color: rgba(255,255,255,.6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .85rem;
    transition: var(--transition);
    text-decoration: none;
    border: 1px solid rgba(255,255,255,.12);
}

.footer-social a:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(29,78,216,.4);
}

/* ===================================================
   Breadcrumb
   =================================================== */
.page-header-bar {
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
}

.breadcrumb-safe {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .82rem;
    color: var(--text-muted);
    list-style: none;
    padding: 0;
    margin: 0;
}

.breadcrumb-safe li + li::before {
    content: '/';
    opacity: .5;
}

.breadcrumb-safe a { color: var(--text-muted); text-decoration: none; }
.breadcrumb-safe a:hover { color: var(--primary); }
.breadcrumb-safe li:last-child { color: var(--text-main); font-weight: 600; }

/* ===================================================
   Booking Summary Card
   =================================================== */
.booking-summary {
    background: var(--primary-light);
    border: 1px solid rgba(29,78,216,.2);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.booking-summary h5 {
    font-size: .95rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.booking-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .5rem 0;
    border-bottom: 1px solid rgba(29,78,216,.1);
    font-size: .88rem;
}

.booking-row:last-child { border-bottom: none; }
.booking-row .brow-label { color: var(--text-muted); }
.booking-row .brow-value { font-weight: 600; color: var(--text-main); }
.booking-row.total .brow-value { font-size: 1.1rem; color: var(--success); }

/* ===================================================
   Confirmation Page
   =================================================== */
.success-hero {
    text-align: center;
    padding: 3rem 1.5rem;
}

.success-icon-wrap {
    width: 90px;
    height: 90px;
    background: var(--success-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2.5rem;
    color: var(--success);
    border: 3px solid #a7f3d0;
}

.success-hero h1 {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: .5rem;
}

.success-hero p {
    font-size: .95rem;
    color: var(--text-muted);
    max-width: 420px;
    margin: 0 auto;
}

/* ===================================================
   Page Sections Background
   =================================================== */
.bg-white-safe { background: #fff; }
.bg-light-safe { background: var(--body-bg); }
.section-py    { padding: 5rem 0; }
.section-py-sm { padding: 3rem 0; }

/* ===================================================
   Utility Overrides
   =================================================== */
.text-primary-safe { color: var(--primary) !important; }
.text-muted-safe   { color: var(--text-muted) !important; }
.text-success-safe { color: var(--success) !important; }
.text-accent-safe  { color: var(--accent) !important; }

.fw-800 { font-weight: 800 !important; }
.fw-700 { font-weight: 700 !important; }
.fw-600 { font-weight: 600 !important; }

.divider-line {
    height: 1px;
    background: var(--border);
    margin: 1.5rem 0;
}

/* Hero btns responsive */
@media (min-width: 576px) {
    .w-sm-auto { width: auto !important; }
}

/* ===================================================
   Responsive
   =================================================== */

/* ── Tablet (< 992px) ── */
@media (max-width: 991.98px) {
    /* Dashboard */
    .dashboard-layout { grid-template-columns: 1fr; }
    .dashboard-sidebar { display: none !important; }
    .dashboard-main { width: 100%; min-width: 0; }

    /* Auth */
    .auth-visual { display: none; }
    .auth-form-wrap { flex: 1; padding: 2rem 1.5rem; }
    .auth-page { min-height: auto; }

    /* Hero */
    .hero-section { padding: 3.5rem 0 2.5rem; }
    .hero-visual { display: none; }
    .hero-section .container-xl > .row { row-gap: 0 !important; }

    /* Navbar */
    .nav-links,
    .nav-actions { display: none; }
    .nav-toggle { display: flex; }

    /* Section Padding */
    .section-py    { padding: 3.5rem 0; }
    .section-py-sm { padding: 2rem 0; }

    /* Feature & Service Cards */
    .feature-card { padding: 1.75rem 1.25rem; }
}

/* ── Mobile (< 768px) ── */
@media (max-width: 767.98px) {
    /* Prevent horizontal overflow */
    body { overflow-x: hidden; }

    /* Typography */
    .section-title    { font-size: 1.55rem; }
    .section-subtitle { font-size: .9rem; }

    /* Hero */
    .hero-section        { padding: 2.75rem 0 2.25rem; }
    .hero-section h1     { font-size: 1.85rem; line-height: 1.25; }
    .hero-section .hero-desc { font-size: .95rem; max-width: 100%; margin-bottom: 1.5rem; margin-right: auto; margin-left: auto; }
    .hero-tag            { font-size: .75rem; }
    .hero-btns .btn-xl   { max-width: 320px; }

    /* Hero Stats */
    .hero-stats { gap: 1rem; margin-top: 1.75rem; }
    .hero-stat .stat-num { font-size: 1.35rem; }

    /* Sections */
    .section-py    { padding: 3rem 0; }
    .section-py-sm { padding: 1.75rem 0; }

    /* Feature Cards */
    .feature-card       { padding: 1.5rem 1rem; }
    .feature-icon       { width: 52px; height: 52px; font-size: 1.25rem; margin-bottom: .9rem; }

    /* Service Cards */
    .service-card-safe  { padding: 1.25rem .75rem; }
    .service-icon-wrap  { width: 56px; height: 56px; font-size: 1.3rem; margin-bottom: .9rem; }
    .service-card-safe h5 { font-size: .9rem; }
    .service-card-safe p  { font-size: .8rem; margin-bottom: .9rem; }

    /* CTA */
    .cta-section { padding: 2.25rem 1.25rem; border-radius: var(--radius-lg); }
    .cta-section h2 { font-size: 1.4rem; }
    .cta-section .d-flex { flex-direction: column; align-items: stretch; }
    .cta-section .btn    { width: 100%; justify-content: center; }

    /* Dashboard */
    .dashboard-main { padding: 1.25rem; }
    .stat-card      { flex-direction: column; text-align: center; }

    /* Footer */
    .footer-bottom { flex-direction: column; align-items: center; text-align: center; gap: .75rem; }
    .site-footer   { padding-top: 3rem; }

    /* Tables */
    .orders-table { font-size: .82rem; }
    .orders-table th,
    .orders-table td { padding: .6rem .75rem; }

    /* Tech Card */
    .tech-card             { flex-direction: column; text-align: center; }
    .tech-card .tech-actions        { width: 100%; }
    .tech-card .tech-actions .btn   { width: 100%; }

    /* Steps */
    .step-item { padding: 1.1rem 1rem; gap: 1rem; }
    .step-num  { width: 42px; height: 42px; font-size: 1rem; flex-shrink: 0; }
}

/* ── Small Mobile (< 576px) ── */
@media (max-width: 575.98px) {
    /* Auth */
    .auth-form-wrap { padding: 1.5rem 1.25rem; }
    .role-selector  { grid-template-columns: 1fr 1fr; }

    /* Buttons */
    .btn-xl { padding: .8rem 1.5rem; font-size: .88rem; }

    /* Hero Stats - تصغير الخط فقط على الشاشات الصغيرة جداً */
    .hero-stats { gap: .75rem; }
    .hero-stat .stat-num  { font-size: 1.2rem; }
    .hero-stat .stat-label { font-size: .68rem; }

    /* Service Cards - smaller */
    .service-card-safe  { padding: 1rem .5rem; }
    .service-icon-wrap  { width: 48px; height: 48px; font-size: 1.1rem; margin-bottom: .7rem; }
    .service-card-safe h5 { font-size: .82rem; }
    .service-card-safe p  { font-size: .76rem; margin-bottom: .75rem; }
    .service-card-safe .btn { font-size: .78rem; padding: .4rem .8rem; }

    /* Hero */
    .hero-section { padding: 2.25rem 0 2rem; }
    .hero-section h1 { font-size: 1.65rem; }
    .hero-btns .btn-xl { max-width: 100%; }

    /* Section tag */
    .section-tag { font-size: .72rem; }

    /* Sections */
    .section-py    { padding: 2.5rem 0; }
    .section-py-sm { padding: 1.5rem 0; }

    /* Footer */
    .footer-brand p { font-size: .88rem; }
}

/* ===================================================
   Page Transition Fade-In
   =================================================== */
body {
    animation: pageFadeIn 0.35s ease both;
}

@keyframes pageFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: none; }
}

/* ===================================================
   Scroll-to-Top Button
   =================================================== */
#scrollToTopBtn {
    position: fixed;
    bottom: 1.75rem;
    left: 1.75rem;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    box-shadow: 0 4px 16px rgba(29,78,216,.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease, background 0.2s ease;
    z-index: 900;
}

#scrollToTopBtn.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#scrollToTopBtn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(29,78,216,.5);
}

/* ===================================================
   Skeleton Loading Shimmer
   =================================================== */
.skeleton {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: shimmer 1.6s infinite;
    border-radius: var(--radius-sm);
}

@keyframes shimmer {
    from { background-position: 200% 0; }
    to   { background-position: -200% 0; }
}

/* ===================================================
   Smooth Table Rows
   =================================================== */
.orders-table tr {
    transition: background 0.18s ease;
}

/* ===================================================
   Focus Ring Accessibility
   =================================================== */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
    border-radius: 4px;
}

/* ===================================================
   Selection Style
   =================================================== */
::selection {
    background: rgba(29, 78, 216, 0.15);
    color: var(--primary);
}

/* ===================================================
   Smooth Scroll Offset for sticky navbar
   =================================================== */
[id] {
    scroll-margin-top: calc(var(--navbar-h) + 1rem);
}

/* ===================================================
   Enhanced Section Tags
   =================================================== */
.section-tag {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .8px;
    text-transform: uppercase;
    padding: 4px 14px;
    border-radius: 50px;
    margin-bottom: 1rem;
    border: 1px solid rgba(29,78,216,.15);
}

/* ===================================================
   Stat Card Enhancement
   =================================================== */
.stat-card {
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 60px;
    height: 60px;
    border-radius: 0 var(--radius-lg) 0 100%;
    background: var(--primary-light);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-card:hover::before {
    opacity: 1;
}

/* ===================================================
   Input Hover Effect
   =================================================== */
.form-control-safe:hover:not(:focus) {
    border-color: #94a3b8;
}

/* ===================================================
   Date Input — Fix Chrome RTL placeholder (يوم/شهر/سنة عكسي)
   =================================================== */
input[type="date"].form-control-safe,
input[type="date"] {
    direction: ltr;
    text-align: right;
}
/* استهداف الأجزاء الداخلية في Chrome/Edge */
input[type="date"]::-webkit-datetime-edit {
    direction: ltr;
    unicode-bidi: plaintext;
}
input[type="date"]::-webkit-datetime-edit-fields-wrapper {
    direction: ltr;
}

/* ===================================================
   Button Loading State
   =================================================== */
.btn.loading {
    pointer-events: none;
    opacity: 0.75;
}

/* ===================================================
   Breadcrumb Enhancement
   =================================================== */
.page-header-bar {
    background: linear-gradient(to bottom, #fff, #fafbfc);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
}

