:root {
  --bg-1: #061b1f;
  --bg-2: #0a2632;
  --bg-3: #113048;
  --glass: rgba(255, 255, 255, 0.09);
  --glass-strong: rgba(255, 255, 255, 0.2);
  --text: #ecf8ff;
  --muted: #a7c6d3;
  --line: rgba(255, 255, 255, 0.16);
  --ok: #57e9c2;
  --warn: #f5cb73;
  --bad: #ff7d9e;
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "Manrope", sans-serif;
  color: var(--text);
}

body {
  background: radial-gradient(1200px 700px at 15% 5%, #147f92 0%, transparent 60%),
    radial-gradient(900px 700px at 95% 90%, #2a4f8a 0%, transparent 55%),
    linear-gradient(145deg, var(--bg-1), var(--bg-2) 45%, var(--bg-3));
  overflow-x: hidden;
  animation: hueShift 18s ease-in-out infinite alternate;
}

.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.35;
  pointer-events: none;
  animation: floatOrb 12s ease-in-out infinite;
}

.orb-a {
  width: 320px;
  height: 320px;
  top: -80px;
  right: -40px;
  background: #5be2ce;
}

.orb-b {
  width: 280px;
  height: 280px;
  left: -60px;
  bottom: -50px;
  background: #6fc3ff;
  animation-delay: 1.8s;
}

.bg-noise {
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 4px 4px;
  opacity: 0.2;
  pointer-events: none;
}

#app {
  position: relative;
  z-index: 1;
  padding: 18px;
}

.auth-wrap {
  min-height: calc(100vh - 36px);
  display: grid;
  place-items: center;
}

.card {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 18px 35px rgba(0, 0, 0, 0.2);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  animation: cardIn 0.45s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 40px rgba(0, 0, 0, 0.24);
  border-color: rgba(156, 238, 255, 0.35);
}

.auth-card {
  width: min(420px, 95vw);
  padding: 28px;
}

.title {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 0.2px;
  margin: 0 0 6px;
}

.subtitle {
  margin: 0 0 20px;
  color: var(--muted);
}

label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 7px;
}

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

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 12px;
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(136, 208, 255, 0.8);
}

button {
  position: relative;
  overflow: hidden;
  border: 0;
  border-radius: 12px;
  padding: 12px 16px;
  font-weight: 700;
  color: #021426;
  background: linear-gradient(120deg, #80dfff, #4ef4c2);
  cursor: pointer;
  transition: transform 0.16s ease, filter 0.2s ease;
}

button:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
}

button:disabled {
  cursor: wait;
  opacity: 0.7;
}

button::after {
  content: "";
  position: absolute;
  top: 0;
  left: -130%;
  width: 50%;
  height: 100%;
  background: linear-gradient(110deg, transparent, rgba(255, 255, 255, 0.38), transparent);
  transform: skewX(-20deg);
  transition: left 0.45s ease;
}

button:hover::after {
  left: 130%;
}

button.ghost {
  color: var(--text);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid var(--line);
}

button.small {
  padding: 8px 10px;
  font-size: 13px;
}

.error {
  color: #ffb4c1;
  margin-top: 8px;
  min-height: 20px;
}

.layout {
  display: grid;
  grid-template-columns: 270px 1fr;
  gap: 14px;
  min-height: calc(100vh - 36px);
}

.sidebar {
  padding: 14px;
}

.brand {
  font-weight: 800;
  font-size: 20px;
  margin-bottom: 14px;
}

.user-chip {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 14px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid var(--line);
}

.menu {
  display: grid;
  gap: 8px;
}

.menu button {
  width: 100%;
  text-align: left;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.menu button.active {
  background: linear-gradient(120deg, rgba(84, 205, 222, 0.45), rgba(130, 203, 255, 0.36));
}

.content {
  padding: 16px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.stat-card {
  padding: 12px;
  background: linear-gradient(140deg, rgba(130, 233, 222, 0.12), rgba(110, 164, 255, 0.09));
}

.stat-label {
  color: var(--muted);
  font-size: 13px;
}

.stat-value {
  font-size: 24px;
  font-weight: 800;
}

.block {
  margin-top: 12px;
  padding: 14px;
}

.block h3 {
  margin: 0 0 12px;
}

.chart-list {
  display: grid;
  gap: 8px;
}

.chart-row {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(170px, 1fr) 2fr 44px;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  text-align: left;
}

.chart-label {
  font-size: 13px;
}

.chart-track {
  width: 100%;
  height: 11px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}

.chart-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.chart-value {
  font-weight: 800;
  text-align: right;
}

.detail-box {
  margin-top: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.07);
}

.detail-title {
  font-weight: 700;
}

.server-list {
  margin: 10px 0 0;
  padding-left: 20px;
  display: grid;
  gap: 5px;
}

.trend-wrap {
  display: grid;
  gap: 8px;
}

.trend-row {
  display: grid;
  grid-template-columns: 90px 1fr 34px;
  gap: 10px;
  align-items: center;
}

.trend-date {
  font-size: 12px;
  color: var(--muted);
}

.trend-total {
  text-align: right;
  font-weight: 700;
  font-size: 12px;
}

.trend-bar {
  display: flex;
  width: 100%;
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
}

.trend-bar span {
  height: 100%;
}

.toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 12px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 10px 8px;
  text-align: left;
  font-size: 13px;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-weight: 700;
}

tr:last-child td {
  border-bottom: 0;
}

.rating-group {
  display: grid;
  gap: 6px;
}

.rating-option {
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 12px;
}

.rating-option input[type="radio"] {
  width: auto;
  margin: 0;
  accent-color: #55e8c0;
}

.pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid var(--line);
}

.pill.excellent {
  color: var(--ok);
}
.pill.good {
  color: #8ed5ff;
}
.pill.medium {
  color: var(--warn);
}
.pill.bad,
.pill.terrible {
  color: var(--bad);
}

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

.mobile-top {
  display: none;
}

.toast-root {
  position: fixed;
  top: 18px;
  right: 18px;
  display: grid;
  gap: 8px;
  z-index: 20;
}

.toast {
  min-width: 220px;
  max-width: 360px;
  padding: 11px 12px;
  border-radius: 12px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(8, 23, 32, 0.72);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.24);
  animation: toastIn 0.24s ease;
}

.toast.ok {
  border-color: rgba(87, 233, 194, 0.45);
}

.toast.warn {
  border-color: rgba(245, 203, 115, 0.6);
}

.toast.error {
  border-color: rgba(255, 125, 158, 0.7);
}

.toast.hide {
  animation: toastOut 0.25s ease forwards;
}

@keyframes floatOrb {
  0% {
    transform: translateY(0) translateX(0) scale(1);
  }
  50% {
    transform: translateY(-14px) translateX(10px) scale(1.06);
  }
  100% {
    transform: translateY(0) translateX(0) scale(1);
  }
}

@keyframes hueShift {
  from {
    filter: hue-rotate(0deg);
  }
  to {
    filter: hue-rotate(14deg);
  }
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toastOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
  }
}

@media (max-width: 980px) {
  .layout {
    grid-template-columns: 1fr;
  }
  .sidebar {
    display: none;
  }
  .mobile-top {
    display: block;
    margin-bottom: 10px;
    padding: 12px;
  }
  .grid-3 {
    grid-template-columns: 1fr;
  }
  .chart-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .chart-value {
    text-align: left;
  }
  .trend-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .trend-total {
    text-align: left;
  }
  .toast-root {
    left: 14px;
    right: 14px;
    top: 12px;
  }
  .toast {
    max-width: none;
    width: 100%;
  }
}
