:root {
  --page: #eef8f9;
  --surface: #ffffff;
  --surface-soft: #f7fbfc;
  --ink: #172033;
  --muted: #637186;
  --line: #d6e0ea;
  --navy: #082438;
  --navy-2: #0d3850;
  --cyan: #80e2ea;
  --mint: #b7ead9;
  --peach: #ffe4d6;
  --danger: #b93b42;
  --shadow: 0 24px 70px rgba(20, 43, 62, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    linear-gradient(120deg, rgba(128, 226, 234, 0.24) 0%, rgba(255, 255, 255, 0) 42%),
    linear-gradient(160deg, #f8fbfd 0%, var(--page) 100%);
}

a {
  color: inherit;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  max-width: 1340px;
  margin: 0 auto;
  padding: 28px 28px 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.brand > span:last-child {
  display: grid;
  gap: 2px;
}

.logo {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--navy);
  font-weight: 800;
  background: linear-gradient(135deg, #ffd486, var(--cyan));
  box-shadow: 0 14px 30px rgba(40, 110, 128, 0.18);
}

.title {
  font-size: 1.22rem;
  font-weight: 800;
}

.subtitle,
.lead,
.app-card p,
.user-card p {
  color: var(--muted);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.session-pill {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
}

.link {
  color: #0b7a84;
  font-weight: 700;
  text-decoration: none;
}

.shell {
  max-width: 1340px;
  margin: 0 auto;
  padding: 28px;
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: end;
  min-height: 250px;
  padding: 44px;
  border-radius: 24px;
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(8, 36, 56, 0.98), rgba(13, 56, 80, 0.95)),
    radial-gradient(circle at 90% 80%, rgba(128, 226, 234, 0.34), transparent 30%);
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 12px;
  color: #72dce5;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 14px;
  font-size: clamp(2.4rem, 4vw, 4.8rem);
  line-height: 1;
}

h2 {
  margin-bottom: 0;
  font-size: 1.7rem;
}

h3 {
  margin-bottom: 8px;
}

.hero-panel .lead {
  max-width: 720px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 1.08rem;
  line-height: 1.55;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.hero-meta span {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 9px 13px;
  background: rgba(255, 255, 255, 0.08);
}

.section {
  margin-top: 24px;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.apps-grid,
.users-grid,
.admin-layout {
  display: grid;
  gap: 16px;
}

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

.app-card,
.user-card,
.admin-card,
.login-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}

.app-card {
  position: relative;
  min-height: 250px;
  display: grid;
  gap: 18px;
  padding: 22px;
  overflow: hidden;
}

.app-card::after {
  content: "";
  position: absolute;
  right: -34px;
  bottom: -40px;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: var(--peach);
  opacity: 0.8;
}

.app-card:nth-child(2n)::after {
  background: #def5f7;
}

.app-card > * {
  position: relative;
  z-index: 1;
}

.app-card-head {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.app-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: var(--navy);
  font-size: 0.78rem;
  font-weight: 800;
  background: linear-gradient(135deg, #ffd486, var(--cyan));
}

.app-card p {
  min-height: 84px;
  line-height: 1.42;
}

.app-card-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: auto;
}

.btn {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 0 15px;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.btn.primary {
  color: #ffffff;
  background: var(--navy);
}

.btn.ghost {
  color: var(--navy);
  border-color: var(--line);
  background: var(--surface-soft);
}

.btn.danger {
  color: var(--danger);
}

.full {
  width: 100%;
}

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

input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 13px;
  color: var(--ink);
  background: #f8fbfc;
  font: inherit;
}

.admin-layout {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-card,
.user-card {
  padding: 22px;
}

.users-grid {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.user-card {
  display: grid;
  gap: 16px;
}

.notice {
  margin-top: 18px;
  border-radius: 12px;
  padding: 12px 14px;
}

.error {
  color: #8f252b;
  background: #fff0f1;
  border: 1px solid #ffd0d3;
}

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

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

.login-card {
  width: min(100%, 440px);
  padding: 34px;
  box-shadow: var(--shadow);
}

.login-card .logo {
  margin-bottom: 24px;
}

.login-card h1 {
  margin-bottom: 12px;
  font-size: 2.25rem;
}

@media (max-width: 1040px) {
  .apps-grid,
  .admin-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .hero-meta {
    justify-content: flex-start;
  }
}

@media (max-width: 680px) {
  .top,
  .shell {
    padding-left: 16px;
    padding-right: 16px;
  }

  .top,
  .top-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-panel,
  .section {
    border-radius: 18px;
    padding: 24px;
  }

  h1 {
    font-size: 2.35rem;
  }

  .apps-grid,
  .admin-layout {
    grid-template-columns: 1fr;
  }
}
