@import url(../../dist/css/san_pro.css?family=Source+Sans+Pro:400,600,700);

:root {
    --fi-blue-900: #0a2852;
    --fi-blue-800: #0d3d7a;
    --fi-blue-700: #1558a8;
    --fi-blue-600: #1e6fd4;
    --fi-gold: #f0b429;
    --fi-text: #1a2b42;
    --fi-muted: #5c6b7f;
    --fi-border: #d8e0ea;
    --fi-radius: 14px;
    --fi-shadow: 0 24px 48px rgba(10, 40, 82, 0.22);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body.fi-login-body {
    margin: 0;
    min-height: 100%;
    font-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.fi-login-body {
    background: linear-gradient(135deg, #061a36 0%, #0d3d7a 50%, #0a2852 100%);
}

.fi-login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}

.fi-login-shell {
    display: flex;
    width: min(1080px, 100%);
    min-height: min(620px, calc(100vh - 48px));
    border-radius: calc(var(--fi-radius) + 4px);
    overflow: hidden;
    box-shadow: var(--fi-shadow);
    background: #fff;
}

.fi-login-hero {
    position: relative;
    flex: 0 0 42%;
    min-width: 280px;
    background:
        linear-gradient(160deg, rgba(10, 40, 82, 0.96) 0%, rgba(13, 61, 122, 0.92) 45%, rgba(21, 88, 168, 0.88) 100%),
        radial-gradient(ellipse at 80% 20%, rgba(255, 255, 255, 0.08), transparent 50%);
}

.fi-login-hero__overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 80%, rgba(240, 180, 41, 0.15), transparent 55%);
    pointer-events: none;
}

.fi-login-hero__content {
    position: relative;
    z-index: 1;
    padding: 48px 40px;
    color: #fff;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.fi-login-hero__badge {
    margin: 0 0 20px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0.95;
}

.fi-login-hero__title {
    margin: 0 0 16px;
    font-size: clamp(1.35rem, 2.5vw, 1.85rem);
    font-weight: 700;
    line-height: 1.25;
}

.fi-login-hero__rule {
    width: 56px;
    height: 4px;
    background: var(--fi-gold);
    border-radius: 2px;
    margin-bottom: 20px;
}

.fi-login-hero__text {
    margin: 0 0 24px;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.65;
    opacity: 0.92;
    max-width: 36ch;
}

.fi-login-hero__campus {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 14px;
    border-left: 3px solid var(--fi-gold);
    background: rgba(255, 255, 255, 0.08);
    border-radius: 0 8px 8px 0;
}

.fi-login-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 48px 48px;
    background: #fff;
}

