:root {
  color-scheme: dark;
  --bg: #090d12;
  --panel: rgba(20, 27, 36, 0.88);
  --panel-2: rgba(31, 40, 52, 0.92);
  --text: #f3f6f8;
  --muted: #a6b2bd;
  --line: rgba(255, 255, 255, 0.11);
  --gold: #f2c75b;
  --green: #45c084;
  --red: #e66f6f;
  --cyan: #58d3e4;
  --blue: #6c8dff;
  --ink: #0d1015;
  --radius: 8px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 18% 12%, rgba(88, 211, 228, 0.13), transparent 28%),
    radial-gradient(circle at 84% 4%, rgba(242, 199, 91, 0.11), transparent 30%),
    linear-gradient(180deg, #090d12 0%, #0d1118 42%, #0a0d12 100%);
  color: var(--text);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(18px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
  background: rgba(8, 12, 17, 0.78);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 210px;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(242, 199, 91, 0.55);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(242, 199, 91, 0.18), rgba(88, 211, 228, 0.08)),
    #171714;
  color: var(--gold);
  font-weight: 800;
  box-shadow: 0 12px 32px rgba(242, 199, 91, 0.16);
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-link {
  min-height: 38px;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 14px;
}

.nav-link:hover,
.nav-link.is-active {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

main {
  width: min(1200px, calc(100% - 36px));
  margin: 0 auto;
  padding: 24px 0 64px;
}

.hero-site {
  position: relative;
  display: grid;
  min-height: min(660px, calc(100vh - 110px));
  overflow: hidden;
  align-items: end;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #0b0f15;
  box-shadow: var(--shadow);
  isolation: isolate;
}

.hero-site::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  border: 1px solid rgba(242, 199, 91, 0.24);
  border-radius: inherit;
  box-shadow: inset 0 0 90px rgba(88, 211, 228, 0.12);
}

.hero-site img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(6, 9, 13, 0.94) 0%, rgba(6, 9, 13, 0.74) 40%, rgba(6, 9, 13, 0.18) 100%),
    linear-gradient(180deg, transparent 58%, rgba(6, 9, 13, 0.82) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(720px, 100%);
  padding: clamp(28px, 6vw, 68px);
}

.hero-content h1 {
  margin: 0;
  font-size: clamp(58px, 10vw, 118px);
  line-height: 0.9;
  letter-spacing: 0;
  text-shadow: 0 20px 52px rgba(0, 0, 0, 0.6);
}

.hero-content p:not(.eyebrow) {
  max-width: 660px;
  margin: 20px 0 0;
  color: #d8e1e8;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.55;
}

.hero-tagline {
  color: var(--gold) !important;
  font-weight: 800;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.ticker-strip,
.trust-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  margin-bottom: 48px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
}

.ticker-strip span,
.trust-strip span {
  flex: 0 0 auto;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.055);
  color: #d8e1e8;
  font-weight: 750;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin: 44px 0 18px;
}

.section-heading h2,
.cta-band h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.05;
  letter-spacing: 0;
}

.section-lede {
  max-width: 780px;
  margin: -6px 0 18px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
}

.section-spaced {
  margin-top: 18px;
}

.page-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
  margin-bottom: 28px;
}

.page-header h1 {
  max-width: 860px;
  margin: 0;
  font-size: clamp(36px, 6vw, 76px);
  line-height: 0.98;
  letter-spacing: 0;
}

.page-header p {
  max-width: 760px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
}

.eyebrow {
  margin: 0 0 12px !important;
  color: var(--gold) !important;
  font-size: 13px !important;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.page-actions {
  display: flex;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 750;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, #ffe28a, var(--gold));
  color: var(--ink);
  box-shadow: 0 14px 34px rgba(242, 199, 91, 0.22);
}

.btn-secondary {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.stat {
  min-height: 104px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
  position: relative;
  overflow: hidden;
}

.stat::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--cyan));
}

.stat span,
.api-list small {
  display: block;
  color: var(--muted);
}

.stat strong {
  display: block;
  margin-top: 10px;
  font-size: 24px;
}

