@charset "UTF-8";
:root {
  color-scheme: light;
  --bg: #f6f7fb;
  --surface: #fff;
  --text: #202535;
  --muted: #737b8f;
  --line: #e9ecf3;
  --accent: #536eff;
  --soft: #eff2ff;
  --green: #137d60;
  --red: #b53f57;
  --shadow: 0 6px 30px #1b254105;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #121622;
  --surface: #1b2030;
  --text: #edf0fa;
  --muted: #a4adc2;
  --line: #30384c;
  --accent: #91a2ff;
  --soft: #292f4b;
  --green: #6ddab2;
  --red: #ff9cb0;
  --shadow: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font:
    14px/1.6 -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Arial,
    sans-serif;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  border: 0;
  border-radius: 10px;
  padding: 10px 15px;
  font-weight: 600;
}
button:disabled {
  opacity: 0.6;
  cursor: wait;
}
a {
  color: var(--accent);
}
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
.primary {
  background: #536eff;
  color: white;
  box-shadow: 0 3px 8px #536eff20;
}
.secondary {
  background: var(--soft);
  color: var(--text);
}
.muted {
  color: var(--muted);
}
.brand {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  text-decoration: none;
  font-size: 27px;
  font-weight: 800;
  letter-spacing: -1.2px;
  color: var(--text);
}
.brand span {
  margin-top: 7px;
  font-size: 10px;
  color: var(--accent);
  background: var(--soft);
  padding: 2px 6px;
  border-radius: 5px;
  font-weight: 600;
  letter-spacing: 0;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 1.8px;
  color: var(--muted);
  font-weight: 700;
  margin: 0 0 8px;
}
.skip {
  position: fixed;
  left: 10px;
  top: -80px;
  background: var(--surface);
  padding: 10px;
  z-index: 20;
}
.skip:focus {
  top: 10px;
}
.shell {
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  background: var(--surface);
  padding: 28px 22px;
  border-right: 1px solid var(--line);
  position: fixed;
  inset: 0 auto 0 0;
  width: 244px;
  display: flex;
  flex-direction: column;
  z-index: 5;
}
.sidebar-caption {
  font-size: 9px;
  letter-spacing: 1.8px;
  color: var(--muted);
  margin: 48px 12px 14px;
}
nav {
  display: grid;
  gap: 7px;
}
nav a {
  display: flex;
  align-items: center;
  gap: 13px;
  color: var(--muted);
  padding: 12px 14px;
  text-decoration: none;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
}
nav a:hover {
  background: var(--bg);
}
nav a[aria-current="page"] {
  color: var(--accent);
  background: var(--soft);
}
.nav-icon {
  font-size: 16px;
  width: 20px;
}
.sidebar-bottom {
  margin-top: auto;
  padding-top: 30px;
}
.partner-balance {
  display: grid;
  gap: 10px;
  padding: 16px 12px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
}
.partner-balance-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}
#partner-balance-value {
  color: var(--text);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.partner-balance button {
  width: 100%;
  min-height: 43px;
  font-size: 12px;
}
.sidebar-bottom > button {
  width: 100%;
  font-size: 11px;
}
.withdraw-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: #0008;
}
.withdraw-dialog {
  position: relative;
  width: 100%;
  max-width: 420px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 20px 70px #0003;
}
.withdraw-dialog h2 {
  margin: 0 35px 14px 0;
  font-size: 21px;
}
.withdraw-dialog p {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}
.withdraw-close {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 34px;
  height: 34px;
  padding: 0;
  background: var(--soft);
  color: var(--text);
  font-size: 24px;
  line-height: 1;
}
.withdraw-contact {
  display: block;
  padding: 12px 16px;
  border-radius: 10px;
  background: #536eff;
  color: #fff;
  text-align: center;
  text-decoration: none;
  font-weight: 600;
}
.withdraw-contact:hover {
  background: #4059df;
}
.workspace {
  grid-column: 2;
  min-width: 0;
}
.topbar {
  height: 80px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  padding: 0 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.topbar-label {
  color: var(--muted);
  font-size: 12px;
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.theme-toggle {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--muted);
  box-shadow: none;
  cursor: pointer;
  transition:
    background .15s ease,
    color .15s ease,
    border-color .15s ease,
    transform .15s ease;
}
.theme-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-1px);
}
.theme-toggle svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
:root[data-theme="dark"] .theme-toggle {
  border-color: #313c50;
  background: rgba(25, 32, 46, .92);
  color: #c4cedd;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .14);
}
:root[data-theme="dark"] .theme-toggle:hover {
  border-color: #48556e;
  background: #202938;
  color: #80a5ff;
}
@media (max-width: 640px) {
  .theme-toggle {
    flex-basis: 32px;
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    border-radius: 7px;
  }
  .theme-toggle svg {
    width: 16px;
    height: 16px;
  }
}
.partner-badge {
  font-size: 12px;
  font-weight: 600;
  min-width: 0;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mobile-menu {
  display: none;
}
main#main {
  max-width: 1440px;
  margin: auto;
  padding: 36px 38px 16px;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 25px;
}
h1 {
  font-size: 29px;
  line-height: 1.25;
  letter-spacing: -0.8px;
  margin: 0 0 8px;
}
h2 {
  font-size: 17px;
  letter-spacing: -0.3px;
  margin: 0 0 16px;
}
p {
  margin: 0 0 12px;
}
.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
  margin-bottom: 24px;
}
label {
  display: grid;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}
