:root {
    --bg: #0e1418;
    --panel: #141c22;
    --panel-alt: #182129;
    --border: #24313a;
    --text: #dbe4e9;
    --text-dim: #7d8f99;
    --accent: #4fd1ae;
    --accent-dim: #2b6b5b;
    --warn: #e0a458;
    --err: #e0685c;
    --font-ui: Helvetica;
    --font-data: "SF Mono";
}
 
* { box-sizing: border-box; }

/*_________________________HEADER | NAV_____________________________*/

.topbar {
  min-height: 150px;
  height: auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 12 24px;
  border-bottom: 1px solid #ddd;
  background: var(--bg);
  gap: 12px
}

.page-header {
    width: 180px;
}

/*___________HEADER | LEFT___________*/

.top_left {
  display: flex;
  align-items: center;
}

.logo {
  height: 120px;
  width: auto;
}

.title1 {
  position: relative;
  padding-bottom: 1px;
  text-align: center;
}

.title1::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(
    to right,
    transparent 0%,
    var(--accent) 35%,
    var(--accent) 65%,
    transparent 100%
  );
}

.last-refresh {
    position: relative;
    top: -12px;

    display: flex;
    justify-content: center;
}

#refreshBtn {
  position: relative;
  background: transparent;
  color: #555;
  padding: 12px 22px;
  border: none;
  border-radius: 0;
  font-weight: 800;
  font-size: 18px;
  cursor: pointer;
  transition: color 0.3s ease 0.09s;
}

#refreshBtn:hover {
  color: #fff;
}

#refreshBtn::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  opacity: 0.5;
  transition: opacity 0.2s ease;
}

#refreshBtn::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 70%;
  background:
    linear-gradient(
      to top,
      var(--accent) 0%,
      var(--accent) 25%,
      transparent 100%
    ) left bottom / 2px 100% no-repeat,

    linear-gradient(
      to top,
      var(--accent) 0%,
      var(--accent) 25%,
      transparent 100%
    ) right bottom / 2px 100% no-repeat;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

#refreshBtn:hover::before,
#refreshBtn:hover::after {
  opacity: 0.80;
  transition: opacity 0.3s ease;
}

#refreshBtn:disabled {
  opacity: 0.35;
  cursor: default;
}

#refreshBtn:disabled::before,
#refreshBtn:disabled::after {
  opacity: 0.5;
  transition: opacity 0.3s ease;
}

#refreshBtn {
  align-self: center;
  margin-top: 10px;
  margin-bottom: 4px;
}



/*___________HEADER | CENTER___________*/

.topNav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topNav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  text-decoration: none;
  color: #555;
  font-weight: 600;
  background: transparent;
  border: none;
}

.topNav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(
    to right,
    var(--accent) 0%,
    var(--accent) 25%,
    transparent 100%
  );
}

.topNav a::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 2px;
  height: 70%;
  background: linear-gradient(
    to top,
    var(--accent) 0%,
    var(--accent) 25%,
    transparent 100%
  );
}

.topNav a::before,
.topNav a::after {
  opacity: 0.35;
  transition: opacity 0.2s ease;
}

.topNav a:hover::before,
.topNav a:hover::after,
.topNav a.active::before,
.topNav a.active::after {
  opacity: 1;
}

.topNav a.active {
  color: var(--text);
}

/*___________HEADER | RIGHT___________*/

.tokenStatus {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 180px;
  justify-self: end;
}

.status-active {
    color: green;
}

.status-expired {
    color: red;
}

.logoutBtn {
  position: relative;
  background: transparent;
  color: #555;
  padding: 12px 22px;
  border: none;
  border-radius: 0;
  font-weight: 800;
  font-size: 18px;
  cursor: pointer;
  transition: color 0.3s ease 0.09s;
}

.logoutBtn:hover {
  color: #fff;
}

.logoutBtn::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  opacity: 0.5;
  transition: opacity 0.2s ease;
}

