* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  min-height: 100%;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

[hidden] {
  display: none !important;
}

body {
  font-family: "IBM Plex Sans", "Segoe UI", Arial, sans-serif;
  background: linear-gradient(135deg, var(--bg-darker) 0%, var(--bg-dark) 100%);
  color: var(--text-primary);
  overflow-x: clip;
}

a {
  color: var(--neon-blue);
  text-decoration: none;
  transition: all 0.2s ease;
}

a:hover {
  color: var(--neon-green);
  text-shadow: 0 0 10px rgba(0, 255, 159, 0.4);
}

button,
input,
select,
textarea {
  font: inherit;
}

.home-button {
  position: static;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  min-width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 12px;
  color: #f1f5f9;
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.18), rgba(139, 0, 255, 0.14));
  border: 1px solid rgba(0, 240, 255, 0.35);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35), 0 0 16px rgba(0, 240, 255, 0.15);
  backdrop-filter: blur(10px);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.home-button:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 240, 255, 0.7);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4), 0 0 24px rgba(0, 240, 255, 0.32);
}

.home-button svg {
  width: 18px;
  height: 18px;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 16px 22px;
  border-bottom: 2px solid var(--border-color);
  background: rgba(2, 6, 23, 0.88);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 60;
}

.menu-toggle-btn {
  display: none;
  border: 1px solid rgba(0, 240, 255, 0.45);
  border-radius: 10px;
  background: rgba(2, 10, 34, 0.8);
  color: #e7f7ff;
  width: 42px;
  height: 42px;
  font-size: 20px;
  line-height: 1;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.top-actions {
  display: none;
  align-items: center;
  gap: 6px;
  justify-self: end;
}

.lang-mobile-wrap {
  display: none;
}

.lang-mobile-select {
  border: 1px solid rgba(0, 240, 255, 0.35);
  border-radius: 9px;
  background: rgba(2, 6, 23, 0.72);
  color: var(--text-primary);
  font-size: 11px;
  font-weight: 700;
  padding: 6px;
  width: 54px;
  min-height: 40px;
  height: 40px;
}

.menu-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(1, 6, 20, 0.62);
  z-index: 55;
}

.brand-wrap {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  justify-self: start;
  min-width: 0;
  flex-wrap: wrap;
}

.identity-chip {
  white-space: nowrap;
  border-radius: 999px;
  border: 1px solid transparent;
  min-height: 34px;
  padding: 8px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.identity-chip-service {
  color: #ffe9c0;
  border-color: rgba(255, 178, 45, 0.55);
  background: linear-gradient(135deg, rgba(255, 145, 0, 0.18), rgba(255, 58, 58, 0.12));
  box-shadow: 0 0 12px rgba(255, 145, 0, 0.26);
  text-transform: none;
  letter-spacing: 0.01em;
}

.identity-chip-user {
  color: #e8f2ff;
  border-color: rgba(0, 218, 255, 0.62);
  background: linear-gradient(135deg, rgba(0, 188, 255, 0.2), rgba(14, 116, 255, 0.14));
  box-shadow: 0 0 12px rgba(0, 188, 255, 0.2);
  text-transform: none;
}

.menu-user-chip,
.menu-ecosystem-chip {
  display: none;
}

.logo-seal {
  position: relative;
  width: 54px;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.logo-ring {
  position: absolute;
  inset: -7px;
  width: calc(100% + 14px);
  height: calc(100% + 14px);
  animation: ring-spin 20s linear infinite;
}

.logo-ring-text {
  fill: rgba(0, 240, 255, 0.88);
  font-size: 8.4px;
  letter-spacing: 0.4px;
  font-family: "Noto Naskh Arabic", serif;
}

.brand-logo {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border-color);
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.22), 0 0 26px rgba(0, 240, 255, 0.16);
}

.brand {
  font-size: 34px;
  font-weight: 700;
  color: var(--neon-blue);
  text-shadow: var(--border-glow);
  letter-spacing: 0.02em;
  justify-self: center;
}

.brand-frame {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 32px;
  border-radius: 18px;
  border: 1px solid transparent;
  background:
    linear-gradient(rgba(2, 6, 23, 0.9), rgba(2, 6, 23, 0.9)) padding-box,
    linear-gradient(120deg, rgba(0, 240, 255, 0.8), rgba(255, 0, 110, 0.85), rgba(0, 255, 159, 0.82)) border-box;
  box-shadow:
    0 0 0 1px rgba(0, 240, 255, 0.22),
    0 0 18px rgba(0, 240, 255, 0.24),
    0 0 30px rgba(255, 0, 110, 0.12);
  overflow: hidden;
}

.brand-frame::before {
  content: "";
  position: absolute;
  inset: -120% -40%;
  background: linear-gradient(110deg, transparent 40%, rgba(255, 255, 255, 0.16), transparent 60%);
  transform: rotate(8deg);
  animation: brand-shine 4s linear infinite;
  pointer-events: none;
}

.brand-ar {
  font-family: "Noto Naskh Arabic", serif;
  direction: rtl;
  line-height: 1;
  transform: perspective(420px) rotateX(13deg);
  background: linear-gradient(90deg, #cbf7ff 0%, #00f0ff 30%, #f8feff 55%, #00ff9f 80%, #cbf7ff 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow:
    0 1px 0 #063149,
    0 2px 0 #063149,
    0 3px 0 #052235,
    0 4px 0 #031a2a,
    0 8px 18px rgba(0, 240, 255, 0.38),
    0 16px 34px rgba(0, 0, 0, 0.46);
  animation: brand-flow 6s ease-in-out infinite;
}

.header-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  justify-self: end;
  min-width: 0;
}

.project-meta {
  text-transform: none;
}

.project-jump {
  display: inline-flex;
  align-items: center;
  gap: 0;
}

.project-jump select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  border: 1px solid rgba(0, 240, 255, 0.3);
  border-radius: 9px;
  background: rgba(2, 6, 23, 0.74);
  color: var(--text-primary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.1;
  padding: 5px 25px 5px 9px;
  width: 98px;
  min-width: 98px;
  max-width: 98px;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(163, 238, 255, 0.9) 50%),
    linear-gradient(135deg, rgba(163, 238, 255, 0.9) 50%, transparent 50%);
  background-position:
    calc(100% - 10px) calc(50% - 1px),
    calc(100% - 6px) calc(50% - 1px);
  background-size: 4px 4px, 4px 4px;
  background-repeat: no-repeat;
  text-align: center;
  text-align-last: center;
}

.project-jump select:focus,
.pref-switch select:focus,
.chat-input:focus {
  outline: none;
  border-color: var(--neon-blue);
  box-shadow: 0 0 0 2px rgba(0, 240, 255, 0.12);
}

.project-jump select option {
  text-align: center;
  background: #061631;
  color: #dff8ff;
  font-weight: 700;
}

.pref-switchers {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.pref-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.pref-switch select {
  border: 1px solid rgba(0, 240, 255, 0.28);
  border-radius: 8px;
  background: rgba(2, 6, 23, 0.72);
  color: var(--text-primary);
  font-size: 11px;
  font-weight: 700;
  padding: 5px 8px;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(0, 240, 255, 0.35);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(2, 6, 23, 0.65);
}

.lang-btn {
  border: 0;
  color: var(--text-secondary);
  background: transparent;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lang-btn + .lang-btn {
  border-left: 1px solid rgba(0, 240, 255, 0.2);
}

.lang-btn.active {
  color: #ffffff;
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.32), rgba(139, 0, 255, 0.28));
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.35);
}

