
@font-face {
    font-family: 'XSpace';
    src:
        url('../fonts/XspaceRegular.woff2') format('woff2'),
        url('../fonts/XspaceRegular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* =========================================================
   BIOACCES UI V2
   Visual layer only — no business logic
   ========================================================= */

:root {
    --ba-navy-950: #061a33;
    --ba-navy-900: #08284b;
    --ba-navy-800: #0b3d67;

    --ba-blue-700: #006da8;
    --ba-blue-600: #008bc7;
    --ba-cyan-500: #08aeea;
    --ba-cyan-400: #36c4f0;

    --ba-silver-50:  #f8fafc;
    --ba-silver-100: #eef3f7;
    --ba-silver-200: #dce5ec;
    --ba-silver-300: #c7d3dd;
    --ba-silver-500: #8296a8;

    --ba-text: #172738;
    --ba-muted: #637586;
    --ba-white: #ffffff;

    --ba-success: #16845b;
    --ba-warning: #c68013;
    --ba-danger: #c64040;

    --ba-radius-sm: 8px;
    --ba-radius: 14px;
    --ba-radius-lg: 20px;

    --ba-shadow-sm: 0 2px 10px rgba(6, 26, 51, .06);
    --ba-shadow: 0 12px 34px rgba(6, 26, 51, .10);
}

/* ---------- base ---------- */

html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    background:
        radial-gradient(circle at 85% 5%, rgba(8,174,234,.08), transparent 25rem),
        linear-gradient(180deg, #f7fafc 0%, #eef4f8 100%);
    color: var(--ba-text);
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Arial,
        sans-serif;
    font-size: 15px;
}

a {
    color: var(--ba-blue-700);
}

a:hover {
    color: var(--ba-cyan-500);
    text-decoration: none;
}

/* ---------- navbar ---------- */

.navbar {
    min-height: 72px;
    padding: 8px 24px;
    background: rgba(255,255,255,.96) !important;
    border: 0 !important;
    border-bottom: 1px solid var(--ba-silver-200) !important;
    box-shadow: 0 2px 14px rgba(6,26,51,.05);
    backdrop-filter: blur(14px);
}

.navbar-brand,
.bioacces-link {
    display: flex !important;
    align-items: center;
    gap: 10px;
    width: auto !important;
    margin-right: 24px !important;
    color: var(--ba-navy-900) !important;
    font-family: 'XSpace', "Segoe UI", sans-serif;
    font-size: 1.75rem !important;
    line-height: 1;
    letter-spacing: -.02em;
}

.navbar-brand img {
    width: 48px !important;
    height: 48px !important;
    object-fit: contain;
}

.navbar .nav-link {
    color: #3b5064 !important;
    font-weight: 600;
    border-radius: 9px;
    padding: 9px 12px !important;
    transition: background-color .15s ease, color .15s ease;
}

.navbar .nav-link:hover,
.navbar .nav-item.active > .nav-link {
    background: var(--ba-silver-100);
    color: var(--ba-blue-700) !important;
}

.dropdown-menu {
    border: 1px solid var(--ba-silver-200);
    border-radius: 12px;
    padding: 7px;
    box-shadow: var(--ba-shadow);
}

.dropdown-item {
    border-radius: 8px;
    padding: 8px 12px;
}

.dropdown-item:hover {
    background: var(--ba-silver-100);
    color: var(--ba-blue-700);
}

/* ---------- content ---------- */

.main-container {
    padding: 34px 32px 48px;
    min-height: calc(100vh - 128px);
}

h1, h2, h3, h4, h5 {
    color: var(--ba-navy-900);
    font-weight: 700;
}

h2 {
    font-size: 1.65rem;
    margin-bottom: 22px;
}

/* ---------- flash ---------- */

.w2p_flash {
    position: fixed;
    top: 82px;
    right: 22px;
    z-index: 9999;
    max-width: 430px;
    border: 0;
    border-radius: 12px;
    box-shadow: var(--ba-shadow);
}

/* ---------- forms ---------- */

.form-control,
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="date"],
select,
textarea {
    min-height: 44px;
    color: var(--ba-text);
    background: var(--ba-white);
    border: 1px solid var(--ba-silver-300);
    border-radius: 10px;
    padding: 9px 12px;
    transition:
        border-color .15s ease,
        box-shadow .15s ease;
}

.form-control:focus,
input:focus,
select:focus,
textarea:focus {
    border-color: var(--ba-cyan-500) !important;
    box-shadow: 0 0 0 3px rgba(8,174,234,.14) !important;
    outline: none !important;
}

label {
    color: #405468;
    font-weight: 600;
}

/* ---------- buttons ---------- */

.btn {
    min-height: 42px;
    border-radius: 10px;
    padding: 8px 17px;
    font-weight: 700;
    border-width: 1px;
    box-shadow: none;
}

.btn-primary {
    color: white !important;
    background:
        linear-gradient(135deg, var(--ba-blue-700), var(--ba-cyan-500)) !important;
    border-color: transparent !important;
}

.btn-primary:hover,
.btn-primary:focus {
    background:
        linear-gradient(135deg, var(--ba-navy-800), var(--ba-blue-600)) !important;
    border-color: transparent !important;
    transform: translateY(-1px);
}

.btn-secondary {
    color: white !important;
    background: var(--ba-navy-800) !important;
    border-color: var(--ba-navy-800) !important;
}

.btn-light,
.btn-default {
    background: white !important;
    border-color: var(--ba-silver-300) !important;
    color: var(--ba-navy-900) !important;
}

/* ---------- login / auth ---------- */

body:has(#web2py_user_form) .main-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 54px;
    padding-bottom: 70px;
}

#web2py_user_form {
    width: 100% !important;
    max-width: 470px !important;

    flex: 0 0 auto !important;

    margin: 0 auto !important;
    padding: 36px 40px 32px !important;

    background: rgba(255,255,255,.98) !important;
    border: 1px solid var(--ba-silver-200) !important;
    border-radius: var(--ba-radius-lg) !important;

    box-shadow: var(--ba-shadow) !important;
}

