﻿* {
    box-sizing: border-box;
}

html, body {
    min-height: 100%;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Tahoma','Geneva',Verdana,sans-serif;
    background: linear-gradient(135deg,#f8fafc 0%,#bae6fd 25%,#0369a1 65%,#0c4a6e 100%);
    background-attachment: fixed;
    overflow-x: hidden;
}

.page-wrapper {
    position: relative;
    width: 100vw;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 1;
}

.glow {
    position: fixed;
    border-radius: 50%;
    opacity: 0.25;
    filter: blur(80px);
    z-index: 0;
    pointer-events: none;
}

    .glow:nth-child(1) {
        width: 400px;
        height: 400px;
        top: 5%;
        left: 10%;
        background: #38bdf8;
    }

    .glow:nth-child(2) {
        width: 350px;
        height: 350px;
        bottom: 10%;
        right: 15%;
        background: #0ea5e9;
    }

    .glow:nth-child(3) {
        width: 300px;
        height: 300px;
        top: 60%;
        left: 40%;
        background: #7dd3fc;
    }

.login-shell {
    position: relative;
    z-index: 2;
    display: flex;
    width: 100%;
    max-width: 960px;
    min-height: 560px;
    background: #ffffff;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 25px 70px rgba(2,33,66,0.35);
}

.login-left {
    flex: 0 0 46%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1.5rem;
    padding: 2.25rem;
    background: #ffffff;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: linear-gradient(135deg,#0284c7,#082f49);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(2,132,199,0.35);
}

    .brand-mark svg {
        width: 26px;
        height: 26px;
    }

.brand-text h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: 0.3px;
    color: #0f172a;
}

.brand-text p {
    margin: 3px 0 0;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 1.4px;
    color: #64748b;
    white-space: nowrap;
}

.login-card {
    background: #ffffff;
    border-radius: 14px;
    padding: 1.5rem 1.25rem;
    box-shadow: 0 15px 35px rgba(2,44,90,0.08), 0 0 0 1px rgba(15,23,42,0.04);
}

    .login-card h3 {
        margin: 0 0 1rem;
        font-size: 1.25rem;
        font-weight: 700;
        color: #0f172a;
    }

    .login-card .mb-2 {
        margin-bottom: 0.6rem !important;
    }

.form-label {
    font-size: 0.78rem;
    font-weight: 400;
    margin-bottom: 0.25rem;
}

.input-icon-wrapper {
    position: relative;
}

    .input-icon-wrapper .form-control {
        padding-left: 2rem;
        height: 36px;
        font-size: 0.8rem;
        border-radius: 0.5rem;
        border: 1px solid #cbd5e1;
        font-family: 'Tahoma','Geneva',Verdana,sans-serif;
    }

        .input-icon-wrapper .form-control:focus {
            border-color: #0284c7;
            box-shadow: 0 0 0 0.15rem rgba(2,132,199,0.25);
        }

    .input-icon-wrapper .input-icon {
        position: absolute;
        left: 10px;
        top: 50%;
        transform: translateY(-50%);
        color: #94a3b8;
        font-size: 0.9rem;
        line-height: 1;
        pointer-events: none;
    }

.password-wrapper {
    position: relative;
}

    .password-wrapper .form-control {
        padding-right: 2.5rem;
    }

.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #94a3b8;
    background: transparent;
    border: none;
    font-size: 1rem;
    line-height: 1;
    padding: 0;
    z-index: 10;
}

    .password-toggle:hover {
        color: #212529;
    }

.login-btn-wrapper {
    margin-top: 1.1rem;
}

.btn-primary {
    background: linear-gradient(135deg,#3b82f6,#1d4ed8);
    border: none;
    border-radius: 0.5rem;
    height: 40px;
    font-weight: normal;
    font-size: 0.95rem;
    color: #ffffff !important;
    font-family: 'Tahoma','Geneva',Verdana,sans-serif;
    transition: transform 0.2s, box-shadow 0.2s;
}

    .btn-primary:hover {
        transform: translateY(-1px);
        box-shadow: 0 8px 18px rgba(29,78,216,0.35);
    }

    .btn-primary:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }

a {
    color: #0284c7;
    text-decoration: none;
    font-size: 0.75rem;
}

    a:hover {
        text-decoration: underline;
    }

.small {
    font-size: 0.7rem;
}

hr {
    opacity: 0.15;
    margin: 1rem 0;
}

.text-danger {
    font-size: 0.75rem !important;
}

.forgot-row {
    text-align: right;
    margin: 0.15rem 0 0.25rem;
}

    .forgot-row a {
        font-size: 0.72rem;
    }

.login-right {
    flex: 1;
    position: relative;
    background: linear-gradient(160deg,#eaf5ff 0%,#cfe6ff 60%,#bfdcff 100%);
    overflow: hidden;
}

    .login-right svg {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        display: block;
    }

/* -------- Modals -------- */
.modal-dialog {
    max-width: 540px;
    width: 100%;
    margin: 1.75rem auto;
}

.modal-content {
    width: 100%;
    font-family: 'Tahoma','Geneva',Verdana,sans-serif;
}

.modal-body {
    text-align: left !important;
    font-family: 'Tahoma','Geneva',Verdana,sans-serif;
    font-size: 0.85rem !important;
    padding: 1rem 1.2rem;
}

.modal-header {
    padding: 0.75rem 1.2rem !important;
    min-height: 60px !important;
    display: flex;
    align-items: center;
}

    .modal-header .modal-title {
        font-size: 1rem !important;
        font-weight: 700;
    }

    .modal-header .btn-close {
        padding: 0.5rem 0.5rem;
        margin: -0.25rem -0.25rem -0.25rem auto;
    }

.modal-footer {
    padding: 0.5rem 1rem;
}

    .modal-footer .btn {
        font-weight: 700;
        font-size: 0.8rem;
    }

@media (max-width:580px) {
    .modal-dialog {
        max-width: 95%;
        width: 95%;
    }
}

#errorModal .modal-header {
    background-color: #dc3545 !important;
}

#errorModal .modal-title {
    color: white !important;
}

#warningModal .modal-header {
    background-color: #ffc107 !important;
}

#warningModal .modal-title {
    color: #212529 !important;
}

#successModal .modal-header {
    background-color: #28a745 !important;
}

#successModal .modal-title {
    color: white !important;
}

@media (max-width:900px) {
    .page-wrapper {
        align-items: center;
        justify-content: center;
        padding: 16px;
        min-height: 100vh;
        min-height: 100svh;
    }

    .login-shell {
        flex-direction: column;
        max-width: 480px;
        min-height: auto;
        margin: auto;
    }

    .login-left {
        flex: none;
        padding: 2rem 1.5rem;
        gap: 1.5rem;
    }

    .login-right {
        display: none;
    }

    .brand-mark {
        width: 48px;
        height: 48px;
        border-radius: 12px;
    }

        .brand-mark svg {
            width: 26px;
            height: 26px;
        }

    .brand-text h2 {
        font-size: 1.4rem;
    }

    .brand-text p {
        font-size: 0.55rem;
        letter-spacing: 1.2px;
        white-space: normal;
    }
}