:root {
  color-scheme: light;
  --overlay: rgba(255, 255, 255, 0.4);
  --text: #141414;
  --muted: rgba(20, 20, 20, 0.6);
  --danger: #c1121f;
  --sidebar-width: 260px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
}

body {
  font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  background-color: #f5f5f5;
  color: var(--text);
}

body.dashboard {
  background-color: #ffffff;
}

.dashboard__content {
  margin-left: 260px;
  padding: 32px 40px;
  min-height: 100vh;
}

.dashboard__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.dashboard__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.chart-card {
  min-height: 360px;
}

.chart-card__body {
  width: 100%;
  min-height: 280px;
}

.dashboard__title {
  font-size: 1.4rem;
  letter-spacing: 0.12rem;
  text-transform: uppercase;
  font-weight: 500;
}

.panel {
  border: 1px solid rgba(20, 20, 20, 0.12);
  background-color: #ffffff;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.panel__title {
  font-size: 0.9rem;
  letter-spacing: 0.18rem;
  text-transform: uppercase;
  color: var(--muted);
}

.panel__body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 24px;
}

.form__group {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 24px;
}

.form__group[hidden] {
  display: none;
}

.form__field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form__field--full {
  grid-column: 1 / -1;
}

.social-media__list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

body.is-loading .social-media__list {
  opacity: 0;
  visibility: hidden;
}

body.is-loading .social-media__row {
  opacity: 0;
}

.social-media__row {
  border: 1px solid rgba(20, 20, 20, 0.12);
  padding: 14px 16px;
  display: grid;
  grid-template-columns: 56px minmax(0, 1.2fr) auto auto;
  gap: 16px;
  align-items: center;
}

.social-media__icon-placeholder {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.15));
}

.icon-button {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(20, 20, 20, 0.2);
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text);
}

.icon-button .material-symbols-outlined {
  font-size: 1.1rem;
}

.social-media__icon-placeholder--patreon {
  background-image: url("assets/icons/patreon.png");
}

.social-media__icon-placeholder--instagram {
  background-image: url("assets/icons/instagram.png");
}

.social-media__icon-placeholder--deviantart {
  background-image: url("assets/icons/deviantart.png");
}

.social-media__info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.social-media__name {
  font-size: 0.9rem;
  letter-spacing: 0.16rem;
  text-transform: uppercase;
  color: var(--text);
}

.social-media__meta {
  font-size: 0.85rem;
  color: var(--muted);
  word-break: break-all;
}


.toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  letter-spacing: 0.12rem;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
}

.toggle input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.toggle__track {
  width: 42px;
  height: 20px;
  background: rgba(193, 18, 31, 0.2);
  position: relative;
  border-radius: 999px;
}

.toggle__track::after {
  content: "";
  position: absolute;
  top: 1px;
  left: 1px;
  width: 16px;
  height: 16px;
  background: #c1121f;
  border-radius: 50%;
  transition: transform 0.2s ease;
}

.toggle input:checked + .toggle__track::after {
  transform: translateX(20px);
  background: #2f9e44;
}

.toggle input:checked + .toggle__track {
  background: rgba(47, 158, 68, 0.2);
}

@media (max-width: 900px) {
  .social-media__row {
    grid-template-columns: 1fr;
  }

  .social-media__icon-placeholder {
    width: 56px;
    height: 56px;
  }
}

.form__label {
  font-size: 0.75rem;
  letter-spacing: 0.12rem;
  text-transform: uppercase;
  color: var(--muted);
}

.form__input,
.form__select,
.form__textarea {
  border: 1px solid rgba(20, 20, 20, 0.2);
  background: transparent;
  padding: 10px 12px;
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--text);
  outline: none;
}

.form__textarea {
  resize: vertical;
}

.form__helper {
  font-size: 0.75rem;
  color: var(--muted);
}

.form__actions {
  display: flex;
  justify-content: flex-end;
}

