:root {
  --apps-blue: #2457d6;
  --apps-teal: #067884;
  --apps-sea: #0e4d63;
  --apps-orange: #d9600a;
  --apps-foam: #eef7f6;
  --apps-line: #d7e8e6;
}

body.apps-page {
  background: #f7fbfa;
}

.apps-main {
  min-height: 70vh;
}

.apps-hero {
  padding-block: clamp(64px, 8vw, 108px);
  color: #fff;
  background: var(--apps-sea);
}

.apps-hero-grid {
  display: grid;
  gap: 44px;
  align-items: center;
}

.apps-hero h1 {
  max-width: 13ch;
  font-size: clamp(2.7rem, 5vw, 4.7rem);
}

.apps-hero .eyebrow {
  color: #94ded8;
}

.apps-hero-copy {
  max-width: 56ch;
  margin-top: 18px;
  color: #cce6e3;
  font-size: 1.08rem;
}

.apps-hero-actions,
.app-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
  margin-top: 28px;
}

.apps-hero .btn-primary,
.app-actions .btn-primary {
  background: var(--apps-orange);
}

.apps-hero .btn-primary:hover,
.app-actions .btn-primary:hover {
  background: #bd4e09;
}

.apps-hero .btn-outline {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.06);
}

.center-panel {
  padding: 28px;
  border: 1px solid rgba(188, 237, 231, 0.24);
  border-radius: 20px;
  background: rgba(5, 56, 70, 0.68);
  box-shadow: 0 24px 52px rgba(2, 30, 39, 0.2);
}

.center-panel-mark {
  display: flex;
  align-items: center;
  gap: 14px;
}

.center-panel-mark img {
  width: 54px;
  height: 54px;
}

.center-panel-mark strong,
.center-panel-mark span {
  display: block;
}

.center-panel-mark span {
  color: #b8deda;
  font-size: 0.84rem;
}

.flow-list {
  display: grid;
  gap: 11px;
  margin-top: 25px;
  counter-reset: flow;
}

.flow-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #eaf8f6;
  font-size: 0.9rem;
}

.flow-list li::before {
  display: grid;
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: var(--apps-teal);
  counter-increment: flow;
  content: counter(flow);
  font-size: 0.72rem;
  font-weight: 800;
}

.apps-section {
  padding-block: clamp(60px, 8vw, 105px);
}

.apps-section-white {
  background: #fff;
}

.apps-heading {
  max-width: 680px;
  margin-bottom: 34px;
}

.apps-heading p {
  margin-top: 12px;
  color: var(--muted);
}

.app-catalog {
  display: grid;
  gap: 18px;
}

.app-card {
  display: grid;
  gap: 22px;
  padding: 26px;
  border: 1px solid var(--apps-line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(11, 37, 48, 0.05);
}

.app-card h2 {
  margin: 3px 0 9px;
  font-size: 1.35rem;
}

.app-card p:not(.app-meta) {
  max-width: 58ch;
  color: var(--muted);
}

.app-card .btn {
  margin-top: 19px;
}

.app-icon {
  display: grid;
  width: 66px;
  height: 66px;
  place-items: center;
  border-radius: 17px;
  color: #fff;
  background: var(--apps-blue);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.26);
  font-weight: 800;
}

.app-meta {
  color: var(--apps-teal);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.integration-band {
  padding-block: 32px;
  color: #dff2ef;
  background: #083f54;
}

.integration-grid {
  display: grid;
  gap: 20px;
}

.integration-grid strong {
  display: block;
  color: #fff;
}

.integration-grid span {
  color: #b9dcda;
  font-size: 0.85rem;
}

.app-detail-hero {
  padding-block: clamp(56px, 7vw, 92px);
  background: var(--apps-foam);
}

.app-detail-grid {
  display: grid;
  gap: 38px;
  align-items: center;
}

.app-title-row {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 22px;
}

.app-title-row .app-icon {
  flex: 0 0 70px;
}

.app-detail-copy {
  max-width: 62ch;
  color: var(--muted);
}

.app-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin-top: 25px;
}

