/* ========================================================================== 
   AUTH + ACCOUNT GLASS PAGES
   Scoped to login, signup, and account only. Does not control streaming/home.
   ========================================================================== */

body[data-page="login"],
body[data-page="signup"],
body[data-page="account"] {
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 153, 0, .12), transparent 34%),
    radial-gradient(circle at 82% 12%, rgba(90, 167, 255, .10), transparent 30%),
    linear-gradient(145deg, var(--sai-bg), var(--sai-bg-2));
}

.sai-auth-page {
  width: min(100% - 28px, 560px);
  min-height: 100vh;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 0;
}

.sai-auth-card {
  width: 100%;
  max-width: 520px;
  display: grid;
  gap: 20px;
  padding: clamp(20px, 4vw, 30px);
  border-radius: 10px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .085), rgba(255, 255, 255, .032)),
    rgba(18, 18, 18, .74);
  color: var(--sai-text);
  box-shadow: none;
  backdrop-filter: blur(24px) saturate(155%);
  -webkit-backdrop-filter: blur(24px) saturate(155%);
}

.sai-auth-topbar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.sai-auth-brand {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-left: auto;
}

.sai-auth-brand img {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  border-radius: 10px;
  object-fit: cover;
}

.sai-auth-brand span {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.sai-auth-brand strong {
  color: #fff;
  font-size: 18px;
  line-height: 1;
  font-weight: 950;
}

.sai-auth-brand em {
  color: var(--sai-soft);
  font-size: 12px;
  line-height: 1.2;
  font-style: normal;
  font-weight: 750;
}

.sai-auth-card .sl-back-home {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .045)),
    rgba(255, 255, 255, .06);
  color: #fff;
  font-size: 24px;
  font-weight: 850;
  text-decoration: none;
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  transition: background .16s ease, transform .16s ease;
}

.sai-auth-card .sl-back-home:hover {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, .075)),
    rgba(255, 255, 255, .09);
  transform: translateY(-1px);
}

.sai-auth-header {
  display: grid;
  gap: 9px;
  margin: 0;
}

.sai-auth-header h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(30px, 6vw, 42px);
  line-height: 1.03;
  font-weight: 950;
}

.sai-auth-header h1 strong {
  color: #fff;
  font: inherit;
}

.sai-auth-header p,
.sai-auth-note,
.sai-auth-card .sl-small-note,
.sai-auth-card .ss-small-note {
  margin: 0;
  color: var(--sai-muted);
  line-height: 1.55;
  font-size: 14px;
  font-weight: 650;
}

.sai-auth-panel,
.sai-auth-form,
.sai-account-content {
  display: grid;
  gap: 12px;
}

.sai-auth-field {
  display: block;
  margin: 0;
}

.sai-auth-field input,
.sai-auth-card .sl-field input,
.sai-auth-card .ss-field input {
  width: 100%;
  min-height: 52px;
  padding: 0 15px;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, .07);
  color: #fff;
  outline: none;
  font-size: 15px;
  font-weight: 750;
}

.sai-auth-field input::placeholder,
.sai-auth-card .sl-field input::placeholder,
.sai-auth-card .ss-field input::placeholder {
  color: rgba(0, 0, 0, .46) !important;
  opacity: 1 !important;
}

.sai-auth-field input:focus,
.sai-auth-card .sl-field input:focus,
.sai-auth-card .ss-field input:focus {
  background: rgba(255, 255, 255, .105);
}

.sai-auth-card .sl-code-input,
.sai-auth-card .ss-code-input {
  text-align: center;
  font-weight: 900;
}

.sai-auth-card .sl-btn,
.sai-auth-card .ss-btn {
  width: 100%;
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border: 0;
  border-radius: 10px;
  background: var(--sai-orange);
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: background .16s ease, color .16s ease, opacity .16s ease, transform .16s ease;
}

.sai-auth-card .sl-btn:hover,
.sai-auth-card .ss-btn:hover {
  transform: translateY(-1px);
}

.sai-auth-card .sl-btn-secondary,
.sai-auth-card .ss-btn-secondary {
  background: rgba(255, 255, 255, .075);
  color: #fff;
}

.sai-auth-card .sl-btn-secondary:hover,
.sai-auth-card .ss-btn-secondary:hover {
  background: rgba(255, 255, 255, .105);
  color: #fff;
}

.sai-account-actions {
  display: grid;
  gap: 14px;
}

.sai-account-action-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.sai-account-action-row .sl-btn {
  width: 100%;
  min-height: 54px;
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(255, 153, 0, .95), rgba(255, 153, 0, .68)),
    rgba(255, 153, 0, .82);
  color: #fff;
  font-size: 14px;
  font-weight: 950;
}

.sai-account-action-row .sl-btn:hover {
  transform: translateY(-1px);
}

.sai-account-action-row .sai-btn-disabled,
.sai-account-action-row .sai-btn-disabled:hover {
  cursor: not-allowed;
  opacity: .45;
  transform: none;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .10), rgba(255, 255, 255, .04)),
    rgba(255, 255, 255, .06);
  color: rgba(255, 255, 255, .72);
}

.sai-account-action-row .sai-btn-disabled:disabled {
  cursor: not-allowed;
}

.sai-btn-disabled span {
  display: inline-flex;
  margin-left: 5px;
  font-size: 11px;
  font-weight: 900;
  color: rgba(255, 255, 255, .55);
  text-transform: uppercase;
}

