/* ── Biz1 Showcase Design System — Login (matches inquiry) ── */
:root {
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius-sm: 12px;
  --radius-md: 14px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --shadow-soft: 0 2px 8px rgba(15, 24, 40, .06), 0 1px 2px rgba(15, 24, 40, .04);
  --shadow-card: 0 4px 16px rgba(15, 24, 40, .08), 0 1px 3px rgba(15, 24, 40, .05);
  --shadow-elevated: 0 12px 32px rgba(15, 24, 40, .14), 0 4px 8px rgba(15, 24, 40, .06);
  --brand: #1d60a2;
  --brand-deep: #16487c;
  --primary: var(--brand);
  --primary-hover: var(--brand-deep);
  --primary-soft: color-mix(in srgb, var(--brand) 10%, var(--bg-card));
  --danger: #c0392b;
  --danger-soft: #fbeeed;
  --bg-app: #e8ebf0;
  --bg-screen: #f0f2f6;
  --bg-card: #ffffff;
  --bg-muted: #f4f6f9;
  --bg-hero: linear-gradient(165deg, #1d60a2 0%, #16223a 100%);
  --text: #121926;
  --text-secondary: #46505f;
  --text-muted: #7a8494;
  --border: #dde3eb;
  --border-soft: #e8ecf2;
  --input-bg: #ffffff;
  --status-dark-bg: #16223a;
  color-scheme: light;
}

[data-theme="dark"] {
  --shadow-soft: 0 2px 8px rgba(0, 0, 0, .28), 0 1px 2px rgba(0, 0, 0, .2);
  --shadow-card: 0 4px 18px rgba(0, 0, 0, .35), 0 1px 3px rgba(0, 0, 0, .25);
  --shadow-elevated: 0 16px 40px rgba(0, 0, 0, .45);
  --brand: #4d9de0;
  --brand-deep: #2e78b8;
  --primary: var(--brand);
  --primary-hover: var(--brand-deep);
  --primary-soft: color-mix(in srgb, var(--brand) 14%, var(--bg-card));
  --danger: #ef6b5e;
  --danger-soft: #3a1c1a;
  --bg-app: #0b1018;
  --bg-screen: #121826;
  --bg-card: #1a2233;
  --bg-muted: #1e2738;
  --bg-hero: linear-gradient(165deg, #1a4f86 0%, #0d1420 100%);
  --text: #f2f5fa;
  --text-secondary: #c2cad6;
  --text-muted: #8b95a5;
  --border: #2a3448;
  --border-soft: #243044;
  --input-bg: #151d2c;
  --status-dark-bg: #0d1420;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  background: var(--bg-screen);
  color: var(--text);
  overflow: auto;
}

html[lang="en"],
html[lang="en"] body,
html[lang="en"] .app-shell {
  direction: ltr;
}

button, input, a {
  font-family: var(--font-sans);
}

.ds-input::placeholder {
  color: var(--text-muted);
}

.dc-scroll::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.hidden {
  display: none !important;
}

.btn:disabled {
  opacity: .65;
  cursor: wait;
}

.app-shell {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg-screen);
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  padding: 0;
}

.app-frame {
  width: 100%;
  max-width: none;
  min-height: 100vh;
  min-height: 100dvh;
  background: transparent;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  display: flex;
  flex-direction: column;
}

.screen {
  background: var(--bg-screen);
  border-radius: 0;
  overflow: hidden;
  position: relative;
  flex: 1;
  min-height: 100vh;
  min-height: 100dvh;
  height: auto;
  display: flex;
  flex-direction: column;
  width: 100%;
}

.status-icons {
  display: none;
}

.status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px 8px;
  font-size: 13px;
  font-weight: 700;
  flex: none;
}

.status-bar--dark {
  color: #fff;
  background: var(--status-dark-bg);
}

.status-bar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-inline-start: auto;
}

.theme-toggle {
  width: 30px;
  height: 30px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, .14);
  color: #fff;
  flex: none;
  transition: background .2s ease, transform .15s ease;
}

.theme-toggle:active {
  transform: scale(.94);
}

.theme-toggle .icon-moon { display: none; }
.theme-toggle .icon-sun { display: block; }

[data-theme="dark"] .theme-toggle .icon-moon { display: block; }
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border-radius: 99px;
  background: rgba(255, 255, 255, .14);
}

.lang-btn {
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, .72);
  font-size: 11px;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 99px;
  cursor: pointer;
  line-height: 1;
  text-decoration: none;
}

.lang-btn.is-active {
  background: #fff;
  color: #16223a;
}

.brand-hero {
  background: var(--bg-hero);
  padding: 36px 22px 42px;
  flex: none;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.brand-blob {
  position: absolute;
  border-radius: 50%;
}

.brand-blob--tr {
  top: -40px;
  right: -30px;
  width: 140px;
  height: 140px;
  background: rgba(255, 255, 255, .06);
}

.brand-blob--bl {
  bottom: -50px;
  left: -20px;
  width: 160px;
  height: 160px;
  background: rgba(255, 255, 255, .04);
}

.brand-icon {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: rgba(255, 255, 255, .14);
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.brand-title {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -.4px;
  position: relative;
}

.brand-sub {
  font-size: 14px;
  color: rgba(255, 255, 255, .78);
  margin-top: 8px;
  font-weight: 600;
  position: relative;
}

.login-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 0 16px 20px;
  margin-top: -18px;
  position: relative;
}

.login-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 22px 18px 20px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-soft);
}