#web2py_user_form h2 {
    margin: 0 0 28px;
    font-size: 1.7rem;
    text-align: center;
    color: var(--ba-navy-900);
}

#web2py_user_form table {
    width: 100%;
}

#web2py_user_form table td {
    border: 0;
    padding: 7px 3px;
}

#web2py_user_form .form-control,
#web2py_user_form input[type="text"],
#web2py_user_form input[type="password"],
#web2py_user_form input[type="email"] {
    width: 100% !important;
}

#web2py_user_form .btn-primary {
    width: 100%;
    margin-top: 10px;
    font-size: 1rem;
}

#web2py_user_form > a {
    display: inline-block;
    margin-top: 18px;
    font-weight: 600;
    font-size: .92rem;
}

/* ---------- cards / panels ---------- */

.card,
.panel,
.well {
    background: white;
    border: 1px solid var(--ba-silver-200);
    border-radius: var(--ba-radius);
    box-shadow: var(--ba-shadow-sm);
}

/* ---------- tables ---------- */

.table {
    background: white;
    border-radius: var(--ba-radius);
    overflow: hidden;
}

.table thead th {
    color: #42576a;
    background: var(--ba-silver-100);
    border-top: 0;
    border-bottom: 1px solid var(--ba-silver-300);
    font-size: .88rem;
    font-weight: 700;
}

.table td {
    border-top: 1px solid #edf1f4;
    vertical-align: middle;
}

.table-hover tbody tr:hover {
    background: #f6fbfe;
}

/* ---------- footer ---------- */

.footer {
    min-height: 56px;
    padding: 17px 30px;
    background: white;
    border-top: 1px solid var(--ba-silver-200);
    color: var(--ba-muted);
    font-size: .88rem;
}

#poweredBy {
    opacity: .55;
}

/* ---------- mobile ---------- */

@media (max-width: 991px) {
    .navbar {
        padding-left: 16px;
        padding-right: 16px;
    }

    .navbar-brand,
    .bioacces-link {
        font-size: 1.45rem !important;
    }

    .main-container {
        padding: 24px 16px 38px;
    }

    #web2py_user_form {
        padding: 30px 24px 27px !important;
    }

    .navbar-collapse {
        padding-top: 12px;
    }
}

