/* Source: tabagent 1ae57ffe192e6bfde5de4d3209e6369f65a59117, h5/src/styles.css through auth responsive rules.
   Baseline checked against dev.tabagent.com.cn stylesheet index-8-fp8vTR.css (SHA-256 8038fbb328564d8a7b16da857b85e4b813bea935d9339fbca50e2580dca8f562). */
/* Host global styles: only allowed items (reset, viewport/safe-area, root
   appearance/font-size, startup/auth/fatal-recovery) + shared @keyframes.
   Logged-in workspace rules moved to ui-plugins/builtin/classic/styles/*.css. */

:root {
  --text-primary: #f6f6f7;
  color: var(--text-primary);
  background: #151517;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.4;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --visual-viewport-top-offset: 0px;
  --safe-top: max(env(safe-area-inset-top, 0px), var(--visual-viewport-top-offset), var(--ios-safe-top, 0px));
  --safe-bottom: max(env(safe-area-inset-bottom, 0px), var(--ios-safe-bottom, 0px));
  --topbar-height: calc(64px + var(--safe-top));
  --visual-viewport-keyboard-offset: 0px;
  --page: #151517;
  --drawer-page: #1b1b1c;
  --panel: #2c2c2e;
  --panel-strong: #353638;
  --surface: #2c2c2e;
  --surface-soft: #232324;
  --surface-raised: #43454a;
  --line: rgba(255, 255, 255, 0.08);
  --muted: #adb2b8;
  --muted-strong: #cfd3d6;
  --blue: #5686fe;
  --success: #3bcf88;
  --warning: #f2ba5c;
  --danger: #cc2a2a;
  --app-font-size: 16px;
  --app-small-font-size: 13px;
  --drawer-width: 261px;
}

:root[data-theme="light"] {
  --text-primary: #24292f;
  background: #f6f8fa;
  --page: #f6f8fa;
  --drawer-page: #ffffff;
  --panel: #ffffff;
  --panel-strong: #eef1f4;
  --surface: #ffffff;
  --surface-soft: #edf1f5;
  --surface-raised: #dde5ee;
  --line: rgba(35, 43, 52, 0.13);
  --muted: #66707c;
  --muted-strong: #3f4852;
  --blue: #236adf;
  --success: #148456;
  --warning: #9a6500;
  --danger: #c93434;
}

:root[data-font-size="small"] {
--app-font-size: 15px;
  --app-small-font-size: 12px;
}

:root[data-font-size="large"] {
--app-font-size: 17px;
  --app-small-font-size: 14px;
}

:root[data-font-size="xlarge"] {
--app-font-size: 18px;
  --app-small-font-size: 15px;
}

/* Mobile experience (touch input or the native app, per mobileExperience.ts)
   uses the compact top bar; desktop keeps the taller baseline above. */
@media (hover: none), (pointer: coarse) {
  :root {
    --topbar-height: calc(51px + var(--safe-top));
  }
}

html[data-h5-container="native"] {
  --topbar-height: calc(51px + var(--safe-top));
}

* {
box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

:focus {
outline: none;
}

html,
body,
#root,
.h5-ui-plugin-root {
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

/* WebKit keeps the layout viewport at window height minus the safe-area insets
   while the content is shorter than the window (viewport-fit=cover, bug 210009),
   which leaves a blank band below the app. Only the native container opts into
   the full window height; browser H5 keeps the 100% chain above. */
html[data-h5-container="native"],
html[data-h5-container="native"] body,
html[data-h5-container="native"] #root {
  height: 100vh;
}

html {
touch-action: pan-x pan-y;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--page);
  color: inherit;
  font-size: var(--app-font-size);
}

button,
input,
textarea,
select {
font: inherit;
}

input,
textarea,
select {
font-size: 16px;
}

button {
color: inherit;
  cursor: pointer;
}

button:disabled {
cursor: default;
}

small {
font-size: var(--app-small-font-size);
}

.bootstrap-screen,
.auth-screen {
background: var(--page);
}

.bootstrap-screen {
display: grid;
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  place-items: center;
}

.bootstrap-screen > p {
margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 20px;
}

.auth-screen {
  --auth-card: #212123;
  --auth-control: #2c2c2e;
  --auth-text: #f3f4f6;
  --auth-muted: #9b9fa8;
  --auth-border: rgba(255, 255, 255, 0.12);
  --auth-danger: #e0625e;
  --auth-primary: #f9fafb;
  --auth-primary-text: #0f1115;
  height: 100%;
  min-height: 0;
  overflow: auto;
  color: var(--auth-text);
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.055), transparent 24%),
    radial-gradient(circle at 50% 48%, rgba(255, 255, 255, 0.025), transparent 34%),
    linear-gradient(180deg, #1b1b1c 0%, #151517 100%);
  color-scheme: dark;
}