.stat-good {
  border-color: rgba(69, 192, 132, 0.4);
}

.stat-warn {
  border-color: rgba(225, 185, 85, 0.5);
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.concept-grid,
.timeframe-rail {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0 44px;
}

.concept-grid span,
.timeframe-rail span {
  display: grid;
  min-height: 78px;
  place-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(242, 199, 91, 0.08), rgba(88, 211, 228, 0.045)),
    var(--panel);
  color: #e6edf3;
  font-weight: 800;
  text-align: center;
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.16);
}

.timeframe-rail {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.timeframe-rail span {
  min-height: 96px;
  font-family: "JetBrains Mono", "IBM Plex Mono", Consolas, monospace;
  font-size: 24px;
  color: var(--gold);
}

.card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(18px);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.card:hover {
  transform: translateY(-3px);
  border-color: rgba(242, 199, 91, 0.34);
  background: rgba(24, 32, 43, 0.94);
}

.card h2 {
  margin: 0 0 14px;
  font-size: 20px;
}

.card footer {
  margin-top: 18px;
}

.card p,
.card li {
  color: var(--muted);
  line-height: 1.65;
}

.feature-grid .card {
  min-height: 176px;
  border-top-color: rgba(242, 199, 91, 0.45);
}

.process-grid .card {
  min-height: 190px;
  background:
    linear-gradient(180deg, rgba(88, 211, 228, 0.08), transparent 58%),
    var(--panel);
}

.platform-preview {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(18px, 4vw, 42px);
  align-items: center;
  margin-top: 18px;
  padding: clamp(18px, 3vw, 30px);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.platform-preview h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.04;
  letter-spacing: 0;
}

.platform-preview p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.65;
}

.platform-preview img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.34);
  transform: perspective(1000px) rotateY(-2deg);
}

.preview-points {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.preview-points span {
  padding: 8px 10px;
  border: 1px solid rgba(88, 211, 228, 0.28);
  border-radius: var(--radius);
  background: rgba(88, 211, 228, 0.08);
  color: #c8f5fb;
  font-weight: 750;
}

.decision-box {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.decision-box span {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-2);
}

.status-list {
  display: grid;
  gap: 10px;
}

.status-list div {
  display: grid;
  grid-template-columns: minmax(120px, 0.8fr) minmax(0, 1.2fr);
  gap: 14px;
  align-items: center;
  min-height: 48px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-2);
}

.status-list span {
  color: var(--muted);
}

.status-list strong {
  overflow-wrap: anywhere;
}

.component-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-2);
  color: var(--text);
  font-size: 13px;
  font-weight: 750;
}

.cta-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 18px;
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid rgba(242, 199, 91, 0.34);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(242, 199, 91, 0.14), rgba(88, 211, 228, 0.08)),
    rgba(255, 255, 255, 0.045);
  box-shadow: var(--shadow);
}

.cta-band p:not(.eyebrow) {
  max-width: 760px;
  color: var(--muted);
  line-height: 1.65;
}

.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.tabs button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-2);
  color: var(--muted);
}

.tabs button.is-active {
  color: var(--ink);
  background: var(--cyan);
}

.check-list {
  padding-left: 20px;
}

.api-list {
  display: grid;
  gap: 10px;
}

.api-list div {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 8px 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-2);
}

.api-list code {
  color: var(--green);
  font-weight: 800;
}

.api-list small {
  grid-column: 2;
}

.form-wrap {
  max-width: 620px;
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 18px;
  align-items: start;
}

.wide-form {
  max-width: 980px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

form {
  display: grid;
  gap: 16px;
}

.field {
  display: grid;
  gap: 8px;
}

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

.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-2);
  color: var(--text);
  padding: 12px 13px;
  outline: none;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--gold);
}

.check-field {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--muted);
  line-height: 1.55;
}

.check-field input {
  margin-top: 4px;
}

.form-actions {
  display: flex;
  justify-content: flex-start;
}

.alert {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-2);
}

.alert-success {
  border-color: rgba(69, 192, 132, 0.45);
  color: #bff3d7;
}

