/* Verellen ERP — design system
   Warm, considered palette for a heritage upholstery manufacturer.
   No build step: plain CSS custom properties, no framework. */

:root {
  /* Palette */
  --color-bg: #faf8f4;
  --color-surface: #ffffff;
  --color-surface-sunken: #f3efe7;
  --color-border: #e7e0d4;
  --color-border-strong: #d8cfbe;

  --color-text: #2a2620;
  --color-text-muted: #756e60;
  --color-text-faint: #a39a89;

  --color-ink: #1f2b23;       /* deep forest — sidebar, headings */
  --color-ink-light: #33473b;
  --color-accent: #a85c3a;    /* warm clay/terracotta — primary actions */
  --color-accent-hover: #94502f;
  --color-accent-soft: #f3e3da;

  --color-success: #3c6e4f;
  --color-success-bg: #e5efe6;
  --color-warning: #a3491f;
  --color-warning-bg: #fbe9de;
  --color-danger: #a3341f;
  --color-danger-bg: #fbe4de;

  /* Type */
  --font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-serif: Iowan Old Style, "Palatino Linotype", Palatino, Georgia, serif;

  /* Scale */
  --radius-sm: 5px;
  --radius-md: 8px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(31, 25, 15, 0.06);
  --shadow-md: 0 4px 16px rgba(31, 25, 15, 0.08);
  --sidebar-w: 232px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-ui);
  font-size: 14.5px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0 0 0.5rem; font-weight: 600; letter-spacing: -0.01em; color: var(--color-text); }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1rem; margin-bottom: 0.75rem; }
p { margin: 0 0 0.75rem; }
a { color: var(--color-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* App shell */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--color-ink);
  color: #e9e4d8;
  display: flex;
  flex-direction: column;
  padding: 1.25rem 0.9rem;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.brand {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  color: #fff;
  letter-spacing: 0.01em;
  padding: 0.4rem 0.6rem 1.5rem;
}
.brand small { display: block; font-family: var(--font-ui); font-size: 0.68rem; color: #a8b8ac; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; margin-top: 0.15rem; }
.sidebar .brand img {
  display: block;
  max-width: 150px;
  width: 100%;
  height: auto;
  /* Source mark is black-on-transparent (built for light surfaces);
     invert it to read as off-white against the dark sidebar. */
  filter: invert(1) brightness(1.3);
}
.sidebar .brand small { margin-top: 0.6rem; }

.nav-group { margin-bottom: 1.25rem; }
.nav-label { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; color: #8fa397; padding: 0 0.6rem; margin-bottom: 0.4rem; }

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.6rem;
  border-radius: var(--radius-sm);
  color: #cdd8cf;
  font-size: 0.9rem;
  font-weight: 500;
}
.nav-link svg { width: 16px; height: 16px; flex-shrink: 0; opacity: 0.85; }
.nav-link:hover { background: rgba(255,255,255,0.06); color: #fff; text-decoration: none; }
.nav-link.active { background: var(--color-accent); color: #fff; }
.nav-link.disabled { color: #62705f; cursor: default; }
.nav-link.disabled:hover { background: none; color: #62705f; }

.sidebar-footer { margin-top: auto; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,0.08); }

.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 2rem;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
}
.topbar h1 { margin: 0; }
.topbar-meta { color: var(--color-text-muted); font-size: 0.85rem; margin-top: 0.15rem; }

.content { padding: 1.75rem 2rem; max-width: 1180px; width: 100%; margin: 0 auto; }

/* Cards */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 1.25rem 1.4rem;
  margin-bottom: 1.25rem;
}
.card h3 { color: var(--color-text-muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }

/* Tables */
.table-wrap { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 0.7rem 1rem; font-size: 0.88rem; }
thead th { background: var(--color-surface-sunken); color: var(--color-text-muted); font-weight: 600; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 1px solid var(--color-border); }
tbody tr { border-bottom: 1px solid var(--color-border); transition: background 0.1s ease; }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--color-surface-sunken); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table-empty { padding: 2.5rem 1rem; text-align: center; color: var(--color-text-faint); }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.18rem 0.55rem; border-radius: 99px; font-size: 0.74rem; font-weight: 600; letter-spacing: 0.01em; }
.badge-hold { background: var(--color-warning-bg); color: var(--color-warning); }
.badge-ok { background: var(--color-success-bg); color: var(--color-success); }
.badge-neutral { background: var(--color-surface-sunken); color: var(--color-text-muted); }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* Buttons */
.btn, button {
  font-family: inherit;
  background: var(--color-accent);
  color: #fff;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.87rem;
  font-weight: 600;
  transition: background 0.12s ease;
}
.btn:hover, button:hover { background: var(--color-accent-hover); text-decoration: none; }
.btn-secondary, button.btn-secondary {
  background: transparent;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border-strong);
}
.btn-secondary:hover, button.btn-secondary:hover { background: var(--color-surface-sunken); color: var(--color-text); }
.btn-sm { padding: 0.32rem 0.7rem; font-size: 0.8rem; }
.btn-icon { padding: 0.4rem; }
.logout-form { margin: 0.15rem 0; }
.sidebar .btn-logout {
  width: 100%;
  justify-content: center;
  font-size: 0.8rem;
  padding: 0.4rem 0.7rem;
  color: #e9e4d8;
  border-color: rgba(255, 255, 255, 0.35);
}
.sidebar .btn-logout:hover { color: #fff; border-color: rgba(255, 255, 255, 0.5); }

/* Forms */
label { display: block; font-size: 0.78rem; font-weight: 600; color: var(--color-text-muted); margin-bottom: 0.3rem; }
input[type="text"], input[type="password"], input[type="email"], input[type="date"], input[type="number"], select, textarea {
  font-family: inherit;
  font-size: 0.88rem;
  padding: 0.48rem 0.65rem;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-text);
  width: 100%;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-soft);
}
input.field-locked {
  background: var(--color-surface-sunken);
  color: var(--color-text-muted);
  cursor: not-allowed;
}
input.field-locked:focus { box-shadow: none; border-color: var(--color-border-strong); }
/* Same look as a locked input, for a coded value shown as text beside its hidden code. */
div.field-locked {
  font-size: 0.88rem;
  padding: 0.48rem 0.65rem;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  background: var(--color-surface-sunken);
  color: var(--color-text-muted);
  min-height: 2.28rem;
}
form p { margin-bottom: 0.85rem; }