.status__box {
  border: 1px solid rgba(20, 20, 20, 0.12);
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.status__label {
  font-size: 0.75rem;
  letter-spacing: 0.12rem;
  text-transform: uppercase;
  color: var(--muted);
}

.status__value {
  font-size: 0.85rem;
  color: var(--text);
}

.button {
  border: 1px solid rgba(20, 20, 20, 0.8);
  background: transparent;
  padding: 10px 18px;
  font-size: 0.85rem;
  letter-spacing: 0.18rem;
  text-transform: uppercase;
  color: var(--text);
  cursor: pointer;
}

.button:hover {
  background-color: rgba(255, 255, 255, 0.85);
}

.button[aria-disabled="true"] {
  opacity: 0.5;
  pointer-events: none;
}

.grok-result__media {
  border: 1px solid rgba(20, 20, 20, 0.12);
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}

.grok-result__media img,
.grok-result__media video {
  max-width: 100%;
  height: auto;
  display: block;
}

.table {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.table__row {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) minmax(220px, 1fr);
  gap: 16px;
  padding: 12px 0;
}

.table__row--users {
  grid-template-columns: minmax(200px, 1fr) minmax(220px, 1fr) 48px;
}

.table__row--four {
  grid-template-columns: minmax(220px, 1.4fr) minmax(160px, 1fr) minmax(120px, 0.7fr) minmax(140px, 0.8fr);
}

.table__row--five {
  grid-template-columns: minmax(220px, 1.4fr) minmax(160px, 1fr) minmax(120px, 0.7fr) minmax(140px, 0.8fr) 80px;
}

.table__row--header {
  padding-bottom: 8px;
}

.table__row--six {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.table__row--seven {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.table__row--eight {
  grid-template-columns: repeat(8, minmax(0, 1fr));
}

.spendings__grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.filters {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.filters--collapsed {
  display: none;
}

.filters__row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  align-items: end;
}

.filters__field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filters__field--wide {
  grid-column: span 2;
}

.filters__label {
  font-size: 0.75rem;
  letter-spacing: 0.12rem;
  text-transform: uppercase;
  color: var(--muted);
}

.filters__input {
  border: 1px solid rgba(20, 20, 20, 0.2);
  background: transparent;
  padding: 10px 12px;
  font-size: 0.85rem;
  font-family: "Montserrat", sans-serif;
  color: var(--text);
}

.filters__input::placeholder {
  color: rgba(20, 20, 20, 0.5);
}

.filters__actions {
  display: flex;
  justify-content: flex-end;
}

.upscaler {
  margin-bottom: 32px;
}

.panel.upscaler.upscaler--active {
  border: none;
  background: transparent;
  padding: 0;
}

.upscaler__body {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.upscaler__field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.upscaler__label {
  font-size: 0.75rem;
  letter-spacing: 0.12rem;
  text-transform: uppercase;
  color: var(--muted);
}

.upscaler__input {
  border: 1px solid rgba(20, 20, 20, 0.2);
  padding: 10px 12px;
  background: transparent;
  color: var(--text);
  font-size: 0.85rem;
}

.upscaler__canvas {
  display: flex;
  justify-content: center;
}

.upscaler__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 5;
}

.upscaler__backdrop.is-active {
  opacity: 1;
}

.upscaler__dropzone {
  width: 100%;
  min-height: 420px;
  border: 2px dashed rgba(20, 20, 20, 0.35);
  background: #f7f7f7;
  --seedvr-image: none;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
  z-index: 6;
}

.upscaler__file {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.upscaler__placeholder {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--muted);
  letter-spacing: 0.08rem;
  text-transform: uppercase;
}

.upscaler__placeholder .material-symbols-outlined {
  font-size: 48px;
}

.upscaler__preview-image {
  max-width: 100%;
  max-height: calc(100vh - 220px);
  display: block;
  object-fit: contain;
  width: auto;
  height: auto;
}

.upscaler__image-wrap {
  position: relative;
  display: none;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  max-height: calc(100vh - 220px);
  overflow: hidden;
}

.upscaler__download {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(20, 20, 20, 0.25);
  background: rgba(255, 255, 255, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  color: var(--text);
  text-decoration: none;
  z-index: 7;
}

.upscaler__download[aria-disabled="true"] {
  pointer-events: none;
  opacity: 0.6;
}

.upscaler__dropzone.has-result .upscaler__download {
  display: inline-flex;
}

.upscaler__dropzone.has-image .upscaler__placeholder {
  display: none;
}

.upscaler__dropzone.has-image .upscaler__preview-image {
  display: block;
}

.upscaler__dropzone.has-image .upscaler__image-wrap {
  display: inline-flex;
}

.upscaler__dropzone.has-image {
  border: none;
  background: transparent;
}

.upscaler__loader {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: transparent;
  z-index: 5;
  pointer-events: none;
}

.upscaler__dropzone.is-processing .upscaler__loader {
  display: flex;
}

.upscaler__dropzone.is-processing .upscaler__preview-image {
	opacity: 0;
	position: relative;
	z-index: 1;
}

.upscaler__dropzone.is-processing .upscaler__image-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--seedvr-image);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  filter: brightness(0.3) blur(10px);
  pointer-events: none;
  z-index: 2;
}

.upscaler__dot {
  width: 10px;
  height: 10px;
  background: #ffffff;
  display: inline-block;
  animation: upscalerDots 1s infinite ease-in-out;
}

.upscaler__dot:nth-child(2) {
  animation-delay: 0.2s;
}

.upscaler__dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes upscalerDots {
  0%,
  80%,
  100% {
    transform: scale(0.3);
    opacity: 0.4;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

.upscaler__footer {
  position: fixed;
  width: 600px;
  left: 50%;
  transform: translateX(-50%);
  bottom: 16px;
  background: #ffffff;
  border: 1px solid rgba(20, 20, 20, 0.12);
  z-index: 5;
  padding: 16px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
  z-index: 15;
}

.upscaler__footer > * {
  align-self: center;
}

.upscaler__footer-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 180px;
  justify-self: start;
}

.upscaler__footer .button {
  justify-self: center;
}

.upscaler__status {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0;
  justify-self: end;
  text-align: right;
}

.dashboard__actions {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.icon-button {
  border: 1px solid rgba(20, 20, 20, 0.8);
  background: transparent;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text);
}

.icon-button:hover {
  background-color: rgba(255, 255, 255, 0.85);
}

.spendings__currency-toggle {
  display: inline-flex;
  gap: 8px;
}

.spendings__currency-toggle .button.is-active {
  background-color: rgba(20, 20, 20, 0.1);
}

.spendings__total {
  font-size: 1.4rem;
  letter-spacing: 0.14rem;
  text-transform: uppercase;
  color: var(--text);
}

.spendings__api {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
}

.spendings__api-label {
  font-size: 0.65rem;
  letter-spacing: 0.12rem;
  text-transform: uppercase;
  color: var(--muted);
}

.spendings__api-total {
  font-size: 0.95rem;
  letter-spacing: 0.08rem;
  color: var(--text);
}

@media (max-width: 900px) {
  .spendings__grid {
    grid-template-columns: 1fr;
  }

  .filters__row {
    grid-template-columns: 1fr;
  }

  .filters__field--wide {
    grid-column: span 1;
  }

  .upscaler__dropzone {
    min-height: 300px;
  }

  .upscaler__footer {
    left: 16px;
    right: 16px;
    width: auto;
    grid-template-columns: 1fr;
    justify-items: stretch;
  }

  .upscaler__footer-group {
    width: 100%;
  }
}

.table__cell {
  font-size: 0.9rem;
  color: var(--text);
}

.table__cell--action {
  display: flex;
  justify-content: flex-end;
}

.table__icon-button {
  border: 1px solid rgba(20, 20, 20, 0.2);
  background: transparent;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.grok-gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  padding-bottom: 140px;
}

.grok-card {
  position: relative;
  border: 1px solid rgba(20, 20, 20, 0.12);
  background: #f5f5f5;
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.grok-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(12px);
  transition: filter 0.5s ease;
}

.grok-card.is-ready .grok-card__image {
  filter: none;
}

.grok-card__placeholder {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(20, 20, 20, 0.04), rgba(20, 20, 20, 0.12), rgba(20, 20, 20, 0.04));
  animation: grokShimmer 1.5s ease-in-out infinite;
}

.grok-card.is-ready .grok-card__placeholder {
  display: none;
}

.grok-card__download {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(20, 20, 20, 0.4);
  background: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--text);
}

.grok-card__download[aria-disabled="true"] {
  opacity: 0.4;
  pointer-events: none;
}

.grok-composer {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  width: min(900px, 92vw);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(20, 20, 20, 0.2);
  padding: 12px 16px;
  background: #ffffff;
  z-index: 20;
}

.grok-composer__menu {
  position: absolute;
  bottom: 72px;
  left: 16px;
  display: grid;
  gap: 6px;
  padding: 10px;
  background: #ffffff;
  border: 1px solid rgba(20, 20, 20, 0.2);
  z-index: 25;
}


.grok-composer__menu[aria-hidden="true"] {
  display: none;
}

.grok-composer__option {
  border: 1px solid rgba(20, 20, 20, 0.2);
  background: transparent;
  padding: 6px 10px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08rem;
  cursor: pointer;
}

.grok-composer__option.is-active {
  border-color: rgba(20, 20, 20, 0.8);
}

.grok-composer__icon {
  border: 1px solid rgba(20, 20, 20, 0.2);
  background: transparent;
  min-width: 64px;
  height: 58px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
}

.grok-composer__label {
  font-size: 0.7rem;
  letter-spacing: 0.12rem;
  text-transform: uppercase;
  color: var(--muted);
}

.grok-composer__input {
  position: relative;
  display: flex;
  align-items: center;
  border: 1px solid rgba(20, 20, 20, 0.2);
  padding: 0 44px 0 12px;
}

.grok-composer__textarea {
  border: none;
  width: 100%;
  resize: none;
  font-family: inherit;
  font-size: 0.95rem;
  padding: 10px 0;
  outline: none;
  background: transparent;
}

.grok-composer__send {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: 1px solid rgba(20, 20, 20, 0.2);
  background: transparent;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

@keyframes grokShimmer {
  0% {
    opacity: 0.4;
  }
  50% {
    opacity: 0.9;
  }
  100% {
    opacity: 0.4;
  }
}

@media (max-width: 860px) {
  .dashboard__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .grok-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .grok-gallery {
    grid-template-columns: 1fr;
  }

  .grok-composer {
    grid-template-columns: 1fr;
  }

  .grok-composer__icon {
    width: 100%;
  }
}

.table__cell--muted {
  color: var(--muted);
}

.table__cell--api {
  display: flex;
  align-items: center;
  gap: 8px;
}

.table__copy {
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
}

.table__copy .material-symbols-outlined {
  font-size: 1rem;
}

.table__cell--header {
  text-align: left;
  background: none;
  border: none;
  padding: 0;
  font-size: 0.8rem;
  letter-spacing: 0.14rem;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
}

.table__cell--active {
  color: var(--text);
}

.table__cell--header::after {
  content: "";
  margin-left: 8px;
  font-size: 0.7rem;
  letter-spacing: 0;
}

.table__cell--header[data-sort-direction='asc']::after {
  content: "A-Z";
}

.table__cell--header[data-sort-direction='desc']::after {
  content: "Z-A";
}

.table__divider {
  height: 1px;
  background-color: rgba(20, 20, 20, 0.2);
}

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  text-align: center;
  padding: 24px;
  padding-bottom: 120px;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background-image: url("assets/brand/images/Wallpaper_1.jpg");
  background-size: cover;
  background-position: center;
  filter: saturate(0.9) contrast(1.05);
  opacity: 0;
  z-index: 0;
  pointer-events: none;
}

.hero--loaded .hero__bg {
  animation: heroFade 3.2s ease-in-out forwards;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: var(--overlay);
  z-index: 1;
  pointer-events: none;
}

.hero__watermark {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  opacity: 0.85;
}

.hero__mark {
  width: min(70vw, 520px);
  max-width: 100%;
  height: auto;
  display: block;
}

.hero--login {
  justify-content: center;
  padding-bottom: 48px;
}

.hero__panel {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: center;
  width: min(90vw, 420px);
  padding: 32px;
  background-color: rgba(255, 255, 255, 0.7);
}

.login {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.login__field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.login__label {
  font-size: 0.9rem;
  letter-spacing: 0.1rem;
  text-transform: uppercase;
  color: var(--muted);
}

.login__input {
  border: 1px solid rgba(20, 20, 20, 0.6);
  background: transparent;
  padding: 12px 14px;
  font-size: 1rem;
  outline: none;
}

.login__input:focus {
  border-color: rgba(20, 20, 20, 0.9);
}
.login__submit {
  margin-top: 8px;
  border: 1px solid rgba(20, 20, 20, 0.8);
  background: transparent;
  padding: 12px 16px;
  font-size: 0.95rem;
  letter-spacing: 0.2rem;
  text-transform: uppercase;
  color: var(--text);
  cursor: pointer;
}

.login__error {
  min-height: 1.2rem;
  font-size: 0.9rem;
  color: var(--danger);
  text-align: left;
}

.login__submit:hover {
  background-color: rgba(255, 255, 255, 0.85);
}

.hero__tagline {
  position: relative;
  z-index: 2;
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  font-weight: 300;
  letter-spacing: 0.2rem;
  text-transform: uppercase;
  color: var(--muted);
}

.hero__links {
  position: absolute;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  z-index: 2;
  opacity: 0;
  visibility: hidden;
}

body.is-loading .hero__links {
  opacity: 0;
  visibility: hidden;
}

.hero--loaded .hero__links {
  visibility: visible;
  animation: heroFade 3.2s ease-in-out forwards;
}

.hero__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border: none;
  background-color: transparent;
  text-decoration: none;
  transition: transform 0.2s ease;
}

.hero__icon {
  width: 56px;
  height: 56px;
  display: block;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  opacity: 0;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0));
}