@media (max-width: 575px) {
    .navbar-brand img {
        width: 42px !important;
        height: 42px !important;
    }

    .main-container {
        padding-top: 18px;
    }

    #web2py_user_form {
        border-radius: 16px !important;
    }
}

/* =========================================================
   BIOACCES TYPOGRAPHY — XSPACE
   ========================================================= */

.navbar-brand,
.bioacces-link,
.navbar .nav-link,
.navbar .dropdown-item,
h1, h2, h3, h4, h5, h6,
.btn {
    font-family: 'XSpace', "Segoe UI", Arial, sans-serif !important;
}

.navbar-brand,
.bioacces-link {
    letter-spacing: .01em;
}

h1, h2, h3 {
    letter-spacing: .015em;
}

.btn {
    letter-spacing: .02em;
}

/* Body/data text remains optimized for readability */
body,
input,
select,
textarea,
table,
.form-control,
label,
small,
p {
    font-family: "Segoe UI", Arial, sans-serif;
}

/* =========================================================
   BIOACCES UI V4 — AUTH PRODUCT SHELL
   ========================================================= */

/* XSpace doar pentru identitate */
.navbar .nav-link,
.navbar .dropdown-item,
.btn,
#web2py_user_form h2 {
    font-family: "Segoe UI", Arial, sans-serif !important;
    letter-spacing: 0 !important;
}

.ba-brand-title,
.navbar-brand,
.bioacces-link {
    font-family: 'XSpace', "Segoe UI", sans-serif !important;
}

/* Login page */
.ba-auth-page {
    width: 100%;
    min-height: calc(100vh - 76px);
    display: grid;
    grid-template-columns: minmax(360px, 46%) 1fr;
    background: #f5f8fb;
}

.ba-auth-brand {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    padding: 70px 9%;
    color: #fff;
    background:
        radial-gradient(circle at 80% 20%, rgba(31,181,236,.30), transparent 28%),
        linear-gradient(145deg, #051d36 0%, #073c68 58%, #096c9f 100%);
}

.ba-auth-brand::after {
    content: "";
    position: absolute;
    width: 520px;
    height: 520px;
    right: -300px;
    bottom: -250px;
    border: 2px solid rgba(255,255,255,.14);
    border-radius: 50%;
    box-shadow:
        0 0 0 35px rgba(255,255,255,.035),
        0 0 0 75px rgba(255,255,255,.025);
}

.ba-auth-brand-inner {
    position: relative;
    z-index: 2;
    max-width: 520px;
}

.ba-brand-title {
    font-size: clamp(34px, 4vw, 58px);
    line-height: 1;
    margin: 0 0 22px;
    font-weight: 400;
    color: #fff;
}

.ba-auth-brand h1 {
    margin: 0 0 18px;
    max-width: 520px;
    color: #fff;
    font-size: clamp(28px, 3vw, 46px);
    line-height: 1.12;
    letter-spacing: -.035em;
}

.ba-auth-brand p {
    max-width: 500px;
    margin: 0;
    color: rgba(255,255,255,.82);
    font-size: 17px;
    line-height: 1.65;
}

.ba-auth-features {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 32px;
}

.ba-auth-feature {
    padding: 8px 12px;
    border: 1px solid rgba(255,255,255,.20);
    border-radius: 7px;
    background: rgba(255,255,255,.07);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
}

/* right side */
.ba-auth-login {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 55px 8%;
}

.ba-auth-login-inner {
    width: 100%;
    max-width: 430px;
}

.ba-auth-kicker {
    color: #087db6;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .12em;
    margin-bottom: 9px;
}

.ba-auth-login-title {
    color: #052d4d;
    font-size: 31px;
    font-weight: 750;
    letter-spacing: -.03em;
    margin: 0 0 7px;
}

.ba-auth-login-subtitle {
    color: #718292;
    margin: 0 0 30px;
}

#web2py_user_form {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

#web2py_user_form h2 {
    display: none;
}

#web2py_user_form table {
    width: 100%;
}

#web2py_user_form table td {
    padding: 7px 0;
    border: 0;
}

#web2py_user_form table td:first-child {
    width: 120px;
    padding-right: 18px;
}

