:root {
  color-scheme: light;
  --page: #f4f7fb;
  --surface: #ffffff;
  --surface-strong: #eef3f8;
  --text: #172033;
  --muted: #5f6d82;
  --border: #d7dfeb;
  --accent: #0f766e;
  --accent-dark: #134e4a;
  --danger: #b42318;
  --shadow: 0 14px 36px rgba(23, 32, 51, 0.08);
}

* { box-sizing: border-box; }

html, body {
  min-height: 100%;
  margin: 0;
}

body {
  background: var(--page);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a { color: inherit; }

.topbar {
  min-height: 64px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 0 28px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.92);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  text-decoration: none;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: inline-grid;
  place-items: center;
  background: var(--accent-dark);
  color: #fff;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow-x: auto;
}

.topnav a,
.logout {
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  padding: 8px 10px;
  text-decoration: none;
  white-space: nowrap;
}

.topnav a:hover,
.logout:hover {
  background: var(--surface-strong);
  color: var(--text);
}

.account {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
  min-width: 0;
}

.shell {
  width: min(1120px, calc(100vw - 32px));
  margin: 42px auto;
}

.intro {
  margin-bottom: 24px;
}

.eyebrow {
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  margin: 0 0 8px;
  text-transform: uppercase;
}

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

h1 {
  font-size: 32px;
  line-height: 1.15;
  margin-bottom: 0;
}

.app-card,
.empty-state,
.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.app-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 132px;
  padding: 18px;
  text-decoration: none;
}

.empty-state {
  padding: 22px;
}

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

.login-wrap {
  width: min(420px, 100%);
}

.login-card {
  padding: 24px;
}

.login-card h1 {
  font-size: 24px;
  margin-bottom: 18px;
}

label {
  color: var(--muted);
  display: block;
  font-size: 13px;
  margin: 14px 0 6px;
}

input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  padding: 10px 12px;
}

button {
  width: 100%;
  border: 1px solid var(--accent-dark);
  border-radius: 8px;
  background: var(--accent-dark);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  margin-top: 18px;
  padding: 10px 12px;
}

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

.error {
  color: var(--danger);
  font-size: 13px;
  margin-top: 12px;
}

code {
  background: var(--surface-strong);
  border-radius: 6px;
  padding: 2px 5px;
}

@media (max-width: 720px) {
  .topbar {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 14px 16px;
  }

  .account {
    justify-content: space-between;
  }

  .shell {
    margin: 28px auto;
  }
}
