/* Autosmart platform pages: one visual language with the «مدار» magazine and the studio (Cairo, deep navy, sky accents). */
@font-face { font-family: Cairo; font-weight: 400; font-display: swap; src: url(/static/fonts/cairo-arabic-400-normal.woff2) format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: Cairo; font-weight: 600; font-display: swap; src: url(/static/fonts/cairo-arabic-600-normal.woff2) format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: Cairo; font-weight: 700; font-display: swap; src: url(/static/fonts/cairo-arabic-700-normal.woff2) format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: Cairo; font-weight: 900; font-display: swap; src: url(/static/fonts/cairo-arabic-900-normal.woff2) format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: Cairo; font-weight: 400; font-display: swap; src: url(/static/fonts/cairo-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: Cairo; font-weight: 600; font-display: swap; src: url(/static/fonts/cairo-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: Cairo; font-weight: 700; font-display: swap; src: url(/static/fonts/cairo-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: Cairo; font-weight: 900; font-display: swap; src: url(/static/fonts/cairo-latin-900-normal.woff2) format('woff2'); }

:root {
  --brand: #1d4ed8; --brand-dark: #1e3a8a; --sky: #38bdf8; --orange: #f97316; --pink: #f472b6; --green: #22c55e; --amber: #fbbf24;
  --navy: #07111d; --navy2: #0c1a2a; --edge: #1f3a52;
  --ink: #0f172a; --muted: #64748b; --line: #e2e8f0; --bg: #f4f6fa; --paper: #fff;
  --ok: #15803d; --warn: #b45309; --bad: #b91c1c; --radius: 16px;
  font-family: Cairo, "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); line-height: 1.7; -webkit-font-smoothing: antialiased; }
a { color: var(--brand); }
img { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }

/* Header: a dark masthead on every page. */
header.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px clamp(16px, 4vw, 48px); background: rgba(7, 17, 29, .92); backdrop-filter: blur(10px); border-bottom: 1px solid #ffffff14; color: #e6eef6; }
header.top .brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 900; font-size: 1.2rem; color: #fff; text-decoration: none; letter-spacing: .2px; }
header.top .brand::before { content: 'AS'; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(135deg, #2563eb, #1d4ed8); font-size: .8rem; box-shadow: 0 4px 14px #1d4ed866; }
header.top nav { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
header.top nav .navlink { color: #b9c8d6; text-decoration: none; font-weight: 600; padding: 6px 10px; border-radius: 8px; }
header.top nav .navlink:hover { color: #fff; background: #ffffff12; }
header.top .btn.ghost { color: #bae6fd; }
header.top .btn.secondary { background: transparent; color: #e6eef6; border-color: #ffffff33; }
header.top .btn.secondary:hover { background: #ffffff14; }

main { max-width: 1120px; margin: 0 auto; padding: 28px clamp(14px, 3vw, 24px) 48px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--brand); background: var(--brand); color: #fff;
  padding: 10px 20px; border-radius: 12px; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; transition: transform .15s, box-shadow .15s, background .15s; }
.btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 8px 20px #1d4ed833; }
.btn.secondary { background: #fff; color: var(--brand); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--brand); box-shadow: none; }
.btn.danger { background: var(--bad); border-color: var(--bad); }
.btn.lg { padding: 14px 28px; font-size: 1.05rem; border-radius: 14px; }
.btn.glow { background: linear-gradient(135deg, #38bdf8, #1d4ed8); border: 0; box-shadow: 0 10px 30px #1d4ed855; }
.btn.outline-light { background: transparent; color: #e6eef6; border-color: #ffffff44; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.btn.busy { position: relative; color: transparent !important; }
.btn.busy::after { content: ''; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2px solid #1d4ed8; border-top-color: transparent; animation: spin .8s linear infinite; }
.btn:not(.secondary):not(.ghost).busy::after { border-color: #fff; border-top-color: transparent; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Cards and grids */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; margin-bottom: 18px; box-shadow: 0 1px 2px #0f172a08, 0 8px 24px #0f172a08; }
.card h2 { margin-top: 0; font-size: 1.3rem; font-weight: 900; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.plan { display: flex; flex-direction: column; gap: 8px; position: relative; overflow: hidden; }
.plan::before { content: ''; position: absolute; inset-inline: 0; top: 0; height: 4px; background: linear-gradient(90deg, var(--sky), var(--brand)); }
.plan .price { font-size: 2rem; font-weight: 900; line-height: 1.2; }
.plan .price small { font-size: .9rem; color: var(--muted); font-weight: 600; }
.plan ul { padding-inline-start: 0; list-style: none; margin: 4px 0 14px; flex: 1; }
.plan li { position: relative; padding-inline-start: 24px; margin: 6px 0; }
.plan li::before { content: '✓'; position: absolute; inset-inline-start: 0; color: var(--green); font-weight: 900; }
.plan.current { border-color: var(--brand); box-shadow: 0 0 0 3px #bfdbfe; }
.plan .btn { margin-top: auto; }
.tag { display: inline-block; font-size: .78rem; padding: 2px 10px; border-radius: 999px; background: #e0e7ff; color: var(--brand-dark); font-weight: 700; }
.tag.ok { background: #dcfce7; color: var(--ok); }
.tag.warn { background: #fef3c7; color: var(--warn); }
.tag.bad { background: #fee2e2; color: var(--bad); }

/* Forms */
label { display: block; font-weight: 700; margin: 12px 0 6px; font-size: .95rem; }
input, select, textarea { width: 100%; padding: 11px 14px; border: 1px solid #cbd5e1; border-radius: 12px; font: inherit; background: #fff; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px #bfdbfe88; }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--brand); }
textarea { min-height: 90px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row > * { flex: 0 0 auto; }
.hidden { display: none !important; }

/* Notices */
.notice { display: block; padding: 12px 16px; border-radius: 14px; background: #eff6ff; border: 1px solid #bfdbfe; border-inline-start: 5px solid var(--brand); margin-bottom: 16px; }
.notice.row { display: flex; justify-content: space-between; }
.notice.warn { background: #fffbeb; border-color: #fde68a; border-inline-start-color: var(--amber); }
.notice.bad { background: #fef2f2; border-color: #fecaca; border-inline-start-color: var(--bad); }
.notice.ok { background: #f0fdf4; border-color: #bbf7d0; border-inline-start-color: var(--green); }
.notice .icon { font-size: 1.3rem; }
.notice .grow { flex: 1 1 260px; }
.notice small { display: block; color: var(--muted); }

/* Tables and misc */
table { width: 100%; border-collapse: collapse; font-size: .94rem; }
th, td { text-align: start; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 700; font-size: .85rem; }
.muted { color: var(--muted); }
.stat { font-size: 1.7rem; font-weight: 900; }
.notif.unread { background: #eff6ff; }
#toast { position: fixed; inset-inline-end: 18px; bottom: 18px; background: var(--navy2); color: #fff; padding: 12px 18px; border-radius: 14px; border: 1px solid var(--edge);
  opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .2s; pointer-events: none; z-index: 30; max-width: 380px; box-shadow: 0 14px 30px #0006; }
#toast.show { opacity: 1; transform: none; }
.codes { font-family: ui-monospace, monospace; display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); margin: 16px 0; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.sidenav { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.sidenav a { padding: 7px 16px; border-radius: 999px; background: #fff; border: 1px solid var(--line); text-decoration: none; font-weight: 700; color: var(--ink); }
.sidenav a:hover, .sidenav a.active { border-color: var(--brand); color: var(--brand); background: #eff6ff; }
.badge-count { background: var(--bad); color: #fff; border-radius: 999px; padding: 0 7px; font-size: .75rem; margin-inline-start: 4px; }

/* Page heading band for account, institution and admin pages. */
.page-band { background: radial-gradient(ellipse at 85% -40%, #1a3d63 0%, var(--navy) 60%); color: #e6eef6; padding: 30px clamp(16px, 4vw, 48px) 64px; }
.page-band .inner { max-width: 1120px; margin: 0 auto; }
.page-band .kicker { color: var(--sky); }
.page-band h1 { margin: 4px 0 0; font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 900; }
.page-band p { margin: 6px 0 0; color: #9fb4c8; }
.page-band + main { margin-top: -44px; }

/* Auth (sign in / register): a split page with a brand panel. */
.auth-page { min-height: calc(100vh - 61px); display: grid; grid-template-columns: 1.05fr 1fr; }
.auth-art { position: relative; overflow: hidden; color: #e6eef6; padding: clamp(28px, 5vw, 64px); display: flex; flex-direction: column; justify-content: space-between;
  background: radial-gradient(ellipse at 20% 0%, #16365a 0%, var(--navy) 62%); }
.auth-art h1 { font-size: clamp(1.9rem, 3.2vw, 2.8rem); font-weight: 900; line-height: 1.25; margin: 10px 0 12px; }
.auth-art h1 em { font-style: normal; color: var(--sky); }
.auth-art p { color: #9fb4c8; max-width: 460px; }
.auth-art .planet { position: absolute; width: min(460px, 70%); inset-inline-end: -60px; bottom: -40px; opacity: .9;
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 58%, transparent 71%); mask-image: radial-gradient(circle at 50% 50%, #000 58%, transparent 71%); }
.auth-art ul { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; position: relative; z-index: 1; }
.auth-art li { display: flex; gap: 10px; align-items: center; color: #cbd5e1; }
.auth-art li b { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: #12304d; color: var(--sky); font-size: .8rem; }
.auth-side { display: flex; align-items: center; justify-content: center; padding: 32px 18px; margin: 0; max-width: none; width: 100%; }
.auth { flex: 0 1 440px; width: 100%; max-width: 440px; margin: 0; padding: 30px 30px 26px; border-radius: 22px; box-shadow: 0 30px 60px #0f172a14; }
.auth h2 { font-size: 1.5rem; margin: 0 0 4px; }
.tabs { display: flex; gap: 4px; margin-bottom: 14px; padding: 4px; background: #eef2f7; border-radius: 14px; }
.tabs button { flex: 1; background: none; border: none; padding: 9px 12px; font: inherit; font-weight: 700; cursor: pointer; color: var(--muted); border-radius: 10px; }
.tabs button.active { color: var(--brand); background: #fff; box-shadow: 0 2px 8px #0f172a14; }
.auth .btn[type=submit] { width: 100%; padding: 12px; }
.auth .row .btn[type=submit] { width: auto; flex: 1; }

/* ───────── Landing page (magazine layout) ───────── */
.landing main { max-width: none; padding: 0; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 32px); }
.kicker { display: inline-block; font-size: .78rem; font-weight: 800; letter-spacing: 2.5px; text-transform: uppercase; color: var(--brand); }
.dark { background: var(--navy); color: #e6eef6; }
.dark p, .dark .muted { color: #9fb4c8; }
.dark .kicker, .hero .kicker { color: var(--sky); }

.hero { position: relative; overflow: hidden; padding: clamp(48px, 8vw, 96px) 0 clamp(40px, 6vw, 72px);
  background: radial-gradient(ellipse at 85% -10%, #1b4470 0%, transparent 55%), radial-gradient(ellipse at 0% 100%, #0f2a47 0%, transparent 50%), var(--navy); color: #e6eef6; }
.hero::before { content: ''; position: absolute; inset: 0; background-image: radial-gradient(#ffffff26 1px, transparent 1.2px), radial-gradient(#ffffff14 1px, transparent 1.2px);
  background-size: 120px 120px, 61px 61px; background-position: 0 0, 30px 40px; opacity: .55; pointer-events: none; }
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.15fr .85fr; gap: 32px; align-items: center; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 4rem); font-weight: 900; line-height: 1.15; margin: 12px 0 18px; }
.hero h1 em { font-style: normal; background: linear-gradient(90deg, #7dd3fc, #38bdf8 40%, #60a5fa); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: clamp(1.02rem, 1.6vw, 1.2rem); color: #b9c8d6; max-width: 580px; margin: 0 0 26px; }
.hero .planet-wrap { position: relative; aspect-ratio: 1; }
.hero .planet-wrap img { width: 100%; height: 100%; object-fit: cover;
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 60%, transparent 71%); mask-image: radial-gradient(circle at 50% 50%, #000 60%, transparent 71%); animation: float 9s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-10px); } }
@media (prefers-reduced-motion: reduce) { .hero .planet-wrap img { animation: none; } .btn { transition: none; } }
.hero-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 34px; max-width: 620px; }
.hero-stats div { border-inline-start: 3px solid var(--sky); padding: 2px 12px; }
.hero-stats b { display: block; font-size: 1.7rem; font-weight: 900; color: #fff; line-height: 1.1; }
.hero-stats span { font-size: .82rem; color: #8ea6bd; }

.section { padding: clamp(48px, 7vw, 88px) 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; margin-bottom: 28px; }
.section-head h2 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); font-weight: 900; line-height: 1.25; margin: 6px 0 0; }
.section-head p { max-width: 520px; margin: 0; color: var(--muted); }
.dark .section-head p { color: #9fb4c8; }

.disciplines { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.disc { position: relative; overflow: hidden; border-radius: 20px; background: #fff; border: 1px solid var(--line); transition: transform .2s, box-shadow .2s; display: flex; flex-direction: column; }
.disc:hover { transform: translateY(-4px); box-shadow: 0 20px 40px #0f172a1a; }
.disc .shot { aspect-ratio: 16 / 9; overflow: hidden; background: var(--navy); border-bottom: 4px solid var(--c, var(--brand)); }
.disc .shot img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; transition: transform .5s; }
.disc:hover .shot img { transform: scale(1.05); }
.disc .body { padding: 16px 20px 20px; }
.disc .no { font-weight: 900; color: var(--c, var(--brand)); font-size: .9rem; letter-spacing: 1px; }
.disc h3 { margin: 2px 0 6px; font-size: 1.2rem; font-weight: 900; }
.disc p { margin: 0; color: var(--muted); font-size: .95rem; }
.disc .free { position: absolute; top: 12px; inset-inline-start: 12px; background: var(--green); color: #fff; font-size: .75rem; font-weight: 800; padding: 3px 10px; border-radius: 999px; }

.feature { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(24px, 4vw, 56px); align-items: center; }
.feature.flip { grid-template-columns: 1.15fr 1fr; }
.feature.flip .feature-media { order: -1; }
.feature h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); font-weight: 900; line-height: 1.2; margin: 8px 0 14px; }
.feature h2 em { font-style: normal; color: var(--sky); }
.feature-media { position: relative; }
.frame { border-radius: 18px; overflow: hidden; border: 1px solid #23415e; box-shadow: 0 30px 70px #0009; background: #030812; }
.frame img { width: 100%; }
.feature-media .float { position: absolute; width: 46%; bottom: -26px; inset-inline-start: -26px; border-radius: 14px; overflow: hidden; border: 1px solid #2d4f70; box-shadow: 0 20px 40px #000a; }
.checks { list-style: none; padding: 0; margin: 18px 0 24px; display: grid; gap: 10px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; }
.checks li::before { content: ''; flex: 0 0 22px; height: 22px; margin-top: 3px; border-radius: 7px; background: #12304d url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2338bdf8' stroke-width='3.2'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center / 14px no-repeat; }
.light .checks li::before { background-color: #dbeafe; }
.sectors { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 30px; }
.sector { border-radius: 16px; padding: 16px; background: #0c1a2acc; border: 1px solid var(--edge); border-top: 4px solid var(--c); }
.sector .n { font-weight: 900; color: var(--c); font-size: 1.4rem; }
.sector b { display: block; color: #fff; }
.sector span { font-size: .88rem; color: #9fb4c8; }

.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.pillar { padding: 22px; border-radius: 18px; background: #fff; border: 1px solid var(--line); }
.pillar .ico { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 1.4rem; background: #eff6ff; margin-bottom: 10px; }
.pillar h3 { margin: 0 0 6px; font-size: 1.1rem; font-weight: 900; }
.pillar p { margin: 0; color: var(--muted); font-size: .95rem; }

.steps-line { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: st; }
.steps-line div { position: relative; padding: 22px; border-radius: 18px; background: #fff; border: 1px solid var(--line); }
.steps-line div::before { counter-increment: st; content: '0' counter(st); display: block; font-size: 2.4rem; font-weight: 900; color: #dbeafe; line-height: 1; margin-bottom: 8px; }
.steps-line b { display: block; font-size: 1.1rem; }
.steps-line span { color: var(--muted); }

.cta-band { border-radius: 24px; padding: clamp(28px, 5vw, 48px); display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap;
  background: radial-gradient(ellipse at 90% 0%, #1d4ed8 0%, transparent 60%), var(--navy); color: #fff; }
.cta-band h2 { margin: 0; font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 900; }
.cta-band p { margin: 4px 0 0; color: #b9c8d6; }

footer.site { background: var(--navy); color: #8ea6bd; padding: 36px 0; font-size: .9rem; }
footer.site .wrap { display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
footer.site a { color: #bae6fd; text-decoration: none; }
footer.site .contact ul { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 4px; }
footer.site .contact p { margin: 2px 0 10px; color: #9fb4c8; }
footer.site .fine { flex-basis: 100%; border-top: 1px solid #ffffff14; padding-top: 14px; margin: 6px 0 0; }
footer.site .fine { max-width: 620px; color: #64809a; font-size: .82rem; }

@media (max-width: 960px) {
  .hero .wrap, .feature, .feature.flip { grid-template-columns: 1fr; }
  .feature.flip .feature-media { order: 0; }
  .hero .planet-wrap { max-width: 360px; margin: 0 auto; }
  .disciplines, .pillars, .steps-line { grid-template-columns: 1fr 1fr; }
  .sectors { grid-template-columns: 1fr 1fr; }
  .auth-page { grid-template-columns: 1fr; }
  .auth-art { min-height: 260px; }
  .auth-art .planet { width: 240px; }
  .feature-media .float { display: none; }
}
@media (max-width: 640px) {
  header.top { padding: 10px 12px; }
  header.top nav .navlink { display: none; }
  main { padding: 16px 12px 40px; }
  .disciplines, .pillars, .steps-line, .hero-stats { grid-template-columns: 1fr 1fr; }
  .disciplines, .pillars, .steps-line { grid-template-columns: 1fr; }
}
