﻿:root {
  --bg: #f2eee4;
  --panel: #fffaf0;
  --ink: #1c2522;
  --muted: #6b726d;
  --line: #ded6c5;
  --brand: #17463d;
  --brand-2: #c77b35;
  --danger: #a33b2f;
  --ok: #197455;
  --warn: #a16207;
  --shadow: 0 24px 70px rgba(28, 37, 34, .12);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 8%, rgba(199, 123, 53, .24), transparent 26rem),
    radial-gradient(circle at 92% 18%, rgba(23, 70, 61, .18), transparent 30rem),
    linear-gradient(135deg, #f6f1e6 0%, #ece7dc 100%);
  font-family: Candara, "Trebuchet MS", Verdana, sans-serif;
}

a { color: inherit; }
code { font-family: "Cascadia Mono", Consolas, monospace; font-size: .9em; }
pre {
  margin: 12px 0 0;
  padding: 14px;
  max-height: 360px;
  overflow: auto;
  color: #eaf3ef;
  background: #17211e;
  border-radius: 14px;
}

.shell { min-height: 100vh; display: flex; }
.sidebar {
  position: sticky;
  top: 0;
  width: 280px;
  height: 100vh;
  padding: 26px 20px;
  color: #f7f1e6;
  background: linear-gradient(180deg, #153d36 0%, #102a27 100%);
  box-shadow: var(--shadow);
}
.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; }
.brand.big { margin-bottom: 22px; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  color: #102a27;
  background: #f0bd7c;
  font-weight: 900;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .18);
}
.brand strong { display: block; font-size: 18px; }
.brand small { display: block; color: rgba(255, 255, 255, .68); margin-top: 2px; }
.nav-link {
  display: block;
  padding: 13px 14px;
  margin: 7px 0;
  text-decoration: none;
  border-radius: 13px;
  color: rgba(255, 255, 255, .78);
}
.nav-link:hover, .nav-link.active { color: #fff; background: rgba(255, 255, 255, .11); }
.logout-form { position: absolute; left: 20px; right: 20px; bottom: 22px; }
.logout-form button { width: 100%; background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.16); }

.main { flex: 1; padding: 30px; min-width: 0; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 22px; }
.topbar h1 { margin: 0; font-size: clamp(30px, 4vw, 54px); line-height: .96; letter-spacing: -1.4px; }
.eyebrow { margin: 0 0 8px; color: var(--brand-2); font-weight: 800; text-transform: uppercase; letter-spacing: .12em; font-size: 12px; }

.panel, .hero-panel, .stat, .login-card {
  background: rgba(255, 250, 240, .92);
  border: 1px solid rgba(222, 214, 197, .9);
  border-radius: 24px;
  box-shadow: var(--shadow);
}
.panel { padding: 22px; margin-bottom: 22px; }
.panel h2, .panel h3 { margin-top: 0; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 16px; }
.panel-head h2 { margin: 0; }
.hero-panel { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 26px; margin-bottom: 22px; }
.hero-panel h2 { margin: 0; font-size: clamp(28px, 4vw, 48px); letter-spacing: -1px; }
.hero-actions, .actions, .top-actions, .filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.grid { display: grid; gap: 22px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 22px; }
.stats-grid.compact { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat { padding: 18px; }
.stat span { display: block; color: var(--muted); font-size: 13px; }
.stat strong { display: block; margin-top: 8px; font-size: 34px; line-height: 1; }
.stat small { display: block; margin-top: 8px; color: var(--muted); }

.button, button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 14px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: var(--brand);
  text-decoration: none;
  cursor: pointer;
  font-weight: 800;
  font-family: inherit;
}
.button:hover, button:hover { filter: brightness(1.06); }
.button:disabled, button:disabled { cursor: wait; opacity: .68; filter: none; }
.button.ghost { color: var(--brand); background: #e7dfd0; }
.button.danger, button.danger { background: var(--danger); }
.button.small { min-height: 32px; padding: 6px 10px; font-size: 13px; }
.button.wide { width: 100%; }
.inline-form { display: inline; }

.flash { padding: 14px 16px; margin-bottom: 18px; border-radius: 16px; font-weight: 800; }
.flash.success { color: #064e3b; background: #cfeadd; }
.flash.error, .danger-panel { color: #7f1d1d; background: #fee2df; }
.flash.info { color: #164e63; background: #d9edf2; }
.warning { color: #6d3b03; background: #fff2c2; border-radius: 14px; padding: 12px; }
.muted { color: var(--muted); }
.path-cell { max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: #4b554f; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
td small { display: block; color: var(--muted); margin-top: 4px; }

.badge { display: inline-flex; align-items: center; padding: 5px 9px; border-radius: 999px; font-weight: 900; font-size: 12px; background: #e7dfd0; color: #4b4032; }
.badge.ok { background: #cfeadd; color: #064e3b; }
.badge.bad { background: #f8c8c2; color: #7f1d1d; }
.badge.warn { background: #f8e3ae; color: #713f12; }

.site-list { display: grid; gap: 8px; }
.site-row { display: flex; justify-content: space-between; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; text-decoration: none; background: #fffdf7; }
.site-row small { display: block; color: var(--muted); margin-top: 3px; }
.site-row em { color: var(--brand-2); font-style: normal; font-weight: 900; }
.timeline { display: grid; gap: 12px; }
.timeline div { padding-left: 14px; border-left: 3px solid var(--brand-2); }
.timeline span, .timeline small { display: block; color: var(--muted); font-size: 12px; }

.progress { width: 100%; height: 14px; margin: 16px 0; background: #e3dccf; border-radius: 999px; overflow: hidden; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--brand-2)); }
.job-summary h2 { margin-bottom: 8px; overflow-wrap: anywhere; }
.job-actions { justify-content: flex-end; }
.result-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 18px 0 8px;
  padding: 14px;
  border-radius: 16px;
}
.result-card.success { color: #064e3b; background: #cfeadd; }
.result-card.error { color: #7f1d1d; background: #fee2df; }
.result-card span { color: inherit; opacity: .82; }

.login-wrap { display: grid; place-items: center; min-height: calc(100vh - 140px); }
.login-card { width: min(440px, 100%); padding: 30px; }
.login-form { display: grid; gap: 14px; }
label { display: grid; gap: 6px; font-weight: 800; }
input, select {
  width: 100%;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fffdf7;
  color: var(--ink);
  font: inherit;
}
.search-form { display: flex; gap: 10px; }
.search-form input { max-width: 520px; }
summary { cursor: pointer; font-weight: 900; margin-top: 14px; }

@media (max-width: 980px) {
  .shell { display: block; }
  .sidebar { position: relative; width: auto; height: auto; border-radius: 0 0 28px 28px; }
  .logout-form { position: static; margin-top: 18px; }
  .grid.two, .stats-grid, .stats-grid.compact { grid-template-columns: 1fr; }
  .hero-panel, .topbar, .panel-head { align-items: flex-start; flex-direction: column; }
  .main { padding: 20px; }
}
