/* ============================================================
   Global baseline (affects all frontend pages)
   ============================================================ */

body {
    background: #f0f4f8;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}

/* ============================================================
   LOGIN PAGE WRAPPER
   Scopes all login styles so they don't bleed into other pages
   ============================================================ */

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: stretch;
    background: #f0f4f8;
}

.login-wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
    max-width: 1280px;
    margin: 0 auto;
    box-shadow: 0 8px 60px rgba(0, 30, 100, 0.18);
}

/* ============================================================
   Left brand panel
   ============================================================ */

.login-brand-panel {
    flex: 0 0 44%;
    background: linear-gradient(155deg, #001260 0%, #003da5 55%, #0077cc 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 48px;
}

/* Decorative background circles */
.brand-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    pointer-events: none;
}
.brand-circle-1 { width: 480px; height: 480px; top: -160px; right: -160px; }
.brand-circle-2 { width: 320px; height: 320px; bottom: -100px; left: -100px; }
.brand-circle-3 { width: 200px; height: 200px; bottom: 40%; left: 55%; }

.brand-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: #fff;
    width: 100%;
}

.brand-content .brand-logo {
    max-width: 160px;
    margin-bottom: 36px;
    filter: brightness(0) invert(1);
}

.brand-content h1 {
    font-size: 26px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 10px;
    line-height: 1.35;
}

.brand-content .brand-subtitle {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.78);
    margin-bottom: 40px;
    line-height: 1.7;
}

.brand-features {
    text-align: left;
    display: inline-block;
    margin-top: 4px;
}

.brand-feature-item {
    display: flex;
    align-items: center;
    gap: 14px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 14px;
    margin-bottom: 16px;
    font-weight: 500;
}

.brand-feature-item .feature-icon {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
    color: #fff;
}

/* ============================================================
   Right form panel
   ============================================================ */

.login-form-panel {
    flex: 1;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 56px 48px;
}

.login-form-inner {
    width: 100%;
    max-width: 500px;
}

/* Mobile logo (shown only on small screens) */
.mobile-logo {
    display: none;
    text-align: center;
    margin-bottom: 28px;
}

.mobile-logo img {
    max-width: 130px;
}

/* ============================================================
   Tab navigation
   ============================================================ */

.login-tabs {
    display: flex;
    border-bottom: 2px solid #e9ecef;
    margin-bottom: 28px;
}

.login-tab-btn {
    flex: 1;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    padding: 10px 16px 12px;
    font-size: 14px;
    font-weight: 600;
    color: #6c757d;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
    letter-spacing: 0.01em;
}

.login-tab-btn:hover {
    color: #0046c0;
}

.login-tab-btn.active {
    color: #0031a0;
    border-bottom-color: #0031a0;
}

/* ============================================================
   Form section headings
   ============================================================ */

.form-section-title {
    font-size: 22px;
    font-weight: 700;
    color: #1a1d23;
    margin-bottom: 4px;
}

.form-section-subtitle {
    font-size: 13.5px;
    color: #6c757d;
    margin-bottom: 24px;
}

/* ============================================================
   Form fields  (.lf-* = "login form" prefix, scoped here)
   ============================================================ */

.lf-field {
    margin-bottom: 0;
}

.lf-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 5px;
    position: static;
    pointer-events: auto;
    top: auto;
    left: auto;
    transition: none;
}

.lf-input {
    display: block;
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    color: #212529;
    background: #fff;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    transition: border-color 0.2s, box-shadow 0.2s;
    letter-spacing: normal;
    margin-bottom: 0;
    margin-top: 0;
    box-sizing: border-box;
}

.lf-input:focus {
    border-color: #0046c0;
    box-shadow: 0 0 0 3px rgba(0, 70, 192, 0.12);
    outline: none;
}

.lf-input::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

.lf-select {
    display: block;
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    color: #212529;
    background: #fff url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%236c757d' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") no-repeat right 12px center / 14px 10px;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    appearance: none;
    -webkit-appearance: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    position: static;
    bottom: auto;
    line-height: 1.5;
    cursor: pointer;
}

.lf-select:focus {
    border-color: #0046c0;
    box-shadow: 0 0 0 3px rgba(0, 70, 192, 0.12);
    outline: none;
}

