/* workflow.murygin.app - the welcome page.
 *
 * Design read: an internal operations entrance for one owner, dark and quiet,
 * built from native CSS with no build step. Two screens only, so the whole
 * stylesheet is one file: a centred password form and a tile grid.
 *
 * Locks: one theme (dark, committed deliberately - this page is only ever
 * opened next to a terminal), one accent, one radius scale, one neutral ramp.
 */

:root {
  --bg: #0e1012;
  --surface: #16191c;
  --surface-hover: #1c2024;
  --line: #262b30;
  --line-strong: #343a41;
  --text: #e6e9ec;
  --text-dim: #939ba4;
  --accent: #5eb98a;
  --accent-ink: #0b0d0f;
  --danger: #e08a7d;
  --radius: 10px;
  --pad: 1.25rem;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 2.5rem 1.25rem 4rem;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body.centered {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  padding: 1.25rem;
}

h1 {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

h2 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 600;
}

p {
  margin: 0;
}

/* Login */

.login {
  width: 100%;
  max-width: 21rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.login h1 {
  margin-bottom: 0.25rem;
}

.login .error {
  color: var(--danger);
  font-size: 0.875rem;
}

input[type="password"] {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font: inherit;
}

input[type="password"]::placeholder {
  color: var(--text-dim);
}

button {
  padding: 0.6rem 0.9rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--accent-ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.1s ease;
}

button:hover {
  background: #6ec698;
}

button:active {
  transform: translateY(1px);
}

button.link {
  padding: 0.25rem 0;
  background: none;
  border: none;
  color: var(--text-dim);
  font-weight: 400;
}

button.link:hover {
  background: none;
  color: var(--text);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Grid */

header,
.grid {
  width: 100%;
  max-width: 60rem;
  margin: 0 auto;
}

header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  margin-bottom: 1.75rem;
  border-bottom: 1px solid var(--line);
}

header form {
  margin: 0;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
  gap: 1rem;
}

.tile {
  display: block;
  padding: var(--pad);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: inherit;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.tile:hover {
  background: var(--surface-hover);
  border-color: var(--line-strong);
}

.tile p {
  color: var(--text-dim);
  font-size: 0.875rem;
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
