:root {
  --green: #2f9e5f;
  --green-dark: #247b49;
  --green-bright: #3bc777;
  --ink: #10281c;
  --cream: #faf8f2;
  --line: #e4e0d5;
  --body: #4b5e54;
  --muted: #7b8b82;
  --northstar: #163a52;
  --northstar-deep: #102d40;
  --northstar-accent: #2f8f82;
  --northstar-soft: #e4f0ee;
  --white: #fff;
}
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
}
body {
  min-height: 100vh;
  background: var(--cream);
  color: var(--ink);
  font-family: "Outfit", sans-serif;
  line-height: 1.55;
}
button,
input,
select {
  font: inherit;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(59, 199, 119, 0.35);
  outline-offset: 3px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  text-decoration: none;
}
.brand svg {
  width: 31px;
  height: 31px;
}
.brand strong {
  display: block;
  font-size: 21px;
  letter-spacing: -0.03em;
  line-height: 1;
}
.brand small {
  display: block;
  margin-top: 4px;
  color: var(--green);
  font-family: "IBM Plex Mono", monospace;
  font-size: 6.8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.northstar-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.northstar-logo svg {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
}
.northstar-logo strong {
  display: block;
  color: var(--northstar);
  font-size: 13px;
  line-height: 1.05;
}
.northstar-logo small {
  display: block;
  margin-top: 3px;
  color: #6d818d;
  font-size: 8px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.demo-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 99px;
  padding: 7px 11px;
  background: #e8f4ef;
  color: var(--green-dark);
  font-family: "IBM Plex Mono", monospace;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.demo-pill::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  content: "";
}
.btn {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 11px;
  padding: 12px 20px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 0.18s,
    background 0.18s,
    border-color 0.18s;
}
.btn:hover {
  transform: translateY(-1px);
}
.btn-primary {
  background: var(--green);
  color: white;
  box-shadow: 0 10px 22px rgba(47, 158, 95, 0.2);
}
.btn-primary:hover {
  background: var(--green-dark);
}
.btn-secondary {
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
}
.btn-northstar {
  background: var(--northstar-accent);
  color: white;
}

/* Login */
.login-page {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(400px, 0.82fr) 1.18fr;
}
.login-panel {
  display: flex;
  flex-direction: column;
  padding: 34px clamp(28px, 5vw, 78px);
  background: var(--cream);
}
.login-back {
  margin-left: auto;
  color: var(--body);
  font-size: 13px;
  text-decoration: none;
}
.login-main {
  width: min(440px, 100%);
  margin: auto;
  padding: 60px 0;
}
.login-main .demo-pill {
  margin-bottom: 22px;
}
.login-main h1 {
  font-size: clamp(38px, 5vw, 54px);
  letter-spacing: -0.05em;
  line-height: 1.02;
}
.login-intro {
  margin-top: 17px;
  color: var(--body);
  font-size: 16px;
}
.credentials {
  margin-top: 27px;
  border: 1px solid #d9e7df;
  border-radius: 14px;
  padding: 16px 18px;
  background: #f3f8f4;
}
.credentials span {
  display: block;
  color: var(--green-dark);
  font-family: "IBM Plex Mono", monospace;
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.credentials p {
  margin-top: 6px;
  color: var(--ink);
  font-size: 14px;
}
.credentials p + p {
  margin-top: 2px;
}
.credentials a {
  color: inherit;
}
.login-form {
  margin-top: 25px;
}
.form-field {
  margin-top: 15px;
}
.form-field label {
  display: block;
  margin-bottom: 7px;
  color: var(--body);
  font-size: 12px;
  font-weight: 600;
}
.form-field input {
  width: 100%;
  height: 50px;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 11px 13px;
  background: white;
  color: var(--ink);
}
.form-field input[aria-invalid="true"] {
  border-color: #bf5e56;
}
.login-form .btn {
  width: 100%;
  margin-top: 20px;
}
.login-form .btn-secondary {
  margin-top: 10px;
}
.form-error {
  display: none;
  margin-top: 14px;
  border-radius: 9px;
  padding: 10px 12px;
  background: #fff0ed;
  color: #8d3d37;
  font-size: 12px;
}
.form-error.visible {
  display: block;
}
.login-fine {
  margin-top: 18px;
  color: var(--muted);
  font-size: 11px;
}
.login-visual {
  position: relative;
  display: grid;
  overflow: hidden;
  place-items: center;
  padding: 65px;
  background: var(--ink);
}
.login-visual::before {
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(
      circle at 65% 36%,
      rgba(59, 199, 119, 0.2),
      transparent 28%
    ),
    radial-gradient(
      circle at 28% 68%,
      rgba(47, 143, 130, 0.16),
      transparent 22%
    );
  content: "";
}
.login-visual::after {
  position: absolute;
  width: 760px;
  height: 760px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 50%;
  content: "";
}
.visual-window {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 23px;
  background: #f5f7f8;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.3);
  transform: rotate(-1deg);
}
.visual-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px;
  border-bottom: 1px solid #dfe7e9;
  background: white;
}
.visual-body {
  display: grid;
  grid-template-columns: 130px 1fr;
  min-height: 480px;
}
.visual-side {
  padding: 19px 12px;
  background: var(--northstar);
}
.visual-side span {
  display: block;
  margin-bottom: 7px;
  border-radius: 7px;
  padding: 8px 10px;
  color: #a7bdc7;
  font-size: 8px;
}
.visual-side span:first-child {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}
.visual-content {
  padding: 22px;
}
.visual-content h2 {
  color: var(--northstar);
  font-size: 18px;
}
.mini-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  margin-top: 18px;
}
.mini-metric {
  border: 1px solid #e2e8e9;
  border-radius: 10px;
  padding: 13px;
  background: white;
}
.mini-metric strong {
  display: block;
  color: var(--northstar);
  font-size: 19px;
}
.mini-metric span {
  color: #71838b;
  font-size: 8px;
}
.mini-chart {
  display: flex;
  height: 160px;
  align-items: end;
  gap: 12px;
  margin-top: 12px;
  border: 1px solid #e2e8e9;
  border-radius: 12px;
  padding: 20px;
  background: white;
}
.mini-chart i {
  display: block;
  width: 100%;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(#57b8a7, #2f8f82);
}

/* Dashboard */
.app {
  min-height: 100vh;
  background: #f3f6f6;
  color: #263f4c;
}
.app-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  display: flex;
  width: 248px;
  flex-direction: column;
  background: var(--northstar);
  color: white;
}
.sidebar-brand {
  padding: 25px 22px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.sidebar-brand .northstar-logo strong {
  color: white;
}
.sidebar-brand .northstar-logo small {
  color: #93abb6;
}
.sidebar-brand .northstar-logo svg {
  width: 41px;
  height: 41px;
}
.app-nav {
  flex: 1;
  overflow-y: auto;
  padding: 19px 13px;
}
.app-nav button {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 11px;
  border: 0;
  border-radius: 9px;
  padding: 10px 12px;
  background: transparent;
  color: #a9bec8;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}
.app-nav button:hover {
  color: white;
}
.app-nav button.active {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}
.nav-icon {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.07);
  font-size: 9px;
}
.sidebar-footer {
  margin-top: auto;
  padding: 17px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.sidebar-footer button {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 9px;
  padding: 9px;
  background: transparent;
  color: #c5d4db;
  cursor: pointer;
}
.app-main {
  min-width: 0;
  margin-left: 248px;
}
.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  min-height: 74px;
  align-items: center;
  gap: 18px;
  padding: 13px 28px;
  border-bottom: 1px solid #dce4e6;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
}
.mobile-menu {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid #dce4e6;
  border-radius: 9px;
  background: white;
  cursor: pointer;
}
.sidebar-scrim {
  display: none;
}
.header-title h1 {
  color: var(--northstar);
  font-size: 22px;
  letter-spacing: -0.03em;
}
.header-title p {
  color: #75868e;
  font-size: 11px;
}
.app-header .demo-pill {
  margin-left: auto;
}
.header-user {
  display: flex;
  align-items: center;
  gap: 9px;
}
.header-user span {
  color: #607680;
  font-size: 11px;
}
.avatar {
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  border-radius: 50%;
  background: var(--northstar-soft);
  color: var(--northstar);
  font-size: 10px;
  font-weight: 700;
}
.page {
  display: none;
  padding: 28px;
}
.page.active {
  display: block;
  animation: page-in 0.25s both;
}
@keyframes page-in {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
}
.page-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
}
.page-top h2 {
  color: var(--northstar);
  font-size: 27px;
  letter-spacing: -0.035em;
}
.page-top p {
  max-width: 670px;
  margin-top: 5px;
  color: #71838c;
  font-size: 13px;
}
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.filters select,
.filters button {
  min-height: 38px;
  border: 1px solid #dce4e6;
  border-radius: 8px;
  padding: 8px 10px;
  background: white;
  color: #49616d;
  font-size: 11px;
}
.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 13px;
  margin-top: 23px;
}
.metric-card {
  border: 1px solid #dfe6e7;
  border-radius: 13px;
  padding: 18px;
  background: white;
  box-shadow: 0 8px 24px rgba(22, 58, 82, 0.035);
}
.metric-card .label {
  color: #71838c;
  font-size: 10px;
  text-transform: uppercase;
}
.metric-card strong {
  display: block;
  margin-top: 9px;
  color: var(--northstar);
  font-size: 29px;
  letter-spacing: -0.04em;
}
.metric-card .delta {
  display: block;
  margin-top: 5px;
  color: #2e8f67;
  font-size: 10px;
}
.dashboard-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 13px;
  margin-top: 13px;
}
.panel {
  min-width: 0;
  border: 1px solid #dfe6e7;
  border-radius: 13px;
  padding: 19px;
  background: white;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
.panel-head h3 {
  color: var(--northstar);
  font-size: 15px;
}
.panel-head span {
  color: #7b8d95;
  font-size: 10px;
}
.large-chart {
  position: relative;
  height: 240px;
  margin-top: 20px;
  border-bottom: 1px solid #e1e7e8;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0 58px,
    #edf1f2 58px 59px
  );
}
.large-chart svg {
  width: 100%;
  height: 100%;
}
.donut-wrap {
  display: grid;
  min-height: 240px;
  place-items: center;
}
.donut {
  display: grid;
  width: 155px;
  height: 155px;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(
    var(--northstar-accent) 0 72%,
    #77c4b5 72% 88%,
    #dfe8e9 88%
  );
}
.donut::after {
  display: grid;
  width: 112px;
  height: 112px;
  place-items: center;
  border-radius: 50%;
  background: white;
  color: var(--northstar);
  font-size: 25px;
  font-weight: 700;
  content: "96";
}
.table-panel {
  margin-top: 13px;
  padding: 0;
  overflow: hidden;
}
.table-panel .panel-head {
  padding: 18px 19px;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}