.data-badge {
  font-size: 11px;
  line-height: 1;
  padding: 6px 10px;
  border-radius: 12px;
  border: 1px solid;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
}

.data-badge.is-live {
  background: rgba(0, 255, 159, 0.18);
  border-color: var(--neon-green);
  color: var(--neon-green);
  box-shadow: 0 0 12px rgba(0, 255, 159, 0.28);
}

.data-badge.is-loading {
  background: rgba(148, 163, 184, 0.16);
  border-color: rgba(148, 163, 184, 0.34);
  color: #d7deea;
}

.auth-btn,
.cabinet-chip,
.ghost-btn,
.primary-btn,
.action-link {
  border: 2px solid #06080f;
  border-radius: 10px;
  padding: 7px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  font-size: 13px;
}

.auth-btn,
.primary-btn,
.action-link.is-primary {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.2), rgba(139, 0, 255, 0.18));
  color: #f4fbff;
  box-shadow: 0 0 0 1px rgba(6, 8, 15, 0.8), 0 0 14px rgba(0, 240, 255, 0.16);
}

.cabinet-chip {
  background: linear-gradient(135deg, rgba(0, 255, 159, 0.22), rgba(0, 166, 106, 0.2));
  color: #eafff8;
  box-shadow: 0 0 0 1px rgba(6, 8, 15, 0.8), 0 0 14px rgba(0, 255, 159, 0.18);
}

.ghost-btn,
.action-link.is-ghost {
  background: rgba(2, 6, 23, 0.72);
  color: #dff9ff;
  border-color: rgba(0, 240, 255, 0.35);
}

.auth-btn:hover,
.primary-btn:hover,
.ghost-btn:hover,
.cabinet-chip:hover,
.action-link:hover {
  border-color: rgba(0, 240, 255, 0.68);
  box-shadow: 0 0 0 1px rgba(0, 240, 255, 0.25), 0 0 18px rgba(0, 240, 255, 0.26);
  color: #fff;
}

.tabs-shell {
  border-bottom: 1px solid var(--border-color-soft);
  background: rgba(6, 11, 25, 0.88);
  padding: 10px 14px 12px;
}

.tabs {
  max-width: 1360px;
  margin: 0 auto;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 240, 255, 0.5) transparent;
}

.tabs::-webkit-scrollbar {
  height: 4px;
}

.tabs::-webkit-scrollbar-thumb {
  background: rgba(0, 240, 255, 0.45);
  border-radius: 999px;
}

.tab {
  background: rgba(2, 6, 23, 0.76);
  border: 1px solid var(--border-color-soft);
  color: var(--text-secondary);
  padding: 12px 18px;
  min-height: 46px;
  flex: 1 1 0;
  min-width: 0;
  cursor: pointer;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.03em;
  transition: all 0.22s ease;
}

.tab + .tab {
  border-left-width: 0;
}

.tab:first-child {
  border-radius: 10px 0 0 10px;
}

.tab:last-child {
  border-radius: 0 10px 10px 0;
}

.tab:hover {
  color: #e8fdff;
  border-color: rgba(0, 240, 255, 0.45);
}

.tab.active {
  color: #ffffff;
  background:
    radial-gradient(circle at 18% 20%, rgba(0, 240, 255, 0.28), transparent 42%),
    radial-gradient(circle at 82% 24%, rgba(255, 170, 0, 0.22), transparent 38%),
    linear-gradient(135deg, rgba(0, 240, 255, 0.18), rgba(255, 98, 0, 0.16), rgba(255, 0, 128, 0.16));
  border-color: rgba(0, 240, 255, 0.38);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    0 0 20px rgba(0, 240, 255, 0.14),
    0 0 28px rgba(255, 98, 0, 0.08);
}

.dashboard-month-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(0, 240, 255, 0.26);
  background: linear-gradient(135deg, rgba(4, 24, 42, 0.92), rgba(5, 34, 55, 0.82));
  color: rgba(217, 245, 255, 0.96);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.month-panel {
  padding-block: 14px;
}

.month-toolbar {
  display: flex;
  justify-content: flex-end;
}

.month-toolbar-split {
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.month-toolbar-left,
.month-toolbar-right {
  display: flex;
  align-items: flex-end;
}

.month-switcher-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.container {
  max-width: 1360px;
  margin: 0 auto;
  padding: 18px;
}

#section-root {
  display: grid;
  gap: 14px;
}

.panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 20px;
  box-shadow: var(--shadow-strong);
  position: relative;
  overflow: hidden;
}

.profile-section-panel {
  overflow: visible;
}

.panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--neon-blue), var(--neon-pink));
  opacity: 0.8;
}

.section-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 14px;
}

.section-stack {
  display: grid;
  gap: 14px;
}

.section-heading {
  display: grid;
  gap: 8px;
}

.section-heading-inline {
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-heading h1,
.section-heading h2,
.section-heading h3,
.panel h2,
.panel h3 {
  color: var(--neon-blue);
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.25);
}

.section-heading p,
.panel p,
.muted,
.list-muted li {
  color: var(--text-secondary);
  line-height: 1.55;
}

.section-tooltip-trigger {
  position: relative;
  width: 22px;
  height: 22px;
  min-width: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(0, 240, 255, 0.18);
  background: rgba(8, 20, 44, 0.82);
  color: rgba(196, 235, 255, 0.9);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  cursor: help;
}

.section-tooltip-trigger::after {
  content: attr(data-tooltip);
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(280px, calc(100vw - 32px));
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(0, 240, 255, 0.18);
  background: linear-gradient(180deg, rgba(7, 18, 39, 0.98), rgba(4, 12, 28, 0.98));
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.34);
  color: #e8f6ff;
  font-size: 13px;
  line-height: 1.5;
  text-align: left;
  white-space: normal;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 160ms ease, transform 160ms ease;
  z-index: 30;
}

.section-tooltip-trigger:hover::after,
.section-tooltip-trigger:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.eyebrow {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 178, 45, 0.55);
  background: linear-gradient(135deg, rgba(255, 145, 0, 0.18), rgba(255, 58, 58, 0.12));
  box-shadow: 0 0 12px rgba(255, 145, 0, 0.26);
  color: #ffe9c0;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

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

.metric-card,
.status-card,
.profile-card,
.how-card,
.assistant-card,
.feature-card {
  border: 1px solid var(--border-color-soft);
  border-radius: 12px;
  padding: 16px 18px;
  background: rgba(2, 6, 23, 0.45);
}

.metric-card strong,
.status-card strong,
.profile-card strong {
  display: block;
  margin-top: 6px;
  font-size: 1.5rem;
  color: var(--text-primary);
  font-family: "JetBrains Mono", "Consolas", monospace;
}

.dashboard-flow {
  gap: 18px;
}

.dashboard-step {
  display: grid;
  gap: 12px;
}

.dashboard-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border-color-soft);
  border-radius: 12px;
  background: rgba(2, 6, 23, 0.45);
}

