@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;0,9..40,800;1,9..40,400&family=JetBrains+Mono:wght@500;600&display=swap');

:root {
  --ink: #1a1c1f;
  --text: #3a3f47;
  --muted: #7a8190;
  --line: #e4e1dd;
  --line-soft: #efeceb;
  --field-bg: #faf9f8;
  --field-border: #ddd8d3;
  --primary: #ed7a02;
  --primary2: #f9a61a;
  --hot: #ff5b2e;
  --ruby: #ef2f45;
  --grad: linear-gradient(105deg, #ef2f45 0%, #ff5b2e 38%, #ed7a02 72%, #f9a61a 100%);
  --grad-hover: linear-gradient(105deg, #e0283d 0%, #f54e22 38%, #de7000 72%, #f09a10 100%);
  --surface: #ffffff;
  --surface-glass: rgba(255, 255, 255, 0.88);
  --shadow: 0 4px 6px rgba(44, 24, 16, 0.02), 0 16px 40px rgba(44, 24, 16, 0.07);
  --shadow-sm: 0 1px 2px rgba(44, 24, 16, 0.04), 0 6px 16px rgba(44, 24, 16, 0.05);
  --shadow-btn: 0 8px 20px rgba(237, 122, 2, 0.28);
  --radius: 14px;
  --radius-sm: 10px;
  --radius-xs: 8px;
  --focus: 0 0 0 3px rgba(255, 91, 46, 0.16);
  --header-h: 68px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── Reset & base ── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "DM Sans", system-ui, sans-serif;
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  background:
    radial-gradient(ellipse 50% 40% at 6% 0%, rgba(239, 47, 69, 0.1), transparent 55%),
    radial-gradient(ellipse 40% 35% at 94% 4%, rgba(249, 166, 26, 0.12), transparent 50%),
    linear-gradient(180deg, #f7f5f4 0%, #efeded 100%);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; transition: color 0.15s var(--ease); }
button, input, select, textarea { font: inherit; }
.hidden { display: none !important; }
img { max-width: 100%; display: block; }

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.12) 0 1px, transparent 1px 72px),
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0 1px, transparent 1px 72px);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.22), transparent 70%);
  z-index: -1;
}

/* ── Logo ── */
.logo { width: 132px; height: auto; }

/* ── Login ── */
.login-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 48px;
  align-items: center;
  padding: 56px 68px;
}
.login-hero {
  min-height: 620px;
  border-radius: 28px;
  padding: 48px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.72));
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.95);
}
.login-hero h1 {
  font-size: clamp(36px, 4.5vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.04em;
  font-weight: 800;
  color: var(--ink);
  max-width: 720px;
  margin: 86px 0 16px;
}
.login-hero p {
  max-width: 560px;
  line-height: 1.7;
  color: var(--muted);
  font-size: 15px;
}
.qa-watermark {
  position: absolute;
  right: 5%;
  bottom: 8%;
  width: 340px;
  height: 340px;
  opacity: 0.55;
}
.qa-watermark::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 91, 46, 0.28), rgba(249, 166, 26, 0.14), transparent 70%);
}
.qa-card-3d {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 210px;
  height: 210px;
  transform: translate(-50%, -50%) rotateX(58deg) rotateZ(-36deg);
  border-radius: 34px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.55));
  box-shadow: 24px 34px 60px rgba(44, 24, 16, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.9);
}
.qa-card-3d::after {
  content: "QA";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) rotateZ(36deg);
  font-size: 74px;
  font-weight: 800;
  color: rgba(32, 32, 32, 0.14);
}

/* ── Cards ── */
.card {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 22px 24px;
  position: relative;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent 5%, rgba(255, 91, 46, 0.35), rgba(249, 166, 26, 0.3), transparent 95%);
}
.card > h3 {
  margin: 0 0 16px;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.login-card { padding: 36px 32px; }
.login-card h2 {
  font-size: 28px;
  margin: 0 0 6px;
  color: var(--ink);
  letter-spacing: -0.03em;
  font-weight: 800;
}
.login-card > p { margin: 0 0 22px; }

/* ── Forms ── */
label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 7px;
  letter-spacing: 0.01em;
}
label:has(input[type="checkbox"]) {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
}
input[type="checkbox"] {
  width: 16px !important;
  height: 16px;
  accent-color: var(--hot);
  cursor: pointer;
  flex-shrink: 0;
}