.hero--loaded .hero__links .hero__icon {
  animation: heroIconFade 3.2s ease-in-out forwards;
}

@keyframes heroFade {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@keyframes heroIconFade {
  0% {
    opacity: 0;
    filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0));
  }
  100% {
    opacity: 1;
    filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.18));
  }
}

.hero__icon--patreon {
  background-image: url("assets/icons/patreon.png");
}

.hero__icon--instagram {
  background-image: url("assets/icons/instagram.png");
}

.hero__icon--deviantart {
  background-image: url("assets/icons/deviantart.png");
}

.hero__link:hover {
  transform: translateY(-2px);
}

@media (max-width: 640px) {
  .hero__links {
    bottom: 14px;
    gap: 10px;
  }

  .hero__link {
    width: 64px;
    height: 64px;
  }

  .hero__icon {
    width: 48px;
    height: 48px;
  }
}

@media (max-width: 640px) {
  .hero__mark {
    width: min(78vw, 360px);
  }
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 260px;
  background-color: #f2f2f2;
  display: flex;
  flex-direction: column;
  padding: 24px 20px;
  gap: 24px;
}

.sidebar__nav {
  flex: 1;
}

.sidebar__profile {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
}

.profile {
  border: 1px solid rgba(20, 20, 20, 0.15);
  background: transparent;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  color: var(--text);
}