.dashboard-table {
  width: 100%;
  min-width: 940px;
  border-collapse: collapse;
  table-layout: fixed;
}

.dashboard-table th,
.dashboard-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color-soft);
  text-align: left;
  vertical-align: middle;
}

.dashboard-table th {
  color: var(--neon-blue);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
}

.dashboard-table tbody tr:last-child td {
  border-bottom: none;
}

.dashboard-row-fallback td {
  background: linear-gradient(90deg, rgba(255, 178, 45, 0.08), rgba(0, 240, 255, 0.06));
}

.dashboard-input {
  width: 100%;
  min-width: 132px;
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border-color-soft);
  background: rgba(8, 20, 44, 0.92);
  color: var(--text-primary);
  font: inherit;
}

.dashboard-table th:nth-child(1),
.dashboard-table td:nth-child(1) {
  width: 44px;
}

.dashboard-table th:nth-child(2),
.dashboard-table td:nth-child(2) {
  width: 22%;
}

.dashboard-table th:nth-child(3),
.dashboard-table td:nth-child(3) {
  width: 16%;
}

.dashboard-table th:nth-child(4),
.dashboard-table td:nth-child(4),
.dashboard-table th:nth-child(5),
.dashboard-table td:nth-child(5) {
  width: 31%;
}

.dashboard-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

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

.dashboard-choice-card {
  border: 1px solid var(--border-color-soft);
  border-radius: 12px;
  padding: 16px 18px;
  background: rgba(2, 6, 23, 0.45);
  display: grid;
  gap: 12px;
}

.dashboard-choice-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dashboard-choice-head-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.dashboard-choice-head strong {
  font-size: 1rem;
  color: var(--text-primary);
}

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

.dashboard-choice-item {
  display: grid;
  gap: 6px;
  padding-top: 2px;
}

.dashboard-choice-item + .dashboard-choice-item {
  border-top: 1px solid var(--border-color-soft);
  padding-top: 12px;
}

.dashboard-choice-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--text-primary);
}

.dashboard-choice-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(34, 197, 94, 0.36);
  background: linear-gradient(135deg, rgba(24, 64, 46, 0.84), rgba(10, 28, 25, 0.9));
  color: #ebfff6;
  font-size: 12px;
  font-weight: 700;
}

.dashboard-card-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid var(--border-color-soft);
  border-radius: 12px;
  background: rgba(2, 6, 23, 0.45);
  color: var(--text-primary);
  cursor: pointer;
}

.dashboard-card-option input {
  width: 16px;
  height: 16px;
}

.referral-mini-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.referral-mini-card {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  grid-template-areas:
    "thumb copy"
    "thumb cta";
  gap: 12px;
  align-items: start;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(0, 240, 255, 0.2);
  background: linear-gradient(135deg, rgba(8, 20, 44, 0.92), rgba(5, 16, 34, 0.86));
  color: var(--text-primary);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), 0 14px 34px rgba(0, 0, 0, 0.22);
}

.referral-mini-thumb {
  grid-area: thumb;
  width: 84px;
  height: 56px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(148, 163, 184, 0.16);
  background-size: cover;
  background-position: center;
  overflow: hidden;
  text-decoration: none;
}

.referral-mini-thumb span {
  color: var(--accent-primary);
  font-weight: 700;
}

.referral-mini-copy {
  grid-area: copy;
  display: grid;
  gap: 6px;
  min-width: 0;
}

.referral-mini-eyebrow {
  color: rgba(120, 220, 255, 0.88);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.referral-mini-copy strong {
  color: #f8fbff;
  line-height: 1.35;
}

.referral-mini-bonus {
  margin: 0;
  color: #d9f6ff;
  font-size: 13px;
  line-height: 1.45;
}

.referral-mini-detail {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.45;
}

.referral-mini-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.referral-mini-links a {
  color: rgba(122, 244, 255, 0.9);
  font-size: 12px;
  text-decoration: none;
}

.referral-mini-cta {
  grid-area: cta;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  padding: 9px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.22), rgba(0, 153, 255, 0.18));
  border: 1px solid rgba(0, 240, 255, 0.28);
  color: var(--accent-primary);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
}

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

.dashboard-table-wrap::-webkit-scrollbar {
  height: 12px;
}

.dashboard-table-wrap::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(0, 240, 255, 0.28);
}

.status-grid,
.profile-grid,
.how-grid,
.action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.status-card.is-highlight {
  border-color: rgba(0, 255, 159, 0.4);
  box-shadow: 0 0 14px rgba(0, 255, 159, 0.12);
}

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

.card-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border-color-soft);
  border-radius: 12px;
  background: rgba(2, 6, 23, 0.45);
}

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

.profile-card-tile {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--border-color-soft);
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.45);
}

.profile-card-tile.is-owned {
  border-color: rgba(0, 255, 159, 0.22);
}

.profile-card-main,
.profile-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.profile-card-actions {
  justify-content: flex-start;
}

.profile-card-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
  flex: 1 1 auto;
}

.profile-card-copy strong {
  color: #f8fbff;
  line-height: 1.3;
}

.card-product-thumb {
  width: 72px;
  height: 46px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(148, 163, 184, 0.16);
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.card-product-thumb span {
  color: var(--accent-primary);
  font-weight: 800;
}

.card-product-thumb-sm {
  width: 62px;
  height: 40px;
  border-radius: 10px;
}

.profile-card-actions input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #00ff9f;
}

.profile-selection-list {
  display: grid;
  gap: 12px;
}

.profile-selection-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--border-color-soft);
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.45);
}

.profile-selection-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.profile-slot-control {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  flex: 1 1 168px;
}

.month-switcher {
  min-width: 220px;
}

.month-switcher-inline {
  flex: 0 0 168px;
}

.month-switcher-year {
  flex: 0 0 168px;
}

.month-clear-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding-inline: 14px;
  border-color: rgba(255, 88, 124, 0.46);
  background:
    linear-gradient(135deg, rgba(88, 8, 24, 0.88), rgba(43, 5, 18, 0.92)),
    linear-gradient(135deg, rgba(255, 104, 138, 0.18), rgba(255, 54, 92, 0.16));
  color: #ffe4ea;
  box-shadow:
    0 0 0 1px rgba(255, 88, 124, 0.16),
    inset 0 0 0 1px rgba(255, 255, 255, 0.03),
    0 12px 28px rgba(96, 8, 26, 0.24);
}

.month-clear-btn:hover {
  border-color: rgba(255, 118, 146, 0.78);
  box-shadow:
    0 0 0 1px rgba(255, 118, 146, 0.24),
    0 0 18px rgba(255, 96, 128, 0.2),
    0 16px 34px rgba(96, 8, 26, 0.3);
}

.month-clear-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  color: inherit;
}

.month-clear-btn-label {
  display: inline;
}

.month-clear-modal-panel {
  max-width: 640px;
  border-color: rgba(255, 98, 126, 0.24);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(255, 98, 126, 0.08);
}

.month-clear-warning {
  border-color: rgba(255, 118, 146, 0.28);
  background: linear-gradient(135deg, rgba(56, 8, 20, 0.68), rgba(24, 6, 18, 0.82));
  display: grid;
  gap: 8px;
}

.month-clear-warning-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 118, 146, 0.36);
  background: rgba(255, 92, 126, 0.14);
  color: #ffd7df;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
}