.alert-danger {
  border-color: rgba(230, 111, 111, 0.5);
  color: #ffc9c9;
}

.empty-state,
.loading {
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.security-note {
  margin-top: 18px;
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(56, 189, 248, 0.12), rgba(242, 199, 91, 0.06)),
    rgba(255, 255, 255, 0.045);
  box-shadow: var(--shadow);
}

.admin-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.admin-sidebar {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 22px;
  min-height: calc(100vh - 140px);
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(242, 199, 91, 0.09), transparent 28%),
    rgba(8, 12, 17, 0.88);
  box-shadow: var(--shadow);
}

.admin-sidebar h2 {
  margin: 16px 0 6px;
}

.admin-sidebar p {
  margin: 0;
  color: var(--muted);
}

.admin-main {
  min-width: 0;
}

.admin-main .page-header {
  margin-bottom: 18px;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.admin-table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
}

.admin-table th,
.admin-table td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.admin-table th {
  color: var(--gold);
  font-size: 12px;
  text-transform: uppercase;
}

.admin-table td {
  color: #d8e1e8;
}

.admin-table small {
  color: var(--muted);
}

.context-note {
  margin: 0 0 14px;
  color: #aeb8c2;
}

.key-reveal {
  margin-top: 12px;
  padding: 12px;
  border: 1px dashed rgba(242, 199, 91, 0.55);
  border-radius: var(--radius);
  background: rgba(242, 199, 91, 0.08);
  display: grid;
  gap: 8px;
}

.key-reveal span {
  color: #f8d66c;
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
}

.key-copy-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.key-reveal code {
  flex: 1 1 320px;
  color: #ffe28a;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}

.source-list {
  display: grid;
  gap: 10px;
}

.source-list div {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-2);
}

.source-list span,
.source-list small {
  color: var(--muted);
}

.admin-loading {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: #13181c;
  color: var(--text);
}

.admin-app {
  width: 100%;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 325px minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
  background: #13181c;
}

.admin-app .admin-sidebar {
  position: sticky;
  top: 0;
  min-height: 100vh;
  height: 100vh;
  overflow-y: auto;
  padding: 22px 13px;
  border: 0;
  border-right: 1px solid #343b42;
  border-radius: 0;
  background: #20252a;
  box-shadow: none;
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 9px 28px;
}

.admin-brand strong {
  display: block;
  font-size: 30px;
  line-height: 1;
}

.admin-brand small {
  color: #9da8b3;
}

.admin-menu {
  display: grid;
  gap: 4px;
}

.admin-menu::before,
.admin-menu::after {
  color: #aeb8c2;
  font-size: 13px;
  letter-spacing: 0;
  text-transform: uppercase;
  padding: 18px 20px 8px;
}

.admin-menu::before {
  content: "Navigation";
}

.admin-menu::after {
  content: "Admin Tools";
}

.admin-menu-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 18px;
  align-items: center;
  min-height: 48px;
  width: 100%;
  border: 0;
  border-radius: 5px;
  padding: 0 12px;
  background: transparent;
  color: #c5ced8;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.admin-menu-item.is-active,
.admin-menu-item:hover {
  background: #2b3036;
  color: #fff;
}

.admin-menu-item span {
  color: #dfe7ef;
  font-size: 20px;
}

.admin-menu-item strong {
  font-size: 16px;
}

.admin-menu-item i {
  color: #aab3bc;
  font-style: normal;
  text-align: right;
}

.admin-user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding: 12px;
  border: 1px solid #3a424a;
  border-radius: 8px;
  background: #252b31;
}

.admin-user-card > span,
.admin-avatar {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 2px solid #48525d;
  border-radius: 50%;
  background: linear-gradient(135deg, #f5c542, #38bdf8);
  color: #101418;
  font-weight: 900;
}

.admin-user-card strong,
.admin-user-card small {
  display: block;
}

.admin-user-card small {
  color: #99a5b1;
  text-transform: capitalize;
}

.admin-app .admin-main {
  min-width: 0;
  background: #151a1f;
}

.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 8;
  display: grid;
  grid-template-columns: 48px minmax(220px, 1fr) auto;
  gap: 28px;
  align-items: center;
  min-height: 88px;
  padding: 0 24px 0 44px;
  border-bottom: 1px solid #272e35;
  background: #20252a;
}

