:root {
    --brand: #ffc107;
    --txt: #ffffff;
    --muted: #d6d6d6;
    --err: #d10f2f;
    --ok: #2aa84a;
    --shadow-lg: 0 22px 60px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 12px 34px rgba(0, 0, 0, 0.38);
    --form-scale: 1.5;
}

* {
    box-sizing: border-box;
}
html {
    scroll-behavior: smooth;
}
body {
    background: url("https://res.cloudinary.com/dqcaqvplr/image/upload/v1740052536/wijiz7vzbtdmwmc67zg2.png")
        no-repeat center center fixed;
    background-size: cover;
    color: var(--txt);
    font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial,
        sans-serif;
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
}
body::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.55),
        rgba(0, 0, 0, 0.35)
    );
    z-index: -1;
}
@media (max-width: 640px) {
    body {
        background-attachment: scroll;
    }
}

header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(8px, 2cqw, 20px);
    min-height: clamp(64px, 8vw, 100px);
    padding-block: clamp(10px, 2cqw, 18px);
    container-type: inline-size;
    background: var(--brand);
    color: #000;
    text-align: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}
.logo {
    position: absolute;
    top: 50%;
    left: clamp(10px, 2cqw, 22px);
    transform: translateY(-50%);
    width: clamp(44px, 7cqw, 92px);
    height: clamp(44px, 7cqw, 92px);
    object-fit: contain;
    filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.35));
    transition: transform 0.18s ease;
}
.logo:hover {
    transform: translateY(-50%) scale(1.03);
}
h1 {
    margin: 0;
    font-weight: 900;
    text-transform: uppercase;
    line-height: 1.12;
    font-size: clamp(20px, 4.4cqw, 36px);
    background: linear-gradient(90deg, #000, #3b3b3b);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: 0.3px;
}
@supports not (container-type: inline-size) {
    header {
        padding-block: clamp(10px, 2.6vw, 18px);
    }
    .logo {
        left: clamp(10px, 3vw, 22px);
        width: clamp(44px, 10vw, 92px);
        height: clamp(44px, 10vw, 92px);
    }
    h1 {
        font-size: clamp(22px, 5vw, 36px);
    }
}

main.container {
    padding-block: clamp(36px, 6vw, 80px);
}
@media (max-width: 480px) {
    main.container {
        padding-block: clamp(48px, 12vw, 96px);
    }
}

.login-container {
    position: relative;
    background: var(--brand);
    color: #000;
    border-radius: calc(18px * 1.15);
    padding: clamp(20px, 4.5vw, 28px);
    max-width: clamp(320px, 90vw, 460px);
    width: 100%;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: var(--shadow-md);
    transition: transform 0.18s ease, box-shadow 0.24s ease;
    isolation: isolate;
}
.login-container::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: calc(20px * 1.15);
    padding: 1px;
    background: conic-gradient(
        from var(--angle, 0deg),
        #ffd54a,
        #ffb300,
        #ffd54a
    );
    -webkit-mask: linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: spin 6s linear infinite;
    opacity: 0.7;
    pointer-events: none;
}
@keyframes spin {
    to {
        --angle: 360deg;
    }
}
.login-container:focus-within {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.login-container form {
    display: grid;
    gap: clamp(12px, 3.2vw, 16px);
}

.login-container .form-control {
    border-radius: calc(14px * 1.15);
    padding: calc(12px * var(--form-scale)) calc(14px * var(--form-scale))
        calc(12px * var(--form-scale)) calc(46px * var(--form-scale));
    border: 2px solid rgba(0, 0, 0, 0.18);
    background: #fff;
    color: #000;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.08s;
    background-repeat: no-repeat;
    background-position: calc(14px * var(--form-scale)) center;
    background-size: calc(18px * var(--form-scale))
        calc(18px * var(--form-scale));
}
#email {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="%23000"><path d="M20 5H4a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2Zm0 3.2-8 5.3-8-5.3V7l8 5.3L20 7v1.2Z"/></svg>');
}
#password {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="%23000"><path d="M6 9V7a6 6 0 1 1 12 0v2h1a1 1 0 0 1 1 1v10H4V10a1 1 0 0 1 1-1h1Zm2 0h8V7a4 4 0 1 0-8 0v2Z"/></svg>');
}
.login-container .form-control:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.22);
}
.login-container .form-control:focus {
    outline: none;
    border-color: #000;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.18), 0 14px 28px rgba(0, 0, 0, 0.28);
}

.login-container .form-control:not(:placeholder-shown):invalid {
    border-color: var(--err);
    box-shadow: 0 0 0 3px rgba(209, 15, 47, 0.18);
}
.login-container .form-control:not(:placeholder-shown):valid {
    border-color: var(--ok);
    box-shadow: 0 0 0 3px rgba(42, 168, 74, 0.18);
}

.btn-dark {
    position: relative;
    display: inline-block;
    font-weight: 900;
    font-size: calc(1rem * 1.1);
    padding: calc(12px * var(--form-scale)) calc(18px * var(--form-scale));
    border-radius: calc(14px * 1.15);
    border: none;
    color: #fff;
    background: #000;
    transition: transform 0.12s, box-shadow 0.22s, background-color 0.2s;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.32);
    overflow: hidden;
}
.btn-dark:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
    background: #111;
}
.btn-dark:active {
    transform: translateY(0) scale(0.98);
}
.btn-dark:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.35);
}
.btn-dark::after {
    content: "";
    position: absolute;
    inset: -20%;
    background: radial-gradient(
        circle at 50% 50%,
        rgba(255, 255, 255, 0.22),
        transparent 48%
    );
    opacity: 0;
    transform: scale(0.6);
    transition: opacity 0.32s ease, transform 0.32s ease;
    pointer-events: none;
}
.btn-dark:active::after {
    opacity: 1;
    transform: scale(1.1);
}

.login-container .text-center {
    margin-top: clamp(12px, 3vw, 20px);
    color: var(--muted);
    text-align: center;
    font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial,
        sans-serif;
    font-size: clamp(1rem, 2.2vw, 1.125rem);
}
.login-container .text-center::before {
    content: "";
    display: block;
    width: min(72%, 240px);
    height: 1px;
    background: rgba(0, 0, 0, 0.18);
    margin: clamp(12px, 3vw, 18px) auto clamp(8px, 2vw, 12px);
    border-radius: 2px;
}
.login-container .text-center p {
    margin: 0;
}
.login-container .text-center p:first-child {
    margin-bottom: 6px;
    font-weight: 900;
}
.login-container .text-center a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    font-weight: 900;
    color: blue;
    border-bottom: 2px solid rgba(0, 0, 0, 0.6);
    padding-bottom: 2px;
    transition: color 0.2s ease, border-color 0.2s ease, transform 0.12s ease;
}
.login-container .text-center a::after {
    content: "→";
    transform: translateX(0);
    transition: transform 0.2s ease;
}
.login-container .text-center a:hover {
    color: #000;
    border-color: blue;
}
.login-container .text-center a:hover::after {
    transform: translateX(2px);
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
    }
    .login-container {
        transform: none !important;
    }
}
