:root {
  --bg-top-left: #285aa8;
  --bg-top-right: #934ce5;
  --bg-bottom-left: #9d6918;
  --bg-bottom-right: #c73c8c;
  --panel: rgba(255, 255, 255, 0.93);
  --panel-border: rgba(255, 255, 255, 0.46);
  --panel-shadow: 0 26px 60px rgba(20, 18, 55, 0.22);
  --text-main: #282935;
  --text-soft: #7d8092;
  --blue: #3772ff;
  --green: #0aa56e;
  --purple: #8e3fff;
  --gold: #cf7f12;
  --navy: #13193c;
  --white: #ffffff;
}

* {
  box-sizing: border-box;
}

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

body {
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.1), transparent 28%),
    linear-gradient(135deg, var(--bg-top-left) 0%, var(--navy) 42%, var(--bg-top-right) 100%);
  position: relative;
  overflow-x: hidden;
}

body::after {
  content: "";
  position: fixed;
  inset: auto 0 0 0;
  height: 38vh;
  background: linear-gradient(90deg, rgba(157, 105, 24, 0.9), rgba(199, 60, 140, 0.88));
  z-index: -2;
}

body::before {
  content: "";
  position: fixed;
  width: 520px;
  height: 520px;
  right: -120px;
  top: -120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0));
  filter: blur(6px);
  z-index: -1;
}

.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
}

.login-shell {
  width: min(1240px, calc(100% - 32px));
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 28px;
  align-items: stretch;
  margin: 24px auto;
}

.login-hero,
.login-panel {
  border-radius: 26px;
}

.login-hero {
  padding: 42px 28px 34px;
  color: var(--white);
}

.login-kicker {
  display: inline-block;
  margin-bottom: 16px;
  padding: 8px 12px;
  border-radius: 999px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 700;
  color: #dbe6ff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.login-hero h1 {
  max-width: 680px;
  margin-bottom: 16px;
  color: #f7f8ff;
  font-size: clamp(2.4rem, 4vw, 4.5rem);
  line-height: 0.98;
}

.login-hero p {
  max-width: 650px;
  margin: 0;
  color: rgba(245, 247, 255, 0.76);
  font-size: 1.08rem;
  line-height: 1.6;
}

.login-feature-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 34px;
}

.login-feature {
  border-radius: 18px;
  padding: 18px 16px;
}

.login-feature strong,
.login-feature span {
  display: block;
}

.login-feature strong {
  color: #39405a;
  margin-bottom: 8px;
}

.login-feature span {
  color: #7d8092;
  line-height: 1.5;
}

.login-panel {
  padding: 28px 24px;
  align-self: center;
}

.login-panel-head h2 {
  margin: 6px 0 10px;
  color: #2a2f43;
  font-size: 2rem;
}

.login-panel-head p {
  margin: 0 0 20px;
  color: #717688;
  line-height: 1.6;
}

.login-form {
  display: grid;
  gap: 16px;
}

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

.field span {
  color: #4a5166;
  font-size: 0.92rem;
  font-weight: 700;
}

.field input {
  width: 100%;
  border: 1px solid rgba(70, 83, 130, 0.16);
  border-radius: 14px;
  padding: 15px 16px;
  background: rgba(244, 246, 255, 0.72);
  color: #2a3148;
  font-size: 1rem;
}

.field input:focus {
  outline: 0;
  border-color: rgba(55, 114, 255, 0.5);
  box-shadow: 0 0 0 4px rgba(55, 114, 255, 0.12);
}

.login-submit {
  justify-content: center;
  width: 100%;
}

.login-message {
  margin: 0;
  color: #6f7489;
  font-size: 0.94rem;
}

.app-shell {
  width: min(1560px, calc(100% - 32px));
  margin: 24px auto;
  display: grid;
  grid-template-columns: 242px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.sidebar {
  padding-top: 32px;
}

.sidebar-card,
.glass-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  box-shadow: var(--panel-shadow);
  backdrop-filter: blur(12px);
}

.sidebar-card {
  border-radius: 18px;
  padding: 18px 14px 14px;
  animation: slideIn 0.55s ease-out;
}

.menu-group + .menu-group {
  margin-top: 22px;
}

