/* Minimal UI — calm neutrals, one accent, generous spacing */

:root {
  --bg: #fafafa;
  --bg-elevated: #ffffff;
  --text: #1a1a1a;
  --text-secondary: #525252;
  --muted: #737373;
  --border: #e5e5e5;
  --accent: #0f766e;
  --accent-hover: #0d9488;
  --accent-soft: rgba(15, 118, 110, 0.08);
  --danger: #b91c1c;
  --danger-soft: rgba(185, 28, 28, 0.08);
  --radius: 10px;
  --radius-lg: 14px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 24px rgba(0, 0, 0, 0.06);
  --font: "Source Sans 3", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --max: 720px;
  --max-wide: 960px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
  color: var(--accent-hover);
}

/* ——— Header ——— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(250, 250, 250, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.brand__title {
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: var(--text);
}

.brand__tagline {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 400;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem 0.25rem;
}

.nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.88rem;
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
  font-weight: 500;
}

.nav a:hover {
  background: var(--border);
  color: var(--text);
  text-decoration: none;
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: var(--muted);
}

.nav-user .mono {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ——— Layout ——— */
.container {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 1.75rem 1.25rem 3rem;
}

.page-head {
  max-width: var(--max);
  margin-bottom: 1.75rem;
}

.page-title {
  margin: 0 0 0.35rem;
  font-size: 1.65rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.page-lead {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.98rem;
  max-width: 42em;
}

/* ——— Panels & cards ——— */
.panel {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.35rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
}

.panel--accent {
  border-color: rgba(15, 118, 110, 0.22);
  background: linear-gradient(180deg, var(--accent-soft) 0%, var(--bg-elevated) 48%);
}

.panel h2,
.panel h3 {
  margin: 0 0 0.65rem;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}

.panel h3 {
  font-size: 0.95rem;
  margin-top: 1rem;
}

.grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 860px) {
  .grid--2 {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

/* ——— Help & steps ——— */
.help {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0 0 1rem;
  max-width: 48em;
}

.help:last-child {
  margin-bottom: 0;
}

.help strong {
  color: var(--text);
  font-weight: 600;
}

.help-list {
  margin: 0.5rem 0 0;
  padding-left: 1.2rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.help-list li {
  margin-bottom: 0.35rem;
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.step {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.75rem 1rem;
  align-items: start;
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}

.step--done {
  border-color: rgba(15, 118, 110, 0.35);
  background: var(--accent-soft);
}

.step__num {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 700;
  background: var(--border);
  color: var(--text-secondary);
  flex-shrink: 0;
}

.step--done .step__num {
  background: var(--accent);
  color: #fff;
}

.step__body h3 {
  margin: 0 0 0.25rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.step__body p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.step__action {
  align-self: center;
}

.divider {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 1.25rem 0;
}

/* ——— Buttons ——— */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  line-height: 1.3;
}

.btn:hover {
  background: var(--bg);
  border-color: #d4d4d4;
  text-decoration: none;
}

.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn.primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #fff;
}

.btn.danger {
  border-color: rgba(185, 28, 28, 0.35);
  background: var(--danger-soft);
  color: var(--danger);
}

.btn.danger:hover {
  background: rgba(185, 28, 28, 0.14);
}

.btn.linklike {
  border: none;
  background: transparent;
  color: var(--accent);
  padding: 0.25rem 0.35rem;
  font-weight: 500;
}

.btn.linklike:hover {
  background: var(--accent-soft);
  text-decoration: none;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn--sm {
  padding: 0.35rem 0.65rem;
  font-size: 0.8rem;
}

/* ——— Forms ——— */
.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.hint {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.45;
  max-width: 40em;
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="file"],
select,
textarea {
  font-family: inherit;
  font-size: 0.95rem;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  width: 100%;
  max-width: 32rem;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.check {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  font-weight: 400;
  color: var(--text);
}

.checklist {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

/* ——— Tables ——— */
.table-wrap {
  overflow-x: auto;
  margin: 0.75rem 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.table th,
.table td {
  padding: 0.65rem 0.75rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}

.table th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
  color: var(--muted);
  background: var(--bg);
}

.table tr:last-child td {
  border-bottom: none;
}

/* ——— Misc ——— */
.mono {
  font-family: var(--mono);
  font-size: 0.82em;
}

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

.small {
  font-size: 0.82rem;
}

.mt {
  margin-top: 0.75rem;
}

.mb-0 {
  margin-bottom: 0;
}

.pill {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid rgba(15, 118, 110, 0.2);
  margin: 0.15rem 0.35rem 0.15rem 0;
}

.pill--bad {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: rgba(185, 28, 28, 0.25);
}

.flash {
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  border: 1px solid rgba(15, 118, 110, 0.25);
  background: var(--accent-soft);
  color: var(--text);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.flash--warn {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.1);
}

.kbd {
  font-family: var(--mono);
  font-size: 0.8em;
  padding: 0.12rem 0.35rem;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--bg);
}

.section-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 1.5rem 0 0.5rem;
}

.section-label:first-child {
  margin-top: 0;
}

.login-card {
  max-width: 26rem;
  margin: 2rem auto;
}

.list {
  margin: 0.35rem 0 0;
  padding-left: 1.15rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.list li {
  margin-bottom: 0.35rem;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.stat-row:last-child {
  border-bottom: none;
}
