/* ==========================================================
 * Login — Paripoorna's Aishwaryam
 * Brand (from the logo): leaf green #166534 (wordmark + hands),
 * saffron #ea7208 / marigold #f6b400 (lotus), vermilion #e4460a
 * (Aishwaryam), tagline blue #00569c. Lotus art: app-ui.css (.pk-lotus).
 * ========================================================== */

.pl-body {
    --pl-leaf: #166534;
    --pl-leaf-700: #12542b;
    --pl-leaf-900: #08301a;
    --pl-saffron: #ea7208;
    --pl-marigold: #f6b400;
    --pl-vermilion: #e4460a;
    --pl-ink: #17231b;
    --pl-ink-2: #4b5a50;
    --pl-ink-3: #87938a;
    --pl-line: #e6dfd0;
    --pl-serif: "Fraunces", Georgia, "Times New Roman", serif;
    --pl-ease: cubic-bezier(.22, .8, .24, 1);

    margin: 0;
    background: #faf7f0;
    color: var(--pl-ink);
}

.pl-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(420px, 1fr);
    min-height: 100vh;
}

/* ---------- Brand panel: dawn over a lotus pond ---------- */
.pl-brand {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    padding: 56px clamp(32px, 6vw, 88px);
    color: #fff;
    background:
        radial-gradient(70% 55% at 88% 6%, rgba(246, 180, 0, .30) 0%, rgba(234, 114, 8, .14) 38%, rgba(234, 114, 8, 0) 70%),
        radial-gradient(60% 50% at 10% 100%, rgba(46, 139, 74, .55) 0%, rgba(46, 139, 74, 0) 70%),
        linear-gradient(160deg, #0b3d20 0%, var(--pl-leaf-900) 45%, #062414 100%);
}

/* Faint petal texture, masked to the centre */
.pl-brand::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, .07) 1.2px, transparent 1.6px);
    background-size: 26px 26px;
    mask-image: radial-gradient(70% 60% at 45% 50%, #000 0%, transparent 100%);
    -webkit-mask-image: radial-gradient(70% 60% at 45% 50%, #000 0%, transparent 100%);
}

.pl-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    pointer-events: none;
}

.pl-glow--a {
    width: 380px; height: 380px;
    right: -90px; top: -110px;
    background: rgba(234, 114, 8, .38);
    animation: pl-drift 18s ease-in-out infinite alternate;
}

.pl-glow--b {
    width: 320px; height: 320px;
    left: 18%; bottom: -170px;
    background: rgba(246, 196, 67, .16);
    animation: pl-drift 22s ease-in-out infinite alternate-reverse;
}

@keyframes pl-drift {
    from { transform: translate(0, 0) scale(1); }
    to { transform: translate(-50px, 36px) scale(1.1); }
}

.pl-brand__inner {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 560px;
}

.pl-eyebrow,
.pl-headline,
.pl-lede,
.pl-art {
    opacity: 0;
    transform: translateY(16px);
    animation: pl-rise .9s var(--pl-ease) forwards;
}

.pl-eyebrow { animation-delay: .05s; }
.pl-headline { animation-delay: .15s; }
.pl-lede { animation-delay: .25s; }
.pl-art { animation-delay: .35s; }

@keyframes pl-rise {
    to { opacity: 1; transform: none; }
}

.pl-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 20px;
    padding: 6px 14px 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .18);
    background: rgba(255, 255, 255, .07);
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .85);
}

.pl-eyebrow::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--pl-marigold), var(--pl-saffron));
    box-shadow: 0 0 0 4px rgba(246, 180, 0, .18);
}

.pl-headline {
    margin: 0 0 16px;
    font-family: var(--pl-serif);
    font-size: clamp(2.1rem, 3.5vw, 3.15rem);
    font-weight: 600;
    line-height: 1.08;
    letter-spacing: -.02em;
    color: #fff;
}

