/* ════════════════════════════════════════════════════════════════
   Admin Login — Full-page Aurora + Centered Transparent Card
   Nagar Panchayat Shergarh | Sovereign Civic Portal
   ════════════════════════════════════════════════════════════════ */

/* ── 0. Design Tokens ─────────────────────────────────────────── */
:root {
    --bloodstone:   #5D0D1A;
    --deep-crimson: #3A0510;
    --rich-maroon:  #7A1028;
    --gold:         #D4AF37;
    --gold-light:   #E8C84A;
    --gold-dark:    #A8892A;
    --amber:        #C8841A;
    --charcoal:     #0D0D12;
    --glass-bg:     rgba(8, 3, 6, 0.52);
    --glass-border: rgba(212, 175, 55, 0.32);
    --text-cream:   #F8F5EE;
    --text-muted:   rgba(248, 245, 238, 0.50);
    --input-bg:     rgba(255, 255, 255, 0.06);
    --input-border: rgba(212, 175, 55, 0.20);
}

/* ── 1. Reset & Base ──────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    min-height: 100vh;
    width: 100%;
}

body {
    font-family: 'Noto Sans Devanagari', 'Inter', system-ui, sans-serif;
    background: var(--charcoal);
    color: var(--text-cream);
    overflow-x: hidden;
    overflow-y: auto;
    line-height: 1.5;
    position: relative;
}

/* ════════════════════════════════════════════════════════════════
   2. FULL-PAGE AURORA BACKGROUND
   ════════════════════════════════════════════════════════════════ */
.lp-aurora-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    contain: strict;

    /* Aurora Gradient — animated 400% */
    background: linear-gradient(
        135deg,
        #110208 0%,
        #3A0510 12%,
        #5D0D1A 25%,
        #7A1028 38%,
        #A0631A 52%,
        #C8841A 62%,
        #7A1028 72%,
        #5D0D1A 82%,
        #2E0409 92%,
        #110208 100%
    );
    background-size: 400% 400%;
    animation: aurora-shift 18s ease infinite;
}

@keyframes aurora-shift {
    0%   { background-position: 0%   50%; }
    25%  { background-position: 60%  0%;  }
    50%  { background-position: 100% 50%; }
    75%  { background-position: 40%  100%;}
    100% { background-position: 0%   50%; }
}

/* ── 2.1 Liquid Aurora Blobs (GPU accelerated) ────────────────── */
.aurora-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(32px);
    pointer-events: none;
    will-change: transform;
    transform: translateZ(0);
    animation: liquid-morph 12s ease-in-out infinite alternate;
}

.aurora-blob-1 {
    width: 70vw;
    height: 70vw;
    top: -20%;
    left: -15%;
    background: radial-gradient(ellipse at center,
        rgba(200, 132, 26, 0.50) 0%,
        rgba(212, 175, 55, 0.28) 40%,
        transparent 70%);
    animation-duration: 15s;
    animation-delay: 0s;
}

.aurora-blob-2 {
    width: 60vw;
    height: 60vw;
    bottom: -25%;
    right: -10%;
    background: radial-gradient(ellipse at center,
        rgba(93, 13, 26, 0.70) 0%,
        rgba(122, 16, 40, 0.40) 45%,
        transparent 70%);
    animation-duration: 19s;
    animation-delay: -6s;
}

.aurora-blob-3 {
    width: 45vw;
    height: 45vw;
    top: 25%;
    left: 25%;
    background: radial-gradient(ellipse at center,
        rgba(168, 137, 42, 0.30) 0%,
        rgba(200, 132, 26, 0.15) 50%,
        transparent 70%);
    animation-duration: 13s;
    animation-delay: -4s;
}