input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--field-border);
  border-radius: var(--radius-sm);
  background: var(--field-bg);
  outline: 0;
  color: var(--ink);
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease), background 0.15s var(--ease);
  appearance: none;
  -webkit-appearance: none;
}
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%237a8190' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}
textarea {
  min-height: 100px;
  resize: vertical;
  line-height: 1.55;
}
input:not([type="checkbox"]):not([type="radio"]):hover,
select:hover,
textarea:hover {
  border-color: #cfc8c1;
  background: #fff;
}
input:not([type="checkbox"]):not([type="radio"]):focus,
select:focus,
textarea:focus {
  border-color: rgba(255, 91, 46, 0.55);
  background: #fff;
  box-shadow: var(--focus);
}
input::placeholder,
textarea::placeholder {
  color: #a8aeb8;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 18px;
  align-items: end;
}
.form-grid > div { min-width: 0; }
.form-span-2 { grid-column: 1 / -1; }
.evidence-url-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}
.evidence-url-row input { flex: 1; }
.field-hint {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}
.multi-check {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
  padding: 12px;
  border: 1.5px solid var(--field-border);
  border-radius: var(--radius-sm);
  background: var(--field-bg);
}
.multi-check-item {
  display: flex !important;
  align-items: center;
  gap: 10px;
  margin: 0 !important;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--line-soft);
  font-weight: 650 !important;
  color: var(--text) !important;
  cursor: pointer;
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease);
}
.multi-check-item:hover {
  border-color: rgba(255, 91, 46, 0.35);
  background: #fff8f3;
}
.multi-check-item:has(input:checked) {
  border-color: rgba(255, 91, 46, 0.45);
  background: #fff3e8;
  color: var(--hot) !important;
}
.multi-check-item input[type="checkbox"] {
  width: 16px !important;
  height: 16px;
  accent-color: var(--hot);
  flex-shrink: 0;
}
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 18px;
}

/* Filter / toolbar forms */
.filter-bar,
form.filter-bar,
.card > form.form-grid.mb {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) auto;
  gap: 14px 16px;
  align-items: end;
  padding: 16px 18px;
  margin: -6px -8px 18px;
  background: linear-gradient(180deg, #faf8f7, #f5f3f1);
  border: 1.5px solid var(--line-soft);
  border-radius: var(--radius-sm);
}
.filter-bar .btn,
.card > form.form-grid.mb .btn {
  min-width: 100px;
  height: 42px;
  margin-top: 0 !important;
  align-self: end;
}
.filter-bar label,
.card > form.form-grid.mb label {
  margin-bottom: 6px;
}

/* ── Buttons ── */
.btn {
  border: 0;
  border-radius: var(--radius-sm);
  padding: 11px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease), background 0.15s var(--ease), color 0.15s var(--ease), border-color 0.15s var(--ease);
  white-space: nowrap;
  line-height: 1.2;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--grad);
  color: #fff;
  box-shadow: var(--shadow-btn);
}
.btn-primary:hover {
  background: var(--grad-hover);
  box-shadow: 0 10px 24px rgba(237, 122, 2, 0.34);
  transform: translateY(-1px);
}
.btn-light {
  background: #fff;
  color: var(--text);
  border: 1.5px solid var(--field-border);
  box-shadow: 0 1px 2px rgba(44, 24, 16, 0.03);
}
.btn-light:hover {
  border-color: #cfc8c1;
  background: var(--field-bg);
  color: var(--ink);
}
.btn-soft {
  background: #fff3e8;
  color: var(--hot);
  border: 1px solid rgba(255, 91, 46, 0.12);
}
.btn-soft:hover {
  background: #ffe9d6;
  color: #e04a1a;
}
.btn-danger {
  background: #fff1ef;
  color: #d84b3b;
  border: 1px solid rgba(216, 75, 59, 0.12);
}
.btn-danger:hover {
  background: #ffe4e0;
}
.btn-sm {
  font-size: 12px;
  padding: 7px 12px;
  border-radius: var(--radius-xs);
  font-weight: 650;
}
.w-100 { width: 100%; }
.mt { margin-top: 14px; }
.mb { margin-bottom: 14px; }