:root[data-theme="light"] .auth-screen {
  --auth-card: #ffffff;
  --auth-control: #f5f6f7;
  --auth-text: #17181b;
  --auth-muted: #61666b;
  --auth-border: rgba(15, 17, 21, 0.1);
  --auth-danger: #c74444;
  --auth-primary: #17181b;
  --auth-primary-text: #ffffff;
  background:
    radial-gradient(circle at 50% 18%, rgba(65, 118, 230, 0.1), transparent 24%),
    radial-gradient(circle at 50% 48%, rgba(23, 24, 27, 0.035), transparent 34%),
    linear-gradient(180deg, #ffffff 0%, #f6f7f9 100%);
  color-scheme: light;
}

.auth-shell {
  position: relative;
  z-index: 0;
  display: grid;
  min-height: 100%;
  align-content: center;
  justify-items: center;
  row-gap: clamp(58px, 9vh, 100px);
  padding: max(clamp(56px, 10vh, 96px), env(safe-area-inset-top)) 24px max(clamp(40px, 8vh, 72px), env(safe-area-inset-bottom));
  grid-template-rows: auto auto;
}

.auth-brand-stage {
  position: relative;
  display: grid;
  width: min(100%, 1040px);
  place-items: center;
  transform: translateY(-18px);
}

.auth-brand-name {
  margin: 0;
  color: var(--auth-text);
  font-size: clamp(64px, 12.5vw, 120px);
  font-weight: 750;
  line-height: 0.9;
  letter-spacing: -0.055em;
  -webkit-user-select: none;
  user-select: none;
  white-space: nowrap;
}

.auth-spotlight {
  position: absolute;
  top: calc(100% + 18px);
  left: 50%;
  width: clamp(300px, 36vw, 520px);
  height: clamp(36px, 5vw, 64px);
  border-radius: 999px;
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.99) 0%, rgba(255, 255, 255, 0.8) 48%, rgba(255, 255, 255, 0.32) 68%, transparent 88%);
  filter: blur(8px);
  pointer-events: none;
  transform: translateX(-50%);
}

:root[data-theme="light"] .auth-spotlight {
  background: radial-gradient(ellipse at center, rgba(65, 118, 230, 0.44) 0%, rgba(65, 118, 230, 0.24) 42%, rgba(65, 118, 230, 0.08) 68%, transparent 88%);
}

.auth-card {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(380px, 100%);
  padding: 24px;
  border: 1px solid var(--auth-border);
  border-radius: 14px;
  background: var(--auth-card);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.32);
}

:root[data-theme="light"] .auth-card {
  box-shadow: 0 24px 64px rgba(23, 24, 27, 0.14);
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-field-group {
  display: grid;
  gap: 7px;
}

.auth-label {
  color: var(--auth-muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 18px;
}

.auth-field,
.auth-code-action {
  min-width: 0;
  height: 46px;
  border: 1px solid var(--auth-border);
  border-radius: 10px;
  color: var(--auth-text);
  background: var(--auth-control);
  font-size: 15px;
}

.auth-field {
  width: 100%;
  padding: 0 14px;
}

.auth-field::placeholder {
  color: var(--auth-muted);
  opacity: 0.78;
}

.auth-code-row {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.auth-code-action {
  padding: 0 14px;
  font-weight: 650;
  white-space: nowrap;
}

.auth-field:hover,
.auth-code-action:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--auth-text) 28%, var(--auth-border));
}

.auth-error {
  min-height: 20px;
  margin: -2px 0 0;
  color: var(--auth-danger);
  font-size: 13px;
  line-height: 20px;
}

.auth-submit {
  display: grid;
  width: 100%;
  min-height: 46px;
  place-items: center;
  border: 0;
  border-radius: 10px;
  color: var(--auth-primary-text);
  background: var(--auth-primary);
  font-size: 15px;
  font-weight: 700;
}

.auth-secondary-link {
  justify-self: center;
  color: var(--auth-muted);
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, currentColor 42%, transparent);
  text-underline-offset: 3px;
}

.auth-secondary-link:hover {
  color: var(--auth-text);
  text-decoration-color: currentcolor;
}

.auth-submit:disabled,
.auth-code-action:disabled,
.auth-field:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

@media (max-width: 420px) {
  .auth-shell {
    padding-right: 16px;
    padding-left: 16px;
  }

  .auth-card {
    padding: 22px 20px;
  }
}
