:root {
  --black: #05070B;
  --graphite: #11161D;
  --card: #151B23;
  --card-deep: #0B1017;

  --gold: #C9A44C;
  --gold-light: #E3C97A;

  --text: #F5F7FA;
  --muted: #9AA4B2;

  --green: #17C964;
  --red: #F31260;

  --line: rgba(227, 201, 122, 0.18);
  --soft-line: rgba(245, 247, 250, 0.08);

  --shadow: 0 22px 70px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(201, 164, 76, 0.06) 0%, rgba(5, 7, 11, 0) 34%),
    linear-gradient(180deg, #05070B 0%, #080B10 48%, #05070B 100%);
  color: var(--text);
  font-family: Inter, Arial, Helvetica, sans-serif;
}

.is-hidden {
  display: none !important;
}

.login-view {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 34px 22px;
  overflow: hidden;
  background:
    radial-gradient(circle at 74% 12%, rgba(227, 201, 122, 0.16), transparent 24%),
    radial-gradient(circle at 18% 84%, rgba(201, 164, 76, 0.12), transparent 28%),
    linear-gradient(90deg, #05070B 0%, #070A10 48%, #11161D 100%);
}

.login-backdrop {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.login-gridline {
  position: absolute;
  inset: 0;
  opacity: 0.18;
  background-image:
    linear-gradient(rgba(227, 201, 122, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(227, 201, 122, 0.12) 1px, transparent 1px);
  background-size: 82px 82px;
  mask-image: linear-gradient(90deg, #000, transparent 62%);
}

.login-orbit {
  position: absolute;
  border: 1px solid rgba(227, 201, 122, 0.2);
  border-radius: 50%;
  animation: signalPulse 7s ease-in-out infinite;
}

.login-orbit-a {
  width: 460px;
  height: 460px;
  top: 10%;
  right: 8%;
}

.login-orbit-b {
  width: 280px;
  height: 280px;
  right: 18%;
  bottom: 12%;
  animation-delay: -2s;
}

.login-shell {
  position: relative;
  z-index: 1;
  width: min(1240px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 430px);
  gap: 0;
  align-items: stretch;
  min-height: 720px;
  border: 1px solid rgba(227, 201, 122, 0.2);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(5, 7, 11, 0.86);
  box-shadow: 0 34px 110px rgba(0, 0, 0, 0.55);
}

.login-hero {
  position: relative;
  min-height: 720px;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 24px;
  padding: 64px;
  background:
    linear-gradient(90deg, rgba(5, 7, 11, 0.96), rgba(5, 7, 11, 0.78)),
    radial-gradient(circle at 70% 44%, rgba(227, 201, 122, 0.18), transparent 28%);
}

.login-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(5, 7, 11, 0), rgba(227, 201, 122, 0.08));
  pointer-events: none;
}

.login-hero-logo-wrap,
.login-brand-copy,
.login-socials {
  position: relative;
  z-index: 1;
}

.login-logo {
  width: min(440px, 100%);
  max-height: 340px;
  object-fit: contain;
  filter: drop-shadow(0 26px 58px rgba(0, 0, 0, 0.62));
}

.login-brand-copy {
  max-width: 680px;
}

.login-eyebrow {
  display: inline-flex;
  color: var(--gold-light);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.login-brand-copy h1,
.login-card h2 {
  margin: 0;
  color: var(--text);
}

.login-brand-copy h1 {
  font-size: 46px;
  line-height: 1.1;
}

.login-brand-copy p,
.login-muted,
.login-message {
  color: var(--muted);
  line-height: 1.65;
}

.login-card {
  display: grid;
  align-content: center;
  gap: 22px;
  padding: 48px 42px;
  border-left: 1px solid rgba(227, 201, 122, 0.18);
  background:
    linear-gradient(180deg, rgba(245, 247, 250, 0.06), rgba(245, 247, 250, 0.01)),
    rgba(17, 22, 29, 0.94);
  backdrop-filter: blur(18px);
}

.login-card-head {
  display: grid;
  gap: 4px;
}

.login-card h2 {
  font-size: 34px;
  line-height: 1.18;
}

.login-muted {
  margin: 12px 0 0;
}

.login-field {
  display: grid;
  gap: 9px;
}

.login-field span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.login-field input,
.account-select {
  width: 100%;
  border: 1px solid rgba(227, 201, 122, 0.2);
  border-radius: 8px;
  background: rgba(5, 7, 11, 0.72);
  color: var(--text);
  outline: none;
}

.login-field input {
  height: 52px;
  padding: 0 16px;
  font-size: 15px;
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.login-field input:focus,
.account-select:focus {
  border-color: var(--gold-light);
  box-shadow: 0 0 0 3px rgba(227, 201, 122, 0.14);
  background: rgba(5, 7, 11, 0.92);
}

.login-button,
.logout-button {
  border: 1px solid rgba(227, 201, 122, 0.54);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
  letter-spacing: 0;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.login-button {
  height: 54px;
  color: #05070B;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  box-shadow: 0 18px 42px rgba(201, 164, 76, 0.22);
}

.login-button:hover,
.logout-button:hover {
  transform: translateY(-1px);
}

.login-button:disabled {
  cursor: wait;
  opacity: 0.78;
}

.login-message {
  min-height: 22px;
  margin: 0;
  color: var(--gold-light);
}

.login-security-note {
  display: grid;
  gap: 5px;
  padding: 14px;
  border: 1px solid rgba(227, 201, 122, 0.16);
  border-radius: 8px;
  background: rgba(5, 7, 11, 0.48);
}

.login-security-note strong {
  color: var(--gold-light);
  font-size: 13px;
}

.login-security-note span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.login-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.login-socials a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(227, 201, 122, 0.22);
  border-radius: 8px;
  color: var(--gold-light);
  background: rgba(5, 7, 11, 0.54);
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.login-socials a:hover {
  transform: translateY(-1px);
  border-color: rgba(227, 201, 122, 0.52);
  background: rgba(227, 201, 122, 0.1);
}

.logout-button {
  min-height: 68px;
  padding: 0 18px;
  color: var(--gold-light);
  background: rgba(5, 7, 11, 0.54);
}

.account-select {
  height: 28px;
  padding: 0 8px;
  font-size: 13px;
}

.brand-emblem {
  overflow: hidden;
}

.brand-emblem img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@keyframes signalPulse {
  0%, 100% {
    opacity: 0.18;
    transform: scale(0.96);
  }
  50% {
    opacity: 0.42;
    transform: scale(1.04);
  }
}

.dashboard-shell {
  width: min(1460px, calc(100% - 48px));
  margin: 0 auto;
  padding: 28px 0 44px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(17, 22, 29, 0.94);
  box-shadow: var(--shadow);
}

.brand,
.topbar-meta,
.panel-header,
.period-filter {
  display: flex;
  align-items: center;
}

.brand {
  gap: 16px;
  min-width: 320px;
}

.brand-emblem {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 1px solid rgba(227, 201, 122, 0.58);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(227, 201, 122, 0.18), rgba(21, 27, 35, 0.12)),
    #080B10;
  box-shadow: inset 0 0 0 1px rgba(245, 247, 250, 0.04), 0 16px 34px rgba(0, 0, 0, 0.28);
}

.brand-emblem-inner {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(201, 164, 76, 0.36);
  border-radius: 8px;
  color: var(--gold-light);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  background: rgba(5, 7, 11, 0.72);
}

.brand-copy {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--gold-light);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: 25px;
  line-height: 1.12;
}

h2 {
  font-size: 18px;
  line-height: 1.2;
}

.topbar-meta {
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.meta-item {
  min-width: 150px;
  min-height: 68px;
  padding: 12px 14px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: rgba(5, 7, 11, 0.54);
}

.meta-item span,
.kpi-card span,
.metric-card span,
.goal-item span,
.tech-list span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
  margin-bottom: 7px;
}

.meta-item strong,
.kpi-card strong,
.metric-card strong,
.goal-item strong,
.tech-list strong {
  color: var(--text);
  font-size: 15px;
  line-height: 1.25;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.status-pill::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 18px currentColor;
}

.status-online {
  color: var(--green) !important;
}

.status-error {
  color: var(--red) !important;
}

.status-loading {
  color: var(--gold-light) !important;
}

.kpi-grid,
.secondary-grid {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.kpi-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.kpi-card,
.metric-card,
.panel {
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(245, 247, 250, 0.035), rgba(245, 247, 250, 0)),
    linear-gradient(180deg, rgba(21, 27, 35, 0.98), rgba(11, 16, 23, 0.98));
  box-shadow: 0 16px 46px rgba(0, 0, 0, 0.22);
}

.kpi-card,
.metric-card {
  min-height: 112px;
  padding: 18px;
}

.kpi-card {
  position: relative;
  overflow: hidden;
}

.kpi-card::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 0;
  height: 2px;
  background: rgba(227, 201, 122, 0.18);
}

.kpi-card strong {
  font-size: 26px;
  font-weight: 800;
}

.kpi-card.accent strong,
.positive {
  color: var(--green);
}

.kpi-card.danger strong,
.negative {
  color: var(--red);
}

.kpi-card.neutral strong,
.metric-card strong {
  color: var(--muted);
}

.main-grid,
.bottom-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.05fr) minmax(330px, 0.95fr);
  gap: 18px;
  margin-top: 18px;
}