.fi-login-brand {
    margin-bottom: 16px;
    width: 100%;
    max-width: 380px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.fi-login-logo-btn {
    display: block;
    margin: 0 auto 12px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: zoom-in;
    border-radius: 8px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.fi-login-logo-btn:hover .fi-login-logo,
.fi-login-logo-btn:focus-visible .fi-login-logo {
    transform: scale(1.02);
}

.fi-login-logo-btn:focus-visible {
    outline: 2px solid var(--fi-blue-600);
    outline-offset: 4px;
}

.fi-login-logo {
    display: block;
    width: auto;
    max-width: min(320px, 88vw);
    max-height: min(220px, 32vh);
    height: auto;
    margin: 0;
    object-fit: contain;
    transition: transform 0.15s ease;
    pointer-events: none;
}

body.fi-login-lightbox-open {
    overflow: hidden;
}

.fi-login-lightbox[hidden] {
    display: none !important;
}

.fi-login-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.fi-login-lightbox.is-open {
    opacity: 1;
    visibility: visible;
}

.fi-login-lightbox__backdrop {
    position: absolute;
    inset: 0;
    border: none;
    padding: 0;
    margin: 0;
    background: rgba(6, 26, 54, 0.88);
    cursor: zoom-out;
}

.fi-login-lightbox__frame {
    position: relative;
    z-index: 1;
    max-width: min(960px, 96vw);
    max-height: 92vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fi-login-lightbox__img {
    display: block;
    max-width: min(900px, 94vw);
    max-height: 88vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.fi-login-lightbox__close {
    position: absolute;
    top: -12px;
    right: -12px;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: #fff;
    color: var(--fi-blue-800);
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.fi-login-lightbox__close:hover {
    background: var(--fi-gold);
}

.fi-login-heading {
    margin: 12px 0 6px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--fi-blue-800);
    text-align: center;
}

.fi-login-subheading {
    margin: 0 0 28px;
    font-size: 14px;
    color: var(--fi-muted);
    text-align: center;
}

.fi-login-form {
    width: 100%;
    max-width: 380px;
}

.fi-field {
    display: block;
    position: relative;
    margin-bottom: 14px;
}

.fi-field__icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    opacity: 0.45;
    pointer-events: none;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.fi-field__icon--user {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%231558a8' viewBox='0 0 24 24'%3E%3Cpath d='M12 12c2.7 0 5-2.3 5-5s-2.3-5-5-5-5 2.3-5 5 2.3 5 5 5zm0 2c-3.3 0-10 1.7-10 5v1h20v-1c0-3.3-6.7-5-10-5z'/%3E%3C/svg%3E");
}

.fi-field__icon--lock {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%231558a8' viewBox='0 0 24 24'%3E%3Cpath d='M17 8h-1V6a4 4 0 00-8 0v2H7a2 2 0 00-2 2v8a2 2 0 002 2h10a2 2 0 002-2v-8a2 2 0 00-2-2zm-3 0H10V6a2 2 0 014 0v2z'/%3E%3C/svg%3E");
}

.fi-input {
    width: 100%;
    height: 48px;
    padding: 0 44px 0 44px;
    font-size: 15px;
    font-weight: 400;
    color: var(--fi-text);
    border: 1px solid var(--fi-border);
    border-radius: 8px;
    background: #fafbfc;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.fi-input:focus {
    outline: none;
    border-color: var(--fi-blue-600);
    box-shadow: 0 0 0 3px rgba(30, 111, 212, 0.15);
    background: #fff;
}

.fi-input.error-input {
    border-color: #e53935;
}

.fi-field--password .fi-input {
    padding-right: 48px;
}

.fi-toggle-password {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 6px;
    background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%235c6b7f' viewBox='0 0 24 24'%3E%3Cpath d='M12 5C7 5 2.7 8.1 1 12c1.7 3.9 6 7 11 7s9.3-3.1 11-7c-1.7-3.9-6-7-11-7zm0 11a4 4 0 110-8 4 4 0 010 8z'/%3E%3C/svg%3E") center/20px no-repeat;
    cursor: pointer;
}

.fi-toggle-password.is-visible {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%231558a8' viewBox='0 0 24 24'%3E%3Cpath d='M12 6a4 4 0 014 4 5 5 0 01-5 5 4 4 0 01-4-4 5 5 0 015-5m0-2C7 4 2.7 7.1 1 11c1.7 3.9 6 7 11 7s9.3-3.1 11-7c-1.7-3.9-6-7-11-7zm0 2a5 5 0 100 10 5 5 0 000-10z'/%3E%3C/svg%3E");
}

.fi-btn-login {
    width: 100%;
    height: 50px;
    margin-top: 8px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #fff;
    background: linear-gradient(180deg, var(--fi-blue-700) 0%, var(--fi-blue-900) 100%);
    box-shadow: 0 4px 12px rgba(13, 61, 122, 0.35);
    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.15s ease;
}

.fi-btn-login:hover {
    box-shadow: 0 6px 16px rgba(13, 61, 122, 0.45);
}

.fi-btn-login:active {
    transform: translateY(1px);
}

.invalid {
    margin-top: 14px;
    padding: 10px 12px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    color: #b71c1c;
    background: #ffebee;
    border-radius: 8px;
}

.error-invalid {
    color: #c62828;
}

@media (max-width: 860px) {
    .fi-login-shell {
        flex-direction: column;
        min-height: auto;
    }

    .fi-login-hero {
        flex: none;
        min-height: 220px;
    }

    .fi-login-hero__content {
        padding: 32px 28px;
    }

    .fi-login-panel {
        padding: 32px 24px 40px;
    }

    .fi-login-logo {
        max-width: min(280px, 90vw);
        max-height: min(180px, 28vh);
    }
}

/* legacy shake target */
.container {
    width: 100%;
}