.filters { display: flex; gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap; align-items: end; }
.filters > div { min-width: 180px; }
.filters button { margin-top: 0; height: 38px; }

form.inline { display: inline-flex; }

/* Login */
.login-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(rgba(31, 43, 35, 0.35), rgba(31, 43, 35, 0.45)),
    url("../images/VerellenBackground.png") center center / cover no-repeat;
  /* Black/dark-grey accent on the login screens only — the rest of the
     ERP keeps its terracotta accent, this just overrides the variable
     for everything inside this shell (buttons, links, input focus). */
  --color-accent: #262626;
  --color-accent-hover: #000000;
  --color-accent-soft: #ececec;
}
.login-card { background: var(--color-surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); padding: 2.5rem 2.25rem; width: 100%; max-width: 340px; }
.login-card .brand {
  padding: 0;
  color: var(--color-ink);
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.login-card .brand img { max-width: 200px; width: 100%; height: auto; display: block; }
.login-card .brand small { margin-top: 0.5rem; }
.login-card .brand small { color: var(--color-text-muted); }

/* Read-only mode — a standing bar, not a dismissible message. It is a
   property of how the server was started, so it stays put on every page. */
.readonly-bar {
  display: flex; align-items: baseline; gap: 0.6rem; flex-wrap: wrap;
  padding: 0.6rem 2rem;
  background: var(--color-warning-bg);
  border-bottom: 1px solid var(--color-border-strong);
  color: var(--color-warning);
  font-size: 0.82rem;
}
.readonly-bar strong { text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.72rem; font-weight: 600; }
.readonly-bar span { color: var(--color-text-muted); }

/* Messages */
.message { background: var(--color-accent-soft); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 0.75rem 1rem; margin-bottom: 1rem; font-size: 0.88rem; }

/* Detail-page tabs */
.detail-tabs { display: flex; gap: 0.25rem; border-bottom: 1px solid var(--color-border); margin-bottom: 1.25rem; }
.detail-tab {
  background: none;
  border: none;
  padding: 0.6rem 1rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.detail-tab:hover { color: var(--color-text); background: none; }
.detail-tab.active { color: var(--color-accent); border-bottom-color: var(--color-accent); }
.detail-tab-panel { display: none; }
.detail-tab-panel.active { display: block; }

/* Collapsible line-item blocks */
details.line-block { border: 1px solid var(--color-border); border-radius: var(--radius-md); margin-bottom: 0.6rem; }
details.line-block summary {
  list-style: none;
  cursor: pointer;
  padding: 0.7rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  border-radius: var(--radius-md);
}
details.line-block summary::-webkit-details-marker { display: none; }
details.line-block summary::before {
  content: "›";
  display: inline-block;
  margin-right: 0.5rem;
  color: var(--color-text-faint);
  transition: transform 0.12s ease;
}
details.line-block[open] summary::before { transform: rotate(90deg); }
details.line-block[open] summary { border-bottom: 1px solid var(--color-border); background: var(--color-surface-sunken); border-radius: var(--radius-md) var(--radius-md) 0 0; }
summary .line-summary-main { font-weight: 600; }
summary .line-summary-meta { color: var(--color-text-muted); font-size: 0.85rem; }

.line-detail { display: flex; gap: 2rem; padding: 1rem; flex-wrap: wrap; }
.line-detail-col { flex: 1; min-width: 240px; }
.line-detail-col h4 { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--color-text-muted); margin-bottom: 0.6rem; }
.line-detail-col ul { list-style: none; padding: 0; margin: 0 0 0.75rem; }
.line-detail-col li { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; padding: 0.4rem 0; border-bottom: 1px solid var(--color-border); font-size: 0.85rem; }
.line-detail-col li:last-child { border-bottom: none; }
.line-detail-actions { padding: 0 1rem 1rem; }
.mini-form { display: flex; gap: 0.4rem; flex-wrap: wrap; align-items: center; }
.mini-form select, .mini-form input { width: auto; min-width: 120px; }

/* Product search (Add Line) */
.product-search { position: relative; width: auto; min-width: 220px; }
.product-search input[type="text"] { width: 100%; min-width: 220px; }
.search-dropdown {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 20;
  background: var(--color-surface); border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-md);
  margin-top: 0.25rem; max-height: 260px; overflow-y: auto;
}
.search-dropdown:empty { display: none; }
.search-result-item { padding: 0.5rem 0.7rem; font-size: 0.85rem; cursor: pointer; border-bottom: 1px solid var(--color-border); }
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--color-surface-sunken); }
.search-result-empty { padding: 0.5rem 0.7rem; font-size: 0.85rem; }

