/* =====================================================
   BIVA TALENT — ASSOCIATE PAYMENT HISTORY
   FULL REPLACEMENT
===================================================== */


/* =====================================================
   PAGE
===================================================== */

.associate-transaction-page {
  min-height: 100vh;

  padding: 24px;

  background:
    linear-gradient(
      180deg,
      #f5f7fb,
      #eef3f8
    );
}

.associate-transaction-container {
  width: min(1380px, 100%);

  margin: 0 auto;
}


/* =====================================================
   HEADER / HERO
===================================================== */

.associate-transaction-header {
  position: relative;

  min-height: 210px;

  padding: 28px 32px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 28px;

  border:
    1px solid
    rgba(255, 255, 255, 0.08);

  border-radius: 22px;

  color:
    #ffffff;

  background:
    radial-gradient(
      circle at 94% 4%,
      rgba(37, 99, 235, 0.36),
      transparent 36%
    ),
    radial-gradient(
      circle at 4% 100%,
      rgba(251, 191, 36, 0.08),
      transparent 31%
    ),
    linear-gradient(
      145deg,
      #071324,
      #10233f 58%,
      #173675
    );

  box-shadow:
    0 22px 58px
    rgba(7, 19, 36, 0.17);

  overflow: hidden;
}

.associate-transaction-header::before {
  content: "";

  position: absolute;

  inset:
    0 0 auto 0;

  height: 4px;

  background:
    linear-gradient(
      90deg,
      #2563eb,
      #fbbf24,
      transparent 84%
    );
}

.associate-transaction-header::after {
  content: "";

  position: absolute;

  width: 230px;
  height: 230px;

  right: -95px;
  bottom: -170px;

  border:
    1px solid
    rgba(255, 255, 255, 0.05);

  border-radius: 50%;

  box-shadow:
    0 0 0 42px
    rgba(255, 255, 255, 0.018),

    0 0 0 84px
    rgba(255, 255, 255, 0.009);

  pointer-events: none;
}

.associate-transaction-header > * {
  position: relative;

  z-index: 1;
}


/* =====================================================
   BACK BUTTON
===================================================== */

.associate-transaction-header
.associate-payment-back-button {
  position: absolute;

  top: 22px;
  left: 24px;

  min-height: 38px;

  margin: 0;
  padding:
    0 12px;

  border:
    1px solid
    rgba(255, 255, 255, 0.16);

  border-radius: 10px;

  color:
    #ffffff;

  background:
    rgba(255, 255, 255, 0.08);

  box-shadow: none;

  font-size: 10px;
}

.associate-transaction-header
.associate-payment-back-button:hover {
  border-color:
    rgba(255, 255, 255, 0.28);

  color:
    #ffffff;

  background:
    rgba(255, 255, 255, 0.14);

  transform:
    translateX(-2px);
}


/* =====================================================
   HEADING
===================================================== */

.associate-transaction-heading {
  min-width: 0;

  padding-top: 42px;
}