.sai-account-links {
  display: grid;
  gap: 0;
  padding: 30px 0 0;
}

.sai-account-links a,
.sai-account-links button,
.sai-account-link-disabled {
  width: fit-content;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: rgba(255, 255, 255, .72);
  font-size: 13px;
  font-weight: 800;
  font-family: inherit;
  line-height: 1.25;
  text-align: left;
  text-decoration: none;
}

.sai-account-links a,
.sai-account-links button {
  cursor: pointer;
}

.sai-account-links a::after,
.sai-account-links button::after {
  content: "↗";
  font-size: 12px;
  line-height: 1;
  opacity: .6;
  transform: translateY(-1px);
}

.sai-account-links a:hover,
.sai-account-links button:hover {
  color: #fff;
}

.sai-account-links a:hover::after,
.sai-account-links button:hover::after {
  opacity: 1;
}

.sai-account-link-disabled {
  cursor: not-allowed;
  opacity: .38;
}

.sai-account-link-disabled b {
  margin-left: 2px;
  font-size: 10px;
  font-weight: 950;
  color: rgba(255, 255, 255, .55);
  text-transform: uppercase;
}

.sai-account-logout-link {
  color: #ff9aa6 !important;
}

.sai-auth-card .sl-error,
.sai-auth-card .ss-error,
.sai-auth-card .sl-message,
.sai-auth-card .ss-message {
  padding: 12px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 750;
}

.sai-auth-card .sl-error,
.sai-auth-card .ss-error {
  color: #ffb4bd;
  background: rgba(255, 91, 110, .10);
}

.sai-auth-card .sl-message,
.sai-auth-card .ss-message {
  color: #b7ffd8;
  background: rgba(40, 233, 140, .10);
}

.sai-auth-note {
  text-align: center;
}

.sai-auth-note a {
  color: #fff;
  font-weight: 900;
}

.sai-auth-loading.st-loader-card {
  min-height: 190px;
  max-width: none;
  padding: 20px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .045);
}

@media (max-width: 520px) {
  .sai-auth-page {
    width: min(100% - 22px, 560px);
  }

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

  .sai-auth-topbar {
    gap: 8px;
  }

  .sai-auth-brand {
    gap: 10px;
  }

  .sai-auth-brand img {
    width: 46px;
    height: 46px;
    flex-basis: 46px;
  }

  .sai-auth-brand strong {
    font-size: 16px;
  }

  .sai-auth-brand em {
    font-size: 11px;
  }

  .sai-account-action-row {
    grid-template-columns: 1fr;
  }
}

/* v27 white theme shared override */
body[data-page="dashboard"], body { background: #fafafa !important; background-image: none !important; color: #111111 !important; }
.sd-app-shell, .sd-layout-shell, .sd-sl-card-shell, .sd-playground, .sl-card, .sd-studio-sl-card, .sd-modal, .sd-card, .sd-stream-card, .sd-image-generator-card, .sd-plan-card, .sd-chat-shell, .sd-chat-main, .sd-chat-messages, .sd-chat-composer, .sd-chat-history-panel, .sd-ai-user-coins-card, .sd-ai-cloud-modal, .sd-small-modal { background: #ffffff !important; background-image: none !important; border-color: rgba(17,17,17,.08) !important; box-shadow: none !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; color: #111111 !important; }
.sd-modal-backdrop { background: rgba(250,250,250,.92) !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
.sd-primary-action, .sd-add-btn.sd-primary-action, .sd-upload-btn.sd-primary-action, .sl-btn, .ss-btn, .sd-chat-send-btn { background: #000000 !important; color: #ffffff !important; border-color: #000000 !important; box-shadow: none !important; }
.sd-secondary-action, .sd-add-btn.sd-secondary-action, .sd-upload-btn.sd-secondary-action, .sl-btn-secondary, .ss-btn-secondary, .sd-chat-modal-tools button { background: #ffffff !important; color: #111111 !important; border: 1px solid rgba(17,17,17,.10) !important; box-shadow: none !important; }
input, select, textarea, .sd-native-select, .sd-custom-select-btn { background: #ffffff !important; color: #111111 !important; border-color: rgba(17,17,17,.12) !important; }
p, small, em, .sd-muted, .sd-card-meta, .sd-ai-type, .sd-chat-message-meta, .sd-chat-history-meta { color: rgba(17,17,17,.62) !important; }
h1, h2, h3, strong, b, label, .sd-chat-message, .sd-chat-message-content { color: #111111 !important; }

/* Global native select style: matches sdStreamFilter with visible arrow */
select,
.sd-native-select {
  appearance: none !important;
  -webkit-appearance: none !important;
  min-height: 38px !important;
  padding-right: 42px !important;
  background-color: #ffffff !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 640 640'%3E%3Cpath fill='rgba(17,17,17,.62)' d='M297.4 438.6C309.9 451.1 330.2 451.1 342.7 438.6L502.7 278.6C515.2 266.1 515.2 245.8 502.7 233.3C490.2 220.8 469.9 220.8 457.4 233.3L320 370.7L182.6 233.4C170.1 220.9 149.8 220.9 137.3 233.4C124.8 245.9 124.8 266.2 137.3 278.7L297.3 438.7z'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 14px center !important;
  background-size: 16px 16px !important;
}