/* BOM tree */
.bom-node { margin-bottom: 0.4rem; }
.bom-node-row { display: flex; align-items: center; gap: 0.75rem; padding: 0.55rem 0.85rem; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-sm); }
.bom-node-label { font-weight: 600; flex: 1; font-size: 0.9rem; }
.bom-node-qty { color: var(--color-text-muted); font-size: 0.8rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bom-node-children { margin: 0.45rem 0 0.3rem 1.6rem; padding-left: 1rem; border-left: 2px solid var(--color-border); }
details.bom-add-child { margin: 0.3rem 0 0.75rem 1.6rem; }
details.bom-add-child summary { cursor: pointer; color: var(--color-text-faint); font-size: 0.78rem; list-style: none; padding: 0.2rem 0; }
details.bom-add-child summary::-webkit-details-marker { display: none; }
details.bom-add-child[open] summary { color: var(--color-text-muted); }
details.bom-add-child form { margin-top: 0.5rem; }

/* Scheduling board */
.col-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--color-text-muted); margin-bottom: 0.5rem; }
.week-row { display: flex; gap: 0.75rem; overflow-x: auto; padding-bottom: 0.25rem; }
.day-col { flex: 0 0 148px; background: var(--color-surface-sunken); border-radius: var(--radius-md); padding: 0.6rem; }
.day-col-header { display: flex; justify-content: space-between; align-items: center; font-size: 0.78rem; font-weight: 600; color: var(--color-text-muted); margin-bottom: 0.5rem; }
.day-col-empty { color: var(--color-text-faint); font-size: 0.8rem; padding: 0.4rem 0; text-align: center; }
.wo-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-sm); padding: 0.5rem 0.6rem; margin-bottom: 0.5rem; }
.wo-card-main { font-size: 0.8rem; font-weight: 600; margin-bottom: 0.15rem; }
.wo-card-meta { font-size: 0.75rem; color: var(--color-text-muted); margin-bottom: 0.4rem; }
.wo-card form button { width: 100%; justify-content: center; }

