@import url("/platform-theme.css");
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--pp-canvas);
  color: var(--pp-text);
  font: 14px/1.6 var(--pp-font);
}
a {
  color: var(--pp-accent);
  text-decoration: none;
}
button,
input,
textarea {
  font: inherit;
}
[hidden] {
  display: none !important;
}
.console-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--pp-sidebar-width) minmax(0, 1fr);
}
.console-sidebar {
  padding: 12px 10px;
  background: var(--pp-sidebar);
  border-right: 1px solid var(--pp-hairline);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  gap: 4px;
}
.console-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--pp-text);
  padding: 4px 6px 16px;
  font-size: 15px;
  font-weight: 600;
  min-height: 60px;
}
.console-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--pp-accent);
  border-radius: 8px;
  color: var(--pp-accent);
  font-size: 22px;
  background: var(--pp-field);
  flex: none;
}
.console-brand small {
  display: block;
  font-size: 10px;
  font-weight: 400;
  color: var(--pp-subtle);
  letter-spacing: 1.2px;
  margin-top: 2px;
}
.console-group {
  padding: 12px 10px 7px;
  font-size: 11px;
  color: var(--pp-subtle);
}
.console-nav {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 6px;
  min-height: 36px;
  color: var(--pp-muted);
  font-size: 16px;
}
.console-nav span {
  font-size: 13px;
}
.console-nav.active {
  background: var(--pp-selected);
  color: var(--pp-accent);
  box-shadow: inset 2px 0 var(--pp-accent);
}
.console-nav:hover {
  background: var(--pp-raised);
  color: var(--pp-text);
}
.console-side-foot {
  margin-top: auto;
  padding: 13px 8px 4px;
  border-top: 1px solid var(--pp-hairline);
  color: var(--pp-subtle);
  font-size: 12px;
  line-height: 1.9;
}
.console-main {
  min-width: 0;
}
header {
  height: 60px;
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 26px;
  background: var(--pp-sidebar);
  border-bottom: 1px solid var(--pp-hairline);
}
.console-crumb {
  font-size: 13px;
  color: var(--pp-muted);
}
.console-crumb b {
  font-weight: 400;
  margin: 0 9px;
  color: var(--pp-subtle);
}
.console-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
}
main {
  padding: 20px 26px 28px;
  max-width: 1800px;
  margin: 0 auto;
}
.hero {
  position: relative;
  padding: 0 200px 0 0;
  margin-bottom: 18px;
}
.hero h1 {
  font-size: 24px;
  font-weight: 650;
  line-height: 1.35;
  margin: 5px 0;
}
.hero p {
  font-size: 13px;
  color: var(--pp-muted);
  margin: 6px 0 0;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 1.4px;
  color: var(--pp-subtle);
}
.badge {
  position: absolute;
  right: 0;
  top: 17px;
  display: inline-block;
  background: var(--pp-field);
  border: 1px solid var(--pp-border);
  border-radius: 5px;
  padding: 4px 9px;
  color: var(--pp-warning);
  font-size: 11px;
}
.panel {
  padding: 20px;
  background: var(--pp-surface);
  border: 1px solid var(--pp-border);
  border-radius: 10px;
  margin-top: 18px;
  min-width: 0;
}
h2 {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 12px;
}
p {
  margin: 6px 0 14px;
  color: var(--pp-muted);
  font-size: 13px;
}
label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--pp-muted);
  font-size: 12px;
}
input,
textarea {
  width: 100%;
  padding: 9px 11px;
  background: var(--pp-field);
  border: 1px solid var(--pp-border);
  border-radius: 6px;
  color: var(--pp-text);
  min-height: 36px;
}
textarea {
  min-height: 92px;
  resize: vertical;
}
button {
  border: 1px solid var(--pp-primary);
  background: var(--pp-primary);
  color: #fff;
  border-radius: 6px;
  padding: 7px 12px;
  min-height: 36px;
  cursor: pointer;
  font-size: 13px;
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
button:hover:not(:disabled) {
  filter: brightness(1.08);
}
button.secondary {
  background: var(--pp-field);
  color: var(--pp-text);
  border-color: var(--pp-border);
}
.login {
  max-width: 440px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: linear-gradient(135deg, var(--pp-raised), var(--pp-surface) 85%);
  margin: 45px auto;
  padding: 30px;
}
.login h2 {
  font-size: 21px;
  margin-bottom: 0;
}
.login button {
  margin-top: 8px;
}
.login[hidden] {
  display: none !important;
}
#notice {
  color: var(--pp-accent);
  padding: 7px 0;
  min-height: 20px;
  font-size: 13px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.stat {
  background: linear-gradient(135deg, var(--pp-raised), var(--pp-surface) 85%);
  border: 1px solid var(--pp-border);
  border-radius: 10px;
  padding: 18px;
}
.stat span {
  color: var(--pp-muted);
  font-size: 12px;
}
.stat strong {
  display: block;
  font-size: 28px;
  font-weight: 650;
  line-height: 1.2;
  margin-top: 8px;
  color: var(--pp-accent);
}
.stat:nth-child(2) strong {
  color: var(--pp-warning);
}
.stat:nth-child(3) strong {
  color: var(--pp-blue);
}
.stat:nth-child(4) strong {
  color: var(--pp-success);
}
.toolbar,
.section-head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: space-between;
}
.toolbar {
  margin-top: 23px;
}
.toolbar h2 {
  flex: 1;
  margin: 0;
}
.module-link {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  min-height: 36px;
  border-radius: 6px;
  background: var(--pp-field);
  border: 1px solid var(--pp-border);
  color: var(--pp-accent);
  font-size: 13px;
}
.table-wrap {
  overflow-x: auto;
  max-width: 100%;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
td,
th {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--pp-hairline);
  white-space: nowrap;
}
th {
  font-size: 12px;
  font-weight: 500;
  color: var(--pp-muted);
  background: var(--pp-field);
}
tbody tr:hover {
  background: var(--pp-raised);
}
td small {
  display: block;
  color: var(--pp-subtle);
  font-size: 11px;
}
input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-height: 16px;
  accent-color: var(--pp-primary);
}
.toggle {
  flex-direction: row;
  align-items: center;
  gap: 9px;
}
.grant {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid var(--pp-hairline);
}
.grant strong {
  font-weight: 500;
}
.grant .actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.grant input {
  width: 100px;
}
.grant textarea {
  grid-column: 1/-1;
  min-height: 60px;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.send-fields {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
}
.audit {
  font-size: 12px;
  color: var(--pp-muted);
  max-height: 360px;
  overflow: auto;
}
.audit > div {
  padding: 7px 0;
  border-bottom: 1px solid var(--pp-hairline);
}
footer {
  padding: 18px 26px;
  border-top: 1px solid var(--pp-hairline);
  color: var(--pp-subtle);
  font-size: 11px;
}
@media (max-width: 1100px) {
  .console-shell {
    grid-template-columns: 200px minmax(0, 1fr);
  }
  main {
    padding: 20px;
  }
  header {
    padding: 0 20px;
  }
}
@media (max-width: 850px) {
  .console-shell {
    grid-template-columns: 1fr;
  }
  .console-sidebar {
    height: auto;
    position: static;
    flex-direction: row;
    align-items: center;
    padding: 8px 12px;
    overflow: auto;
    border-right: 0;
    border-bottom: 1px solid var(--pp-hairline);
    gap: 12px;
  }
  .console-brand {
    padding: 0;
    min-height: 36px;
    font-size: 13px;
    white-space: nowrap;
  }
  .console-brand small,
  .console-group,
  .console-side-foot {
    display: none;
  }
  .console-mark {
    width: 30px;
    height: 30px;
  }
  .console-nav {
    padding: 7px 9px;
    min-height: 32px;
    white-space: nowrap;
    gap: 6px;
  }
  .console-nav span {
    font-size: 12px;
  }
  header {
    height: 56px;
    padding: 0 16px;
  }
  .console-nav:last-of-type {
    display: none;
  }
  main {
    padding: 16px;
  }
  .hero {
    padding-right: 0;
  }
  .hero .badge {
    position: static;
    margin-top: 13px;
  }
  .stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }
  .stat {
    padding: 13px;
  }
  .stat strong {
    font-size: 25px;
  }
  .panel {
    padding: 17px;
  }
  .send-fields {
    grid-template-columns: 1fr;
  }
  .grant {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 520px) {
  main {
    padding: 12px 10px 24px;
  }
  header {
    padding: 0 10px;
  }
  .console-crumb {
    font-size: 12px;
  }
  .stats {
    grid-template-columns: 1fr 1fr;
  }
  .toolbar {
    gap: 8px;
  }
  .toolbar h2 {
    flex-basis: 100%;
  }
  .toolbar button,
  .module-link {
    font-size: 12px;
    padding: 7px 10px;
  }
  .hero h1 {
    font-size: 22px;
  }
  .panel {
    padding: 15px;
  }
  .login {
    padding: 23px;
    margin: 25px auto;
  }
  .console-header-right {
    font-size: 11px;
  }
  .console-nav:nth-last-of-type(2) {
    display: none;
  }
}

.console-mark .icon,
.console-nav .icon {
  width: 18px;
  height: 18px;
  flex: none;
}
.console-nav > [data-platform-icon] {
  display: flex;
  align-items: center;
}
