/* ── CSS Variables ── */
:root {
    --navy: #1a3557;
    --navy-mid: #234a78;
    --navy-lt: #2d5f9e;
    --navy-dark: #0f1b35;
    --orange: #e8621a;
    --orange-lt: #f08340;
    --gold: #c8922a;
    --teal-accent: #5dcaa5;
    --blue-accent: #185fa5;
    --glass-bg: rgba(255, 255, 255, 0.72);
    --glass-border: rgba(255, 255, 255, 0.55);
    --card-shadow: 0 4px 24px rgba(26, 53, 87, 0.13);
    --card-hover-shadow: 0 10px 36px rgba(26, 53, 87, 0.22);
    --radius: 16px;
    --transition: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    height: 100%;
    min-height: 100%;
}

body {
    height: 100%;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    font-family: "Open Sans", sans-serif;
    overflow-x: hidden;
}

.app-wrapper,
.app-wrapper > div,
.app-wrapper main,
.app-wrapper .container-fluid,
.app-wrapper .row,
.app-wrapper .col-12 {
    height: 100%;
    min-height: 100%;
    padding: 0 !important;
    margin: 0 !important;
}

.login-form-container {
    min-height: 100vh !important;
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 2rem 1rem;
    position: relative;
    overflow: hidden;
    background: linear-gradient(
        135deg,
        #0f1b35 0%,
        #1a2d5a 40%,
        #0d2244 70%,
        #071530 100%
    );
}

.login-form-container::before {
    content: "";
    position: absolute;
    width: 480px;
    height: 480px;
    border-radius: 50%;
    background: rgba(55, 138, 221, 0.08);
    top: -120px;
    right: -100px;
    pointer-events: none;
    z-index: 0;
}

.login-form-container::after {
    content: "";
    position: absolute;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: rgba(93, 202, 165, 0.07);
    bottom: -90px;
    left: -80px;
    pointer-events: none;
    z-index: 0;
}

.login-bg-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0.055;
    pointer-events: none;
    z-index: 0;
}

.form_container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 20px;
    padding: 2.75rem 2.25rem 2.25rem;
    box-shadow: 0 28px 64px rgba(0, 0, 0, 0.32);
}

.auth-logo img {
    max-width: 220px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.form-divider {
    width: 95px;
    height: 2.5px;
    background: linear-gradient(90deg, var(--blue-accent), var(--teal-accent));
    border-radius: 4px;
    margin: 0 auto;
}

.auth-title {
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--navy-dark);
    margin-bottom: 0.2rem;
    letter-spacing: -0.01em;
}

.auth-subtitle {
    font-size: 0.95rem;
    color: #454444;
    margin-bottom: 0;
}

.form-label {
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    color: #555 !important;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 6px !important;
    display: block;
}

.auth-input-group {
    position: relative;
}

.auth-input-group .field-icon {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    opacity: 0.35;
    pointer-events: none;
    z-index: 5;
}

.auth-input-group .form-control {
    background-color: #f7f8fa !important;
    border: 1.5px solid #e4e6eb !important;
    border-radius: 10px !important;
    padding: 0.65rem 0.875rem 0.65rem 2.5rem !important;
    font-size: 0.875rem !important;
    color: var(--navy-dark) !important;
    transition:
        border-color 0.18s ease,
        background-color 0.18s ease,
        box-shadow 0.18s ease;
    box-shadow: none !important;
    height: auto !important;
    width: 100%;
}

.auth-input-group .form-control::placeholder {
    color: #bbb;
    font-size: 0.845rem;
}

.auth-input-group .form-control:focus {
    border-color: var(--blue-accent) !important;
    background-color: #fff !important;
    box-shadow: 0 0 0 3px rgba(24, 95, 165, 0.1) !important;
    outline: none !important;
}

.auth-input-group .form-control.is-invalid {
    border-color: #e24b4a !important;
    background-color: #fff !important;
}

.auth-input-group .form-control.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(226, 75, 74, 0.1) !important;
}

.auth-input-group .form-control.has-toggle {
    padding-right: 2.75rem !important;
}

.pw-toggle {
    position: absolute;
    right: 11px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 4px 6px;
    cursor: pointer;
    color: #bbb;
    display: flex;
    align-items: center;
    z-index: 5;
    border-radius: 6px;
    line-height: 1;
    transition: color 0.15s;
}

.pw-toggle:hover {
    color: var(--blue-accent);
}

.invalid-feedback {
    font-size: 0.74rem !important;
    color: #a32d2d !important;
    margin-top: 5px !important;
    display: block;
}

.link-forgot {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--blue-accent);
    text-decoration: none;
    transition: color 0.15s;
}

.link-forgot:hover {
    color: var(--navy-dark);
}

.link-back {
    font-size: 0.85rem;
    font-weight: 600;
    color: #4d4d4d;
}

.link-back a {
    color: var(--blue-accent);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.15s;
}

.link-back a:hover {
    color: var(--navy-dark);
}

