:root {
  color-scheme: light;
  font-family: Arial, Helvetica, sans-serif;
  background: #f4f6f8;
  color: #13202b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #f4f6f8;
  color: #13202b;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
  border: 1px solid #1f6feb;
  background: #1f6feb;
  color: #fff;
  padding: 0.7rem 1rem;
  border-radius: 6px;
  min-height: 42px;
}

button.secondary {
  background: #fff;
  color: #1f3554;
  border-color: #c6d1dc;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  padding: 0.7rem 0.8rem;
  border: 1px solid #c6d1dc;
  border-radius: 6px;
  background: #fff;
}

textarea {
  min-height: 90px;
  resize: vertical;
}

.layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  padding: 2rem 1.5rem;
  background: #122033;
  color: #f5f9fc;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.sidebar h1 {
  margin: 0 0 0.5rem;
  font-size: 1.6rem;
}

.content {
  padding: 2rem;
  display: grid;
  gap: 1.5rem;
}

.panel {
  background: #fff;
  border: 1px solid #dde5ee;
  border-radius: 8px;
  padding: 1.5rem;
}

.panel.narrow {
  max-width: 420px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
  margin-bottom: 1rem;
}

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

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

.form-grid label {
  display: grid;
  gap: 0.45rem;
  font-weight: 600;
}

.actions-row,
.checkbox-row,
.session-row,
.repo-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

.checkbox-row {
  font-weight: 600;
}

.checkbox-row input {
  width: auto;
  min-height: auto;
}

.repository-list,
.logs-list {
  display: grid;
  gap: 1rem;
}

.repo-card,
.log-card {
  border: 1px solid #dde5ee;
  border-radius: 8px;
  padding: 1rem;
  background: #fbfcfe;
}

.repo-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  margin: 1rem 0;
}

.repo-meta div,
.status-box {
  padding: 0.75rem;
  background: #fff;
  border: 1px solid #e7edf3;
  border-radius: 6px;
}

.repo-actions form {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  width: 100%;
}

.repo-actions input {
  flex: 1 1 220px;
}

.muted {
  color: #5c6c7c;
  margin: 0;
}

.hidden {
  display: none !important;
}

.toast {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  max-width: 420px;
  padding: 0.9rem 1rem;
  background: #13202b;
  color: #fff;
  border-radius: 6px;
}

.status-ok {
  color: #116329;
}

.status-error {
  color: #9d1c1c;
}

.status-tag {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  font-size: 0.9rem;
  border: 1px solid #c6d1dc;
  background: #fff;
}

pre {
  white-space: pre-wrap;
  margin: 0.6rem 0 0;
  font-size: 0.92rem;
}

@media (max-width: 980px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    gap: 1rem;
  }

  .content {
    padding: 1rem;
  }

  .form-grid.two-columns,
  .repo-meta {
    grid-template-columns: 1fr;
  }
}