.panel {
  padding: 20px;
}

.panel-header {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.period-filter {
  gap: 8px;
  padding: 4px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: rgba(5, 7, 11, 0.42);
}

.period-button {
  min-width: 58px;
  height: 34px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 700;
}

.period-button.active,
.period-button:hover {
  color: var(--black);
  background: var(--gold-light);
  border-color: var(--gold-light);
}

.chart-frame {
  padding: 12px;
  border: 1px solid rgba(227, 201, 122, 0.12);
  border-radius: 8px;
  background: rgba(5, 7, 11, 0.52);
}

#equityChart {
  display: block;
  width: 100%;
  height: 320px;
  border-radius: 8px;
}

.panel-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
  margin: 12px 0 0;
}

.goal-list,
.tech-list {
  display: grid;
  gap: 14px;
}

.goal-item {
  padding: 15px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: rgba(5, 7, 11, 0.42);
}

.goal-item > div:first-child,
.tech-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.progress-track {
  height: 8px;
  margin-top: 13px;
  border-radius: 999px;
  background: rgba(245, 247, 250, 0.08);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
}

.progress-fill.muted {
  background: rgba(154, 164, 178, 0.32);
}

.danger-fill {
  background: linear-gradient(90deg, var(--red), #ff6f9f);
}

.secondary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric-card {
  min-height: 92px;
}

.metric-card strong {
  font-size: 17px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--soft-line);
  text-align: left;
  font-size: 13px;
}