/* ── Header ── */
.app-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--surface-glass);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  border-bottom: 1px solid rgba(228, 225, 221, 0.85);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8), 0 8px 24px rgba(65, 65, 65, 0.04);
}
.app-header-inner {
  max-width: 1520px;
  margin: 0 auto;
  padding: 12px 28px;
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  min-height: var(--header-h);
}
.nav {
  display: flex;
  gap: 4px;
  justify-content: center;
  flex-wrap: wrap;
}
.nav a {
  height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 14px;
  border-radius: 999px;
  color: #5a606a;
  font-size: 13px;
  font-weight: 650;
  transition: background 0.18s var(--ease), color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.nav a:hover {
  background: #fff3e8;
  color: var(--hot);
}
.nav a.active {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 6px 16px rgba(237, 122, 2, 0.28);
}
.nav-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.7;
}
.nav a.active .nav-dot { opacity: 1; background: #fff; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.search {
  width: 240px;
  height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--field-bg);
  border: 1.5px solid var(--field-border);
  border-radius: 999px;
  padding: 0 14px;
  color: var(--muted);
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease), background 0.15s var(--ease);
}
.search:focus-within {
  border-color: rgba(255, 91, 46, 0.45);
  background: #fff;
  box-shadow: var(--focus);
}
.search input {
  border: 0 !important;
  background: transparent !important;
  padding: 0 !important;
  box-shadow: none !important;
  height: auto;
  width: 100%;
}
.search span { font-size: 15px; opacity: 0.7; }

.avatar,
.profile-toggle {
  min-width: 48px;
  height: 44px;
  border-radius: 999px;
  background: var(--grad);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 12px 0 10px;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  border: 0;
  box-shadow: 0 4px 12px rgba(237, 122, 2, 0.25);
  transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease);
  position: relative;
  z-index: 2;
}
.profile-toggle:hover,
.profile.is-open .profile-toggle {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(237, 122, 2, 0.35);
}
.profile-caret {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid rgba(255, 255, 255, 0.9);
  margin-left: 2px;
  transition: transform 0.15s var(--ease);
}
.profile.is-open .profile-caret { transform: rotate(180deg); }

.profile {
  position: relative;
  z-index: 90;
}
.profile-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 250px;
  background: #fff;
  box-shadow: 0 20px 50px rgba(44, 24, 16, 0.16);
  border: 1.5px solid var(--line-soft);
  border-radius: 14px;
  padding: 8px;
  z-index: 100;
  animation: menuIn 0.16s var(--ease);
}
.profile-menu[hidden] { display: none !important; }
.profile-menu::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -12px;
  height: 12px;
}
@keyframes menuIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
.profile-menu-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--line-soft);
}
.profile-menu-head strong {
  color: var(--ink);
  font-size: 14px;
}
.profile-menu-head small {
  color: var(--muted);
  font-weight: 500;
  font-size: 12px;
}
.profile-menu a,
.profile-menu button {
  display: flex;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 12px 14px;
  min-height: 44px;
  border-radius: 10px;
  font-weight: 650;
  font-size: 13.5px;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  align-items: center;
  transition: background 0.12s var(--ease), color 0.12s var(--ease);
}
.profile-menu a:hover,
.profile-menu button:hover {
  background: #fff3e8;
  color: var(--hot);
}

/* ── Main layout ── */
.main {
  max-width: 1520px;
  margin: 0 auto;
  padding: 32px 28px 48px;
}
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 22px;
}
.page-head h1 {
  font-size: clamp(26px, 3vw, 34px);
  color: var(--ink);
  margin: 0 0 6px;
  letter-spacing: -0.035em;
  font-weight: 800;
  line-height: 1.15;
}
.page-head p {
  color: var(--muted);
  margin: 0;
  line-height: 1.55;
  max-width: 560px;
  font-size: 14px;
}
.page-head .btn { flex-shrink: 0; }

