/* =========================================================
   JBT ERP - Login V1
   Jaffer ALBalushi Trade
   ========================================================= */

:root {
    --jbt-blue: #0b4f8a;
    --jbt-blue-dark: #07365f;
    --jbt-gold: #d6a52b;
    --jbt-text: #17324d;
    --jbt-muted: #6b7c8f;
    --jbt-border: #dce6ef;
    --jbt-white: #ffffff;
}

/* Page */
body.jbt-login-page {
    min-height: 100vh;
    margin: 0;
    background:
        linear-gradient(135deg, rgba(5, 38, 68, 0.96), rgba(11, 79, 138, 0.88));
}

/* Hide default website navigation */
body.jbt-login-page .navbar {
    display: none !important;
}

/* Main JBT shell */
.jbt-login-shell {
    min-height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    padding: 24px 42px 18px;
    color: #fff;
}

/* Top header */
.jbt-login-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.jbt-building {
    font-weight: 700;
    opacity: 0.95;
}

.jbt-language {
    font-weight: 600;
    letter-spacing: 0.5px;
    opacity: 0.9;
}

/* Brand area */
.jbt-brand {
    text-align: center;
    margin: 24px auto 4px;
}

.jbt-brand img {
    width: 92px;
    height: 92px;
    object-fit: contain;
    display: block;
    margin: 0 auto 10px;
}

.jbt-company-ar {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.4;
}

.jbt-company-en {
    margin-top: 3px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.5px;
    opacity: 0.95;
}

.jbt-tagline {
    margin-top: 8px;
    color: var(--jbt-gold);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2px;
}

/* Login section */
body.jbt-login-page .for-login {
    min-height: 0 !important;
    flex: 1;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 12px 0 18px;
    box-sizing: border-box;
}

/* Login card */
body.jbt-login-page .login-content.page-card {
    width: min(410px, calc(100vw - 40px));
    background: rgba(255, 255, 255, 0.99);
    border: 0;
    border-radius: 18px;
    padding: 30px 34px 26px;
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.28);
    box-sizing: border-box;
}

/* Remove duplicate Frappe logo/title area */
body.jbt-login-page .page-card-head {
    padding: 0 0 18px;
    border: 0;
    text-align: center;
}

body.jbt-login-page .page-card-head .app-logo {
    display: none;
}

body.jbt-login-page .page-card-head-text h4 {
    color: var(--jbt-blue-dark);
    font-size: 24px;
    font-weight: 750;
    margin: 0 0 6px;
}

body.jbt-login-page .page-card-subtitle {
    color: var(--jbt-muted);
    font-size: 13px;
    margin: 0;
}

/* Form */
body.jbt-login-page .form-group {
    margin-bottom: 18px;
}

body.jbt-login-page .form-label {
    color: var(--jbt-text);
    font-size: 13px;
    font-weight: 650;
    margin-bottom: 7px;
}

body.jbt-login-page .form-control {
    height: 47px;
    border: 1px solid var(--jbt-border);
    border-radius: 9px;
    font-size: 14px;
    padding-left: 43px;
    box-shadow: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

body.jbt-login-page .form-control:focus {
    border-color: var(--jbt-blue);
    box-shadow: 0 0 0 3px rgba(11, 79, 138, 0.10);
}

/* Input icons */
body.jbt-login-page .email-field,
body.jbt-login-page .password-field {
    position: relative;
}

body.jbt-login-page .field-icon {
    position: absolute;
    left: 14px;
    top: 15px;
    z-index: 2;
    opacity: 0.55;
}

body.jbt-login-page .toggle-password {
    position: absolute;
    right: 14px;
    top: 15px;
    cursor: pointer;
    opacity: 0.55;
}

/* Forgot password */
body.jbt-login-page .forgot-password-message {
    text-align: right;
    margin: 7px 0 0;
}

body.jbt-login-page .forgot-password-message a {
    color: var(--jbt-blue);
    font-size: 12px;
    font-weight: 650;
}

/* Buttons */
body.jbt-login-page .page-card-actions {
    margin-top: 4px;
}

body.jbt-login-page .btn-login {
    min-height: 47px;
    border-radius: 9px;
    font-size: 14px;
    font-weight: 700;
}

body.jbt-login-page .btn-login[type="submit"] {
    background: var(--jbt-blue);
    border-color: var(--jbt-blue);
    color: #fff;
}

body.jbt-login-page .btn-login[type="submit"]:hover {
    background: var(--jbt-blue-dark);
    border-color: var(--jbt-blue-dark);
}

/* Email login */
body.jbt-login-page .btn-login-with-email-link {
    margin-top: 9px;
    color: var(--jbt-blue);
    background: #fff;
    border: 1px solid var(--jbt-border);
}

/* Hide signup */
body.jbt-login-page .sign-up-message {
    display: none !important;
}

/* Business activities */
.jbt-welcome {
    text-align: center;
    margin: 0 auto 10px;
    color: #ffffff;
    position: relative;
    z-index: 5;
}

.jbt-welcome-title {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 5px;
}

.jbt-welcome-subtitle {
    font-size: 14px;
    font-weight: 400;
    opacity: 0.9;
}

.jbt-activities {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
    margin: 0 auto 12px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1px;
    text-align: center;
}

.jbt-activities span {
    padding: 6px 10px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.07);
}

/* Footer */
.jbt-login-footer {
    text-align: center;
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.6;
}

.jbt-login-footer > div {
    color: var(--jbt-gold);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.jbt-login-footer small {
    display: block;
    margin-top: 2px;
    font-size: 9px;
    opacity: 0.78;
}

/* Error */
body.jbt-login-page .login-error-banner {
    border-radius: 8px;
}

/* Mobile */
@media (max-width: 600px) {
    .jbt-login-shell {
        padding: 16px 16px 14px;
    }

    .jbt-login-header {
        font-size: 9px;
    }

    .jbt-brand {
        margin-top: 18px;
    }

    .jbt-brand img {
        width: 76px;
        height: 76px;
    }

    .jbt-company-ar {
        font-size: 17px;
    }

    .jbt-company-en {
        font-size: 13px;
    }

    .jbt-welcome {
        text-align: center;
        margin: 0 auto 10px;
        color: #ffffff;
        position: relative;
        z-index: 5;
    }

    .jbt-welcome-title {
        font-size: 24px;
        font-weight: 700;
        line-height: 1.2;
        margin-bottom: 5px;
    }

    .jbt-welcome-subtitle {
        font-size: 14px;
        font-weight: 400;
        opacity: 0.9;
    }

    body.jbt-login-page .for-login {
        min-height: 0 !important;
        height: auto !important;
        flex: none !important;
        padding: 8px 0 12px !important;
    }

    body.jbt-login-page .login-content.page-card {
        width: min(410px, calc(100vw - 28px));
        padding: 20px 22px 18px;
        min-height: 0 !important;
        height: auto !important;
        max-height: none !important;
    }

    .jbt-activities {
        gap: 5px;
    }

    .jbt-activities span {
        font-size: 8px;
        padding: 5px 7px;
    }
}

.jbt-lang-btn {
    background: transparent;
    border: 0;
    padding: 2px 4px;
    margin: 0;
    color: inherit;
    font: inherit;
    cursor: pointer;
    text-decoration: none;
}

.jbt-lang-btn:hover {
    opacity: 0.75;
    text-decoration: underline;
}

.jbt-lang-btn:focus {
    outline: none;
}
