/* MARKA AUTH EXPERIENCE R2 — isolated storefront and Filament authentication surfaces */
:root { --mk-auth-navy:#071b37;--mk-auth-deep:#0c2c54;--mk-auth-accent:#2377d8;--mk-auth-glow:#3d9cfa; }
*{box-sizing:border-box}
html:has(.mk-auth-body),html:has(.fi-simple-layout){min-height:100%;}
.mk-auth-body{margin:0;min-height:100vh;min-height:100dvh;direction:rtl;isolation:isolate;font-family:'Tajawal',Tahoma,Arial,sans-serif;color:#132b4b;background:linear-gradient(125deg,#dbe8f6 0%,#bfd4ea 48%,#e2ebf5 100%);overflow-x:hidden}
html[data-marka-theme='dark'] .mk-auth-body{color:#f0f7ff;background:linear-gradient(125deg,#06162d 0%,#10335b 48%,#061a32 100%)}
.mk-auth-scene{position:fixed;inset:0;overflow:hidden;pointer-events:none;z-index:-1;isolation:isolate}
.mk-auth-scene::before{content:'';position:absolute;inset:-10%;background:repeating-linear-gradient(125deg,transparent 0 85px,rgba(36,123,205,.075) 87px,transparent 89px 175px);animation:mk-r2-slant 29s ease-in-out infinite alternate}
.mk-auth-geometry{position:absolute;display:block;border:2px solid rgba(30,117,208,.37);background:linear-gradient(120deg,rgba(45,146,233,.15),rgba(16,59,108,.02));filter:drop-shadow(0 10px 20px rgba(22,70,137,.1));clip-path:polygon(50% 0,96% 26%,88% 80%,34% 100%,0 58%);will-change:transform}
.mk-geometry-1{width:235px;height:215px;top:5%;left:4%;animation:mk-r2-float-a 23s cubic-bezier(.45,.13,.62,.91) infinite alternate}
.mk-geometry-2{width:140px;height:158px;top:53%;left:14%;animation:mk-r2-float-b 16s ease-in-out -7s infinite alternate}
.mk-geometry-3{width:285px;height:270px;bottom:-8%;left:31%;animation:mk-r2-float-c 31s ease-in-out -12s infinite alternate}
.mk-geometry-4{width:175px;height:188px;top:13%;right:8%;animation:mk-r2-float-b 19s cubic-bezier(.28,.25,.72,.85) -5s infinite alternate-reverse}
.mk-geometry-5{width:115px;height:137px;top:54%;right:18%;animation:mk-r2-float-a 13s ease-in-out -9s infinite alternate-reverse}
.mk-geometry-6{width:210px;height:232px;bottom:-3%;right:2%;animation:mk-r2-float-c 27s ease-in-out -4s infinite alternate-reverse}
.mk-auth-glow{position:absolute;display:block;width:44vw;height:44vw;min-width:400px;min-height:400px;border-radius:50%;background:radial-gradient(circle,rgba(51,156,255,.21),transparent 70%);filter:blur(14px);animation:mk-r2-glow 17s ease-in-out infinite alternate;pointer-events:none}
.mk-glow-a{top:-29%;left:-10%;}.mk-glow-b{right:-19%;bottom:-35%;animation-duration:24s;animation-delay:-10s}
@keyframes mk-r2-float-a{0%{transform:translate3d(-20px,10px,0) rotate(-21deg) scale(.89)}47%{transform:translate3d(65px,-52px,0) rotate(34deg) scale(1.05)}100%{transform:translate3d(-35px,58px,0) rotate(91deg) scale(.96)}}
@keyframes mk-r2-float-b{0%{transform:translate3d(12px,-18px,0) rotate(12deg) scale(1.03)}38%{transform:translate3d(-48px,31px,0) rotate(-44deg) scale(.8)}100%{transform:translate3d(55px,-51px,0) rotate(77deg) scale(1.11)}}
@keyframes mk-r2-float-c{0%{transform:translate3d(3px,33px,0) rotate(32deg) scale(.87)}59%{transform:translate3d(-76px,-43px,0) rotate(-52deg) scale(1.12)}100%{transform:translate3d(40px,14px,0) rotate(115deg) scale(.95)}}
@keyframes mk-r2-glow{0%{transform:translate3d(0,0,0) scale(.8);opacity:.65}100%{transform:translate3d(70px,-44px,0) scale(1.25);opacity:1}}
@keyframes mk-r2-slant{from{transform:translate3d(-40px,-20px,0) rotate(-3deg)}to{transform:translate3d(43px,35px,0) rotate(2deg)}}
.mk-auth-panel{position:relative;z-index:1;width:min(100%,510px);min-height:100vh;min-height:100dvh;margin-inline:auto;display:flex;align-items:center;justify-content:center;background:rgba(255,255,255,.95);box-shadow:-28px 0 65px -29px rgba(7,38,77,.42),28px 0 65px -29px rgba(7,38,77,.42);border-inline:1px solid rgba(97,140,187,.21);backdrop-filter:blur(10px)}
html[data-marka-theme='dark'] .mk-auth-panel{background:rgba(10,32,60,.96);box-shadow:-32px 0 72px -25px rgba(0,6,18,.75),32px 0 72px -25px rgba(0,6,18,.75);border-color:#2b4b70}
.mk-auth-panel-inner{width:100%;max-width:460px;padding:30px clamp(22px,6vw,47px);margin:auto}
.mk-auth-toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:26px}
.mk-auth-back{font-size:.85rem;text-decoration:none;color:#296da9;font-weight:700}.mk-auth-back:hover{text-decoration:underline}
.mk-auth-theme{border:1px solid #b8d0e8;background:#e8f2fc;color:#194c7b;border-radius:12px;width:40px;height:40px;font-size:24px;cursor:pointer;display:grid;place-items:center}
.mk-auth-brand{display:flex;flex-direction:column;align-items:center;gap:7px;margin-bottom:28px}
.mk-auth-brand img{max-width:190px;width:auto;max-height:73px;object-fit:contain;background:white;border-radius:12px;padding:8px}
.mk-auth-brand span{color:#56718c;font-size:.82rem;font-weight:600}
.mk-auth-intro{text-align:center;margin-bottom:24px}.mk-auth-eyebrow{font-size:.78rem;font-weight:800;letter-spacing:.08em;color:#2479bb}.mk-auth-intro h1{font-size:clamp(1.65rem,3vw,2rem);line-height:1.3;margin:10px 0;color:#133e6b;font-weight:800}.mk-auth-intro p{color:#61758d;font-size:.9rem;line-height:1.7;margin:0}
.mk-auth-form{display:flex;flex-direction:column;gap:17px;margin:0}.mk-field{display:flex;flex-direction:column;gap:8px}.mk-field label{font-size:.88rem;font-weight:750;color:#274a6d}.mk-field>input,.mk-password-wrap input{width:100%;height:49px;border:1.5px solid #b9ccdf;background:#f7faff;color:#173b65;outline:none;border-radius:11px;font:inherit;padding-inline:15px;transition:border-color .17s,box-shadow .17s}.mk-field>input:focus,.mk-password-wrap input:focus{border-color:#267ddb;box-shadow:0 0 0 3px rgba(38,125,219,.15)}.mk-field input[dir='ltr']{text-align:left}
.mk-password-wrap{position:relative}.mk-password-wrap input{padding-right:55px}.mk-password-eye{position:absolute;right:8px;top:50%;transform:translateY(-50%);display:grid;place-items:center;width:38px;height:35px;border:0;background:transparent;cursor:pointer;color:#466a93;font-size:22px}.mk-eye-closed{display:none}.mk-password-eye[aria-pressed='true'] .mk-eye-open{display:none}.mk-password-eye[aria-pressed='true'] .mk-eye-closed{display:inline}
.mk-form-between{display:flex;justify-content:flex-end}.mk-form-between a,.mk-auth-bottom a{font-weight:800;color:#1464b3;text-decoration:none;font-size:.86rem}.mk-form-between a:hover,.mk-auth-bottom a:hover{text-decoration:underline}
.mk-auth-submit{display:flex;justify-content:center;align-items:center;gap:10px;width:100%;height:49px;border:0;border-radius:12px;background:linear-gradient(110deg,#176ec9,#0952a7);color:#fff;font:inherit;font-weight:800;cursor:pointer;transition:filter .18s}.mk-auth-submit:not(:disabled):hover{filter:brightness(1.12)}.mk-auth-submit:disabled{opacity:.8;cursor:progress}.mk-loading{display:none;width:16px;height:16px;border-radius:50%;border:2px solid #ffffff65;border-top-color:white;animation:mk-r2-spinner .8s linear infinite}.mk-auth-submit[aria-busy='true'] .mk-loading{display:inline-block}@keyframes mk-r2-spinner{to{transform:rotate(360deg)}}
.mk-auth-bottom{margin:22px auto 0;text-align:center;font-size:.86rem;color:#5c7187;display:flex;justify-content:center;gap:8px;flex-wrap:wrap}.mk-auth-signature{text-align:center;margin:33px 0 0;color:#8a9db0;font-size:.74rem;letter-spacing:.05em}.mk-auth-signature span{margin-inline:8px}
.mk-auth-notice,.mk-auth-error{padding:12px 15px;border-radius:11px;margin-bottom:20px;font-size:.86rem;line-height:1.55}.mk-auth-notice{background:#e5f7ee;color:#166443;border:1px solid #add8c1}.mk-auth-error{background:#fff1f1;color:#8d2942;border:1px solid #edbec7}.mk-auth-error ul{margin:6px 15px 0 0;padding:0}
html[data-marka-theme='dark'] .mk-auth-brand span,html[data-marka-theme='dark'] .mk-auth-intro p,html[data-marka-theme='dark'] .mk-auth-bottom{color:#a8c3e0}
html[data-marka-theme='dark'] .mk-auth-intro h1{color:#edf7ff}
html[data-marka-theme='dark'] .mk-field label{color:#d3e7fb}
html[data-marka-theme='dark'] .mk-field>input,html[data-marka-theme='dark'] .mk-password-wrap input{background:#133757;color:#eff8ff;border-color:#386183}
html[data-marka-theme='dark'] .mk-auth-theme{background:#163a61;color:#e5f3ff;border-color:#356087}
html[data-marka-theme='dark'] .mk-auth-back,html[data-marka-theme='dark'] .mk-form-between a,html[data-marka-theme='dark'] .mk-auth-bottom a{color:#84c5ff}
@media(max-width:550px){.mk-auth-panel{width:100%;border:0;box-shadow:none!important}.mk-auth-panel-inner{padding:24px 25px}.mk-auth-scene{opacity:.65}}
@media(prefers-reduced-motion:reduce){.mk-auth-scene *, .mk-auth-scene::before,.mk-loading{animation:none!important}.mk-auth-submit{transition:none!important}}
/* Filament 5 panel native auth: same full-height slab and moving geometric backdrop, scoped to auth pages only. */
.fi-simple-layout{position:relative;min-height:100dvh!important;isolation:isolate;overflow-x:hidden!important;background:linear-gradient(125deg,#061c3a,#104278 55%,#06172e)!important}
.fi-simple-layout::before,.fi-simple-layout::after{content:'';position:fixed;z-index:-1;width:260px;height:285px;border:2px solid rgba(62,160,240,.35);clip-path:polygon(50% 0,96% 26%,88% 80%,34% 100%,0 58%);background:linear-gradient(135deg,rgba(30,137,231,.16),transparent);pointer-events:none}
.fi-simple-layout::before{top:8%;left:12%;animation:mk-r2-float-a 23s ease-in-out infinite alternate}
.fi-simple-layout::after{bottom:5%;right:10%;animation:mk-r2-float-b 17s ease-in-out -5s infinite alternate}
.fi-simple-layout :is(.fi-simple-main-ctn,.fi-simple-main-container){min-height:100dvh!important;display:flex!important;align-items:stretch!important;justify-content:center!important;padding:0!important}
.fi-simple-layout .fi-simple-main{width:min(100vw,510px)!important;max-width:510px!important;min-height:100dvh!important;border-radius:0!important;padding:clamp(25px,4vw,47px)!important;margin:0 auto!important;display:flex!important;flex-direction:column!important;justify-content:center!important;background:#102b4b!important;box-shadow:-28px 0 70px -24px rgba(0,8,25,.7),28px 0 70px -24px rgba(0,8,25,.7)!important;border-inline:1px solid rgba(83,141,205,.32)!important;border-block:0!important}
.fi-simple-layout .fi-simple-main :is(.fi-header-heading,.fi-header-subheading,label){color:#e8f5ff!important}
.fi-simple-layout .fi-simple-main .fi-input-wrp{background:#163b62!important;border-color:#376990!important}
.fi-simple-layout .fi-simple-main input{color:#f2f8ff!important}
.fi-simple-layout .fi-simple-main .fi-btn.fi-color-primary{background:linear-gradient(110deg,#176ec9,#0952a7)!important;box-shadow:none!important}
.fi-simple-layout .fi-simple-main :is(.fi-btn,.fi-icon-btn):hover{transform:none!important}
@media(prefers-reduced-motion:reduce){.fi-simple-layout::before,.fi-simple-layout::after{animation:none!important}}
@media(max-width:550px){.fi-simple-layout .fi-simple-main{width:100%!important;border-inline:0!important;box-shadow:none!important}}

/* Filament topbar account menu, kept deliberately narrow so table dropdowns remain intact. */
.fi-user-menu :is(.fi-dropdown-panel,.fi-dropdown-list){min-width:250px;max-width:min(340px,calc(100vw - 30px));border-radius:14px!important;padding:8px!important;box-shadow:0 18px 48px rgba(8,30,61,.2)!important}
.fi-user-menu :is(.fi-dropdown-list-item,[role="menuitem"]){min-height:43px;padding:9px 13px!important;display:flex;align-items:center;gap:10px;border-radius:9px!important}
.fi-topbar :is(.fi-user-menu,.fi-theme-switcher){margin-inline:3px}
.mk-password-eye svg{width:21px;height:21px}.mk-password-eye svg.mk-eye-closed{display:none}.mk-password-eye[aria-pressed='true'] svg.mk-eye-open{display:none}.mk-password-eye[aria-pressed='true'] svg.mk-eye-closed{display:block}

/* R3: quieter and balanced loading feedback; no request/authentication logic changed. */
.mk-auth-submit { gap: 9px; }
.mk-auth-submit[aria-busy="true"] { filter: saturate(.94); opacity: .94; }
.mk-auth-submit[aria-busy="true"] .mk-loading {
    width: 13px; height: 13px; flex: 0 0 13px;
    border-width: 2px; border-color: rgb(255 255 255 / .32); border-top-color: #fff;
    animation-duration: 1s;
}
.mk-auth-submit[aria-busy="true"] .mk-submit-label { white-space: nowrap; }
@media(prefers-reduced-motion: reduce) {
    .mk-auth-submit[aria-busy="true"] .mk-loading { animation: none; border-color: rgb(255 255 255 / .75); }
}
