* {
  box-sizing: border-box;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

body {
  margin: 0;
  background: radial-gradient(circle at 0% 0%, #f8faff 0%, #eef3ff 48%, #e9effd 100%);
  color: #121828;
}

.admin-body {
  padding: 24px;
}

.admin-container {
  max-width: 1320px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 22px;
}

.admin-panel {
  background: linear-gradient(180deg, #ffffffea 0%, #fafdffea 100%);
  backdrop-filter: blur(4px);
  border: 1px solid #e1e8fb;
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
}

.form-grid {
  display: grid;
  gap: 12px;
}

.sticky-panel {
  position: sticky;
  top: 14px;
  height: fit-content;
}

input,
select,
button {
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #dbe3f5;
  font-size: 14px;
}

input,
select {
  background: #fff;
}

button {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: white;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

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

button:active {
  transform: translateY(0);
}

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

th,
td {
  border-bottom: 1px solid #e5eaf6;
  text-align: left;
  padding: 10px 8px;
}

.feedback {
  min-height: 20px;
}

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

.toolbar h1,
.toolbar h2 {
  margin: 0;
  line-height: 1.1;
}

.toolbar h1 {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -0.02em;
  max-width: 240px;
}

.toolbar-right {
  display: flex;
  gap: 8px;
}

.add-landing-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.add-landing-row h3 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.01em;
}

.icon-button {
  width: 52px;
  height: 52px;
  padding: 0 0 2px;
  border-radius: 999px;
  background: linear-gradient(135deg, #2b68f0 0%, #1d4ed8 100%);
  font-size: 40px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.3);
}

.form-container {
  overflow: hidden;
  transition: max-height 0.2s ease;
  max-height: 700px;
}

.form-container.is-collapsed {
  max-height: 0;
}

.server-badge {
  display: inline-block;
  padding: 12px 18px;
  border-radius: 999px;
  font-size: 16px;
  margin: 12px 0 18px;
  font-weight: 600;
}

.server-badge-ok {
  color: #0a644f;
  background: linear-gradient(180deg, #c9f4df 0%, #b6ead4 100%);
}

.server-badge-warn {
  color: #92400e;
  background: #fef3c7;
}

.landing-body {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: radial-gradient(circle at center, rgba(var(--theme-rgb, 37, 99, 235), 0.2) 0%, #f8fafc 70%);
}

.card {
  width: min(92vw, 420px);
  background: #fff;
  border-radius: 22px;
  padding: 28px;
  box-shadow: 0 20px 35px rgba(var(--theme-rgb, 37, 99, 235), 0.28);
  text-align: center;
}

.avatar {
  width: 110px;
  height: 110px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid rgba(var(--theme-rgb, 37, 99, 235), 0.25);
}

h1 {
  margin: 14px 0 8px;
}

.bio {
  color: #516074;
  margin-bottom: 22px;
}

.cta-button {
  display: inline-block;
  width: 100%;
  padding: 14px 16px;
  background: var(--theme-color, #111827);
  color: #fff;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  animation: cta-bounce 1.1s infinite;
  transform-origin: center;
}

@keyframes cta-bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-8px);
  }
  60% {
    transform: translateY(-4px);
  }
}

.danger-button {
  background: linear-gradient(135deg, #e5484d 0%, #d63c45 100%);
}

.icon-logout-button {
  width: 74px;
  height: 74px;
  border-radius: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-shadow: 0 10px 22px rgba(220, 56, 69, 0.28);
}

.power-icon {
  width: 26px;
  height: 26px;
  border: 3px solid #fff;
  border-top-color: transparent;
  border-radius: 50%;
  position: relative;
  display: inline-block;
  margin-top: 2px;
}

.power-icon::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -9px;
  transform: translateX(-50%);
  width: 3px;
  height: 13px;
  background: #fff;
  border-radius: 2px;
}

.landing-list {
  display: grid;
  gap: 12px;
}

.landing-item {
  background: linear-gradient(180deg, #fdfefe 0%, #f4f8ff 100%);
  color: #0f172a;
  border: 1px solid #e0e6f7;
  width: 100%;
  text-align: left;
  display: grid;
  gap: 6px;
  padding: 12px;
  border-radius: 16px;
}

.landing-item em,
.landing-item small {
  color: #475569;
}

.landing-item em {
  font-style: normal;
  font-size: 12px;
  color: #63708a;
}

.landing-actions {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.landing-select-button {
  width: 100%;
  text-align: left;
  background: transparent;
  color: inherit;
  border: none;
  padding: 0;
  display: grid;
  gap: 4px;
}

.landing-select-button strong {
  font-size: 16px;
}

.landing-action-button {
  padding: 8px 12px;
  font-size: 12px;
  border-radius: 8px;
  color: #fff;
  border: none;
}

.landing-edit-button {
  background: #1d4ed8;
}

.landing-delete-button {
  background: #d64045;
}

.landing-item.active {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15), 0 10px 22px rgba(37, 99, 235, 0.08);
}

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

.kpi-card {
  background: linear-gradient(180deg, #ffffff 0%, #f4f7ff 100%);
  border: 1px solid #e2e8f8;
  border-radius: 12px;
  padding: 12px;
  display: grid;
  gap: 6px;
}

.kpi-card span {
  color: #475569;
  font-size: 13px;
}

.kpi-card strong {
  font-size: 24px;
}

.chart {
  margin: 18px 0;
  border: 1px solid #dee5f6;
  border-radius: 12px;
  min-height: 230px;
  padding: 12px;
  position: relative;
  overflow-x: auto;
  background: linear-gradient(180deg, #fcfdff 0%, #f4f8ff 100%);
}

.line-chart-wrap {
  position: relative;
  height: 230px;
}

.line-chart-svg {
  width: 100%;
  height: 210px;
  display: block;
}

.line-chart-path {
  fill: none;
  stroke: #2563eb;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.line-point {
  fill: #fff;
  stroke: #2563eb;
  stroke-width: 2;
}

.line-hitbox {
  position: absolute;
  width: 32px;
  height: 210px;
  padding: 0;
  background: transparent;
  border: none;
  transform: translateX(-50%);
  border-radius: 0;
  box-shadow: none;
}

.line-hitbox:hover {
  transform: translateX(-50%);
  filter: none;
}

.line-x-label {
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%) rotate(-45deg);
  transform-origin: center;
  font-size: 11px;
  color: #64748b;
  white-space: nowrap;
}

.line-tooltip {
  position: absolute;
  top: 6px;
  transform: translateX(-50%);
  background: #0f172a;
  color: #fff;
  font-size: 12px;
  padding: 7px 9px;
  border-radius: 8px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  white-space: nowrap;
}

.day-label-today {
  color: #1d4ed8;
  font-weight: 700;
}

@media (max-width: 980px) {
  .admin-container {
    grid-template-columns: 1fr;
  }

  .sticky-panel {
    position: static;
  }

  .toolbar h1 {
    font-size: 30px;
    max-width: none;
  }

  .icon-logout-button {
    width: 62px;
    height: 62px;
    border-radius: 18px;
  }
}