.profile-slot-controls {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 360px;
  justify-content: flex-end;
}

.profile-slot-control select {
  width: 100%;
  min-width: 0;
  min-height: 42px;
}

.profile-slot-list {
  display: grid;
  gap: 12px;
}

.profile-slot-row {
  display: grid;
  grid-template-columns: 32px 28px minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(0, 240, 255, 0.16);
  border-radius: 12px;
  background: rgba(5, 14, 34, 0.72);
  align-items: center;
}

.profile-slot-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid rgba(0, 240, 255, 0.22);
  background: rgba(8, 20, 44, 0.92);
  font-weight: 700;
  color: #f7fdff;
  align-self: center;
}

.profile-slot-choice {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
}

.profile-slot-choice input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #00ff9f;
}

.profile-slot-choice input[type="checkbox"]:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.profile-slot-grid {
  display: grid;
  grid-template-columns: minmax(160px, 0.95fr) minmax(84px, 0.3fr) minmax(180px, 0.7fr) minmax(180px, 0.7fr);
  gap: 12px;
  align-items: center;
}

.profile-inline-field {
  position: relative;
  min-width: 0;
}

.profile-inline-field input,
.profile-inline-field select {
  width: 100%;
}

.profile-inline-field span {
  white-space: nowrap;
}

.profile-slot-control select,
.profile-inline-field select,
.profile-inline-field input {
  border-radius: 10px;
  border: 1px solid var(--border-color-soft);
  background: rgba(2, 6, 23, 0.56);
  color: var(--text-primary);
  padding: 10px 12px;
  font: inherit;
}

.profile-inline-field input[readonly] {
  color: #d6e3f5;
  opacity: 0.92;
}

@media (hover: hover) and (pointer: fine) {
  .profile-inline-field.has-field-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    width: min(320px, calc(100vw - 48px));
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(0, 240, 255, 0.18);
    background: linear-gradient(180deg, rgba(7, 18, 39, 0.98), rgba(4, 12, 28, 0.98));
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.34);
    color: #e8f6ff;
    font-size: 13px;
    line-height: 1.5;
    text-align: left;
    white-space: normal;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-4px);
    transition: opacity 160ms ease, transform 160ms ease;
    z-index: 32;
  }

  .profile-inline-field.has-field-tooltip:hover::after,
  .profile-inline-field.has-field-tooltip:focus-within::after {
    opacity: 1;
    transform: translateY(0);
  }
}

.guide-glow {
  position: relative;
  border-color: rgba(154, 255, 206, 0.7) !important;
  box-shadow:
    0 0 0 1px rgba(154, 255, 206, 0.2),
    0 0 12px rgba(62, 215, 146, 0.16),
    0 0 22px rgba(36, 181, 124, 0.08);
  animation: guide-pulse-thin 3.2s ease-in-out infinite;
}

.guest-persistence-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 6px 12px;
  border: 1px solid rgba(255, 113, 113, 0.22);
  border-radius: 999px;
  background: rgba(23, 10, 18, 0.82);
  color: var(--text-primary);
}

.guest-persistence-chip span {
  min-width: 0;
  font-size: 11px;
  line-height: 1.2;
}

.guest-persistence-chip .ghost-btn {
  flex: 0 0 auto;
  border-radius: 999px;
  min-height: 28px;
  padding: 5px 10px;
  border-color: rgba(255, 113, 113, 0.28);
}

.guest-persistence-chip-danger {
  box-shadow:
    0 0 0 1px rgba(255, 113, 113, 0.08),
    0 0 12px rgba(255, 89, 89, 0.08);
  animation: guest-warning-pulse 1.9s ease-in-out infinite;
}

@keyframes guest-warning-pulse {
  0%,
  100% {
    border-color: rgba(255, 113, 113, 0.22);
    box-shadow:
      0 0 0 1px rgba(255, 113, 113, 0.08),
      0 0 10px rgba(255, 89, 89, 0.08);
  }
  50% {
    border-color: rgba(255, 150, 150, 0.78);
    box-shadow:
      0 0 0 1px rgba(255, 150, 150, 0.3),
      0 0 22px rgba(255, 92, 92, 0.22),
      0 0 34px rgba(255, 70, 70, 0.14);
  }
}

@keyframes guide-pulse-thin {
  0%,
  100% {
    box-shadow:
      0 0 0 1px rgba(154, 255, 206, 0.18),
      0 0 10px rgba(62, 215, 146, 0.14),
      0 0 18px rgba(36, 181, 124, 0.06);
    filter: saturate(1.02) brightness(1);
  }
  50% {
    box-shadow:
      0 0 0 1px rgba(175, 255, 217, 0.34),
      0 0 20px rgba(98, 245, 177, 0.28),
      0 0 30px rgba(56, 199, 141, 0.14);
    filter: saturate(1.08) brightness(1.04);
  }
}

.profile-inline-field.duplicate-offer-teal {
  --duplicate-offer-color: #35f0d2;
}

.profile-inline-field.duplicate-offer-violet {
  --duplicate-offer-color: #a78bfa;
}

.profile-inline-field.duplicate-offer-amber {
  --duplicate-offer-color: #f7b955;
}

.profile-inline-field.duplicate-offer-rose {
  --duplicate-offer-color: #fb7185;
}

.profile-inline-field.duplicate-offer-sky {
  --duplicate-offer-color: #38bdf8;
}

.profile-inline-field.duplicate-offer-mint {
  --duplicate-offer-color: #7ef7b4;
}

.profile-inline-field.duplicate-offer-outline::before {
  content: "";
  position: absolute;
  inset: 22px -2px -2px -2px;
  border-radius: 12px;
  padding: 1px;
  background:
    conic-gradient(
      from 0deg,
      transparent 0deg,
      transparent 285deg,
      color-mix(in srgb, var(--duplicate-offer-color, #35f0d2) 98%, white 6%) 322deg,
      color-mix(in srgb, var(--duplicate-offer-color, #35f0d2) 22%, transparent) 344deg,
      transparent 360deg
    );
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.95;
  transform-origin: center;
  animation: duplicate-outline-spin 2.1s linear infinite;
}

.profile-inline-field.duplicate-offer-outline.is-best-duplicate-offer::before {
  padding: 1.5px;
  box-shadow:
    0 0 0 1px rgba(255, 217, 102, 0.22),
    0 0 14px rgba(255, 206, 84, 0.18);
}

.profile-inline-field.is-dimmed-duplicate-offer input {
  opacity: 0.56;
  filter: saturate(0.8);
}

@keyframes duplicate-outline-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.dashboard-loader-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(1, 7, 18, 0.4);
  backdrop-filter: blur(8px);
}

.dashboard-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  gap: 24px;
}

.hb-spinner {
  position: relative;
  width: 64px;
  height: 64px;
}

.hb-spinner-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid transparent;
  animation: hb-spin linear infinite;
}

.hb-spinner-ring:nth-child(1) {
  border-top-color: var(--neon-green);
  animation-duration: 1.1s;
}

.hb-spinner-ring:nth-child(2) {
  inset: 8px;
  border-top-color: var(--neon-blue);
  border-right-color: var(--neon-blue);
  animation-duration: 0.75s;
  animation-direction: reverse;
}

.hb-spinner-ring:nth-child(3) {
  inset: 18px;
  border-top-color: var(--neon-pink);
  animation-duration: 0.55s;
}

.hb-spinner-dot {
  position: absolute;
  inset: 28px;
  border-radius: 50%;
  background: var(--neon-green);
  box-shadow: 0 0 12px var(--neon-green), 0 0 24px var(--neon-green);
  animation: hb-pulse 1.1s ease-in-out infinite;
}

@keyframes hb-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes hb-pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.4;
    transform: scale(0.7);
  }
}

