:root {
  --ink: #172621;
  --muted: #6f7f78;
  --line: #dfe8e3;
  --paper: #f4f7f5;
  --white: #ffffff;
  --pine-950: #09281f;
  --pine-900: #0d382b;
  --pine-800: #14513f;
  --pine-700: #19674f;
  --mint: #70d1ae;
  --mint-soft: #dff5ed;
  --gold: #d9b463;
  --gold-soft: #f6ecd3;
  --red: #a84b4b;
  --red-soft: #fbe9e7;
  --shadow: 0 20px 60px rgba(16, 58, 45, 0.12);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--paper); }
body { margin: 0; min-height: 100vh; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.auth-body {
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(112, 209, 174, 0.18), transparent 32rem),
    linear-gradient(135deg, #eff5f1 0%, #f9faf8 48%, #edf4f0 100%);
}

.auth-shell {
  width: min(1180px, calc(100% - 40px));
  min-height: min(760px, calc(100vh - 56px));
  margin: 28px auto;
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  background: var(--white);
  border: 1px solid rgba(13, 56, 43, 0.09);
  border-radius: 30px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.auth-brand-panel {
  position: relative;
  padding: 48px;
  color: #f7fffb;
  background:
    linear-gradient(180deg, rgba(5, 30, 23, 0.05), rgba(5, 30, 23, 0.7)),
    radial-gradient(circle at 76% 20%, rgba(112, 209, 174, 0.34), transparent 17rem),
    linear-gradient(145deg, var(--pine-700), var(--pine-950));
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  isolation: isolate;
}

.auth-brand-panel::before,
.auth-brand-panel::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  z-index: -1;
}
.auth-brand-panel::before { width: 500px; height: 500px; right: -240px; top: 80px; }
.auth-brand-panel::after { width: 320px; height: 320px; right: -150px; top: 170px; }

.brand-lockup { display: flex; align-items: center; gap: 15px; }
.brand-lockup img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.98);
  border-radius: 14px;
  padding: 6px;
}
.brand-lockup div { display: grid; gap: 2px; letter-spacing: 0.08em; }
.brand-lockup strong { font-size: 15px; }
.brand-lockup span { font-size: 11px; color: rgba(255, 255, 255, 0.68); }
.brand-lockup.compact img { width: 42px; height: 42px; border-radius: 11px; }

