/* NEUST OfficeLedger — Login
   Colors taken from the NEUST logo: royal blue and gold. */

:root {
    --ol-blue: #1f3c99;
    --ol-blue-dark: #162d75;
    --ol-gold: #f2c200;
    --ol-text: #1c2433;
    --ol-muted: #5b6475;
    --ol-border: #d3d9e3;
    --ol-page: #f3f5f9;
}

* {
    box-sizing: border-box;
}

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

/* Blue band with a gold edge across the top; the card overlaps it. */
body.ol-login-body {
    font-family: "Segoe UI", Arial, sans-serif;
    color: var(--ol-text);
    background:
        linear-gradient(
            to bottom,
            var(--ol-blue) 0,
            var(--ol-blue) 40vh,
            var(--ol-gold) 40vh,
            var(--ol-gold) calc(40vh + 5px),
            var(--ol-page) calc(40vh + 5px)
        );
}

.ol-login-layout {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
}

/* Card */
.ol-login-card {
    width: 100%;
    max-width: 400px;
    padding: 32px;
    background: #fff;
    border: 1px solid var(--ol-border);
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(22, 45, 117, 0.18);
}

/* Logo and title */
.ol-branding {
    text-align: center;
    margin-bottom: 24px;
}

.ol-school-logo {
    width: 72px;
    height: 72px;
    object-fit: contain;
}

.ol-branding h1 {
    margin: 12px 0 4px;
    font-size: 24px;
    font-weight: 700;
    color: var(--ol-blue);
}

.ol-branding p {
    margin: 0;
    font-size: 13px;
    color: var(--ol-muted);
}

/* Fields */
.ol-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.ol-field label {
    font-size: 13px;
    font-weight: 600;
}

/* Forgot password link, centered under the button */
.ol-forgot {
    margin: 16px 0 0;
    text-align: center;
}

.ol-forgot a {
    font-size: 13px;
    color: var(--ol-blue);
    text-decoration: none;
}

.ol-forgot a:hover {
    text-decoration: underline;
}

.ol-field input {
    width: 100%;
    height: 42px;
    padding: 8px 12px;
    border: 1px solid var(--ol-border);
    border-radius: 6px;
    background: #fff;
    color: var(--ol-text);
    font: inherit;
    font-size: 14px;
}

.ol-field input:focus {
    outline: none;
    border-color: var(--ol-blue);
    box-shadow: 0 0 0 3px rgba(31, 60, 153, 0.15);
}

/* Password show/hide */
.ol-password-wrap {
    position: relative;
}

.ol-password-wrap input {
    padding-right: 64px;
}

#togglePassword {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    padding: 4px 6px;
    border: 0;
    background: transparent;
    color: var(--ol-blue);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

/* Button */
.ol-login-submit {
    width: 100%;
    height: 44px;
    margin-top: 8px;
    border: 0;
    border-radius: 6px;
    background: var(--ol-blue);
    color: #fff;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.ol-login-submit:hover {
    background: var(--ol-blue-dark);
}

.ol-login-submit:focus-visible,
#togglePassword:focus-visible,
.ol-forgot a:focus-visible {
    outline: 2px solid var(--ol-gold);
    outline-offset: 2px;
}

/* Messages */
.ol-error,
.ol-notice {
    margin-bottom: 16px;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 14px;
}

.ol-error {
    background: #fdf0ee;
    border: 1px solid #f3c7c0;
    color: #9b2921;
}

.ol-notice {
    background: #ecfdf3;
    border: 1px solid #abefc6;
    color: #067647;
}

/* Footer */
.ol-login-footer {
    margin: 20px 0 0;
    font-size: 12px;
    color: var(--ol-muted);
    text-align: center;
}

@media (max-width: 440px) {
    .ol-login-card {
        padding: 24px 20px;
    }
}