input,
select {
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--text);
  background: var(--surface);
  padding: 10px 12px;
  min-height: 43px;
  min-width: 0;
}
select {
  min-width: 140px;
}
.filters input,
.filters select {
  box-sizing: border-box;
  height: 43px;
  width: 155px;
}
.filters button {
  min-height: 43px;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px;
  margin-bottom: 22px;
}
.metric,
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 15px;
  box-shadow: var(--shadow);
}
.metric {
  padding: 20px;
  min-height: 128px;
}
.metric .label {
  color: var(--muted);
  font-size: 11px;
  display: block;
  margin-bottom: 13px;
}
.metric .value {
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -0.7px;
  overflow-wrap: anywhere;
  line-height: 1.3;
}
.metric .detail {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 8px;
}
.metric.accent {
  background: #536eff;
  border-color: #536eff;
  color: #fff;
}
.metric.accent .label,
.metric.accent .detail {
  color: #e3e8ff;
}
.metric.negative .value {
  color: var(--red);
}
.card {
  padding: 24px;
  margin-bottom: 20px;
  min-width: 0;
}
.card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.card-heading h2 {
  margin: 0;
}
.chip {
  display: inline-block;
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 10px;
  background: var(--soft);
  color: var(--accent);
  white-space: nowrap;
}
.chip.approved,
.chip.paid {
  background: var(--bg);
  color: var(--green);
}
.chip.cancelled,
.chip.rejected {
  color: var(--red);
  background: var(--bg);
}
.table-wrap {
  overflow: auto;
  max-width: 100%;
}
table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
  white-space: nowrap;
}
th {
  font-size: 10px;
  letter-spacing: 0.3px;
  font-weight: 600;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  padding: 12px 14px;
  background: var(--bg);
}
td {
  padding: 14px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
tr:last-child td {
  border-bottom: 0;
}
.table-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
  margin-bottom: 18px;
}
.table-controls > input,
.table-controls > select,
.table-controls > button {
  box-sizing: border-box;
  height: 43px;
}
.empty {
  padding: 40px 15px;
  text-align: center;
  color: var(--muted);
}
.empty strong {
  display: block;
  font-size: 16px;
  color: var(--text);
  margin-bottom: 6px;
}
.note {
  border: 1px solid var(--line);
  background: var(--soft);
  border-radius: 10px;
  padding: 14px 16px;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 20px;
}
.message:empty {
  display: none;
}
.message {
  padding: 12px 15px;
  border-radius: 9px;
  background: var(--soft);
  color: var(--red);
  overflow-wrap: anywhere;
}
.message.success {
  color: var(--green);
}
.chart {
  display: block;
  width: 100%;
  height: auto;
  min-height: 160px;
}
.chart text {
  fill: var(--muted);
  font-size: 10px;
}
.chart line {
  stroke: var(--line);
}
.chart .visits {
  stroke: #536eff;
  fill: none;
  stroke-width: 3;
}
.chart .completed {
  stroke: #32ad91;
  fill: none;
  stroke-width: 2;
}
.legend {
  display: flex;
  gap: 20px;
  font-size: 10px;
  color: var(--muted);
  margin-top: 8px;
}
.legend span:before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-right: 6px;
  background: #536eff;
}
.legend span + span:before {
  background: #32ad91;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.form-stack {
  display: grid;
  gap: 17px;
  max-width: 580px;
}
.form-stack button {
  justify-self: start;
}
.form-stack input {
  width: 100%;
}
.copy-row {
  display: flex;
  gap: 10px;
}
.copy-row input {
  flex: 1;
  font-size: 12px;
}
.form-note {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.7;
  margin: 12px 0;
}
.profile-list {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 15px;
  margin: 0;
}
.profile-list dt {
  color: var(--muted);
  font-size: 12px;
}
.profile-list dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.next-page {
  margin-top: 18px;
}
.auth-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.auth-intro {
  padding: 52px 12%;
  background: var(--soft);
  display: flex;
  flex-direction: column;
}
.auth-intro h1 {
  font-size: clamp(34px, 4.2vw, 65px);
  margin-top: 120px;
  line-height: 1.15;
  letter-spacing: -2px;
}
.auth-intro p {
  color: var(--muted);
  font-size: 16px;
  margin-top: 20px;
}
.intro-detail {
  margin-top: auto;
  padding-top: 60px;
  color: var(--muted);
  font-size: 11px;
}
.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
  margin-right: 6px;
}
.auth-card {
  width: min(100%, 450px);
  align-self: center;
  justify-self: center;
  padding: 42px;
}
.auth-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 40px;
}
.auth-card h2 {
  font-size: 26px;
  margin-bottom: 12px;
}
.auth-card form > p {
  margin-bottom: 26px;
}
.auth-card label {
  margin: 18px 0;
}
.auth-card .primary {
  width: 100%;
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
}
.auth-card .form-note {
  margin: 18px 0;
}
.boot {
  min-height: 100vh;
  display: grid;
  place-items: center;
  color: var(--muted);
}
.loading {
  display: grid;
  place-items: center;
  min-height: 260px;
  color: var(--muted);
}
footer {
  font-size: 10px;
  color: var(--muted);
  padding: 12px 0 8px;
}
@media (min-width: 1600px) {
  main#main {
    padding-top: 45px;
  }
  .metric .value {
    font-size: 30px;
  }
}
@media (max-width: 1150px) {
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .topbar {
    padding: 0 25px;
  }
  main#main {
    padding: 28px 25px 15px;
  }
  .sidebar {
    padding: 26px 16px;
    width: 220px;
  }
  .shell {
    grid-template-columns: 220px minmax(0, 1fr);
  }
}
@media (max-width: 760px) {
  /* Prevent automatic input-focus zoom in iOS Safari. */
  input,
  select {
    font-size: 16px;
  }

  .shell {
    display: block;
  }
  .workspace {
    width: 100%;
  }
  .sidebar {
    display: none;
    top: 64px;
    width: 260px;
    box-shadow: 0 10px 30px #0003;
  }
  .sidebar.open {
    display: flex;
  }
  .mobile-menu {
    display: block;
    font-size: 11px;
  }
  .topbar {
    height: 64px;
    padding: 0 16px;
    position: sticky;
    top: 0;
    z-index: 6;
  }
  .topbar-label {
    display: none;
  }
  .topbar-actions {
    gap: 10px;
  }
  .partner-badge {
    max-width: 130px;
    font-size: 10px;
  }
  main#main {
    padding: 24px 16px 12px;
  }
  h1 {
    font-size: 25px;
  }
  .page-heading {
    align-items: flex-start;
  }
  .page-heading .muted {
    font-size: 12px;
  }
  .filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .filters label {
    min-width: 0;
    width: 100%;
  }
  .filters label:first-child {
    grid-column: 1 / -1;
  }
  .filters input,
  .filters select {
    display: block;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    height: 43px;
  }
  .filters input[type="date"] {
    -webkit-appearance: none;
    appearance: none;
  }
  .filters button {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
  }
  .metrics {
    gap: 10px;
  }
  .metric {
    padding: 16px 13px;
    min-height: 119px;
  }
  .metric .value {
    font-size: 21px;
  }
  .metric .label {
    font-size: 10px;
    margin-bottom: 12px;
  }
  .card {
    padding: 17px 14px;
    border-radius: 12px;
  }
  .card-heading h2 {
    font-size: 15px;
  }
  .card-heading {
    align-items: flex-start;
  }
  .chip {
    font-size: 9px;
  }
  .copy-row {
    flex-wrap: wrap;
  }
  .copy-row input {
    min-width: 100%;
    width: 100%;
  }
  .profile-list {
    grid-template-columns: 100px 1fr;
    font-size: 12px;
    gap: 14px;
  }
  .auth-layout {
    display: block;
  }
  .auth-intro {
    padding: 25px;
  }
  .auth-intro h1,
  .auth-intro p,
  .intro-detail {
    display: none;
  }
  .auth-card {
    margin: 20px auto;
    padding: 25px;
    max-width: 440px;
  }
  .auth-top {
    margin-bottom: 24px;
  }
  .chart {
    min-height: 130px;
  }
  .table-controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .table-controls > input,
  .table-controls > select,
  .table-controls > button {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }
  .table-controls > select:first-child {
    grid-column: 1;
    grid-row: 1;
  }
  .table-controls > select:nth-child(3) {
    grid-column: 2;
    grid-row: 1;
  }
  .table-controls > input:nth-child(2) {
    grid-column: 1;
    grid-row: 2;
  }
  .table-controls > button:nth-child(4) {
    grid-column: 2;
    grid-row: 2;
  }
  .table-controls label {
    min-width: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}