#web2py_user_form input[type="text"],
#web2py_user_form input[type="password"],
#web2py_user_form input[type="email"] {
    width: 100% !important;
    min-height: 49px;
    border: 1px solid #c5d2dc;
    border-radius: 8px;
}

#web2py_user_form .btn-primary {
    width: 100%;
    min-height: 49px;
    margin-top: 16px;
    border-radius: 8px;
    background: linear-gradient(90deg,#087eb7,#08a8df) !important;
    font-size: 15px;
}

#web2py_user_form > a {
    margin-top: 22px;
    color: #087eb7;
    font-weight: 600;
}

/* auth page doesn't need old footer */
body.ba-auth-body .footer {
    display: none;
}

@media (max-width: 850px) {
    .ba-auth-page {
        grid-template-columns: 1fr;
    }

    .ba-auth-brand {
        min-height: 230px;
        padding: 38px 28px;
    }

    .ba-auth-brand h1 {
        font-size: 30px;
    }

    .ba-auth-brand p {
        display: none;
    }

    .ba-auth-login {
        padding: 42px 24px 55px;
    }
}

/* translated product title */
.ba-auth-brand h1 {
    max-width: 560px;
}

/* ===== BIOACCES APP PRODUCT IDENTITY ===== */

.ba-auth-logo {
    display: block;
    width: 210px;
    max-width: 70%;
    height: auto;
    margin: 0 0 28px;
}

.ba-auth-product {
    margin-bottom: 12px;
    color: #ffffff;
    font-family: 'XSpace', "Segoe UI", sans-serif;
    font-size: 25px;
    letter-spacing: .08em;
}

.ba-auth-brand h1 {
    max-width: 540px;
    margin: 0 0 18px;
    color: #ffffff;
    font-family: "Segoe UI", Arial, sans-serif !important;
    font-size: 38px;
    line-height: 1.12;
    font-weight: 750;
    letter-spacing: -.035em;
}

.ba-auth-brand p {
    max-width: 520px;
    font-size: 17px;
    line-height: 1.65;
}

/* Header: new logo, no old icon + giant XSpace word */
.navbar-brand img {
    width: auto !important;
    height: 62px !important;
}

.navbar-brand,
.bioacces-link {
    font-size: 0 !important;
}

/* normal UI typography */
.navbar .nav-link,
.navbar .dropdown-item,
.btn,
label,
input,
select,
textarea {
    font-family: "Segoe UI", Arial, sans-serif !important;
    letter-spacing: 0 !important;
}

/* =========================================================
   BIOACCES APP — MOBILE V1
   ========================================================= */

