:root {
  --font-body: 14px;
  --font-h3: 24px;
  --app-max-width: 1360px;
  --background-color: rgb(245, 245, 245);
  --background-color-white: #ffffff;
  --login-panel-bg: rgb(255, 255, 255);
  --app-header-bg: rgba(12, 12, 12, 0.8);
  --app-header-text-color: #d9d9d9;
  --text-color: #262626;
  --card-border-color: rgba(0, 0, 0, 0);
  --card-shadow-color: rgba(0, 0, 0, 0.16);
  --card-shadow-extend-color: rgba(0, 0, 0, 0.16);
  --color-gray-4: #f0f0f0;
  --color-gray-5: #d9d9d9;
  --color-gray-7: #8c8c8c;
  --color-gray-8: #595959;
  --color-gray-10: #262626;
  --color-blue-5: #4096ff;
  --color-blue-6: #1677ff;
  --color-red-5: #ff4d4f;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  min-height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background-color: var(--background-color);
  color: var(--text-color);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans",
    sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
}

button,
input {
  font: inherit;
}

.global-app-container {
  max-width: var(--app-max-width);
  height: 100svh;
  margin: auto;
}

.app-header-wrapper {
  box-shadow: 0 2px 4px 0 var(--card-shadow-color);
  background-image: url("./assets/side.png");
  background-color: var(--app-header-bg);
  backdrop-filter: saturate(180%) blur(20px);
  color: var(--app-header-text-color);
  width: 100%;
  height: 64px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
}

.app-header-content {
  max-width: var(--app-max-width);
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 64px;
}

.btns {
  display: flex;
  align-items: center;
}

.logo-link {
  margin-right: 12px;
  text-decoration: none;
}

.logo {
  cursor: pointer;
  display: flex;
  align-items: center;
}

.logo img {
  display: block;
  height: 18px;
  width: auto;
}

.header-spacer {
  height: 64px;
}

.main-content {
  width: 100%;
}

.breadcrumbs {
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 20px 0;
  color: rgba(0, 0, 0, 0.88);
}

.breadcrumb-link {
  color: rgba(0, 0, 0, 0.88);
}

.breadcrumb-separator {
  color: rgba(0, 0, 0, 0.45);
}

.dashboard-skeleton {
  display: grid;
  grid-template-columns: repeat(24, minmax(0, 1fr));
  gap: 24px;
  padding-bottom: 20px;
}

.span-6 {
  grid-column: span 6;
}

.span-8 {
  grid-column: span 8;
}

.span-16 {
  grid-column: span 16;
}

.span-24 {
  grid-column: span 24;
}

.skeleton-card {
  min-height: 100px;
  border: 1px solid var(--card-border-color);
  border-radius: 6px;
  background-color: var(--background-color-white);
  box-shadow: 0 1px 2px 1px var(--card-shadow-color);
  padding: 24px;
  overflow: hidden;
  position: relative;
}

.skeleton-card[data-rows="4"] {
  min-height: 164px;
}

.skeleton-card[data-rows="6"] {
  min-height: 226px;
}

.skeleton-card[data-rows="9"] {
  min-height: 292px;
}

.skeleton-card::before,
.skeleton-card::after {
  content: "";
  display: block;
  height: 14px;
  border-radius: 100px;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.06) 25%, rgba(0, 0, 0, 0.15) 37%, rgba(0, 0, 0, 0.06) 63%);
  background-size: 400% 100%;
  animation: skeleton-loading 1.4s ease infinite;
}

.skeleton-card::before {
  width: 38%;
  margin-bottom: 20px;
}

.skeleton-card::after {
  width: 100%;
  height: calc(100% - 58px);
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.06) 0,
      rgba(0, 0, 0, 0.06) 14px,
      transparent 14px,
      transparent 34px
    );
  opacity: 0.92;
}

.login-page-container {
  position: fixed;
  inset: 0;
  z-index: 30;
  background-color: #29292957;
  backdrop-filter: saturate(120%) blur(10px);
  transition: all 0.8s;
  overflow-y: auto;
  overflow-x: hidden;
}

.login-page-body {
  padding: 12px;
  padding-top: 84px;
  max-width: 1260px;
  margin: 0 auto;
  min-height: 100%;
  position: relative;
}

