@font-face {
    font-family: 'Inter';
    src: url('../Fonts/InterVariable.ttf') format('truetype');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --purple: #490c74;
    --text: #171717;
    --muted: #6a6a6a;
    --border: #d4d4d8;
    --page: #f7f7f7;
}

html {
    height: 100%;
}

body {
    height: 100%;
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--page);
    color: var(--text);
    line-height: 1.6;
    overflow: hidden;
}

.login-page {
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.site-header {
    background: var(--page);
    border-top: 4px solid var(--purple);
    padding: 42px 72px 56px;
}

.site-logo {
    display: block;
    width: 322px;
    max-width: 70vw;
    height: auto;
}

.login-main {
    flex: 1;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 24px;
    min-height: 0;
}

.login-card {
    background: #fff;
    width: 100%;
    max-width: 540px;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.09);
    padding: 58px 66px 70px;
}

.login-card h2 {
    font-size: 2rem;
    line-height: 1.2;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 36px;
}

form {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-row label {
    font-size: 1.28rem;
    line-height: 1.3;
    font-weight: 700;
    color: #303030;
}

.form-row input {
    width: 100%;
    min-height: 64px;
    padding: 16px 22px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font: inherit;
    font-size: 1.28rem;
    color: var(--text);
    background: #fff;
}

.form-row input::placeholder {
    color: #85858d;
}

.form-row input:focus {
    outline: none;
    border-color: var(--purple);
    box-shadow: 0 0 0 1px var(--purple);
}

.errorlist {
    list-style: none;
    font-size: 0.95rem;
    line-height: 1.4;
    color: #b42318;
    margin-top: 4px;
}

.login-card .errorlist.nonfield {
    margin: -18px 0 18px;
}

button[type="submit"] {
    min-height: 58px;
    padding: 14px 24px;
    background: var(--purple);
    color: #fff;
    border: none;
    border-radius: 8px;
    font: inherit;
    font-size: 1.18rem;
    font-weight: 700;
    cursor: pointer;
    margin-top: 2px;
    box-shadow: inset 0 -10px 24px rgba(62, 0, 102, 0.2);
}

button[type="submit"]:hover {
    background: #5b1190;
}

button[type="submit"]:focus {
    outline: 3px solid rgba(73, 12, 116, 0.25);
    outline-offset: 2px;
}

.site-footer {
    color: var(--muted);
    font-size: 1.08rem;
    text-align: center;
    padding: 0 24px 40px;
    flex-shrink: 0;
}

@media (max-height: 820px) and (min-width: 769px) {
    .site-header {
        padding-top: 30px;
        padding-bottom: 36px;
    }

    .site-logo {
        width: 286px;
    }

    .login-main {
        padding-top: 28px;
        padding-bottom: 28px;
    }

    .login-card {
        padding-top: 42px;
        padding-bottom: 50px;
    }

    .login-card h2 {
        margin-bottom: 26px;
    }

    form {
        gap: 22px;
    }

    .site-footer {
        padding-bottom: 28px;
    }
}

@media (max-width: 768px) {
    body {
        height: auto;
        min-height: 100vh;
        overflow: auto;
    }

    .login-page {
        height: auto;
        min-height: 100vh;
        overflow: visible;
    }

    .site-header {
        padding: 30px 28px 38px;
    }

    .site-logo {
        width: 250px;
    }

    .login-main {
        padding: 70px 20px 44px;
    }

    .login-card {
        max-width: 100%;
        padding: 36px 28px 42px;
    }

    .login-card h2 {
        font-size: 1.65rem;
        margin-bottom: 28px;
    }

    .form-row label,
    .form-row input {
        font-size: 1.05rem;
    }

    .form-row input {
        min-height: 56px;
    }
}
