:root {
  --bg: #efe8d8;
  --bg2: #e4dcc8;
  --ink: #17241d;
  --muted: #5d6d63;
  --paper: #fffaf0;
  --paper2: #f7f1e4;
  --line: #d9cfb8;
  --brand: #1b6b45;
  --brand2: #c4a35a;
  --brand-d: #123d29;
  --danger: #b42318;
  --warn: #b45309;
  --ok: #157a3e;
  --info: #1d4e89;
  --shadow: 0 18px 50px rgba(23, 36, 29, .08);
  --r: 18px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: Outfit, system-ui, sans-serif; }
h1, h2, h3, .brand strong { font-family: Fraunces, Georgia, serif; font-weight: 650; }
a { color: var(--brand); }
.app { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.sidebar {
  background: var(--brand-d);
  color: #e9f6ee;
  padding: 22px 16px;
  display: flex; flex-direction: column; gap: 22px;
}
.brand { display: flex; gap: 12px; align-items: center; padding: 4px 8px 12px; }
.logo {
  width: 40px; height: 40px; border-radius: 12px;
  background: linear-gradient(145deg, #2f9e64, #c4a35a);
  color: #102117; display: grid; place-items: center;
  font-family: Fraunces, serif; font-size: 22px;
}
.brand small { display: block; opacity: .7; font-size: 12px; letter-spacing: .04em; }
.sidebar nav { display: flex; flex-direction: column; gap: 4px; }
.sidebar nav a {
  color: #d7eadc; text-decoration: none; padding: 10px 12px; border-radius: 12px;
  display: flex; justify-content: space-between; align-items: center;
}
.sidebar nav a.on, .sidebar nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.sidebar nav em {
  background: #c4a35a; color: #1a241c; font-style: normal; font-size: 11px;
  padding: 1px 7px; border-radius: 99px; font-weight: 700;
}
.side-foot { margin-top: auto; }
.search input, .filters input, .filters select, input, select, textarea {
  width: 100%; border: 1px solid var(--line); background: var(--paper);
  border-radius: 12px; padding: 10px 12px; font: inherit; color: inherit;
}
.sidebar .search input { background: #1b4a33; border-color: #2b6849; color: #fff; }
.main { padding: 28px 32px 60px; max-width: 1280px; }
.top { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; margin-bottom: 22px; }
.top h1 { margin: 0; font-size: 32px; letter-spacing: -.02em; }
.crumb { margin: 4px 0 0; color: var(--muted); }
.who { display: flex; align-items: center; gap: 10px; }
.who small { display: block; color: var(--muted); }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; background: var(--brand);
  color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px;
}
.avatar.sm { width: 32px; height: 32px; font-size: 11px; flex: none; }
.btn {
  background: var(--brand); color: #fff; border: 0; border-radius: 12px;
  padding: 10px 14px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; display: inline-flex;
}
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.danger { background: var(--danger); }
.btn.sm { padding: 7px 10px; font-size: 13px; }
.flash { padding: 12px 14px; border-radius: 12px; margin-bottom: 16px; }
.flash.ok { background: #e4f6ea; color: #14532d; }
.flash.err { background: #fde8e6; color: #9f1d12; }
.grid { display: grid; gap: 16px; }
.stats { grid-template-columns: repeat(4, 1fr); }
.stat, .panel, .card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--shadow); padding: 18px;
}
.stat b { display: block; font-size: 28px; font-family: Fraunces, serif; }
.stat span { color: var(--muted); font-size: 13px; }
.panel-h, .row-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.panel h3, .panel h2 { margin: 0; }
.muted { color: var(--muted); }
.tiny { font-size: 13px; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 8px; }
.table td { padding: 10px 8px; border-top: 1px solid var(--line); vertical-align: top; }
.table tr:hover td { background: #fbf6ea; }
.badge {
  display: inline-block; padding: 3px 8px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: var(--bg2); color: var(--ink);
}
.s-pass, .s-accepted, .s-client_accepted, .s-closed, .s-fixed { background: #dcfce7; color: #166534; }
.s-fail, .s-open { background: #fee2e2; color: #991b1b; }
.s-blocked, .s-wontfix { background: #f3e8ff; color: #6b21a8; }
.s-question, .s-retest, .s-in_review { background: #fef3c7; color: #92400e; }
.s-in_progress, .s-ready { background: #dbeafe; color: #1e40af; }
.s-not_started, .s-not_tested, .s-draft, .s-skipped { background: #e7e5e4; color: #44403c; }
.s-gap { background: #ffe4e6; color: #9f1239; }
.cov-covered { background: #dcfce7; color: #166534; }
.cov-partial { background: #fef3c7; color: #92400e; }
.cov-gap, .cov-unknown { background: #ffe4e6; color: #9f1239; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.filters > * { width: auto; min-width: 160px; flex: 1; }
.sev-critical { color: #991b1b; font-weight: 700; }
.sev-high { color: #b45309; font-weight: 700; }
.thread .comment { display: flex; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); }
.comment header { display: flex; gap: 8px; align-items: baseline; }
.comment em { font-style: normal; font-size: 12px; color: var(--muted); }
.comment time { margin-left: auto; font-size: 12px; color: var(--muted); }
.role-qa .avatar { background: #1d4e89; }
.role-client .avatar { background: #c4a35a; color: #1a241c; }
.composer textarea { margin: 12px 0; }
.steps { margin: 0; padding-left: 18px; }
.steps li { margin: 6px 0; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.media-card { border: 1px solid var(--line); border-radius: 14px; padding: 12px; background: var(--paper2); display: flex; flex-direction: column; gap: 6px; }
.media-card video, .media-card img, .media-card audio { width: 100%; border-radius: 10px; }
.media-form { display: grid; grid-template-columns: 1.4fr .7fr 1.4fr 1fr auto; gap: 8px; margin-top: 12px; }
.k { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.split { display: grid; grid-template-columns: 1.4fr .8fr; gap: 16px; }
.prose p { line-height: 1.55; }
.login-wrap { min-height: 100vh; display: grid; place-items: center; background:
  radial-gradient(1200px 500px at 10% -10%, #2f9e64 0%, transparent 50%),
  radial-gradient(900px 400px at 100% 100%, #c4a35a 0%, transparent 40%), var(--bg); }
.login {
  width: min(440px, 92vw); background: var(--paper); padding: 32px; border-radius: 24px;
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.login h1 { margin: 0 0 6px; }
.accounts { background: var(--paper2); border-radius: 14px; padding: 12px 14px; font-size: 13px; margin: 16px 0; }
.accounts code { font-family: ui-monospace, Consolas, monospace; }
.progress { height: 8px; background: var(--bg2); border-radius: 99px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), #3d9b6e); }
.mod-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.mod-card a { text-decoration: none; color: inherit; }
.inline-status { display: inline-block; }
.inline-status select { width: auto; min-width: 150px; padding: 6px 8px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid { display: grid; gap: 10px; }
.pill { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: #e8f4ec; color: var(--brand-d); }
.empty { color: var(--muted); font-size: 14px; }
.login-wrap .app, .login-page { display: block; }
@media (max-width: 980px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: sticky; top: 0; z-index: 5; flex-direction: row; flex-wrap: wrap; }
  .stats, .split, .media-form, .two { grid-template-columns: 1fr; }
  .main { padding: 16px; }
}