/* ── Grid ── */
.grid { display: grid; gap: 16px; }
.grid-1 { grid-template-columns: minmax(0, 1fr); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ── Stats / KPIs ── */
.stat {
  min-height: 140px;
  display: flex;
  flex-direction: column;
}
.stat h2 {
  font-size: 32px;
  margin: 8px 0;
  color: var(--ink);
  letter-spacing: -0.04em;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.stat > span:first-child {
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.stat p {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 auto;
}
.kpi-link { display: block; transition: transform 0.2s var(--ease); }
.kpi-link:hover { transform: translateY(-3px); }
.kpi-link:hover .card {
  box-shadow: var(--shadow);
  border-color: rgba(255, 91, 46, 0.18);
}
.kpi-action {
  color: var(--hot);
  font-weight: 750;
  font-size: 12px;
  margin-top: 10px;
  display: inline-block;
}

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.4;
}
.b-green { background: #e6f7ef; color: #0f8f5f; }
.b-red { background: #fff0ee; color: #c93a2c; box-shadow: 0 0 0 1px rgba(201, 58, 44, 0.08); }
.b-yellow { background: #fff6e5; color: #a85f00; }
.b-gray { background: #f3f2f1; color: #5f646d; }
.b-blue { background: #f0f1f2; color: #7d828b; }
.b-purple { background: #fff1e7; color: var(--hot); }

/* ── Tables ── */
.table-wrap {
  overflow: auto;
  margin: 0 -4px;
  border-radius: var(--radius-xs);
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
}
th, td {
  padding: 14px 12px;
  text-align: left;
  font-size: 13px;
  vertical-align: middle;
}
th {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: #faf8f7;
  border-bottom: 1.5px solid var(--line);
  white-space: nowrap;
}
td {
  border-bottom: 1px solid var(--line-soft);
  color: var(--text);
}
tbody tr {
  transition: background 0.12s var(--ease);
}
tbody tr:hover {
  background: #faf8f7;
}
tbody tr:last-child td { border-bottom: 0; }
td strong {
  color: var(--ink);
  font-weight: 700;
  font-family: "JetBrains Mono", "DM Sans", monospace;
  font-size: 12.5px;
  letter-spacing: -0.02em;
}
td small,
td br + * {
  color: var(--muted);
}
td .btn-sm { margin-top: 0; }

/* Pagination */
.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  padding: 16px 0 0;
  margin: 16px 0 0;
  border-top: 1px solid var(--line-soft);
  justify-content: flex-end;
}
.pagination li a,
.pagination li span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 650;
  color: var(--text);
  border: 1px solid transparent;
}
.pagination li a:hover {
  background: #fff3e8;
  color: var(--hot);
}
.pagination li.active span,
.pagination .active > span {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 4px 12px rgba(237, 122, 2, 0.25);
}
.pagination li.disabled span {
  opacity: 0.4;
  cursor: default;
}

/* ── Progress ── */
.progress {
  height: 8px;
  width: 112px;
  background: #efeceb;
  border-radius: 999px;
  overflow: hidden;
  display: inline-block;
  vertical-align: middle;
  margin-right: 6px;
}
.progress span {
  display: block;
  height: 100%;
  background: var(--grad);
  border-radius: inherit;
  transition: width 0.4s var(--ease);
}

/* ── Workflow ── */
.workflow {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}
.step {
  min-height: 154px;
  text-align: center;
  background: linear-gradient(180deg, #fff, #faf8f7);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 16px 12px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s var(--ease), border-color 0.15s var(--ease);
}
.step:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 91, 46, 0.2);
}
.circle {
  width: 36px;
  height: 36px;
  margin: auto;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff3e8;
  color: var(--hot);
  font-weight: 800;
  font-size: 13px;
}
.step strong {
  display: block;
  margin: 12px 0 6px;
  color: var(--ink);
  font-size: 13px;
}
.step span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}
.step.done { background: #fbfffc; border-color: #d5eadf; }
.step.done .circle { background: #e8faf2; color: #14a06f; }
.step.blocked { background: #fffaf3; border-color: #f6dfbc; }
.step.blocked .circle { background: #fff5e7; color: #b66a00; }

/* ── Tabs ── */
.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.tab {
  padding: 9px 16px;
  border-radius: 999px;
  background: #fff;
  border: 1.5px solid var(--field-border);
  font-weight: 700;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s var(--ease);
}
.tab:hover { border-color: rgba(255, 91, 46, 0.35); color: var(--hot); }
.tab.active {
  background: var(--grad);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 6px 16px rgba(237, 122, 2, 0.25);
}
.tab-panel { display: block; }
.tab-panel.hidden { display: none !important; }

/* ── Settings ── */
.settings-grid {
  display: grid;
  grid-template-columns: 380px minmax(0, 1fr);
  gap: 18px;
}
.setting-rule {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 14px 16px;
  border: 1.5px solid var(--line-soft);
  border-radius: 12px;
  background: var(--field-bg);
  margin-bottom: 10px;
  transition: border-color 0.15s var(--ease);
}
.setting-rule:hover { border-color: var(--field-border); }
.switch {
  width: 48px;
  height: 26px;
  border-radius: 999px;
  border: 0;
  padding: 3px;
  background: #d5d0cb;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s var(--ease);
}
.switch span {
  display: block;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s var(--ease);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}
.switch.on { background: var(--grad); }
.switch.on span { transform: translateX(22px); }

.template-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.template-tab {
  border: 1.5px solid var(--field-border);
  background: #fff;
  border-radius: 999px;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s var(--ease);
}
.template-tab:hover { border-color: rgba(255, 91, 46, 0.35); color: var(--hot); }
.template-tab.active {
  background: var(--grad);
  color: white;
  border-color: transparent;
}
.category-card {
  border: 1.5px solid var(--line-soft);
  background: var(--field-bg);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 12px;
}
.category-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.checklist-manage-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
}
.add-inline {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-top: 12px;
  align-items: end;
}

/* ── Alerts ── */
.alert {
  padding: 13px 16px;
  border-radius: 12px;
  margin-bottom: 16px;
  font-size: 13.5px;
  font-weight: 550;
  border: 1px solid transparent;
}
.alert-success {
  background: #e8faf2;
  color: #14724f;
  border-color: #c5ebd8;
}
.alert-danger {
  background: #fff1ef;
  color: #b91c1c;
  border-color: #f5cdc8;
}
.alert ul {
  margin: 8px 0 0;
  padding-left: 18px;
}
.alert li { margin-bottom: 2px; }

/* ── Footer ── */
.footer {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid rgba(228, 225, 221, 0.6);
  letter-spacing: 0.01em;
}

/* ── Project show ── */
.project-hero {
  display: grid;
  grid-template-columns: 1.35fr 0.75fr 0.75fr 0.75fr;
  gap: 14px;
  margin-bottom: 16px;
}
.info-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line-soft);
  padding: 10px 0;
  font-size: 13px;
}
.info-row:last-child { border-bottom: 0; }
.info-row span { color: var(--muted); }
.info-row strong {
  text-align: right;
  color: var(--ink);
  max-width: 60%;
  word-break: break-all;
  font-family: inherit;
  font-size: 13px;
}

.stat.green::after { background: radial-gradient(circle, rgba(20, 160, 111, 0.11), transparent 66%); }
.stat.orange::after { background: radial-gradient(circle, rgba(249, 166, 26, 0.12), transparent 66%); }
.stat.red::after { background: radial-gradient(circle, rgba(217, 75, 63, 0.1), transparent 66%); }

/* Checklist */
.check-summary {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}
.check-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 14px;
  align-items: start;
}
.check-nav { position: sticky; top: 86px; }
.check-nav h3 { margin: 0 0 10px; font-size: 15px; color: var(--ink); }
.check-nav button {
  width: 100%;
  border: 1.5px solid var(--line-soft);
  background: #fff;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  text-align: left;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all 0.15s var(--ease);
}
.check-nav button:hover {
  border-color: rgba(255, 91, 46, 0.25);
  color: var(--hot);
}
.check-nav button.active {
  background: #fff3e8;
  color: var(--hot);
  border-color: rgba(255, 91, 46, 0.22);
}

.check-section { display: none; }
.check-section.active { display: block; }
.check-group-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
  gap: 12px;
}
.check-group-head h3 { margin: 0; color: var(--ink); }
.check-progress-line {
  height: 7px;
  background: #efeceb;
  border-radius: 999px;
  overflow: hidden;
  margin: 8px 0;
}
.check-progress-line span {
  display: block;
  height: 100%;
  background: var(--grad);
  border-radius: 999px;
}

.check-item {
  display: grid;
  grid-template-columns: 1.25fr 120px 160px 160px 1fr;
  gap: 10px;
  align-items: start;
  border: 1.5px solid var(--line-soft);
  background: #fff;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 8px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s var(--ease);
}
.check-item:hover { border-color: var(--field-border); }
.check-item.failed { border-color: #f0c5c0; background: #fffafa; }
.check-item.passed { border-color: #d5eadf; background: #fbfffc; }
.check-title strong {
  display: block;
  font-size: 13px;
  margin-bottom: 4px;
  color: var(--ink);
  font-family: inherit;
}
.check-title small {
  display: block;
  color: var(--muted);
  line-height: 1.4;
  font-size: 11px;
}
.check-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: flex-start;
  padding-top: 2px;
}

/* ── Focus visibility ── */
:focus-visible {
  outline: 2px solid rgba(255, 91, 46, 0.55);
  outline-offset: 2px;
}
.btn:focus-visible,
.nav a:focus-visible {
  outline-offset: 3px;
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── Responsive ── */
@media (max-width: 1280px) {
  .project-hero { grid-template-columns: 1fr 1fr; }
  .check-item { grid-template-columns: 1.2fr 110px 1fr 1fr 1fr; }
}
@media (max-width: 1100px) {
  .app-header-inner { grid-template-columns: 1fr; padding: 12px 18px; }
  .nav { justify-content: flex-start; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .workflow { grid-template-columns: repeat(3, 1fr); }
  .settings-grid,
  .login-wrap { grid-template-columns: 1fr; }
  .project-hero { grid-template-columns: 1fr 1fr; }
  .check-layout { grid-template-columns: 1fr; }
  .check-nav { position: static; }
  .check-summary { grid-template-columns: repeat(3, 1fr); }
  .header-actions { width: 100%; }
  .search { flex: 1; width: auto; }
}
@media (max-width: 760px) {
  .main { padding: 18px 16px 36px; }
  .page-head { flex-direction: column; align-items: stretch; }
  .page-head .btn { width: 100%; }
  .grid-4,
  .grid-3,
  .grid-2,
  .form-grid { grid-template-columns: 1fr; }
  .card > form.form-grid.mb,
  .filter-bar {
    grid-template-columns: 1fr;
    margin-left: 0;
    margin-right: 0;
  }
  .card > form.form-grid.mb .btn,
  .filter-bar .btn { width: 100%; }
  .workflow { grid-template-columns: 1fr; }
  .login-wrap { padding: 20px; gap: 24px; }
  .login-hero { min-height: 420px; padding: 28px; border-radius: 20px; }
  .login-hero h1 { font-size: 32px; margin-top: 48px; }
  .qa-watermark { opacity: 0.28; width: 220px; height: 220px; }
  .login-card { padding: 28px 22px; }
  .search { width: 100%; }
  table { min-width: 760px; }
  .project-hero,
  .check-summary { grid-template-columns: 1fr; }
  .check-item { grid-template-columns: 1fr; }
  .card { padding: 16px; }
}

/* ── File upload ── */
.file-upload {
  position: relative;
}
.file-upload input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  z-index: -1;
  padding: 0;
  border: 0;
}
.file-upload-label {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 74px;
  padding: 14px 16px;
  border: 1.5px dashed var(--field-border);
  border-radius: var(--radius-sm);
  background: var(--field-bg);
  cursor: pointer;
  margin: 0;
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease);
}
.file-upload:has(input:focus-visible) .file-upload-label,
.file-upload-label:hover {
  border-color: rgba(255, 91, 46, 0.55);
  background: #fff8f3;
}
.file-upload-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff3e8;
  color: var(--hot);
  font-size: 16px;
  font-weight: 800;
  flex-shrink: 0;
}
.file-upload-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-weight: 600;
  color: var(--ink);
}
.file-upload-text small {
  color: var(--muted);
  font-weight: 500;
  font-size: 12px;
}
.file-upload-name {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  font-weight: 650;
  color: var(--hot);
  min-height: 1em;
}
.file-upload-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.file-upload-list li {
  font-size: 12px;
  font-weight: 650;
  color: var(--hot);
  background: #fff3e8;
  border: 1px solid rgba(255, 91, 46, 0.12);
  border-radius: 8px;
  padding: 8px 10px;
  word-break: break-all;
}
.field-error {
  margin-top: 6px;
  color: #b91c1c;
  font-size: 12px;
  font-weight: 650;
}
.muted { color: var(--muted); }

/* ── WYSIWYG comment editor (Quill) ── */
.wysiwyg-editor {
  background: var(--field-bg);
}
.wysiwyg-editor .ql-toolbar.ql-snow {
  border: 1.5px solid var(--field-border);
  border-bottom: 0;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  background: var(--field-bg);
}
.wysiwyg-editor .ql-container.ql-snow {
  border: 1.5px solid var(--field-border);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  background: #fff;
  font-family: inherit;
  font-size: 14px;
}
.wysiwyg-editor .ql-editor {
  min-height: 110px;
  line-height: 1.55;
}
.wysiwyg-editor.ql-focused .ql-toolbar.ql-snow,
.wysiwyg-editor.ql-focused .ql-container.ql-snow {
  border-color: rgba(255, 91, 46, 0.55);
}
.wysiwyg-editor.is-invalid .ql-toolbar.ql-snow,
.wysiwyg-editor.is-invalid .ql-container.ql-snow {
  border-color: #b91c1c;
}

/* ── Evidence display ── */
.evidence-box {
  margin-top: 4px;
  padding: 14px;
  border: 1.5px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: var(--field-bg);
}
.evidence-image {
  display: block;
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--line-soft);
}
.evidence-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.evidence-meta span {
  font-size: 12px;
  font-weight: 650;
  color: var(--text);
  word-break: break-all;
}
.evidence-file {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.evidence-file-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--grad);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}
.evidence-file strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
  font-family: inherit;
}
.evidence-file small {
  color: var(--muted);
  font-size: 12px;
}
.evidence-file .btn { margin-left: auto; }
.evidence-url-text {
  display: block;
  word-break: break-all;
  max-width: 280px;
}

