/* My Digital Shop ERP — Login */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --mds-bg: #070b14;
    --mds-surface: rgba(255, 255, 255, 0.06);
    --mds-surface-border: rgba(255, 255, 255, 0.12);
    --mds-text: #f1f5f9;
    --mds-muted: #94a3b8;
    --mds-cyan: #22d3ee;
    --mds-violet: #a78bfa;
    --mds-orange: #fb923c;
    --mds-gradient: linear-gradient(135deg, #22d3ee 0%, #818cf8 50%, #c084fc 100%);
    --mds-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.55);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

.login-page {
    min-height: 100vh;
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    background: var(--mds-bg);
    color: var(--mds-text);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

/* Animated background */
.login-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.login-bg__orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.55;
    animation: mds-float 18s ease-in-out infinite;
}

.login-bg__orb--1 {
    width: 420px;
    height: 420px;
    background: #0e7490;
    top: -120px;
    left: -80px;
}

.login-bg__orb--2 {
    width: 360px;
    height: 360px;
    background: #5b21b6;
    bottom: -100px;
    right: -60px;
    animation-delay: -6s;
}

.login-bg__orb--3 {
    width: 280px;
    height: 280px;
    background: #ea580c;
    top: 40%;
    right: 30%;
    opacity: 0.25;
    animation-delay: -12s;
}

.login-bg__grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, black 20%, transparent 75%);
}

@keyframes mds-float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -20px) scale(1.05); }
    66% { transform: translate(-20px, 25px) scale(0.95); }
}

/* Shell */
.login-shell {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 980px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid var(--mds-surface-border);
    box-shadow: var(--mds-shadow);
    backdrop-filter: blur(20px);
}

@media (max-width: 860px) {
    .login-shell {
        grid-template-columns: 1fr;
        max-width: 440px;
    }
}

/* Hero panel */
.login-hero {
    background: linear-gradient(160deg, rgba(14, 116, 144, 0.35) 0%, rgba(91, 33, 182, 0.4) 100%);
    padding: 2.75rem 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.login-hero::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -30%;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.08);
    animation: mds-spin 30s linear infinite;
}

@keyframes mds-spin {
    to { transform: rotate(360deg); }
}

.login-hero__logo {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 2rem;
}

.login-hero__icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--mds-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(34, 211, 238, 0.35);
    flex-shrink: 0;
}

.login-hero__icon svg {
    width: 28px;
    height: 28px;
    fill: #fff;
}

.login-hero__brand {
    line-height: 1.2;
}

.login-hero__brand span {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--mds-cyan);
}

.login-hero__brand strong {
    display: block;
    font-size: 1.35rem;
    font-weight: 800;
    background: var(--mds-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-hero__title {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.25;
    margin: 0 0 0.75rem;
    letter-spacing: -0.02em;
}

.login-hero__subtitle {
    color: var(--mds-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0 0 2rem;
    max-width: 320px;
}

.login-hero__features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.login-hero__pill {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
}

@media (max-width: 860px) {
    .login-hero {
        padding: 2rem 1.75rem;
        text-align: center;
        align-items: center;
    }

    .login-hero__subtitle {
        max-width: none;
    }

    .login-hero__features {
        justify-content: center;
    }
}

/* Form panel */
.login-card {
    background: rgba(15, 23, 42, 0.85);
    padding: 2.75rem 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-card__heading {
    margin-bottom: 1.75rem;
}

.login-card__heading h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.35rem;
    letter-spacing: -0.02em;
}

.login-card__heading p {
    margin: 0;
    color: var(--mds-muted);
    font-size: 0.9rem;
}

.login-alert {
    margin-bottom: 1.25rem;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    font-size: 0.85rem;
    line-height: 1.45;
}

.login-alert--error {
    color: #fecaca;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(248, 113, 113, 0.25);
}

.login-form .field {
    margin-bottom: 1.15rem;
}

.login-form label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #cbd5e1;
    margin-bottom: 0.45rem;
    letter-spacing: 0.02em;
}

.login-form .input-wrap {
    position: relative;
}

.login-form .input-wrap svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    fill: var(--mds-muted);
    pointer-events: none;
    transition: fill 0.2s;
}

.login-form input[type="text"],
.login-form input[type="password"] {
    width: 100%;
    padding: 0.8rem 1rem 0.8rem 2.75rem;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--mds-text);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.login-form input:focus {
    border-color: var(--mds-cyan);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.15);
}

.login-form input:focus + svg,
.login-form .input-wrap:focus-within svg {
    fill: var(--mds-cyan);
}

.login-form .validation-summary-errors,
.login-form .text-danger {
    color: #fca5a5;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.login-btn {
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.9rem 1.5rem;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
    background: var(--mds-gradient);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s, filter 0.2s;
    box-shadow: 0 4px 20px rgba(34, 211, 238, 0.35);
    letter-spacing: 0.02em;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(34, 211, 238, 0.45);
    filter: brightness(1.05);
}

.login-btn:active {
    transform: translateY(0);
}

.login-links {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.85rem;
}

.login-links a {
    color: var(--mds-cyan);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.login-links a:hover {
    color: #67e8f9;
    text-decoration: underline;
}

.login-links .sep {
    color: var(--mds-muted);
    margin: 0 0.4rem;
}

.login-demo {
    margin-top: 1.75rem;
    padding: 1rem 1.1rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px dashed rgba(255, 255, 255, 0.1);
}

.login-demo__title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--mds-muted);
    margin: 0 0 0.6rem;
}

.login-demo__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.35rem 1rem;
    font-size: 0.75rem;
    color: #94a3b8;
    line-height: 1.5;
}

.login-demo__grid strong {
    color: #e2e8f0;
    font-weight: 600;
}

@media (max-width: 480px) {
    .login-card,
    .login-hero {
        padding: 2rem 1.35rem;
    }

    .login-demo__grid {
        grid-template-columns: 1fr;
    }
}