.data-table th,
.data-table td {
  padding: 13px 17px;
  border-top: 1px solid #edf1f2;
  text-align: left;
  white-space: nowrap;
}
.data-table th {
  color: #778991;
  font-size: 9px;
  font-weight: 500;
  text-transform: uppercase;
}
.data-table td {
  color: #425a65;
}
.data-table tbody tr {
  cursor: pointer;
}
.data-table tbody tr:hover {
  background: #f7f9f9;
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 99px;
  padding: 4px 7px;
  background: #e6f4ed;
  color: #267b50;
  font-size: 9px;
}
.status::before {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}
.status.processing {
  background: #e7f0f5;
  color: #367491;
}
.status.review {
  background: #fff2d9;
  color: #956619;
}
.status.queued {
  background: #eef0f1;
  color: #687a83;
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 13px;
  margin-top: 23px;
}
.merchant-card {
  border: 1px solid #dfe6e7;
  border-radius: 13px;
  padding: 18px;
  background: white;
  cursor: pointer;
  transition:
    transform 0.18s,
    box-shadow 0.18s;
}
.merchant-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(22, 58, 82, 0.08);
}
.merchant-card h3 {
  color: var(--northstar);
  font-size: 16px;
}
.merchant-card .meta {
  margin-top: 3px;
  color: #7b8c94;
  font-size: 10px;
}
.merchant-card .status {
  margin-top: 16px;
}
.merchant-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 17px;
  padding-top: 15px;
  border-top: 1px solid #edf1f2;
}
.merchant-stats strong {
  display: block;
  color: var(--northstar);
  font-size: 15px;
}
.merchant-stats span {
  color: #829198;
  font-size: 8px;
}
.conversion-list {
  display: grid;
  gap: 10px;
  margin-top: 23px;
}
.conversion {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) 2fr 100px;
  align-items: center;
  gap: 22px;
  border: 1px solid #dfe6e7;
  border-radius: 12px;
  padding: 16px 18px;
  background: white;
}
.conversion h3 {
  color: var(--northstar);
  font-size: 14px;
}
.conversion p {
  color: #7d8d94;
  font-size: 9px;
}
.progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 99px;
  background: #edf1f2;
}
.progress-bar {
  height: 100%;
  border-radius: inherit;
  background: var(--northstar-accent);
  transition: width 0.5s;
}
.conversion strong {
  color: var(--northstar);
  font-size: 12px;
  text-align: right;
}
.report-grid,
.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 13px;
  margin-top: 23px;
}
.report-card,
.setting-card {
  border: 1px solid #dfe6e7;
  border-radius: 13px;
  padding: 21px;
  background: white;
}
.report-card h3,
.setting-card h3 {
  color: var(--northstar);
  font-size: 16px;
}
.report-card p,
.setting-card p {
  margin-top: 7px;
  color: #74868e;
  font-size: 11px;
}
.report-card button,
.setting-card button {
  margin-top: 18px;
  border: 1px solid #dce4e6;
  border-radius: 8px;
  padding: 8px 11px;
  background: #f8fafa;
  color: var(--northstar);
  font-size: 10px;
  cursor: pointer;
}
.swatches {
  display: flex;
  gap: 9px;
  margin-top: 18px;
}
.swatch {
  width: 34px;
  height: 34px;
  border: 3px solid white;
  border-radius: 9px;
  box-shadow: 0 0 0 1px #dce4e6;
}
.notice {
  margin-top: 22px;
  border: 1px solid #d9e7df;
  border-radius: 12px;
  padding: 14px 16px;
  background: #eef7f2;
  color: #386a51;
  font-size: 11px;
}
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  place-items: center;
  padding: 20px;
  background: rgba(10, 31, 43, 0.58);
  backdrop-filter: blur(6px);
}
.modal.open {
  display: grid;
}
.modal-card {
  width: min(560px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  border-radius: 17px;
  padding: 24px;
  background: white;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.24);
}
.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}
.modal-head h2 {
  color: var(--northstar);
  font-size: 22px;
}
.modal-close {
  width: 35px;
  height: 35px;
  border: 1px solid #dfe6e7;
  border-radius: 8px;
  background: white;
  cursor: pointer;
}
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 21px;
}
.detail {
  border-radius: 10px;
  padding: 13px;
  background: #f5f8f8;
}
.detail span {
  display: block;
  color: #809098;
  font-size: 8px;
  text-transform: uppercase;
}
.detail strong {
  display: block;
  margin-top: 4px;
  color: var(--northstar);
  font-size: 13px;
}
.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 120;
  border-radius: 10px;
  padding: 12px 15px;
  background: var(--northstar);
  color: white;
  font-size: 11px;
  box-shadow: 0 14px 35px rgba(22, 58, 82, 0.22);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition:
    opacity 0.2s,
    transform 0.2s;
}
.toast.show {
  opacity: 1;
  transform: none;
}