@keyframes liquid-morph {
    0%   { border-radius: 62% 38% 46% 54% / 60% 44% 56% 40%; transform: translate(0px, 0px) scale(1); }
    20%  { border-radius: 45% 55% 70% 30% / 50% 60% 40% 50%; transform: translate(20px, -25px) scale(1.06); }
    40%  { border-radius: 55% 45% 35% 65% / 65% 35% 65% 35%; transform: translate(-15px, 18px) scale(0.96); }
    60%  { border-radius: 40% 60% 55% 45% / 40% 55% 45% 60%; transform: translate(25px, 12px) scale(1.09); }
    80%  { border-radius: 70% 30% 45% 55% / 55% 45% 55% 45%; transform: translate(-20px, -12px) scale(1.03); }
    100% { border-radius: 50% 50% 60% 40% / 40% 60% 40% 60%; transform: translate(10px, 25px) scale(0.94); }
}

/* ── 2.2 Radial Glow Orbs ─────────────────────────────────────── */
.glow-orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    animation: glow-pulse 7s ease-in-out infinite alternate;
}

.glow-orb-gold {
    width: min(480px, 50vw);
    height: min(480px, 50vw);
    top: -5%;
    left: -5%;
    background: radial-gradient(circle at 40% 40%,
        rgba(212, 175, 55, 0.38) 0%,
        rgba(200, 132, 26, 0.18) 38%,
        transparent 65%);
    animation-duration: 9s;
}

.glow-orb-crimson {
    width: min(400px, 42vw);
    height: min(400px, 42vw);
    bottom: -5%;
    right: -3%;
    background: radial-gradient(circle at 50% 50%,
        rgba(140, 26, 45, 0.50) 0%,
        rgba(93, 13, 26, 0.28) 40%,
        transparent 68%);
    animation-duration: 12s;
    animation-delay: -5s;
}

.glow-orb-amber {
    width: min(350px, 35vw);
    height: min(350px, 35vw);
    top: 40%;
    right: 20%;
    background: radial-gradient(circle at 50% 50%,
        rgba(200, 132, 26, 0.22) 0%,
        rgba(212, 175, 55, 0.10) 45%,
        transparent 70%);
    animation-duration: 14s;
    animation-delay: -2s;
}

@keyframes glow-pulse {
    0%   { opacity: 0.65; transform: scale(1);    }
    50%  { opacity: 1.00; transform: scale(1.14); }
    100% { opacity: 0.55; transform: scale(0.90); }
}

/* ── 2.3 Floating Particles ───────────────────────────────────── */
.aurora-particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    background: var(--gold);
    opacity: 0;
    animation: float-particle linear infinite;
}

.ap-1  { width:2px; height:2px; left:5%;  animation-duration:12s; animation-delay:0s;    }
.ap-2  { width:3px; height:3px; left:14%; animation-duration:16s; animation-delay:-3s;   }
.ap-3  { width:1px; height:1px; left:25%; animation-duration:14s; animation-delay:-6s;   }
.ap-4  { width:4px; height:4px; left:35%; animation-duration:18s; animation-delay:-2s;   background:var(--amber); }
.ap-5  { width:2px; height:2px; left:45%; animation-duration:11s; animation-delay:-9s;   }
.ap-6  { width:3px; height:3px; left:55%; animation-duration:15s; animation-delay:-1s;   background:var(--gold-light); }
.ap-7  { width:2px; height:2px; left:65%; animation-duration:13s; animation-delay:-7s;   }
.ap-8  { width:5px; height:5px; left:72%; animation-duration:20s; animation-delay:-4s;   background:rgba(212,175,55,0.6); }
.ap-9  { width:2px; height:2px; left:80%; animation-duration:17s; animation-delay:-11s;  }
.ap-10 { width:3px; height:3px; left:88%; animation-duration:14s; animation-delay:-5s;   background:var(--amber); }
.ap-11 { width:2px; height:2px; left:20%; animation-duration:10s; animation-delay:-8s;   }
.ap-12 { width:4px; height:4px; left:60%; animation-duration:19s; animation-delay:-13s;  background:var(--gold-light); }
.ap-13 { width:2px; height:2px; left:8%;  animation-duration:22s; animation-delay:-2s;   }
.ap-14 { width:3px; height:3px; left:43%; animation-duration:16s; animation-delay:-15s;  background:var(--amber); }
.ap-15 { width:1px; height:1px; left:92%; animation-duration:12s; animation-delay:-4s;   }

