:root {
  color-scheme: dark;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #061118;
  color: #f7f7f7;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top, rgba(255, 80, 30, 0.14), transparent 25%),
    linear-gradient(180deg, #070d14 0%, #090e14 100%);
}

.page-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  margin: 16px auto;
  width: min(1200px, calc(100% - 32px));
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.brand-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  background: #ff5838;
  border-radius: 14px;
}

.topbar-nav {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.nav-link {
  text-decoration: none;
  color: #f7f7f7;
  opacity: 0.82;
  font-weight: 600;
}

.nav-link.active {
  opacity: 1;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.balance {
  padding: 8px 16px;
  border: 1px solid rgba(255, 88, 56, 0.25);
  border-radius: 999px;
  color: #ff6f43;
  font-weight: 700;
}

.main-content {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-height: 100vh;
}

.center-panel {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 40px);
  padding: 20px 0;
}

.login-card,
.panel {
  width: 100%;
  max-width: 520px;
  background: rgba(10, 18, 28, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  padding: 32px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.16);
}

.login-card h1,
.dashboard-header h1,
.dashboard-header p,
.panel h2 {
  margin: 0 0 16px;
}

.login-card p,
.hint {
  color: rgba(255, 255, 255, 0.74);
  line-height: 1.6;
  margin: 0 0 24px;
}

.login-card label {
  display: block;
  margin: 18px 0 6px;
  font-weight: 600;
}

.login-card input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  color: #f7f7f7;
  padding: 14px 16px;
  font-size: 0.98rem;
}

.btn {
  cursor: pointer;
  border: none;
  border-radius: 14px;
  padding: 14px 20px;
  font-weight: 700;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  width: 100%;
  background: linear-gradient(135deg, #ff5f3b, #ff903f);
  color: #fff;
  margin-top: 22px;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #f7f7f7;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.message.error {
  margin-top: 18px;
  color: #ff8a8a;
  background: rgba(255, 72, 72, 0.12);
  border-radius: 16px;
  padding: 12px 14px;
}

.hidden {
  display: none !important;
}

.dashboard-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 860px) {
  .info-grid {
    grid-template-columns: 1.3fr 1fr;
  }
}

.server-panel,
.profile-panel,
.owner-panel {
  background: rgba(11, 19, 31, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  padding: 28px;
}

.server-panel h2,
.profile-panel h2,
.owner-panel h2 {
  margin-bottom: 16px;
}

.stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
}

.stat-row span:first-child {
  color: rgba(255, 255, 255, 0.72);
}

.stat-row span:last-child {
  font-weight: 700;
}

.progress {
  height: 10px;
  width: 100%;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin-top: 8px;
}

.progress-bar {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff6f41, #ff3a5f);
}

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 8px;
}

.card-row {
  display: grid;
  gap: 16px;
}

.owner-panel .user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 18px;
  border-radius: 18px;
}

.owner-panel .user-row strong {
  color: #fff;
}

  .owner-panel .owner-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

.server-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.server-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
}

.server-card .server-meta {
  display: grid;
  gap: 4px;
}

.server-card .server-meta strong {
  font-size: 1rem;
}

.server-card .server-meta .text-muted {
  color: rgba(255, 255, 255, 0.72);
}

.server-details-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.server-details-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.password-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}

.password-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  color: #f7f7f7;
  border-radius: 14px;
  width: 42px;
  height: 42px;
  font-size: 1rem;
  cursor: pointer;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.14);
}

.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.55);
  z-index: 30;
}

.modal.hidden {
  display: none;
}

.modal-content {
  width: min(520px, 90vw);
  background: rgba(10, 18, 28, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 28px;
  padding: 28px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.password-modal-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.server-name-input {
  min-width: 220px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  color: #f7f7f7;
  padding: 12px 14px;
  font-size: 0.98rem;
}

.server-details-note {
  color: rgba(255, 255, 255, 0.68);
  margin-top: 18px;
}

@media (max-width: 640px) {
  .topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .dashboard-header {
    flex-direction: column;
    align-items: stretch;
  }
}