.dashboard-loader-text {
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  animation: hb-blink 1.4s ease-in-out infinite;
}

@keyframes hb-blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}

.profile-selection-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.profile-selection-toggle {
  min-width: 0;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0;
  border: 1px solid rgba(0, 240, 255, 0.18);
  border-radius: 999px;
  overflow: hidden;
  background: rgba(4, 12, 28, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.profile-selection-toggle .tab {
  flex: 0 0 auto;
  min-height: 28px;
  padding: 5px 12px;
  font-size: 11px;
  letter-spacing: 0.06em;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.profile-selection-toggle .tab + .tab {
  border-left: 1px solid rgba(0, 240, 255, 0.12);
}

.profile-selection-toggle .tab:hover {
  background: rgba(255, 255, 255, 0.03);
}

.profile-selection-toggle .tab.active {
  background: linear-gradient(135deg, rgba(0, 255, 159, 0.18), rgba(0, 166, 106, 0.14));
  color: #eafff8;
  box-shadow: inset 0 0 0 1px rgba(0, 255, 159, 0.12);
}

.profile-selection-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid rgba(0, 240, 255, 0.18);
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(8, 20, 44, 0.92), rgba(4, 12, 28, 0.86));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.profile-selection-strip-cell {
  min-width: 0;
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  align-content: center;
  border-right: 1px solid rgba(0, 240, 255, 0.14);
}

.profile-selection-strip-cell:last-child {
  border-right: 0;
}

.profile-selection-strip-label {
  display: inline-flex;
  align-items: center;
  min-height: 16px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(192, 209, 231, 0.78);
}

.profile-selection-strip-value {
  display: block;
  min-width: 0;
  font-size: 14px;
  font-weight: 700;
  color: #f7fdff;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-selection-strip-cell-control select {
  width: 100%;
  min-height: 44px;
  border-radius: 10px;
  border: 1px solid var(--border-color-soft);
  background: rgba(2, 6, 23, 0.56);
  color: var(--text-primary);
  padding: 10px 12px;
  font: inherit;
}

.profile-selection-strip-cell.is-disabled {
  background: rgba(255, 255, 255, 0.015);
}

.profile-selection-strip-cell.is-disabled .profile-selection-strip-label,
.profile-selection-strip-cell.is-disabled .profile-selection-strip-value {
  color: rgba(192, 209, 231, 0.48);
}

.profile-selection-strip-cell-control select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

@media (prefers-reduced-motion: reduce) {
  .guide-glow {
    animation: none;
  }

  .hb-spinner-ring,
  .hb-spinner-dot,
  .dashboard-loader-text {
    animation: none;
  }
}

.profile-user-categories-list {
  display: grid;
  gap: 14px;
}

.profile-user-categories-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.profile-user-categories-filter-shell {
  width: 100%;
}

.profile-user-categories-filter-shell.is-hidden {
  display: none;
}

.profile-user-categories-filter {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  gap: 0;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(8, 20, 44, 0.78);
  border: 1px solid rgba(0, 240, 255, 0.16);
}

.profile-user-categories-filter .tab {
  min-width: 0;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 0;
  border: 0;
  background: transparent;
}

.profile-user-categories-filter .tab.active {
  color: #ffffff;
  background:
    radial-gradient(circle at 16% 24%, rgba(0, 240, 255, 0.24), transparent 44%),
    linear-gradient(135deg, rgba(0, 240, 255, 0.18), rgba(255, 98, 0, 0.14), rgba(255, 0, 128, 0.12));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    0 0 16px rgba(0, 240, 255, 0.12);
}

.profile-user-categories-filter .tab + .tab {
  border-left: 1px solid rgba(0, 240, 255, 0.14);
}

.profile-user-category-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(0, 240, 255, 0.16);
  border-radius: 14px;
  background: rgba(5, 14, 34, 0.72);
}

.profile-user-category-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.profile-user-category-table {
  display: grid;
  gap: 8px;
}

.profile-user-category-row {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(0, 240, 255, 0.12);
  background: rgba(8, 20, 44, 0.82);
}

.profile-user-category-row.is-head {
  padding-top: 0;
  padding-bottom: 2px;
  border: 0;
  background: transparent;
  color: rgba(192, 209, 231, 0.72);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.profile-user-category-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.user-category-modal-panel {
  max-width: 640px;
}

.modal-close-btn {
  position: absolute;
  top: 0;
  right: 0;
  min-width: 34px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid rgba(0, 240, 255, 0.14);
  background: rgba(8, 20, 44, 0.78);
  color: #d6e3f5;
  font: inherit;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.modal-close-btn:hover {
  color: #ffffff;
  border-color: rgba(0, 240, 255, 0.32);
  background: rgba(10, 26, 58, 0.9);
}

.trinket-modal-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.trinket-modal-actions-equal > * {
  flex: 1 1 0;
  justify-content: center;
  min-height: 42px;
}

.profile-text-preview-copy {
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.5;
  color: #eef7ff;
}

.user-category-modal-textarea {
  min-height: 120px;
  resize: vertical;
}

.profile-checklist {
  display: grid;
  gap: 8px;
}

.profile-check-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(0, 240, 255, 0.16);
  border-radius: 12px;
  background: rgba(5, 14, 34, 0.72);
  cursor: pointer;
}

.profile-check-item input[type="checkbox"] {
  margin-top: 2px;
  width: 18px;
  height: 18px;
  accent-color: #00ff9f;
}

.profile-check-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.profile-check-title {
  font-weight: 700;
  color: #f7fdff;
}

.profile-check-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.compact-btn {
  min-height: 34px;
  padding: 6px 10px;
  font-size: 12px;
}

.danger-btn {
  border-color: rgba(255, 118, 146, 0.35);
  color: #ffd7df;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(0, 240, 255, 0.22);
  color: #d6e3f5;
  background: rgba(8, 20, 44, 0.92);
  font-size: 11px;
  font-weight: 700;
}

.pill.is-good {
  color: #dcfff1;
  border-color: rgba(0, 255, 159, 0.4);
  background: rgba(0, 255, 159, 0.12);
}

.pill.is-warn {
  color: #ffe9c0;
  border-color: rgba(255, 178, 45, 0.45);
  background: rgba(255, 145, 0, 0.12);
}

.dashboard-card-option.is-owned {
  justify-content: space-between;
}

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

.timeline-step {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 14px;
  align-items: start;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid var(--border-color-soft);
  background: rgba(2, 6, 23, 0.45);
}

.timeline-index {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #f7fdff;
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.22), rgba(139, 0, 255, 0.24));
  border: 1px solid rgba(0, 240, 255, 0.3);
  font-weight: 700;
}

.timeline-copy {
  display: grid;
  gap: 4px;
}

.how-flow-shell {
  gap: 16px;
}