th {
  color: var(--gold-light);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

td {
  color: var(--text);
}

.empty-row {
  padding: 0;
}

.empty-state {
  display: grid;
  gap: 6px;
  justify-items: center;
  padding: 32px 16px;
  color: var(--muted);
  text-align: center;
}

.empty-state strong {
  color: var(--text);
  font-size: 15px;
}

.empty-state span {
  max-width: 560px;
  line-height: 1.5;
}

.tech-list div {
  padding: 15px 0;
  border-bottom: 1px solid var(--soft-line);
}

.tech-list div:last-child {
  border-bottom: 0;
}

@media (min-width: 1280px) {
  .kpi-grid {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }

  .secondary-grid {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }

  .kpi-card strong {
    font-size: 22px;
  }
}

@media (max-width: 1180px) {
  .login-shell {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .login-hero {
    min-height: auto;
    padding: 44px;
  }

  .main-grid,
  .bottom-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .login-view {
    padding: 18px 14px;
  }

  .login-hero,
  .login-card {
    padding: 24px;
  }

  .login-brand-copy h1 {
    font-size: 30px;
  }

  .login-logo {
    width: min(300px, 100%);
  }

  .login-card h2 {
    font-size: 25px;
  }

  .dashboard-shell {
    width: min(100% - 28px, 1460px);
    padding-top: 16px;
  }

  .topbar,
  .brand,
  .panel-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-meta,
  .period-filter {
    width: 100%;
  }

  .meta-item {
    flex: 1 1 140px;
  }

  .kpi-grid,
  .secondary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .kpi-card strong {
    font-size: 20px;
  }
}
