:root {
    --teal: #0d9488;
    --teal-dark: #0f766e;
    --teal-light: #14b8a6;
    --emerald: #10b981;
    --mint: #34d399;
    --ink: #0f172a;
    --slate: #1e293b;
    --muted: #64748b;
    --bg: #f6faf9;
    --card: #ffffff;
    --line: #e6eeec;
    --grad: linear-gradient(135deg, #0d9488 0%, #10b981 55%, #34d399 100%);
    --grad-dark: linear-gradient(150deg, #0f766e 0%, #0b3b38 100%);
    --shadow-sm: 0 1px 3px rgba(15,23,42,.06);
    --shadow: 0 10px 30px rgba(13,148,136,.12);
    --shadow-lg: 0 24px 60px rgba(13,148,136,.18);
}

* { font-family: 'Cairo', sans-serif; box-sizing: border-box; }
body { background: var(--bg); color: var(--ink); margin: 0; }
h1:focus { outline: none; }
.validation-message { color: #e11d48; }

/* ===== Animations ===== */
@keyframes fadeUp { from { opacity:0; transform: translateY(18px); } to { opacity:1; transform:none; } }
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes blob { 0%,100% { border-radius: 42% 58% 60% 40%/45% 45% 55% 55%; } 50% { border-radius: 58% 42% 40% 60%/55% 60% 40% 45%; } }
@keyframes shimmer { 0% { background-position: 0% 50%; } 100% { background-position: 200% 50%; } }
@keyframes pop { from { transform: scale(.96); opacity:0; } to { transform: scale(1); opacity:1; } }
.fade-up { animation: fadeUp .6s ease both; }

/* ===== التخطيط (لوحة التطبيق) ===== */
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
    width: 256px; flex-shrink: 0; position: sticky; top: 0; height: 100vh;
    background: var(--grad-dark); color: #d6f5ef; display: flex; flex-direction: column;
    box-shadow: 4px 0 30px rgba(11,59,56,.25); z-index: 30;
}
.sidebar .brand {
    padding: 22px 20px; font-size: 1.3rem; font-weight: 900; display: flex; align-items: center; gap: 10px;
    border-bottom: 1px solid rgba(255,255,255,.1); letter-spacing: .5px;
}
.sidebar .brand .logo { font-size: 1.7rem; filter: drop-shadow(0 2px 6px rgba(0,0,0,.3)); }
.sidebar nav { padding: 14px 12px; overflow-y: auto; flex: 1; }
.sidebar .nav-link {
    color: #c9efe8; border-radius: 12px; padding: 12px 15px; margin: 4px 0; display: flex; align-items: center; gap: 11px;
    font-weight: 600; transition: .2s; text-decoration: none; position: relative;
}
.sidebar .nav-link:hover { background: rgba(255,255,255,.12); color: #fff; transform: translateX(-3px); }
.sidebar .nav-link.active { background: #fff; color: var(--teal-dark); box-shadow: 0 6px 18px rgba(0,0,0,.18); }

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar {
    background: rgba(255,255,255,.85); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line);
    padding: 13px 24px; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 20;
}
.topbar .user { display: flex; align-items: center; gap: 12px; }
.topbar .avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center; font-weight: 800; box-shadow: var(--shadow); }
.content { padding: 26px; flex: 1; }
.content > * { animation: fadeUp .5s ease both; }

/* ===== البطاقات ===== */
.card-c {
    background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 22px;
    box-shadow: var(--shadow-sm); transition: .25s;
}
.card-c:hover { box-shadow: var(--shadow); }
.page-title { font-weight: 800; font-size: 1.6rem; margin: 0 0 20px; letter-spacing: -.5px; }
.page-title::after { content: ""; display: block; width: 54px; height: 4px; border-radius: 4px; background: var(--grad); margin-top: 8px; }

/* بطاقات الإحصائيات */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 18px; }
.stat {
    background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 20px;
    position: relative; overflow: hidden; transition: .25s; animation: pop .4s ease both;
}
.stat::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 5px; background: var(--grad); }
.stat:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.stat .ic { font-size: 1.9rem; filter: drop-shadow(0 4px 8px rgba(13,148,136,.25)); }
.stat .val { font-size: 2rem; font-weight: 900; background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat .lbl { color: var(--muted); font-weight: 600; font-size: .92rem; }

/* أزرار */
.btn-teal { background: var(--grad); border: none; color: #fff; font-weight: 700; box-shadow: 0 8px 20px rgba(13,148,136,.3); transition: .2s; }
.btn-teal:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 12px 28px rgba(13,148,136,.4); }
.btn { border-radius: 12px; }

/* جداول */
.table thead th { background: #f0fdfa; color: var(--teal-dark); font-weight: 700; border-bottom: 2px solid var(--line); }
.table td { vertical-align: middle; }
.table tbody tr { transition: .15s; }
.table tbody tr:hover { background: #f0fdfa; }

/* شارات */
.badge-soft { padding: 5px 12px; border-radius: 20px; font-weight: 700; font-size: .8rem; }
.b-green { background: #d1fae5; color: #065f46; }
.b-amber { background: #fef3c7; color: #92400e; }
.b-red { background: #fee2e2; color: #991b1b; }
.b-blue { background: #dbeafe; color: #1e40af; }
.b-gray { background: #eef2f5; color: #475569; }

/* ===== الدخول (زجاجي) ===== */
.login-wrap { min-height: 100vh; display: grid; place-items: center; position: relative; overflow: hidden;
    background: radial-gradient(circle at 15% 20%, #10b981 0%, transparent 45%), radial-gradient(circle at 85% 80%, #0d9488 0%, transparent 45%), #0b1f1d; padding: 20px; }
.login-wrap::before, .login-wrap::after { content: ""; position: absolute; width: 420px; height: 420px; background: var(--grad); opacity: .35; filter: blur(20px); animation: blob 14s ease-in-out infinite, floaty 10s ease-in-out infinite; }
.login-wrap::before { top: -120px; right: -100px; }
.login-wrap::after { bottom: -140px; left: -120px; animation-delay: -4s; }
.login-box { position: relative; z-index: 2; background: rgba(255,255,255,.95); backdrop-filter: blur(16px); border: 1px solid rgba(255,255,255,.6);
    border-radius: 26px; padding: 42px 36px; width: 100%; max-width: 410px; box-shadow: 0 30px 80px rgba(0,0,0,.4); text-align: center; animation: pop .5s ease both; }
.login-box .logo { font-size: 3.4rem; filter: drop-shadow(0 6px 14px rgba(13,148,136,.4)); }
.login-box h2 { font-weight: 900; margin: 10px 0 2px; font-size: 2rem; background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.login-box .sub { color: var(--muted); margin-bottom: 24px; }
.login-box .form-control { padding: 13px 15px; border-radius: 12px; border: 1.5px solid #e2e8f0; transition: .2s; }
.login-box .form-control:focus { border-color: var(--teal); box-shadow: 0 0 0 4px rgba(13,148,136,.12); }
.login-error { background: #fee2e2; color: #991b1b; padding: 11px; border-radius: 12px; margin-bottom: 12px; font-weight: 600; }

/* ===== صفحة الهبوط (Landing) ===== */
.lp { color: var(--ink); overflow-x: hidden; }
.lp-nav { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between;
    padding: 16px 6vw; background: rgba(246,250,249,.8); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.lp-nav .brand { font-weight: 900; font-size: 1.5rem; display: flex; align-items: center; gap: 8px; color: var(--teal-dark); }
.lp-nav .brand .logo { font-size: 1.8rem; }
.lp-nav .links { display: flex; gap: 10px; align-items: center; }
.lp-btn { padding: 11px 22px; border-radius: 12px; font-weight: 700; text-decoration: none; transition: .2s; border: none; cursor: pointer; display: inline-block; }
.lp-btn.solid { background: var(--grad); color: #fff; box-shadow: 0 10px 24px rgba(13,148,136,.32); }
.lp-btn.solid:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(13,148,136,.42); color:#fff; }
.lp-btn.ghost { background: #fff; color: var(--teal-dark); border: 1.5px solid var(--line); }
.lp-btn.ghost:hover { border-color: var(--teal); color: var(--teal-dark); }

.hero { position: relative; padding: 70px 6vw 90px; display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.hero::before { content: ""; position: absolute; top: -80px; left: -100px; width: 520px; height: 520px; background: var(--grad); opacity: .14; filter: blur(10px); animation: blob 16s ease-in-out infinite; z-index: 0; }
.hero-text { position: relative; z-index: 2; animation: fadeUp .7s ease both; }
.hero .pill { display: inline-block; background: #d1fae5; color: #065f46; padding: 7px 16px; border-radius: 30px; font-weight: 700; font-size: .9rem; margin-bottom: 18px; }
.hero h1 { font-size: 3.2rem; font-weight: 900; line-height: 1.2; margin: 0 0 18px; letter-spacing: -1px; }
.hero h1 .grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero p { font-size: 1.2rem; color: var(--muted); line-height: 1.9; margin: 0 0 28px; max-width: 540px; }
.hero .cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-visual { position: relative; z-index: 2; display: grid; place-items: center; animation: fadeUp .9s ease both; }
.hero-card { background: #fff; border-radius: 28px; box-shadow: var(--shadow-lg); padding: 26px; width: 100%; max-width: 380px; animation: floaty 6s ease-in-out infinite; border: 1px solid var(--line); }
.hero-card .hc-top { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.hero-card .hc-avatar { width: 52px; height: 52px; border-radius: 16px; background: var(--grad); display: grid; place-items: center; font-size: 1.6rem; }
.hero-card .hc-row { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.hero-card .hc-row span:last-child { font-weight: 800; color: var(--teal-dark); }
.hero-mini { position: absolute; background: #fff; border-radius: 18px; box-shadow: var(--shadow); padding: 14px 18px; font-weight: 800; display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); }
.hero-mini.m1 { top: 6%; left: -4%; animation: floaty 5s ease-in-out infinite; }
.hero-mini.m2 { bottom: 4%; right: -2%; animation: floaty 7s ease-in-out infinite reverse; }
.hero-mini .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 4px rgba(52,211,153,.25); }

.section { padding: 70px 6vw; }
.section-title { text-align: center; font-size: 2.2rem; font-weight: 900; margin: 0 0 8px; letter-spacing: -.5px; }
.section-sub { text-align: center; color: var(--muted); font-size: 1.1rem; margin: 0 0 44px; }
.feat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; }
.feat { background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 28px; transition: .25s; }
.feat:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; }
.feat .fi { width: 58px; height: 58px; border-radius: 16px; background: #d1fae5; display: grid; place-items: center; font-size: 1.7rem; margin-bottom: 16px; }
.feat h3 { font-weight: 800; font-size: 1.25rem; margin: 0 0 8px; }
.feat p { color: var(--muted); line-height: 1.8; margin: 0; }

.steps-wrap { background: var(--grad-dark); border-radius: 32px; padding: 56px 6vw; color: #fff; margin: 0 6vw; }
.steps-wrap .section-title, .steps-wrap .section-sub { color: #fff; }
.steps-wrap .section-sub { color: #b9e8e0; }
.steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; }
.step { text-align: center; }
.step .num { width: 64px; height: 64px; border-radius: 20px; background: rgba(255,255,255,.14); display: grid; place-items: center; font-size: 1.6rem; font-weight: 900; margin: 0 auto 16px; border: 1px solid rgba(255,255,255,.25); }
.step h4 { font-weight: 800; margin: 0 0 6px; }
.step p { color: #b9e8e0; line-height: 1.7; margin: 0; }

.cta-band { text-align: center; padding: 80px 6vw; }
.cta-band h2 { font-size: 2.4rem; font-weight: 900; margin: 0 0 14px; }
.cta-band p { color: var(--muted); font-size: 1.15rem; margin: 0 0 28px; }
.lp-foot { text-align: center; padding: 36px; color: var(--muted); border-top: 1px solid var(--line); }

@media (max-width: 900px) {
    .hero { grid-template-columns: 1fr; text-align: center; padding-top: 40px; }
    .hero p { margin-inline: auto; }
    .hero .cta { justify-content: center; }
    .hero h1 { font-size: 2.4rem; }
    .lp-nav .links .hide-sm { display: none; }
}

@media (max-width: 768px) {
    .sidebar { position: fixed; right: 0; transform: translateX(100%); transition: .25s; }
    .sidebar.open { transform: translateX(0); }
}
@media print { .sidebar, .topbar, .no-print { display: none !important; } .content { padding: 0; } body { background: #fff; } }
