/* =========================================================
   WITHDRAWAL PAGE
   ========================================================= */

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: #050505;
  color: #d8d8d8;
  font-family: Arial, Helvetica, sans-serif;
}

body {
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border-radius: 0;
}

.hidden {
  display: none !important;
}


/* =========================================================
   SIDEBAR
   ========================================================= */

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 235px;
  padding: 30px 24px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid #1d1d1d;
  background: #050505;
  z-index: 100;
}

.sidebar-top {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.brand,
.mobile-brand {
  color: #ffffff;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.13em;
}

.admin-label {
  color: #555555;
  font-size: 9px;
  letter-spacing: 0.18em;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 55px;
}

.nav a {
  padding: 10px 0;
  color: #6d6d6d;
  font-size: 12px;
  transition: color 0.15s ease;
}

.nav a:hover,
.nav a.active {
  color: #ffffff;
}

.signout {
  margin-top: auto;
  padding: 10px 0;
  border: 0;
  background: transparent;
  color: #666666;
  text-align: left;
  cursor: pointer;
  font-size: 12px;
}

.signout:hover {
  color: #ffffff;
}


/* =========================================================
   MOBILE BAR
   ========================================================= */

.mobile-bar {
  display: none;
}


/* =========================================================
   MAIN
   ========================================================= */

.main {
  margin-left: 235px;
  min-height: 100vh;
  padding: 55px 6vw 90px;
  max-width: 1600px;
}

.page-header {
  max-width: 900px;
  margin-bottom: 52px;
}

.back-link {
  display: inline-block;
  margin-bottom: 25px;
  color: #626262;
  font-size: 11px;
}

.back-link:hover {
  color: #ffffff;
}

.eyebrow {
  margin: 0 0 9px;
  color: #555555;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.18em;
}

.page-header h1 {
  margin: 0;
  color: #ffffff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(34px, 4vw, 58px);
  font-weight: 400;
  letter-spacing: -0.04em;
}

.page-description {
  max-width: 650px;
  margin: 14px 0 0;
  color: #686868;
  font-size: 13px;
  line-height: 1.75;
}


/* =========================================================
   SUMMARY
   ========================================================= */

.summary {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid #242424;
  border-bottom: 1px solid #242424;
  margin-bottom: 55px;
}

.summary-item {
  min-height: 105px;
  padding: 22px 20px;
  border-right: 1px solid #242424;
}

.summary-item:last-child {
  border-right: 0;
}

.summary-label {
  display: block;
  margin-bottom: 13px;
  color: #555555;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.summary-item strong {
  color: #eeeeee;
  font-size: 25px;
  font-weight: 400;
}


/* =========================================================
   FILTERS
   ========================================================= */

.filters-section {
  margin-bottom: 45px;
}

.filter-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 25px;
}

.filter-heading h2,
.section-heading h2,
.detail-intro h2,
.action-section h2 {
  margin: 0;
  color: #eeeeee;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
  font-weight: 400;
  letter-spacing: -0.025em;
}

.clear-button {
  padding: 8px 0;
  border: 0;
  background: transparent;
  color: #666666;
  cursor: pointer;
  font-size: 11px;
}

.clear-button:hover {
  color: #ffffff;
}

.filters {
  display: grid;
  grid-template-columns: minmax(260px, 2fr) minmax(180px, 1fr);
  gap: 18px;
}

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

