:root {
  --bg: #050816;
  --panel: #262b3a;
  --panel2:#2c3243;
  --row: #292e3e;
  --line: rgba(255,255,255,.07);
  --text: #f2f4fa;
  --mut: #9aa1b5;
  --acc: #7da3ff;
  --ok: #4fd1a1;
  --okbg: rgba(79,209,161,.14);
  --bad: #ff6b6b;
  --badbg: rgba(255,107,107,.16);
  --r: 18px;
}

* {
  box-sizing: border-box;
  margin: 0;
}

html,body {
  height: 100%;
}

body {
  font-family: Inter,-apple-system,"SF Pro Text",system-ui,sans-serif;
  color: var(--text);
  background: radial-gradient(1200px 520px at 70% 0,#1c2f7a 0,#0e1740 38%,#050816 75%) fixed,#050816;
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

.layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  min-height: 100%;
}

.side {
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 26px;
  font-weight: 600;
  margin-bottom: 22px;
}

.logo i {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: #2a3350;
  display: grid;
  place-items: center;
  font-style: normal;
  font-size: 22px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 16px;
  border-radius: 14px;
  color: #c9cee0;
  font-size: 18px;
  width: 100%;
  text-align: left;
}

.nav:hover {
  background: rgba(255,255,255,.05);
}

.nav.on {
  background: #2a2f3f;
  color: #fff;
}

.nav .chev {
  margin-left: auto;
  transition: .2s;
  width: 16px;
}

.grp.open>.nav .chev {
  transform: rotate(180deg);
}

.sub {
  display: none;
  margin: 6px 0 8px 32px;
  padding-left: 14px;
  border-left: 1.5px solid var(--line);
}

.grp.open .sub {
  display: block;
}

.sub .nav {
  font-size: 15px;
  padding: 10px 12px;
  color: var(--mut);
}

.sub .nav.on {
  background: none;
  color: #fff;
  font-weight: 600;
}

.sub .nav svg {
  width: 18px;
}

.grp.open>.nav {
  background: #2a2f3f;
  color: #fff;
}

.spacer {
  flex: 1;
}

.main {
  padding: 22px 28px 40px;
  min-width: 0;
}

.top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 26px;
}

.top h1 {
  font-size: 30px;
  font-weight: 600;
  flex: 1;
}

.pill {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 46px;
  padding: 0 18px;
  border-radius: 23px;
  background: rgba(255,255,255,.07);
  border: 1px solid var(--line);
  font-size: 15px;
}

.pill.sq {
  width: 46px;
  padding: 0;
  justify-content: center;
  position: relative;
}

.dot {
  position: absolute;
  top: 9px;
  right: 11px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff4d4d;
}

.ava {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg,#6fe3d6,#7da3ff);
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #0b1020;
  flex: none;
  object-fit: cover;
}

.ava.s {
  width: 36px;
  height: 36px;
  font-size: 13px;
}

.card {
  background: var(--panel);
  border-radius: var(--r);
  overflow: hidden;
}

.tabs {
  display: flex;
  gap: 6px;
  padding: 20px 20px 0;
  flex-wrap: wrap;
}

.tab {
  padding: 12px 20px;
  border-radius: 12px;
  text-align: left;
  color: var(--mut);
  line-height: 1.3;
  font-size: 16px;
}

.tab b {
  display: block;
  font-weight: 500;
  font-size: 22px;
  color: #cfd4e6;
}

.tab.on {
  background: #363c50;
  color: #fff;
}

.tab.on b {
  color: #fff;
}

.tabs.line .tab {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 11px 16px;
}

.tabs.line .tab.on {
  background: #363c50;
}