/* Stat tiles */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem; }
.stat-tile { display: block; padding: 0.9rem 1rem; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); text-decoration: none; transition: border-color 0.12s ease; }
.stat-tile:hover { border-color: var(--color-border-strong); text-decoration: none; }
.stat-tile-label { font-size: 0.76rem; color: var(--color-text-muted); margin-bottom: 0.35rem; }
.stat-tile-value { font-size: 1.7rem; font-weight: 600; color: var(--color-text); font-variant-numeric: tabular-nums; }
.stat-tile-value.warn { color: var(--color-warning); }

/* Hold activity feed (nested inside the holds table) */
details.hold-activity { padding: 0.5rem 1rem 0.75rem; background: var(--color-surface-sunken); }
details.hold-activity summary { list-style: none; cursor: pointer; font-size: 0.78rem; color: var(--color-text-muted); font-weight: 600; padding: 0.3rem 0; }
details.hold-activity summary::-webkit-details-marker { display: none; }
details.hold-activity ul { list-style: none; margin: 0.4rem 0; padding: 0; }
details.hold-activity li { display: flex; gap: 0.75rem; padding: 0.3rem 0; font-size: 0.82rem; border-bottom: 1px solid var(--color-border); }
details.hold-activity li:last-child { border-bottom: none; }
details.hold-activity li span:first-child { flex-shrink: 0; min-width: 150px; }

