/* زاد المعلم — الشاشة الافتتاحية والدخول */
body { min-height: 100vh; overflow-x: hidden; background: radial-gradient(1200px 700px at 80% -10%, #0a5c66 0%, transparent 60%), radial-gradient(900px 600px at 0% 110%, #0b4a3a 0%, transparent 55%), var(--deep-2); color: #fff; }
#sky { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.aurora { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; filter: blur(60px); opacity: .55; }
.aurora i { position: absolute; width: 46vmax; height: 46vmax; border-radius: 50%; mix-blend-mode: screen; animation: drift 22s ease-in-out infinite alternate; }
.aurora i:nth-child(1) { background: #2e7fb8; top: -18vmax; left: -10vmax; }
.aurora i:nth-child(2) { background: #3f9d6d; bottom: -22vmax; right: -12vmax; animation-delay: -7s; }
.aurora i:nth-child(3) { background: #b8893a; top: 30%; left: 40%; width: 24vmax; height: 24vmax; opacity: .35; animation-delay: -13s; }
@keyframes drift { to { transform: translate(8vmax, 6vmax) scale(1.15); } }

/* ── الشاشة الافتتاحية ── */
#splash { position: fixed; inset: 0; z-index: 10; display: grid; place-content: center; justify-items: center; text-align: center; gap: 6px; transition: opacity .9s var(--ease), transform 1.1s var(--ease), filter .9s; }
body.ready #splash { opacity: 0; transform: scale(1.18); filter: blur(10px); pointer-events: none; }
.mark-wrap { width: 168px; height: 168px; position: relative; }
.mark-wrap::after { content: ''; position: absolute; inset: 18%; border-radius: 50%; background: radial-gradient(circle, rgba(243,213,142,.35), transparent 70%); animation: halo 2.6s ease-in-out .9s infinite; }
@keyframes halo { 50% { transform: scale(1.35); opacity: .4; } }
.mark { width: 100%; height: 100%; overflow: visible; position: relative; z-index: 1; }
.ring { fill: none; stroke: rgba(255,255,255,.14); stroke-width: 1.2; stroke-dasharray: 465; stroke-dashoffset: 465; animation: dash 1.6s var(--ease) .1s forwards; }
.ring.r2 { stroke: rgba(243,213,142,.28); stroke-dasharray: 3 7; stroke-dashoffset: 0; opacity: 0; animation: fadeIn .8s .9s forwards, spinR 30s linear infinite; transform-origin: 80px 80px; }
@keyframes spinR { to { transform: rotate(360deg); } }
.book path { stroke-dasharray: 200; stroke-dashoffset: 200; animation: dash 1.3s var(--ease) forwards; }
.book .pr { animation-delay: .15s; }
.book .spine { animation-delay: .5s; }
.book .ln { animation-delay: .8s; }
@keyframes dash { to { stroke-dashoffset: 0; } }
.star { transform-origin: 80px 38px; opacity: 0; animation: starIn 1.1s var(--spring) .95s forwards; }
@keyframes starIn { from { opacity: 0; transform: translateY(42px) scale(.2) rotate(-135deg); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { to { opacity: 1; } }
.brand { margin: 8px 0 0; font-family: var(--disp); font-weight: 700; font-size: clamp(54px, 9vw, 92px); line-height: 1.2; letter-spacing: 0; }
.brand span, .brand em { display: inline-block; font-style: normal; background: linear-gradient(100deg, #fff 20%, #f3d58e 50%, #fff 80%); background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: rise 1s var(--ease) 1.2s both, shine 3.4s linear 2.2s infinite; }
.brand em { font-size: .62em; animation-delay: 1.38s, 2.4s; background-image: linear-gradient(100deg, #9fd8c7 20%, #fff 50%, #9fd8c7 80%); }
@keyframes rise { from { opacity: 0; transform: translateY(30px); filter: blur(8px); } }
@keyframes shine { to { background-position: -250% 0; } }
.tag { margin: 0; font-size: 18px; color: rgba(255,255,255,.75); animation: rise .9s var(--ease) 1.6s both; }
.tag b { color: #f3d58e; font-weight: 600; }
.loadbar { width: 180px; height: 3px; border-radius: 3px; background: rgba(255,255,255,.12); overflow: hidden; margin-top: 18px; animation: fadeIn .4s 1.7s both; opacity: 0; }
.loadbar i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #3f9d6d, #f3d58e, #2e7fb8); transform: translateX(100%); animation: load 1.4s var(--ease) 1.8s forwards; }
@keyframes load { to { transform: none; } }
.skip { position: fixed; inset-block-end: 22px; inset-inline-start: 22px; background: rgba(255,255,255,.08); color: rgba(255,255,255,.7); border: 1px solid rgba(255,255,255,.15); border-radius: 99px; padding: 5px 16px; font-size: 13px; cursor: pointer; }

/* ── الدخول ── */
#login { position: relative; z-index: 2; min-height: 100vh; display: grid; grid-template-columns: 1.15fr 1fr; opacity: 0; pointer-events: none; }
body.ready #login { opacity: 1; pointer-events: auto; transition: opacity .8s .25s; }
.show { padding: 48px 6vw 40px; display: flex; flex-direction: column; justify-content: center; gap: 22px; }
.show-head { display: flex; align-items: center; gap: 12px; }
.show-logo { width: 52px; height: 52px; border-radius: 15px; box-shadow: 0 10px 26px rgba(0,0,0,.25); }
.show-head b { display: block; font-family: var(--disp); font-size: 26px; line-height: 1.2; }
.show-head span { font-size: 13.5px; color: rgba(255,255,255,.65); }
.show-title { font-family: var(--mes); font-weight: 700; font-size: clamp(30px, 3.5vw, 46px); line-height: 1.45; margin: 6px 0 0; }
.show-title span { background: linear-gradient(90deg, #9fe0c0, #f3d58e); -webkit-background-clip: text; background-clip: text; color: transparent; }
body.ready .show > * { animation: rise .9s var(--ease) both; }
body.ready .show > :nth-child(2) { animation-delay: .1s; } body.ready .show > :nth-child(3) { animation-delay: .2s; } body.ready .show > :nth-child(4) { animation-delay: .3s; }

.stage3d { position: relative; height: 290px; perspective: 1200px; margin: 6px 0; }
.sl { position: absolute; width: 300px; aspect-ratio: 16/9; border-radius: 14px; background: linear-gradient(160deg, #ffffff, #eef6fa); box-shadow: 0 30px 60px rgba(0,0,0,.35), 0 0 0 1px rgba(255,255,255,.4) inset; padding: 14px 16px; overflow: hidden; transform-style: preserve-3d; animation: float 7s ease-in-out infinite; }
.sl.s1 { inset-inline-end: 6%; top: 10px; transform: rotateY(-18deg) rotateX(8deg) rotateZ(-3deg); }
.sl.s2 { inset-inline-end: 34%; top: 92px; transform: rotateY(-12deg) rotateX(10deg) rotateZ(4deg); animation-delay: -2.4s; background: linear-gradient(150deg, #04454f, #0b6470); }
.sl.s3 { inset-inline-end: 62%; top: 26px; width: 170px; aspect-ratio: 210/297; transform: rotateY(-22deg) rotateX(6deg) rotateZ(-5deg); animation-delay: -4.6s; padding: 8px 10px; }
@keyframes float { 50% { translate: 0 -14px; } }
.sl-bar { height: 8px; width: 46%; border-radius: 6px; background: var(--grad); margin-bottom: 12px; }
.sl-bar.g { background: linear-gradient(90deg, #f3d58e, #b8893a); }
.sl-t { height: 14px; width: 70%; border-radius: 6px; background: #0d2233; opacity: .85; margin-bottom: 14px; }
.s2 .sl-t { background: #fff; }
.sl-l { height: 7px; border-radius: 5px; background: #b9cad7; margin: 8px 0; }
.w55 { width: 55%; } .w60 { width: 60%; } .w62 { width: 62%; } .w70 { width: 70%; } .w80 { width: 80%; }
.sl-ico { position: absolute; inset-inline-start: 16px; bottom: 16px; width: 56px; height: 56px; border-radius: 16px; background: var(--grad); box-shadow: 0 10px 20px rgba(46,127,184,.35); }
.sl-chart { display: flex; align-items: flex-end; gap: 10px; height: 58%; padding-top: 6px; }
.sl-chart i { flex: 1; border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, #7fd3b0, #2e8f92); animation: bar 2.8s var(--ease) infinite alternate; transform-origin: bottom; }
.sl-chart i:nth-child(1) { height: 45%; } .sl-chart i:nth-child(2) { height: 80%; animation-delay: -.6s; } .sl-chart i:nth-child(3) { height: 60%; animation-delay: -1.2s; } .sl-chart i:nth-child(4) { height: 95%; animation-delay: -1.8s; background: linear-gradient(180deg, #f3d58e, #b8893a); }
@keyframes bar { from { transform: scaleY(.55); } }
.paper .moe { height: 16px; border-radius: 3px 3px 7px 7px; background: url('/assets/hd-top.png') center/100% 100%; margin-bottom: 8px; }
.sl-q { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin: 8px 0; }
.sl-q i { height: 14px; border: 1.5px solid #c8d7e2; border-radius: 4px; }
.orb { position: absolute; width: 90px; height: 90px; border-radius: 50%; inset-inline-end: 0; bottom: 6px; background: radial-gradient(circle at 35% 30%, #fff6dc, #f3d58e 30%, #b8893a 70%); box-shadow: 0 0 60px rgba(243,213,142,.5); animation: float 5s ease-in-out infinite; }

.feats { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.feats li { display: flex; align-items: center; gap: 8px; padding: 6px 14px 6px 8px; border-radius: 99px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); font-size: 13.5px; backdrop-filter: blur(6px); }
.fi { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--grad); }

.panel { display: grid; place-items: center; padding: 32px 22px; }
.lcard { width: min(420px, 100%); background: rgba(255,255,255,.97); color: var(--ink); border-radius: 28px; padding: 34px 32px 24px; box-shadow: 0 40px 90px rgba(0,0,0,.4), 0 0 0 1px rgba(255,255,255,.6) inset; position: relative; }
body.ready .lcard { animation: cardIn 1.1s var(--spring) .3s both; }
@keyframes cardIn { from { opacity: 0; transform: translateY(40px) rotateX(18deg) scale(.94); } }
.lcard::before { content: ''; position: absolute; inset-inline: 30px; top: 0; height: 4px; border-radius: 0 0 6px 6px; background: var(--grad); }
.lc-logo { width: 64px; height: 64px; border-radius: 19px; display: block; margin: 0 auto 10px; box-shadow: 0 14px 30px rgba(3,59,69,.3); }
.lcard h2 { margin: 0; text-align: center; font-family: var(--mes); font-size: 25px; font-weight: 700; }
.lcard h2 span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lc-sub { text-align: center; color: var(--ink-3); margin: 2px 0 22px; font-size: 14px; }
.fld { display: grid; gap: 6px; margin-bottom: 14px; }
.fld > span { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.iw { position: relative; display: flex; align-items: center; }
.iw > .ic { position: absolute; inset-inline-start: 14px; color: var(--ink-3); pointer-events: none; }
.iw input { width: 100%; border: 1.5px solid var(--line-2); border-radius: 14px; padding: 12px 44px; font-size: 16px; background: var(--tint); outline: none; transition: border-color .2s, box-shadow .2s, background .2s; text-align: right; }
.iw input:focus { border-color: var(--g2); background: #fff; box-shadow: 0 0 0 4px rgba(46,127,184,.13); }
.eye { position: absolute; inset-inline-end: 8px; border: 0; background: none; color: var(--ink-3); cursor: pointer; padding: 6px; border-radius: 8px; }
.eye:hover { color: var(--g2); }
.lerr { min-height: 22px; margin: 0 0 6px; color: var(--dan); font-size: 13.5px; font-weight: 600; text-align: center; }
.lcard.shake { animation: shake .45s; }
@keyframes shake { 20%, 60% { transform: translateX(-9px); } 40%, 80% { transform: translateX(9px); } }
.go { width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px; border: 0; border-radius: 15px; padding: 13px; font-size: 17px; font-weight: 700; color: #fff; background: var(--grad); background-size: 160% 100%; cursor: pointer; box-shadow: 0 12px 28px rgba(46,127,184,.35), inset 0 1px 0 rgba(255,255,255,.3); transition: transform .25s var(--ease), box-shadow .25s, background-position .5s; }
.go:hover { transform: translateY(-2px); background-position: 100% 0; box-shadow: 0 18px 36px rgba(46,127,184,.42); }
.go:active { transform: scale(.98); }
.go .ic { transition: transform .3s var(--ease); }
.go:hover .ic { transform: translateX(-5px); }
.go[disabled] { opacity: .75; pointer-events: none; }
.lc-foot { text-align: center; font-size: 12px; color: var(--ink-3); margin: 18px 0 0; }

@media (max-width: 900px) {
  #login { grid-template-columns: 1fr; }
  .show { display: none; }
  .panel { min-height: 100vh; }
}