.profile__avatar {
  position: relative;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(20, 20, 20, 0.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--muted);
}

.profile__avatar .material-symbols-outlined {
  font-size: 1.2rem;
}

.profile__status {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 10px;
  height: 10px;
  border: 2px solid #f2f2f2;
  border-radius: 50%;
  background-color: #2f9e44;
}

.profile__status[data-status='busy'] {
  background-color: #c1121f;
}

.profile__name {
  flex: 1;
  font-size: 0.85rem;
  letter-spacing: 0.08rem;
  text-transform: uppercase;
}

.profile__chevron {
  font-size: 1.1rem;
  transition: transform 0.2s ease;
}

.profile.is-open .profile__chevron {
  transform: rotate(180deg);
}

.profile__menu {
  display: none;
  flex-direction: column;
  gap: 6px;
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  min-width: 180px;
  padding: 10px 12px;
  background-color: #f2f2f2;
  border: 1px solid rgba(20, 20, 20, 0.15);
  z-index: 5;
}

.profile__menu.is-open {
  display: flex;
}

.profile__option {
  border: none;
  background: transparent;
  padding: 6px 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  letter-spacing: 0.1rem;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
}

.profile__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  background-color: #2f9e44;
}

.profile__dot--busy {
  background-color: #c1121f;
}

