/* BoxTech Concept 3 — Scoped to /login once JS marks the body */
body.bt-login-ready { --bt-green:#174c37; --bt-ink:#102820; --bt-lime:#54ce8c; background:#f3f8f5!important; }
body.bt-login-ready .bt-login-host { position:relative; display:grid; grid-template-columns:minmax(0,1.08fr) minmax(420px,.92fr); min-height:min(800px,calc(100svh - 100px)); max-width:1500px; width:calc(100% - 48px); margin:24px auto; border-radius:32px; overflow:hidden; background:#f7faf8; box-shadow:0 24px 85px rgba(7,46,29,.13); }
body.bt-login-ready .bt-showcase { position:relative; grid-column:1; grid-row:1 / span 6; overflow:hidden; color:white; background:radial-gradient(ellipse at 72% 72%,#257b5a 0%,transparent 55%),linear-gradient(145deg,#072c24 0%,#174c37 65%,#0a342a 100%); }
body.bt-login-ready .bt-showcase-content {position:relative;z-index:1;padding:clamp(28px,4vw,72px); min-height:100%;display:flex;flex-direction:column;}
body.bt-login-ready .bt-wordmark {display:flex;gap:10px;align-items:center;font-size:29px;font-weight:800;letter-spacing:-1px}
body.bt-login-ready .bt-mark {width:45px;height:45px;display:grid;place-items:center;border:1px solid #9cdec2;border-radius:14px;background:#ffffff16;color:#8fedb2;font-size:30px}
body.bt-login-ready .bt-eyebrow {margin-top:42px;text-transform:uppercase;letter-spacing:.23em;font-weight:650;font-size:11px;color:#b5dbc8}
body.bt-login-ready .bt-showcase h1 {margin:18px 0 12px;color:#fff;font-size:clamp(38px,4.25vw,67px);line-height:1.07;letter-spacing:-.045em;font-weight:750;max-width:720px}
body.bt-login-ready .bt-showcase h1 span {color:#68dfa1}
body.bt-login-ready .bt-intro {color:#d2e7dc;font-size:16px;line-height:1.7;max-width:540px}
body.bt-login-ready .bt-benefits {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:25px}
body.bt-login-ready .bt-benefit {display:flex;flex-direction:column;gap:4px;padding:15px 14px;border:1px solid #ffffff30;border-radius:18px;background:#ffffff0d;backdrop-filter:blur(12px);transition:transform .25s ease,background .25s ease}
body.bt-login-ready .bt-benefit:hover {transform:translateY(-4px);background:#ffffff1e}
body.bt-login-ready .bt-benefit-icon {font-size:22px;color:#68dfa1}
body.bt-login-ready .bt-benefit strong {color:white;font-size:14px}
body.bt-login-ready .bt-benefit small {color:#cee0d6;font-size:12px}
body.bt-login-ready .bt-network {position:relative;flex:1;min-height:210px;margin-top:20px;isolation:isolate}
body.bt-login-ready .bt-orbit {position:absolute;border:1px solid #85ffc153;border-radius:50%;left:50%;top:50%;transform:translate(-50%,-50%);box-shadow:0 0 40px #26c87e13}
body.bt-login-ready .bt-orbit-1 {width:225px;height:225px;animation:bt-breathe 6s ease-in-out infinite}
body.bt-login-ready .bt-orbit-2 {width:340px;height:190px;transform:translate(-50%,-50%) rotate(-19deg);border-style:dashed;animation:bt-breathe2 8s ease-in-out infinite}
body.bt-login-ready .bt-center-node {position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:110px;height:110px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;border:1px solid #8effbe9c;border-radius:50%;background:radial-gradient(circle,#2f9169,#0b3c2c);box-shadow:0 0 50px #51ff9e55;z-index:2}
body.bt-login-ready .bt-center-node span {font-size:30px;font-weight:800;color:white}
body.bt-login-ready .bt-center-node small {font-size:9px;color:#b5f5d2;letter-spacing:.12em}
body.bt-login-ready .bt-node {position:absolute;z-index:2;padding:9px 13px;border-radius:999px;border:1px solid #80eeb396;background:#155742;color:#c8ffe2;font-size:12px;font-weight:800;box-shadow:0 0 25px #22b86e33;animation:bt-float 5s ease-in-out infinite}
body.bt-login-ready .bt-node-1 {top:13%;left:11%}.bt-login-ready .bt-node-2 {top:10%;right:10%;animation-delay:-1s}.bt-login-ready .bt-node-3 {bottom:8%;left:11%;animation-delay:-2s}.bt-login-ready .bt-node-4 {bottom:10%;right:8%;animation-delay:-3s}
body.bt-login-ready .bt-network-lines {position:absolute;inset:0;width:100%;height:100%;overflow:visible}
body.bt-login-ready .bt-network-lines path {fill:none;stroke:#71eaaa;stroke-width:1.4;stroke-dasharray:5 10;opacity:.55;animation:bt-dash 7s linear infinite}
body.bt-login-ready .bt-trust {display:flex;flex-wrap:wrap;gap:17px;color:#bfdccf;font-size:11px;margin-top:22px}
body.bt-login-ready .bt-ambient {position:absolute;pointer-events:none;width:450px;height:450px;border-radius:50%;filter:blur(65px);opacity:.22;background:#49eab2;animation:bt-drift 16s ease-in-out infinite alternate}
body.bt-login-ready .bt-ambient-a {right:-160px;top:-140px}.bt-login-ready .bt-ambient-b {left:-230px;bottom:-250px;animation-delay:-8s}
/* The original Frappe sections are untouched and styled in their original host. */
body.bt-login-ready .bt-login-host > section {grid-column:2;grid-row:1;align-self:center;justify-self:stretch;padding:30px clamp(20px,4vw,64px);margin:0;min-width:0}
body.bt-login-ready .bt-login-host section .page-card {max-width:520px;width:100%;margin:auto;padding:clamp(25px,3.1vw,48px)!important;background:#ffffffed;border:1px solid #ffffff;border-radius:27px;box-shadow:0 14px 55px #214a3722;animation:bt-card-in .65s cubic-bezier(.2,.7,.2,1) both}
body.bt-login-ready .bt-login-host .page-card-head {align-items:center!important;text-align:center!important}
body.bt-login-ready .bt-login-host .page-card-head-text {text-align:center!important}
body.bt-login-ready .bt-login-host .page-card-head h4 {font-size:clamp(23px,2.2vw,31px)!important;color:var(--bt-green)!important;font-weight:750!important}
body.bt-login-ready .bt-login-host .app-logo {max-width:130px;max-height:85px;object-fit:contain}
body.bt-login-ready .bt-login-host .form-control {background:#f3f7fb!important;border:1px solid #e2eae7!important;border-radius:12px!important;min-height:48px;transition:border-color .2s,box-shadow .2s!important}
body.bt-login-ready .bt-login-host .form-control:focus {border-color:#329968!important;box-shadow:0 0 0 4px #43bc8820!important}
body.bt-login-ready .bt-login-host button.es-button[data-variant="solid"] {background:linear-gradient(115deg,#174c37,#08653f)!important;color:white!important;border-radius:12px!important;min-height:49px;box-shadow:0 9px 20px #174c3720;transition:transform .2s,box-shadow .2s!important}
body.bt-login-ready .bt-login-host button.es-button[data-variant="solid"]:hover {transform:translateY(-2px);box-shadow:0 13px 24px #174c3738}
body.bt-login-ready .bt-login-host button.es-button[data-variant="solid"]:active {transform:translateY(0) scale(.99)}
body.bt-login-ready .bt-login-host a {color:#17754e}
@keyframes bt-card-in {from{opacity:0;transform:translateY(22px)}to{opacity:1;transform:translateY(0)}}
@keyframes bt-float {0%,100%{transform:translateY(0)}50%{transform:translateY(-9px)}}
@keyframes bt-breathe {50%{opacity:.55;box-shadow:0 0 40px #56ffa440}}
@keyframes bt-breathe2 {50%{opacity:.4}}
@keyframes bt-dash {to{stroke-dashoffset:-120}}
@keyframes bt-drift {to{transform:translate(90px,65px)}}
@media(max-width:950px){body.bt-login-ready .bt-login-host{grid-template-columns:1fr;min-height:auto;max-width:650px;margin:20px auto}body.bt-login-ready .bt-showcase{grid-row:auto;grid-column:1}body.bt-login-ready .bt-showcase-content{padding:28px}body.bt-login-ready .bt-showcase h1{font-size:34px}body.bt-login-ready .bt-eyebrow{margin-top:18px}body.bt-login-ready .bt-network{display:none}body.bt-login-ready .bt-trust{margin-top:12px}body.bt-login-ready .bt-login-host > section{grid-column:1;grid-row:auto;padding:20px}body.bt-login-ready .bt-benefits{margin-top:14px}}
@media(max-width:540px){body.bt-login-ready .bt-login-host{width:calc(100% - 20px);margin:10px auto;border-radius:22px}body.bt-login-ready .bt-benefits{gap:6px}body.bt-login-ready .bt-benefit{padding:9px}body.bt-login-ready .bt-benefit small{font-size:10px}body.bt-login-ready .bt-showcase h1{font-size:28px}body.bt-login-ready .bt-intro{font-size:13px}body.bt-login-ready .bt-login-host > section{padding:12px}body.bt-login-ready .bt-login-host section .page-card{padding:24px!important}}
@media(prefers-reduced-motion:reduce){body.bt-login-ready *,body.bt-login-ready *::before,body.bt-login-ready *::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}

/* Frappe v16 stock login controls */
body.bt-login-ready .bt-login-host .btn-login:not(.btn-default),
body.bt-login-ready .bt-login-host .btn-forgot,
body.bt-login-ready .bt-login-host .btn-primary {
  background:linear-gradient(115deg,#174c37,#08653f)!important;
  border:1px solid #174c37!important;color:#fff!important;
  border-radius:12px!important;min-height:49px;
  box-shadow:0 9px 20px #174c3720;
  transition:transform .2s ease,box-shadow .2s ease!important;
}
body.bt-login-ready .bt-login-host .btn-primary:hover,
body.bt-login-ready .bt-login-host .btn-login:not(.btn-default):hover {
  transform:translateY(-2px);box-shadow:0 13px 24px #174c3738;
}
body.bt-login-ready .bt-login-host .btn-primary:active {transform:translateY(0) scale(.99)}
body.bt-login-ready .bt-login-host .btn-default {border-radius:12px!important;min-height:44px}
body.bt-login-ready .bt-login-host .form-label {color:#264c3b}
body.bt-login-ready .bt-login-host .toggle-password {cursor:pointer}
body.bt-login-ready .bt-login-host .page-card-head {margin-bottom:22px}
body.bt-login-ready .bt-login-host .page-card-head .app-logo {display:block;margin:0 auto 14px}
body.bt-login-ready .bt-login-host > section {box-sizing:border-box}

/* BOXTECH BUSINESS OS v4 - ERP focused showcase, transparent branding */
body.bt-business-os {background:#f4f8f6!important}
body.bt-business-os .bt-login-host{grid-template-columns:minmax(0,1.08fr) minmax(0,.92fr);width:min(1440px,calc(100% - 32px));min-height:0;height:auto;max-height:none;margin:clamp(8px,1.8vh,20px) auto;border-radius:30px}
body.bt-business-os .bt-showcase{background:radial-gradient(ellipse at 85% 30%,#226e53 0%,transparent 51%),linear-gradient(150deg,#073127 0%,#104935 57%,#0b382c 100%)}
body.bt-business-os .bt-showcase-content{padding:clamp(22px,3.1vw,48px);gap:0;min-height:0}
/* No white badge/tile; actual existing Frappe logo, with natural transparent pixels if source supports them. */
body.bt-business-os .bt-wordmark{background:transparent!important;box-shadow:none!important;border:0!important;border-radius:0!important;padding:0!important;min-height:58px;justify-content:flex-start}
body.bt-business-os .bt-brand-logo{display:block;width:auto;height:clamp(55px,7vh,80px);max-width:165px;object-fit:contain;background:transparent!important;box-shadow:none!important;border:0!important}
body.bt-business-os .bt-eyebrow{margin-top:16px;font-size:10px;color:#b6e3d0;letter-spacing:.22em}
body.bt-business-os .bt-showcase h1{font-size:clamp(34px,3.4vw,57px);line-height:1.08;margin:14px 0 10px;max-width:650px}
body.bt-business-os .bt-showcase h1 span{color:#65dfa3}
body.bt-business-os .bt-intro{margin:0;font-size:clamp(12px,1vw,15px);line-height:1.6;max-width:550px}
body.bt-business-os .bt-modules{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;margin-top:24px}
body.bt-business-os .bt-module{min-width:0;display:flex;flex-direction:column;gap:5px;padding:14px 11px;border-radius:16px;border:1px solid rgba(184,255,215,.22);background:rgba(255,255,255,.055);backdrop-filter:blur(10px);transition:transform .23s ease,border-color .23s ease,background .23s ease}
body.bt-business-os .bt-module:hover{transform:translateY(-4px);border-color:rgba(153,255,197,.7);background:rgba(255,255,255,.105)}
body.bt-business-os .bt-module-icon{color:#66e2a4;font-size:23px;line-height:1.1;min-height:25px}
body.bt-business-os .bt-module strong{color:#fff;font-size:12px;line-height:1.25}
body.bt-business-os .bt-module small{color:#c5e1d2;font-size:10px;line-height:1.3}
body.bt-business-os .bt-business-visual{position:relative;overflow:hidden;min-height:122px;max-height:185px;height:clamp(122px,16vh,175px);border:1px solid rgba(167,255,209,.21);border-radius:20px;margin-top:17px;background:linear-gradient(130deg,rgba(255,255,255,.07),rgba(8,65,46,.18));padding:14px 20px 9px}
body.bt-business-os .bt-visual-caption{display:flex;gap:8px;align-items:center;font-size:9px;font-weight:700;letter-spacing:.12em;color:#d8f9e6}
body.bt-business-os .bt-live-dot{width:7px;height:7px;border-radius:50%;background:#67f5aa;box-shadow:0 0 12px #67f5aa;animation:bt-os-pulse 3s ease-in-out infinite}
body.bt-business-os .bt-visual-caption-rule{height:1px;flex:1;background:#ffffff35}
body.bt-business-os .bt-visual-bars{height:56%;position:absolute;left:22px;right:22px;bottom:30px;display:flex;align-items:flex-end;gap:clamp(6px,2vw,21px);opacity:.53}
body.bt-business-os .bt-visual-bars i{display:block;flex:1;max-width:55px;height:var(--bar);background:linear-gradient(180deg,#86f5b8,#1b8f64);border:1px solid #c6ffd360;border-radius:7px 7px 2px 2px;transform-origin:bottom;animation:bt-os-bars 5s ease-in-out infinite;animation-delay:var(--delay)}
body.bt-business-os .bt-business-line{position:absolute;inset:22px 20px 28px;width:calc(100% - 40px);height:calc(100% - 50px);overflow:visible;filter:drop-shadow(0 0 6px #60f4a6)}
body.bt-business-os .bt-business-line path{fill:none;stroke:#c0ffe0;stroke-width:2;stroke-linecap:round;stroke-dasharray:430;stroke-dashoffset:430;animation:bt-os-draw 6s ease-in-out infinite}
body.bt-business-os .bt-visual-stats{position:absolute;bottom:8px;left:20px;right:20px;display:flex;justify-content:space-between;gap:12px}
body.bt-business-os .bt-visual-stats span{display:flex;gap:5px;align-items:baseline}
body.bt-business-os .bt-visual-stats b{color:#e0ffed;font-size:10px}
body.bt-business-os .bt-visual-stats small{color:#a0d1b9;font-size:9px}
body.bt-business-os .bt-trust{margin-top:14px;font-size:10px;gap:16px}
body.bt-business-os .bt-login-host > section{padding:22px clamp(22px,3vw,48px)}
body.bt-business-os .bt-login-host section .page-card{box-shadow:0 18px 60px rgba(21,60,39,.09)}
body.bt-business-os .bt-login-host .page-card-head h4{color:#103d30!important}
@keyframes bt-os-pulse{50%{opacity:.4;box-shadow:0 0 3px #67f5aa}}
@keyframes bt-os-bars{0%,100%{transform:scaleY(.8)}50%{transform:scaleY(1)}}
@keyframes bt-os-draw{0%{stroke-dashoffset:430;opacity:.2}35%,75%{stroke-dashoffset:0;opacity:1}100%{stroke-dashoffset:-430;opacity:.2}}
/* Height-sensitive desktop scaling: keep entire panel visible at normal browser zoom. */
@media(min-width:951px) and (max-height:850px){
 body.bt-business-os .bt-login-host{margin:8px auto}
 body.bt-business-os .bt-showcase-content{padding:clamp(18px,2.1vw,35px)}
 body.bt-business-os .bt-brand-logo{height:55px}
 body.bt-business-os .bt-eyebrow{margin-top:10px}
 body.bt-business-os .bt-showcase h1{font-size:clamp(31px,3.1vw,45px);margin:9px 0}
 body.bt-business-os .bt-modules{margin-top:13px;gap:7px}
 body.bt-business-os .bt-module{padding:9px 9px;gap:3px}
 body.bt-business-os .bt-module-icon{font-size:18px;min-height:19px}
 body.bt-business-os .bt-business-visual{margin-top:10px;height:125px;min-height:110px}
 body.bt-business-os .bt-trust{margin-top:9px}
}
@media(max-width:1100px) and (min-width:951px){body.bt-business-os .bt-modules{grid-template-columns:repeat(2,minmax(0,1fr))}body.bt-business-os .bt-business-visual{display:none}}
@media(max-width:950px){body.bt-business-os .bt-login-host{grid-template-columns:1fr;width:calc(100% - 24px);margin:12px auto}body.bt-business-os .bt-showcase-content{padding:25px}body.bt-business-os .bt-modules{grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;margin-top:15px}body.bt-business-os .bt-module{padding:8px}body.bt-business-os .bt-business-visual{display:none}body.bt-business-os .bt-login-host>section{grid-column:1;grid-row:auto;padding:18px}}
@media(max-width:620px){body.bt-business-os .bt-showcase h1{font-size:29px}body.bt-business-os .bt-modules{grid-template-columns:repeat(2,minmax(0,1fr))}body.bt-business-os .bt-brand-logo{height:56px}body.bt-business-os .bt-module:nth-child(n+7){display:none}}
@media(prefers-reduced-motion:reduce){body.bt-business-os .bt-business-visual *,body.bt-business-os .bt-business-visual *::before{animation:none!important}}

/* ================================================
   BOXTECH BUSINESS OS V5 - FULL SCREEN REFINEMENT
   ================================================ */

@media (min-width: 951px) {

    /* Escape Frappe's narrow website container */
    body.bt-business-os .bt-login-host {
        position: relative !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        width: calc(100vw - 32px) !important;
        max-width: none !important;
        margin: 12px 0 !important;
        min-height: calc(100vh - 24px) !important;
        min-height: calc(100dvh - 24px) !important;
        grid-template-columns:
            minmax(0, 52fr) minmax(0, 48fr) !important;
        background: #ffffff !important;
    }

    /* Right side uses full panel height */
    body.bt-business-os .bt-login-host > section {
        align-self: center;
        padding: 24px clamp(32px, 5vw, 90px) !important;
    }

    body.bt-business-os .bt-login-host section .page-card {
        max-width: 510px;
    }
}

/* White logo without white tile */
body.bt-business-os .bt-wordmark {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
}

body.bt-business-os .bt-brand-logo {
    filter: brightness(0) invert(1) !important;
    height: 78px !important;
    width: auto !important;
    max-width: 190px !important;
    object-fit: contain;
}

/* Clean white right panel */
body.bt-business-os .bt-login-host {
    background: #ffffff !important;
}

body.bt-business-os .bt-login-host > section {
    background: transparent !important;
}

/* Bottom-right premium information strip */
body.bt-business-os .bt-access-strip {
    position: absolute;
    z-index: 2;
    right: 3%;
    bottom: 40px;
    width: 42%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    padding: 22px 16px;
    border: 1px solid #e6eee9;
    border-radius: 22px;
    background: linear-gradient(
        135deg,
        #f7fbf9,
        #eef7f2
    );
    box-shadow: 0 12px 35px rgba(15, 62, 43, .045);
    box-sizing: border-box;
}

body.bt-business-os .bt-access-item {
    text-align: center;
    min-width: 0;
}

body.bt-business-os .bt-access-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    width: 36px;
    margin: 0 auto 9px;
    background: #e3f4eb;
    color: #174c37;
    font-size: 19px;
    border-radius: 12px;
}

body.bt-business-os .bt-access-item strong {
    display: block;
    color: #174c37;
    font-size: 12px;
    line-height: 1.4;
}

body.bt-business-os .bt-access-item small {
    display: block;
    color: #71857a;
    font-size: 10px;
    margin-top: 4px;
    line-height: 1.4;
}

/* Avoid overlap on shorter screens */
@media (min-width: 951px) and (max-height: 760px) {
    body.bt-business-os .bt-access-strip {
        bottom: 18px;
        padding: 10px 12px;
    }
    body.bt-business-os .bt-access-item small {
        display: none;
    }
}

/* Mobile / tablet: preserve vertical responsive layout */
@media (max-width: 950px) {
    body.bt-business-os .bt-login-host {
        left: auto !important;
        transform: none !important;
        width: calc(100% - 20px) !important;
        margin: 10px auto !important;
    }

    body.bt-business-os .bt-brand-logo {
        height: 60px !important;
    }

    body.bt-business-os .bt-access-strip {
        display: none !important;
    }
}