.admin-search {
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(100%, 1040px);
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid #3d4650;
  border-radius: 24px;
  background: #1e2328;
  color: #c5ced8;
}

.admin-search span {
  font-size: 28px;
}

.admin-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  font-size: 18px;
}

.admin-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.admin-icon-button {
  position: relative;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 0;
  background: transparent;
  color: #d9e1ea;
  cursor: pointer;
  font-size: 25px;
}

.admin-icon-button.has-badge span {
  position: absolute;
  top: -4px;
  right: -4px;
  display: grid;
  min-width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: #ff202e;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.admin-avatar {
  border-color: #4c5761;
  cursor: pointer;
}

.admin-content {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 34px 24px 42px 30px;
}

.admin-content.is-updating {
  opacity: 0.78;
  pointer-events: none;
}

.admin-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.admin-title-row h1 {
  margin: 0;
  color: #edf6ff;
  font-size: 28px;
}

.admin-title-row p {
  margin: 10px 0 0;
  color: #bdd0e2;
  font-size: 17px;
}

.admin-hero-grid {
  display: grid;
  grid-template-columns: minmax(320px, 2fr) repeat(4, minmax(170px, 1fr));
  gap: 30px;
}

.admin-welcome-panel,
.metric-card,
.admin-panel {
  border: 1px solid transparent;
  border-radius: 19px;
  background: #20252a;
  color: #eef6ff;
  box-shadow: none;
}

.admin-welcome-panel {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  min-height: 270px;
  padding: 20px;
}

.admin-welcome-panel h2 {
  margin: 0 0 12px;
  font-size: 28px;
}

.admin-welcome-panel p {
  max-width: 430px;
  color: #d0d6dc;
  font-size: 18px;
  line-height: 1.5;
}