@keyframes float-particle {
    0%   { opacity:0;    bottom:-5%;  transform:translateX(0px)  rotate(0deg);   }
    10%  { opacity:0.90; }
    80%  { opacity:0.65; }
    100% { opacity:0;    bottom:105%; transform:translateX(45px) rotate(360deg); }
}

/* ── 2.4 Noise Overlay on aurora ──────────────────────────────── */
.aurora-noise-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
    background-size: 180px 180px;
    opacity: 0.038;
    mix-blend-mode: overlay;
}

/* ════════════════════════════════════════════════════════════════
   3. CENTER WRAP & GLASS CARD
   ════════════════════════════════════════════════════════════════ */
.lp-center-wrap {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 16px 30px;
}

/* Transparent glass card - GPU optimized */
.lp-card {
    width: 100%;
    max-width: 440px;
    background: rgba(18, 5, 12, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 16px 28px 20px;
    position: relative;
    box-shadow:
        0 36px 90px rgba(0, 0, 0, 0.80),
        0 0 0 1px rgba(255, 255, 255, 0.04) inset,
        0 1px 0 rgba(212, 175, 55, 0.18) inset;
    animation: card-entrance 0.25s cubic-bezier(0.16, 1, 0.3, 1) both;
    overflow: visible;
}

@keyframes card-entrance {
    from { opacity: 0; transform: translateY(10px) scale(0.99); }
    to   { opacity: 1; transform: translateY(0px) scale(1); }
}

/* Gold top accent glow bar */
.card-top-bar {
    position: absolute;
    top: 0;
    left: 12%;
    right: 12%;
    height: 2px;
    border-radius: 0 0 4px 4px;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--gold-dark) 20%,
        var(--gold) 50%,
        var(--gold-dark) 80%,
        transparent 100%);
    animation: bar-shimmer 4s ease-in-out infinite alternate;
}

@keyframes bar-shimmer {
    from { opacity:0.7; box-shadow:0 0 8px rgba(212,175,55,0.4), 0 0 16px rgba(212,175,55,0.2); }
    to   { opacity:1.0; box-shadow:0 0 18px rgba(212,175,55,0.85),0 0 36px rgba(212,175,55,0.4); }
}

/* ── 3.1 Card Header ──────────────────────────────────────────── */
.card-header-section {
    text-align: center;
    margin-bottom: 12px;
}

.card-seal-frame {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 2.5px solid rgba(212, 175, 55, 0.65);
    background: rgba(255, 255, 255, 0.94);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: -42px auto 10px;
    padding: 5px;
    box-shadow:
        0 0 22px rgba(212, 175, 55, 0.40),
        0 0 50px rgba(212, 175, 55, 0.15),
        0 6px 20px rgba(0, 0, 0, 0.55);
    animation: seal-pulse 4s ease-in-out infinite alternate;
    position: relative;
    z-index: 5;
}

@keyframes seal-pulse {
    from { box-shadow:0 0 16px rgba(212,175,55,0.30), 0 0 36px rgba(212,175,55,0.12), 0 6px 20px rgba(0,0,0,0.55); }
    to   { box-shadow:0 0 28px rgba(212,175,55,0.65), 0 0 60px rgba(212,175,55,0.28), 0 6px 20px rgba(0,0,0,0.55); }
}

.card-seal-img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    border-radius: 50%;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.2));
    opacity: 0.92;
}

.card-title {
    font-family: 'Eczar', serif;
    font-size: 24px;
    font-weight: 800;
    color: #FFFFFF;
    margin-bottom: 3px;
    letter-spacing: 0.3px;
    text-shadow: 0 2px 12px rgba(0,0,0,0.5);
}

.card-subtitle {
    font-family: 'Noto Sans Devanagari', sans-serif;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.3px;
}

