:root {
  --bg: #f4efe7;
  --bg-accent: #eadbc8;
  --surface: rgba(255, 250, 242, 0.92);
  --surface-strong: #fffdf8;
  --text: #1f1c17;
  --muted: #6f6459;
  --line: rgba(62, 49, 33, 0.14);
  --primary: #0f6c5b;
  --primary-strong: #0b5749;
  --danger: #b03a2e;
  --danger-soft: #f6ddd8;
  --success: #2f7a37;
  --success-soft: #e4f2e4;
  --warning: #8a5f15;
  --warning-soft: #f8ebca;
  --shadow: 0 18px 60px rgba(66, 48, 23, 0.12);
  --radius: 24px;
  --radius-sm: 14px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "Segoe UI", "Trebuchet MS", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.85), transparent 34%),
    linear-gradient(180deg, #f7f2ea 0%, var(--bg) 42%, var(--bg-accent) 100%);
  color: var(--text);
}

body {
  line-height: 1.5;
}

code {
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.94em;
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 44px;
}

.hero {
  display: grid;
  grid-template-columns: 1.8fr 1fr;
  gap: 24px;
  align-items: stretch;
  margin-bottom: 24px;
}

.hero,
.panel,
.hero-card {
  position: relative;
}

.hero::before,
.panel::before,
.hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.06));
  pointer-events: none;
}

.hero > *,
.panel > *,
.hero-card > * {
  position: relative;
}

.hero,
.panel {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.hero {
  padding: 34px;
}

.eyebrow {
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.76rem;
  color: var(--primary);
  font-weight: 700;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: clamp(2rem, 4vw, 3.35rem);
  line-height: 0.96;
  max-width: 11ch;
}

.hero-copy {
  margin-top: 16px;
  max-width: 62ch;
  color: var(--muted);
}

.hero-card {
  align-self: end;
  padding: 24px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(15, 108, 91, 0.95), rgba(11, 87, 73, 0.92));
  color: #f7f8f5;
}

.hero-card-label {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.85;
}

.timezone-pill {
  display: inline-flex;
  margin-top: 10px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  font-weight: 700;
}

.hero-card-note {
  margin-top: 16px;
  font-size: 0.95rem;
  color: rgba(247, 248, 245, 0.88);
}

.layout {
  display: grid;
  gap: 24px;
}

.panel {
  padding: 28px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: end;
  margin-bottom: 24px;
}

.panel-header p {
  color: var(--muted);
  max-width: 64ch;
}

.connection-grid,
.range-grid,
.summary-grid {
  display: grid;
  gap: 18px;
}

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

.connection-card {
  padding: 20px;
  border-radius: calc(var(--radius) - 8px);
  background: var(--surface-strong);
  border: 1px solid var(--line);
}

.card-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.field span {
  font-size: 0.92rem;
  font-weight: 600;
}

.field input,
.field select {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  font: inherit;
}

.field input:disabled {
  background: #f5f0e8;
  color: var(--muted);
}

.field input:focus,
.field select:focus,
.button:focus {
  outline: 3px solid rgba(15, 108, 91, 0.18);
  outline-offset: 2px;
}

.actions,
.sync-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.button {
  min-height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 140ms ease, opacity 140ms ease, background 140ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
}

.button-primary {
  background: var(--primary);
  color: #f7f8f5;
}

.button-primary:hover {
  background: var(--primary-strong);
}

.button-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}

.button-large {
  min-height: 52px;
  padding-inline: 22px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 700;
}

.status-ready {
  background: var(--success-soft);
  color: var(--success);
}

.status-idle {
  background: rgba(63, 52, 43, 0.08);
  color: var(--muted);
}

.status-busy {
  background: var(--warning-soft);
  color: var(--warning);
}

.status-error {
  background: var(--danger-soft);
  color: var(--danger);
}

.inline-feedback,
.sync-status {
  color: var(--muted);
  min-height: 24px;
}

.sync-form {
  display: grid;
  gap: 18px;
}

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

.notice {
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
}

.notice-warning {
  background: var(--warning-soft);
  color: #5c420d;
  border-color: rgba(138, 95, 21, 0.16);
}

.summary-grid {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  margin-bottom: 20px;
}

.summary-card {
  padding: 16px;
  border-radius: var(--radius-sm);
  background: var(--surface-strong);
  border: 1px solid var(--line);
}

.summary-card strong {
  display: block;
  font-size: 1.5rem;
  line-height: 1;
  margin-top: 6px;
}

.results-list {
  display: grid;
  gap: 14px;
}

.result-entry {
  padding: 18px;
  border-radius: calc(var(--radius) - 10px);
  background: var(--surface-strong);
  border: 1px solid var(--line);
}

.result-head {
  display: flex;
  gap: 14px;
  align-items: start;
}

.result-icon {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: rgba(15, 108, 91, 0.1);
  color: var(--primary);
  font-weight: 800;
  flex: 0 0 auto;
}

.result-title {
  font-size: 1rem;
}

.result-subtitle,
.result-message {
  color: var(--muted);
}

.result-message {
  margin-top: 12px;
}

.result-created .result-icon,
.result-updated .result-icon,
.result-issue-created .result-icon {
  background: var(--success-soft);
  color: var(--success);
}

.result-unchanged .result-icon {
  background: rgba(15, 108, 91, 0.1);
  color: var(--primary);
}

.result-deleted .result-icon {
  background: var(--warning-soft);
  color: var(--warning);
}

.result-error .result-icon {
  background: var(--danger-soft);
  color: var(--danger);
}

.empty-state {
  padding: 18px;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--line);
  color: var(--muted);
  text-align: center;
}

@media (max-width: 960px) {
  .hero,
  .connection-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 20px, 1180px);
    padding-top: 16px;
  }

  .hero,
  .panel {
    padding: 22px;
  }

  .panel-header,
  .range-grid {
    grid-template-columns: 1fr;
    display: grid;
  }
}
