/* =============================================================================
   SHARDHAN — authentication experience (team + client portals)
   Markup contract:
     <div class="auth">
       <section class="auth-hero" data-sd-hero="team|client"></section>   (filled by theme.js)
       <section class="auth-panel"> … <div class="auth-card"> form </div> … </section>
     </div>
   ============================================================================= */

*, *::before, *::after { box-sizing: border-box; }
body:has(> .auth), body:has(#app > .auth) { margin: 0; }
.auth {
  display: flex; min-height: 100vh; background: #fff;
  font-family: var(--font-body); color: var(--sd-ink);
}

/* ------------------------------------------------------------ HERO */
.auth-hero {
  flex: 1.15; position: relative; overflow: hidden; color: #fff; isolation: isolate;
  background:
    radial-gradient(900px 600px at 15% 10%, rgba(26, 107, 80, .9), transparent 60%),
    linear-gradient(155deg, #062A20 0%, #0B3B2E 45%, #041F17 100%);
  padding: 34px 56px 0; display: flex; flex-direction: column; min-height: 100vh;
}
.auth-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; opacity: .9; }
.auth-orb { position: absolute; border-radius: 50%; filter: blur(70px); z-index: -2; opacity: .55; }
.auth-orb.o1 { width: 420px; height: 420px; background: #FF8A1F; top: -140px; right: -80px; animation: sd-orb1 16s ease-in-out infinite alternate; }
.auth-orb.o2 { width: 380px; height: 380px; background: #1FA35A; bottom: -120px; left: -100px; animation: sd-orb2 19s ease-in-out infinite alternate; }
.auth-orb.o3 { width: 260px; height: 260px; background: #3B6FD4; top: 45%; left: 55%; opacity: .25; animation: sd-orb1 23s ease-in-out infinite alternate-reverse; }
@keyframes sd-orb1 { to { transform: translate(-120px, 140px) scale(1.2); } }
@keyframes sd-orb2 { to { transform: translate(160px, -120px) scale(1.15); } }

.auth-grid {
  position: absolute; inset: 0; z-index: -1; opacity: .5;
  background-image:
    linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse at 40% 40%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse at 40% 40%, #000 20%, transparent 75%);
  animation: sd-grid 30s linear infinite;
}
@keyframes sd-grid { to { background-position: 56px 56px, 56px 56px; } }

.auth-ring {
  position: absolute; right: -170px; top: 50%; width: 560px; height: 560px; margin-top: -280px;
  z-index: -1; opacity: .22; animation: sd-spin 90s linear infinite;
}
.auth-ring.r2 { width: 380px; height: 380px; margin-top: -190px; right: -80px; opacity: .3; animation-duration: 60s; animation-direction: reverse; }
@keyframes sd-spin { to { transform: rotate(360deg); } }

.auth-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.auth-brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: #fff; }
.auth-brand .brand-mark { width: 50px; height: 50px; filter: drop-shadow(0 10px 20px rgba(0, 0, 0, .35)); animation: sd-float 6s ease-in-out infinite; }
@keyframes sd-float { 50% { transform: translateY(-5px) rotate(-2deg); } }
.auth-brand .nm { font: 700 22px/1 var(--font-display); letter-spacing: 3px; }
.auth-brand .tg { font-size: 11.5px; color: rgba(255, 255, 255, .7); margin-top: 6px; letter-spacing: .3px; }
.auth-brand .tg .sd-hindi { color: var(--sd-saffron-2); margin-right: 6px; }
.auth-clock {
  display: flex; flex-direction: column; align-items: flex-end; gap: 4px;
  font-family: var(--font-mono); text-align: right;
}
.auth-clock .t { font-size: 20px; font-weight: 600; letter-spacing: 1px; }
.auth-clock .d { font-size: 10.5px; color: rgba(255, 255, 255, .6); letter-spacing: 1.2px; text-transform: uppercase; }

.auth-body { margin: auto 0; max-width: 560px; padding: 40px 0; }
.auth-kicker {
  display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px 7px 10px; border-radius: 999px;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14);
  font-size: 12px; font-weight: 600; letter-spacing: 1.4px; text-transform: uppercase; margin-bottom: 26px;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.auth-kicker .pulse { width: 8px; height: 8px; border-radius: 50%; background: #2FBF71; animation: sd-ping 2s infinite; }
.auth-h1 { font: 700 50px/1.08 var(--font-display); letter-spacing: -1.5px; margin: 0 0 20px; }
.auth-h1 .hl {
  display: inline-block; min-width: 3ch;
  background: linear-gradient(90deg, #FFB067, #FF8A1F 40%, #FFD8A8);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.auth-h1 .caret { display: inline-block; width: 3px; height: .9em; background: #FF9A3D; margin-left: 4px; vertical-align: -4px; animation: sd-blink 1s steps(1) infinite; }
@keyframes sd-blink { 50% { opacity: 0; } }
.auth-lead { font-size: 15.5px; line-height: 1.7; color: rgba(255, 255, 255, .74); margin: 0 0 32px; max-width: 480px; }
.auth-stats { display: flex; gap: 14px; flex-wrap: wrap; }
.auth-stat {
  flex: 1; min-width: 130px; padding: 16px 18px; border-radius: 14px;
  background: linear-gradient(160deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .03));
  border: 1px solid rgba(255, 255, 255, .12);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition: transform .4s var(--ease-out), border-color .3s;
}
.auth-stat:hover { transform: translateY(-4px); border-color: rgba(255, 154, 61, .6); }
.auth-stat b { display: block; font: 700 28px/1 var(--font-display); margin-bottom: 8px; }
.auth-stat > span { font-size: 12px; color: rgba(255, 255, 255, .62); }
.auth-stat b span { font: inherit; color: inherit; }
.auth-stat i { font-size: 18px; color: #FF9A3D; float: right; }

.auth-ticker {
  margin: 0 -56px; border-top: 1px solid rgba(255, 255, 255, .1);
  background: rgba(0, 0, 0, .18); overflow: hidden; white-space: nowrap; position: relative;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.auth-ticker .lbl {
  position: absolute; left: 0; top: 0; bottom: 0; z-index: 2; display: flex; align-items: center;
  padding: 0 16px 0 56px; background: linear-gradient(90deg, #EB7A1C 80%, transparent);
  font: 700 11px/1 var(--font-display); letter-spacing: 1.5px; text-transform: uppercase;
}
.auth-ticker .track { display: inline-flex; gap: 42px; padding: 15px 0; animation: sd-marquee 55s linear infinite; }
.auth-ticker:hover .track { animation-play-state: paused; }
.auth-ticker .track span { font-size: 12.5px; color: rgba(255, 255, 255, .78); display: inline-flex; align-items: center; gap: 10px; }
.auth-ticker .track span::before { content: ""; width: 6px; height: 6px; transform: rotate(45deg); background: #FF9A3D; }
@keyframes sd-marquee { to { transform: translateX(-50%); } }

/* ------------------------------------------------------------ PANEL */
.auth-panel {
  width: 520px; flex: none; display: flex; flex-direction: column; position: relative;
  background:
    radial-gradient(600px 300px at 100% 0%, rgba(235, 122, 28, .08), transparent 60%),
    radial-gradient(500px 300px at 0% 100%, rgba(19, 128, 63, .07), transparent 60%),
    #FBFCFB;
}
.auth-panel::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 1px; background: var(--sd-border); }
.auth-panel-top {
  display: flex; align-items: center; justify-content: space-between; padding: 26px 40px 0;
  font-size: 12.5px; color: var(--sd-muted);
}
.auth-panel-top a, .auth-panel-top [data-action] { color: var(--sd-blue); font-weight: 600; text-decoration: none; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.auth-panel-top a:hover { text-decoration: underline; }
.auth-secure { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--sd-green); }
.auth-center { flex: 1; display: flex; align-items: center; justify-content: center; padding: 30px 40px; }
.auth-card { width: 100%; max-width: 380px; animation: sd-card-in .8s var(--ease-out) both; }
@keyframes sd-card-in { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
.auth-card > * { animation: sd-rise .7s var(--ease-out) both; }
.auth-card > *:nth-child(2) { animation-delay: .06s; } .auth-card > *:nth-child(3) { animation-delay: .12s; }
.auth-card > *:nth-child(4) { animation-delay: .18s; } .auth-card > *:nth-child(5) { animation-delay: .24s; }
.auth-card > *:nth-child(n+6) { animation-delay: .3s; }

.auth-role {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px;
  padding: 6px 12px 6px 6px; border-radius: 999px; background: #fff; border: 1px solid var(--sd-border);
  font-size: 11.5px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--sd-forest-600);
  box-shadow: var(--shadow-1);
}
.auth-role i { width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #FF9A3D, #EB7A1C); color: #fff; font-size: 13px; }
.auth-role .sd-hindi { color: var(--sd-saffron); font-weight: 600; letter-spacing: 0; text-transform: none; }
.auth-title { font: 700 30px/1.15 var(--font-display) !important; letter-spacing: -.6px; margin: 0 0 8px; color: var(--sd-forest-800); }
.auth-sub { font-size: 14px; line-height: 1.6; color: #5B6763; margin: 0 0 26px; }

.auth-alert {
  display: flex; gap: 10px; align-items: flex-start; border-radius: 12px; padding: 12px 14px; margin-bottom: 18px;
  font-size: 13px; font-weight: 500; line-height: 1.45; animation: sd-shake .5s var(--ease-out) both;
}
.auth-alert i { font-size: 18px; flex: none; margin-top: -1px; }
.auth-alert.err { background: #FDECEC; border: 1px solid #F6C9C9; color: #B91C1C; }
.auth-alert.ok { background: #E6F5EA; border: 1px solid #C4E6CF; color: #0F6B34; animation-name: sd-rise; }
@keyframes sd-shake { 0% { transform: translateX(0); } 20% { transform: translateX(-8px); } 40% { transform: translateX(7px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(2px); } 100% { transform: none; } }

/* floating-label field */
.fld { position: relative; margin-bottom: 16px; }
.fld input {
  width: 100%; height: 56px; border: 1.5px solid #D3DCD8; border-radius: 12px; background: #fff;
  padding: 22px 46px 8px 46px; font: 500 15px/1 var(--font-body); color: var(--sd-forest-800);
  transition: border-color .2s, box-shadow .25s; outline: none;
}
.fld label {
  position: absolute; left: 46px; top: 18px; font-size: 14.5px; color: #7B8783; pointer-events: none;
  transition: transform .25s var(--ease-out), color .2s, font-size .25s; transform-origin: left top;
}
.fld input:focus + label, .fld input:not(:placeholder-shown) + label { transform: translateY(-10px); font-size: 11.5px; color: var(--sd-saffron); font-weight: 600; letter-spacing: .3px; }
.fld input:not(:focus):not(:placeholder-shown) + label { color: #5B6763; }
.fld input:focus { border-color: var(--sd-saffron) !important; box-shadow: 0 0 0 4px rgba(235, 122, 28, .14) !important; }
.fld .lead { position: absolute; left: 16px; top: 18px; font-size: 19px; color: #6B7773; transition: color .2s; pointer-events: none; }
.fld input:focus ~ .lead { color: var(--sd-saffron); }
.fld .eye {
  position: absolute; right: 8px; top: 8px; width: 40px; height: 40px; border: 0; background: transparent;
  color: #6B7773; font-size: 19px; cursor: pointer; border-radius: 10px; display: flex; align-items: center; justify-content: center;
}
.fld .eye:hover { background: var(--sd-forest-50); color: var(--sd-forest-600); }
.fld .bar { position: absolute; left: 12px; right: 12px; bottom: 0; height: 2px; border-radius: 2px; background: linear-gradient(90deg, #FF9A3D, #2FBF71); transform: scaleX(0); transition: transform .4s var(--ease-out); }
.fld input:focus ~ .bar { transform: scaleX(1); }
.caps { display: none; align-items: center; gap: 6px; font-size: 12px; color: #9A5B00; margin: -8px 0 12px; font-weight: 600; }
.caps.on { display: flex; }

.auth-row { display: flex; align-items: center; justify-content: space-between; margin: 2px 0 22px; font-size: 13px; }
.auth-row label { display: flex; align-items: center; gap: 8px; color: #5B6763; cursor: pointer; }
.auth-row input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--sd-forest-600); }
.auth-link { color: var(--sd-blue) !important; font-weight: 600; text-decoration: none; cursor: pointer; }
.auth-link:hover { text-decoration: underline; }

.auth-btn {
  position: relative; overflow: hidden; isolation: isolate; width: 100%; height: 54px; border: 0; border-radius: 12px; cursor: pointer;
  background: linear-gradient(135deg, #1A6B50 0%, #0B3B2E 55%, #062A20 100%);
  color: #fff; font: 600 15.5px/1 var(--font-display); letter-spacing: .3px;
  display: flex; align-items: center; justify-content: center; gap: 10px; text-decoration: none;
  box-shadow: 0 14px 30px -14px rgba(6, 42, 32, .9), inset 0 -3px 0 #EB7A1C;
  transition: transform .25s var(--ease-out), box-shadow .3s;
}
.auth-btn::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .28), transparent);
  transform: skewX(-20deg); animation: sd-shine 3.6s var(--ease-out) infinite;
}
@keyframes sd-shine { 0%, 55% { left: -60%; } 100% { left: 130%; } }
.auth-btn:hover { transform: translateY(-2px); box-shadow: 0 18px 36px -14px rgba(6, 42, 32, .95), inset 0 -3px 0 #FF9A3D; }
.auth-btn:active { transform: translateY(0) scale(.99); }
.auth-btn[disabled] { opacity: .85; cursor: progress; transform: none; }
.auth-btn i { font-size: 19px; transition: transform .3s var(--ease-out); }
.auth-btn:hover i.go { transform: translateX(4px); }
.auth-btn .spin { display: none; animation: sd-spin .8s linear infinite; }
.auth-btn.busy .spin { display: inline-block; }
.auth-btn.busy .go { display: none; }
.auth-btn.alt { background: #fff; color: var(--sd-forest-700); border: 1.5px solid #D3DCD8; box-shadow: none; }
.auth-btn.alt::after { display: none; }

.auth-back { display: flex; justify-content: center; margin-top: 18px; font-size: 13.5px; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 24px 0 16px; color: #6B7773; font-size: 11px; letter-spacing: 1.4px; text-transform: uppercase; font-weight: 600; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--sd-border); }
.auth-trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.auth-trust div { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 6px; border-radius: 10px; background: #fff; border: 1px solid #E6ECE9; font-size: 11px; color: #5B6763; font-weight: 600; text-align: center; transition: transform .3s var(--ease-out), border-color .3s; }
.auth-trust div:hover { transform: translateY(-2px); border-color: #F5C08F; }
.auth-trust i { font-size: 19px; color: var(--sd-forest-500); }

.auth-icon-hero {
  width: 76px; height: 76px; border-radius: 22px; display: flex; align-items: center; justify-content: center; margin-bottom: 22px;
  background: linear-gradient(135deg, #FFF4E6, #E6F5EA); border: 1px solid #E6ECE9; position: relative;
}
.auth-icon-hero i { font-size: 36px; color: var(--sd-forest-600); animation: sd-pop .7s var(--ease-spring) .2s both; }
.auth-icon-hero::after { content: ""; position: absolute; inset: -6px; border-radius: 26px; border: 2px dashed #F5C08F; animation: sd-spin 18s linear infinite; }
.auth-icon-hero.ok i { color: #0F6B34; }
.auth-hint { font-size: 12.5px; color: #5F6B67; line-height: 1.6; background: #F4F7F6; border: 1px dashed #D3DCD8; border-radius: 10px; padding: 12px 14px; margin: 0 0 22px; }

.auth-foot {
  padding: 18px 40px 22px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-size: 11.5px; color: #6B7773; border-top: 1px solid #E6ECE9;
}
.auth-foot b { color: #5B6763; font-weight: 600; }
.auth-disclaimer { font-size: 11.5px; line-height: 1.55; color: #6B7773; margin-top: 20px; display: flex; gap: 8px; }
.auth-disclaimer i { color: #C2570C; font-size: 15px; flex: none; }

/* keep the accessibility tab clear of the sign-in form */
body:has(.auth) .sd-a11y { top: auto; bottom: 90px; transform: none; }

/* splash (client portal session restore) */
.auth-splash { min-height: 100vh; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 22px; background: radial-gradient(700px 400px at 50% 40%, #FFF4E6, #F4F7F6 70%); }
.auth-splash .brand-mark { width: 72px; height: 72px; animation: sd-float 3s ease-in-out infinite; filter: drop-shadow(0 16px 26px rgba(6, 42, 32, .35)); }
.auth-splash .loader { width: 180px; height: 4px; border-radius: 4px; background: #E6ECE9; overflow: hidden; position: relative; }
.auth-splash .loader::after { content: ""; position: absolute; top: 0; bottom: 0; width: 40%; background: var(--sd-tricolour); border-radius: 4px; animation: sd-load 1.1s var(--ease-out) infinite; }
@keyframes sd-load { from { left: -40%; } to { left: 100%; } }
.auth-splash .nm { font: 700 15px/1 var(--font-display); letter-spacing: 4px; color: var(--sd-forest-700); }

/* ------------------------------------------------------------ responsive */
@media (max-width: 1100px) {
  .auth-hero { padding: 30px 36px 0; }
  .auth-ticker { margin: 0 -36px; }
  .auth-ticker .lbl { padding-left: 36px; }
  .auth-h1 { font-size: 40px; }
  .auth-panel { width: 460px; }
}
@media (max-width: 860px) {
  .auth { flex-direction: column; }
  .auth-hero { min-height: auto; padding: 22px 20px 0; flex: none; }
  .auth-body { padding: 26px 0 24px; }
  .auth-h1 { font-size: 30px; letter-spacing: -.8px; }
  .auth-lead { font-size: 14px; margin-bottom: 18px; }
  .auth-stats { gap: 8px; }
  .auth-stat { min-width: 0; padding: 12px; }
  .auth-stat b { font-size: 20px; }
  .auth-clock { display: none; }
  .auth-ticker { margin: 0 -20px; }
  .auth-ticker .lbl { padding-left: 20px; }
  .auth-panel { width: 100%; }
  .auth-panel::before { display: none; }
  .auth-panel-top, .auth-center, .auth-foot { padding-left: 20px; padding-right: 20px; }
  .auth-ring { display: none; }
}