/* ── 3.2 Alert Boxes ──────────────────────────────────────────── */
.alert-box {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 11px 14px;
    border-radius: 12px;
    font-size: 13.5px;
    font-weight: 600;
    margin-bottom: 18px;
    font-family: 'Noto Sans Devanagari', sans-serif;
}
.alert-box i { font-size: 16px; flex-shrink:0; margin-top:1px; }
.alert-danger  { background:rgba(185,28,28,0.18); color:#FCA5A5; border:1px solid rgba(185,28,28,0.40); }
.alert-success { background:rgba(21,128,61,0.18);  color:#86EFAC; border:1px solid rgba(21,128,61,0.40);  }

/* ── 3.3 Form Styles ──────────────────────────────────────────── */
.card-form { display:flex; flex-direction:column; gap:0; }

.form-group {
    margin-bottom: 12px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 7px;
    font-family: 'Noto Sans Devanagari', sans-serif;
    font-size: 17px;
    font-weight: 600;
    color: rgba(248, 245, 238, 0.88);
    margin-bottom: 6px;
    letter-spacing: 0.2px;
}
.form-group label i { font-size: 16.5px; color: var(--gold); }

/* Input Wrap */
.input-wrap {
    position: relative;
    width: 100%;
}

.input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(212, 175, 55, 0.45);
    font-size: 15px;
    pointer-events: none;
    transition: color 0.2s ease;
    z-index: 2;
}
.input-wrap.is-focused .input-icon { color: var(--gold); }

.input-wrap input {
    width: 100%;
    padding: 10px 14px 10px 36px;
    font-size: 14px;
    font-family: 'Noto Sans Devanagari', system-ui, sans-serif;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--input-border);
    border-radius: 10px;
    color: var(--text-cream);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    outline: none;
}
.input-wrap input::placeholder { color:rgba(248,245,238,0.26); font-size:14px; }
.input-wrap input:focus {
    border-color: rgba(212,175,55,0.55);
    background: rgba(255,255,255,0.08);
    box-shadow: 0 0 0 3px rgba(212,175,55,0.12), 0 0 18px rgba(212,175,55,0.07);
}

/* Password toggle */
.password-wrapper input { padding-right: 44px; }

.btn-toggle-pw {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: rgba(248,245,238,0.35);
    font-size: 16px;
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
    border-radius: 6px;
    z-index: 4;
}
.btn-toggle-pw:hover { color: var(--gold); }

