/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

:root {
  color-scheme: light;
  --gside-bg: #f7f9fb;
  --gside-surface: #ffffff;
  --gside-surface-subtle: #f2f5f8;
  --gside-text: #102031;
  --gside-muted: #667587;
  --gside-faint: #94a1af;
  --gside-border: #dce3e9;
  --gside-border-strong: #c8d3dc;
  --gside-accent: #1195b6;
  --gside-accent-dark: #0d7f9a;
  --gside-focus: rgba(17, 149, 182, 0.16);
  --gside-danger: #b42318;
  --gside-danger-soft: #fff1f0;
  --gside-success: #287a53;
  --gside-success-soft: #edf8f2;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--gside-bg);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--gside-text);
  background:
    radial-gradient(circle at top left, rgba(17, 149, 182, 0.06), transparent 28rem),
    var(--gside-bg);
  font-family:
    Inter,
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input {
  font: inherit;
}

a {
  color: var(--gside-accent);
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
  position: relative;
  overflow: hidden;
}

.auth-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.34;
  background-image:
    linear-gradient(rgba(16, 32, 49, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 32, 49, 0.025) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom, black, transparent 76%);
}

.auth-panel {
  width: min(100%, 430px);
  position: relative;
  z-index: 1;
}

.auth-brand {
  display: flex;
  justify-content: center;
  margin-bottom: 30px;
}

.gside-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--gside-text);
  text-decoration: none;
}

.gside-logo__mark {
  width: 72px;
  height: 72px;
  flex: none;
  color: var(--gside-accent);
}

