/* Ink & Iron Apps palette. */
:root {
  --background: #0F1115;
  --panel: #171A20;
  --paper: #E8E4DA;
  --teal: #095F73;
  --teal-bright: #3BB3C9;
  --muted: #9CA3AF;
  --error: #E06A5B;
  --warning: #D9A441;
  --success: #4FA96A;
  --border: #262B33;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 2rem 1.5rem 4rem;
  background: var(--background);
  color: var(--paper);
  font-family: Inter, -apple-system, "Segoe UI", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  max-width: 52rem;
  margin-inline: auto;
}

h1 {
  font-family: "EB Garamond", Georgia, serif;
  font-weight: 500;
  font-size: 2rem;
  margin: 0 0 0.4rem;
}

h2 {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin: 0 0 0.6rem;
  color: var(--teal-bright);
}

.page-header { margin-bottom: 2rem; }

.muted { color: var(--muted); margin: 0 0 1rem; }
.small { font-size: 0.85rem; }

code {
  font-family: "JetBrains Mono", ui-monospace, Consolas, monospace;
  font-size: 0.88em;
  background: #0B0D11;
  padding: 0.1em 0.35em;
  border-radius: 3px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem 1.4rem;
  margin-bottom: 1.25rem;
}

.notice {
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  border: 1px solid;
}
.notice-error { border-color: var(--error); background: rgba(224, 106, 91, 0.1); }

.field { display: block; margin-bottom: 1rem; }
.field span { display: block; font-size: 0.85rem; color: var(--muted); margin-bottom: 0.3rem; }

input[type="text"] {
  width: 100%;
  padding: 0.55rem 0.7rem;
  background: #0B0D11;
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--paper);
  font-family: inherit;
  font-size: 0.92rem;
}
input[type="text"]:focus { outline: 2px solid var(--teal); outline-offset: -1px; }

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  margin-bottom: 0.5rem;
}

button {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 5px;
  background: var(--teal);
  color: var(--paper);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
}
button:hover:not(:disabled) { background: var(--teal-bright); color: #0B0D11; }
button:disabled { opacity: 0.4; cursor: not-allowed; }
button.secondary { background: transparent; border: 1px solid var(--border); color: var(--muted); }
button.secondary:hover:not(:disabled) { border-color: var(--teal-bright); color: var(--teal-bright); background: transparent; }

.status {
  font-size: 0.85rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--border);
}
.status-idle { color: var(--muted); }
.status-active { color: var(--success); border-color: var(--success); }

.folder-list { margin-bottom: 0.9rem; }
.folder-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 5px;
  margin-bottom: 0.5rem;
}
.folder-name { font-family: "JetBrains Mono", ui-monospace, Consolas, monospace; font-size: 0.88rem; }

.log {
  max-height: 20rem;
  overflow-y: auto;
  font-family: "JetBrains Mono", ui-monospace, Consolas, monospace;
  font-size: 0.82rem;
  line-height: 1.7;
}
.log-entry { padding: 0.15rem 0; border-bottom: 1px solid rgba(38, 43, 51, 0.5); }
.header-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

a { color: var(--teal-bright); }

.settings-link {
  font-size: 0.9rem;
  text-decoration: none;
  padding: 0.35rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 5px;
}
.settings-link:hover { border-color: var(--teal-bright); }

.machine-label {
  font-family: "JetBrains Mono", ui-monospace, Consolas, monospace;
  font-size: 0.85rem;
  color: var(--teal-bright);
  margin: 0 0 0.5rem;
}

h3 {
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0 0 0.5rem;
}

.routing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 1.25rem;
  margin-bottom: 1rem;
}
.routing-level {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.9rem 1rem 0.2rem;
}

select {
  width: 100%;
  padding: 0.5rem 0.6rem;
  background: #0B0D11;
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--paper);
  font-family: inherit;
  font-size: 0.92rem;
}

.input-with-suffix { display: flex; align-items: center; gap: 0.5rem; }
.input-with-suffix input { width: 6rem; }

input[type="number"] {
  padding: 0.55rem 0.7rem;
  background: #0B0D11;
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--paper);
  font-family: inherit;
  font-size: 0.92rem;
}

.preview {
  border: 1px solid var(--teal);
  border-radius: 6px;
  padding: 0.9rem 1rem;
  background: rgba(9, 95, 115, 0.12);
  margin-top: 1rem;
}
.preview h3 { color: var(--teal-bright); }
.preview-path {
  font-family: "JetBrains Mono", ui-monospace, Consolas, monospace;
  font-size: 0.88rem;
  margin: 0 0 0.5rem;
  word-break: break-word;
}

.column-list { display: grid; gap: 0.35rem; }
.column-row {
  display: grid;
  grid-template-columns: auto 12rem 1fr;
  align-items: center;
  gap: 0.75rem;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 5px;
  cursor: pointer;
}
.column-row:hover { border-color: var(--teal); }
.column-name { font-weight: 500; }
input[type="checkbox"] { width: 1rem; height: 1rem; accent-color: var(--teal-bright); }

.notice-error ul { margin: 0.5rem 0 0; padding-left: 1.2rem; }

.sticky-actions {
  position: sticky;
  bottom: 0;
  background: var(--background);
  padding: 1rem 0;
  border-top: 1px solid var(--border);
}

.log-info { color: var(--muted); }
.log-success { color: var(--success); }
.log-warning { color: var(--warning); }
.log-error { color: var(--error); }