/* Validation error text */
.lf-field .help-block,
.lf-field .invalid-feedback,
.lf-custom-error {
    font-size: 12px;
    color: #dc3545;
    margin-top: 3px;
    display: block;
}

/* ============================================================
   Submit button
   ============================================================ */

.lf-submit-btn {
    display: block;
    width: 100%;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #0031a0 0%, #0077cc 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    letter-spacing: 0.02em;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    margin-top: 20px;
    text-align: center;
}

.lf-submit-btn:hover {
    background: linear-gradient(135deg, #001f6d 0%, #0060b0 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 49, 160, 0.38);
}

.lf-submit-btn:active {
    transform: translateY(0);
    box-shadow: none;
}

/* ============================================================
   Footer links
   ============================================================ */

.already-link {
    text-align: center;
    margin-top: 16px;
    font-size: 13.5px;
    color: #6c757d;
    margin-bottom: 0;
}

.already-link a {
    color: #0031a0;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.already-link a:hover {
    text-decoration: underline;
}

.forgot-link {
    text-align: center;
    margin-top: 14px;
    font-size: 13.5px;
    margin-bottom: 0;
}

.forgot-link a {
    color: #0031a0;
    font-weight: 500;
    text-decoration: none;
}

.forgot-link a:hover {
    text-decoration: underline;
}

/* IP info pill */
.ip-info {
    font-size: 12px;
    color: #6c757d;
    background: #f3f6fb;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 8px 12px;
    margin-top: 8px;
    margin-bottom: 4px;
}

.ip-info i {
    color: #0046c0;
    margin-right: 4px;
}

/* ============================================================
   Responsive — hide brand panel on small screens
   ============================================================ */

@media (max-width: 991px) {
    .login-brand-panel {
        display: none;
    }

    .login-form-panel {
        padding: 40px 24px;
    }

    .login-form-inner {
        max-width: 100%;
    }

    .mobile-logo {
        display: block;
    }
}

@media (max-width: 575px) {
    .login-form-panel {
        padding: 32px 16px;
    }
}

/* ============================================================
   Email-failed / misc pages (kept from original)
   ============================================================ */

.email-faild-wrp {
    padding: 50px 0;
}

.email-faild-wrp img {
    width: 27%;
    margin: 0 auto;
}

.email-faild-wrp .card {
    width: 56%;
    margin: 0 auto;
    padding: 50px 20px;
    box-shadow: 0 10px 30px 0 rgba(0, 60, 179, 0.05);
    border: none;
}

.email-faild-wrp h3 {
    font-size: 23px;
    color: #000;
    margin-top: 20px;
}

/* Forgot-password card (used on reset page) */
.forgot-card {
    width: 50%;
    margin: 0 auto;
}

/* ============================================================
   COMPACT FORM CONTROLS — global override (loaded last,
   overrides Bootstrap 4 defaults everywhere in frontend)
   ============================================================ */

.form-control,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="tel"],
input[type="url"],
input[type="date"],
input[type="datetime-local"],
input[type="time"],
input[type="month"],
input[type="week"],
textarea {
    padding: .3rem .6rem !important;
    font-size: .875rem !important;    /* 14 px */
    line-height: 1.5 !important;
    height: auto !important;
}

/* Single-line selects need an explicit height */
select.form-control,
.custom-select {
    padding: .3rem .6rem !important;
    font-size: .875rem !important;
    line-height: 1.5 !important;
    height: calc(1.5em + .6rem + 2px) !important;
}

/* Preserve full height on multi-line textarea */
textarea.form-control {
    height: auto !important;
    min-height: 70px;
}

/* Reduce gap between form groups */
.form-group,
.group.form-group {
    margin-bottom: .6rem !important;
}

/* Labels */
label {
    font-size: .875rem !important;
    margin-bottom: .2rem !important;
    font-weight: 600;
}

/* Input group addon text */
.input-group-text {
    padding: .3rem .6rem !important;
    font-size: .875rem !important;
}

/* Compact buttons */
.btn {
    padding: .3rem .7rem;
    font-size: .875rem;
    line-height: 1.5;
}

/* Compact table text */
.table,
table {
    font-size: .875rem;
}

.table th,
.table td,
table th,
table td {
    padding: .35rem .5rem;
}

/* Compact validation messages */
.help-block,
.invalid-feedback,
.valid-feedback {
    font-size: .8rem !important;
    margin-top: .2rem !important;
}