.field label {
  color: #555555;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.field input,
.field select,
.action-form textarea {
  width: 100%;
  border: 1px solid #292929;
  outline: none;
  background: #080808;
  color: #d7d7d7;
  border-radius: 0;
}

.field input,
.field select {
  min-height: 43px;
  padding: 0 12px;
  font-size: 12px;
}

.field input:focus,
.field select:focus,
.action-form textarea:focus {
  border-color: #555555;
}

.filter-result {
  margin-top: 13px;
  color: #555555;
  font-size: 11px;
}


/* =========================================================
   DIRECTORY
   ========================================================= */

.directory-section {
  border-top: 1px solid #242424;
}

.directory-header,
.withdrawal-row {
  display: grid;
  grid-template-columns:
    minmax(180px, 1.6fr)
    minmax(130px, 1fr)
    minmax(110px, 0.9fr)
    minmax(140px, 1.1fr)
    minmax(135px, 1fr)
    minmax(85px, 0.7fr)
    22px;
  gap: 18px;
  align-items: center;
}

.directory-header {
  min-height: 47px;
  border-bottom: 1px solid #242424;
  color: #4f4f4f;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

.withdrawal-row {
  min-height: 78px;
  border-bottom: 1px solid #1c1c1c;
  color: #bdbdbd;
}

.withdrawal-row:hover {
  background: #090909;
}

.withdrawal-contributor,
.withdrawal-bank {
  min-width: 0;
}

.withdrawal-contributor strong,
.withdrawal-bank strong {
  display: block;
  overflow: hidden;
  color: #d5d5d5;
  font-size: 12px;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.withdrawal-contributor span,
.withdrawal-bank span {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  color: #555555;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.withdrawal-reference,
.withdrawal-date {
  color: #696969;
  font-size: 10px;
}

.withdrawal-amount {
  color: #d9d9d9;
  font-size: 12px;
}

.withdrawal-bank strong {
  font-size: 11px;
}

.withdrawal-status {
  font-size: 10px;
  text-transform: capitalize;
}

.withdrawal-status.pending {
  color: #d2b66d;
}

.withdrawal-status.processing {
  color: #9c9c9c;
}

.withdrawal-status.paid {
  color: #8fb48f;
}

.withdrawal-status.failed {
  color: #c87e7e;
}

.row-arrow {
  color: #4d4d4d;
  font-size: 16px;
  text-align: right;
}

.withdrawal-row:hover .row-arrow {
  color: #ffffff;
}


/* =========================================================
   STATES
   ========================================================= */

.loading-state,
.empty-state,
.error-state,
.loading-page {
  padding: 55px 0;
  color: #5d5d5d;
  font-size: 12px;
}

.empty-state,
.error-state {
  border-bottom: 1px solid #1c1c1c;
}

.empty-title,
.error-title {
  margin: 0 0 8px;
  color: #bdbdbd;
  font-size: 13px;
}

.empty-description,
.error-description {
  max-width: 500px;
  margin: 0;
  color: #5c5c5c;
  font-size: 11px;
  line-height: 1.7;
}

.retry-button,
.back-button {
  display: inline-block;
  margin-top: 18px;
  padding: 10px 15px;
  border: 1px solid #343434;
  background: transparent;
  color: #cfcfcf;
  cursor: pointer;
  font-size: 11px;
}

.retry-button:hover,
.back-button:hover {
  border-color: #666666;
  color: #ffffff;
}


/* =========================================================
   DETAIL PAGE
   ========================================================= */

.withdrawal-detail {
  max-width: 950px;
}

.detail-intro {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 30px;
  padding-bottom: 30px;
  border-bottom: 1px solid #242424;
}

.status-badge {
  padding: 6px 0;
  color: #999999;
  font-size: 10px;
  text-transform: capitalize;
}

.status-badge.pending {
  color: #d2b66d;
}

.status-badge.processing {
  color: #9c9c9c;
}

.status-badge.paid {
  color: #8fb48f;
}

.status-badge.failed {
  color: #c87e7e;
}

.detail-section {
  padding: 40px 0;
  border-bottom: 1px solid #242424;
}

.section-heading {
  margin-bottom: 25px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid #1e1e1e;
}

.detail-item {
  min-height: 75px;
  padding: 17px 20px 17px 0;
  border-bottom: 1px solid #1e1e1e;
}

.detail-item:nth-child(odd) {
  border-right: 1px solid #1e1e1e;
}

.detail-item:nth-child(even) {
  padding-left: 20px;
}

.detail-item span {
  display: block;
  margin-bottom: 9px;
  color: #555555;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.detail-item strong {
  color: #cfcfcf;
  font-size: 12px;
  font-weight: 400;
  overflow-wrap: anywhere;
}


/* =========================================================
   AMOUNT
   ========================================================= */

.amount-breakdown {
  max-width: 600px;
  border-top: 1px solid #1e1e1e;
}

.amount-line {
  display: flex;
  justify-content: space-between;
  gap: 25px;
  padding: 17px 0;
  border-bottom: 1px solid #1e1e1e;
  color: #686868;
  font-size: 12px;
}

.amount-line strong {
  color: #cfcfcf;
  font-weight: 400;
}

.amount-line.total {
  padding-top: 22px;
  color: #a0a0a0;
}

.amount-line.total strong {
  color: #ffffff;
  font-size: 16px;
}


/* =========================================================
   TIMELINE
   ========================================================= */

.timeline {
  max-width: 650px;
  border-left: 1px solid #303030;
}

.timeline-item {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 30px;
  padding: 15px 0 15px 22px;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -4px;
  top: 21px;
  width: 7px;
  height: 7px;
  background: #777777;
}

.timeline-item span {
  color: #686868;
  font-size: 11px;
}

.timeline-item strong {
  color: #c4c4c4;
  font-size: 11px;
  font-weight: 400;
}


/* =========================================================
   NOTES
   ========================================================= */

.detail-note {
  max-width: 700px;
  margin: 0;
  color: #999999;
  font-size: 12px;
  line-height: 1.8;
}


/* =========================================================
   ACTIONS
   ========================================================= */

.action-section {
  padding: 45px 0 20px;
}

.action-description {
  max-width: 650px;
  margin: 10px 0 0;
  color: #646464;
  font-size: 11px;
  line-height: 1.7;
}

.action-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.action-button,
.primary-button,
.danger-button,
.secondary-button {
  min-height: 42px;
  padding: 0 17px;
  border: 1px solid #353535;
  background: transparent;
  cursor: pointer;
  font-size: 11px;
}

.action-button.processing,
.primary-button {
  color: #d4d4d4;
}

.action-button.processing:hover,
.primary-button:hover {
  border-color: #777777;
  color: #ffffff;
}

.action-button.paid {
  color: #8fb48f;
  border-color: #354635;
}

.action-button.paid:hover {
  border-color: #617561;
}

.action-button.failed,
.danger-button {
  color: #c87e7e;
  border-color: #493030;
}

.action-button.failed:hover,
.danger-button:hover {
  border-color: #795050;
}

.secondary-button {
  color: #777777;
}

.secondary-button:hover {
  color: #ffffff;
  border-color: #555555;
}

.action-button:disabled,
.primary-button:disabled,
.danger-button:disabled {
  opacity: 0.5;
  cursor: wait;
}

.action-form {
  max-width: 650px;
  margin-top: 25px;
  padding-top: 25px;
  border-top: 1px solid #242424;
}

.action-form label {
  display: block;
  margin-bottom: 9px;
  color: #555555;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.action-form textarea {
  display: block;
  min-height: 105px;
  padding: 12px;
  resize: vertical;
  color: #d0d0d0;
  font-size: 12px;
  line-height: 1.6;
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 13px;
}

.action-message {
  max-width: 650px;
  margin: 18px 0 0;
  font-size: 11px;
  line-height: 1.6;
}

.action-message.success {
  color: #8fb48f;
}

.action-message.error {
  color: #c87e7e;
}

.action-section.completed {
  opacity: 0.85;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1050px) {

  .directory-header,
  .withdrawal-row {
    grid-template-columns:
      minmax(170px, 1.5fr)
      minmax(110px, 1fr)
      minmax(100px, 0.9fr)
      minmax(120px, 1fr)
      minmax(115px, 1fr)
      minmax(75px, 0.7fr)
      20px;
    gap: 12px;
  }

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

  .summary-item:nth-child(3) {
    border-right: 0;
  }

  .summary-item:nth-child(n + 4) {
    border-top: 1px solid #242424;
  }

}


@media (max-width: 800px) {

  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.2s ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .mobile-bar {
    position: sticky;
    top: 0;
    z-index: 90;
    height: 58px;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 0 20px;
    border-bottom: 1px solid #1d1d1d;
    background: #050505;
  }

  .menu-button {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 28px;
    height: 32px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
  }

  .menu-button span {
    display: block;
    width: 18px;
    height: 1px;
    background: #bcbcbc;
  }

  .mobile-brand {
    font-size: 15px;
  }

  .main {
    margin-left: 0;
    padding: 40px 22px 70px;
  }

  .directory-section {
    overflow-x: auto;
  }

  .directory-header,
  .withdrawal-row {
    min-width: 850px;
  }

}


@media (max-width: 600px) {

  .main {
    padding: 35px 18px 60px;
  }

  .summary {
    grid-template-columns: repeat(2, 1fr);
  }

  .summary-item {
    border-right: 1px solid #242424;
  }

  .summary-item:nth-child(2n) {
    border-right: 0;
  }

  .summary-item:nth-child(n + 3) {
    border-top: 1px solid #242424;
  }

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

  .filter-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .detail-intro {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .detail-item,
  .detail-item:nth-child(even) {
    padding-left: 0;
    padding-right: 0;
    border-right: 0;
  }

  .amount-line {
    font-size: 11px;
  }

  .timeline-item {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .action-controls {
    flex-direction: column;
  }

  .action-button {
    width: 100%;
  }

  .form-actions {
    flex-direction: column;
  }

  .primary-button,
  .danger-button,
  .secondary-button {
    width: 100%;
  }

}