/* Workflow builder */
.wf-step {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.65rem 0.85rem; margin-bottom: 0.5rem;
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md);
  cursor: grab;
}
.wf-step:active { cursor: grabbing; }
.wf-step-handle { color: var(--color-text-faint); flex-shrink: 0; }
.wf-step-num { flex-shrink: 0; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: var(--color-surface-sunken); color: var(--color-text-muted); font-size: 0.78rem; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.wf-step-type { font-weight: 600; flex-shrink: 0; }
.wf-step-summary { flex: 1; font-size: 0.85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Workflow trigger picker */
.trigger-picker { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 1.1rem; }
.trigger-card { position: relative; flex: 1; min-width: 200px; display: flex; gap: 0.75rem; align-items: flex-start; padding: 0.9rem 1rem; border: 1px solid var(--color-border); border-radius: var(--radius-md); cursor: pointer; transition: border-color 0.12s ease, background 0.12s ease; }
.trigger-card input { position: absolute; opacity: 0; pointer-events: none; }
.trigger-card.selected { border-color: var(--color-accent); background: var(--color-accent-soft); }
.trigger-card-icon { flex-shrink: 0; color: var(--color-text-muted); }
.trigger-card.selected .trigger-card-icon { color: var(--color-accent); }
.trigger-card-title { display: block; font-weight: 600; font-size: 0.92rem; }
.trigger-card-desc { display: block; font-size: 0.8rem; color: var(--color-text-muted); margin-top: 0.15rem; }

/* Chip/tag input (email address entry) */
.chip-input-box { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; border: 1px solid var(--color-border-strong); border-radius: var(--radius-md); padding: 0.5rem 0.6rem; background: var(--color-surface); cursor: text; }
.chip-input-box:focus-within { border-color: var(--color-accent); }
.chip { flex-shrink: 0; display: inline-flex; align-items: center; gap: 0.35rem; background: var(--color-accent-soft); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 0.35rem 0.4rem 0.35rem 0.65rem; font-size: 0.85rem; white-space: nowrap; }
.chip-remove { flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; width: 1.2rem; height: 1.2rem; background: none; border: none; border-radius: 50%; padding: 0; cursor: pointer; color: var(--color-text-muted); font-size: 0.95rem; line-height: 1; }
.chip-remove:hover { color: var(--color-accent); background: rgba(0, 0, 0, 0.07); }
.chip-input-text { flex: 1; min-width: 140px; border: none; outline: none; padding: 0.2rem; font-size: 0.88rem; background: transparent; }
.chip-input-text.chip-input-invalid { background: var(--color-danger-bg); border-radius: var(--radius-sm); }

/* Schedule day-of-week picker */
.day-picker { display: flex; gap: 0.45rem; flex-wrap: wrap; }
.day-chip { position: relative; cursor: pointer; }
.day-chip input { position: absolute; opacity: 0; pointer-events: none; }
.day-chip span { display: flex; align-items: center; justify-content: center; width: 2.5rem; height: 2.5rem; border: 1px solid var(--color-border); border-radius: 50%; font-size: 0.76rem; font-weight: 600; color: var(--color-text-muted); transition: all 0.12s ease; }
.day-chip input:checked + span { background: var(--color-accent); border-color: var(--color-accent); color: #fff; }
.day-chip input:focus-visible + span { outline: 2px solid var(--color-accent); outline-offset: 2px; }

/* Roles — permission checklist */
.perm-checklist { padding: 0.75rem 1rem 1rem; display: flex; flex-direction: column; gap: 0.4rem; }
.perm-select-all { font-size: 0.78rem; color: var(--color-text-muted); font-weight: 600; padding-bottom: 0.4rem; border-bottom: 1px solid var(--color-border); margin-bottom: 0.15rem; display: flex; align-items: center; gap: 0.5rem; }
.perm-item { display: flex; align-items: center; gap: 0.5rem; font-size: 0.85rem; }
.perm-item input, .perm-select-all input { width: auto; }

/* Utility */
.muted { color: var(--color-text-muted); }
.warn { color: var(--color-warning); font-weight: 600; }
.text-right { text-align: right; }
/* Read-only mode wraps a form's fields in <fieldset disabled> so the
   browser greys out every control at once. The fieldset is a wrapper,
   never a visible box. */
.fieldset-reset { border: 0; padding: 0; margin: 0; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 0.75rem; }
.row { display: flex; gap: 0.5rem; align-items: center; }

/* ---------- Report-a-Bug drawer -----------------------------------
   Slides over whatever page the reporter was on, so filing a bug
   doesn't cost them their place. Duplicated in crm.css against that
   shell's own tokens — the CRM is a separate identity, and neither
   shell loads automations.css, where the original drawer lives. */

.bug-scrim {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(31, 25, 15, 0.32);
  animation: bug-fade 0.14s ease;
}
.bug-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 61;
  width: min(460px, 100vw);
  display: flex; flex-direction: column;
  background: var(--color-surface);
  border-left: 1px solid var(--color-border-strong);
  box-shadow: -8px 0 32px rgba(31, 25, 15, 0.14);
  animation: bug-slide 0.18s cubic-bezier(0.2, 0, 0.2, 1);
}
@keyframes bug-fade { from { opacity: 0; } }
@keyframes bug-slide { from { transform: translateX(24px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .bug-scrim, .bug-drawer { animation: none; }
}

.bug-drawer-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem;
  padding: 1.1rem 1.35rem; border-bottom: 1px solid var(--color-border);
}
.bug-drawer-head h2 { margin: 0; font-size: 1.05rem; }
.bug-drawer-head p { margin: 0.15rem 0 0; font-size: 0.83rem; color: var(--color-text-muted); }
.bug-drawer-body { flex: 1; overflow-y: auto; padding: 1.35rem; }
.bug-drawer-foot {
  display: flex; gap: 0.5rem; justify-content: flex-end;
  padding: 0.9rem 1.35rem; border-top: 1px solid var(--color-border);
  background: var(--color-surface-sunken);
}

.bug-field { margin-bottom: 1rem; }
.bug-field textarea { resize: vertical; min-height: 8rem; }
.bug-note { margin: 0; font-size: 0.78rem; color: var(--color-text-faint); line-height: 1.5; }
.bug-errors { color: var(--color-danger); font-size: 0.82rem; margin-bottom: 0.75rem; }
.bug-sent { margin: 0; line-height: 1.6; }
.bug-sent-partial { color: var(--color-warning); }
.bug-close { line-height: 1; }
.bug-page-actions { display: flex; gap: 0.5rem; align-items: center; margin-top: 1.1rem; }

.bug-check {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.85rem; font-weight: 400; text-transform: none;
  letter-spacing: 0; margin-bottom: 0; cursor: pointer;
  color: var(--color-text);
}
.bug-check input { width: auto; margin: 0; }