.admin-gift {
  align-self: end;
  display: grid;
  width: 140px;
  height: 140px;
  place-items: center;
  border-radius: 26px;
  background: linear-gradient(135deg, #ffb703, #ff006e, #8338ec);
  color: #fff;
  font-size: 66px;
  transform: rotate(45deg);
}

.metric-card {
  min-height: 270px;
  padding: 20px;
  overflow: hidden;
}

.metric-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.metric-icon {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 50%;
  font-size: 23px;
}

.metric-blue .metric-icon { background: rgba(25, 111, 255, 0.17); color: #1688ff; }
.metric-green .metric-icon { background: rgba(34, 197, 94, 0.15); color: #22c55e; }
.metric-cyan .metric-icon { background: rgba(0, 188, 255, 0.13); color: #00bcff; }
.metric-gold .metric-icon { background: rgba(245, 197, 66, 0.16); color: #f5c542; }

.metric-delta {
  font-size: 17px;
  font-weight: 900;
}

.trend-up { color: #00e082; }
.trend-flat { color: #38bdf8; }

.metric-card h2 {
  margin: 20px 0 2px;
  font-size: 32px;
}

.metric-card p {
  margin: 0;
  color: #eef6ff;
  font-size: 18px;
}

.sparkline {
  display: flex;
  align-items: end;
  gap: 8px;
  height: 76px;
  margin-top: 20px;
}

.sparkline i {
  flex: 1;
  border-radius: 999px 999px 4px 4px;
  background: #1688ff;
}

.sparkline i:nth-child(1) { height: 26px; }
.sparkline i:nth-child(2) { height: 64px; }
.sparkline i:nth-child(3) { height: 40px; }
.sparkline i:nth-child(4) { height: 56px; }
.sparkline i:nth-child(5) { height: 30px; }
.sparkline i:nth-child(6) { height: 44px; }
.sparkline i:nth-child(7) { height: 22px; }
.sparkline-green i { background: #93ed2f; }
.sparkline-cyan i { background: #00bcff; }
.sparkline-gold i { background: #ffb400; }

.admin-analytics-grid,
.admin-management-grid {
  display: grid;
  grid-template-columns: minmax(380px, 0.95fr) minmax(0, 1.95fr);
  gap: 30px;
  margin-top: 30px;
}

.admin-management-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-crud-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.8fr) minmax(0, 1.6fr);
  gap: 30px;
}

.decision-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 30px;
  margin-bottom: 30px;
}

.decision-summary-grid .metric-card {
  min-height: 190px;
}

.decision-summary-grid .sparkline {
  height: 44px;
}

.decision-panel {
  margin-top: 0;
}

.decision-panel.is-updating {
  opacity: 0.72;
  pointer-events: none;
}

.decision-filters {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr)) auto;
  gap: 14px;
  align-items: end;
  margin-bottom: 18px;
}

.decision-filters .form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}

.decision-table {
  min-width: 1280px;
}

.decision-table td {
  font-size: 14px;
}

.decision-table td strong {
  display: block;
  margin-bottom: 4px;
}

.decision-table td small {
  display: block;
  line-height: 1.5;
}

.decision-error-row td {
  background: rgba(244, 63, 94, 0.035);
}

.decision-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 76px;
  margin-bottom: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.16);
  color: #dbe7f3;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
}

.decision-buy {
  background: rgba(34, 197, 94, 0.16);
  color: #50f394;
}

.decision-sell {
  background: rgba(244, 63, 94, 0.16);
  color: #ff708b;
}

.decision-hold,
.decision-wait,
.decision-avoid {
  background: rgba(245, 197, 66, 0.15);
  color: #ffd76a;
}

.decision-error {
  background: rgba(244, 63, 94, 0.18);
  color: #ff8fa3;
}

.raw-decision-note {
  display: block;
  color: #ffb86b;
  font-weight: 800;
}

.decision-context {
  display: grid;
  gap: 6px;
  max-width: 360px;
}

.decision-context span {
  color: #d8e1e8;
  line-height: 1.45;
}

.decision-runtime {
  display: grid;
  gap: 7px;
  min-width: 190px;
}

.decision-runtime span {
  display: grid;
  gap: 1px;
  color: #d8e1e8;
  line-height: 1.25;
  word-break: break-word;
}

.decision-runtime strong {
  margin: 0;
  color: #8fa1b3;
  font-size: 11px;
  text-transform: uppercase;
}

.market-box-layout {
  align-items: start;
}

.market-box-table {
  min-width: 860px;
}

.market-box-table td strong {
  display: block;
  margin-bottom: 4px;
}

.market-box-table td small {
  display: block;
  color: #8fa1b3;
  line-height: 1.4;
}

.tf-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  margin-bottom: 6px;
  padding: 6px 10px;
  border-radius: 8px;
  color: #071016;
  font-size: 12px;
  font-weight: 900;
}

.tf-d1 {
  background: #e5eef7;
}

.tf-h4 {
  background: #ffbd4a;
}

.tf-h1 {
  background: #62e38b;
}

.market-box-note {
  display: block;
  max-width: 320px;
  color: #d8e1e8;
  line-height: 1.45;
}

.admin-panel {
  padding: 20px;
}

.admin-content > .admin-panel {
  margin-top: 30px;
}

.span-wide {
  min-width: 0;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.panel-heading h2 {
  margin: 0;
  font-size: 28px;
}

.panel-menu {
  border: 0;
  background: transparent;
  color: #d9e1ea;
  cursor: pointer;
  font-size: 28px;
}

.donut-wrap {
  display: grid;
  min-height: 330px;
  place-items: center;
}

.donut-chart {
  display: grid;
  width: 260px;
  height: 260px;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #20252a 0 47%, transparent 48%),
    conic-gradient(#ff6b00 0 32%, #ff006e 32% 55%, #49e124 55% 72%, #3aa0ff 72% 100%);
}

.donut-chart span,
.donut-chart small {
  grid-column: 1;
  grid-row: 1;
}

.donut-chart span {
  transform: translateY(-10px);
  font-size: 42px;
}

.donut-chart small {
  transform: translateY(30px);
  font-size: 20px;
  font-weight: 800;
}

.legend-list {
  display: grid;
  gap: 16px;
}

.legend-list span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #edf6ff;
}

.legend-list i,
.chart-legend i {
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 10px;
  border-radius: 50%;
}

.legend-blue { background: #1688ff; }
.legend-pink { background: #ff006e; }
.legend-green { background: #22c55e; }
.legend-gold { background: #ffd21a; }
.legend-cyan { background: #38bdf8; }

.empty-donut {
  background:
    radial-gradient(circle at center, #20252a 0 47%, transparent 48%),
    conic-gradient(#3c444b 0 100%) !important;
}

.bar-chart {
  display: grid;
  grid-template-columns: repeat(9, minmax(44px, 1fr));
  align-items: end;
  gap: 18px;
  min-height: 280px;
  padding: 34px 22px 8px;
  border-bottom: 2px solid #c9d0d8;
}

.bar-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: end;
  gap: 6px;
}

.bar-group small {
  grid-column: 1 / -1;
  margin-top: 10px;
  color: #bcd2e8;
  text-align: center;
}

.bar {
  width: 100%;
  min-height: 6px;
  border-radius: 6px;
}

.bar-gold { background: linear-gradient(180deg, #ffd21a, #ff7100); }
.bar-blue { background: linear-gradient(180deg, #13c7ff, #0d6fff); }

.ai-call-chart {
  display: grid;
  grid-template-columns: repeat(9, minmax(44px, 1fr));
  align-items: end;
  gap: 18px;
  min-height: 280px;
  padding: 34px 22px 8px;
  border-bottom: 2px solid #c9d0d8;
}

.ai-call-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: end;
  gap: 6px;
}

.ai-call-group small {
  grid-column: 1 / -1;
  margin-top: 10px;
  color: #bcd2e8;
  text-align: center;
}

.ai-bar {
  width: 100%;
  min-height: 6px;
  border-radius: 6px;
}

.ai-call-bar { background: linear-gradient(180deg, #13c7ff, #0d6fff); }
.ai-response-bar { background: linear-gradient(180deg, #ffd21a, #ff7100); }

.chart-legend {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-top: 14px;
}

.mini-metrics {
  display: grid;
  grid-template-columns: 120px 1fr 120px 1fr;
  gap: 18px;
  align-items: center;
  margin-top: 28px;
  padding: 24px;
  border: 1px solid #47515b;
  border-radius: 20px;
}

.mini-ring {
  width: 100px;
  height: 100px;
  border-radius: 50%;
}

.blue-ring {
  background: radial-gradient(circle at center, #20252a 0 49%, transparent 50%), conic-gradient(#1aa0ff 0 76%, #3c444b 76% 100%);
}

.gold-ring {
  background: radial-gradient(circle at center, #20252a 0 49%, transparent 50%), conic-gradient(#ffd21a 0 84%, #3c444b 84% 100%);
}

.mini-metrics strong {
  display: block;
  font-size: 40px;
}

.mini-metrics span {
  color: #d7e0e8;
}

.btn-small {
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
}

.muted-text {
  color: #aeb8c2;
}

.ai-performance-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.ai-performance-grid div {
  min-height: 118px;
  padding: 16px;
  border: 1px solid #3a424a;
  border-radius: 12px;
  background: #252b31;
}

.ai-performance-grid strong {
  display: block;
  color: #edf6ff;
  font-size: 32px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.ai-performance-grid span {
  display: block;
  margin-top: 8px;
  color: #aeb8c2;
}

.ai-settings-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.ai-settings-summary div {
  min-height: 112px;
  padding: 16px;
  border: 1px solid #3a424a;
  border-radius: 12px;
  background: #252b31;
}

.ai-settings-summary span,
.ai-settings-summary strong {
  display: block;
}

.ai-settings-summary span {
  color: #aeb8c2;
}

.ai-settings-summary strong {
  margin-top: 10px;
  color: #edf6ff;
  font-size: 24px;
  overflow-wrap: anywhere;
}

.broker-breakdown {
  display: grid;
  gap: 12px;
}

.distribution-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  min-height: 74px;
  padding: 14px;
  overflow: hidden;
  border: 1px solid #3a424a;
  border-radius: 12px;
  background: #252b31;
}

.distribution-row div,
.distribution-row em {
  position: relative;
  z-index: 1;
}

.distribution-row strong,
.distribution-row span {
  display: block;
}

.distribution-row strong {
  color: #edf6ff;
  overflow-wrap: anywhere;
}

.distribution-row span {
  margin-top: 4px;
  color: #aeb8c2;
}

.distribution-row em {
  color: #f5c542;
  font-style: normal;
  font-weight: 900;
}

.distribution-row i {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, #1688ff, #f5c542);
}

@media (max-width: 1500px) {
  .admin-hero-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .admin-welcome-panel {
    grid-column: 1 / -1;
    min-height: 220px;
  }

  .admin-analytics-grid {
    grid-template-columns: 1fr;
  }

  .admin-crud-layout,
  .decision-filters {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1120px) {
  .admin-app {
    grid-template-columns: 1fr;
  }

  .admin-app .admin-sidebar {
    position: static;
    min-height: auto;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid #343b42;
  }

  .admin-menu {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-menu::before,
  .admin-menu::after {
    display: none;
  }

  .admin-topbar {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .admin-actions {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .admin-content {
    padding: 22px 14px 34px;
  }

  .admin-hero-grid,
  .admin-crud-layout,
  .admin-management-grid,
  .decision-summary-grid,
  .decision-filters,
  .ai-performance-grid,
  .ai-settings-summary,
  .mini-metrics {
    grid-template-columns: 1fr;
  }

  .admin-topbar {
    padding: 14px;
  }

  .admin-search {
    min-width: 0;
  }

  .bar-chart {
    overflow-x: auto;
  }
}

.security-note h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
}

.security-note p:not(.eyebrow) {
  max-width: 860px;
  color: var(--muted);
  line-height: 1.65;
}

.timeline {
  display: grid;
  gap: 16px;
}

.timeline article {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 16px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
}

.timeline span {
  color: var(--gold);
  font-weight: 900;
  text-transform: uppercase;
}

.timeline h2 {
  margin: 0 0 8px;
}

.timeline p {
  grid-column: 2;
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.site-footer {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.2fr);
  gap: 24px;
  margin-top: 44px;
  padding: 28px 0 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.site-footer strong {
  display: block;
  color: var(--text);
}

.site-footer p {
  margin: 8px 0 0;
}

.site-footer nav {
  display: flex;
  gap: 10px 14px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.site-footer a {
  color: #d8e1e8;
}

.site-footer small {
  grid-column: 1 / -1;
  color: #8d9aaa;
}

@media (max-width: 820px) {
  .topbar,
  .page-header {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .topbar {
    flex-direction: column;
  }

  .nav {
    justify-content: flex-start;
  }

  .stats-grid,
  .content-grid,
  .feature-grid,
  .article-grid,
  .process-grid,
  .auth-layout,
  .admin-shell,
  .admin-grid,
  .platform-preview {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: static;
    min-height: auto;
  }

  .concept-grid,
  .timeframe-rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .form-grid,
  .timeline article,
  .site-footer {
    grid-template-columns: 1fr;
  }

  .timeline p {
    grid-column: 1;
  }

  .site-footer nav {
    justify-content: flex-start;
  }

  .page-header h1 {
    font-size: 42px;
  }

  .hero-site {
    min-height: 620px;
  }

  .hero-overlay {
    background:
      linear-gradient(180deg, rgba(6, 9, 13, 0.54) 0%, rgba(6, 9, 13, 0.95) 56%, rgba(6, 9, 13, 0.98) 100%);
  }

  .cta-band {
    align-items: stretch;
    flex-direction: column;
  }

  .status-list div {
    grid-template-columns: 1fr;
  }
}
