/* CRM typography with a full-height Books sign-in surface. */
.book-auth {
  --ba-ink: #132f32;
  --ba-teal: #006b64;
  --ba-muted: #52676b;
  --ba-line: #cedbd9;
  position:relative; display:grid; grid-template-columns:minmax(0,46fr) minmax(0,54fr);
  min-height:100vh; min-height:100dvh; background:#fff; color:var(--ba-ink);
  font:450 14px/1.5 "Plus Jakarta Sans",system-ui,sans-serif;
  color-scheme:light; -webkit-text-size-adjust:100%;
}
.book-auth *, .book-auth *::before, .book-auth *::after, .book-auth { box-sizing:border-box; }
.book-auth :is(input,button,select,summary) { font-family:inherit; }
.book-auth button, .book-auth summary { touch-action:manipulation; cursor:pointer; }
.book-auth :is(button,summary,select,a):focus-visible { outline:3px solid #00867c; outline-offset:3px; }
.ba-studio { position:relative; isolation:isolate; overflow:hidden; background:#003c41; color:#fff; }
.ba-photo { position:absolute; inset:0; z-index:-2; width:100%; height:100%; object-fit:cover; object-position:50% 78%; }
.ba-brand { position:absolute; inset:clamp(26px,4.4vh,52px) auto auto clamp(28px,3.4vw,74px);
  display:flex; align-items:center; gap:10px; white-space:nowrap; }
.ba-brand img { display:block; width:36px; height:36px; object-fit:contain; }
.ba-brand span { color:#f6fbf8; font-size:23px; font-weight:460; letter-spacing:-.052em; line-height:1; }
.ba-brand b { font-weight:800; }
.ba-studio-title { position:absolute; top:clamp(98px,16vh,200px); left:clamp(28px,3.4vw,74px);
  max-width:calc(100% - 55px); margin:0; color:#faf4e4;
  font-size:clamp(34px,3.8vw,80px); line-height:1.02; font-weight:440; letter-spacing:-.061em; }
.ba-studio-title span { display:block; color:#d6e7df; }
.ba-card { min-width:0; display:flex; flex-direction:column; align-items:center; }
.ba-brandbar, .ba-legal { width:100%; display:flex; justify-content:flex-end; align-items:center;
  padding-inline:clamp(22px,3.4vw,74px); }
.ba-brandbar { position:relative; z-index:4; min-height:80px; }
.ba-flow { width:min(calc(100% - 64px),390px); min-width:0; margin-block:auto; padding-block:22px; }
.ba-hello { margin-bottom:24px; }
.ba-hello h1 { margin:0; color:var(--ba-ink); font:630 clamp(30px,2.6vw,38px)/1.15 "Plus Jakarta Sans",system-ui,sans-serif;
  letter-spacing:-.06em; text-wrap:balance; outline:none; }
.ba-hello p { margin:8px 0 0; color:var(--ba-muted); font-size:14px; line-height:1.55; }
.ba-legal { min-height:64px; gap:20px; }
.ba-legal a { display:inline-flex; align-items:center; min-height:32px; color:var(--ba-muted);
  font-size:12px; text-decoration:none; font-weight:510; }
.ba-legal a:hover { text-decoration:underline; }
.ba-help { position: relative; }
.ba-help summary {
  list-style: none; display: flex; gap: 5px; align-items: center; justify-content: center;
  min-height: 44px; padding: 3px 8px; border-radius: 8px; font-size: 12px; font-weight: 610; color: var(--ba-muted);
}
.ba-help summary::-webkit-details-marker { display: none; }
.ba-help summary:hover, .ba-help[open] summary { color: var(--ba-teal); background: #eaf5f2; }
.book-auth svg { display: block; width: 19px; height: 19px; flex: none; }
.ba-help summary svg { width: 16px; height: 16px; }
.ba-help-panel {
  position: absolute; inset: calc(100% + 6px) 0 auto auto; z-index: 5; width: min(275px, 77vw);
  background: #fff; color: var(--ba-ink); padding: 16px; font-size: 13px; line-height: 1.55;
  border: 1px solid var(--ba-line); border-radius: 12px; box-shadow: 0 8px 30px #14383f30;
}
.ba-help-panel strong { font-weight: 730; }
.ba-help-panel p { margin: 7px 0 0; color: var(--ba-muted); }
.ba-body form, .ba-fields { display: grid; gap: 17px; margin: 0; }
.ba-fields:empty { display: none; }
.ba-field { min-width: 0; }
.ba-field label { display: block; color: var(--ba-ink); font-size: 14px; line-height: 20px; font-weight: 660; letter-spacing: -.025em; margin: 0; }
.ba-field-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 24px; }
.ba-input, .ba-field select {
  display: flex; align-items: center; gap: 11px; width: 100%; min-width: 0; min-height: 49px;
  margin-top: 7px; padding: 0 12px; border: 1px solid #beced0; border-radius: 9px;
  background: #fbfdfc; color: #476870;
}
.ba-input:focus-within { border-color: #007987; box-shadow: 0 0 0 3px #00798720; background: white; }
.ba-input input {
  flex: 1 1 0; min-width: 0; width: 100%; height: 47px; border: 0; margin: 0; padding: 0;
  outline: 0; background: transparent; box-shadow: none; color: var(--ba-ink); border-radius: 0;
  font: 490 15px/1.35 "Plus Jakarta Sans",system-ui,sans-serif; letter-spacing: -.02em;
}
.ba-input input::placeholder { color: #677c80; font-weight: 420; opacity: 1; }
.ba-input input:focus { outline: 0; box-shadow: none; }
.ba-field select { display: block; font-size: 16px; color: var(--ba-ink); }
.ba-input .ba-eye {
  justify-content: center; display: inline-flex; align-items: center; border: 0;
  background: transparent; color: #4e6c74; padding: 0; margin-inline-end: -10px; width: 44px; height: 44px; border-radius: 7px;
}
.ba-eye:hover { color: #004d5b; }
.ba-link {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  border: 0; padding: 3px 0; background: transparent; color: var(--ba-teal);
  font-size: 13px; line-height: 1.5; font-weight: 690; text-align: start;
}
.ba-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.ba-link svg { width: 15px; height: 15px; }
.ba-field-head .ba-link { position: relative; }
.ba-field-head .ba-link::before { content: ''; position: absolute; inset: -6px -2px; }
.ba-primary, .ba-secondary {
  display: flex; align-items: center; justify-content: center; text-align: center; gap: 9px; width: 100%;
  padding: 12px 16px; border-radius: 9px; line-height: 1.45; font-size: 14px; font-weight: 690;
}
.ba-primary { position: relative; min-height: 48px; background: #006672; border: 1px solid #006672; color: #fff; }
.ba-primary:hover { background: #005763; }
.ba-primary svg { position: absolute; right: 16px; width: 17px; }
.ba-secondary { min-height: 45px; background: #fff; border: 1px solid #c4d6d6; color: #214c52; }
.ba-secondary:hover { background: #f1f8f6; border-color: #8bb8bb; }
.ba-secondary svg { width: 16px; }
.book-auth button:disabled { cursor: default; opacity: .65; }
.ba-hint { font-size: 12px; line-height: 1.5; color: var(--ba-muted); margin: 6px 0 0; }
.ba-error { color: #9a2739; background: #fff3f4; border-left: 3px solid #b7374b; border-radius: 5px; padding: 8px 10px; margin: 0; font-size: 13px; overflow-wrap: anywhere; }
.ba-error:empty { display: none; }
.ba-notice { display: flex; gap: 8px; align-items: center; margin: 0 0 18px; padding: 10px 12px; border-radius: 8px; background: #e9f6f0; color: #205947; font-size: 13px; }
.ba-notice svg { width: 16px; }
.ba-divider { display: flex; align-items: center; gap: 11px; margin: 11px 0 12px; color: #64777a; font-size: 12px; }
.ba-divider::after, .ba-divider::before { content: ''; height: 1px; background: #dde7e6; flex: 1; }
.ba-first { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; margin: 20px 0 0; color: var(--ba-muted); font-size: 13px; }
.ba-first .ba-link, .ba-back .ba-link, .ba-retry .ba-link { min-height: 32px; }
.ba-back, .ba-retry { margin-top: 15px; }
.ba-back { text-align: center; }
.ba-retry, .ba-identity { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.ba-identity { background: #eef6f4; color: #28575c; padding: 8px 11px; border-radius: 9px; }
.ba-identity svg { width: 16px; }
.ba-identity strong { font-size: 13px; font-weight: 610; overflow-wrap: anywhere; flex: 1; min-width: 4ch; }
.ba-identity .ba-link { font-size: 12px; }
.ba-code input:not(:placeholder-shown) { letter-spacing: .24em; font-variant-numeric: tabular-nums; }

.ba-input, .ba-field select { border-radius:7px; min-height:42px; margin-top:6px; gap:10px; background:#fff; border-color:#bfcfcd; }
.ba-input input { height:40px; font-size:14px; }
.ba-input .ba-eye { height:38px; width:40px; }
.ba-field label { font-size:13px; font-weight:650; }
.ba-primary,.ba-secondary { min-height:42px; border-radius:7px; padding:9px 12px; }
.ba-primary { background:#00695f; border-color:#00695f; }
.ba-primary:hover { background:#00584f; }
.ba-body form,.ba-fields { gap:15px; }
.ba-first { margin-top:11px; }
.ba-first + .ba-first { margin-top:0; }
.ba-auth-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.ba-check { display:flex; align-items:flex-start; gap:8px; font-size:13px; color:var(--ba-ink); }
.ba-check input[type="checkbox"] { width:16px; height:16px; flex:0 0 16px; accent-color:var(--ba-teal); margin:3px 0 0; }
.ba-check a { color:var(--ba-teal); }
@media (max-width:1500px), (max-height:800px) {
  .ba-flow { width:min(calc(100% - 56px),376px); }
  .ba-hello h1 { font-size:30px; }
  .ba-hello { margin-bottom:21px; }
  .ba-input,.ba-field select,.ba-primary,.ba-secondary { min-height:40px; }
  .ba-input input,.ba-input .ba-eye { height:38px; }
  .ba-body form,.ba-fields { gap:13px; }
  .ba-brandbar { min-height:68px; }
  .ba-legal { min-height:48px; }
}
@media (max-width:740px) {
  .book-auth { grid-template-columns:minmax(0,1fr); grid-template-rows:auto 1fr; }
  .ba-studio { height:clamp(106px,19vh,164px); }
  .ba-studio::after { content:""; position:absolute; z-index:-1; inset:0;
    background:linear-gradient(90deg,#003b40 14%,#003b40d9 44%,transparent 70%); }
  .ba-photo { left:auto; width:74%; object-position:50% 64%; }
  .ba-brand { inset:50% auto auto max(22px,env(safe-area-inset-left)); transform:translateY(-50%); }
  .ba-brand img { width:32px; height:32px; }
  .ba-brand span { font-size:22px; }
  .ba-studio-title { display:none; }
  .ba-card { position:relative; }
  .ba-brandbar { min-height:44px; padding-inline:max(16px,env(safe-area-inset-right)); }
  .ba-flow { width:min(calc(100% - 44px),400px); padding-block:9px 16px; }
  .ba-hello { margin-bottom:19px; }
  .ba-hello h1 { font-size:29px; }
  .ba-legal { min-height:36px; padding-bottom:env(safe-area-inset-bottom); justify-content:center; }
  .ba-input input, .ba-field select { font-size:16px; }
  .ba-input,.ba-field select,.ba-primary,.ba-secondary { min-height:44px; }
  .ba-input .ba-eye { height:42px; width:44px; }
}
@media (max-width:740px) and (max-height:700px) {
  .ba-studio { height:66px; }
  .ba-brandbar { position:absolute; right:0; top:-66px; width:auto; height:66px; padding-right:16px; }
  .ba-help summary { background:#fff; min-height:32px; padding:3px 8px; }
  .ba-flow { padding-top:19px; }
  .ba-hello { margin-bottom:13px; }
  .ba-hello p { margin-top:4px; }
  .ba-body form,.ba-fields { gap:10px; }
  .ba-divider { margin:6px 0; }
  .ba-first { margin-top:7px; }
}
@media (max-width:475px) {
  .ba-auth-grid { grid-template-columns:minmax(0,1fr); gap:12px; }
}
@media (max-height:500px) and (min-width:741px) {
  .book-auth { grid-template-columns:minmax(0,35fr) minmax(0,65fr); }
  .ba-studio-title { top:92px; font-size:32px; }
  .ba-brandbar { position:absolute; right:10px; top:2px; width:auto; padding:0; min-height:32px; }
  .ba-flow { padding-block:13px 7px; width:min(calc(100% - 66px),380px); }
  .ba-hello { margin-bottom:10px; }
  .ba-hello h1 { font-size:26px; } .ba-hello p { margin:3px 0 0; }
  .ba-body form,.ba-fields { gap:8px; }
  .ba-divider,.ba-first { margin:3px 0; } .ba-first .ba-link { min-height:26px; }
  .ba-legal { min-height:24px; }
}
@media (max-width:740px) and (max-height:600px) {
  .ba-studio,.ba-brandbar { height:56px; }
  .ba-brandbar { top:-56px; }
  .ba-flow { padding-block:10px 3px; }
}
@media (min-width:600px) and (max-height:500px) and (orientation:landscape) {
  .book-auth { grid-template-columns:minmax(0,31fr) minmax(0,69fr); grid-template-rows:1fr; }
  .ba-studio { height:auto; }
  .ba-studio::after { display:none; }
  .ba-photo { width:100%; object-position:50% 78%; }
  .ba-brand { top:22px; left:18px; transform:none; }
  .ba-studio-title { display:block; top:83px; left:18px; font-size:clamp(22px,3.4vw,36px); }
  .ba-card { position:relative; }
  .ba-brandbar { position:absolute; top:0; right:7px; bottom:auto; width:auto; height:32px; min-height:32px; padding:0; }
  .ba-help summary { min-height:32px; }
  .ba-flow { padding-block:20px 3px; width:min(calc(100% - 32px),480px); }
  .ba-hello { margin-bottom:10px; } .ba-hello h1 { font-size:26px; } .ba-hello p { margin-top:2px; }
  .ba-fields:has([name="password"][autocomplete="current-password"]) {
    grid-template-columns:repeat(2,minmax(0,1fr)); align-items:end;
  }
  .ba-primary,.ba-secondary,.ba-input,.ba-field select { min-height:40px; }
  .ba-body form,.ba-fields { gap:8px; } .ba-divider,.ba-first { margin-block:3px; }
  .ba-primary,.ba-secondary { padding:7px 12px; }
  .ba-legal { min-height:28px; }
}