.pl-headline span {
    font-style: italic;
    background: linear-gradient(90deg, #ffd27a, var(--pl-marigold) 40%, var(--pl-saffron));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.pl-lede {
    max-width: 440px;
    margin: 0 0 26px;
    font-size: 1rem;
    line-height: 1.65;
    color: rgba(255, 255, 255, .74);
}

/* Lotus on water */
.pl-art {
    position: relative;
    max-width: 460px;
    padding: 6px 0 22px;
}

.pl-lotus {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 18px 30px rgba(234, 114, 8, .28));
}

.pl-water {
    position: absolute;
    left: 50%;
    bottom: 4%;
    width: 86%;
    aspect-ratio: 5 / 1;
    transform: translateX(-50%);
}

.pl-water span {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, .22);
    opacity: 0;
    animation: pl-ripple 6s ease-out infinite;
}

.pl-water span:nth-child(2) { animation-delay: 2s; }
.pl-water span:nth-child(3) { animation-delay: 4s; }

@keyframes pl-ripple {
    0% { transform: scale(.35); opacity: 0; }
    20% { opacity: .9; }
    100% { transform: scale(1.15); opacity: 0; }
}

/* Floating glass chips */
.pl-float {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px 9px 9px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .18);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 14px 30px -14px rgba(0, 0, 0, .5);
    font-size: .82rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    animation:
        pl-pop .7s var(--pl-ease) forwards,
        pl-bob 6s ease-in-out infinite;
}

.pl-float i {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 9px;
    background: rgba(255, 255, 255, .16);
    font-size: .95rem;
}

.pl-float--a { top: 6%; right: -6%; animation-delay: 2.4s, 3s; }
.pl-float--a i { background: linear-gradient(135deg, var(--pl-marigold), var(--pl-saffron)); }
.pl-float--b { top: 14%; left: -8%; animation-delay: 2.6s, 3.8s; }
.pl-float--b i { background: rgba(0, 86, 156, .75); }
.pl-float--c { bottom: 2%; right: 2%; animation-delay: 2.8s, 3.4s; }
.pl-float--c i { background: rgba(46, 139, 74, .9); }

@keyframes pl-pop {
    from { opacity: 0; transform: translateY(10px) scale(.92); }
    to { opacity: 1; transform: none; }
}

@keyframes pl-bob {
    0%, 100% { translate: 0 0; }
    50% { translate: 0 -8px; }
}

/* ---------- Sign-in panel ---------- */
.pl-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px 24px;
    background:
        radial-gradient(55% 35% at 50% 0%, rgba(246, 180, 0, .09), transparent 70%),
        #fffdf8;
}

/* Thin lotus-coloured rule along the top of the panel */
.pl-panel::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--pl-leaf), #2e8b4a 30%, var(--pl-marigold) 62%, var(--pl-saffron) 82%, var(--pl-vermilion));
}

.pl-card {
    width: 100%;
    max-width: 400px;
    margin: auto 0;
    opacity: 0;
    transform: translateY(12px);
    animation: pl-rise .8s var(--pl-ease) forwards .1s;
}

.pl-card__head { text-align: center; }

.pl-logo { display: inline-block; margin-bottom: 22px; }
.pl-logo img { height: 132px; width: auto; transition: transform .5s var(--pl-ease); }
.pl-logo:hover img { transform: scale(1.03); }

.pl-title {
    margin: 0 0 6px;
    font-family: var(--pl-serif);
    font-size: 1.85rem;
    font-weight: 600;
    letter-spacing: -.015em;
    color: var(--pl-ink);
}

.pl-subtitle { margin: 0 0 30px; color: var(--pl-ink-3); font-size: .95rem; }

.pl-field { margin-bottom: 18px; }

.pl-label {
    display: block;
    margin-bottom: 7px;
    font-size: .82rem;
    font-weight: 600;
    color: var(--pl-ink-2);
}

.pl-input {
    position: relative;
    display: flex;
    align-items: center;
    border: 1.5px solid var(--pl-line);
    border-radius: 14px;
    background: #fff;
    transition: border-color .2s, box-shadow .2s, background .2s;
}

