:root {
  font-family: Tahoma, "Segoe UI", sans-serif;
  color: #18312f;
  background: #f5f6f2;
  font-size: 14px;
  line-height: 1.85;
  --green: #124f49;
  --muted: #6b7c77;
  --line: #dfe5df;
  --accent: #d8ef87;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
textarea,
select {
  font: inherit;
}
button {
  cursor: pointer;
  background: var(--green);
  color: #fff;
  border: 0;
  border-radius: 9px;
  padding: 9px 16px;
  font-weight: 600;
  transition: background 0.15s;
}
button:hover {
  background: #226d62;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
.secondary {
  background: #edf1eb;
  color: #264941;
}
.secondary:hover {
  background: #dde8dc;
}
.danger {
  background: #fff0ed;
  color: #a13628;
}
.danger:hover {
  background: #ffe1d9;
}
.small {
  padding: 5px 10px;
  font-size: 12px;
}
input,
select,
textarea {
  border: 1px solid #cdd8d0;
  border-radius: 8px;
  padding: 10px 12px;
  background: white;
  color: inherit;
  width: 100%;
  outline: none;
}
input:focus,
textarea:focus,
select:focus {
  border-color: #34756a;
  box-shadow: 0 0 0 3px #e0eee3;
}
textarea {
  resize: vertical;
  min-height: 105px;
}
input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
}
label {
  display: grid;
  gap: 5px;
  font-size: 13px;
  font-weight: 600;
}
.ltr {
  direction: ltr;
  text-align: left;
}
.shell {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  background: #fff;
  border-left: 1px solid var(--line);
  padding: 27px 20px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 19px;
  font-weight: bold;
}
.brand img {
  width: 42px;
  height: 42px;
}
.brand small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  font-weight: normal;
  letter-spacing: 2px;
}
.sidebar nav {
  display: grid;
  gap: 7px;
}
.nav {
  background: transparent;
  color: #536963;
  text-align: right;
  padding: 10px 14px;
  font-weight: normal;
}
.nav:hover {
  background: #f3f6f0;
}
.nav.active {
  background: #e8f0df;
  color: #174b41;
  font-weight: bold;
}
.sidebar footer {
  margin-top: auto;
  font-size: 11px;
  color: var(--muted);
}
.main {
  padding: 0 36px 50px;
  min-width: 0;
}
.topbar {
  height: 85px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  gap: 15px;
}
.workspace {
  font-size: 12px;
  color: var(--muted);
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}
.badge {
  font-size: 11px;
  display: inline-block;
  padding: 3px 9px;
  border-radius: 20px;
  background: #eaf2e7;
  color: #356248;
}
.badge.warn {
  background: #fff2d7;
  color: #916324;
}
.badge.error {
  background: #fce8e3;
  color: #a14430;
}
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 28px 0 24px;
  gap: 15px;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 2px;
  color: #769277;
  direction: ltr;
  text-align: right;
}
h1 {
  font-size: 26px;
  line-height: 1.5;
  margin: 3px 0 6px;
  font-weight: 700;
}
h2 {
  font-size: 17px;
  margin: 0 0 15px;
}
h3 {
  font-size: 14px;
  margin: 0 0 10px;
}
.muted {
  color: var(--muted);
  font-size: 12px;
}
p {
  margin: 6px 0 14px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.card {
  border: 1px solid var(--line);
  border-radius: 15px;
  background: white;
  padding: 23px;
  min-width: 0;
}
.stat strong {
  display: block;
  font-size: 32px;
  line-height: 1.8;
  font-weight: 600;
}
.stat span {
  color: var(--muted);
  font-size: 12px;
}
.stat.featured {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}
.stat.featured span {
  color: #c6ddce;
}
.hero {
  background: #eaf0df;
  padding: 25px;
  border-radius: 15px;
  margin-bottom: 22px;
  display: flex;
  justify-content: space-between;
  gap: 25px;
  align-items: center;
}
.hero h2 {
  margin-bottom: 5px;
}
.hero p {
  margin: 0;
  max-width: 650px;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.stack {
  display: grid;
  gap: 15px;
}
.row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}
.full {
  grid-column: 1/-1;
}
.check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: normal;
}
.account-option {
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fafcf8;
}
.platform {
  direction: ltr;
  font-size: 12px;
  font-weight: bold;
  color: #1c5c50;
}
.status {
  font-size: 11px;
  color: var(--muted);
}
.divider {
  height: 1px;
  background: var(--line);
  margin: 20px 0;
}
.list {
  display: grid;
  gap: 12px;
}
.entry {
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 16px;
  background: #fff;
}
.entry p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.entry .meta {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 9px;
}
.empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
  border: 1px dashed #ccd8cd;
  border-radius: 12px;
}
.notice {
  background: #fff7e4;
  border: 1px solid #f1e5c8;
  border-radius: 10px;
  padding: 14px;
  font-size: 12px;
  color: #796035;
}
.success {
  background: #edf5e6;
  border-color: #d6e6c9;
  color: #4c6640;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 12px;
}
td,
th {
  text-align: right;
  padding: 11px 8px;
  border-bottom: 1px solid var(--line);
}
th {
  font-size: 11px;
  color: var(--muted);
}
.table-wrap {
  overflow: auto;
}
pre {
  white-space: pre-wrap;
  direction: ltr;
  text-align: left;
  overflow-wrap: anywhere;
  font-size: 12px;
  line-height: 1.7;
  background: #f5f7f3;
  border-radius: 9px;
  padding: 13px;
  max-height: 400px;
  overflow: auto;
}
.login {
  max-width: 430px;
  margin: 12vh auto;
  padding: 38px;
}
.login .brand {
  margin-bottom: 30px;
}
.login h1 {
  font-size: 22px;
}
.login form {
  display: grid;
  gap: 17px;
  margin-top: 22px;
}
#toast {
  position: fixed;
  bottom: 24px;
  left: 24px;
  background: #183e36;
  color: #fff;
  padding: 13px 22px;
  max-width: 550px;
  border-radius: 11px;
  box-shadow: 0 8px 30px #14382b33;
  z-index: 30;
  display: none;
}
#toast.error {
  background: #853b2d;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 26px;
  max-width: 750px;
  width: calc(100% - 35px);
  max-height: 85vh;
  overflow: auto;
}
dialog::backdrop {
  background: #14272070;
}
dialog #close-dialog {
  margin-top: 15px;
}
.review {
  white-space: pre-wrap;
  max-height: 180px;
  overflow: auto;
  font-size: 13px;
}
.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}
.tagline {
  font-size: 11px;
  color: #738b7e;
}
progress {
  appearance: none;
  height: 9px;
  width: 100%;
  border: 0;
  border-radius: 9px;
  overflow: hidden;
}
progress::-webkit-progress-bar {
  background: #edf1e9;
}
progress::-webkit-progress-value {
  background: #60917a;
}
.bar {
  display: grid;
  grid-template-columns: 75px 1fr 30px;
  align-items: center;
  gap: 15px;
  margin: 12px 0;
  font-size: 12px;
}
.loading {
  text-align: center;
  padding: 60px;
}
.pending-file {
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  padding: 7px;
  border-bottom: 1px solid var(--line);
}
details summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 14px;
}
.tree-item {
  padding: 11px 15px;
  border-right: 3px solid #bdd397;
  margin: 8px 0;
  background: #f5f8ef;
}
.plain-list {
  padding-right: 20px;
  font-size: 13px;
}
.hidden {
  display: none !important;
}
@media (max-width: 1050px) {
  .shell {
    grid-template-columns: 190px 1fr;
  }
  .main {
    padding: 0 22px 35px;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .sidebar {
    padding: 20px 12px;
  }
  .grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 680px) {
  .shell {
    display: block;
  }
  .sidebar {
    position: relative;
    height: auto;
    padding: 15px;
    border: 0;
  }
  .sidebar nav {
    display: flex;
    overflow: auto;
  }
  .nav {
    white-space: nowrap;
  }
  .sidebar footer,
  .sidebar .workspace {
    display: none;
  }
  .main {
    padding: 0 15px 30px;
  }
  .topbar {
    height: 65px;
  }
  .topbar .muted {
    display: none;
  }
  .page-head {
    align-items: start;
  }
  h1 {
    font-size: 23px;
  }
  .hero {
    display: block;
  }
  .hero button {
    margin-top: 13px;
  }
  .field-grid {
    grid-template-columns: 1fr;
  }
  .full {
    grid-column: auto;
  }
  .card {
    padding: 18px;
  }
  .login {
    margin: 7vh 15px;
  }
  .stats {
    gap: 10px;
  }
  .stat strong {
    font-size: 27px;
  }
}

.media-preview {
  display: block;
  max-width: 100%;
  max-height: 450px;
  margin: 12px auto;
  border-radius: 10px;
}

.sidebar {
  overflow-y: auto;
}
.metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 12px 0;
}
.metric {
  background: #f3f6ef;
  border-radius: 9px;
  padding: 8px 14px;
  display: grid;
  min-width: 85px;
}
.metric span {
  font-size: 11px;
  color: var(--muted);
}
.metric strong {
  font-size: 20px;
}
.semantic-note {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  background: #f0f5e8;
  padding: 8px;
  border-radius: 8px;
  font-size: 11px;
}
.recommendation {
  white-space: pre-wrap;
}
.metric-chart {
  width: 100%;
  max-height: 220px;
  direction: ltr;
}
.metric-chart .axis {
  fill: none;
  stroke: #b9c6bb;
}
.metric-chart .series {
  fill: none;
  stroke: var(--green);
  stroke-width: 2;
}
.metric-chart circle {
  fill: var(--green);
}
.metric-chart text {
  font-size: 10px;
  fill: #63796d;
}
figure {
  margin: 18px 0;
}
a {
  color: var(--green);
  overflow-wrap: anywhere;
}
.preserve-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.market-target { border: 1px solid #d6e1da; border-radius: 12px; padding: 14px; min-width: 0; }
.market-target legend { padding: 0 8px; font-weight: 600; }
.market-preview-gallery { display: flex; gap: 8px; flex-wrap: wrap; }
.market-preview-gallery img, .market-preview-gallery video { width: 220px; max-width: 100%; max-height: 180px; object-fit: contain; }
body[aria-busy="true"] { cursor: progress; }
#work-status { position: fixed; bottom: 16px; left: 16px; background: #124f49; color: white; padding: 10px 16px; border-radius: 9px; z-index: 100; font-size: 13px; }