@media (max-width: 980px) {
  .login-page {
    grid-template-columns: 1fr;
  }
  .login-visual {
    min-height: 600px;
  }
  .metric-grid {
    grid-template-columns: 1fr 1fr;
  }
  .card-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 760px) {
  .login-panel {
    min-height: 100vh;
    padding: 24px;
  }
  .login-visual {
    display: none;
  }
  .login-main {
    padding: 45px 0;
  }
  .app-sidebar {
    width: min(288px, 86vw);
    transform: translateX(-100%);
    transition: transform 0.22s;
  }
  .app-sidebar.open {
    transform: none;
    box-shadow: 20px 0 55px rgba(10, 31, 43, 0.25);
  }
  .app.sidebar-open {
    overflow: hidden;
  }
  .sidebar-scrim {
    position: fixed;
    inset: 0;
    z-index: 25;
    display: block;
    border: 0;
    background: rgba(10, 31, 43, 0.42);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s;
  }
  .app.sidebar-open .sidebar-scrim {
    opacity: 1;
    pointer-events: auto;
  }
  .app-main {
    margin-left: 0;
  }
  .mobile-menu {
    display: block;
  }
  .app-header {
    padding: 11px 16px;
  }
  .header-title p,
  .header-user span {
    display: none;
  }
  .app-header .demo-pill {
    margin-left: auto;
    font-size: 7px;
  }
  .page {
    padding: 20px 16px;
  }
  .page-top {
    flex-direction: column;
  }
  .filters {
    width: 100%;
  }
  .filters select,
  .filters button {
    flex: 1;
    min-width: 120px;
  }
  .dashboard-grid,
  .report-grid,
  .settings-grid {
    grid-template-columns: 1fr;
  }
  .table-panel {
    overflow-x: auto;
  }
  .data-table {
    min-width: 720px;
  }
  .card-grid {
    grid-template-columns: 1fr;
  }
  .conversion {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .conversion strong {
    text-align: left;
  }
}
@media (max-width: 480px) {
  .brand small {
    display: none;
  }
  .login-back {
    font-size: 11px;
  }
  .login-main h1 {
    font-size: 40px;
  }
  .metric-grid {
    grid-template-columns: 1fr 1fr;
    gap: 9px;
  }
  .metric-card {
    padding: 14px;
  }
  .metric-card strong {
    font-size: 22px;
  }
  .header-title h1 {
    font-size: 17px;
  }
  .app-header .demo-pill {
    max-width: 120px;
  }
  .detail-grid {
    grid-template-columns: 1fr;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