@media (max-width: 767px) {

    html, body {
        width: 100%;
        overflow-x: hidden;
    }

    body:has(#web2py_user_form) .main-container {
        padding: 0 !important;
        min-height: auto;
        display: block;
    }

    /* HEADER */
    body:has(#web2py_user_form) .navbar {
        min-height: 64px;
        padding: 7px 12px;
    }

    body:has(#web2py_user_form) .navbar-brand {
        margin-right: 8px !important;
    }

    body:has(#web2py_user_form) .navbar-brand img {
        height: 48px !important;
        width: auto !important;
    }

    /* login page does not need Home / Logout clutter on mobile */
    body:has(#web2py_user_form)
    #navbarNavDropdown > ul.navbar-nav.w-100.justify-content-center {
        display: none !important;
    }

    body:has(#web2py_user_form) .navbar-collapse {
        padding-top: 6px;
    }

    body:has(#web2py_user_form) #lang-selector {
        margin-left: auto;
    }

    /* PAGE */
    .ba-auth-page {
        display: block !important;
        width: 100%;
        min-height: auto;
    }

    /* BRAND PANEL */
    .ba-auth-brand {
        min-height: 0 !important;
        padding: 24px 22px 26px !important;
        display: block;
    }

    .ba-auth-brand-inner {
        max-width: none;
    }

    .ba-auth-logo {
        width: 118px !important;
        max-width: none !important;
        margin: 0 0 14px !important;
    }

    .ba-auth-product {
        margin: 0 0 7px;
        font-size: 17px;
        letter-spacing: .055em;
    }

    .ba-auth-brand h1 {
        margin: 0 0 10px;
        max-width: none;
        font-size: 25px !important;
        line-height: 1.12;
    }

    .ba-auth-brand p {
        margin: 0;
        max-width: none;
        font-size: 14px;
        line-height: 1.5;
    }

    .ba-auth-features {
        gap: 6px;
        margin-top: 16px;
    }

    .ba-auth-feature {
        padding: 6px 9px;
        font-size: 11px;
    }

    .ba-auth-brand::after {
        width: 280px;
        height: 280px;
        right: -170px;
        bottom: -170px;
    }

    /* LOGIN */
    .ba-auth-login {
        display: block;
        padding: 28px 20px 38px !important;
        background: #f5f8fb;
    }

    .ba-auth-login-inner {
        width: 100%;
        max-width: none;
        margin: 0 auto;
    }

    .ba-auth-kicker {
        margin-bottom: 5px;
        font-size: 11px;
    }

    .ba-auth-login-title {
        margin-bottom: 4px;
        font-size: 25px;
    }

    .ba-auth-login-subtitle {
        margin-bottom: 22px;
        font-size: 14px;
    }

    #web2py_user_form table,
    #web2py_user_form tbody,
    #web2py_user_form tr,
    #web2py_user_form td {
        display: block;
        width: 100% !important;
    }

    #web2py_user_form table td:first-child {
        width: 100% !important;
        padding: 8px 0 5px !important;
    }

    #web2py_user_form table td:last-child {
        padding: 0 0 6px !important;
    }

    #web2py_user_form input[type="text"],
    #web2py_user_form input[type="password"],
    #web2py_user_form input[type="email"],
    #web2py_user_form .form-control {
        width: 100% !important;
        min-height: 48px;
        font-size: 16px; /* prevents mobile browser zoom */
    }

    #web2py_user_form .btn-primary {
        width: 100%;
        min-height: 50px;
        margin-top: 12px;
    }

    #web2py_user_form > a {
        display: inline-block;
        margin-top: 18px;
    }
}

@media (max-width: 390px) {

    .ba-auth-brand {
        padding-left: 17px !important;
        padding-right: 17px !important;
    }

    .ba-auth-login {
        padding-left: 17px !important;
        padding-right: 17px !important;
    }

    .ba-auth-brand h1 {
        font-size: 23px !important;
    }

    .ba-auth-feature {
        font-size: 10px;
    }
}

/* =========================================================
   BIOACCES LANGUAGE SELECTOR V1
   ========================================================= */

#lang-selector .nav-link {
    display: flex;
    align-items: center;
    gap: 7px;
}

.ba-lang-code {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 29px;
    height: 22px;
    padding: 0 5px;
    border-radius: 5px;
    background: #e9f3f8;
    color: #086f9f;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .04em;
}

.ba-lang-name {
    white-space: nowrap;
}

#lang-selector .dropdown-menu {
    max-height: 420px;
    overflow-y: auto;
    min-width: 190px;
}

#lang-selector .dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* =========================================================
   BIOACCES — SIMPLE LOGIN FINAL
   ========================================================= */

.ba-login-page {
    width: 100%;
    min-height: calc(100vh - 75px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 35px 20px 60px;
    background: #f4f8fb;
}

.ba-login-box {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
}

.ba-login-logo {
    display: block;
    width: 150px;
    height: auto;
    margin: 0 auto 18px;
}

.ba-login-product {
    text-align: center;
    font-family: 'XSpace', "Segoe UI", Arial, sans-serif;
    font-size: 24px;
    line-height: 1.1;
    letter-spacing: .055em;
    color: #072e50;
}

.ba-login-description {
    margin: 7px 0 25px;
    text-align: center;
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #667b8c;
}

.ba-login-box #web2py_user_form {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 29px 32px 27px !important;
    background: #fff !important;
    border: 1px solid #d8e2e9 !important;
    border-radius: 12px !important;
    box-shadow: 0 12px 35px rgba(0,39,68,.08) !important;
}

.ba-login-box #web2py_user_form table {
    width: 100%;
}

.ba-login-box #web2py_user_form td {
    border: 0 !important;
    padding: 7px 0 !important;
}