.auth-brand-copy { max-width: 540px; margin: 80px 0; }
.eyebrow {
  display: inline-block;
  color: var(--pine-700);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.auth-brand-copy .eyebrow { color: var(--mint); }
.auth-brand-copy h1 {
  margin: 18px 0 18px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(42px, 5vw, 70px);
  line-height: 0.98;
  letter-spacing: -0.045em;
}
.auth-brand-copy p { max-width: 460px; color: rgba(247, 255, 251, 0.74); font-size: 16px; line-height: 1.7; }
.environment-stamp {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(247, 255, 251, 0.72);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.environment-stamp span { width: 9px; height: 9px; background: var(--mint); border-radius: 50%; box-shadow: 0 0 0 6px rgba(112, 209, 174, 0.12); }

.auth-form-panel { padding: 52px; display: grid; place-items: center; }
.auth-form-wrap { width: min(420px, 100%); }
.language-switcher { display: flex; gap: 6px; justify-content: flex-end; }
.lang-chip {
  min-width: 42px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}
.lang-chip:hover, .lang-chip.active { color: var(--pine-800); border-color: #b9d8cc; background: var(--mint-soft); }
.auth-heading { display: flex; align-items: center; gap: 16px; margin: 52px 0 10px; }
.secure-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: var(--pine-800);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.08em;
}
.auth-heading p { margin: 0 0 3px; color: var(--pine-700); font-size: 11px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.auth-heading h2 { margin: 0; font-size: 25px; letter-spacing: -0.03em; }
.form-help, .privacy-note { color: var(--muted); font-size: 13px; line-height: 1.65; }
.privacy-note { margin: 22px 0 0; padding-top: 18px; border-top: 1px solid var(--line); }
.auth-form { display: grid; gap: 16px; margin-top: 28px; }
.field { display: grid; gap: 8px; }
.field span { color: #40534b; font-size: 12px; font-weight: 750; }
.field input, .field select {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  color: var(--ink);
  background: #fbfdfc;
  border: 1px solid #d8e4de;
  border-radius: 12px;
  outline: none;
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}
.field input:focus, .field select:focus { border-color: var(--pine-700); background: #fff; box-shadow: 0 0 0 4px rgba(25, 103, 79, 0.1); }
.primary-button, .secondary-button {
  min-height: 48px;
  border: 0;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: pointer;
  font-weight: 800;
  transition: transform 140ms ease, background 140ms ease, box-shadow 140ms ease;
}
.primary-button { color: #fff; background: var(--pine-800); box-shadow: 0 12px 24px rgba(20, 81, 63, 0.18); }
.primary-button:hover { background: var(--pine-700); transform: translateY(-1px); }
.secondary-button { padding: 0 18px; color: var(--pine-800); background: var(--mint-soft); }
.secondary-button:hover { background: #d1eee3; }
.alert { margin-top: 20px; padding: 12px 14px; border-radius: 10px; font-size: 13px; }
.alert.error { color: #8b3737; background: var(--red-soft); border: 1px solid #f1c9c4; }
.alert.success { color: #175b43; background: var(--mint-soft); border: 1px solid #bfe5d6; }

.app-body { background: var(--paper); }
.test-ribbon {
  min-height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 16px;
  color: #173b2e;
  background: var(--gold-soft);
  border-bottom: 1px solid #e8d8b5;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.app-shell { min-height: calc(100vh - 30px); display: grid; grid-template-columns: 250px minmax(0, 1fr); }
.sidebar {
  position: sticky;
  top: 0;
  height: calc(100vh - 30px);
  padding: 28px 18px 22px;
  display: flex;
  flex-direction: column;
  color: #f5fcf8;
  background:
    radial-gradient(circle at 50% 95%, rgba(112, 209, 174, 0.14), transparent 16rem),
    var(--pine-950);
}
.sidebar .brand-lockup { padding: 0 10px; }
.primary-nav { display: grid; gap: 6px; margin-top: 44px; }
.nav-item {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 0 14px;
  border-radius: 12px;
  color: rgba(247, 255, 251, 0.66);
  font-size: 14px;
  font-weight: 650;
}
.nav-item span { width: 26px; color: rgba(112, 209, 174, 0.64); font-family: ui-monospace, SFMono-Regular, monospace; font-size: 10px; }
.nav-item:hover { color: #fff; background: rgba(255, 255, 255, 0.05); }
.nav-item.active { color: #fff; background: linear-gradient(90deg, rgba(112, 209, 174, 0.2), rgba(112, 209, 174, 0.06)); box-shadow: inset 3px 0 var(--mint); }
.sidebar-foot { margin-top: auto; padding: 18px 12px 0; border-top: 1px solid rgba(255, 255, 255, 0.1); display: flex; align-items: flex-start; gap: 11px; }
.sidebar-foot .status-dot { flex: 0 0 auto; width: 9px; height: 9px; margin-top: 4px; border-radius: 50%; background: var(--mint); }
.sidebar-foot div { display: grid; gap: 3px; }
.sidebar-foot strong { font-size: 11px; letter-spacing: 0.05em; }
.sidebar-foot small { color: rgba(247, 255, 251, 0.48); font-size: 10px; line-height: 1.4; }

.main-panel { min-width: 0; }
.topbar {
  min-height: 88px;
  padding: 18px 34px;
  display: flex;
  align-items: center;
  gap: 18px;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}
.topbar .crumb { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: 0.14em; }
.topbar h1 { margin: 3px 0 0; font-size: 19px; letter-spacing: -0.025em; }
.menu-button { display: none; border: 0; background: transparent; font-size: 22px; }
.account-cluster { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.account-cluster .language-switcher { margin-right: 10px; }
.avatar { width: 38px; height: 38px; display: grid; place-items: center; color: #fff; background: var(--pine-700); border-radius: 12px; font-weight: 800; }
.account-copy { display: grid; min-width: 96px; }
.account-copy strong { font-size: 12px; }
.account-copy span { color: var(--muted); font-size: 10px; text-transform: uppercase; }
.text-button { border: 0; color: var(--muted); background: transparent; cursor: pointer; font-size: 11px; }
.text-button:hover { color: var(--pine-700); }
.environment-notice { margin: 22px 34px 0; padding: 11px 14px; display: flex; align-items: center; gap: 11px; color: #6d5521; background: var(--gold-soft); border: 1px solid #ead7ac; border-radius: 12px; font-size: 12px; }
.environment-notice span { padding: 3px 7px; color: #fff; background: #a27d2c; border-radius: 6px; font-size: 9px; font-weight: 900; letter-spacing: 0.12em; }
.page-content { padding: 30px 34px 48px; }
.page-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.page-intro h2 { margin: 7px 0 8px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(26px, 3vw, 38px); letter-spacing: -0.04em; }
.page-intro p { margin: 0; color: var(--muted); font-size: 13px; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; }
.metric-card, .panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: 0 8px 22px rgba(12, 56, 43, 0.04); }
.metric-card { position: relative; min-height: 148px; padding: 20px; overflow: hidden; }
.metric-card::after { content: ""; position: absolute; right: -20px; bottom: -32px; width: 100px; height: 100px; border-radius: 50%; opacity: 0.8; }
.metric-card.members::after { background: var(--mint-soft); }
.metric-card.orders::after { background: #e8ecfb; }
.metric-card.sales::after { background: var(--gold-soft); }
.metric-card.bonus::after { background: #f0e8fb; }
.metric-top { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 11px; font-weight: 750; }
.metric-top i { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); }
.metric-card strong { display: block; margin-top: 22px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(25px, 2.5vw, 34px); letter-spacing: -0.045em; }
.metric-card small { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; }
.dashboard-grid { margin-top: 15px; display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(260px, 0.7fr); gap: 15px; }
.panel { padding: 22px; }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 15px; }
.panel-head h3 { margin: 6px 0 0; font-size: 16px; }
.panel-head a { color: var(--pine-700); font-size: 11px; font-weight: 750; }
.network-visual { margin-top: 22px; padding: 4px 14px 12px; display: grid; place-items: center; }
.network-node { min-width: 132px; padding: 12px; display: grid; grid-template-columns: 34px 1fr; column-gap: 10px; align-items: center; background: #f9fbfa; border: 1px solid var(--line); border-radius: 12px; }
.network-node > span { grid-row: 1 / span 2; width: 34px; height: 34px; display: grid; place-items: center; color: #fff; background: var(--pine-700); border-radius: 10px; font-size: 11px; font-weight: 800; }
.network-node strong { font-size: 11px; }
.network-node small { color: var(--muted); font-size: 8px; letter-spacing: 0.06em; }
.network-node.root { position: relative; background: var(--pine-950); border-color: var(--pine-950); color: #fff; }
.network-node.root::after { content: ""; position: absolute; left: 50%; bottom: -24px; width: 1px; height: 24px; background: #bed5cc; }
.network-branches { position: relative; width: 100%; margin-top: 24px; padding-top: 24px; display: flex; justify-content: space-between; gap: 10px; }
.network-branches::before { content: ""; position: absolute; left: 16%; right: 16%; top: 0; height: 1px; background: #bed5cc; }
.network-branches .network-node { position: relative; }
.network-branches .network-node::before { content: ""; position: absolute; left: 50%; top: -25px; width: 1px; height: 24px; background: #bed5cc; }
.bonus-preview { display: flex; flex-direction: column; }
.bonus-ring { width: 150px; height: 150px; margin: 24px auto 18px; padding: 14px; border-radius: 50%; background: conic-gradient(var(--gold) 0 70%, var(--mint) 70% 100%); }
.bonus-ring > div { width: 100%; height: 100%; display: grid; place-content: center; text-align: center; background: #fff; border-radius: 50%; }
.bonus-ring strong { font-family: Georgia, "Times New Roman", serif; font-size: 21px; }
.bonus-ring span { color: var(--muted); font-size: 9px; letter-spacing: 0.12em; }
.bonus-legend { display: flex; justify-content: center; gap: 14px; color: var(--muted); font-size: 9px; }
.bonus-legend span { display: flex; align-items: center; gap: 5px; }
.bonus-legend i { width: 7px; height: 7px; border-radius: 50%; }
.bonus-legend i.gold { background: var(--gold); }
.bonus-legend i.mint { background: var(--mint); }
.order-panel { margin-top: 15px; }
.table-wrap { margin-top: 18px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 10px 12px; color: var(--muted); border-bottom: 1px solid var(--line); font-size: 9px; letter-spacing: 0.08em; text-align: left; text-transform: uppercase; }
td { padding: 14px 12px; border-bottom: 1px solid #eef3f0; font-size: 12px; white-space: nowrap; }
td strong, td small { display: block; }
td small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.status { padding: 5px 8px; border-radius: 999px; font-size: 9px; font-weight: 750; }
.status.completed { color: #24684f; background: var(--mint-soft); }
.status.paid { color: #6d5521; background: var(--gold-soft); }
.status.shipped { color: #465999; background: #e8ecfb; }
.status.new { color: #52625c; background: #edf1ef; }
.status.cancelled { color: var(--red); background: var(--red-soft); }
.empty { padding: 40px; color: var(--muted); text-align: center; }

.data-panel { margin-top: 15px; }
.mini-stat-grid { margin-bottom: 15px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; }
.mini-stat { padding: 17px 18px; display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.mini-stat span { grid-row: 1 / span 2; width: 36px; height: 36px; display: grid; place-items: center; color: #fff; background: var(--pine-700); border-radius: 10px; font-size: 10px; font-weight: 850; }
.mini-stat strong { font-family: Georgia, "Times New Roman", serif; font-size: 22px; }
.mini-stat small { color: var(--muted); font-size: 9px; letter-spacing: 0.08em; text-transform: uppercase; }
.member-cell { display: flex; align-items: center; gap: 10px; }
.member-cell.depth-1 { padding-left: 18px; }
.member-cell.depth-2 { padding-left: 36px; }
.member-cell.depth-3 { padding-left: 54px; }
.member-cell.depth-4 { padding-left: 72px; }
.member-cell > span { width: 30px; height: 30px; display: grid; place-items: center; color: #fff; background: var(--pine-700); border-radius: 9px; font-size: 10px; font-weight: 800; }
.member-cell div { display: grid; }
.member-cell small { margin: 2px 0 0; }
.bonus-metrics .metric-card.direct::after { background: var(--gold-soft); }
.bonus-metrics .metric-card.team::after { background: var(--mint-soft); }
.status.direct { color: #6d5521; background: var(--gold-soft); }
.status.team { color: #24684f; background: var(--mint-soft); }
.status.adjustment { color: #465999; background: #e8ecfb; }
.orders-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(240px, 0.5fr); gap: 15px; }
.form-panel .panel-head { margin-bottom: 20px; }
.stacked-form { display: grid; gap: 15px; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.stacked-form .primary-button { padding: 0 20px; justify-self: start; }
.orders-summary h3 { margin: 6px 0 20px; }
.status-counts { display: grid; gap: 10px; }
.status-counts div { display: flex; align-items: center; justify-content: space-between; padding-bottom: 10px; border-bottom: 1px solid #eef3f0; }
.status-counts strong { font-family: Georgia, "Times New Roman", serif; font-size: 19px; }
.inline-form { display: flex; align-items: center; gap: 7px; }
.inline-form select { min-width: 104px; height: 34px; padding: 0 8px; color: var(--ink); background: #fbfdfc; border: 1px solid var(--line); border-radius: 8px; font-size: 10px; }
.small-button { height: 34px; padding: 0 11px; color: #fff; background: var(--pine-700); border: 0; border-radius: 8px; cursor: pointer; font-size: 10px; font-weight: 750; }
.profile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.field input:disabled { color: #7d8a84; background: #f0f4f2; cursor: not-allowed; }

@media (max-width: 1050px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .mini-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .orders-layout, .profile-grid { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .auth-shell { width: min(620px, calc(100% - 24px)); grid-template-columns: 1fr; }
  .auth-brand-panel { min-height: 330px; padding: 30px; }
  .auth-brand-copy { margin: 50px 0 30px; }
  .auth-brand-copy h1 { font-size: 42px; }
  .auth-form-panel { padding: 34px 26px; }
  .auth-heading { margin-top: 34px; }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 30px auto 0 0; width: 250px; z-index: 20; transform: translateX(-105%); transition: transform 180ms ease; box-shadow: 20px 0 50px rgba(0,0,0,0.18); }
  .sidebar.open { transform: translateX(0); }
  .menu-button { display: block; }
  .topbar { padding: 15px 20px; }
  .page-content { padding: 24px 20px 40px; }
  .environment-notice { margin: 18px 20px 0; }
  .account-copy { display: none; }
}

@media (max-width: 620px) {
  .metric-grid { grid-template-columns: 1fr; }
  .mini-stat-grid, .form-row { grid-template-columns: 1fr; }
  .page-intro { align-items: flex-start; flex-direction: column; }
  .network-branches { align-items: center; flex-direction: column; }
  .network-branches::before { display: none; }
  .network-branches .network-node::before { left: 50%; }
  .network-node { width: 100%; }
  .account-cluster .language-switcher { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

/* 20260905.3 — dashboard and application-shell refresh */
:root {
  --ink: #17362c;
  --muted: #667a72;
  --line: #dce7e1;
  --paper: #f1f5f2;
  --pine-950: #08271e;
  --pine-900: #0c3529;
  --pine-800: #124c3b;
  --pine-700: #17664d;
  --mint: #6bd3ad;
  --mint-soft: #e2f5ee;
  --gold: #d5ad57;
  --gold-soft: #f8efd9;
  --shadow: 0 18px 52px rgba(10, 50, 38, 0.09);
  --radius-lg: 26px;
  --radius-md: 18px;
}

body {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.icon {
  width: 20px;
  height: 20px;
  display: block;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 11px 16px;
  color: #fff;
  background: var(--pine-800);
  border-radius: 10px;
  box-shadow: var(--shadow);
  transform: translateY(-160%);
}

.skip-link:focus { transform: translateY(0); }

:where(a, button, input, select):focus-visible {
  outline: 3px solid rgba(45, 163, 123, 0.38);
  outline-offset: 3px;
}

.page-content:focus { outline: none; }

.app-body {
  color: var(--ink);
  background:
    radial-gradient(circle at 92% 3%, rgba(107, 211, 173, 0.09), transparent 30rem),
    var(--paper);
}

.test-ribbon {
  min-height: 30px;
  gap: 9px;
  color: #684f1b;
  background: #fbf2dd;
  border-bottom-color: #ead7aa;
  font-size: 10px;
  letter-spacing: 0.12em;
}

.test-ribbon > span {
  width: 7px;
  height: 7px;
  background: #b4862c;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(180, 134, 44, 0.12);
}

.app-shell { grid-template-columns: 272px minmax(0, 1fr); }

.sidebar {
  height: calc(100vh - 30px);
  padding: 26px 18px 20px;
  background:
    radial-gradient(circle at 40% 105%, rgba(107, 211, 173, 0.17), transparent 20rem),
    linear-gradient(180deg, #0a3025 0%, var(--pine-950) 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.04);
}

.sidebar .brand-lockup {
  padding: 0 12px;
  gap: 13px;
}

.brand-lockup.compact img {
  width: 44px;
  height: 44px;
  padding: 5px;
  border-radius: 13px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.16);
}

.brand-lockup.compact strong { font-size: 14px; }
.brand-lockup.compact span { font-size: 10px; letter-spacing: 0.12em; }

.primary-nav {
  gap: 7px;
  margin-top: 38px;
}

.nav-item {
  min-height: 50px;
  gap: 11px;
  padding: 0 13px;
  color: rgba(247, 255, 251, 0.72);
  border: 1px solid transparent;
  border-radius: 13px;
  font-size: 14px;
  font-weight: 650;
}

.nav-item .nav-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  color: rgba(130, 225, 191, 0.76);
  background: rgba(255, 255, 255, 0.045);
  border-radius: 10px;
  font-family: inherit;
  font-size: inherit;
}

.nav-item .nav-icon .icon { width: 18px; height: 18px; }

.nav-item .nav-label {
  width: auto;
  min-width: 0;
  color: inherit;
  font: inherit;
}

.nav-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.065);
  border-color: rgba(255, 255, 255, 0.04);
}

.nav-item.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(107, 211, 173, 0.2), rgba(107, 211, 173, 0.07));
  border-color: rgba(107, 211, 173, 0.1);
  box-shadow: inset 3px 0 var(--mint);
}

.nav-item.active .nav-icon {
  color: #09281f;
  background: var(--mint);
}

.sidebar-foot {
  margin-top: auto;
  padding: 18px 2px 0;
  display: block;
  border-top-color: rgba(255, 255, 255, 0.09);
}

.sidebar-language { display: none; }

.system-card {
  min-width: 0;
  padding: 13px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 8px;
  align-items: center;
  gap: 10px;
  color: #f7fffb;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
}

.system-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  color: var(--mint);
  background: rgba(107, 211, 173, 0.1);
  border-radius: 9px;
}

.system-icon .icon { width: 17px; height: 17px; }
.system-card div { min-width: 0; display: grid; gap: 3px; }
.system-card small { color: rgba(247, 255, 251, 0.58); font-size: 10px; }
.system-card strong { font-size: 11px; line-height: 1.35; }
.system-card .status-dot {
  width: 8px;
  height: 8px;
  margin: 0;
  background: var(--mint);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(107, 211, 173, 0.1);
}

.sidebar-backdrop { display: none; }
.main-panel { min-width: 0; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 12;
  min-height: 78px;
  padding: 14px 32px;
  gap: 14px;
  background: rgba(250, 252, 250, 0.9);
  border-bottom-color: rgba(210, 224, 216, 0.88);
  backdrop-filter: blur(18px);
}

.topbar-title { min-width: 0; }
.topbar .crumb { color: #7a8d85; font-size: 9px; letter-spacing: 0.15em; }
.topbar h1 { margin-top: 4px; font-size: 18px; }

.topbar-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  color: #755b20;
  background: var(--gold-soft);
  border: 1px solid #ead8b1;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.08em;
}

.topbar-status i {
  width: 6px;
  height: 6px;
  background: var(--gold);
  border-radius: 50%;
}

.menu-button {
  width: 44px;
  height: 44px;
  place-items: center;
  color: var(--pine-800);
  border-radius: 11px;
}

.menu-button:hover { background: var(--mint-soft); }
.menu-button .icon { width: 22px; height: 22px; }

.account-cluster { gap: 10px; }
.account-cluster .language-switcher { margin-right: 4px; }
.avatar {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  background: linear-gradient(145deg, var(--pine-700), var(--pine-900));
  border-radius: 12px;
  box-shadow: 0 7px 18px rgba(12, 53, 41, 0.16);
}

.account-copy {
  min-width: 0;
  max-width: 150px;
}

.account-copy strong,
.account-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-copy strong { font-size: 12px; }
.account-copy span { font-size: 10px; text-transform: none; }

.text-button {
  min-width: 44px;
  min-height: 44px;
  padding: 0 9px;
  border-radius: 10px;
}

.text-button:hover { color: var(--pine-800); background: var(--mint-soft); }

.environment-notice {
  width: min(1440px, calc(100% - 64px));
  margin: 20px auto 0;
  padding: 10px 13px;
  gap: 10px;
  color: #6f5722;
  background: rgba(248, 239, 217, 0.78);
  border-color: #ead8b2;
  border-radius: 11px;
}

.environment-notice p { margin: 0; line-height: 1.5; }

.page-content {
  width: min(1504px, 100%);
  margin: 0 auto;
  padding: 28px 32px 52px;
}

.page-intro {
  align-items: center;
  margin-bottom: 22px;
}

.page-intro > div:first-child { min-width: 0; }

.page-intro h2 {
  margin: 6px 0 8px;
  font-family: inherit;
  font-size: clamp(27px, 3vw, 38px);
  font-weight: 720;
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.page-intro p {
  max-width: 650px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.eyebrow {
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.14em;
}

.intro-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.compact-button,
.intro-actions .secondary-button {
  min-height: 44px;
  padding: 0 16px;
  white-space: nowrap;
}

.secondary-button {
  border: 1px solid #cfe7dd;
  box-shadow: none;
}

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

.metric-card {
  position: relative;
  min-height: 154px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  color: inherit;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.94);
  border-color: var(--line);
  border-radius: var(--radius-md);
  box-shadow: 0 9px 26px rgba(10, 50, 38, 0.045);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

a.metric-card:hover {
  transform: translateY(-3px);
  border-color: #c4ded4;
  box-shadow: 0 17px 36px rgba(10, 50, 38, 0.09);
}

.metric-card::after {
  inset: 0 0 auto 0;
  width: 100%;
  height: 3px;
  border-radius: 0;
  opacity: 1;
}

.metric-card.members::after { background: #62c9a3; }
.metric-card.orders::after { background: #879ee4; }
.metric-card.sales::after { background: #d5ad57; }
.metric-card.bonus::after { background: #a98bd4; }

.metric-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.metric-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: var(--pine-700);
  background: var(--mint-soft);
  border-radius: 11px;
}

.metric-card.orders .metric-icon { color: #5269af; background: #edf0fc; }
.metric-card.sales .metric-icon { color: #84651f; background: var(--gold-soft); }
.metric-card.bonus .metric-icon { color: #7655a4; background: #f1ebf9; }
.metric-icon .icon { width: 19px; height: 19px; }

.metric-link-mark {
  color: #8da097;
  font-size: 14px;
  transition: transform 160ms ease, color 160ms ease;
}

a.metric-card:hover .metric-link-mark {
  color: var(--pine-700);
  transform: translate(2px, -2px);
}

.metric-copy {
  margin-top: auto;
  display: grid;
  gap: 3px;
}

.metric-copy > span,
.metric-top {
  color: var(--muted);
  font-size: 11px;
  font-weight: 720;
}

.metric-copy strong,
.metric-card > strong {
  margin-top: 2px;
  font-family: inherit;
  font-size: clamp(25px, 2.2vw, 33px);
  font-weight: 760;
  line-height: 1.05;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
}

.metric-copy small,
.metric-card > small {
  margin-top: 3px;
  color: #7a8c84;
  font-size: 10px;
  letter-spacing: 0.02em;
  text-transform: none;
}

.panel {
  padding: 23px;
  background: rgba(255, 255, 255, 0.95);
  border-color: var(--line);
  border-radius: var(--radius-md);
  box-shadow: 0 9px 26px rgba(10, 50, 38, 0.045);
}

.panel-head h3 {
  margin-top: 5px;
  font-size: 17px;
  letter-spacing: -0.02em;
}

.panel-head > a {
  min-height: 40px;
  padding: 0 4px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--pine-700);
  font-size: 12px;
  white-space: nowrap;
}

.dashboard-grid {
  margin-top: 16px;
  grid-template-columns: minmax(0, 1.55fr) minmax(310px, 0.72fr);
  gap: 16px;
}

.network-tree,
.network-tree ul,
.bonus-breakdown {
  margin: 0;
  padding: 0;
  list-style: none;
}

.network-tree {
  margin-top: 22px;
  padding: 4px 2px 2px;
}

.network-root {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
}

.node-avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, var(--pine-700), var(--pine-900));
  border-radius: 13px;
  font-size: 11px;
  font-weight: 850;
  box-shadow: 0 8px 18px rgba(10, 50, 38, 0.14);
}

.network-root > div,
.network-node > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.network-root strong,
.network-node strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.network-root small,
.network-node small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.network-branches {
  position: relative;
  grid-column: 1 / -1;
  width: 100%;
  margin-top: 24px;
  padding-top: 25px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.network-branches::before {
  left: 16.666%;
  right: 16.666%;
  background: #bfd6cd;
}

.network-node {
  position: relative;
  min-width: 0;
  width: 100%;
  padding: 11px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 9px;
  background: #f7faf8;
  border-color: #dce8e2;
  border-radius: 13px;
}

.network-node .node-avatar {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  box-shadow: none;
}

.network-branches .network-node::before {
  top: -26px;
  height: 25px;
  background: #bfd6cd;
}

.bonus-preview { display: flex; flex-direction: column; }

.bonus-total {
  margin: 24px 0 17px;
  padding: 17px;
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, #f8f1df, #fffaf0);
  border: 1px solid #eddfbd;
  border-radius: 15px;
}

.bonus-orbit {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  display: grid;
  place-items: center;
  color: #87671f;
  background: #fff;
  border: 1px solid #ead6a9;
  border-radius: 50%;
  box-shadow: 0 8px 18px rgba(132, 101, 31, 0.1);
}

.bonus-orbit-icon { width: 21px; height: 21px; }
.bonus-total > div { min-width: 0; display: grid; gap: 4px; }
.bonus-total small { color: #7b6c49; font-size: 10px; }
.bonus-total strong {
  overflow: hidden;
  color: #463712;
  font-size: clamp(20px, 2vw, 27px);
  line-height: 1.1;
  letter-spacing: -0.035em;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.bonus-breakdown { display: grid; gap: 9px; }
.bonus-breakdown li {
  min-height: 34px;
  padding: 6px 2px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #edf2ef;
  font-size: 11px;
}

.bonus-breakdown li:last-child { border-bottom: 0; }
.bonus-breakdown span { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.bonus-breakdown i { width: 8px; height: 8px; border-radius: 50%; }
.bonus-breakdown i.direct { background: var(--gold); }
.bonus-breakdown i.team { background: var(--mint); }
.bonus-breakdown i.adjustment { background: #9b87ca; }
.bonus-breakdown strong { font-size: 11px; font-variant-numeric: tabular-nums; }

.order-panel { margin-top: 16px; }
.order-panel-head { align-items: center; }
.order-status-summary {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.status-summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.status-summary .status { font-style: normal; }
.status-summary > strong { font-size: 11px; font-variant-numeric: tabular-nums; }

.table-wrap { margin-top: 17px; }
th {
  padding: 11px 12px;
  color: #6f8179;
  font-size: 10px;
  letter-spacing: 0.06em;
}

td {
  padding: 14px 12px;
  font-size: 12px;
  line-height: 1.45;
}

td.numeric {
  font-weight: 720;
  font-variant-numeric: tabular-nums;
}

td small { font-size: 10px; }

.status {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 5px 9px;
  font-size: 10px;
}

@media (max-width: 1180px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-card { min-height: 142px; }
  .topbar-languages { display: none; }
}

@media (max-width: 1050px) {
  .dashboard-grid { grid-template-columns: 1fr; }
  .bonus-preview { min-height: auto; }
}

@media (max-width: 820px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    inset: 30px auto 0 0;
    width: min(292px, calc(100vw - 44px));
    height: calc(100vh - 30px);
    z-index: 30;
    padding-top: 24px;
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-backdrop {
    position: fixed;
    inset: 30px 0 0;
    z-index: 25;
    display: block;
    padding: 0;
    border: 0;
    background: rgba(4, 24, 18, 0.48);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease;
    backdrop-filter: blur(2px);
  }
  .sidebar.open ~ .sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }
  .nav-open { overflow: hidden; }
  .menu-button { display: grid; }
  .sidebar-language {
    margin-bottom: 14px;
    display: flex;
    justify-content: flex-start;
  }
  .sidebar-language .lang-chip {
    color: rgba(247, 255, 251, 0.72);
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.12);
  }
  .sidebar-language .lang-chip.active {
    color: #09281f;
    background: var(--mint);
    border-color: var(--mint);
  }
  .topbar { padding: 12px 20px; }
  .environment-notice {
    width: calc(100% - 40px);
    margin-top: 17px;
  }
  .page-content { padding: 24px 20px 42px; }
}

@media (max-width: 680px) {
  .topbar { min-height: 70px; }
  .topbar .crumb { display: none; }
  .topbar h1 {
    margin: 0;
    overflow: hidden;
    font-size: 16px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .topbar-status { padding: 6px 8px; font-size: 9px; }
  .account-copy { display: none; }
  .account-cluster { margin-left: auto; gap: 4px; }
  .account-cluster .avatar { display: none; }
  .page-intro {
    align-items: flex-start;
    flex-direction: column;
  }
  .page-intro h2 { font-size: 27px; }
  .intro-actions {
    width: 100%;
    justify-content: stretch;
  }
  .intro-actions a { flex: 1 1 0; text-align: center; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
  .metric-card { min-height: 136px; padding: 15px; }
  .metric-icon { width: 34px; height: 34px; }
  .metric-copy strong { font-size: clamp(20px, 6vw, 27px); }
  .metric-copy > span { font-size: 10px; }
  .metric-copy small { font-size: 9px; }
  .panel { padding: 18px; }
  .network-branches { grid-template-columns: 1fr; padding-top: 18px; }
  .network-branches::before { display: none; }
  .network-branches .network-node::before {
    left: 21px;
    top: -19px;
    height: 18px;
  }
  .order-panel-head {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .order-status-summary {
    order: 3;
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
  }
  .responsive-orders { overflow: visible; }
  .responsive-orders table,
  .responsive-orders tbody,
  .responsive-orders tr,
  .responsive-orders td { display: block; width: 100%; }
  .responsive-orders thead {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }
  .responsive-orders tbody { display: grid; gap: 11px; }
  .responsive-orders tr {
    padding: 8px 13px;
    background: #f9fbfa;
    border: 1px solid #e1ebe6;
    border-radius: 13px;
  }
  .responsive-orders td {
    min-height: 38px;
    padding: 9px 0;
    display: grid;
    grid-template-columns: minmax(90px, 38%) minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    white-space: normal;
    border-bottom: 1px solid #e9f0ec;
    text-align: right;
  }
  .responsive-orders td:last-child { border-bottom: 0; }
  .responsive-orders td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 10px;
    font-weight: 750;
    text-align: left;
  }
  .responsive-orders td > * { justify-self: end; }
  .responsive-orders td strong,
  .responsive-orders td small { text-align: right; }
}

@media (max-width: 390px) {
  .metric-grid { grid-template-columns: 1fr; }
  .metric-card { min-height: 128px; }
  .intro-actions { flex-direction: column; }
  .intro-actions a { width: 100%; }
  .topbar-status { display: none; }
}
