:root {
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  color: #e8e8f0;
  background: #08090d;

  --panel: #11131a;
  --line: #222530;
  --muted: #858999;
  --purple: #7c4dff;
  --green: #39d98a;
  --red: #ff5c7a;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;

  background:
    radial-gradient(
      circle at 80% 0,
      #17102c 0,
      transparent 32%
    ),
    #08090d;
}

button,
input,
select {
  font-family: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

.shell {
  display: flex;
  min-height: 100vh;
}

.side {
  width: 212px;

  background: #0e0f14;

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

  padding: 24px 16px;

  display: flex;
  flex-direction: column;

  flex-shrink: 0;
}

.brand {
  display: flex;

  gap: 10px;

  align-items: center;

  font-weight: 700;
}

.logo {
  background:
    linear-gradient(
      145deg,
      #926cff,
      #6840ea
    );

  border-radius: 9px;

  padding: 9px 12px;

  font-size: 18px;

  line-height: 1;
}

.brand small {
  display: block;

  color: var(--muted);

  font-weight: 400;

  margin-top: 2px;
}


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

.nav {
  margin-top: 30px;

  display: grid;

  gap: 8px;
}

.nav button {
  display: flex;

  align-items: center;

  gap: 10px;

  width: 100%;

  border: 0;

  background: none;

  color: #aeb1c1;

  text-align: left;

  padding: 11px 13px;

  border-radius: 8px;

  cursor: pointer;

  transition:
    background .18s ease,
    color .18s ease,
    transform .18s ease;
}

.nav button:hover {
  background: #18152a;

  color: #fff;
}

.nav button.active {
  background: #211a3c;

  color: #fff;
}

.nav button:active {
  transform: scale(.98);
}


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

.nav-icon {
  width: 18px;

  height: 18px;

  min-width: 18px;

  min-height: 18px;

  display: block;

  flex: 0 0 18px;
}

.nav button span {
  display: block;

  font-size: 13px;

  line-height: 18px;

  white-space: nowrap;
}

.nav button::before,
.nav button::after {
  display: none !important;

  content: none !important;
}


/* =========================
   STATUS
   ========================= */

.status {
  margin-top: auto;

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

  border-radius: 10px;

  padding: 12px;

  font-size: 12px;

  color: var(--muted);

  line-height: 1.6;
}

.dot {
  display: inline-block;

  width: 8px;

  height: 8px;

  border-radius: 50%;

  background: var(--green);

  box-shadow:
    0 0 10px rgba(57, 217, 138, .55);

  margin-right: 7px;
}


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

.main {
  flex: 1;

  padding: 34px;

  max-width: 1500px;

  min-width: 0;
}

.top {
  display: flex;

  justify-content: space-between;

  align-items: center;

  margin-bottom: 26px;

  gap: 20px;
}

.top h1 {
  margin: 0;

  font-size: 25px;
}

.sub {
  color: var(--muted);

  font-size: 13px;

  margin-top: 7px;
}


/* =========================
   PROFILE
   ========================= */

.profile-wrap {
  position: relative;

  display: flex;

  align-items: center;

  justify-content: flex-end;
}

.profile-button {
  width: 42px;

  height: 42px;

  border-radius: 50%;

  border: 1px solid #343747;

  background:
    linear-gradient(
      145deg,
      #1b1e29,
      #11131a
    );

  color: #cfd1dc;

  display: grid;

  place-items: center;

  cursor: pointer;

  transition:
    transform .18s ease,
    border-color .18s ease,
    background .18s ease,
    box-shadow .18s ease;
}

.profile-button:hover {
  transform: translateY(-1px);

  border-color: var(--purple);

  background: #19162a;

  box-shadow:
    0 8px 25px rgba(0, 0, 0, .3),
    0 0 0 3px rgba(124, 77, 255, .08);
}

.profile-button svg {
  width: 21px;

  height: 21px;
}

.profile-card {
  width: 310px;

  background: #12141c;

  border: 1px solid #303342;

  border-radius: 15px;

  box-shadow:
    0 25px 80px rgba(0, 0, 0, .55);

  padding: 20px;

  animation: profileIn .16s ease;
}

@keyframes profileIn {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.profile-header {
  display: flex;

  align-items: center;

  gap: 12px;

  margin-bottom: 18px;
}

.profile-avatar {
  width: 44px;

  height: 44px;

  border-radius: 50%;

  background:
    linear-gradient(
      145deg,
      #926cff,
      #6840ea
    );

  display: grid;

  place-items: center;
}

.profile-avatar svg {
  width: 23px;

  height: 23px;
}

.profile-title {
  font-size: 15px;

  font-weight: 700;
}

.profile-role {
  font-size: 11px;

  color: var(--muted);

  margin-top: 3px;
}

.profile-row {
  padding: 12px 0;

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

.profile-label {
  color: var(--muted);

  font-size: 11px;

  margin-bottom: 5px;
}

.profile-value {
  color: #f2f2f7;

  font-size: 13px;

  word-break: break-word;
}

.profile-actions {
  margin-top: 14px;
}

.profile-actions .btn {
  width: 100%;
}


/* =========================
   BUTTONS
   ========================= */

.btn {
  background: var(--purple);

  border: 0;

  color: #fff;

  border-radius: 8px;

  padding: 11px 16px;

  font-weight: 600;

  cursor: pointer;

  transition:
    transform .15s ease,
    opacity .15s ease,
    background .15s ease;
}

.btn:hover {
  opacity: .9;
}

.btn:active {
  transform: scale(.97);
}

.btn.secondary {
  background: #1b1d26;

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

.btn.danger {
  background: #3a1722;

  border: 1px solid #5e2637;

  color: #ff9caf;
}


/* =========================
   DASHBOARD CARDS
   ========================= */

.cards {
  display: grid;

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

  gap: 14px;
}

.card,
.table {
  background:
    rgba(17, 19, 26, .9);

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

  border-radius: 11px;
}

.card {
  padding: 19px;
}

.card .value {
  font-size: 25px;

  font-weight: 700;

  margin: 11px 0 3px;
}

.label {
  font-size: 12px;

  color: #aeb1c1;
}


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

.table {
  margin-top: 20px;

  overflow: hidden;
}

.tablehead,
.row {
  display: grid;

  grid-template-columns:
    1.4fr
    1.2fr
    1fr
    1fr
    1fr;

  gap: 10px;

  padding: 15px 18px;

  align-items: center;
}

.tablehead {
  border-bottom: 1px solid var(--line);

  font-size: 11px;

  color: var(--muted);

  text-transform: uppercase;
}

.row {
  border-bottom: 1px solid #1d2028;

  font-size: 13px;

  min-height: 52px;
}

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

.row > span {
  min-width: 0;

  overflow-wrap: anywhere;
}

.empty {
  text-align: center;

  padding: 60px;

  color: var(--muted);
}


/* =========================
   STATUS TAG
   ========================= */

.tag {
  color: var(--green);

  background: #123326;

  padding: 5px 8px;

  border-radius: 12px;

  font-size: 11px;

  font-style: normal;

  display: inline-block;
}


/* =========================
   AUTH
   ========================= */

.auth {
  min-height: 100vh;

  display: grid;

  place-items: center;

  padding: 20px;
}

.authbox {
  width: 410px;

  max-width: 100%;

  background: var(--panel);

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

  border-radius: 14px;

  padding: 32px;

  box-shadow:
    0 20px 80px #0008;
}

.authbox h1 {
  margin-top: 22px;
}

.input {
  width: 100%;

  background: #0c0e13;

  color: #fff;

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

  padding: 12px;

  border-radius: 8px;

  margin: 7px 0 14px;

  outline: none;

  transition:
    border-color .18s ease,
    box-shadow .18s ease;
}

.input:focus {
  border-color: var(--purple);

  box-shadow:
    0 0 0 3px
    rgba(124, 77, 255, .12);
}

.formlabel {
  font-size: 12px;

  color: #b5b7c4;
}

.switch {
  color: #9b7cff;

  cursor: pointer;

  text-align: center;

  margin-top: 16px;

  font-size: 13px;
}


/* =========================
   TOAST
   ========================= */

.toast {
  position: fixed;

  right: 24px;

  bottom: 24px;

  background: #1b1d26;

  border: 1px solid #633d83;

  padding: 14px 18px;

  border-radius: 9px;

  display: flex;

  align-items: center;

  gap: 10px;

  z-index: 1000;

  box-shadow:
    0 15px 50px #0008;

  min-width: 260px;

  animation: toastIn .18s ease;
}

@keyframes toastIn {
  from {
    opacity: 0;

    transform: translateY(8px);
  }

  to {
    opacity: 1;

    transform: translateY(0);
  }
}

.toast-icon {
  display: grid;

  place-items: center;

  width: 25px;

  height: 25px;

  min-width: 25px;

  border-radius: 50%;

  background: var(--purple);

  color: #fff;

  font-weight: 700;
}

.toast-icon.success {
  background: var(--green);

  color: #07150f;
}

.toast-icon.error {
  background: var(--red);

  color: #21060c;
}

.toast strong {
  display: block;

  font-size: 13px;
}

.toast small {
  display: block;

  color: #aeb1c1;

  margin-top: 3px;
}


/* =========================
   MODAL
   ========================= */

h2 {
  margin-top: 0;
}

.modalback {
  position: fixed;

  inset: 0;

  background: #05060a99;

  backdrop-filter: blur(7px);

  display: grid;

  place-items: center;

  padding: 20px;

  z-index: 10;
}

.modal {
  width: min(540px, 100%);

  background: #12141c;

  border: 1px solid #303342;

  border-radius: 16px;

  box-shadow:
    0 24px 90px #000b;

  overflow: hidden;

  animation: modalIn .18s ease;
}

@keyframes modalIn {
  from {
    opacity: 0;

    transform: scale(.97) translateY(8px);
  }

  to {
    opacity: 1;

    transform: scale(1) translateY(0);
  }
}

.modalhead {
  display: flex;

  justify-content: space-between;

  align-items: flex-start;

  padding: 24px 26px;

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

.modalhead h2 {
  margin: 0;

  font-size: 20px;
}

.close {
  border: 0;

  background: none;

  color: #aeb1c1;

  font-size: 22px;

  cursor: pointer;

  line-height: 1;
}

.close:hover {
  color: #fff;
}

.modalbody {
  padding: 24px 26px;
}

.grid2 {
  display: grid;

  grid-template-columns:
    1fr 1fr;

  gap: 15px;
}

.modalfoot {
  display: flex;

  justify-content: flex-end;

  gap: 10px;

  padding: 18px 26px;

  background: #0e1016;

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

select.input {
  appearance: none;
}

.hint {
  font-size: 11px;

  color: var(--muted);

  margin-top: -8px;

  margin-bottom: 14px;
}


/* =========================
   PROFILE DROPDOWN
   ========================= */

.profile-popover {
  position: absolute;

  right: 0;

  top: calc(100% + 10px);

  z-index: 50;
}


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

@media (max-width: 1000px) {
  .cards {
    grid-template-columns:
      repeat(2, 1fr);
  }
}

@media (max-width: 800px) {
  .side {
    width: 70px;

    padding: 18px 10px;
  }

  .brand div:not(.logo) {
    display: none;
  }

  .nav button {
    justify-content: center;

    padding: 11px;
  }

  .nav button span {
    display: none;
  }

  .nav-icon {
    width: 18px;

    height: 18px;

    min-width: 18px;

    min-height: 18px;

    flex-basis: 18px;
  }

  .status {
    font-size: 0;

    text-align: center;
  }

  .status .dot {
    margin-right: 0;
  }

  .status small {
    display: none;
  }

  .main {
    padding: 20px;
  }

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

  .table {
    overflow-x: auto;
  }

  .tablehead,
  .row {
    min-width: 720px;
  }

  .profile-card {
    width: min(310px, calc(100vw - 40px));
  }
}

@media (max-width: 520px) {
  .top {
    align-items: flex-start;
  }

  .top h1 {
    font-size: 21px;
  }

  .cards {
    grid-template-columns: 1fr;
  }

  .grid2 {
    grid-template-columns: 1fr;
  }

  .modalhead,
  .modalbody,
  .modalfoot {
    padding-left: 18px;

    padding-right: 18px;
  }

  .toast {
    right: 12px;

    left: 12px;

    bottom: 12px;

    min-width: 0;
  }
}