.main-flex-center {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: left;
  padding: 84px 12px 24px;
}

.login-shell {
  width: 100%;
  max-width: 420px;
  min-width: 0;
  height: auto;
}

.card-panel {
  border: 1px solid var(--card-border-color);
  border-radius: 6px;
  background-color: var(--background-color-white);
  box-shadow: 0 1px 2px 1px var(--card-shadow-color);
  display: flex;
  flex-direction: column;
  position: relative;
  padding: 16px;
  transition:
    box-shadow 0.4s ease-in-out,
    transform 0.4s ease,
    border 0.4s ease;
}

.card-panel:hover {
  box-shadow:
    0 4px 8px 0 var(--card-shadow-extend-color),
    0 1px 2px 1px var(--card-shadow-extend-color);
}

.card-panel-content {
  flex-grow: 1;
  color: var(--text-color);
  position: relative;
  overflow: hidden;
  word-break: break-all;
}

.login-panel {
  margin: 0 auto;
  width: 100%;
  background-color: var(--login-panel-bg);
}

.login-shell.logging .login-panel {
  transform: scale(0.94);
  border: 2px solid var(--color-blue-5);
  box-shadow: 0 0 20px rgba(28, 120, 207, 0.3);
}

.login-panel-body {
  padding: 28px 24px;
  min-height: 322px;
}

.login-title {
  font-size: var(--font-h3);
  line-height: 1.35;
  font-weight: 600;
  margin: 0 0 20px;
  color: rgba(0, 0, 0, 0.88);
}

.login-subtitle {
  margin: 0 0 20px;
  color: rgba(0, 0, 0, 0.88);
  font-size: 14px;
  line-height: 1.5715;
}

.account-input-container input:-webkit-autofill {
  -webkit-text-fill-color: var(--color-gray-8) !important;
  -webkit-box-shadow: 0 0 0 1000px transparent inset !important;
  background-color: transparent !important;
  background-image: none;
  transition: background-color 99999s ease-in-out 0s;
}

.input-affix {
  width: 100%;
  min-height: 40px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  background-color: #fff;
  display: flex;
  align-items: center;
  padding: 0 11px;
  transition:
    border-color 0.2s,
    box-shadow 0.2s,
    background 0.2s;
}

.input-affix:hover {
  border-color: var(--color-blue-5);
}

.input-affix:focus-within {
  border-color: var(--color-blue-5);
  box-shadow: 0 0 0 2px rgba(5, 145, 255, 0.1);
  outline: 0;
}

.input-affix:focus-within .input-icon {
  color: rgba(0, 0, 0, 0.6);
}

.input-affix input {
  width: 100%;
  min-width: 0;
  height: 38px;
  border: 0;
  outline: 0;
  background-color: transparent;
  caret-color: rgba(0, 0, 0, 0.88);
  color: rgba(0, 0, 0, 0.88);
  padding: 0;
  line-height: 38px;
}

.input-affix input::placeholder {
  color: rgba(0, 0, 0, 0.25);
}

.input-affix input::selection {
  background: rgba(22, 119, 255, 0.22);
}

.input-icon {
  width: 14px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  margin-left: 4px;
  color: rgba(0, 0, 0, 0.45);
  transition: color 0.2s;
}

.input-icon svg {
  width: 14px;
  height: 14px;
  display: block;
  fill: currentColor;
}

.mt-20 {
  margin-top: 20px;
}