.pl-input:hover { border-color: #d8cfbd; }

.pl-input:focus-within {
    border-color: var(--pl-leaf);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(22, 101, 52, .1);
}

.pl-input > i {
    position: absolute;
    left: 15px;
    font-size: 1.1rem;
    color: var(--pl-ink-3);
    transition: color .2s;
    pointer-events: none;
}

.pl-input:focus-within > i { color: var(--pl-leaf); }

.pl-input input {
    flex: 1;
    min-width: 0;
    height: 50px;
    padding: 0 16px 0 44px;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: .95rem;
    color: var(--pl-ink);
}

.pl-input input::placeholder { color: #a7b1a6; }

.pl-eye {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    margin-right: 5px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--pl-ink-3);
    font-size: 1.1rem;
    cursor: pointer;
    transition: background .2s, color .2s;
}

.pl-eye:hover,
.pl-eye:focus-visible { background: rgba(22, 101, 52, .07); color: var(--pl-leaf); outline: 0; }

.pl-field .errMsg { display: block; margin-top: 6px; font-size: .8rem; }

.pl-submit {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 52px;
    margin-top: 26px;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--pl-leaf-900), var(--pl-leaf) 55%, #2e8b4a);
    background-size: 160% 100%;
    background-position: 0 0;
    color: #fff;
    font-size: .98rem;
    font-weight: 600;
    letter-spacing: .01em;
    box-shadow: 0 14px 28px -14px rgba(22, 101, 52, .75);
    cursor: pointer;
    transition: transform .2s var(--pl-ease), box-shadow .2s, background-position .5s var(--pl-ease);
}

/* Saffron sheen sweeping across on hover */
.pl-submit::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, transparent 30%, rgba(246, 180, 0, .35) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform .7s var(--pl-ease);
}

.pl-submit:hover::before { transform: translateX(100%); }

/* Arrow lives in CSS: helper.js swaps the button's text content */
.pl-submit::after {
    content: "\2192";
    font-size: 1.1rem;
    transition: transform .25s var(--pl-ease);
}

.pl-submit:hover {
    transform: translateY(-2px);
    background-position: 100% 0;
    box-shadow: 0 18px 32px -14px rgba(22, 101, 52, .85);
}

.pl-submit:hover::after { transform: translateX(4px); }
.pl-submit:active { transform: translateY(0); }
.pl-submit:focus-visible { outline: 3px solid rgba(22, 101, 52, .35); outline-offset: 3px; }

/* Loading: helper.js adds .disabled */
.pl-submit.disabled,
.pl-submit:disabled {
    cursor: progress;
    transform: none;
}

.pl-submit.disabled::after,
.pl-submit:disabled::after {
    content: "";
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, .35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: pl-spin .7s linear infinite;
}

.pl-submit.is-success { background: linear-gradient(135deg, #157a3c, #1f9a4e); }
.pl-submit.is-success::after { content: "\2713"; border: 0; animation: none; width: auto; height: auto; }

@keyframes pl-spin {
    to { transform: rotate(360deg); }
}

.pl-shake { animation: pl-shake .45s ease-in-out !important; opacity: 1; transform: none; }

@keyframes pl-shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-8px); }
    40% { transform: translateX(7px); }
    60% { transform: translateX(-5px); }
    80% { transform: translateX(3px); }
}

.pl-footer { margin: 28px 0 0; font-size: .78rem; color: var(--pl-ink-3); }

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
    .pl-shell { grid-template-columns: 1fr; }

    .pl-brand {
        min-height: 0;
        padding: 36px 28px 44px;
    }

    .pl-art,
    .pl-lede { display: none; }

    .pl-headline { font-size: 1.8rem; margin: 0; }

    .pl-panel {
        margin-top: -22px;
        border-radius: 24px 24px 0 0;
        overflow: hidden;
        z-index: 2;
    }

    .pl-logo img { height: 104px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    .pl-eyebrow, .pl-headline, .pl-lede, .pl-art, .pl-card, .pl-float {
        animation: none !important;
        opacity: 1;
        transform: none;
    }

    .pl-glow, .pl-water span { animation: none; }
}
