:root {
  color-scheme: light;
  --bg: #f6f5f1;
  --panel: #ffffff;
  --text: #1e2528;
  --muted: #667074;
  --line: #d9dddc;
  --accent: #126e82;
  --accent-dark: #0b5363;
  --danger: #ad343e;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}

.shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
}

.panel {
  width: min(980px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px;
  box-shadow: 0 18px 50px rgba(30, 37, 40, 0.12);
}

.authPanel {
  width: min(520px, 100%);
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

h1 {
  margin: 0 0 6px;
  font-size: 28px;
  line-height: 1.15;
}

p {
  margin: 0;
  color: var(--muted);
}

.status {
  min-width: 112px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
}

.status.running {
  color: var(--accent-dark);
  border-color: #8bc0c9;
  background: #e9f6f7;
}

.status.error {
  color: var(--danger);
  border-color: #deb2b7;
  background: #fff0f1;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.authGrid {
  grid-template-columns: 1fr;
}

label {
  display: grid;
  gap: 7px;
  color: #354045;
  font-size: 14px;
  font-weight: 700;
}

input {
  width: 100%;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 12px;
  color: var(--text);
  font: inherit;
  font-weight: 400;
}

input:focus {
  outline: 2px solid rgba(18, 110, 130, 0.25);
  border-color: var(--accent);
}

.check {
  grid-column: 1 / -1;
  grid-template-columns: 18px 1fr;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

.check input {
  width: 18px;
  height: 18px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0 16px;
}

.actions.compact {
  margin: 16px 0 0;
}

button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  padding: 0 16px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

button:hover:not(:disabled) {
  border-color: #9ea8aa;
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.primary,
.download {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.primary.alt {
  background: #38434a;
  border-color: #38434a;
}

.primary:hover:not(:disabled),
.download:hover:not(:disabled) {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

.scheduler {
  margin: 16px 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfbfa;
}

.sectionTitle {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 14px;
}

h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
}

.scheduleStatus {
  max-width: 520px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  text-align: right;
}

.scheduleGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 16px;
  align-items: start;
}

.scheduleGrid fieldset {
  grid-column: 1 / -1;
}

.inlineCheck {
  grid-column: 1 / -1;
}

fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

legend {
  margin-bottom: 7px;
  color: #354045;
  font-size: 14px;
  font-weight: 700;
}

.dayGrid {
  display: grid;
  grid-template-columns: repeat(7, minmax(58px, 1fr));
  gap: 8px;
}

.dayGrid .check {
  grid-column: auto;
  min-height: 42px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.sftpBox {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.sftpGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 12px;
}

.files {
  min-height: 22px;
  color: var(--muted);
  font-size: 14px;
  overflow-wrap: anywhere;
}

pre {
  min-height: 160px;
  max-height: 260px;
  overflow: auto;
  margin: 16px 0 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfbfa;
  color: #354045;
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
}

@media (max-width: 720px) {
  .shell {
    padding: 16px;
  }

  .panel {
    padding: 20px;
  }

  .topbar,
  .grid,
  .scheduleGrid,
  .sftpGrid,
  .sectionTitle {
    display: grid;
    grid-template-columns: 1fr;
  }

  .scheduleStatus {
    text-align: left;
  }

  .dayGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  button {
    flex: 1 1 140px;
  }
}