.login-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
}

.login-hint {
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 16px;
}

.error-box {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  background: var(--danger-soft);
  border: 1px solid color-mix(in srgb, var(--danger) 28%, transparent);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  margin-bottom: 16px;
}

.error-text {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--danger);
  line-height: 1.45;
}

.field {
  margin-bottom: 14px;
}

.field--tight {
  margin-bottom: 8px;
}

.field-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
  color: var(--text-secondary);
  font-weight: 600;
  margin-bottom: 7px;
}

.req {
  color: var(--danger);
}

.input {
  width: 100%;
  padding: 13px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14.5px;
  color: var(--text);
  text-align: right;
  background: var(--input-bg);
}

html[lang="en"] .input,
html[lang="en"] .field-label,
html[lang="en"] .login-title,
html[lang="en"] .brand-title,
html[lang="en"] .brand-sub,
html[lang="en"] .footer-note,
html[lang="en"] .team-title,
html[lang="en"] .remember span,
html[lang="en"] .fill-user {
  text-align: left;
}

.input--ltr {
  direction: ltr;
}

.input--pass {
  padding: 13px 13px 13px 46px;
}

html[lang="en"] .input--pass {
  padding: 13px 46px 13px 13px;
}

.input--otp {
  text-align: center;
  letter-spacing: 3px;
}

.resend-otp {
  display: block;
  margin: 10px auto 0;
  padding: 4px 8px;
  border: none;
  background: transparent;
  color: var(--brand);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.resend-otp:disabled {
  opacity: .6;
  cursor: wait;
}

.pass-wrap {
  position: relative;
}

.pass-toggle {
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 9px;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9aa3b0;
}

html[lang="en"] .pass-toggle {
  left: auto;
  right: 8px;
}

.login-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 4px 0 20px;
}

.remember {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.remember input {
  width: 18px;
  height: 18px;
  accent-color: var(--brand);
}

.remember span {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.biz1-tag {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.btn-login {
  width: 100%;
  padding: 15px;
  border: none;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  box-shadow: 0 6px 16px color-mix(in srgb, var(--brand) 32%, transparent);
}

.demo-users {
  margin-top: 16px;
  background: var(--primary-soft);
  border: 1px solid color-mix(in srgb, var(--primary) 38%, var(--border));
  border-radius: 14px;
  padding: 14px 18px 16px;
  direction: ltr;
  overflow: visible;
}

html[lang="he"] .demo-users,
html[dir="rtl"] .demo-users {
  direction: rtl;
}

.demo-users-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 12px;
  text-align: start;
}

.demo-users-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.demo-user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: nowrap;
}

.demo-user-btn {
  width: auto;
  flex: none;
  text-align: center;
  padding: 8px 14px;
  border-radius: 10px;
  border: none;
  background: var(--primary);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  font-family: inherit;
  white-space: nowrap;
  transition: background .2s ease, transform 120ms ease;
}

.demo-user-btn:hover {
  background: var(--primary-hover);
}

.demo-user-creds {
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  direction: ltr;
  unicode-bidi: isolate;
  text-align: left;
  white-space: nowrap;
  flex: 0 0 auto;
  min-width: max-content;
  overflow: visible;
}

.login-footer,
.footer-note {
  text-align: center;
  margin-top: 16px;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

.team-box {
  margin-top: 18px;
  padding: 14px 12px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-soft);
}

.team-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 10px;
  text-align: center;
}

.team-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fill-user {
  text-align: right;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-soft);
  background: var(--bg-muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

/* Tablet */
@media (min-width: 768px) {
  .status-bar {
    padding: 14px 28px 10px;
  }

  .brand-hero {
    padding: 48px 32px 56px;
  }

  .brand-title {
    font-size: 34px;
  }

  .login-scroll {
    padding: 0 28px 32px;
    max-width: 560px;
    width: 100%;
    margin-inline: auto;
  }

  .login-card {
    padding: 28px 24px 24px;
  }
}

/* Desktop — split layout like inquiry */
@media (min-width: 1024px) {
  #screenLogin {
    display: grid;
    grid-template-columns: minmax(320px, 1.05fr) minmax(380px, 0.95fr);
    grid-template-rows: auto 1fr;
    min-height: 100vh;
    min-height: 100dvh;
  }

  #screenLogin .status-bar {
    grid-column: 1 / -1;
  }

  #screenLogin .brand-hero {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 40px;
    margin: 0;
  }

  #screenLogin .login-scroll {
    margin-top: 0;
    max-width: 560px;
    padding: 40px 28px 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .brand-title {
    font-size: 40px;
  }

  .brand-sub {
    font-size: 16px;
  }

  .brand-icon {
    width: 88px;
    height: 88px;
    border-radius: 24px;
    margin-bottom: 24px;
  }
}

@media (min-width: 1440px) {
  #screenLogin .status-bar {
    padding: 16px 56px 12px;
  }

  #screenLogin .brand-hero {
    padding: 56px 64px;
  }

  #screenLogin .login-scroll {
    max-width: 580px;
    padding: 48px 32px 56px;
  }
}