/* ── Bug show page ── */
.bug-code-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 6px;
}
.bug-code-row h1 { margin: 0; }
.bug-submeta {
  margin: 4px 0 0 !important;
  font-size: 13px !important;
}
.bug-show-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.85fr);
  gap: 18px;
  align-items: start;
}
.bug-show-side { position: sticky; top: 88px; }
.bug-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.bug-meta-item {
  background: var(--field-bg);
  border: 1.5px solid var(--line-soft);
  border-radius: 12px;
  padding: 12px 14px;
}
.bug-meta-item span {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 4px;
}
.bug-meta-item strong {
  color: var(--ink);
  font-size: 14px;
  font-family: inherit;
  word-break: break-word;
}
.bug-section { margin-top: 4px; }
.bug-section h4,
.bug-section-split h4 {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.bug-section-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 16px;
}
.bug-prose {
  background: var(--field-bg);
  border: 1.5px solid var(--line-soft);
  border-radius: 12px;
  padding: 14px 16px;
  line-height: 1.65;
  color: var(--text);
  white-space: pre-wrap;
}
.bug-prose-actual {
  border-color: rgba(216, 75, 59, 0.18);
  background: #fff8f7;
}
.evidence-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}
.evidence-tile {
  border: 1.5px solid var(--line-soft);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.evidence-tile-preview {
  display: block;
  height: 140px;
  background: #f3f1ef;
  overflow: hidden;
}
.evidence-tile-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.evidence-tile-pdf {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #fff3e8, #ffe8dc);
  color: var(--hot);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.06em;
}
.evidence-tile-meta {
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.evidence-tile-meta strong {
  font-size: 12px;
  color: var(--ink);
  font-family: inherit;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.evidence-tile-meta small {
  color: var(--muted);
  font-size: 11px;
}
.evidence-tile-meta .btn { align-self: flex-start; margin-top: 4px; }
.evidence-tile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.evidence-tile-actions form { margin: 0; }
.form-grid-side {
  grid-template-columns: 1fr;
}
.history-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
}
.history-item:last-child { border-bottom: 0; padding-bottom: 0; }
.history-item-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
  flex-wrap: wrap;
}
.history-item-head strong { color: var(--ink); font-size: 13px; }
.history-item-head small { color: var(--muted); font-size: 11px; }
.history-status {
  display: inline-flex;
  margin: 6px 0;
  padding: 3px 8px;
  border-radius: 999px;
  background: #fff3e8;
  color: var(--hot);
  font-size: 11px;
  font-weight: 700;
}
.history-item p,
.history-comment {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
}
.history-comment p { margin: 0 0 6px; }
.history-comment p:last-child { margin-bottom: 0; }
.history-comment ul,
.history-comment ol {
  margin: 4px 0;
  padding-left: 20px;
}
.history-comment code {
  background: #fff3e8;
  color: var(--hot);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 12px;
}
.card h3 small {
  font-size: 12px;
  font-weight: 600;
  margin-left: 6px;
}

@media (max-width: 1100px) {
  .bug-show-layout { grid-template-columns: 1fr; }
  .bug-show-side { position: static; }
  .bug-meta-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .bug-meta-grid,
  .bug-section-split { grid-template-columns: 1fr; }
  .evidence-gallery { grid-template-columns: 1fr; }
}
.history-card {
  padding: 14px !important;
  box-shadow: none !important;
}
.history-card::before { display: none; }
.history-card small {
  display: block;
  color: var(--muted);
  margin: 2px 0 8px;
}

/* ── Profile ── */
.profile-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.profile-summary {
  text-align: center;
  padding: 28px 22px !important;
}
.profile-avatar-lg {
  width: 88px;
  height: 88px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 800;
  box-shadow: var(--shadow-btn);
}
.profile-summary h2 {
  margin: 0 0 4px;
  font-size: 20px;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.profile-summary > .muted { margin: 0 0 12px; }
.profile-meta {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
  display: grid;
  gap: 10px;
  text-align: left;
}
.profile-meta div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
}
.profile-meta span { color: var(--muted); }
.profile-meta strong { color: var(--ink); font-family: inherit; }
.profile-form h3 { margin-top: 8px; }

/* ── Settings redesign ── */
.settings-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.settings-side { position: sticky; top: 88px; }
.settings-side-note {
  margin: -4px 0 14px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.45;
}
.setting-rule h4 {
  margin: 0 0 4px;
  font-size: 13.5px;
  color: var(--ink);
}
.setting-rule p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}
.settings-main-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.settings-main-head h3 { margin: 0 0 4px; }
.settings-main-head .muted { margin: 0; font-size: 13px; }