.login-actions {
  margin-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.mcsmanager-link {
  font-size: var(--font-body);
  color: var(--color-gray-7);
  text-align: right;
  line-height: 1.5715;
}

.mcsmanager-link a {
  color: var(--color-gray-7);
  text-decoration: underline;
}

.primary-button {
  min-width: 95px;
  height: 40px;
  padding: 6.4px 15px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: var(--color-blue-6);
  color: #fff;
  box-shadow: 0 2px 0 rgba(5, 145, 255, 0.1);
  cursor: pointer;
  transition:
    background 0.2s,
    border-color 0.2s,
    color 0.2s,
    box-shadow 0.2s;
}

.primary-button:hover {
  background: var(--color-blue-5);
}

.primary-button:active {
  background: #0958d9;
}

.primary-button:focus-visible {
  outline: 0;
  box-shadow:
    0 0 0 2px rgba(5, 145, 255, 0.1),
    0 2px 0 rgba(5, 145, 255, 0.1);
}

.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.75;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.loading-icon {
  width: 62px;
  height: 62px;
  border: 5px solid rgba(22, 119, 255, 0.18);
  border-top-color: var(--color-blue-6);
  border-radius: 50%;
  animation:
    spin 0.9s linear infinite,
    opacityAnimation 0.4s;
}

.message-toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  min-width: 150px;
  max-width: calc(100vw - 32px);
  padding: 9px 16px;
  border-radius: 8px;
  background: #fff;
  color: rgba(0, 0, 0, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow:
    0 6px 16px 0 rgba(0, 0, 0, 0.08),
    0 3px 6px -4px rgba(0, 0, 0, 0.12),
    0 9px 28px 8px rgba(0, 0, 0, 0.05);
  font-size: 14px;
  line-height: 1.5715;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.message-toast.show {
  opacity: 1;
  transform: translate(-50%, 4px);
}

.message-toast::before {
  content: "!";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  border-radius: 50%;
  background: var(--color-red-5);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 14px;
}

.glitch-wrapper {
  position: relative;
  overflow: hidden;
}

.glitch {
  position: relative;
  font-weight: 600;
  animation: glitch-trigger 4s infinite;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.glitch::before {
  color: #ff0040;
  animation: glitch-anim-1 4s infinite;
}

.glitch::after {
  color: #00ffff;
  animation: glitch-anim-2 4s infinite;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes skeleton-loading {
  0% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0 50%;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes opacityAnimation {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@keyframes glitch-trigger {
  0%,
  96% {
    transform: translate(0);
  }
  97%,
  100% {
    transform: translate(-1px, 1px);
  }
}

@keyframes glitch-anim-1 {
  0%,
  96% {
    transform: translate(0);
    opacity: 0;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  }
  97% {
    transform: translate(-2px, -2px);
    opacity: 0.7;
    clip-path: polygon(0 0, 100% 0, 100% 35%, 0 35%);
  }
  98% {
    transform: translate(2px, 1px);
    opacity: 0.8;
    clip-path: polygon(0 35%, 100% 35%, 100% 70%, 0 70%);
  }
  99% {
    transform: translate(-1px, 2px);
    opacity: 0.9;
    clip-path: polygon(0 70%, 100% 70%, 100% 100%, 0 100%);
  }
  100% {
    transform: translate(0);
    opacity: 0;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  }
}

@keyframes glitch-anim-2 {
  0%,
  96% {
    transform: translate(0);
    opacity: 0;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  }
  97% {
    transform: translate(2px, 1px);
    opacity: 0.6;
    clip-path: polygon(0 0, 100% 0, 100% 25%, 0 25%);
  }
  98% {
    transform: translate(-2px, -1px);
    opacity: 0.7;
    clip-path: polygon(0 25%, 100% 25%, 100% 75%, 0 75%);
  }
  99% {
    transform: translate(1px, -2px);
    opacity: 0.8;
    clip-path: polygon(0 75%, 100% 75%, 100% 100%, 0 100%);
  }
  100% {
    transform: translate(0);
    opacity: 0;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  }
}

@media (max-width: 1470px) {
  .app-header-content,
  .global-app-container {
    margin-left: 25px;
    margin-right: 25px;
  }
}

@media (max-width: 992px) {
  html,
  body {
    overflow: auto;
  }

  .global-app-container {
    margin: 0 12px 60px;
    height: auto;
  }

  .app-header-wrapper {
    position: static;
    height: 60px;
    margin-top: 8px;
    border-radius: 6px;
    background-color: #000000b4;
    box-shadow: 0 1px 2px 1px var(--card-shadow-color);
  }

  .app-header-content {
    height: 60px;
    margin: 0 8px;
    justify-content: center;
  }

  .header-spacer,
  .main-content {
    display: none;
  }

  .login-page-container {
    position: static;
    background-color: transparent;
    backdrop-filter: none;
    overflow: visible;
  }

  .login-page-body,
  .main-flex-center {
    position: static;
    min-height: auto;
    padding: 0 12px 24px;
  }

  .login-shell {
    max-width: none;
  }
}

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

  .login-panel-body {
    padding: 24px 18px;
  }
}
