:root {
    --bg: #eeeeef;
    --surface: #ffffff;
    --text-strong: #0f2748;
    --text-muted: #4a5f76;
    --line: #d7dbe2;
    --line-focus: #9ea8b6;
    --danger: #c8161f;
    --danger-dark: #a90f18;
    --accent: #d67a11;
    --card-shadow: 0 10px 30px rgba(9, 24, 46, 0.08);
    --radius-lg: 14px;
    --radius-md: 10px;
}

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

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

html {
    font-size: 16px;
}

body {
    font-family: "Trebuchet MS", "Segoe UI", Tahoma, sans-serif;
    color: var(--text-strong);
    background: linear-gradient(rgba(243, 245, 247, 0.9), rgba(238, 238, 239, 0.9));
    position: relative;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image: url("assets/images/ocean.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.18;
    z-index: 0;
    pointer-events: none;
}

.auth-page {
    position: relative;
    z-index: 1;
}

.auth-page {
    min-height: 100vh;
    width: min(820px, 100%);
    margin: 0 auto;
    padding: 38px 18px 24px;
}

.brand-block {
    text-align: center;
    margin-bottom: 30px;
}

.logo-frame {
    width: 92px;
    height: 92px;
    margin: 0 auto 16px;
    border: 2px solid #f3a9ae;
    border-radius: 20px;
    background: #fff;
    display: grid;
    place-items: center;
    transform: rotate(-2deg);
}

.logo {
    width: 58px;
    height: 58px;
    object-fit: contain;
}

.uni-title {
    font-size: clamp(1.95rem, 3.2vw, 2.45rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: 0.01em;
}

.system-title {
    margin-top: 6px;
    color: var(--text-muted);
    font-size: clamp(1rem, 1.4vw, 1.55rem);
}

.motto {
    margin-top: 6px;
    color: var(--accent);
    font-style: italic;
    font-size: 0.96rem;
}

.login-card {
    width: min(560px, 100%);
    margin: 0 auto;
    background: var(--surface);
    border: 1px solid var(--line);
    border-top: 5px solid var(--danger);
    border-radius: var(--radius-lg);
    box-shadow: var(--card-shadow);
    padding: 30px 30px 26px;
}

.card-title {
    text-align: center;
    font-size: clamp(1.3rem, 1.8vw, 1.9rem);
    margin-bottom: 20px;
}

.subtitle-text {
    margin: -3px 0 14px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.login-form {
    width: 100%;
}

.input-group {
    margin-bottom: 14px;
}

.label {
    display: block;
    font-weight: 700;
    color: #2b3f59;
    margin-bottom: 6px;
    font-size: 0.9rem;
}

.input {
    width: 100%;
    border: 1.5px solid var(--line);
    border-radius: var(--radius-md);
    background: #fcfcfd;
    padding: 11px 13px;
    font-size: 0.95rem;
    color: #253852;
    transition: border-color 0.2s ease;
}

.input:focus {
    outline: none;
    border-color: var(--line-focus);
}

.aux-row {
    margin: 2px 0 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.remember {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #3d4f66;
    font-size: 0.85rem;
}

.remember input {
    width: 16px;
    height: 16px;
    accent-color: var(--danger);
}

.forgot-link {
    color: #de4444;
    text-decoration: none;
    font-size: 0.85rem;
}

.forgot-link:hover {
    text-decoration: underline;
}

.login-button {
    width: 100%;
    border: 0;
    border-radius: var(--radius-md);
    background: linear-gradient(180deg, var(--danger), var(--danger-dark));
    color: #fff;
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1;
    padding: 13px 14px;
    cursor: pointer;
    transition: filter 0.2s ease;
}

.login-button:hover {
    filter: brightness(1.02);
}

.login-button:focus-visible {
    outline: 3px solid rgba(200, 22, 31, 0.27);
    outline-offset: 2px;
}

.login-button-small {
    font-size: 1rem;
    padding: 12px 10px;
}

.status-message {
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 16px;
    font-size: 0.9rem;
}

.status-error {
    background: #fdecec;
    border: 1px solid #f5b9be;
    color: #7a1f25;
}

.status-success {
    background: #e9f7ec;
    border: 1px solid #b8e0c0;
    color: #1f5f2a;
}

.helper-links {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.helper-links a {
    color: #274d7a;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}

.helper-links a:hover {
    text-decoration: underline;
}

.hidden {
    display: none;
}

.page-footer {
    margin-top: 22px;
    text-align: center;
    color: #556a81;
    font-size: 0.88rem;
}

@media (max-width: 760px) {
    .auth-page {
        padding: 22px 12px 16px;
    }

    .logo-frame {
        width: 74px;
        height: 74px;
        border-radius: 16px;
    }

    .logo {
        width: 48px;
        height: 48px;
    }

    .login-card {
        width: 100%;
        padding: 22px 14px 18px;
    }

    .card-title {
        margin-bottom: 14px;
    }

    .label,
    .remember,
    .forgot-link {
        font-size: 0.88rem;
    }

    .input {
        font-size: 0.92rem;
        padding: 10px 11px;
    }

    .login-button {
        font-size: 1.5rem;
        padding: 11px 10px;
    }

    .login-button-small {
        font-size: 0.96rem;
    }
}

@media (max-width: 480px) {
    .aux-row {
        flex-wrap: wrap;
    }
}