.chat {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 20;
}

.chat__toggle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid rgba(20, 20, 20, 0.2);
  background-color: #f2f2f2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.log {
  position: fixed;
  right: 96px;
  bottom: 24px;
  z-index: 20;
}

.log__toggle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid rgba(20, 20, 20, 0.2);
  background-color: #f2f2f2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.log__panel {
  position: absolute;
  right: 0;
  bottom: 72px;
  width: 360px;
  height: 320px;
  min-width: 320px;
  min-height: 240px;
  max-width: calc(100vw - var(--sidebar-width) - 48px);
  max-height: 520px;
  background-color: #ffffff;
  border: 1px solid rgba(20, 20, 20, 0.2);
  display: none;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
}

.log__panel.is-open {
  display: flex;
}

.log__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(20, 20, 20, 0.12);
}

.log__actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.log__title {
  font-size: 0.85rem;
  letter-spacing: 0.12rem;
  text-transform: uppercase;
}

.log__close,
.log__button {
  border: none;
  background: transparent;
  cursor: pointer;
}

.log__body {
  flex: 1;
  padding: 12px;
  overflow-y: auto;
  font-size: 0.8rem;
  white-space: pre-wrap;
  color: var(--muted);
}

.chat__panel {
  position: absolute;
  right: 0;
  bottom: 72px;
  width: 400px;
  height: 420px;
  min-width: 400px;
  min-height: 440px;
  max-width: calc(100vw - var(--sidebar-width) - 48px);
  max-height: 640px;
  background-color: #ffffff;
  border: 1px solid rgba(20, 20, 20, 0.2);
  display: none;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
}