.btn-auth {
    background-color: var(--navy-dark) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 0.72rem 1rem !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.02em;
    width: 100%;
    display: block;
    text-align: center;
    transition:
        background-color 0.18s ease,
        transform 0.1s ease !important;
    cursor: pointer;
}

.btn-auth:hover:not(:disabled) {
    background-color: var(--blue-accent) !important;
    color: #fff !important;
}

.btn-auth:active:not(:disabled) {
    transform: scale(0.98);
}

.btn-auth:disabled {
    opacity: 0.65 !important;
    cursor: not-allowed;
}

.auth-alert-error {
    background: #fcebeb;
    border: 1px solid #f09595;
    border-radius: 10px;
    color: #a32d2d;
    font-size: 0.8rem;
    padding: 10px 14px;
}

.auth-alert-success {
    background: #eaf3de;
    border: 1px solid #97c459;
    border-radius: 10px;
    color: #3b6d11;
    font-size: 0.8rem;
    padding: 10px 14px;
}

@media (max-width: 480px) {
    .form_container {
        padding: 2rem 1.35rem 1.75rem;
        border-radius: 16px;
    }

    .auth-logo img {
        max-width: 180px;
    }
}

.bg-scene {
    position: fixed;
    inset: 0;
    z-index: 0;
    background:
        linear-gradient(
            160deg,
            rgba(26, 53, 87, 0.6) 0%,
            rgba(0, 0, 0, 0.4) 100%
        ),
        url("../images/loft.jpg") center / cover no-repeat;
    background-size: cover;
}

.bg-scene::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(
        ellipse at 50% 110%,
        rgba(232, 98, 26, 0.18) 0%,
        transparent 65%
    );
    animation: warmPulse 6s ease-in-out infinite alternate;
}

@keyframes warmPulse {
    from {
        opacity: 0.6;
    }
    to {
        opacity: 1;
    }
}

.panel {
    position: relative;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 100vh;
    padding: 2rem;
}

.panel-content {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 28px;
    padding: 44px 40px 36px;
    box-shadow:
        0 24px 80px rgba(0, 0, 0, 0.32),
        0 2px 0 rgba(255, 255, 255, 0.6) inset;
    animation: slideUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
    width: 80%;
    max-width: 900px;
    margin: 0 auto;
}

/* Panel Animation */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(36px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.menu-card {
    display: flex;
    align-items: center;
    height: 100%;
    gap: 16px;
    background: rgba(255, 255, 255, 0.84);
    border-radius: 10px;
    padding: 17px 18px;
    text-decoration: none !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

.menu-card:hover {
    transform: translateY(-3px) scale(1.015);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.97);
    border-color: rgba(232, 98, 26, 0.28);
}

.panel-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
    padding: 12px 0;
    border-top: 1px solid rgba(26, 53, 87, 0.2);
}

.version-badge {
    font-size: 0.9rem;
    font-weight: 600;
    color: #8a99ae;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.btn-logout {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: "Montserrat", sans-serif;
    text-transform: uppercase;
    font-size: 0.9rem;
    font-weight: bold;
    color: var(--navy-mid);
    background: transparent;
    border: 1.5px solid rgba(26, 53, 87, 0.22);
    border-radius: 50px;
    padding: 8px 20px;
    cursor: pointer;
    transition:
        background 0.3s ease,
        color 0.3s ease,
        border-color 0.3s ease,
        transform 0.3s ease;
}

.btn-logout:hover {
    background: var(--navy);
    color: #fff !important;
    border-color: var(--navy);
    transform: translateY(-1px);
}

.logo-img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    padding: 0;
    width: 350px;
    object-fit: contain;
}

.card-body-text {
    color: var(--navy-mid);
}

.card-title {
    font-family: "Lora", sans-serif;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--navy);
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
}

.card-desc {
    font-family: "Montserrat", sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: #333333ad;
    line-height: 1.2;
    margin-top: 0;
}

.card-icon-wrap {
    background-color: #ed6d23;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 50px;
    border-radius: 12px;
    margin-right: 5px;
}

.card-icon-wrap svg {
    stroke: #ffffff;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}
/* Small Devices */
@media (max-width: 480px) {
    .panel-content {
        padding: 15px 15px 15px;
    }

    .panel-content {
        width: 95%;
    }

    .card-title {
        font-size: 1rem;
    }

    .card-desc {
        font-size: 0.85rem;
    }

    .menu-card {
        gap: 5px;
        padding: 12px 10px;
    }

    .row > * {
        margin-top: 10px;
    }

    .panel {
        padding: 0.5rem;
    }
}

/* Medium Devices */
@media (min-width: 481px) and (max-width: 768px) {
    .panel-content {
        padding: 20px 20px 20px;
    }

    .panel-content {
        width: 95%;
    }

    .card-title {
        font-size: 1rem;
    }

    .card-desc {
        font-size: 0.85rem;
    }

    .menu-card {
        gap: 5px;
        padding: 12px 10px;
    }

    .row > * {
        margin-top: 10px;
    }

    .panel {
        padding: 0.5rem;
    }
}

/* Large Devices */
@media (min-width: 769px) {
    .panel-content {
        width: 80%;
    }
}
