﻿:root {
  --bg: #ffffff;
  --card: #f6f8fb;
  --text: #172033;
  --muted: #667085;
  --line: #d9e2ef;
  --primary: #1463ff;
  --primary-dark: #0f4bc4;
  --soft-blue: #edf4ff;
  --success: #0f8a5f;
  --danger: #c24135;
  --shadow: 0 18px 45px rgba(23, 32, 51, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.modal-open {
  overflow: hidden;
}

.app-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 48px;
}

.hero {
  display: grid;
  gap: 10px;
  margin-bottom: 24px;
}

.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  display: block;
  width: 156px;
  height: auto;
  border-radius: 8px;
  background: #fff;
  object-fit: contain;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: clamp(1.12rem, 2.8vw, 2.24rem);
  line-height: 1;
  letter-spacing: 0;
}

.hero p {
  color: var(--muted);
  font-size: 1.08rem;
}

.flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 68px;
  margin-bottom: 20px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(23, 32, 51, 0.05);
  text-align: center;
}

.flow span {
  color: var(--text);
  font-weight: 700;
}

.flow strong {
  color: var(--primary);
  font-size: 0.95rem;
}

.proof-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
}

.logout-button {
  min-height: 38px;
  border: 1px solid #b7c8df;
  background: #ffffff;
  color: var(--primary);
  font-size: 0.88rem;
}

.logout-button:hover {
  background: var(--soft-blue);
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
}

.login-shell {
  width: min(100% - 32px, 430px);
}

.login-card {
  display: grid;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 30px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.login-logo {
  width: 132px;
  height: auto;
}

.login-card h1 {
  font-size: 1.8rem;
}

.login-card p {
  color: var(--muted);
}

.login-form {
  display: grid;
  gap: 10px;
}

.login-error {
  border: 1px solid rgba(194, 65, 53, 0.28);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(194, 65, 53, 0.08);
  color: var(--danger) !important;
  font-weight: 800;
}

.login-disclaimer {
  font-size: 0.85rem;
}

.governance-note {
  margin-bottom: 20px;
  padding: 16px 18px;
  border-left: 4px solid var(--primary);
  border-radius: 8px;
  background: #f6f8fb;
  color: var(--text);
  font-weight: 800;
}

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

.agent-card,
.settlement-card,
.dashboard-card,
.config-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.agent-card,
.dashboard-card,
.config-card {
  padding: 24px;
}

.dashboard-card,
.config-card {
  margin-top: 20px;
}

.card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 22px;
}

.eyebrow {
  margin-bottom: 4px;
  color: var(--primary);
  font-size: 0.77rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}


.wallet-label {
  margin-top: 4px;
  color: var(--primary);
  font-size: 0.77rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}
h2 {
  font-size: 1.45rem;
  line-height: 1.2;
}

h3 {
  margin-bottom: 14px;
  font-size: 1rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: #eaf8f2;
  color: var(--success);
  font-size: 0.85rem;
  font-weight: 700;
}

.muted-pill {
  background: #edf1f7;
  color: var(--muted);
}

.buyer-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.small-button {
  min-height: 34px;
  padding: 0 12px;
  font-size: 0.84rem;
}

.active-tool,
.active-tool:hover {
  border-color: var(--primary);
  background: var(--primary);
  color: #ffffff;
}

.panel-heading {
  display: grid;
  gap: 3px;
  margin-bottom: 14px;
}

.details-list {
  display: grid;
  gap: 16px;
  margin: 0;
}

.details-list div {
  display: grid;
  gap: 5px;
}

.dashboard-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

dt {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
}

dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 0.98rem;
}

.approved-text {
  color: var(--success);
  font-weight: 800;
  text-transform: capitalize;
}

.rejected-text {
  color: var(--danger);
  font-weight: 800;
  text-transform: capitalize;
}

.money {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 0;
}

.payment-form,
.policy-form {
  display: grid;
  gap: 10px;
  margin-top: 24px;
}

label {
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #c8d3e3;
  border-radius: 8px;
  padding: 0 14px;
  color: var(--text);
  font: inherit;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

input,
select {
  min-height: 46px;
}

textarea {
  min-height: 126px;
  padding-top: 12px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(20, 99, 255, 0.14);
}

.amount-input {
  display: flex;
  align-items: center;
  border: 1px solid #c8d3e3;
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.amount-input:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(20, 99, 255, 0.14);
}

.amount-input span {
  padding-left: 14px;
  color: var(--muted);
  font-weight: 800;
}

.amount-input input {
  border: 0;
  box-shadow: none;
}

.supplier-details {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.policy-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.checkbox-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  font-weight: 700;
}

.checkbox-row input {
  width: 18px;
  min-height: 18px;
  height: 18px;
  padding: 0;
}

button {
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  padding: 0 18px;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  transition: background 160ms ease, transform 160ms ease;
}

button:hover {
  background: var(--primary-dark);
}

button:active {
  transform: translateY(1px);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.68;
}

.secondary-button {
  min-height: 40px;
  border: 1px solid #b7c8df;
  background: #ffffff;
  color: var(--primary);
}

.secondary-button:hover {
  background: var(--soft-blue);
}

.result-box {
  margin-top: 24px;
  padding: 18px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid #dce9fb;
}

.merchant-result {
  margin-top: 28px;
}

.compact {
  gap: 12px;
}

.explorer-link {
  display: inline-flex;
  margin-top: 16px;
  color: var(--primary);
  font-weight: 800;
  text-decoration: none;
}

.explorer-link:hover {
  text-decoration: underline;
}

.settlement-card {
  margin-top: 20px;
  padding: 0;
  overflow: hidden;
}

.settlement-card summary {
  cursor: pointer;
  padding: 18px 22px;
  color: var(--text);
  font-weight: 800;
}

.settlement-list {
  padding: 0 22px 22px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.audit-list {
  display: grid;
  gap: 12px;
  max-height: 360px;
  overflow: auto;
}

.audit-item {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.audit-item div {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
}

.audit-item span,
.audit-item p {
  margin: 0;
  color: var(--muted);
}

.empty-state {
  margin: 0;
  color: var(--muted);
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  max-width: min(420px, calc(100vw - 44px));
  border-radius: 8px;
  padding: 14px 16px;
  background: var(--text);
  color: #fff;
  box-shadow: var(--shadow);
  font-weight: 700;
}

.toast.error {
  background: var(--danger);
}

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

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(23, 32, 51, 0.44);
}

.modal-window {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(23, 32, 51, 0.22);
}

.modal-header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.modal-section {
  padding: 22px;
}

.icon-button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #b7c8df;
  background: #ffffff;
  color: var(--primary);
  font-size: 0.84rem;
}

.icon-button:hover {
  background: var(--soft-blue);
}

.hidden {
  display: none;
}

@media (max-width: 860px) {
  .agent-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-grid,
  .policy-fields,
  .checkbox-list {
    grid-template-columns: 1fr;
  }

  .flow {
    flex-direction: column;
    gap: 8px;
  }

  .settlement-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .app-shell {
    width: min(100% - 20px, 1180px);
    padding-top: 20px;
  }

  .agent-card {
    padding: 18px;
  }

  .card-heading {
    display: grid;
  }

  .secondary-button {
    width: 100%;
  }

  .modal {
    padding: 12px;
  }

  .modal-header {
    display: grid;
  }
}

