:root {
  color-scheme: light dark;
  --bg: #f6f4ef;
  --surface: #ffffff;
  --surface-soft: #eef4f2;
  --text: #202522;
  --muted: #65716b;
  --line: #dce4df;
  --accent: #136f63;
  --accent-strong: #0a5147;
  --focus: #d48a28;
  --shadow: 0 18px 55px rgba(25, 35, 31, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background:
    linear-gradient(135deg, rgba(19, 111, 99, 0.12), transparent 38%),
    linear-gradient(315deg, rgba(212, 138, 40, 0.14), transparent 42%),
    var(--bg);
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
}

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

.hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 700;
}

h1 {
  margin: 0;
  font-size: clamp(2.25rem, 4vw, 4.6rem);
  line-height: 1;
  font-weight: 760;
  letter-spacing: 0;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--accent-strong);
  font-weight: 700;
}

.status-link {
  text-decoration: none;
}

.status-link:hover {
  border-color: rgba(19, 111, 99, 0.46);
  background: var(--surface);
}

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

.login-form {
  display: grid;
  gap: 18px;
  width: min(420px, 100%);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
}

.login-form h1 {
  font-size: 2.35rem;
}

.field {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.field input {
  min-height: 46px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  padding: 0 12px;
}

.field input:focus {
  border-color: var(--focus);
  outline: 3px solid rgba(212, 138, 40, 0.22);
}

.primary-button {
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.primary-button:hover {
  background: var(--accent-strong);
}

.login-error {
  margin: 0;
  padding: 12px;
  border: 1px solid rgba(172, 56, 56, 0.32);
  border-radius: 8px;
  background: rgba(172, 56, 56, 0.1);
  color: #9a2727;
}

svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.toolbar {
  margin-bottom: 20px;
}

.search {
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(520px, 100%);
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 10px 30px rgba(25, 35, 31, 0.07);
}

.search:focus-within {
  border-color: var(--focus);
  outline: 3px solid rgba(212, 138, 40, 0.22);
}

.search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
}

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

.app-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 15px;
  min-height: 116px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.app-card:hover {
  transform: translateY(-2px);
  border-color: rgba(19, 111, 99, 0.46);
  background: var(--surface);
}

.app-card:focus-visible {
  outline: 3px solid rgba(212, 138, 40, 0.42);
  outline-offset: 3px;
}

.icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--accent-strong);
  font-size: 1.25rem;
  font-weight: 800;
}

.icon svg {
  width: 24px;
  height: 24px;
}

.content {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.name {
  overflow-wrap: anywhere;
  font-size: 1.05rem;
  font-weight: 760;
}

.description {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

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

.empty {
  margin: 28px 0 0;
  color: var(--muted);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111715;
    --surface: #17201d;
    --surface-soft: #20332e;
    --text: #edf4f0;
    --muted: #a8b7b0;
    --line: #2f403a;
    --accent: #64d2bd;
    --accent-strong: #9fe4d5;
    --focus: #f0aa4d;
    --shadow: 0 18px 55px rgba(0, 0, 0, 0.34);
  }

  .status,
  .login-form,
  .search,
  .app-card {
    background: rgba(23, 32, 29, 0.82);
  }

  .primary-button {
    color: #10201c;
  }

  .login-error {
    color: #ffaaa2;
  }
}

@media (max-width: 640px) {
  .shell {
    width: min(100% - 24px, 1120px);
    padding: 32px 0;
  }

  .hero {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }

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