.chat__resize {
  position: absolute;
  top: 0;
  left: 0;
  width: 22px;
  height: 22px;
  border: none;
  background: transparent;
  cursor: nwse-resize;
}

.chat__resize::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 6px;
  width: 8px;
  height: 8px;
  border-top: 2px solid rgba(20, 20, 20, 0.35);
  border-left: 2px solid rgba(20, 20, 20, 0.35);
}

.chat__panel.is-open {
  display: flex;
}

.chat__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(20, 20, 20, 0.12);
}

.chat__title {
  font-size: 0.85rem;
  letter-spacing: 0.12rem;
  text-transform: uppercase;
}

.chat__close {
  border: none;
  background: transparent;
  cursor: pointer;
}

.chat__search {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(20, 20, 20, 0.08);
}

.chat__search input {
  width: 100%;
  border: 1px solid rgba(20, 20, 20, 0.2);
  background: transparent;
  padding: 8px 10px;
  font-size: 0.85rem;
  outline: none;
}

.chat__body {
  display: grid;
  grid-template-columns: minmax(140px, 180px) minmax(220px, 1fr);
  height: 100%;
  min-height: 0;
}

.chat__users {
  border-right: 1px solid rgba(20, 20, 20, 0.08);
  overflow-y: auto;
}

.chat__user {
  width: 100%;
  border: none;
  background: transparent;
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.chat__user.is-active {
  background-color: rgba(20, 20, 20, 0.06);
}

.chat__user-name {
  font-size: 0.8rem;
  color: var(--text);
}

.chat__user-status {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.chat__status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #a0a0a0;
}

.chat__status-dot[data-status='online'] {
  background-color: #2f9e44;
}

.chat__status-dot[data-status='busy'] {
  background-color: #c1121f;
}

.chat__messages {
  display: flex;
  flex-direction: column;
  min-height: 220px;
  flex: 1;
  min-height: 0;
}

.chat__history {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}

.chat__bubble {
  max-width: 80%;
  padding: 8px 10px;
  border: 1px solid rgba(20, 20, 20, 0.2);
  font-size: 0.8rem;
  line-height: 1.4;
}

.chat__bubble--me {
  margin-left: auto;
  background-color: rgba(20, 20, 20, 0.06);
}

.chat__composer {
  border-top: 1px solid rgba(20, 20, 20, 0.12);
  padding: 10px;
  display: flex;
  gap: 8px;
  min-height: 64px;
  flex-shrink: 0;
  flex-wrap: nowrap;
}

.chat__composer input {
  flex: 1;
  border: 1px solid rgba(20, 20, 20, 0.2);
  background: transparent;
  padding: 8px 10px;
  font-size: 0.85rem;
  outline: none;
  min-width: 220px;
  flex-basis: 220px;
}

.chat__send {
  border: 1px solid rgba(20, 20, 20, 0.6);
  background: transparent;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.chat__send .material-symbols-outlined {
  font-size: 1rem;
}

@media (max-width: 640px) {
  .chat {
    right: 16px;
    bottom: 16px;
  }

  .log {
    right: 88px;
    bottom: 16px;
  }

  .chat__panel {
    width: calc(100vw - 32px);
    height: calc(100vh - 140px);
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 140px);
  }

  .log__panel {
    width: calc(100vw - 32px);
    height: 40vh;
    max-width: calc(100vw - 32px);
  }

  .chat__body {
    grid-template-columns: 1fr;
  }

  .chat__users {
    max-height: 120px;
  }
}

.sidebar__header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.sidebar__logo {
  width: 140px;
  height: auto;
}

.sidebar__title {
  font-size: 0.75rem;
  letter-spacing: 0.16rem;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
  max-width: 140px;
}

.sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar__link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-size: 0.95rem;
  letter-spacing: 0.12rem;
  text-transform: uppercase;
  padding: 8px 0;
}

.sidebar__link--toggle {
  background: none;
  border: none;
  width: 100%;
  justify-content: space-between;
  padding: 8px 0;
  font-family: inherit;
}

