:root {
  color-scheme: dark;
  --bg: #0b0d0f;
  --panel: #101316;
  --text: #e7e5df;
  --muted: #898f8d;
  --line: #242a2d;
  --line-strong: #343b3e;
  --accent: #d5a563;
  --running: #9bb695;
  --finished: #c97b7b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgb(11 13 15 / 86%);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgb(36 42 45 / 80%);
  padding: 1rem;
}

.app-header h1 {
  margin: 0;
  font: 600 1.1rem/1.1 Inter, system-ui, sans-serif;
  letter-spacing: -0.03em;
}

.app-header p {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font: 11px/1.3 "DM Mono", monospace;
  text-transform: lowercase;
}

.notifications-toggle {
  margin-top: 0.6rem;
  min-height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #14191c;
  color: var(--text);
  padding: 0.4rem 0.7rem;
  font: 500 10px/1 "DM Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.global-message {
  margin-top: 0.6rem !important;
  padding: 0.5rem 0.65rem;
  border-radius: 7px;
  border: 1px solid var(--line-strong);
  background: #15120e;
  color: var(--accent) !important;
  font: 10px/1.4 "DM Mono", monospace;
  text-transform: uppercase;
}

.machines {
  padding: 1rem;
  display: grid;
  gap: 0.9rem;
}

.machine-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.95rem;
}

.machine-card.running {
  border-color: #486154;
}

.machine-card.finished {
  border-color: #6b4040;
  background: #121010;
}

.machine-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.machine-top h2 {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.status-badge {
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0.32rem 0.55rem;
  font: 9px/1 "DM Mono", monospace;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

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

.status-running {
  color: var(--running);
}

.status-finished {
  color: var(--finished);
}

.machine-fields {
  margin-top: 0.85rem;
  display: grid;
  gap: 0.55rem;
}

.machine-fields label {
  display: grid;
  gap: 0.3rem;
  color: #7d8482;
  font: 10px/1.3 "DM Mono", monospace;
  text-transform: lowercase;
}

.machine-fields input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #0e1113;
  color: var(--text);
  padding: 0.6rem 0.65rem;
  font: 500 0.95rem/1.3 Inter, system-ui, sans-serif;
}

.machine-fields input:focus {
  outline: 2px solid rgb(148 175 191 / 45%);
  outline-offset: 0;
  border-color: #4a5a63;
}

.machine-fields input:disabled {
  background: #0c0f11;
  color: #7f8684;
  border-style: dashed;
}

.duration-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto;
  gap: 0.4rem;
  align-items: center;
}

.duration-separator {
  color: #7d8482;
  font: 10px/1 "DM Mono", monospace;
  text-transform: uppercase;
}

.time-panel {
  margin-top: 0.95rem;
  text-align: center;
}

.remaining-time {
  margin: 0;
  font-size: clamp(2rem, 8vw, 2.75rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.eta,
.percentage {
  margin: 0.35rem 0 0;
  color: #a7adab;
  font: 10px/1.35 "DM Mono", monospace;
  text-transform: uppercase;
}

.progress-wrap {
  margin-top: 0.9rem;
  width: 100%;
  height: 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: #0c0f11;
}

.progress-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #7f9980, #9bb695);
  transition: width 0.4s linear;
}

.finish-message {
  margin: 0.8rem 0 0;
  text-align: center;
  color: var(--finished);
  font: 10px/1.3 "DM Mono", monospace;
  text-transform: uppercase;
}

.actions {
  margin-top: 0.95rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.btn {
  min-height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #171c1f;
  color: var(--text);
  padding: 0.65rem 0.55rem;
  font: 500 10px/1 "DM Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.btn:disabled {
  opacity: 0.45;
}

.btn-primary {
  border-color: #55646c;
}

.btn-success {
  border-color: #4f6855;
}

.btn-secondary {
  border-color: #464d50;
}

.btn-danger {
  border-color: #644141;
}