.how-flow-group {
  display: grid;
  gap: 10px;
}

.how-flow-group-title {
  color: #f3fbff;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.how-flow-table {
  display: grid;
  border: 1px solid var(--border-color-soft);
  border-radius: 14px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(9, 22, 48, 0.92), rgba(5, 13, 32, 0.94));
  box-shadow:
    inset 0 1px 0 rgba(0, 240, 255, 0.08),
    0 18px 40px rgba(0, 0, 0, 0.24);
}

.how-flow-head,
.how-flow-row {
  display: grid;
  grid-template-columns: 72px 240px minmax(0, 1fr);
}

.how-flow-head {
  background: linear-gradient(90deg, rgba(0, 240, 255, 0.14), rgba(255, 145, 0, 0.1));
  color: var(--neon-blue);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.how-flow-head > div,
.how-flow-row > div {
  padding: 16px 18px;
  border-right: 1px solid rgba(120, 158, 210, 0.14);
}

.how-flow-head > div:last-child,
.how-flow-row > div:last-child {
  border-right: none;
}

.how-flow-row {
  align-items: stretch;
  border-top: 1px solid rgba(120, 158, 210, 0.12);
}

.how-flow-row:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

.how-flow-index {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f6fcff;
  font-family: "JetBrains Mono", "Consolas", monospace;
  font-size: 1.05rem;
  font-weight: 800;
  background:
    radial-gradient(circle at center, rgba(0, 240, 255, 0.2), rgba(0, 240, 255, 0.02) 72%);
}

.how-flow-word {
  display: flex;
  align-items: center;
  color: #ffd87a;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.how-flow-copy {
  display: flex;
  align-items: center;
  color: var(--text-secondary);
  line-height: 1.6;
}

.chat-wrap {
  display: flex;
  flex-direction: column;
  height: 560px;
  min-height: 420px;
  max-height: 620px;
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color-soft);
}

.chat-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #00d8ff, #3567ff);
}

.chat-header-info h3 {
  margin: 0;
  font-size: 14px;
  color: var(--text-primary);
}

.chat-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #00d084;
  box-shadow: 0 0 0 rgba(0, 208, 132, 0.55);
  animation: status-pulse 1.8s ease-out infinite;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scroll-behavior: smooth;
}

.chat-messages::-webkit-scrollbar {
  width: 10px;
}

.chat-messages::-webkit-scrollbar-track {
  background: rgba(4, 13, 34, 0.72);
  border-radius: 999px;
}

.chat-messages::-webkit-scrollbar-thumb {
  border-radius: 999px;
  border: 2px solid rgba(4, 13, 34, 0.72);
  background:
    linear-gradient(180deg, rgba(0, 240, 255, 0.82), rgba(53, 103, 255, 0.82));
  box-shadow:
    0 0 10px rgba(0, 240, 255, 0.25),
    inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.chat-msg {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.chat-msg.user {
  flex-direction: row-reverse;
  padding-right: 10px;
}

.msg-content {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.msg-content.user {
  justify-items: end;
  text-align: right;
}

.chat-msg-typing .msg-bubble {
  min-width: 58px;
}

.msg-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #00d8ff, #3567ff);
  flex-shrink: 0;
}

.msg-bubble {
  max-width: 78%;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border-color-soft);
  background: rgba(2, 6, 23, 0.56);
  color: var(--text-primary);
  line-height: 1.45;
  font-size: 14px;
  word-break: break-word;
}

.msg-bubble strong {
  color: #f8fdff;
  font-weight: 800;
}

.chat-msg.user .msg-bubble {
  background: linear-gradient(135deg, rgba(0, 216, 255, 0.18), rgba(53, 103, 255, 0.15));
  text-align: left;
}

.msg-sender,
.msg-time {
  max-width: 78%;
}

.msg-time {
  margin-top: 2px;
  font-size: 11px;
  color: var(--text-muted);
}

.chat-input-wrap {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border-color-soft);
}

.chat-input {
  flex: 1;
  min-height: 40px;
  max-height: 120px;
  resize: none;
  border-radius: 10px;
  border: 1px solid var(--border-color-soft);
  background: rgba(2, 6, 23, 0.56);
  color: var(--text-primary);
  padding: 9px 10px;
  font: inherit;
}

.chat-send-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: linear-gradient(135deg, #00d8ff, #3567ff);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.chat-send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.chat-welcome {
  text-align: center;
  color: var(--text-secondary);
  font-size: 13px;
  padding: 10px 0;
}

.chat-empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-secondary);
  font-size: 14px;
  padding: 18px;
}

.typing-bubble {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
}

.typing-bubble span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(198, 235, 255, 0.86);
  display: inline-block;
  animation: typingDots 1.1s infinite ease-in-out;
}

.typing-bubble span:nth-child(2) {
  animation-delay: 0.16s;
}

.typing-bubble span:nth-child(3) {
  animation-delay: 0.32s;
}

.assistant-chat-wrap .assistant-logo-avatar {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-image: url("/assets/logos/HayatiBank.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: transparent;
  border: 1px solid rgba(91, 216, 243, 0.8);
  box-shadow:
    0 0 0 2px rgba(6, 17, 47, 0.85),
    0 0 18px rgba(0, 224, 255, 0.38),
    0 0 30px rgba(0, 224, 255, 0.2);
  overflow: hidden;
}

.assistant-chat-wrap .assistant-logo-avatar::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 30% 18%, rgba(255, 255, 255, 0.28), transparent 42%);
  pointer-events: none;
}

.assistant-chat-wrap .assistant-logo-avatar::after {
  content: "";
  position: absolute;
  inset: -65% -120%;
  background: linear-gradient(120deg, transparent 36%, rgba(255, 255, 255, 0.35), transparent 64%);
  transform: translateX(-45%) rotate(12deg);
  animation: assistantLogoShimmer 4.6s ease-in-out infinite;
  pointer-events: none;
}

.assistant-chat-wrap .assistant-logo-avatar-msg {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-image: url("/assets/logos/HayatiBank.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border: 1px solid rgba(91, 216, 243, 0.72);
  box-shadow: 0 0 10px rgba(0, 224, 255, 0.3);
  color: transparent;
}

.assistant-history-loader {
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.assistant-chat-wrap .msg-avatar-user {
  background: linear-gradient(135deg, #00d8ff, #3567ff);
}

.assistant-chat-wrap .msg-avatar-user-photo {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: transparent;
}

.trinket-editor-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) 240px;
  gap: 16px;
}

.trinkets-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.trinkets-subtabs-shell {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.trinkets-subtabs-shell::-webkit-scrollbar {
  display: none;
}

.trinkets-subtabs {
  max-width: none;
  width: max-content;
  min-width: 100%;
  flex-wrap: nowrap;
}

.trinkets-subtabs .tab {
  min-height: 34px;
  padding: 7px 16px;
  font-size: 12px;
}

.trinkets-subtabs .tab + .tab {
  border-left-width: 0;
}

.trinkets-scroll-list {
  display: grid;
  gap: 12px;
  max-height: min(68vh, 760px);
  overflow-y: auto;
  padding-right: 6px;
}

.trinkets-scroll-list::-webkit-scrollbar {
  width: 10px;
}

.trinkets-scroll-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(0, 240, 255, 0.28);
}

.trinket-add-btn {
  width: 54px;
  height: 54px;
  min-width: 54px;
  border: 1px solid rgba(0, 240, 255, 0.32);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.22), rgba(255, 145, 0, 0.16));
  color: #f8fdff;
  font-size: 1.9rem;
  line-height: 1;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.24);
}