.app-fact {
  padding: 14px;
  border: 1px solid var(--apps-line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
}

.app-fact span,
.app-fact strong {
  display: block;
}

.app-fact span {
  color: var(--muted);
  font-size: 0.72rem;
}

.app-fact strong {
  margin-top: 3px;
  color: var(--apps-sea);
}

.detail-side {
  padding: 25px;
  border: 1px solid var(--apps-line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(11, 37, 48, 0.08);
}

.detail-side h2 {
  font-size: 1.25rem;
}

.detail-side p {
  margin-top: 10px;
  color: var(--muted);
}

.plans-grid {
  display: grid;
  gap: 12px;
}

.plan-card {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 16px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--apps-line);
  border-radius: 14px;
  background: #fff;
}

.plan-card > span {
  color: var(--apps-sea);
  font-weight: 780;
}

.api-state {
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid #cae3df;
  border-radius: 10px;
  color: var(--apps-sea);
  background: #edf8f6;
  font-size: 0.85rem;
}

.api-state[data-state="error"] {
  border-color: #f1c7ab;
  color: #8c3c08;
  background: #fff5ed;
}

.api-state[data-state="success"] {
  border-color: #b9dfcc;
  color: #176343;
  background: #edf9f2;
}

.handoff-fallback,
.invoice-panel {
  margin-top: 20px;
  padding: 20px;
  border: 1px solid #efc39f;
  border-radius: 14px;
  background: #fff8f2;
}

.handoff-fallback p,
.invoice-panel p {
  color: var(--muted);
}

.handoff-fallback .btn {
  margin-top: 14px;
}

.invoice-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 16px 0;
}

.invoice-grid div {
  padding: 12px;
  border-radius: 10px;
  background: #fff;
}

.invoice-grid span,
.invoice-grid strong {
  display: block;
}

.invoice-grid span {
  color: var(--muted);
  font-size: 0.72rem;
}

.bank-item {
  display: grid;
  gap: 2px;
  margin-top: 9px;
  padding: 13px;
  border: 1px solid var(--apps-line);
  border-radius: 10px;
  background: #fff;
}

.login-wrap,
.download-wrap {
  display: grid;
  min-height: calc(100vh - 72px);
  place-items: center;
  padding-block: 50px;
}

.auth-panel {
  width: min(100%, 480px);
  padding: clamp(24px, 5vw, 38px);
  border: 1px solid var(--apps-line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 22px 58px rgba(11, 37, 48, 0.1);
}

.auth-panel h1 {
  max-width: none;
  font-size: clamp(2rem, 5vw, 2.8rem);
}

.auth-panel > p {
  margin-top: 10px;
  color: var(--muted);
}

.auth-form {
  display: grid;
  gap: 16px;
  margin-top: 26px;
}

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

.form-field label {
  font-size: 0.82rem;
  font-weight: 720;
}

.form-field input {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid #bdd7d4;
  border-radius: 10px;
  color: var(--ink);
  background: #fbfefd;
  font: inherit;
}

.form-field input:focus {
  border-color: var(--apps-teal);
  outline: 3px solid rgba(6, 120, 132, 0.12);
}

.auth-form .btn {
  width: 100%;
}

.auth-panel #resume-target {
  width: 100%;
  margin-top: 10px;
}

.security-note {
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.78rem;
}

button:disabled,
.btn[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

@media (min-width: 768px) {
  .apps-hero-grid,
  .app-detail-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  }

  .app-card {
    grid-template-columns: auto 1fr;
    align-items: start;
  }

  .integration-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .app-catalog {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .apps-hero h1 {
    font-size: clamp(2.55rem, 12vw, 3.55rem);
  }

  .apps-hero-actions .btn,
  .app-actions .btn {
    width: 100%;
  }

  .app-facts {
    grid-template-columns: 1fr;
  }

  .plan-card {
    grid-template-columns: 1fr auto;
  }

  .plan-card .btn {
    grid-column: span 2;
    width: 100%;
  }

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