/* ---- admin console: full-width owner tool, same page, separate mode ---- */
body[data-mode='admin'] .app,
body[data-mode='admin'] .tabbar {
  display: none;
}
#console {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  z-index: 5;
  color: var(--fg);
}
#console[hidden] {
  display: none;
}
.ad-top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  background: var(--bg2);
  border-bottom: var(--px) solid var(--line);
  flex: none;
  flex-wrap: wrap;
}
.ad-top .brand .long {
  display: inline;
}
.ad-status {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-left: auto;
}
.ad-body {
  flex: 1;
  display: grid;
  grid-template-columns: 176px 1fr;
  min-height: 0;
}
.ad-nav {
  background: var(--bg2);
  border-right: var(--px) solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 8px 0;
}
.ad-nav button {
  background: transparent;
  border: 0;
  border-left: 4px solid transparent;
  color: var(--muted);
  font-family: var(--f-cond);
  font-size: 16px;
  line-height: 16px;
  text-transform: uppercase;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  text-align: left;
}
.ad-nav button.on {
  color: var(--gold);
  border-left-color: var(--gold);
  background: var(--panel);
}
.ad-main {
  overflow: auto;
  padding: 12px 16px;
  min-width: 0;
}
.ad-main h3 {
  margin: 0 0 4px;
}
.ad-err {
  background: rgba(177, 62, 83, 0.25);
  border: var(--px) solid var(--bad);
  padding: 8px 10px;
  margin-bottom: 10px;
  font-family: var(--f-cond);
  font-size: 16px;
  line-height: 16px;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.ad-split {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 12px;
  align-items: start;
}
.ad-list {
  display: grid;
  gap: 4px;
  align-content: start;
}
.ad-search {
  width: 100%;
  box-sizing: border-box;
}
.ad-row {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 6px 8px;
  background: var(--panel2);
  border: var(--px) solid var(--line);
  color: var(--fg);
  font: inherit;
  text-align: left;
  cursor: pointer;
  min-width: 0;
}
.ad-row.on {
  border-color: var(--gold);
  box-shadow: 0 0 0 var(--px) var(--gold);
}
.ad-row .nm {
  font-family: var(--f-cond);
  font-size: 16px;
  line-height: 16px;
  text-transform: uppercase;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: grid;
  gap: 2px;
}
.ad-row small {
  font-family: var(--f-cond);
  font-size: 16px;
  line-height: 16px;
  color: var(--muted);
  text-transform: none;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 150px;
}
.ad-row .st {
  display: grid;
  gap: 2px;
  justify-items: end;
}
.ad-detail {
  min-width: 0;
}
.ad-tabs {
  display: flex;
  gap: 4px;
  margin: 8px 0;
  flex-wrap: wrap;
}
.ad-tabs button {
  background: var(--panel2);
  border: var(--px) solid var(--line);
  color: var(--muted);
  font-family: var(--f-cond);
  font-size: 16px;
  line-height: 16px;
  text-transform: uppercase;
  padding: 6px 10px;
  cursor: pointer;
}
.ad-tabs button.on {
  color: var(--gold);
  border-color: var(--gold);
}
.ad-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 10px;
  align-items: start;
}
.ad-field {
  display: grid;
  grid-template-columns: 1fr 130px;
  gap: 8px;
  align-items: center;
  margin-top: 6px;
  font-family: var(--f-cond);
  font-size: 16px;
  line-height: 16px;
}
.ad-field input,
.ad-field select {
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
}
.ad-4 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 10px;
}
.ad-4 .ad-field {
  grid-template-columns: 1fr 70px;
}
.ad-table {
  width: 100%;
  border-collapse: collapse;
}
.ad-table th,
.ad-table td {
  padding: 4px 6px;
  border-bottom: var(--px) solid var(--line);
  text-align: left;
  vertical-align: middle;
  font-family: var(--f-cond);
  font-size: 16px;
  line-height: 16px;
  white-space: nowrap;
}
.ad-table th {
  color: var(--gold);
}
.tablewrap .ad-table td,
.tablewrap .ad-table th {
  max-width: none;
}
.ad-table .face {
  vertical-align: middle;
}
.ad-main .pcc-vs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  justify-items: center;
}
@media (max-width: 860px) {
  .ad-body {
    grid-template-columns: 1fr;
  }
  .ad-nav {
    flex-direction: row;
    overflow: auto;
    border-right: 0;
    border-bottom: var(--px) solid var(--line);
  }
  .ad-nav button {
    border-left: 0;
    border-bottom: 4px solid transparent;
    padding: 8px 10px;
    flex: none;
    white-space: nowrap;
  }
  .ad-nav button.on {
    border-bottom-color: var(--gold);
  }
  .ad-split {
    grid-template-columns: 1fr;
  }
}