.trinket-fab {
  display: none;
}

.trinket-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(8px);
}

.trinket-modal-shell {
  position: fixed;
  inset: 0;
  z-index: 121;
  display: grid;
  place-items: center;
  padding: 24px;
}

.trinket-modal-panel {
  width: min(1080px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow-y: auto;
}

.trinket-modal-head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-right: 44px;
  margin-bottom: 14px;
}

.trinket-editor-form,
.trinket-preview,
.trinket-preview-copy,
.trinket-actions {
  display: grid;
  gap: 12px;
}

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

.trinket-field {
  display: grid;
  gap: 6px;
}

.trinket-field span {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
}

.trinket-field input {
  border-radius: 10px;
  border: 1px solid var(--border-color-soft);
  background: rgba(2, 6, 23, 0.56);
  color: var(--text-primary);
  padding: 10px 12px;
  font: inherit;
}

.trinket-field-wide {
  grid-column: 1 / -1;
}

.trinket-preview {
  align-content: start;
}

.trinket-preview-thumb,
.trinket-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 18px;
  border: 1px solid var(--border-color-soft);
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.12), rgba(139, 0, 255, 0.14));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f4fbff;
  font-size: 32px;
  font-weight: 700;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

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

.trinket-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border-color-soft);
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.45);
}

.trinket-thumb {
  width: 72px;
  min-width: 72px;
  border-radius: 14px;
  font-size: 24px;
}

.trinket-copy {
  display: grid;
  gap: 6px;
}

.trinket-link {
  font-size: 12px;
}

.trinket-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
}

.wallet-chip-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.wallet-chip-label {
  font-size: 13px;
  opacity: 0.84;
}

.wallet-chip {
  border: 1px solid rgba(123, 255, 182, 0.5);
  border-radius: 999px;
  padding: 5px 12px;
  background: rgba(12, 67, 47, 0.4);
  color: #d8fff0;
  font-size: 13px;
}

.wallet-chip-active {
  border-color: rgba(154, 255, 206, 0.95);
  background: linear-gradient(135deg, rgba(21, 129, 88, 0.84), rgba(13, 93, 64, 0.9));
  box-shadow: 0 0 0 1px rgba(154, 255, 206, 0.32), 0 0 24px rgba(62, 215, 146, 0.5);
  animation: walletPulseRoyal 3.6s ease-in-out infinite;
}

.list-muted {
  display: grid;
  gap: 10px;
  padding-left: 18px;
}

.empty-guest {
  display: grid;
  gap: 14px;
}

.empty-guest-hero {
  display: grid;
  gap: 16px;
  background:
    radial-gradient(circle at top right, rgba(0, 240, 255, 0.16), transparent 30%),
    linear-gradient(160deg, rgba(2, 10, 34, 0.98), rgba(4, 14, 44, 0.98));
}

.hero-copy {
  display: grid;
  gap: 14px;
}

.hero-copy h1 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  line-height: 1;
  max-width: 11ch;
}

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

.fact-card {
  border: 1px solid var(--border-color-soft);
  border-radius: 12px;
  padding: 14px 16px;
  background: rgba(2, 6, 23, 0.45);
}

.fact-card strong {
  display: block;
  margin-top: 8px;
  font-size: 1.2rem;
  font-family: "JetBrains Mono", "Consolas", monospace;
}

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

.toast-chip {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 120;
  max-width: min(460px, calc(100vw - 40px));
}

.toast-chip.is-info {
  color: #e8f2ff;
  border-color: rgba(0, 218, 255, 0.62);
  background: linear-gradient(135deg, rgba(0, 188, 255, 0.2), rgba(14, 116, 255, 0.14));
  box-shadow: 0 0 12px rgba(0, 188, 255, 0.2);
}

.toast-chip.is-success {
  color: #ebfff4;
  border-color: rgba(74, 222, 128, 0.72);
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.24), rgba(16, 185, 129, 0.18));
  box-shadow: 0 0 18px rgba(34, 197, 94, 0.24);
}

.toast-chip.is-error {
  color: #fff0f0;
  border-color: rgba(248, 113, 113, 0.72);
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.24), rgba(190, 24, 93, 0.18));
  box-shadow: 0 0 18px rgba(239, 68, 68, 0.22);
}

@keyframes brand-flow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes brand-shine {
  0% { transform: translateX(-140%) rotate(8deg); }
  100% { transform: translateX(140%) rotate(8deg); }
}

@keyframes ring-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes assistantLogoShimmer {
  0% { transform: translateX(-70%) rotate(12deg); opacity: 0.05; }
  28% { transform: translateX(28%) rotate(12deg); opacity: 0.35; }
  55% { transform: translateX(90%) rotate(12deg); opacity: 0.05; }
  100% { transform: translateX(90%) rotate(12deg); opacity: 0.05; }
}

@keyframes status-pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(0, 208, 132, 0.55);
  }
  70% {
    transform: scale(1.08);
    box-shadow: 0 0 0 9px rgba(0, 208, 132, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(0, 208, 132, 0);
  }
}

@keyframes typingDots {
  0%, 80%, 100% {
    transform: translateY(0);
    opacity: 0.3;
  }
  40% {
    transform: translateY(-3px);
    opacity: 1;
  }
}

@keyframes walletPulseRoyal {
  0% {
    box-shadow: 0 0 0 1px rgba(154, 255, 206, 0.22), 0 0 18px rgba(62, 215, 146, 0.34), 0 0 34px rgba(36, 181, 124, 0.2);
    filter: saturate(1.02) brightness(1);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 0 1px rgba(175, 255, 217, 0.52), 0 0 36px rgba(98, 245, 177, 0.72), 0 0 58px rgba(56, 199, 141, 0.38);
    filter: saturate(1.18) brightness(1.08);
    transform: scale(1.035);
  }
  100% {
    box-shadow: 0 0 0 1px rgba(154, 255, 206, 0.22), 0 0 18px rgba(62, 215, 146, 0.34), 0 0 34px rgba(36, 181, 124, 0.2);
    filter: saturate(1.02) brightness(1);
    transform: scale(1);
  }
}