.associate-transaction-kicker {
  display: block;

  margin-bottom: 8px;

  color:
    #fbbf24;

  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.associate-transaction-heading h1 {
  margin: 0;

  color:
    #ffffff;

  font-size:
    clamp(2.35rem, 4.4vw, 4.1rem);

  font-weight: 900;
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.associate-transaction-heading p {
  max-width: 720px;

  margin:
    13px 0 0;

  color:
    rgba(255, 255, 255, 0.66);

  font-size: 13px;
  line-height: 1.62;
}


/* =====================================================
   SUMMARY GRID
===================================================== */

.associate-transaction-summary-grid {
  margin-top: 18px;

  display: grid;

  grid-template-columns:
    repeat(5, minmax(0, 1fr));

  gap: 12px;
}

.associate-transaction-summary-card {
  position: relative;

  min-width: 0;
  min-height: 116px;

  padding: 17px;

  display: flex;
  flex-direction: column;
  justify-content: center;

  gap: 8px;

  border:
    1px solid #dce5ef;

  border-radius: 17px;

  background:
    linear-gradient(
      180deg,
      #ffffff,
      #f8fafc
    );

  box-shadow:
    0 8px 24px
    rgba(15, 23, 42, 0.055);

  overflow: hidden;

  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.associate-transaction-summary-card::before {
  content: "";

  position: absolute;

  top: 0;
  right: 0;
  left: 0;

  height: 3px;

  background:
    #cbd5e1;
}

.associate-transaction-summary-card:nth-child(2)::before {
  background:
    #10b981;
}

.associate-transaction-summary-card:nth-child(3)::before {
  background:
    #f59e0b;
}

.associate-transaction-summary-card:nth-child(4)::before {
  background:
    #2563eb;
}

.associate-transaction-summary-card:nth-child(5)::before {
  background:
    #7c3aed;
}

.associate-transaction-summary-card:hover {
  border-color:
    #bfdbfe;

  box-shadow:
    0 12px 30px
    rgba(15, 23, 42, 0.08);

  transform:
    translateY(-2px);
}

.associate-transaction-summary-card > span {
  color:
    #64748b;

  font-size: 9px;
  font-weight: 790;
  line-height: 1.3;
}

.associate-transaction-summary-card > strong {
  overflow-wrap: anywhere;

  color:
    #0f172a;

  font-size:
    clamp(1.45rem, 2.4vw, 2.05rem);

  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.associate-transaction-summary-card:nth-child(5)
> strong {
  color:
    #6d28d9;

  font-size:
    clamp(1.15rem, 1.8vw, 1.55rem);
}


/* =====================================================
   TRANSACTION PANEL
===================================================== */

.associate-transaction-panel {
  margin-top: 18px;

  border:
    1px solid #dce5ef;

  border-radius: 19px;

  background:
    #ffffff;

  box-shadow:
    0 10px 30px
    rgba(15, 23, 42, 0.065);

  overflow: hidden;
}


/* =====================================================
   PANEL TOP
===================================================== */

.associate-transaction-panel-top {
  padding: 23px 25px;

  display: grid;

  grid-template-columns:
    minmax(0, 0.66fr)
    minmax(560px, 1.34fr);

  align-items: end;

  gap: 26px;

  border-bottom:
    1px solid #e2e8f0;

  background:
    radial-gradient(
      circle at 100% 0%,
      rgba(37, 99, 235, 0.06),
      transparent 38%
    ),
    #f8fafc;
}

.associate-transaction-panel-top
> div:first-child {
  min-width: 0;
}

.associate-transaction-panel-top h2 {
  margin: 0;

  color:
    #0f172a;

  font-size:
    clamp(1.35rem, 2.3vw, 2rem);

  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.associate-transaction-panel-top
> div:first-child
> p {
  margin:
    8px 0 0;

  color:
    #64748b;

  font-size: 11px;
  line-height: 1.55;
}


/* =====================================================
   FILTERS
===================================================== */

.associate-transaction-filters {
  min-width: 0;

  display: grid;

  gap: 10px;
}

.associate-transaction-filters
> input[type="search"] {
  width: 100%;
  min-height: 43px;

  padding:
    0 14px;

  border:
    1px solid #dbe4ee;

  border-radius: 11px;

  color:
    #0f172a;

  background:
    #ffffff;

  font:
    inherit;

  font-size: 11px;

  outline: none;

  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.associate-transaction-filters
> input[type="search"]::placeholder {
  color:
    #94a3b8;
}

.associate-transaction-filter-row {
  display: grid;

  grid-template-columns:
    minmax(150px, 1fr)
    minmax(120px, 0.7fr)
    minmax(145px, 0.8fr)
    auto;

  gap: 9px;
}

.associate-transaction-filter-row
select,
.associate-transaction-filter-row
input[type="date"] {
  width: 100%;
  min-height: 42px;

  padding:
    0 12px;

  border:
    1px solid #dbe4ee;

  border-radius: 10px;

  color:
    #334155;

  background:
    #ffffff;

  font:
    inherit;

  font-size: 10px;
  font-weight: 700;

  outline: none;

  cursor: pointer;

  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.associate-transaction-filter-row
select {
  padding-right: 32px;
}

.associate-transaction-filters
input:focus,
.associate-transaction-filter-row
select:focus {
  border-color:
    #2563eb;

  box-shadow:
    0 0 0 3px
    rgba(37, 99, 235, 0.13);
}


/* =====================================================
   RESET BUTTON
===================================================== */

.associate-transaction-reset-btn {
  min-height: 42px;

  padding:
    0 13px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border:
    1px solid #dbe4ee;

  border-radius: 10px;

  color:
    #334155;

  background:
    #ffffff;

  font:
    inherit;

  font-size: 10px;
  font-weight: 830;

  white-space: nowrap;

  cursor: pointer;

  transition:
    color 0.18s ease,
    border-color 0.18s ease,
    background-color 0.18s ease;
}

.associate-transaction-reset-btn:hover {
  border-color:
    #bfdbfe;

  color:
    #1d4ed8;

  background:
    #eff6ff;
}


/* =====================================================
   RESULTS
===================================================== */

.associate-transaction-results {
  min-width: 0;
}


/* =====================================================
   TABLE WRAPPER
===================================================== */

.associate-transaction-table-wrapper {
  width: 100%;

  overflow-x: auto;

  scrollbar-width: thin;

  scrollbar-color:
    #cbd5e1
    transparent;
}

.associate-transaction-table-wrapper::-webkit-scrollbar {
  height: 9px;
}

.associate-transaction-table-wrapper::-webkit-scrollbar-track {
  background:
    transparent;
}

.associate-transaction-table-wrapper::-webkit-scrollbar-thumb {
  border:
    2px solid
    #ffffff;

  border-radius: 999px;

  background:
    #cbd5e1;
}


/* =====================================================
   TABLE
===================================================== */

.associate-transaction-table {
  width: 100%;
  min-width: 1050px;

  border-collapse: collapse;

  table-layout: fixed;
}

.associate-transaction-table
th:nth-child(1),
.associate-transaction-table
td:nth-child(1) {
  width: 220px;
}

.associate-transaction-table
th:nth-child(2),
.associate-transaction-table
td:nth-child(2) {
  width: 125px;
}

.associate-transaction-table
th:nth-child(3),
.associate-transaction-table
td:nth-child(3) {
  width: 145px;
}

.associate-transaction-table
th:nth-child(4),
.associate-transaction-table
td:nth-child(4) {
  width: 115px;
}

.associate-transaction-table
th:nth-child(5),
.associate-transaction-table
td:nth-child(5) {
  width: 95px;
}

.associate-transaction-table
th:nth-child(6),
.associate-transaction-table
td:nth-child(6) {
  width: 125px;
}

.associate-transaction-table
th:nth-child(7),
.associate-transaction-table
td:nth-child(7) {
  width: 220px;
}


/* =====================================================
   TABLE HEADER
===================================================== */

.associate-transaction-table thead {
  background:
    #f8fafc;
}

.associate-transaction-table th {
  padding:
    14px 15px;

  border-bottom:
    1px solid #dce5ef;

  color:
    #64748b;

  font-size: 9px;
  font-weight: 850;
  line-height: 1.2;
  letter-spacing: 0.06em;

  text-align: left;
  text-transform: uppercase;

  white-space: nowrap;
}


/* =====================================================
   TABLE BODY
===================================================== */

.associate-transaction-table td {
  padding:
    16px 15px;

  border-bottom:
    1px solid #e2e8f0;

  color:
    #334155;

  font-size: 11px;
  line-height: 1.45;

  text-align: left;
  vertical-align: middle;

  overflow-wrap: anywhere;
}

.associate-transaction-table tbody tr {
  background:
    #ffffff;

  transition:
    background-color 0.18s ease,
    box-shadow 0.18s ease;
}

.associate-transaction-table tbody tr:hover {
  background:
    #f8fbff;

  box-shadow:
    inset 3px 0 0
    #bfdbfe;
}

.associate-transaction-table
tbody tr:last-child td {
  border-bottom: 0;
}


/* =====================================================
   PAYMENT NAME
===================================================== */

.associate-transaction-name {
  min-width: 0;

  display: grid;

  gap: 4px;
}

.associate-transaction-name strong {
  overflow-wrap: anywhere;

  color:
    #0f172a;

  font-size: 11px;
  font-weight: 850;
  line-height: 1.4;
}

.associate-transaction-name span {
  overflow-wrap: anywhere;

  color:
    #94a3b8;

  font-size: 9px;
  font-weight: 650;
  line-height: 1.4;
}


/* =====================================================
   AMOUNT
===================================================== */

.associate-transaction-amount {
  color:
    #0f172a;

  font-size: 12px;
  font-weight: 900;

  white-space: nowrap;
}


/* =====================================================
   REFERENCE
===================================================== */

.associate-transaction-reference {
  display: block;

  max-width: 100%;

  overflow: hidden;

  color:
    #475569;

  font-family:
    ui-monospace,
    SFMono-Regular,
    Menlo,
    Monaco,
    Consolas,
    monospace;

  font-size: 9px;
  font-weight: 700;

  text-overflow: ellipsis;
  white-space: nowrap;
}


/* =====================================================
   STATUS BADGES
===================================================== */

.associate-transaction-status {
  width: fit-content;
  min-height: 28px;

  padding:
    4px 9px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border:
    1px solid #e2e8f0;

  border-radius: 999px;

  color:
    #475569;

  background:
    #f8fafc;

  font-size: 9px;
  font-weight: 850;

  white-space: nowrap;
}

.associate-transaction-status[data-status="paid"] {
  border-color:
    #bbf7d0;

  color:
    #047857;

  background:
    #ecfdf5;
}

.associate-transaction-status[data-status="pending"] {
  border-color:
    #fde68a;

  color:
    #92400e;

  background:
    #fffbeb;
}

.associate-transaction-status[data-status="approved"] {
  border-color:
    #d8b4fe;

  color:
    #6d28d9;

  background:
    #f5f3ff;
}

.associate-transaction-status[data-status="processing"] {
  border-color:
    #bfdbfe;

  color:
    #1d4ed8;

  background:
    #eff6ff;
}

.associate-transaction-status[data-status="failed"],
.associate-transaction-status[data-status="rejected"] {
  border-color:
    #fecaca;

  color:
    #b91c1c;

  background:
    #fff1f2;
}

.associate-transaction-status[data-status="cancelled"] {
  border-color:
    #e2e8f0;

  color:
    #64748b;

  background:
    #f1f5f9;
}


/* =====================================================
   RESULT COUNT
===================================================== */

.associate-transaction-result-count {
  padding:
    14px 20px;

  border-top:
    1px solid #e2e8f0;

  color:
    #64748b;

  background:
    #f8fafc;

  font-size: 10px;
  text-align: right;
}

.associate-transaction-result-count strong {
  color:
    #1d4ed8;

  font-weight: 850;
}


/* =====================================================
   EMPTY STATE
===================================================== */

.associate-transaction-empty {
  min-height: 360px;

  padding:
    42px 24px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  text-align: center;
}

.associate-transaction-empty-icon {
  width: 64px;
  height: 64px;

  margin-bottom: 16px;

  display: grid;
  place-items: center;

  border-radius: 19px;

  color:
    #1d4ed8;

  background:
    #eff6ff;

  font-size: 24px;
  font-weight: 900;
}

.associate-transaction-empty h3 {
  margin: 0;

  color:
    #0f172a;

  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.025em;
}

.associate-transaction-empty p {
  max-width: 500px;

  margin:
    8px auto 0;

  color:
    #64748b;

  font-size: 11px;
  line-height: 1.6;
}


/* =====================================================
   FOOTER
===================================================== */

.associate-transaction-footer {
  margin-top: 18px;
  padding:
    17px 4px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 18px;

  color:
    #64748b;
}

.associate-transaction-footer strong {
  color:
    #0f172a;

  font-size: 10px;
  font-weight: 850;
}

.associate-transaction-footer span {
  font-size: 9px;
  line-height: 1.5;
}


/* =====================================================
   LOADING
===================================================== */

.associate-transaction-loading {
  min-height:
    calc(100vh - 48px);

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  text-align: center;
}

.associate-transaction-loading
.associate-payment-spinner {
  width: 38px;
  height: 38px;

  margin-bottom: 15px;

  border:
    3px solid
    rgba(37, 99, 235, 0.14);

  border-top-color:
    #2563eb;

  border-radius: 50%;

  animation:
    associate-transaction-spin
    760ms linear infinite;
}

@keyframes associate-transaction-spin {

  to {
    transform:
      rotate(360deg);
  }

}

.associate-transaction-loading strong {
  color:
    #0f172a;

  font-size: 14px;
  font-weight: 880;
}

.associate-transaction-loading p {
  margin:
    7px 0 0;

  color:
    #64748b;

  font-size: 11px;
}


/* =====================================================
   ERROR
===================================================== */

.associate-transaction-error {
  min-height:
    calc(100vh - 48px);

  padding:
    42px 24px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  text-align: center;
}

.associate-transaction-error-icon {
  width: 62px;
  height: 62px;

  margin-bottom: 16px;

  display: grid;
  place-items: center;

  border-radius: 19px;

  color:
    #b91c1c;

  background:
    #fff1f2;

  font-size: 24px;
  font-weight: 900;
}

.associate-transaction-error h1 {
  margin: 0;

  color:
    #0f172a;

  font-size:
    clamp(1.6rem, 3vw, 2.5rem);

  font-weight: 900;
  letter-spacing: -0.04em;
}

.associate-transaction-error p {
  max-width: 560px;

  margin:
    10px auto 0;

  color:
    #64748b;

  font-size: 12px;
  line-height: 1.65;
}

.associate-transaction-error
.associate-payment-back-button {
  margin-top: 20px;
}


/* =====================================================
   FOCUS
===================================================== */

.associate-transaction-page
button:focus-visible,
.associate-transaction-page
input:focus-visible,
.associate-transaction-page
select:focus-visible {
  outline: 0;

  box-shadow:
    0 0 0 3px
    rgba(37, 99, 235, 0.18);
}


/* =====================================================
   MEDIUM DESKTOP
===================================================== */

@media (max-width: 1180px) {

  .associate-transaction-summary-grid {
    grid-template-columns:
      repeat(3, minmax(0, 1fr));
  }

  .associate-transaction-panel-top {
    grid-template-columns: 1fr;

    align-items: stretch;
  }

}


/* =====================================================
   TABLET
===================================================== */

@media (max-width: 850px) {

  .associate-transaction-page {
    padding: 16px;
  }

  .associate-transaction-header {
    min-height: 230px;

    padding:
      28px 23px;
  }

  .associate-transaction-summary-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));

    gap: 10px;
  }

  .associate-transaction-filter-row {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

  .associate-transaction-reset-btn {
    width: 100%;
  }

}


/* =====================================================
   MOBILE TABLE CARDS
===================================================== */

@media (max-width: 700px) {

  .associate-transaction-table-wrapper {
    padding: 12px;

    overflow: visible;

    background:
      #f8fafc;
  }

  .associate-transaction-table {
    min-width: 0;

    border-collapse: separate;
    border-spacing: 0;
  }

  .associate-transaction-table thead {
    display: none;
  }

  .associate-transaction-table,
  .associate-transaction-table tbody,
  .associate-transaction-table tr,
  .associate-transaction-table td {
    display: block;

    width: 100%;
  }

  .associate-transaction-table tbody {
    display: grid;

    gap: 12px;
  }

  .associate-transaction-table tbody tr {
    padding:
      5px 14px;

    border:
      1px solid #dce5ef;

    border-radius: 15px;

    background:
      #ffffff;

    box-shadow:
      0 6px 18px
      rgba(15, 23, 42, 0.055);
  }

  .associate-transaction-table tbody tr:hover {
    background:
      #ffffff;

    box-shadow:
      0 8px 22px
      rgba(15, 23, 42, 0.075);
  }

  .associate-transaction-table td {
    padding:
      11px 0;

    display: grid;

    grid-template-columns:
      minmax(105px, 0.34fr)
      minmax(0, 1fr);

    align-items: center;

    gap: 12px;

    border-bottom:
      1px solid #e2e8f0;
  }

  .associate-transaction-table td:last-child {
    border-bottom: 0;
  }

  .associate-transaction-table td::before {
    color:
      #64748b;

    font-size: 8px;
    font-weight: 850;
    letter-spacing: 0.06em;

    text-transform: uppercase;
  }

  .associate-transaction-table
  td:nth-child(1)::before {
    content: "Payment";
  }

  .associate-transaction-table
  td:nth-child(2)::before {
    content: "Date";
  }

  .associate-transaction-table
  td:nth-child(3)::before {
    content: "Amount";
  }

  .associate-transaction-table
  td:nth-child(4)::before {
    content: "Method";
  }

  .associate-transaction-table
  td:nth-child(5)::before {
    content: "Currency";
  }

  .associate-transaction-table
  td:nth-child(6)::before {
    content: "Status";
  }

  .associate-transaction-table
  td:nth-child(7)::before {
    content: "Reference";
  }

  .associate-transaction-result-count {
    text-align: center;
  }

}


/* =====================================================
   MOBILE
===================================================== */

@media (max-width: 560px) {

  .associate-transaction-page {
    padding: 11px;
  }

  .associate-transaction-header {
    min-height: auto;

    padding:
      74px 17px 24px;

    border-radius: 18px;
  }

  .associate-transaction-header
  .associate-payment-back-button {
    top: 16px;
    left: 16px;
  }

  .associate-transaction-heading {
    padding-top: 0;
  }

  .associate-transaction-heading h1 {
    font-size:
      clamp(2rem, 11vw, 3.1rem);
  }

  .associate-transaction-heading p {
    font-size: 12px;
  }

  .associate-transaction-summary-grid {
    margin-top: 12px;

    grid-template-columns: 1fr;
  }

  .associate-transaction-summary-card {
    min-height: 96px;

    padding: 15px;
  }

  .associate-transaction-panel {
    margin-top: 12px;

    border-radius: 16px;
  }

  .associate-transaction-panel-top {
    padding:
      19px 15px;
  }

  .associate-transaction-filter-row {
    grid-template-columns: 1fr;
  }

  .associate-transaction-table-wrapper {
    padding: 10px;
  }

  .associate-transaction-table tbody tr {
    padding:
      4px 12px;

    border-radius: 14px;
  }

  .associate-transaction-table td {
    grid-template-columns: 1fr;

    gap: 5px;
  }

  .associate-transaction-table td::before {
    margin-bottom: 1px;
  }

  .associate-transaction-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .associate-transaction-error
  .associate-payment-back-button {
    width: 100%;
  }

}


/* =====================================================
   REDUCED MOTION
===================================================== */

@media (prefers-reduced-motion: reduce) {

  .associate-transaction-summary-card,
  .associate-transaction-table tbody tr,
  .associate-transaction-reset-btn,
  .associate-transaction-header
  .associate-payment-back-button {
    transition: none;
  }

  .associate-transaction-loading
  .associate-payment-spinner {
    animation: none;
  }

}