:root {
  --black: #000000;
  --white: #f4f4f1;
  --muted: #777777;
  --muted-dark: #505050;
  --line: rgba(255, 255, 255, 0.11);
  --line-soft: rgba(255, 255, 255, 0.06);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--black);
}

body {
  margin: 0;
  min-height: 100vh;

  background: var(--black);
  color: var(--white);

  font-family:
    "Helvetica Neue",
    Helvetica,
    Arial,
    sans-serif;

  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

button,
input,
select {
  font: inherit;
}


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

.sidebar {
  position: fixed;
  z-index: 50;

  top: 0;
  left: 0;
  bottom: 0;

  width: 230px;

  display: flex;
  flex-direction: column;
  justify-content: space-between;

  padding: 30px 22px;

  border-right: 1px solid var(--line-soft);

  background: var(--black);
}

.brand {
  padding-bottom: 30px;

  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
}

.section-label {
  margin-bottom: 18px;

  color: #555;

  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.18em;
}

.navigation {
  display: flex;
  flex-direction: column;
}

.nav-link {
  position: relative;

  padding: 9px 0;

  color: #777;

  font-size: 13px;

  transition: color 160ms ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--white);
}

.nav-link.active::before {
  content: "";

  position: absolute;

  left: -22px;
  top: 50%;

  width: 2px;
  height: 14px;

  transform: translateY(-50%);

  background: var(--white);
}

.logout-button {
  padding: 0;

  background: transparent;
  color: #666;

  cursor: pointer;

  font-size: 12px;
}

.logout-button:hover {
  color: var(--white);
}


/* ==========================================
   MOBILE HEADER
========================================== */

.mobile-header {
  display: none;
}


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

.main {
  min-height: 100vh;

  margin-left: 230px;

  padding: 52px 58px 35px;
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;

  padding-bottom: 38px;

  border-bottom: 1px solid var(--line);
}

.page-kicker {
  margin: 0 0 12px;

  color: #666;

  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.19em;
}

.page-header h1 {
  margin: 0;

  font-family:
    Georgia,
    "Times New Roman",
    serif;

  font-size: clamp(44px, 5vw, 68px);
  font-weight: 400;

  letter-spacing: -0.055em;
  line-height: 0.9;
}

.header-count {
  color: #666;

  font-size: 11px;
}


/* ==========================================
   TOOLBAR
========================================== */

.toolbar {
  display: flex;
  align-items: flex-end;
  gap: 35px;

  padding: 30px 0;

  border-bottom: 1px solid var(--line);
}

.search {
  flex: 1;
  max-width: 520px;
}

.search label,
.filter label {
  display: block;

  margin-bottom: 9px;

  color: #666;

  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.14em;
}

.search input,
.filter select {
  width: 100%;
  height: 42px;

  border: 0;
  border-bottom: 1px solid var(--line);

  outline: none;

  border-radius: 0;

  background: transparent;
  color: var(--white);

  font-size: 13px;
}

.search input:focus,
.filter select:focus {
  border-bottom-color: rgba(255, 255, 255, 0.55);
}

.search input::placeholder {
  color: #444;
}

.filter {
  width: 170px;
}

.filter select {
  cursor: pointer;
}

.filter option {
  background: #111;
  color: #fff;
}


/* ==========================================
   TABLE
========================================== */

.users-table-section {
  width: 100%;
}