.ba-login-box #web2py_user_form td:first-child {
    width: 115px;
    padding-right: 14px !important;
}

.ba-login-box input[type="text"],
.ba-login-box input[type="password"],
.ba-login-box input[type="email"] {
    width: 100% !important;
    min-height: 46px;
    border: 1px solid #c6d3dc;
    border-radius: 7px;
    font-family: "Segoe UI", Arial, sans-serif !important;
}

.ba-login-box .btn-primary {
    width: 100%;
    min-height: 48px;
    margin-top: 10px;
    border: 0 !important;
    border-radius: 7px;
    font-family: "Segoe UI", Arial, sans-serif !important;
    font-weight: 700;
}

.ba-forgot {
    display: inline-block;
    margin-top: 17px;
}

@media (max-width: 600px) {

    .ba-login-page {
        min-height: auto;
        padding: 25px 17px 42px;
    }

    .ba-login-logo {
        width: 112px;
        margin-bottom: 13px;
    }

    .ba-login-product {
        font-size: 20px;
    }

    .ba-login-description {
        margin: 5px 0 19px;
        font-size: 14px;
    }

    .ba-login-box #web2py_user_form {
        padding: 22px 19px 23px !important;
    }

    .ba-login-box #web2py_user_form table,
    .ba-login-box #web2py_user_form tbody,
    .ba-login-box #web2py_user_form tr,
    .ba-login-box #web2py_user_form td {
        display: block;
        width: 100% !important;
    }

    .ba-login-box #web2py_user_form td:first-child {
        padding: 7px 0 4px !important;
    }

    .ba-login-box #web2py_user_form td:last-child {
        padding: 0 0 5px !important;
    }

    .ba-login-box input[type="text"],
    .ba-login-box input[type="password"],
    .ba-login-box input[type="email"] {
        min-height: 48px;
        font-size: 16px;
    }
}

/* =========================================================
   BIOACCES TIME — LOGIN FINAL V1
   ========================================================= */

/* Never expose framework branding */
#poweredBy {
    display: none !important;
}

/* Login header: one logo only — the central product logo */
body:has(.ba-login-page) .navbar-brand {
    display: none !important;
}

/* Home / Logout / Login are irrelevant on the login screen */
body:has(.ba-login-page) .navbar a[href*="/default/index"],
body:has(.ba-login-page) .navbar a[href*="/default/user/logout"],
body:has(.ba-login-page) .navbar a[href*="/default/user/login"] {
    display: none !important;
}

/* Global footer is replaced by the compact login footer */
body:has(.ba-login-page) footer {
    display: none !important;
}

.ba-login-page {
    box-sizing: border-box;
    width: 100%;
    min-height: calc(100dvh - 66px);

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    padding: 24px 18px 18px;

    background:
        radial-gradient(
            circle at 50% 22%,
            rgba(8, 169, 223, .09) 0,
            rgba(8, 169, 223, .035) 24%,
            transparent 48%
        ),
        #f4f8fb;
}

.ba-login-box {
    width: 100%;
    max-width: 400px;
    margin: auto 0;
}

.ba-login-logo {
    display: block;
    width: 135px !important;
    height: auto !important;
    margin: 0 auto 15px !important;
}

.ba-login-product {
    margin: 0 0 22px;

    text-align: center;
    color: #062f50;

    font-family: 'XSpace', "Segoe UI", Arial, sans-serif;
    font-size: 22px !important;
    line-height: 1.15;
    letter-spacing: .055em;
}

.ba-login-description {
    display: none !important;
}

.ba-login-box #web2py_user_form {
    width: 100% !important;
    max-width: none !important;

    margin: 0 !important;
    padding: 25px 28px 24px !important;

    background: #fff !important;
    border: 1px solid #d7e2e9 !important;
    border-radius: 12px !important;

    box-shadow:
        0 14px 38px rgba(1, 44, 73, .085) !important;
}

.ba-login-box #web2py_user_form table {
    width: 100% !important;
}

.ba-login-box #web2py_user_form td {
    border: 0 !important;
    padding: 6px 0 !important;
}

.ba-login-box #web2py_user_form td:first-child {
    width: 105px !important;
    padding-right: 12px !important;

    color: #29455c;
    font-size: 14px;
    font-weight: 600;
}