.sidebar__icon {
  width: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: currentColor;
}

.sidebar__chevron {
  margin-left: auto;
  font-size: 1.1rem;
  transition: transform 0.2s ease;
}

.sidebar__link--toggle.is-open .sidebar__chevron {
  transform: rotate(180deg);
}

.sidebar__submenu {
  display: none;
  flex-direction: column;
  gap: 2px;
  padding: 0 0 4px 26px;
  position: relative;
}

.sidebar__submenu.is-open {
  display: flex;
}

.sidebar__submenu.is-open::before {
  content: "";
  position: absolute;
  left: 10px;
  top: -2px;
  bottom: 2px;
  width: 1px;
  background: rgba(20, 20, 20, 0.25);
}

.sidebar__submenu.is-open::after {
  content: "";
  position: absolute;
  left: 10px;
  top: 9px;
  width: 14px;
  height: 1px;
  background: rgba(20, 20, 20, 0.25);
}

.sidebar__sublink {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.12rem;
  text-transform: uppercase;
  padding: 2px 0;
  line-height: 1.2;
  position: relative;
}

.sidebar__sublink::before {
  content: "";
  position: absolute;
  left: -16px;
  top: 50%;
  width: 12px;
  height: 1px;
  background: rgba(20, 20, 20, 0.25);
  transform: translateY(-50%);
}

.sidebar__sublabel {
  font-size: 0.7rem;
  letter-spacing: 0.14rem;
  text-transform: uppercase;
  color: rgba(20, 20, 20, 0.45);
  padding-top: 6px;
}

.sidebar__sublink--active {
  color: var(--text);
  font-weight: 500;
}

.sidebar__link--active {
  font-weight: 700;
}

@media (max-width: 900px) {
  .sidebar {
    width: 220px;
    padding: 20px 16px;
  }

  .sidebar__logo {
    width: 120px;
  }

  :root {
    --sidebar-width: 220px;
  }

  .dashboard__content {
    margin-left: 220px;
    padding: 28px 24px;
  }
}

@media (max-width: 640px) {
  .sidebar {
    position: relative;
    width: 100%;
    height: auto;
    min-height: 100vh;
  }

  :root {
    --sidebar-width: 0px;
  }

  .sidebar__profile {
    margin-top: 16px;
  }

  .dashboard__content {
    margin-left: 0;
    padding: 24px 20px;
  }

  .table__row {
    grid-template-columns: 1fr;
  }

  .form__grid {
    grid-template-columns: 1fr;
  }

  .table__row--four {
    grid-template-columns: 1fr;
  }
}

.swal-popup {
  border-radius: 0;
  font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  padding: 24px 24px 20px;
}

.swal-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
}

.swal-form__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.swal-form__tools {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.swal-form__row {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) 160px 120px;
  gap: 12px;
  align-items: center;
}

.swal-form__row--header {
  font-size: 0.75rem;
  letter-spacing: 0.12rem;
  text-transform: uppercase;
  color: var(--muted);
}

.swal-form__cell {
  font-size: 0.85rem;
  color: var(--text);
}

.swal-popup {
  width: min(720px, 92vw);
}

.swal-form__row .swal-form__input[type="number"] {
  max-width: 140px;
}

.api-spend-toast-panel {
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  width: 100%;
  padding: 8px 10px;
  border: 1px solid rgba(20, 20, 20, 0.15);
  background: #ffffff;
  text-align: center;
  font-weight: 600;
  letter-spacing: 0.08rem;
  color: #d92d2d;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  z-index: 6;
}

.api-spend-toast-panel.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.swal-form__label {
  font-size: 0.75rem;
  letter-spacing: 0.12rem;
  text-transform: uppercase;
  color: var(--muted);
}

.swal-form__input {
  border: 1px solid rgba(20, 20, 20, 0.6);
  background: transparent;
  padding: 10px 12px;
  font-size: 0.95rem;
  color: var(--text);
  outline: none;
}

.swal-button {
  border-radius: 0;
  border: 1px solid rgba(20, 20, 20, 0.8);
  background: transparent;
  padding: 10px 16px;
  font-size: 0.8rem;
  letter-spacing: 0.16rem;
  text-transform: uppercase;
  color: var(--text);
  cursor: pointer;
}

.swal-button--secondary {
  border-color: rgba(20, 20, 20, 0.4);
  color: var(--muted);
}