.logoutBtn::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 70%;
  background:
    linear-gradient(
      to top,
      var(--accent) 0%,
      var(--accent) 25%,
      transparent 100%
    ) left bottom / 2px 100% no-repeat,

    linear-gradient(
      to top,
      var(--accent) 0%,
      var(--accent) 25%,
      transparent 100%
    ) right bottom / 2px 100% no-repeat;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.logoutBtn:hover::before,
.logoutBtn:hover::after {
  opacity: 0.80;
  transition: opacity 0.3s ease;
}

.logoutBtn:disabled {
  opacity: 0.35;
  cursor: default;
}

.logoutBtn:disabled::before,
.logoutBtn:disabled::after {
  opacity: 0.5;
  transition: opacity 0.3s ease;
}

.logoutBtn {
  align-self: center;
  margin-top: 10px;
  margin-bottom: 4px;
}

.header-actions {
    position: relative;

    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 180px;
    justify-self: end;
}

.header-actions .controls {
    position: relative;
    top: 12px;

    display: flex;
    justify-content: center;
}

/*_________________________UTILITY | BAR_____________________________*/

.meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
  font-size: 18px;
  color: var(--text-dim);
  font-family: var(--font-data);
  padding: 20px 24px 40px;
}

.meta-row span b { 
  color: var(--text); 
}

/*___________UTILITY | SEARCH___________*/


/*___________UTILITY | URL___________*/

#importSheetBtn {
  position: relative;
  background: transparent;
  color: #555;
  border: none;
  border-radius: 0;
  padding: 9px 16px;
  margin-right: 12px;
  font-weight: 800;
  font-size: 16px;
  font-family: var(--font-ui);
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s ease 0.09s;
}

#importSheetBtn::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  opacity: 0.5;
  transition: opacity 0.2s ease;
}

#importSheetBtn:hover {
    color: #fff;
}

#importSheetBtn::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 70%;
  background:
    linear-gradient(
      to top,
      var(--accent) 0%,
      var(--accent) 25%,
      transparent 100%
    ) left bottom / 2px 100% no-repeat,

    linear-gradient(
      to top,
      var(--accent) 0%,
      var(--accent) 25%,
      transparent 100%
    ) right bottom / 2px 100% no-repeat;

  opacity: 0.5;
  transition: opacity 0.2s ease;
}

#importSheetBtn:hover::before,
#importSheetBtn:hover::after {
  opacity: 0.80;
  transition: opacity 0.3s ease;
}

.url_input {
  background: var(--panel-alt);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 18px;
  width: 220px;
  outline: none;
  transition: border-color 0.15s;
}

.url_input:focus { 
  border: 1px solid var(--accent-dim);
  outline: none;
  box-shadow: 0 4px 10px -6px var(--accent);
}

#status {
  font-size: 18px;
  color: var(--text-dim);
  font-family: var(--font-data);
  min-width: 90px;
}

#status.err { 
  color: var(--err); 
}

#status.ok { 
  color: var(--accent); 
}





/*_________________________MAIN | SECTION_____________________________*/

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 18px;
}

main {
    padding: 20px 24px 40px;
}

/*_________________________TABLE | SEARCH_____________________________*/

.thd_filter {
  background: var(--panel-alt);
  border: 1px solid var(--accent-dim);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 18px;
  width: 220px;
  outline: none;
  transition: border-color 0.15s;
}

.thd_filter:focus { 
  border: 1px solid var(--accent-dim);
  outline: none;
  box-shadow: 0 4px 10px -6px var(--accent);
}

.thd_filter::placeholder { 
  color: var(--text-dim); 
}

.thdBtn {
  position: relative;
  background: transparent;
  color: #555;
  border: none;
  border-radius: 0;
  padding: 9px 16px;
  margin-left: 12px;
  font-weight: 800;
  font-size: 16px;
  font-family: var(--font-ui);
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s ease 0.09s;
}

.thdBtn::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  opacity: 0.5;
  transition: opacity 0.2s ease;
}

.thdBtn:hover {
    color: #fff;
}