.ba-login-box input[type="text"],
.ba-login-box input[type="password"],
.ba-login-box input[type="email"] {
    width: 100% !important;
    min-height: 43px !important;

    border: 1px solid #c5d3dd !important;
    border-radius: 7px !important;

    font-family: "Segoe UI", Arial, sans-serif !important;
}

.ba-login-box .btn-primary {
    width: 100% !important;
    min-height: 45px !important;

    margin-top: 9px !important;

    border: 0 !important;
    border-radius: 7px !important;

    font-family: "Segoe UI", Arial, sans-serif !important;
    font-weight: 700 !important;
}

.ba-forgot {
    display: inline-block;
    margin-top: 15px !important;
    font-size: 14px;
}

.ba-login-footer {
    flex: 0 0 auto;

    padding: 15px 0 3px;

    color: #8193a1;
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 12px;
    text-align: center;
}


/* ---------------- MOBILE ---------------- */

@media (max-width: 600px) {

    body:has(.ba-login-page) .navbar {
        min-height: 54px !important;
        padding-top: 4px !important;
        padding-bottom: 4px !important;
    }

    .ba-login-page {
        min-height: calc(100dvh - 54px);
        justify-content: flex-start;

        padding: 15px 16px 10px;
    }

    .ba-login-box {
        max-width: none;
        margin: 0;
    }

    .ba-login-logo {
        width: 88px !important;
        margin: 0 auto 9px !important;
    }

    .ba-login-product {
        margin-bottom: 14px !important;
        font-size: 17px !important;
        line-height: 1.1;
    }

    .ba-login-box #web2py_user_form {
        padding: 18px 18px 19px !important;
        border-radius: 10px !important;
    }

    .ba-login-box #web2py_user_form table,
    .ba-login-box #web2py_user_form tbody,
    .ba-login-box #web2py_user_form tr,
    .ba-login-box #web2py_user_form td {
        display: block;
        width: 100% !important;
    }

    .ba-login-box #web2py_user_form td:first-child {
        padding: 4px 0 3px !important;
        font-size: 14px !important;
    }

    .ba-login-box #web2py_user_form td:last-child {
        padding: 0 0 4px !important;
    }

    .ba-login-box input[type="text"],
    .ba-login-box input[type="password"],
    .ba-login-box input[type="email"] {
        min-height: 42px !important;
        font-size: 16px !important;
    }

    .ba-login-box .btn-primary {
        min-height: 44px !important;
        margin-top: 6px !important;
    }

    .ba-forgot {
        margin-top: 12px !important;
        font-size: 13px !important;
    }

    .ba-login-footer {
        margin-top: auto;
        padding: 12px 0 2px;
        font-size: 11px;
    }
}

/* =========================================================
   BIOACCES TIME — MOBILE COMPACT FINAL
   ========================================================= */

@media (max-width: 700px) {

    .ba-login-page {
        min-height: calc(100dvh - 44px) !important;
        padding: 6px 12px 8px !important;
    }

    .ba-login-brand {
        padding: 3px 0 7px !important;
    }

    .ba-login-logo {
        width: 62px !important;
        margin: 0 auto 4px !important;
    }

    .ba-login-product {
        margin: 0 0 8px !important;
        font-size: 14px !important;
        line-height: 1.05 !important;
    }

    .ba-login-formpane #web2py_user_form {
        padding: 10px 13px 11px !important;
        border-radius: 9px !important;
    }

    .ba-login-formpane #web2py_user_form td:first-child {
        padding: 2px 0 2px !important;
        font-size: 12px !important;
        line-height: 1.2 !important;
    }

    .ba-login-formpane #web2py_user_form td:last-child {
        padding: 0 0 2px !important;
    }

    .ba-login-formpane input[type="text"],
    .ba-login-formpane input[type="password"],
    .ba-login-formpane input[type="email"] {
        min-height: 38px !important;
        height: 38px !important;
        padding: 5px 8px !important;
        font-size: 16px !important;
        border-radius: 7px !important;
    }

    .ba-login-formpane input[type="checkbox"] {
        margin-top: 2px !important;
        margin-bottom: 2px !important;
    }

    .ba-login-formpane label {
        margin-bottom: 2px !important;
    }

    .ba-login-formpane .btn-primary {
        min-height: 39px !important;
        height: 39px !important;
        margin-top: 3px !important;
        padding: 5px 10px !important;
        font-size: 14px !important;
    }

    .ba-forgot {
        margin-top: 6px !important;
        font-size: 11px !important;
    }

    .ba-login-footer {
        display: none !important;
    }
}

