:root {
  --surface: #ffffff;
  --line: rgba(33, 37, 41, 0.1);
  --soft: #f3f6f9;
  --ink: #1f2937;
}

body {
  color: var(--ink);
}

.page-bg {
  min-height: 100vh;
  background:
    linear-gradient(180deg, #f8fbfd 0%, #eef4f8 100%);
}

.admin-bg {
  min-height: 100vh;
  background: #f4f7fa;
}

.admin-login-bg {
  min-height: 100vh;
  background: linear-gradient(135deg, #eef7fb, #ffffff 48%, #e8f0f7);
}

.site-header {
  padding: 56px 0 32px;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
}

.display-title {
  font-size: clamp(2rem, 8vw, 4rem);
  font-weight: 750;
  line-height: 1.02;
  letter-spacing: 0;
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.app-card {
  display: flex;
  gap: 16px;
  min-height: 170px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: inherit;
  text-decoration: none;
  box-shadow: 0 10px 30px rgba(29, 53, 87, 0.06);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.app-card:hover,
.app-card:focus {
  transform: translateY(-2px);
  border-color: rgba(39, 128, 227, 0.35);
  box-shadow: 0 14px 36px rgba(29, 53, 87, 0.1);
}

.app-icon {
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #2780e3;
  color: #fff;
  font-weight: 800;
  font-size: 1.35rem;
}

.app-icon-lg {
  width: 68px;
  height: 68px;
  font-size: 1.7rem;
}

.app-detail-shell {
  padding-top: 48px;
  padding-bottom: 64px;
}

.public-app-heading {
  display: flex;
  align-items: center;
  gap: 18px;
}

.availability-pill {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.availability-pill span {
  color: #5c6773;
}

.availability-pill strong {
  font-size: 1.3rem;
}

.request-panel,
.admin-section,
.login-panel,
.empty-state {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(29, 53, 87, 0.06);
}

.request-panel {
  padding: 24px;
}

.captcha-row {
  display: grid;
  grid-template-columns: 1fr 132px;
  gap: 10px;
}

.captcha-image-button {
  width: 132px;
  height: 48px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.captcha-image-button img {
  display: block;
  width: 132px;
  height: 48px;
}

.admin-section {
  padding: 20px;
}

.metric {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.metric span {
  display: block;
  color: #5c6773;
  margin-bottom: 6px;
}

.metric strong {
  font-size: 1.8rem;
  line-height: 1;
}

.code-input {
  font-family: Menlo, Consolas, monospace;
}

.empty-inline {
  padding: 26px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--soft);
  color: #5c6773;
  text-align: center;
}

.empty-state {
  max-width: 520px;
  padding: 32px;
  text-align: center;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-panel {
  width: min(100%, 440px);
  padding: 28px;
}

@media (max-width: 767.98px) {
  .site-header {
    padding-top: 34px;
  }

  .header-inner {
    display: block;
  }

  .header-inner .btn {
    margin-top: 20px;
    width: 100%;
  }

  .app-card {
    min-height: 0;
  }

  .app-detail-shell {
    padding-top: 28px;
  }

  .request-panel,
  .admin-section {
    padding: 16px;
  }

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

  .captcha-image-button {
    width: 100%;
  }

  .captcha-image-button img {
    margin: 0 auto;
  }
}