.srch {
  margin: 18px 20px;
  width: 50px;
  height: 50px;
  border-radius: 25px;
  background: #363c50;
  display: grid;
  place-items: center;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th {
  text-align: left;
  font-weight: 500;
  color: var(--mut);
  padding: 16px 22px;
  font-size: 16px;
}

td {
  padding: 19px 22px;
  border-top: 1px solid transparent;
  background: var(--row);
  font-size: 17px;
}

tbody tr:nth-child(odd) td {
  background: #2a2f3f;
}

tbody tr:nth-child(even) td {
  background: #292e3e;
}

tbody tr:hover td {
  background: #31374a;
  cursor: pointer;
}

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

.who .ava {
  width: 40px;
  height: 40px;
  font-size: 14px;
}

.num {
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  height: 26px;
  padding: 0 8px;
  border-radius: 13px;
  background: #3a4054;
  font-size: 13px;
  color: #c9cee0;
  margin-left: 10px;
}

.d {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: 12px;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
}

.d.up {
  background: var(--okbg);
  color: var(--ok);
}

.d.dn {
  background: var(--badbg);
  color: var(--bad);
}

.st {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  background: var(--okbg);
  color: var(--ok);
}

.st.v {
  background: rgba(255,200,87,.15);
  color: #ffc857;
}

.st.x {
  background: var(--badbg);
  color: var(--bad);
}

.mut {
  color: var(--mut);
}

.scroll {
  overflow-x: auto;
}

.banner {
  position: relative;
  height: 350px;
  border-radius: 24px;
  border: 2px solid rgba(255,255,255,.2);
  overflow: hidden;
  background: radial-gradient(500px 220px at 85% 30%,#d9dbe3 0,#555 25%,#111 60%),#080808;
  margin-bottom: 22px;
}

.banner .info {
  position: absolute;
  left: 30px;
  bottom: 28px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.banner .ava {
  width: 140px;
  height: 140px;
  background: #111;
  border: 1px solid #333;
  color: #fff;
  font-size: 44px;
}

.profile-hero-avatar {
  position: relative;
  overflow: hidden;
}

.profile-hero-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.banner.has-discord-banner {
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.banner h2 {
  font-size: 38px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 14px;
}

.badge {
  font-size: 14px;
  font-weight: 600;
  border: 1.5px solid #fff;
  border-radius: 20px;
  padding: 4px 14px;
}

.banner p {
  margin-top: 10px;
  color: #e5e7ee;
  display: flex;
  gap: 14px;
  align-items: center;
}

.praise {
  position: absolute;
  right: 16px;
  top: 16px;
  background: rgba(0,0,0,.45);
  padding: 12px 18px;
  border-radius: 20px;
  display: flex;
  gap: 8px;
  align-items: center;
}

.cols {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 20px;
  margin-top: 20px;
  align-items: start;
}

.cols .card {
  padding: 22px;
  margin-bottom: 20px;
}

.card h3 {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
}

.kv {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  font-size: 17px;
  align-items: center;
}

.kv span:first-child {
  color: #d5d9e8;
}

.kv span:last-child {
  text-align: right;
}

.kv+.kv.sep,.sep {
  border-top: 1px solid var(--line);
}

.personal-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.personal-card-heading h3 {
  margin-bottom: 16px;
}

.profile-edit-toggle {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin: -8px -8px 8px 0;
  border-radius: 9px;
  color: #d7dced;
}

.profile-edit-toggle:hover {
  background: rgba(255,255,255,.08);
}

.profile-edit-toggle svg {
  width: 18px;
  height: 18px;
}

.profile-editor {
  display: grid;
  gap: 14px;
  padding-top: 8px;
}

.profile-editor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.profile-editor label {
  display: grid;
  gap: 7px;
  color: var(--mut);
  font-size: 14px;
}

.profile-editor input,
.profile-editor select {
  width: 100%;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  background: rgba(10,14,27,.48);
  color: var(--text);
  font: inherit;
}

.profile-editor select {
  appearance: none;
  padding-right: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23d7dced' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  cursor: pointer;
}

.profile-editor option {
  background: #202638;
  color: var(--text);
}

.profile-editor input:focus,
.profile-editor select:focus {
  border-color: var(--acc);
}

.profile-editor-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}

.profile-editor-actions .btn {
  width: auto;
  margin-top: 0;
  padding: 10px 16px;
}

.profile-editor-actions .btn.secondary {
  background: rgba(255,255,255,.09);
  color: var(--text);
}

.assignment-list {
  display: grid;
  gap: 8px;
  padding: 8px 0 12px;
}

.assignment-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255,255,255,.035);
  font-size: 14px;
}

.assignment-row span:first-child {
  color: var(--text);
  font-weight: 500;
}

.assignment-row span:last-child,
.assignment-empty {
  color: var(--mut);
  text-align: right;
}

.assignment-add {
  width: 100%;
  margin: 0 0 12px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,.07);
  color: var(--text);
}

.assignment-add:hover {
  background: rgba(255,255,255,.12);
}

.profile-history-card {
  margin-top: 18px;
  padding: 22px;
}

.profile-history-card h3 {
  margin-bottom: 18px;
}

.profile-history-list {
  display: grid;
  gap: 10px;
}

.profile-history-item {
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,.035);
}

.profile-history-item.discipline,
.profile-history-item.discipline-removal {
  border-left: 3px solid #ffc857;
}