/* BIOACCES TIME — final brand proportions */

.ba-login-logo {
    width: 165px !important;
    margin-bottom: 18px !important;
}

.ba-login-product {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    gap: 2px;

    font-size: 23px !important;
    line-height: 1.05 !important;
    letter-spacing: .075em !important;
}

.ba-login-product span {
    display: block;
}

@media (max-width: 700px) {

    .ba-login-logo {
        width: 102px !important;
        margin-bottom: 9px !important;
    }

    .ba-login-product {
        font-size: 18px !important;
        line-height: 1.02 !important;
        gap: 1px;
        margin-bottom: 12px !important;
    }
}

/* =========================================================
   BIOACCES TIME — LOGIN LANGUAGE BAR
   Hamburger stays inside app, never on login
   ========================================================= */

body:has(.ba-login-page) .navbar-toggler,
body:has(.ba-login-page) button.navbar-toggler {
    display: none !important;
}

/* Always expose the navbar language area on login */
body:has(.ba-login-page) .navbar-collapse,
body:has(.ba-login-page) #navbarNavDropdown {
    display: flex !important;
    visibility: visible !important;
    flex-basis: 100% !important;
    width: 100% !important;
    justify-content: center !important;
}

/* Hide normal login-page navigation */
body:has(.ba-login-page)
#navbarNavDropdown > ul.navbar-nav.w-100.justify-content-center {
    display: none !important;
}

/* Language dropdown trigger is no longer necessary */
body:has(.ba-login-page) #lang-selector > .nav-link,
body:has(.ba-login-page) #lang-selector .dropdown-toggle {
    display: none !important;
}

/* Turn the dropdown itself into a permanent language bar */
body:has(.ba-login-page) #lang-selector {
    display: block !important;
    position: static !important;
    margin: 0 auto !important;
}

body:has(.ba-login-page) #lang-selector .dropdown-menu {
    position: static !important;
    transform: none !important;

    display: flex !important;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;

    width: auto !important;
    min-width: 0 !important;
    max-height: none !important;

    margin: 0 !important;
    padding: 6px !important;

    overflow: visible !important;

    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* Individual language */
body:has(.ba-login-page) #lang-selector .dropdown-item {
    display: inline-flex !important;
    width: auto !important;

    align-items: center;
    justify-content: center;

    margin: 2px 3px !important;
    padding: 5px 7px !important;

    border-radius: 6px;

    background: transparent;
    color: #455f73;

    font-size: 11px !important;
    font-weight: 700;
    line-height: 1;

    text-decoration: none;
}

body:has(.ba-login-page) #lang-selector .dropdown-item:hover {
    background: #e3f1f7 !important;
    color: #087cad !important;
}

/* On login we only need the compact language code */
body:has(.ba-login-page) #lang-selector .ba-lang-code {
    min-width: 27px;
    height: 22px;

    background: #e7f3f8;
    color: #087da9;

    font-size: 10px;
}

body:has(.ba-login-page) #lang-selector .ba-lang-name {
    display: none !important;
}


/* MOBILE — all languages visible in compact rows */
@media (max-width: 700px) {

    body:has(.ba-login-page) .navbar {
        height: auto !important;
        min-height: 43px !important;
        padding: 3px 7px !important;
    }

    body:has(.ba-login-page) #lang-selector .dropdown-menu {
        padding: 3px 2px !important;
    }

    body:has(.ba-login-page) #lang-selector .dropdown-item {
        margin: 1px 2px !important;
        padding: 3px 3px !important;
    }

    body:has(.ba-login-page) #lang-selector .ba-lang-code {
        min-width: 25px;
        height: 20px;
        padding: 0 3px;
        font-size: 9px;
    }
}