.menu-label {
  display: block;
  margin: 0 8px 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #5a7ef2;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 13px;
  color: #4b4d59;
  text-decoration: none;
  transition: transform 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.menu-item:hover {
  background: rgba(55, 114, 255, 0.08);
  transform: translateX(3px);
}

.menu-item.active {
  color: var(--white);
  background: linear-gradient(90deg, #3070f1, #5b50df);
  box-shadow: inset 0 0 0 1px rgba(5, 8, 34, 0.7), 0 12px 24px rgba(44, 65, 180, 0.3);
}

.menu-icon {
  width: 14px;
  text-align: center;
  font-weight: 700;
}

.dashboard {
  padding: 24px 0 40px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 22px;
  animation: fadeUp 0.55s ease-out;
}

.eyebrow {
  color: rgba(226, 230, 255, 0.76);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 11px;
  margin-bottom: 6px;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 2.2vw, 2.8rem);
  line-height: 1.02;
  color: #1f2233;
}

.subtitle {
  margin: 8px 0 0;
  color: rgba(224, 225, 238, 0.46);
  font-size: 1.04rem;
  max-width: 760px;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-top: 8px;
}

.timestamp {
  color: rgba(228, 232, 255, 0.72);
  font-size: 0.98rem;
  white-space: nowrap;
}

.refresh-button {
  border: 0;
  border-radius: 14px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.93);
  color: var(--blue);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 18px 34px rgba(42, 36, 95, 0.16);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.refresh-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 40px rgba(42, 36, 95, 0.22);
}

.refresh-button.is-refreshing .refresh-icon {
  animation: spin 0.8s linear infinite;
}

.hero-card {
  border-radius: 18px;
  padding: 24px 22px;
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  animation: fadeUp 0.72s ease-out;
}

.hero-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.status-badge,
.service-state {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
}

.status-badge {
  width: 32px;
  height: 32px;
  border: 3px solid var(--green);
  color: var(--green);
}

.hero-card h2 {
  margin: 0 0 4px;
  color: var(--green);
  font-size: clamp(1.4rem, 1.4vw, 1.8rem);
}

.hero-card p,
.hero-meta {
  margin: 0;
  color: #666a7a;
  font-size: 1.02rem;
}

.section {
  margin-top: 20px;
  animation: fadeUp 0.9s ease-out;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.section-title h3 {
  margin: 0;
  color: rgba(51, 55, 79, 0.65);
  font-size: 1.06rem;
}

.section-icon {
  color: var(--blue);
  font-size: 1.15rem;
}

.accent-purple {
  color: var(--purple);
}

.accent-gold {
  color: var(--gold);
}

.service-grid,
.activity-grid {
  display: grid;
  gap: 14px;
}

.service-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.activity-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.service-card,
.metric-card {
  border-radius: 18px;
  padding: 18px 18px 16px;
}

.service-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.service-copy h4,
.metric-card strong {
  margin: 0;
  color: #454852;
}

.service-copy h4 {
  font-size: 1.05rem;
}

.service-copy p,
.metric-card p,
.metric-label {
  color: #878b9c;
}

.service-copy p,
.metric-card p {
  margin: 8px 0 0;
}

.service-state.good {
  border: 2px solid var(--green);
  color: var(--green);
}

.table-card {
  border-radius: 18px;
  padding: 10px 0;
  overflow: hidden;
}

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

th,
td {
  text-align: left;
  padding: 15px 18px;
  border-bottom: 1px solid rgba(52, 61, 95, 0.08);
}

th {
  font-size: 0.96rem;
  color: #6f7384;
}

td {
  font-size: 0.98rem;
  color: #494c57;
}

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

.metric-card strong {
  display: block;
  margin-top: 10px;
  font-size: clamp(1.8rem, 2vw, 2.3rem);
}

.metric-label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  font-weight: 700;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

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

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-12px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1080px) {
  .login-shell,
  .app-shell {
    grid-template-columns: 1fr;
  }

  .login-feature-list,
  .sidebar {
    padding-top: 0;
  }

  .login-feature-list,
  .service-grid,
  .activity-grid {
    grid-template-columns: 1fr;
  }

  .topbar,
  .hero-card {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .login-shell,
  .app-shell {
    width: min(100% - 18px, 1560px);
    margin: 10px auto 18px;
    gap: 16px;
  }

  .login-hero,
  .login-panel {
    padding: 22px 18px;
  }

  .dashboard {
    padding-top: 8px;
  }

  .toolbar {
    width: 100%;
    flex-wrap: wrap;
  }

  .refresh-button {
    width: 100%;
    justify-content: center;
  }

  th,
  td {
    padding: 12px 14px;
    font-size: 0.9rem;
  }

  .table-card {
    overflow-x: auto;
  }

  table {
    min-width: 620px;
  }
}