.profile-history-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.profile-history-top strong {
  font-weight: 600;
}

.profile-history-top time,
.profile-history-meta,
.profile-history-reason {
  color: var(--mut);
  font-size: 13px;
}

.profile-history-meta {
  margin-top: 6px;
}

.profile-history-item p {
  margin-top: 8px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.profile-history-data {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 9px;
}

.profile-history-data span {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.035);
  color: #d5d9e8;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.profile-history-data b {
  color: var(--mut);
  font-weight: 500;
}

.profile-history-empty {
  padding: 32px;
  color: var(--mut);
  text-align: center;
}

.applications-card,
.application-detail-card {
  padding: 22px;
}

.applications-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
}

.applications-toolbar h2 {
  margin-top: 6px;
}

.applications-filter {
  display: grid;
  gap: 6px;
  min-width: 190px;
  color: var(--mut);
  font-size: 13px;
}

.applications-filter select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #202638;
  color: var(--text);
  font: inherit;
}

.applications-table tbody tr {
  cursor: pointer;
}

.application-detail-card > .btn {
  width: auto;
  margin: 0 0 20px;
}

.application-candidate {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-bottom: 22px;
  color: var(--mut);
}

.application-candidate strong {
  color: var(--text);
}

.application-candidate a {
  color: #a9c5ff;
}

.application-detail-card h3 {
  margin: 18px 0 10px;
}

.application-answer-content {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(0,0,0,.14);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.65;
}

.application-assignee {
  margin-top: 14px;
  color: var(--mut);
}

.application-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.application-actions .btn,
.application-comments .btn {
  width: auto;
  margin-top: 0;
  padding: 10px 16px;
}

.application-comments {
  margin-top: 24px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.application-comment {
  margin: 10px 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(255,255,255,.04);
}

.application-comment p {
  margin-top: 8px;
  white-space: pre-wrap;
}

.application-comments form {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.application-comments textarea {
  min-height: 90px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(10,14,27,.48);
  color: var(--text);
  font: inherit;
  resize: vertical;
}

@media(max-width:600px) {
  .applications-toolbar {
    align-items: stretch;
    flex-direction: column;
  }
}

@media(max-width:600px) {
  .profile-history-top,
  .assignment-row {
    align-items: flex-start;
    flex-direction: column;
  }
  .profile-history-top time,
  .assignment-row span:last-child {
    text-align: left;
  }
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 16px;
  border-radius: 20px;
  background: #363c50;
  font-size: 16px;
}

.hero {
  height: 290px;
  border-radius: var(--r);
  background: linear-gradient(180deg,#7ea0ff,#5b78c8 65%,#4b6098);
  position: relative;
  margin-bottom: 20px;
  max-width: 700px;
  padding: 20px 20px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.hero small {
  opacity: .85;
  font-size: 17px;
  margin-top: 6px;
}

.hero b {
  font-size: 19px;
  font-weight: 600;
}

.hero .acts {
  position: absolute;
  right: 16px;
  top: 16px;
  display: flex;
  gap: 18px;
  background: rgba(30,35,50,.8);
  padding: 11px 20px;
  border-radius: 24px;
}

.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
}

.lbox {
  background: var(--panel);
  padding: 40px;
  border-radius: 24px;
  max-width: 420px;
  width: 100%;
}

.btn {
  background: var(--acc);
  color: #0b1020;
  font-weight: 600;
  padding: 14px 22px;
  border-radius: 14px;
  width: 100%;
  margin-top: 20px;
}

.empty {
  padding: 40px;
  text-align: center;
  color: var(--mut);
}

#toasts {
  position: fixed;
  right: 20px;
  bottom: 20px;
  display: grid;
  gap: 8px;
  z-index: 9;
}

.toast {
  background: #363c50;
  padding: 12px 18px;
  border-radius: 12px;
}

.toast.err {
  background: #7a2b33;
}

.menu {
  display: none;
}

@media(max-width:1000px) {
  .layout {
    grid-template-columns: 1fr;
  }
  .side {
    position: fixed;
    z-index: 5;
    left: -320px;
    width: 300px;
    background: #0d1330;
    transition: .25s;
  }
  .side.open {
    left: 0;
  }
  .menu {
    display: grid;
  }
  .cols {
    grid-template-columns: 1fr;
  }
  .profile-editor-grid {
    grid-template-columns: 1fr;
  }
  .main {
    padding: 16px;
  }
  .top h1 {
    font-size: 24px;
  }
  .banner .info {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .banner {
    height: 380px;
  }
}