/* ── 3.4 CAPTCHA ──────────────────────────────────────────────── */
.captcha-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.captcha-img-wrap {
    position: relative;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.captcha-img {
    display: block;
    width: 140px;
    height: 48px;
    border-radius: 10px;
    border: 1px solid rgba(212, 175, 55, 0.30);
    background: rgba(20, 8, 14, 0.80);
    cursor: pointer;
    object-fit: cover;
    filter: contrast(1.1) brightness(1.05);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.captcha-img:hover {
    border-color: rgba(212,175,55,0.60);
    box-shadow: 0 0 12px rgba(212,175,55,0.25);
}

.captcha-refresh {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: rgba(212, 175, 55, 0.10);
    border: 1px solid rgba(212, 175, 55, 0.25);
    color: var(--gold);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}
.captcha-refresh:hover {
    background: rgba(212,175,55,0.22);
    border-color: rgba(212,175,55,0.50);
    transform: rotate(30deg);
}
.captcha-refresh.spinning i {
    animation: refresh-spin 0.6s ease;
}
@keyframes refresh-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.captcha-input-wrap { flex: 1; }

.captcha-hint {
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: 'Noto Sans Devanagari', sans-serif;
    font-size: 11.5px;
    color: rgba(248, 245, 238, 0.35);
    margin-top: 6px;
}
.captcha-hint i { color: rgba(212,175,55,0.45); font-size:12px; }

/* ── 3.5 Submit Button ────────────────────────────────────────── */
.btn-login-submit {
    position: relative;
    width: 100%;
    padding: 12px 18px;
    background: linear-gradient(135deg, #8C1A2D 0%, #6B0F1E 40%, #5D0D1A 70%, #460812 100%);
    color: #FFFFFF;
    font-family: 'Noto Sans Devanagari', sans-serif;
    font-size: 15px;
    font-weight: 700;
    border: 1px solid rgba(212, 175, 55, 0.28);
    border-radius: 10px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.26s ease;
    box-shadow: 0 4px 22px rgba(93, 13, 26, 0.60), 0 0 0 1px rgba(212,175,55,0.08) inset;
}

.btn-text {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
}
.btn-text i { font-size: 18px; }

/* Shimmer sweep */
.btn-shimmer {
    position: absolute;
    top: 0; left: 0;
    width: 45%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255,255,255,0.16) 40%,
        rgba(212,175,55,0.28) 50%,
        rgba(255,255,255,0.10) 60%,
        transparent 100%);
    transform: skewX(-20deg) translateX(-220%);
    animation: shimmer-sweep 3.5s ease-in-out infinite;
    animation-delay: 1.2s;
    z-index: 1;
}

@keyframes shimmer-sweep {
    0%   { transform:skewX(-20deg) translateX(-220%); opacity:0; }
    10%  { opacity:1; }
    55%  { transform:skewX(-20deg) translateX(300%); opacity:1; }
    65%  { opacity:0; }
    100% { transform:skewX(-20deg) translateX(300%); opacity:0; }
}

.btn-login-submit:hover {
    background: linear-gradient(135deg, #A01E34 0%, #7E1224 40%, #6E101F 70%, #550A16 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(93,13,26,0.75), 0 0 40px rgba(140,26,45,0.22), 0 0 0 1px rgba(212,175,55,0.20) inset;
    border-color: rgba(212,175,55,0.42);
}
.btn-login-submit:active { transform:translateY(0); box-shadow:0 2px 12px rgba(93,13,26,0.5); }
.btn-login-submit.is-loading { opacity:0.72; pointer-events:none; cursor:not-allowed; }

@keyframes spin {
    from { transform:rotate(0deg); }
    to   { transform:rotate(360deg); }
}
.spin-icon { display:inline-block; animation:spin 0.8s linear infinite; }

/* ── 3.6 Card Footer ──────────────────────────────────────────── */
.card-footer-section {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(212, 175, 55, 0.10);
    text-align: center;
}

.btn-back-portal {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: rgba(212, 175, 55, 0.78);
    text-decoration: none;
    font-family: 'Noto Sans Devanagari', sans-serif;
    font-size: 13px;
    font-weight: 600;
    padding: 7px 16px;
    border-radius: 999px;
    background: rgba(212, 175, 55, 0.07);
    border: 1px solid rgba(212, 175, 55, 0.16);
    transition: all 0.22s ease;
    margin-bottom: 12px;
}
.btn-back-portal i { font-size:15px; transition:transform 0.2s ease; }
.btn-back-portal:hover {
    background: rgba(212,175,55,0.14);
    color: var(--gold);
    border-color: rgba(212,175,55,0.32);
    transform: translateX(-2px);
}
.btn-back-portal:hover i { transform: translateX(-3px); }

.portal-security-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: 'Noto Sans Devanagari', sans-serif;
    font-size: 11.5px;
    color: rgba(248, 245, 238, 0.28);
}
.portal-security-note i { color:rgba(212,175,55,0.40); font-size:12px; }

/* ════════════════════════════════════════════════════════════════
   4. RESPONSIVE
   ════════════════════════════════════════════════════════════════ */
@media (max-width: 520px) {
    .lp-center-wrap { padding: 20px 12px; align-items: flex-start; padding-top: 32px; }

    .lp-card {
        border-radius: 20px;
        padding: 28px 18px 22px;
    }

    .card-title { font-size: 22px; }

    .captcha-row { flex-direction: column; align-items: stretch; gap: 8px; }
    .captcha-img-wrap { justify-content: center; }
    .captcha-img { width: 160px; }
}

@media (max-width: 360px) {
    .lp-card { padding: 22px 14px 18px; }
    .card-seal-frame { width: 68px; height: 68px; }
    .card-seal-img { width: 52px; height: 52px; }
    .card-title { font-size: 20px; }
}