.table-head {
  display: grid;

  grid-template-columns:
    minmax(240px, 2fr)
    minmax(150px, 1.2fr)
    minmax(110px, 0.8fr)
    minmax(120px, 0.8fr)
    minmax(120px, 0.8fr);

  gap: 25px;

  padding: 17px 0;

  border-bottom: 1px solid var(--line-soft);

  color: #555;

  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.user-row {
  display: grid;

  grid-template-columns:
    minmax(240px, 2fr)
    minmax(150px, 1.2fr)
    minmax(110px, 0.8fr)
    minmax(120px, 0.8fr)
    minmax(120px, 0.8fr);

  gap: 25px;

  align-items: center;

  min-height: 82px;

  border-bottom: 1px solid var(--line-soft);

  transition: background 140ms ease;
}

.user-row:hover {
  background: rgba(255, 255, 255, 0.025);
}

.user-cell {
  min-width: 0;
}

.user-name {
  overflow: hidden;

  color: #e7e7e4;

  font-size: 13px;
  font-weight: 500;

  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-username {
  margin-top: 5px;

  overflow: hidden;

  color: #555;

  font-size: 10px;

  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-phone {
  color: #b0b0b0;

  font-size: 11px;
}

.phone-status {
  display: block;

  margin-top: 5px;

  color: #555;

  font-size: 9px;
}

.status {
  color: #aaa;

  font-size: 10px;
}

.status.active {
  color: #ddd;
}

.status.suspended,
.status.disabled {
  color: #777;
}

.wallet {
  color: #ccc;

  font-size: 11px;
}

.joined {
  color: #777;

  font-size: 10px;
}

.loading,
.empty,
.error-row {
  padding: 28px 0;

  color: #555;

  font-size: 11px;
}

.error-row {
  color: #888;
}


/* ==========================================
   FOOTER
========================================== */

.page-footer {
  padding-top: 24px;

  color: #4d4d4d;

  font-size: 10px;
}


/* ==========================================
   MOBILE OVERLAY
========================================== */

.mobile-overlay {
  display: none;
}


/* ==========================================
   TABLET
========================================== */

@media (max-width: 1000px) {

  .sidebar {
    width: 205px;
  }

  .main {
    margin-left: 205px;

    padding: 42px 35px 30px;
  }

  .table-head,
  .user-row {
    grid-template-columns:
      minmax(200px, 1.8fr)
      minmax(130px, 1fr)
      minmax(100px, 0.8fr)
      minmax(110px, 0.8fr);
  }

  .table-head span:last-child,
  .user-row .joined {
    display: none;
  }

}


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

@media (max-width: 700px) {

  .mobile-header {
    position: fixed;
    z-index: 40;

    top: 0;
    left: 0;
    right: 0;

    height: 62px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-bottom: 1px solid var(--line-soft);

    background: var(--black);
  }

  .mobile-brand {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.2em;
  }

  .menu-button {
    position: absolute;

    left: 20px;

    width: 25px;
    height: 25px;

    padding: 0;

    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;

    border: 0;

    background: transparent;

    cursor: pointer;
  }

  .menu-button span {
    width: 18px;
    height: 1px;

    display: block;

    background: #aaa;
  }

  .sidebar {
    z-index: 60;

    width: min(280px, 82vw);

    transform: translateX(-100%);

    transition: transform 220ms ease;
  }

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

  .mobile-overlay {
    position: fixed;
    z-index: 55;

    inset: 0;

    background: rgba(0, 0, 0, 0.72);
  }

  .mobile-overlay.visible {
    display: block;
  }

  .main {
    margin-left: 0;

    padding: 92px 20px 28px;
  }

  .page-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;

    padding-bottom: 28px;
  }

  .page-header h1 {
    font-size: 50px;
  }

  .toolbar {
    align-items: stretch;
    flex-direction: column;

    gap: 24px;

    padding: 25px 0;
  }

  .search,
  .filter {
    width: 100%;
    max-width: none;
  }

  .table-head {
    display: none;
  }

  .user-row {
    display: block;

    padding: 20px 0;
  }

  .user-cell {
    margin-bottom: 12px;
  }

  .user-cell:last-child {
    margin-bottom: 0;
  }

  .user-phone::before {
    content: "PHONE";

    display: block;

    margin-bottom: 5px;

    color: #444;

    font-size: 8px;
    letter-spacing: 0.12em;
  }

  .status::before {
    content: "ACCOUNT";

    display: block;

    margin-bottom: 5px;

    color: #444;

    font-size: 8px;
    letter-spacing: 0.12em;
  }

  .wallet::before {
    content: "WALLET";

    display: block;

    margin-bottom: 5px;

    color: #444;

    font-size: 8px;
    letter-spacing: 0.12em;
  }

  .joined {
    display: block !important;
  }

  .joined::before {
    content: "JOINED";

    display: block;

    margin-bottom: 5px;

    color: #444;

    font-size: 8px;
    letter-spacing: 0.12em;
  }

}


/* ==========================================
   SMALL PHONE
========================================== */

@media (max-width: 380px) {

  .main {
    padding-left: 17px;
    padding-right: 17px;
  }

  .page-header h1 {
    font-size: 45px;
  }

}

/* ==========================================
   USER DETAIL
========================================== */

.back-row {
  margin-bottom: 38px;
}

.back-link {
  color: #666;

  font-size: 11px;

  transition: color 160ms ease;
}

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

.user-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;

  padding-bottom: 38px;

  border-bottom: 1px solid var(--line);
}

.user-header h1 {
  margin: 0;

  font-family:
    Georgia,
    "Times New Roman",
    serif;

  font-size: clamp(42px, 5vw, 68px);
  font-weight: 400;

  letter-spacing: -0.055em;
  line-height: 0.9;
}

.user-subtitle {
  margin: 13px 0 0;

  color: #555;

  font-size: 11px;
}

.account-status {
  color: #aaa;

  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}


/* ==========================================
   RECORD SECTIONS
========================================== */

.record-section {
  padding: 34px 0;

  border-bottom: 1px solid var(--line-soft);
}

.section-title {
  margin-bottom: 26px;

  color: #555;

  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.record-grid {
  display: grid;

  grid-template-columns:
    repeat(3, minmax(0, 1fr));

  column-gap: 45px;
  row-gap: 26px;
}

.record-item {
  min-width: 0;
}

.record-wide {
  grid-column: span 2;
}

.record-label {
  display: block;

  margin-bottom: 8px;

  color: #505050;

  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.record-value {
  display: block;

  color: #cfcfcb;

  font-size: 12px;

  overflow-wrap: anywhere;
}

.record-id {
  color: #555;

  font-family:
    "SFMono-Regular",
    Consolas,
    monospace;

  font-size: 10px;
}


/* ==========================================
   PHONE
========================================== */

.phone-record {
  display: grid;

  grid-template-columns:
    minmax(0, 1fr)
    minmax(260px, 360px);

  gap: 70px;
}

.phone-number {
  color: #ddd;

  font-size: 20px;
  letter-spacing: -0.02em;
}

.phone-verification {
  margin-top: 9px;

  color: #777;

  font-size: 10px;
}

.phone-date {
  margin-top: 5px;

  color: #4c4c4c;

  font-size: 9px;
}

.phone-edit label {
  display: block;

  margin-bottom: 9px;

  color: #555;

  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.phone-edit input {
  width: 100%;
  height: 40px;

  padding: 0;

  border: 0;
  border-bottom: 1px solid var(--line);

  outline: none;

  border-radius: 0;

  background: transparent;
  color: #eee;

  font-size: 12px;
}

.phone-edit input:focus {
  border-bottom-color: #aaa;
}

.phone-edit input::placeholder {
  color: #444;
}

.phone-edit button {
  margin-top: 16px;

  height: 36px;

  padding: 0 17px;

  border: 1px solid #777;

  background: transparent;
  color: #ddd;

  cursor: pointer;

  font-size: 10px;

  transition:
    background 160ms ease,
    color 160ms ease;
}

.phone-edit button:hover {
  background: #eee;
  color: #000;
}

.phone-edit button:disabled {
  opacity: 0.45;
  cursor: wait;
}

.form-message {
  min-height: 14px;

  margin: 9px 0 0;

  color: #777;

  font-size: 10px;
}


/* ==========================================
   WALLET
========================================== */

.wallet-grid {
  display: grid;

  grid-template-columns:
    repeat(4, minmax(0, 1fr));

  gap: 30px;
}

.wallet-item {
  min-width: 0;
}

.wallet-item strong {
  display: block;

  color: #ddd;

  font-size: 17px;
  font-weight: 400;
}


/* ==========================================
   ACTIVITY
========================================== */

.activity-grid {
  display: grid;

  grid-template-columns:
    repeat(4, minmax(0, 1fr));

  gap: 30px;
}

.activity-item strong {
  display: block;

  color: #ddd;

  font-size: 20px;
  font-weight: 400;
}


/* ==========================================
   ACTIVITY LIST
========================================== */

.activity-list {
  display: flex;
  flex-direction: column;
}

.activity-row {
  display: grid;

  grid-template-columns:
    110px
    minmax(0, 1fr)
    120px;

  gap: 25px;

  align-items: center;

  min-height: 58px;

  border-bottom: 1px solid var(--line-soft);
}

.activity-row:last-child {
  border-bottom: 0;
}

.activity-date {
  color: #555;

  font-size: 9px;
}

.activity-description {
  color: #aaa;

  font-size: 11px;
}

.activity-type {
  color: #555;

  font-size: 9px;
  text-align: right;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}


/* ==========================================
   DETAIL MOBILE
========================================== */

@media (max-width: 800px) {

  .record-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));

    gap: 24px;
  }

  .phone-record {
    grid-template-columns: 1fr;

    gap: 35px;
  }

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

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

}


/* ==========================================
   DETAIL PHONE
========================================== */

@media (max-width: 700px) {

  .back-row {
    margin-bottom: 30px;
  }

  .user-header {
    align-items: flex-start;

    flex-direction: column;

    gap: 20px;

    padding-bottom: 28px;
  }

  .user-header h1 {
    font-size: 48px;
  }

  .record-section {
    padding: 28px 0;
  }

  .record-grid {
    grid-template-columns: 1fr;

    gap: 22px;
  }

  .record-wide {
    grid-column: auto;
  }

  .wallet-grid,
  .activity-grid {
    grid-template-columns: 1fr 1fr;

    gap: 25px 20px;
  }

  .activity-row {
    grid-template-columns: 80px minmax(0, 1fr);

    gap: 15px;

    padding: 14px 0;
  }

  .activity-type {
    grid-column: 2;

    text-align: left;
  }

}


/* ==========================================
   DETAIL SMALL PHONE
========================================== */

@media (max-width: 380px) {

  .user-header h1 {
    font-size: 43px;
  }

  .wallet-grid,
  .activity-grid {
    grid-template-columns: 1fr;
  }

}