.thdBtn::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 70%;
  background:
    linear-gradient(
      to top,
      var(--accent) 0%,
      var(--accent) 25%,
      transparent 100%
    ) left bottom / 2px 100% no-repeat,

    linear-gradient(
      to top,
      var(--accent) 0%,
      var(--accent) 25%,
      transparent 100%
    ) right bottom / 2px 100% no-repeat;

  opacity: 0.5;
  transition: opacity 0.2s ease;
}

.thdBtn:hover::before,
.thdBtn:hover::after {
  opacity: 0.80;
  transition: opacity 0.3s ease;
}



.column-toggle {
  position: relative;

  background: transparent;
  color: #555;

  border: none;
  border-radius: 0;

  padding: 7px 12px;

  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 800;

  cursor: pointer;
  white-space: nowrap;

  transition:
    color 0.2s ease,
    background 0.2s ease;
}

.column-toggle::after {
  content: "";
  position: absolute;

  left: 0;
  bottom: 0;

  width: 100%;
  height: 2px;

  background: var(--accent);
  opacity: 0.4;
}

.column-toggle.selected {
  color: var(--text);

  background: linear-gradient(
    to top,
    color-mix(in srgb, var(--accent) 35%, transparent) 0%,
    color-mix(in srgb, var(--accent) 15%, transparent) 45%,
    transparent 100%
  );
}

.column-toggle.selected::after {
  opacity: 0.9;
}

.column-toggle:hover {
  color: var(--text);
}

.column-toggle:hover::after {
  opacity: 0.8;
}

.column-control {
  position: relative;
}

#clientColumnMenu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 1000;

  display: grid;
  grid-template-columns: repeat(5, max-content);
  gap: 6px;

  padding: 10px;

  background: var(--panel-alt);
  border: 1px solid var(--accent-dim);
  border-radius: 8px;
}

#clientHost th[data-col="member_name"],
#clientHost td[data-col="member_name"] {
  width: 300px;
  min-width: 300px;
  max-width: 300px;
}

















/*_________________________PAGE | BUTTONS_____________________________*/

.pager {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  font-size: 18px;
  color: var(--text-dim);
  font-family: var(--font-data);
}

.pager button {
  background: var(--panel-alt);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 5px 10px;
  border-radius: 5px;
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: 18px;
}

.pager button:disabled { 
  opacity: 0.35; 
  cursor: default; 
}

/*_________________________JS | TABLES_____________________________*/

.table-wrap {
  border: 1px solid var(--border);
  border-radius: 8px;

  overflow-y: auto;
  overflow-x: auto;

  height: calc(100vh - 340px);

  background: var(--panel);
}
 
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 18px;
}
 
thead th {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--panel-alt);
  color: var(--text-dim);
  text-align: left;
  padding: 10px 14px;
  font-weight: 800;
  font-size: 18px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 4px solid var(--border);
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
}

thead th:hover { 
  color: var(--text); 
}

thead th .arrow { 
  opacity: 0.5; 
  margin-left: 4px; 
  font-size: 18px; 
}
 
tbody td {
  padding: 8px 14px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  font-family: var(--font-data);
  color: var(--text);
}
 
tbody tr:hover { 
  background: var(--panel-alt); 
}

tbody tr:nth-child(even) { 
  background: rgba(255,255,255,0.012); 
}
 
.empty-state, .loading-state {
  padding: 60px 20px;
  text-align: center;
  color: var(--text-dim);
}

.empty-state .big, .loading-state .big {
  font-size: 18px;
  color: var(--text);
  margin-bottom: 6px;
}

/*_________________________PAYMENTS | TABLES_____________________________*/

.payments-list {
  list-style: none;
  margin: 0;
  padding: 0;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 6px;
  width: 280px;
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  z-index: 5;
}

.payments-list:empty { 
  display: none; 
}

.payments-list-page {
  position: static;
  width: 100%;
  max-width: 640px;
  max-height: none;
  margin: 0;
}

.payments-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-data);
  font-size: 18px;
  color: var(--text);
}

.payments-list li:last-child { 
  border-bottom: none; 
}

.payments-list li.empty {
  justify-content: center;
  color: var(--text-dim);
  font-family: var(--font-ui);
}

.payments-list .pmeta { 
  color: var(--text-dim); 
  font-size: 16px; 
}








