:root {
  --royal-blue: #0b4dbb;
  --royal-blue-dark: #073786;
  --royal-blue-soft: #eaf2ff;
  --orange: #f58220;
  --orange-dark: #d9670f;
  --orange-soft: #fff1e6;
  --ink: #172033;
  --muted: #667085;
  --surface: #ffffff;
  --surface-soft: #f6f9fe;
  --border: #d9e2f2;
  --success: #18794e;
  --danger: #b42318;
  --shadow: 0 12px 32px rgba(11, 77, 187, 0.12);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--surface-soft);
  line-height: 1.55;
}

a {
  color: var(--royal-blue);
  text-decoration: none;
}

a:hover {
  color: var(--royal-blue-dark);
}

.wrap {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--royal-blue);
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand::before {
  content: "";
  width: 14px;
  height: 32px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--orange), #ffab57);
}

.nav {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.nav > a:not(.btn) {
  font-weight: 650;
  color: #344054;
}

.hero {
  color: #fff;
  background:
    radial-gradient(circle at 88% 18%, rgba(245, 130, 32, 0.34), transparent 28%),
    linear-gradient(135deg, var(--royal-blue-dark), var(--royal-blue));
  padding: 86px 0 92px;
  border-block: 1px solid rgba(255, 255, 255, 0.12);
}

.hero .wrap {
  max-width: 900px;
}

.hero h1 {
  margin: 8px 0 20px;
  max-width: 820px;
  font-size: clamp(2.35rem, 6vw, 4.85rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.hero p:not(.muted) {
  max-width: 760px;
  margin: 0 0 30px;
  font-size: clamp(1.05rem, 2vw, 1.24rem);
  color: rgba(255, 255, 255, 0.9);
}

.hero .muted {
  margin: 0;
  color: #ffd4ad;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.82rem;
}

.btn,
button,
input[type="submit"] {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 12px;
  padding: 0 20px;
  background: var(--orange);
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(245, 130, 32, 0.24);
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}

.btn:hover,
button:hover,
input[type="submit"]:hover {
  color: #fff;
  background: var(--orange-dark);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(245, 130, 32, 0.3);
}

.btn:focus-visible,
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(245, 130, 32, 0.36);
  outline-offset: 3px;
}

.btn.secondary {
  background: #fff;
  color: var(--royal-blue-dark);
  box-shadow: none;
}

.btn.secondary:hover {
  background: var(--royal-blue-soft);
  color: var(--royal-blue-dark);
}

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

.card {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}

.card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(180deg, var(--royal-blue), var(--orange));
}

.card h2,
.card h3 {
  margin-top: 0;
  color: var(--royal-blue-dark);
}

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

/* Shared app/admin controls */
label {
  display: block;
  margin-bottom: 8px;
  font-weight: 750;
  color: #344054;
}

input,
select,
textarea {
  width: 100%;
  min-height: 50px;
  border: 1px solid #b8c8e2;
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  padding: 12px 14px;
  font: inherit;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--royal-blue);
  box-shadow: 0 0 0 4px rgba(11, 77, 187, 0.11);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  border-radius: 999px;
  padding: 4px 10px;
  background: var(--royal-blue-soft);
  color: var(--royal-blue-dark);
  font-size: 0.85rem;
  font-weight: 800;
}

.badge.orange {
  background: var(--orange-soft);
  color: #9c4705;
}

.progress {
  width: 100%;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #dbe7f9;
}

.progress > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--royal-blue), var(--orange));
}

.notice {
  border-left: 5px solid var(--orange);
  border-radius: 12px;
  background: var(--orange-soft);
  padding: 14px 16px;
}

.status-online { color: var(--success); font-weight: 800; }
.status-offline { color: var(--danger); font-weight: 800; }

footer {
  border-top: 1px solid var(--border);
}

@media (max-width: 820px) {
  .topbar {
    padding: 10px 0 14px;
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    width: 100%;
    gap: 12px;
  }

  .nav .btn {
    width: 100%;
  }

  .hero {
    padding: 62px 0 68px;
  }

  .grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .wrap {
    width: min(100% - 22px, 1120px);
  }

  .hero h1 {
    font-size: clamp(2.15rem, 11vw, 3.25rem);
  }

  .card {
    padding: 22px 20px;
    border-radius: 15px;
  }

  .btn,
  button,
  input[type="submit"] {
    width: 100%;
    min-height: 54px;
    font-size: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