.type-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-soft);
}
.type-tab {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1.5px solid var(--field-border);
  background: #fff;
  font-weight: 700;
  font-size: 13px;
  color: var(--text);
  transition: all 0.15s var(--ease);
}
.type-tab small {
  font-weight: 600;
  color: var(--muted);
  font-size: 11px;
}
.type-tab:hover {
  border-color: rgba(255, 91, 46, 0.35);
  color: var(--hot);
}
.type-tab.active {
  background: var(--grad);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 6px 16px rgba(237, 122, 2, 0.25);
}
.type-tab.active small { color: rgba(255, 255, 255, 0.85); }
.type-tab.is-inactive { opacity: 0.65; border-style: dashed; }

.type-panel-toolbar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 16px;
}
.inline-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.inline-actions input { flex: 1; min-width: 0; }

.settings-accordion {
  border: 1.5px solid var(--line-soft);
  border-radius: 14px;
  background: var(--field-bg);
  margin-bottom: 12px;
  overflow: hidden;
}
.settings-accordion summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  font-weight: 700;
  color: var(--ink);
  background: #fff;
}
.settings-accordion summary::-webkit-details-marker { display: none; }
.settings-accordion-title::before {
  content: "▸";
  display: inline-block;
  margin-right: 8px;
  color: var(--hot);
  transition: transform 0.15s var(--ease);
}
.settings-accordion[open] .settings-accordion-title::before {
  transform: rotate(90deg);
}
.settings-accordion-body {
  padding: 0 14px 14px;
  border-top: 1px solid var(--line-soft);
  background: #fff;
}
.category-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
}

