:root {
    --bg: #070A12;
    --bg-2: #0B1020;
    --surface: rgba(255, 255, 255, 0.06);
    --surface-2: rgba(255, 255, 255, 0.10);
    --surface-3: rgba(255, 255, 255, 0.14);
    --border: rgba(255, 255, 255, 0.13);
    --text: #FFFFFF;
    --muted: #AAB3C5;
    --primary: #5EF2D6;
    --secondary: #7C5CFF;
    --warning: #FFD166;
    --danger: #FF6B7A;
    --success: #55E391;
    --radius: 22px;
    --radius-sm: 14px;
    --shadow: 0 28px 90px rgba(0, 0, 0, 0.42);
    --glow: 0 0 46px rgba(94, 242, 214, 0.18);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: "Cairo", "Inter", Arial, sans-serif;
    background:
        linear-gradient(120deg, rgba(94, 242, 214, .12), transparent 32%),
        linear-gradient(245deg, rgba(124, 92, 255, .18), transparent 36%),
        radial-gradient(circle at 50% -20%, rgba(255, 255, 255, .08), transparent 36rem),
        var(--bg);
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: .55;
    background-image:
        linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
    background-size: 54px 54px;
    mask-image: linear-gradient(to bottom, black, transparent 86%);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }

.site-shell { min-height: 100vh; position: relative; }
.container, .section { width: min(1200px, calc(100% - 40px)); margin-inline: auto; }
.page-band { width: min(1200px, calc(100% - 40px)); margin: 34px auto 80px; }

.navbar-wrap {
    position: sticky;
    top: 0;
    z-index: 50;
    padding: 12px 0;
    background: rgba(7, 10, 18, .58);
    backdrop-filter: blur(18px);
    transition: box-shadow .25s ease, background .25s ease;
}
.navbar-wrap.scrolled { background: rgba(7, 10, 18, .86); box-shadow: 0 20px 70px rgba(0,0,0,.28); }
.navbar {
    width: min(1200px, calc(100% - 40px));
    margin: 0 auto;
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(255,255,255,.055);
    box-shadow: 0 16px 50px rgba(0,0,0,.22);
}

.brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 900; font-size: 1.22rem; letter-spacing: 0; }
.brand-mark {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    color: #05111A;
    background: linear-gradient(135deg, var(--primary), #F9FFFC 48%, var(--secondary));
    box-shadow: 0 0 34px rgba(94, 242, 214, .25);
}
.brand small { display: block; font-size: .68rem; color: var(--muted); font-weight: 800; margin-top: -4px; }

.nav-links { display: flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 800; }
.nav-links > a:not(.btn) { padding: 11px 12px; border-radius: 14px; transition: color .2s ease, background .2s ease; }
.nav-links > a:hover, .nav-links > a.active { color: var(--text); background: rgba(255,255,255,.08); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.nav-toggle { display: none; border: 1px solid var(--border); background: var(--surface); color: var(--text); width: 46px; height: 46px; border-radius: 14px; }

.btn {
    border: 0;
    min-height: 46px;
    padding: 12px 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border-radius: 16px;
    font-weight: 900;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { color: #031117; background: linear-gradient(135deg, var(--primary), #B8FFF1); box-shadow: 0 18px 45px rgba(94, 242, 214, .22); }
.btn-secondary { color: #fff; background: linear-gradient(135deg, var(--secondary), #A391FF); box-shadow: 0 18px 45px rgba(124, 92, 255, .22); }
.btn-soft { color: var(--text); border: 1px solid var(--border); background: rgba(255,255,255,.075); }
.btn-danger { color: #ffe7ea; border: 1px solid rgba(255,107,122,.35); background: rgba(255,107,122,.16); }
.btn-full { width: 100%; }
.btn.loading { pointer-events: none; opacity: .78; }
.btn.loading::after { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-top-color: transparent; animation: spin .7s linear infinite; }

.hero {
    width: min(1200px, calc(100% - 40px));
    margin: 34px auto 0;
    min-height: calc(100vh - 132px);
    display: grid;
    grid-template-columns: 1.02fr .98fr;
    gap: 34px;
    align-items: center;
    position: relative;
    padding-bottom: 54px;
}
.hero::after, .section-glow::after {
    content: "";
    position: absolute;
    inset: auto 10% 3% auto;
    width: 42%;
    height: 44%;
    pointer-events: none;
    background: linear-gradient(135deg, rgba(94,242,214,.18), rgba(124,92,255,.16));
    filter: blur(70px);
    opacity: .75;
    animation: glowShift 7s ease-in-out infinite alternate;
}
.hero-copy, .hero-visual { position: relative; z-index: 2; }
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 9px 13px;
    border: 1px solid rgba(94,242,214,.26);
    border-radius: 999px;
    color: var(--primary);
    background: rgba(94,242,214,.08);
    font-weight: 900;
}
.hero h1 { margin: 18px 0 16px; font-size: clamp(2.5rem, 6vw, 5.7rem); line-height: 1.03; letter-spacing: 0; }
.gradient-text { color: transparent; background: linear-gradient(135deg, #fff 10%, var(--primary), #C8BEFF 88%); -webkit-background-clip: text; background-clip: text; }
.hero p, .lead { color: var(--muted); line-height: 1.9; font-size: 1.08rem; }
.hero-actions, .inline-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.trust-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,.06);
    border: 1px solid var(--border);
    color: var(--muted);
    font-weight: 800;
}
.trust-badge i { color: var(--primary); }

.dashboard-mock {
    border: 1px solid var(--border);
    border-radius: 30px;
    padding: 16px;
    background: linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.045));
    box-shadow: var(--shadow), var(--glow);
    transform: perspective(1000px) rotateY(-5deg) rotateX(2deg);
}
.mock-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.mock-dots { display: flex; gap: 7px; }
.mock-dots span { width: 11px; height: 11px; border-radius: 50%; background: var(--danger); }
.mock-dots span:nth-child(2) { background: var(--warning); }
.mock-dots span:nth-child(3) { background: var(--success); }
.mock-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mock-card, .floating-card, .feature, .product-card, .testimonial, .faq-item, .auth-card, .dash-card, .table-card, .contact-panel {
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: 0 20px 60px rgba(0,0,0,.22);
    backdrop-filter: blur(18px);
}
.mock-card { padding: 16px; min-height: 122px; }
.mock-card.wide { grid-column: 1 / -1; }
.mock-chart { height: 104px; display: flex; align-items: end; gap: 9px; }
.mock-chart span { flex: 1; border-radius: 999px 999px 10px 10px; background: linear-gradient(to top, var(--secondary), var(--primary)); opacity: .82; }
.floating-stack { position: absolute; inset: auto -10px 30px auto; display: grid; gap: 10px; z-index: 3; }
.floating-card { min-width: 210px; display: flex; align-items: center; gap: 12px; padding: 12px; animation: floatY 4s ease-in-out infinite; }
.floating-card:nth-child(2) { animation-delay: .8s; transform: translateX(-36px); }
.floating-card:nth-child(3) { animation-delay: 1.4s; transform: translateX(-12px); }

.section { margin-top: 78px; position: relative; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 22px; margin-bottom: 24px; }
.section-head h2, .dash-head h1 { margin: 0; font-size: clamp(1.65rem, 3.4vw, 2.75rem); line-height: 1.2; }
.section-head p { margin: 10px 0 0; color: var(--muted); line-height: 1.8; max-width: 680px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }

.feature, .product-card, .testimonial, .faq-item, .contact-panel { padding: 22px; transition: transform .25s ease, border-color .25s ease, background .25s ease; }
.feature:hover, .product-card:hover, .testimonial:hover, .faq-item:hover { transform: translateY(-5px); border-color: rgba(94,242,214,.36); background: var(--surface-2); }
.icon-tile, .product-icon {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(94,242,214,.18), rgba(124,92,255,.18));
    color: var(--primary);
    font-size: 1.25rem;
}
.feature p, .product-card p, .testimonial p, .faq-item p, .contact-panel p { color: var(--muted); line-height: 1.8; }
.product-card { min-height: 326px; display: flex; flex-direction: column; gap: 13px; position: relative; overflow: hidden; }
.product-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: linear-gradient(90deg, var(--primary), var(--secondary)); opacity: .9; }
.product-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.badge { display: inline-flex; align-items: center; gap: 7px; padding: 7px 11px; border-radius: 999px; background: rgba(94,242,214,.11); color: var(--primary); font-weight: 900; font-size: .84rem; }
.badge.off, .badge.cancelled { color: #ffc8cf; background: rgba(255,107,122,.14); }
.badge.pending { color: #ffe4a4; background: rgba(255,209,102,.14); }
.badge.active { color: #c2fff1; background: rgba(94,242,214,.14); }
.badge.completed { color: #caffdc; background: rgba(85,227,145,.14); }
.price { font-size: 2rem; font-weight: 950; letter-spacing: 0; }
.product-actions { margin-top: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.steps { counter-reset: step; }
.step-card { position: relative; padding: 24px; border: 1px solid var(--border); border-radius: var(--radius); background: linear-gradient(180deg, rgba(255,255,255,.09), rgba(255,255,255,.045)); }
.step-card::before { counter-increment: step; content: "0" counter(step); display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 16px; background: rgba(94,242,214,.12); color: var(--primary); font-weight: 950; margin-bottom: 14px; }
.tool-strip { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px; }
.tool-pill { min-width: 180px; border: 1px solid var(--border); border-radius: 18px; background: rgba(255,255,255,.065); padding: 14px; display: flex; align-items: center; gap: 12px; font-weight: 900; }
.faq-item { cursor: pointer; }
.faq-item h3 { margin: 0; display: flex; justify-content: space-between; gap: 14px; font-size: 1.04rem; }
.faq-item p { display: none; margin-bottom: 0; }
.faq-item.open p { display: block; }

.footer { width: min(1200px, calc(100% - 40px)); margin: 90px auto 24px; padding: 28px; border: 1px solid var(--border); border-radius: 30px; background: rgba(255,255,255,.045); }
.footer-grid { display: grid; grid-template-columns: 1.5fr repeat(4, 1fr); gap: 22px; }
.footer h4 { margin: 0 0 12px; }
.footer p, .footer a { color: var(--muted); line-height: 1.85; }
.footer a { display: block; margin: 8px 0; }
.socials { display: flex; gap: 10px; }
.socials a { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; background: var(--surface); color: var(--text); }
.footer-bottom { border-top: 1px solid var(--border); margin-top: 22px; padding-top: 18px; color: var(--muted); text-align: center; }

.auth-wrap {
    width: min(1120px, calc(100% - 40px));
    min-height: calc(100vh - 146px);
    margin: 24px auto 80px;
    display: grid;
    grid-template-columns: .92fr 1.08fr;
    gap: 24px;
    align-items: center;
}
.auth-visual { padding: 30px; border: 1px solid var(--border); border-radius: 30px; background: linear-gradient(145deg, rgba(94,242,214,.10), rgba(124,92,255,.12)); box-shadow: var(--shadow); }
.auth-card { padding: 30px; }
.form-grid { display: grid; gap: 15px; }
.form-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.field label { display: block; margin-bottom: 8px; color: var(--muted); font-weight: 900; }
.input-shell { position: relative; }
.input-shell i { position: absolute; inset-inline-start: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.input-shell .toggle-password { position: absolute; inset-inline-end: 8px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border: 0; color: var(--muted); background: transparent; }
.field input, .field textarea, .field select, .input-shell input {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: rgba(255,255,255,.075);
    color: var(--text);
    padding: 13px 14px;
    outline: 0;
}
.input-shell input { padding-inline-start: 44px; padding-inline-end: 48px; }
.field textarea { min-height: 124px; resize: vertical; }
.field select option, table select option { color: #101827; }
.field input:focus, .field textarea:focus, .field select:focus, .input-shell input:focus { border-color: rgba(94,242,214,.55); box-shadow: 0 0 0 4px rgba(94,242,214,.08); }
.form-error { color: #ffc8cf; font-size: .88rem; min-height: 18px; }
.alert { border: 1px solid var(--border); border-radius: 16px; padding: 13px 15px; margin-bottom: 14px; }
.alert.success { background: rgba(85,227,145,.13); color: #caffdc; }
.alert.error { background: rgba(255,107,122,.13); color: #ffd6dc; }

.dash-layout { width: min(1320px, calc(100% - 32px)); margin: 24px auto 80px; display: grid; grid-template-columns: 282px 1fr; gap: 20px; align-items: start; }
.sidebar { position: sticky; top: 104px; min-height: calc(100vh - 128px); border: 1px solid var(--border); border-radius: 28px; background: rgba(255,255,255,.055); padding: 16px; box-shadow: var(--shadow); }
.sidebar-brand { display: flex; align-items: center; gap: 12px; padding: 8px 8px 18px; border-bottom: 1px solid var(--border); margin-bottom: 12px; }
.sidebar a { display: flex; align-items: center; gap: 11px; padding: 13px 12px; color: var(--muted); border-radius: 16px; font-weight: 900; }
.sidebar a:hover, .sidebar a.active { color: var(--text); background: rgba(255,255,255,.09); }
.dash-main { display: grid; gap: 20px; min-width: 0; }
.topbar { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border: 1px solid var(--border); border-radius: 28px; background: rgba(255,255,255,.055); padding: 14px 18px; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.avatar { width: 46px; height: 46px; border-radius: 16px; display: grid; place-items: center; background: linear-gradient(135deg, var(--primary), var(--secondary)); color: #061018; font-weight: 950; }
.icon-btn { width: 46px; height: 46px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 16px; background: rgba(255,255,255,.07); color: var(--text); }
.mobile-sidebar-btn { display: none; }
.dash-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; }
.dash-head p { color: var(--muted); margin: 8px 0 0; }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.metric { border: 1px solid var(--border); border-radius: 24px; padding: 20px; background: linear-gradient(145deg, rgba(255,255,255,.09), rgba(255,255,255,.045)); box-shadow: 0 18px 54px rgba(0,0,0,.18); }
.metric span { color: var(--muted); font-weight: 800; }
.metric strong { display: block; margin-top: 8px; font-size: 2rem; line-height: 1; }
.metric i { float: left; color: var(--primary); font-size: 1.4rem; }
.quick-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.quick-action { padding: 18px; border: 1px solid var(--border); border-radius: 22px; background: rgba(255,255,255,.055); display: flex; align-items: center; justify-content: space-between; gap: 14px; font-weight: 900; }
.table-card { padding: 20px; overflow: hidden; }
.table-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.table-search { min-width: 250px; border: 1px solid var(--border); border-radius: 16px; background: rgba(255,255,255,.07); color: var(--text); padding: 12px 14px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { padding: 15px 13px; border-bottom: 1px solid var(--border); text-align: right; vertical-align: middle; }
th { color: var(--muted); font-size: .92rem; }
tr:hover td { background: rgba(255,255,255,.035); }
table select { border: 1px solid var(--border); border-radius: 14px; background: rgba(255,255,255,.08); color: var(--text); padding: 10px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.empty-state { padding: 34px; text-align: center; border: 1px dashed rgba(255,255,255,.22); border-radius: 24px; color: var(--muted); background: rgba(255,255,255,.035); }
.empty-state i { font-size: 2rem; color: var(--primary); margin-bottom: 12px; }

.modal-backdrop { position: fixed; inset: 0; display: none; align-items: center; justify-content: center; padding: 20px; z-index: 80; background: rgba(0,0,0,.62); backdrop-filter: blur(14px); }
.modal-backdrop.open { display: flex; }
.modal { width: min(560px, 100%); border: 1px solid var(--border); border-radius: 28px; background: #0B1020; box-shadow: var(--shadow); padding: 24px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.toast-stack { position: fixed; inset-inline-end: 18px; bottom: 18px; z-index: 100; display: grid; gap: 10px; }
.toast { min-width: 280px; max-width: 360px; border: 1px solid var(--border); border-radius: 18px; background: rgba(13,18,32,.94); color: var(--text); padding: 14px; box-shadow: var(--shadow); animation: toastIn .25s ease; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .55s ease, transform .55s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes floatY { 0%, 100% { translate: 0 0; } 50% { translate: 0 -12px; } }
@keyframes glowShift { from { transform: translate3d(0,0,0) scale(1); } to { transform: translate3d(-40px,-20px,0) scale(1.08); } }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 1100px) {
    .hero, .auth-wrap { grid-template-columns: 1fr; }
    .dashboard-mock { transform: none; }
    .grid-4, .metric-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 880px) {
    .nav-toggle, .mobile-sidebar-btn { display: grid; place-items: center; }
    .nav-links {
        position: absolute;
        top: calc(100% + 8px);
        inset-inline: 20px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
        border: 1px solid var(--border);
        border-radius: 22px;
        background: rgba(7, 10, 18, .96);
        box-shadow: var(--shadow);
    }
    .nav-links.open { display: flex; }
    .nav-actions { flex-direction: column; align-items: stretch; }
    .dash-layout { grid-template-columns: 1fr; }
    .sidebar { position: fixed; z-index: 70; inset: 86px auto 18px 18px; width: min(300px, calc(100vw - 36px)); transform: translateX(-120%); transition: transform .25s ease; }
    html[dir="rtl"] .sidebar { inset: 86px 18px 18px auto; transform: translateX(120%); }
    .sidebar.open { transform: translateX(0) !important; }
    .grid-3, .quick-actions { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .container, .section, .hero, .page-band, .footer, .auth-wrap, .dash-layout { width: min(100% - 24px, 1200px); }
    .hero { min-height: auto; margin-top: 22px; }
    .hero h1 { font-size: 2.45rem; }
    .mock-grid, .grid-2, .grid-4, .metric-grid, .form-row, .footer-grid { grid-template-columns: 1fr; }
    .section-head, .dash-head, .topbar { flex-direction: column; align-items: stretch; }
    .product-actions, .hero-actions { grid-template-columns: 1fr; }
    .floating-stack { position: static; margin-top: 12px; }
    .floating-card { min-width: 0; }
    .auth-card, .auth-visual { padding: 22px; }
}