.gside-logo__wordmark {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.gside-logo__name {
  color: var(--gside-text);
  font-size: 19px;
  font-weight: 760;
  letter-spacing: 0.08em;
}

.gside-logo__capital {
  margin-top: 7px;
  color: var(--gside-muted);
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 0.28em;
}

.auth-card {
  padding: 30px;
  background: var(--gside-surface);
  border: 1px solid var(--gside-border);
  border-radius: 16px;
  box-shadow:
    0 1px 2px rgba(16, 32, 49, 0.04),
    0 18px 40px rgba(16, 32, 49, 0.06);
}

.auth-header {
  margin-bottom: 26px;
}

.auth-eyebrow {
  margin: 0 0 8px;
  color: var(--gside-accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.auth-title {
  margin: 0;
  font-size: 25px;
  font-weight: 680;
  letter-spacing: -0.025em;
}

.auth-subtitle {
  margin: 8px 0 0;
  color: var(--gside-muted);
  font-size: 14px;
  line-height: 1.55;
}

.auth-flash {
  margin: 0 0 20px;
  padding: 11px 12px;
  border: 1px solid var(--gside-border);
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.45;
}

.auth-flash--alert {
  color: var(--gside-danger);
  background: var(--gside-danger-soft);
  border-color: #f0c7c2;
}

.auth-flash--notice {
  color: var(--gside-success);
  background: var(--gside-success-soft);
  border-color: #cce8d9;
}

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

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

.auth-label {
  color: var(--gside-text);
  font-size: 12px;
  font-weight: 650;
}

.auth-input {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  color: var(--gside-text);
  background: var(--gside-surface);
  border: 1px solid var(--gside-border-strong);
  border-radius: 8px;
  outline: none;
  font-size: 14px;
  transition:
    border-color 120ms ease,
    box-shadow 120ms ease;
}

.auth-input::placeholder {
  color: var(--gside-faint);
}

.auth-input:hover {
  border-color: #aebcc7;
}

.auth-input:focus {
  border-color: var(--gside-accent);
  box-shadow: 0 0 0 3px var(--gside-focus);
}

.auth-submit {
  width: 100%;
  height: 44px;
  margin-top: 2px;
  border: 1px solid var(--gside-accent);
  border-radius: 8px;
  color: #ffffff;
  background: var(--gside-accent);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  transition:
    background 120ms ease,
    border-color 120ms ease,
    transform 80ms ease;
}

.auth-submit:hover {
  background: var(--gside-accent-dark);
  border-color: var(--gside-accent-dark);
}

.auth-submit:active {
  transform: translateY(1px);
}

.auth-meta {
  margin: 18px 0 0;
  color: var(--gside-faint);
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
}

.app-shell {
  min-height: 100vh;
  padding: 24px;
}

.app-topbar {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 4px 20px;
  border-bottom: 1px solid var(--gside-border);
}

.app-topbar .gside-logo__mark {
  width: 58px;
  height: 58px;
}

.app-account {
  display: flex;
  align-items: center;
  gap: 12px;
}

.app-account__email {
  color: var(--gside-muted);
  font-size: 12px;
}

.app-sign-out {
  padding: 8px 11px;
  border: 1px solid var(--gside-border);
  border-radius: 7px;
  color: var(--gside-text);
  background: var(--gside-surface);
  cursor: pointer;
  font-size: 12px;
  font-weight: 650;
}

.app-sign-out:hover {
  border-color: var(--gside-border-strong);
  background: var(--gside-surface-subtle);
}

.app-main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 52px 4px;
}

.app-kicker {
  margin: 0 0 10px;
  color: var(--gside-accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.app-title {
  margin: 0;
  font-size: clamp(30px, 5vw, 48px);
  font-weight: 680;
  letter-spacing: -0.04em;
}

.app-copy {
  max-width: 620px;
  margin: 14px 0 0;
  color: var(--gside-muted);
  font-size: 15px;
  line-height: 1.65;
}

@media (max-width: 640px) {
  .auth-shell {
    padding: 24px 16px;
  }

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

  .gside-logo__mark {
    width: 64px;
    height: 64px;
  }

  .gside-logo__name {
    letter-spacing: 0.06em;
  }

  .gside-logo__capital {
    letter-spacing: 0.24em;
  }

  .app-shell {
    padding: 16px;
  }

  .app-topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .app-account {
    width: 100%;
    justify-content: space-between;
  }
}

/* Compact global market pulse. All component rules are scoped to its layout wrapper. */
.application-market-pulse {
  padding-inline: 24px;
  border-bottom: 1px solid var(--gside-border);
  background: var(--gside-surface);
  color: var(--gside-text);
  font-family: inherit;
}

.application-market-pulse .market-pulse {
  width: 100%;
  max-width: 1180px;
  min-width: 0;
  margin-inline: auto;
  padding: 3px 4px;
  font-family: inherit;
  font-size: 0.6875rem;
  line-height: 1.45;
}

.application-market-pulse .market-pulse__row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.application-market-pulse .market-pulse__label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  color: var(--gside-muted);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.035em;
  line-height: 1.2;
  text-transform: uppercase;
  white-space: nowrap;
}

.application-market-pulse .market-pulse__sigma-label {
  font-size: 0.8125rem;
  line-height: 1;
  text-transform: none;
}

.application-market-pulse .market-pulse__viewport {
  min-width: 0;
  overflow-x: auto;
  border-radius: 4px;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--gside-border-strong) transparent;
  -webkit-overflow-scrolling: touch;
}

.application-market-pulse .market-pulse__track {
  display: flex;
  align-items: center;
  gap: 2px;
  width: max-content;
  min-width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.application-market-pulse .market-pulse__entry {
  flex: 0 0 auto;
  margin: 0;
  padding: 0;
}

.application-market-pulse .market-pulse__entry--split {
  margin-left: 4px;
  padding-left: 7px;
  border-left: 1px solid var(--gside-border);
}

.application-market-pulse .market-pulse__item,
.application-market-pulse .market-pulse__item:visited {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-height: 24px;
  padding-inline: 2px;
  border-radius: 4px;
  background: transparent;
  color: var(--gside-text);
  font: inherit;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 120ms ease;
}

.application-market-pulse .market-pulse__symbol {
  color: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--gside-border-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.application-market-pulse .market-pulse__item:hover {
  background: var(--gside-surface-subtle);
}

.application-market-pulse .market-pulse__item:hover .market-pulse__symbol,
.application-market-pulse .market-pulse__item:focus-visible .market-pulse__symbol {
  color: var(--gside-accent-dark);
  text-decoration-color: currentColor;
}

.application-market-pulse .market-pulse__item:focus-visible,
.application-market-pulse .market-pulse__viewport:focus-visible {
  outline: 2px solid var(--gside-accent-dark);
  outline-offset: -2px;
}

.application-market-pulse .market-pulse__value {
  display: inline-block;
  padding: 1px 1px;
  border-radius: 3px;
  font-size: inherit;
  font-weight: 650;
  font-variant-numeric: tabular-nums lining-nums;
  letter-spacing: 0;
  line-height: 1.4;
  white-space: nowrap;
}

.application-market-pulse .market-pulse__value--negative {
  color: var(--gside-danger);
}

.application-market-pulse .market-pulse__value--positive {
  color: var(--gside-success);
}

.application-market-pulse .market-pulse__value--neutral {
  color: var(--gside-muted);
}

/* Preserve the existing >=97% threshold, with a quiet badge instead of a glow. */
.application-market-pulse .market-pulse__value--glow {
  background: var(--gside-success-soft);
  color: var(--gside-success);
  text-shadow: none;
  animation: none;
}

.application-market-pulse .market-pulse__empty {
  display: flex;
  align-items: center;
  min-height: 48px;
  color: var(--gside-muted);
  font-size: inherit;
}

.application-market-pulse .market-pulse__empty--row {
  min-height: 24px;
}

.application-market-pulse .market-pulse__status {
  margin-top: 3px;
  padding: 4px 6px;
  border-radius: 4px;
  background: var(--gside-danger-soft);
  color: var(--gside-danger);
  font-size: inherit;
}

.application-market-pulse [hidden] {
  display: none !important;
}

@media (max-width: 640px) {
  .application-market-pulse {
    padding-inline: 16px;
  }

  .application-market-pulse .market-pulse {
    font-size: 0.75rem;
  }

  .application-market-pulse .market-pulse__item,
  .application-market-pulse .market-pulse__label {
    min-height: 28px;
  }

  .application-market-pulse .market-pulse__empty {
    min-height: 56px;
  }

  .application-market-pulse .market-pulse__empty--row {
    min-height: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .application-market-pulse .market-pulse__item {
    transition: none;
  }
}
