/* ==========================================================================
   Login + Register - ERP navy theme (#14244A). Scoped to body.auth-do.
   Layout: navy brand panel (left) + white form card (right). Form markup,
   names, ids and scripts are the original ones.
   ========================================================================== */
body.auth-do {
    --au-primary: #14244a;
    --au-primary-dark: #0c1733;
    --au-soft: #eef1f7;
    --au-ink: #1f2633;
    --au-ink-soft: #454b55;
    --au-muted: #767d8b;
    --au-border: #e2e6ed;
    --au-input: #cdd2d8;
    margin: 0;
    background: #f4f6fa !important;
    color: var(--au-ink);
    font-family: -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}
body.auth-do :is(h1, h2, h3, p, label, input, select, button, a, span, div, li, small, b) { font-family: inherit; }

.auth-shell { display: grid; grid-template-columns: minmax(380px, 44%) minmax(0, 1fr); min-height: 100vh; }

/* ---------- brand panel ---------- */
.auth-brand {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    padding: 56px 56px 48px;
    background: linear-gradient(155deg, #1a2d5c 0%, #14244a 45%, #0c1733 100%);
    color: #fff;
}
.auth-brand::before,
.auth-brand::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; }
.auth-brand::before { width: 520px; height: 520px; right: -220px; top: -180px; background: radial-gradient(circle, rgba(255, 255, 255, .09) 0%, rgba(255, 255, 255, 0) 65%); }
.auth-brand::after { width: 420px; height: 420px; left: -160px; bottom: -200px; background: radial-gradient(circle, rgba(120, 150, 230, .16) 0%, rgba(120, 150, 230, 0) 65%); }
.auth-brand-inner { position: relative; z-index: 1; max-width: 480px; }
.auth-badge {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 12px; margin-bottom: 22px;
    border: 1px solid rgba(255, 255, 255, .18); border-radius: 999px;
    background: rgba(255, 255, 255, .08);
    font-size: 12px; font-weight: 600; letter-spacing: .02em; color: #dfe6f7;
}
body.auth-do .auth-badge .fa { color: #aebde6 !important; }
.auth-brand h2 { margin: 0 0 14px; font-size: 34px; line-height: 1.22; font-weight: 600; letter-spacing: -.01em; color: #fff; }
.auth-brand h2 span { color: #a9bcf0; }
.auth-lead { margin: 0 0 30px; font-size: 15px; line-height: 1.65; color: rgba(255, 255, 255, .76); }
.auth-features { list-style: none; margin: 0 0 30px; padding: 0; display: grid; gap: 14px; }
.auth-features li { display: flex; align-items: flex-start; gap: 14px; }
.auth-ico {
    flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; border-radius: 10px;
    background: rgba(255, 255, 255, .09); border: 1px solid rgba(255, 255, 255, .12);
}
body.auth-do .auth-ico .fa { color: #dbe3f8 !important; font-size: 15px; }
.auth-features b { display: block; margin: 1px 0 2px; font-size: 14px; font-weight: 600; color: #fff; }
.auth-features small { display: block; font-size: 12.5px; line-height: 1.45; color: rgba(255, 255, 255, .62); }
.auth-trust { display: flex; align-items: center; gap: 8px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .12); font-size: 12.5px; color: rgba(255, 255, 255, .62); }
body.auth-do .auth-trust .fa { color: #aebde6 !important; }

/* ---------- form panel ---------- */
.auth-main { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 24px 24px; }
.auth-card {
    width: 100%; max-width: 440px;
    padding: 34px 34px 28px;
    background: #fff;
    border: 1px solid var(--au-border);
    border-radius: 16px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 18px 40px -18px rgba(16, 24, 40, .18);
}
.auth-card.auth-card-wide { max-width: 600px; }
.auth-foot { margin-top: 18px; font-size: 12px; color: var(--au-muted); }

/* old login.css boxes become plain content of the card */
body.auth-do .auth-card .logo { margin: 0 0 22px !important; padding: 0; text-align: left; }
body.auth-do .auth-card .logo img { max-height: 46px !important; width: auto; }
body.auth-do .auth-card .content,
body.auth-do .auth-card #registerForm,
body.auth-do .auth-card section.content {
    width: auto !important; max-width: none !important; margin: 0 !important; padding: 0 !important;
    background: transparent !important; box-shadow: none !important; border-radius: 0 !important; overflow: visible !important;
}
body.auth-do .auth-card .login-form > div,
body.auth-do .auth-card .login-form .form-group[class*="col-"] { float: none; width: auto; padding: 0; }
body.auth-do .auth-card .row { margin-left: -6px; margin-right: -6px; }
body.auth-do .auth-card .row > [class*="col-"] { padding-left: 6px; padding-right: 6px; }

.auth-form-head { margin: 0 0 22px; }
.auth-form-head h1 { margin: 0 0 6px; font-size: 24px; font-weight: 600; letter-spacing: -.01em; color: var(--au-ink); }
.auth-form-head p { margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--au-muted); }
.auth-form-head p b { color: var(--au-primary); font-weight: 600; }

/* fields */
body.auth-do .auth-card .form-group { margin-bottom: 14px; }
body.auth-do .auth-card .control-label:not(.visible-ie8) { display: block; margin: 0 0 6px; font-size: 13px; font-weight: 500; color: var(--au-ink-soft); }
body.auth-do .auth-card .form-control {
    height: 44px; padding: 0 14px;
    background: #fff !important; color: var(--au-ink) !important;
    border: 1px solid var(--au-input) !important; border-radius: 8px !important;
    font-size: 14px; box-shadow: none !important;
    transition: border-color .15s ease, box-shadow .15s ease;
}
body.auth-do .auth-card .form-control::placeholder { color: #9aa1ad; }
body.auth-do .auth-card .form-control:focus { border-color: var(--au-primary) !important; box-shadow: 0 0 0 3px rgba(20, 36, 74, .12) !important; outline: 0; }
body.auth-do .auth-card .form-control[readonly] { background: #f7f8fb !important; color: var(--au-ink-soft) !important; }
body.auth-do .auth-card select.form-control { padding-right: 34px; }
body.auth-do .auth-card input:-webkit-autofill,
body.auth-do .auth-card input:-webkit-autofill:hover,
body.auth-do .auth-card input:-webkit-autofill:focus { -webkit-text-fill-color: var(--au-ink); -webkit-box-shadow: 0 0 0 40px #fff inset !important; transition: background-color 9999s ease-out 0s; }
body.auth-do .auth-card .has-error .form-control { border-color: #d23c3c !important; }

/* password eye + warning icons */
body.auth-do .auth-card .input-icon { position: relative; }
body.auth-do .auth-card .input-icon > i.fa { position: absolute; right: 14px; top: 50%; margin: 0; transform: translateY(-50%); z-index: 3; }
body.auth-do .auth-card .input-icon > i.fa-warning { color: #d23c3c !important; right: 40px; }
body.auth-do .auth-card #showPassword,
body.auth-do .auth-card #showrPassword {
    position: absolute; right: 6px; top: 50%; z-index: 4;
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; margin: 0; transform: translateY(-50%);
    border-radius: 6px; cursor: pointer;
}
body.auth-do .auth-card #showPassword:hover,
body.auth-do .auth-card #showrPassword:hover { background: var(--au-soft); }
body.auth-do .auth-card #showPassword .fa,
body.auth-do .auth-card #showrPassword .fa { position: static; transform: none; color: var(--au-muted) !important; }
body.auth-do .auth-card #password,
body.auth-do .auth-card #rpassword { padding-right: 44px; }

/* remember me */
body.auth-do .auth-card .auth-remember { display: inline-flex; align-items: center; gap: 8px; margin: 2px 0 6px; font-size: 13px; font-weight: 500; color: var(--au-ink-soft); cursor: pointer; }
body.auth-do .auth-card .auth-remember .checker { margin: 0 !important; }

/* primary button */
body.auth-do .auth-card #login-btn,
body.auth-do .auth-card #reg-now-btn1,
body.auth-do .auth-card .auth-submit {
    height: 46px; margin-top: 4px;
    background: var(--au-primary) !important; border: 1px solid var(--au-primary) !important; border-radius: 8px !important;
    color: #fff !important; font-size: 15px; font-weight: 600; letter-spacing: .01em; text-transform: none;
    box-shadow: 0 6px 16px -8px rgba(20, 36, 74, .55);
    transition: background .15s ease, transform .15s ease;
}
body.auth-do .auth-card #login-btn:hover,
body.auth-do .auth-card #reg-now-btn1:hover,
body.auth-do .auth-card .auth-submit:hover { background: var(--au-primary-dark) !important; border-color: var(--au-primary-dark) !important; }
body.auth-do .auth-card #login-btn:active,
body.auth-do .auth-card #reg-now-btn1:active,
body.auth-do .auth-card .auth-submit:active { transform: translateY(1px); }

.auth-switch { margin-top: 18px; text-align: center; font-size: 13.5px; color: var(--au-muted); }
body.auth-do .auth-switch a { color: var(--au-primary); font-weight: 600; text-decoration: none; }
body.auth-do .auth-switch a:hover { text-decoration: underline; }
/* auth pages keep their own footer line under the card; hide the app footer bar layout.footer prints */
body.auth-do .page-footer.ce-footer { display: none !important; }
body.auth-do .auth-card #forget-password { color: var(--au-primary); font-size: 13px; font-weight: 600; text-decoration: none; }
body.auth-do .auth-card #forget-password:hover { text-decoration: underline; }

/* alerts */
body.auth-do .auth-card .alert { margin: 0 0 16px; padding: 10px 14px; border-radius: 8px; font-size: 13px; }
body.auth-do .auth-card .alert-danger { background: #fdeeee; border: 1px solid #f6cfcf; color: #b42318; }
body.auth-do .auth-card .alert-success { background: #ecf8f0; border: 1px solid #cbead5; color: #1f8a4c; }

/* register: password strength bar + captcha */
body.auth-register .auth-card .progress { height: 6px; margin: -2px 0 16px; border-radius: 999px; background: #eceff4; box-shadow: none; }
body.auth-register .auth-card .progress-bar { border-radius: 999px; box-shadow: none; }
body.auth-register .auth-card .row.auth-captcha { margin: 4px 0 14px; padding: 14px 12px; background: #f7f8fb; border: 1px dashed #d5dbe6; border-radius: 10px; }
body.auth-register .auth-card .row.auth-captcha > .col-md-12:first-child { margin-bottom: 8px; font-size: 13px; font-weight: 500; color: var(--au-ink-soft); }
body.auth-register .auth-card .row.auth-captcha .form-group { margin: 0; }
body.auth-register .auth-card .auth-captcha img { border-radius: 6px; }
body.auth-register .auth-card .row.auth-captcha input[type="text"] { height: 38px; border: 1px solid var(--au-input); border-radius: 6px; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
    .auth-brand { padding: 44px 36px; }
    .auth-brand h2 { font-size: 28px; }
}
@media (max-width: 991px) {
    .auth-shell { grid-template-columns: minmax(0, 1fr); }
    .auth-brand { padding: 32px 24px 28px; }
    .auth-brand-inner { max-width: 640px; margin: 0 auto; }
    .auth-brand h2 { font-size: 24px; }
    .auth-lead { margin-bottom: 18px; font-size: 14px; }
    .auth-features { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; margin-bottom: 18px; }
    .auth-main { padding: 28px 16px 20px; }
}
@media (max-width: 600px) {
    .auth-features, .auth-trust { display: none; }
    .auth-lead { margin-bottom: 0; }
    .auth-card { padding: 26px 20px 22px; border-radius: 14px; }
    body.auth-do .auth-card .row > [class*="col-md-6"] { width: 100%; }
}

/* captcha (row marked .auth-captcha in the blade): the package box is neutral, input lined up with the image */
body.auth-register .auth-card .row.auth-captcha .captcha { width: 100% !important; max-width: 280px; padding: 0 !important; background: transparent !important; }
body.auth-register .auth-card .row.auth-captcha .captcha img { display: block; width: 100%; height: auto; margin-bottom: 8px; border: 1px solid var(--au-input); }
body.auth-register .auth-card .row.auth-captcha .captcha .input-group-btn .btn { height: 38px; border-color: var(--au-input); border-radius: 0 6px 6px 0; }
body.auth-register .auth-card .row.auth-captcha input:not(.has-error input) { border-color: var(--au-input) !important; box-shadow: none !important; }
body.auth-register .auth-card .row.auth-captcha input:focus { border-color: var(--au-primary) !important; box-shadow: 0 0 0 3px rgba(20, 36, 74, .12) !important; }
body.auth-register .auth-card input.form-control[name="captcha"] { height: 38px !important; border-color: var(--au-input) !important; border-radius: 6px !important; box-shadow: none !important; }
body.auth-register .auth-card input.form-control[name="captcha"]:focus { border-color: var(--au-primary) !important; box-shadow: 0 0 0 3px rgba(20, 36, 74, .12) !important; }
/* a wrong code (validation error) still shows red */
body.auth-register .auth-card .auth-captcha .has-error input.form-control[name="captcha"] { border-color: #d23c3c !important; }

/* ==========================================================================
   Round 2: labelled fields with icons, sectioned register form, card accent
   ========================================================================== */
.auth-card { position: relative; overflow: hidden; }
.auth-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: linear-gradient(90deg, #14244a 0%, #2c4a8f 55%, #6f8ed6 100%); }

/* labels above every field (the IE-only labels of the original markup) */
body.auth-do .auth-card .auth-field > .control-label.visible-ie8,
body.auth-do .auth-card .auth-field .control-label {
    display: block !important; margin: 0 0 6px; padding: 0;
    font-size: 12.5px; font-weight: 600; letter-spacing: .01em; color: var(--au-ink-soft);
}
body.auth-do .auth-card .control-label .required { color: #d23c3c; margin-left: 2px; }

/* leading icon inside the input */
body.auth-do .auth-card .auth-field { position: relative; }
body.auth-do .auth-card .auth-field .auth-field-ico {
    position: absolute; left: 14px; right: auto !important; z-index: 3;
    width: 16px; margin: 0 !important; text-align: center;
    font-size: 14px; color: #8a92a0 !important; pointer-events: none;
    transform: translateY(-50%); transition: color .15s ease;
}
body.auth-do .auth-card .input-icon > .auth-field-ico { top: 50%; }
body.auth-do .auth-card .auth-field > .auth-field-ico { top: calc(25px + 22px); }
body.auth-do .auth-card .auth-field .form-control { padding-left: 40px; }
body.auth-do .auth-card .auth-field:focus-within .auth-field-ico { color: var(--au-primary) !important; }
body.auth-do .auth-card .auth-field select.form-control { padding-left: 38px; }

/* softer inputs: light fill that turns white on focus */
body.auth-do .auth-card .auth-field .form-control { background: #fafbfd !important; border-color: #d6dbe3 !important; }
body.auth-do .auth-card .auth-field .form-control:hover { border-color: #b9c1ce !important; }
body.auth-do .auth-card .auth-field .form-control:focus { background: #fff !important; border-color: var(--au-primary) !important; }
body.auth-do .auth-card .auth-field input:-webkit-autofill { -webkit-box-shadow: 0 0 0 40px #fafbfd inset !important; }

/* register sections */
body.auth-register .auth-section { display: flex; align-items: center; gap: 10px; margin: 6px 0 12px; }
body.auth-register .auth-section span { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--au-primary); white-space: nowrap; }
body.auth-register .auth-section::after { content: ""; flex: 1; height: 1px; background: var(--au-border); }
body.auth-register .auth-form-head + .alert + .register-form .auth-section:first-of-type,
body.auth-register .register-form > .auth-section:first-of-type { margin-top: 0; }

/* login: a little more room in the single-column card */
body.auth-login .auth-card { padding: 38px 38px 32px; }
body.auth-login .auth-form-head { margin-bottom: 24px; }
body.auth-login .auth-card #login-btn { margin-top: 10px; }
body.auth-do .auth-card .auth-field .control-label { height: 19px; line-height: 19px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* brand panel stays in view while the (long) register form scrolls; its text is centred in the screen */
@media (min-width: 992px) {
    .auth-brand { position: sticky; top: 0; height: 100vh; align-self: start; overflow: hidden; align-items: center; }
}
/* short screens: the panel scrolls with the page instead (no inner scrollbar, nothing cut off) */
@media (min-width: 992px) and (max-height: 720px) {
    .auth-brand { position: relative; height: auto; min-height: 100vh; align-self: stretch; }
}

/* Opsicode logo chip on the navy brand panel */
.auth-logo-chip { display: flex; align-items: center; gap: 12px; margin: 0 0 28px; }
.auth-logo-chip img { height: 52px; width: auto; display: block; }
.auth-logo-chip span { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: rgba(255, 255, 255, .72); }
@media (max-width: 991px) { .auth-logo-chip { margin-bottom: 18px; } .auth-logo-chip img { height: 42px; } }

/* ==========================================================================
   Split layout: navy covers most of the screen, the form card overlaps it by
   20% of its width (80% on the light side). Desktop only.
   ========================================================================== */
@media (min-width: 992px) {
    body.auth-do { --au-card: 440px; }
    body.auth-register { --au-card: 600px; }
    .auth-shell { grid-template-columns: minmax(0, 1fr) max(50%, calc(var(--au-card) * .8 + 32px)); }
    .auth-brand { padding-right: calc(var(--au-card) * .2 + 48px); }
    .auth-main { align-items: flex-start; padding-left: 0; padding-right: 32px; }
    .auth-main > .auth-card { position: relative; z-index: 2; width: var(--au-card); max-width: none; margin-left: calc(var(--au-card) * -.2); }
    .auth-main > .auth-foot { width: calc(var(--au-card) * .8); text-align: center; }
    .auth-main > .auth-card { box-shadow: 0 30px 70px -24px rgba(8, 16, 40, .55), 0 2px 6px rgba(8, 16, 40, .08); border-color: transparent; }
}
@media (min-width: 992px) and (max-width: 1279px) {
    .auth-brand { padding-left: 40px; }
    .auth-brand h2 { font-size: 26px; }
}

/* ==========================================================================
   Polish: curved seam, soft textures, richer card and headline
   ========================================================================== */
.auth-brand {
    background:
        radial-gradient(rgba(255, 255, 255, .075) 1px, transparent 1.4px) 0 0 / 24px 24px,
        radial-gradient(circle at 18% 12%, rgba(111, 142, 214, .28) 0%, rgba(111, 142, 214, 0) 42%),
        linear-gradient(155deg, #1c3164 0%, #14244a 48%, #0b1530 100%);
}
.auth-brand h2 { font-weight: 700; letter-spacing: -.02em; }
.auth-brand h2 span { background: linear-gradient(90deg, #9fb6ff 0%, #c9d6ff 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-badge { background: rgba(255, 255, 255, .1); box-shadow: 0 6px 18px -10px rgba(0, 0, 0, .6); backdrop-filter: blur(4px); }
.auth-ico { background: linear-gradient(145deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .04)); border-color: rgba(255, 255, 255, .16); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12); }
.auth-features li { padding: 6px 8px; margin: 0 -8px; border-radius: 12px; transition: background .2s ease; }
.auth-features li:hover { background: rgba(255, 255, 255, .05); }

.auth-main {
    background:
        radial-gradient(rgba(20, 36, 74, .06) 1px, transparent 1.3px) 0 0 / 22px 22px,
        radial-gradient(circle at 88% 12%, rgba(111, 142, 214, .20) 0%, rgba(111, 142, 214, 0) 38%),
        radial-gradient(circle at 75% 92%, rgba(20, 36, 74, .08) 0%, rgba(20, 36, 74, 0) 40%),
        #f4f6fa;
}
.auth-card { border-radius: 20px; }
.auth-card::before { height: 5px; }

@media (min-width: 992px) {
    /* gentle outward curve on the navy edge - the card sits on its widest point */
    .auth-brand { clip-path: ellipse(100% 135% at 0% 50%); }
    .auth-main > .auth-card { box-shadow: 0 40px 90px -30px rgba(9, 18, 44, .6), 0 12px 24px -12px rgba(9, 18, 44, .25), 0 0 0 1px rgba(20, 36, 74, .05); }
}