@media (max-width: 1080px) {
  .topbar {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }

  .brand-frame {
    justify-content: flex-start;
  }

  .section-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid,
  .quick-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .topbar {
    grid-template-columns: auto 1fr auto;
    justify-items: stretch;
    gap: 10px;
    padding: 12px 14px;
    align-items: center;
  }

  .brand-wrap {
    justify-self: start;
    flex-wrap: nowrap;
    gap: 8px;
  }

  .brand-wrap .identity-chip {
    display: none;
  }

  .brand-frame {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    justify-self: center;
    padding: 8px 12px;
    z-index: 1;
    pointer-events: none;
  }

  .brand-ar {
    font-size: 28px;
  }

  .top-actions {
    display: inline-flex;
    justify-self: end;
    align-items: center;
  }

  .lang-mobile-wrap {
    display: inline-flex;
    position: static;
    transform: none;
    z-index: 62;
  }

  .menu-toggle-btn {
    display: inline-flex;
    width: 40px;
    height: 40px;
    position: relative;
    z-index: 62;
  }

  .header-meta {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: min(340px, 88vw);
    z-index: 70;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 11px;
    padding: 16px 14px 18px;
    background: linear-gradient(160deg, rgba(2, 10, 34, 0.98), rgba(4, 14, 44, 0.98));
    border-left: 1px solid rgba(0, 240, 255, 0.22);
    right: -110vw;
    transition: right 0.24s ease;
    pointer-events: none;
    visibility: hidden;
    overflow-y: auto;
  }

  .menu-user-chip,
  .menu-ecosystem-chip {
    display: inline-flex;
    width: 100%;
    max-width: 100%;
    min-height: 42px;
    justify-content: center;
    align-self: stretch;
    text-align: center;
  }

  .header-meta .lang-switch {
    display: none;
  }

  .pref-switchers {
    width: 100%;
    display: grid;
    gap: 10px;
  }

  .pref-switch {
    width: 100%;
    justify-content: space-between;
  }

  .project-jump {
    width: 100%;
    display: flex;
    justify-content: flex-end;
  }

  .project-jump select {
    width: 124px;
    min-width: 124px;
    max-width: 124px;
    min-height: 38px;
    margin-left: auto;
    font-size: 12px;
    padding: 9px 10px;
  }

  .pref-switch select,
  .auth-btn,
  .cabinet-chip {
    width: 100%;
    min-height: 42px;
  }

  .pref-switch select {
    min-width: 124px;
    max-width: 124px;
  }

  body.menu-open .header-meta {
    right: 0;
    pointer-events: auto;
    visibility: visible;
  }

  body.menu-open .menu-backdrop {
    display: block;
  }

  .data-badge {
    display: inline-flex;
    width: 100%;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 12px;
  }

  .container {
    padding: 14px 12px 30px;
  }

  .tabs-shell {
    padding: 8px 10px 10px;
  }

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

  .tab {
    flex: 0 0 220px;
    min-width: 220px;
  }

  .status-grid,
  .profile-grid,
  .how-grid,
  .action-grid,
  .stats-grid,
  .quick-facts,
  .profile-cards-grid,
  .dashboard-card-grid,
  .dashboard-choice-grid,
  .dashboard-result-grid {
    grid-template-columns: 1fr;
  }

  .trinket-editor-shell,
  .trinket-columns,
  .trinket-form-grid {
    grid-template-columns: 1fr;
  }

  .trinket-modal-head {
    align-items: stretch;
    flex-direction: column;
  }

  .trinkets-toolbar {
    align-items: center;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .trinkets-toolbar::-webkit-scrollbar {
    display: none;
  }

  .trinket-modal-head {
    position: relative;
    padding-right: 44px;
  }

  .trinkets-subtabs-shell {
    min-width: max-content;
    overflow: visible;
    padding-bottom: 2px;
    flex: 0 0 auto;
  }

  .trinkets-subtabs {
    min-width: max-content;
  }

  .trinkets-subtabs .tab {
    flex: 0 0 auto;
    min-width: 132px;
  }

  .trinkets-scroll-list {
    padding-bottom: 84px;
  }

  .trinket-add-btn {
    display: none;
  }

  .trinket-fab {
    position: fixed;
    right: 18px;
    bottom: 22px;
    z-index: 90;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    min-width: 56px;
    border-radius: 18px;
    border: 1px solid rgba(0, 240, 255, 0.28);
    background:
      radial-gradient(circle at 24% 22%, rgba(0, 240, 255, 0.28), transparent 44%),
      linear-gradient(135deg, rgba(8, 30, 58, 0.94), rgba(0, 96, 120, 0.9), rgba(255, 98, 0, 0.16));
    color: #f8fdff;
    font-size: 2rem;
    line-height: 1;
    box-shadow:
      0 16px 34px rgba(0, 0, 0, 0.34),
      0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  }

  .chat-send-btn {
    width: 40px;
    min-width: 40px;
    min-height: 40px;
  }

  .how-flow-head,
  .how-flow-row {
    grid-template-columns: 56px 160px minmax(0, 1fr);
  }

  .profile-slot-row {
    grid-template-columns: 32px 28px minmax(720px, 1fr);
    align-items: center;
  }

  .profile-slot-controls {
    width: 100%;
    min-width: 0;
  }

  .profile-slot-grid {
    grid-template-columns: minmax(148px, 0.95fr) minmax(76px, 0.24fr) minmax(152px, 0.54fr) minmax(152px, 0.54fr);
    min-width: 540px;
    width: max-content;
  }

  .profile-selection-strip {
    grid-template-columns: minmax(96px, 0.8fr) minmax(204px, 1.4fr) minmax(120px, 0.8fr) minmax(120px, 0.8fr);
    min-width: 560px;
    width: max-content;
  }

  .profile-selection-strip-cell {
    align-content: start;
  }

  .profile-selection-strip-value {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    line-height: 1.25;
  }

  .profile-selection-strip-cell-control select {
    min-height: 42px;
    padding: 9px 10px;
  }

  .profile-user-category-row {
    grid-template-columns: 1fr;
  }

  .profile-user-category-row.is-head {
    display: none;
  }

  .month-toolbar-split {
    align-items: flex-end;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 10px;
  }

  .month-toolbar-left,
  .month-toolbar-right {
    width: auto;
    min-width: 0;
  }

  .month-switcher-row {
    width: auto;
    flex-wrap: nowrap;
    gap: 8px;
  }

  .month-switcher-row .month-switcher {
    flex: 0 1 132px;
    min-width: 132px;
  }

  .month-switcher-row .month-switcher-year {
    flex: 0 1 96px;
    min-width: 96px;
  }

  .month-toolbar-right .month-clear-btn {
    min-height: 44px;
    min-width: 44px;
    padding: 10px;
    font-size: 0;
    white-space: nowrap;
    justify-content: center;
  }

  .month-toolbar-right .month-clear-btn .month-clear-btn-label {
    display: none;
  }

  .profile-selection-card {
    overflow-x: auto;
    padding-bottom: 14px;
  }

  .profile-slot-choice {
    align-self: center;
  }
}

@media (max-width: 640px) {
  .brand-logo,
  .logo-seal {
    width: 44px;
    height: 44px;
  }

  .hero-copy h1 {
    max-width: none;
    font-size: 2.35rem;
  }

  .timeline-step {
    grid-template-columns: 1fr;
  }

  .timeline-index {
    width: 38px;
    height: 38px;
  }

  .how-flow-head {
    display: none;
  }

  .how-flow-row {
    grid-template-columns: 1fr;
  }

  .how-flow-row > div {
    border-right: none;
    border-bottom: 1px solid rgba(120, 158, 210, 0.12);
  }

  .how-flow-row > div:last-child {
    border-bottom: none;
  }

  .how-flow-index,
  .how-flow-word,
  .how-flow-copy {
    justify-content: flex-start;
    text-align: left;
  }

  .how-flow-index {
    padding-bottom: 8px;
  }

  .chat-wrap {
    height: 460px;
    min-height: 360px;
    max-height: 520px;
  }

  .msg-bubble {
    max-width: 92%;
  }
}