.checklist-table {
  border: 1.5px solid var(--line-soft);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 12px;
}
.checklist-table-head,
.checklist-table-row {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) 120px 110px 160px;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
}
.checklist-table-head {
  background: #faf8f7;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  border-bottom: 1px solid var(--line-soft);
}
.checklist-table-row {
  border-bottom: 1px solid var(--line-soft);
  margin: 0;
}
.checklist-table-row:last-of-type { border-bottom: 0; }
.checklist-table-row input,
.checklist-table-row select {
  margin: 0;
  padding: 9px 10px;
}
.row-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.checklist-empty { padding: 14px; margin: 0; }
.add-item-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 130px auto;
  gap: 8px;
  align-items: center;
  padding: 12px;
  background: #faf8f7;
  border: 1.5px dashed var(--field-border);
  border-radius: 12px;
}

.status-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.status-row {
  padding: 10px;
  border: 1.5px solid var(--line-soft);
  border-radius: 12px;
  background: var(--field-bg);
}
.status-edit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 70px auto;
  gap: 6px;
  margin-bottom: 8px;
}
.status-edit input[type="number"] { padding: 9px 8px; }
.status-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

@media (max-width: 1100px) {
  .profile-layout,
  .settings-layout { grid-template-columns: 1fr; }
  .settings-side { position: static; }
  .type-panel-toolbar { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .checklist-table-head { display: none; }
  .checklist-table-row,
  .add-item-bar {
    grid-template-columns: 1fr;
  }
  .row-actions { width: 100%; }
  .row-actions .btn { flex: 1; }
}

