:root {
  --bg: #0f0f0f;
  --bg-soft: #151515;
  --surface: rgba(18, 18, 18, 0.84);
  --surface-strong: #1a1a1a;
  --panel: rgba(24, 24, 24, 0.96);
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 122, 24, 0.28);
  --text: #f5f2ed;
  --muted: #8e857c;
  --accent: #ff6a00;
  --accent-2: #ff8f3f;
  --danger: #ff6b78;
  --warning: #ffb14a;
  --success: #73e0a9;
  --neutral: #b7c3d8;
  --purple: #ff9f68;
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.46);
  --shadow-soft: 0 22px 48px rgba(0, 0, 0, 0.36);
  --orange-glow: 0 0 0 1px rgba(255, 122, 24, 0.22), 0 16px 34px rgba(255, 106, 0, 0.16);
  --orange-glow-strong: 0 0 0 1px rgba(255, 122, 24, 0.34), 0 18px 44px rgba(255, 106, 0, 0.22);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 12%, rgba(255, 106, 0, 0.16), transparent 24%),
    radial-gradient(circle at 88% 8%, rgba(255, 145, 63, 0.12), transparent 18%),
    radial-gradient(circle at 50% 100%, rgba(255, 106, 0, 0.08), transparent 28%),
    linear-gradient(180deg, #0b0b0b 0%, #101010 46%, #141414 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.04) 0.7px, transparent 0.7px),
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 18px 18px, 88px 88px, 88px 88px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.86), transparent 88%);
  opacity: 0.52;
}

button,
input,
textarea,
select {
  font: inherit;
}

.hidden {
  display: none !important;
}

.is-filtered-out {
  display: none !important;
}

.visible {
  display: block;
}

.detail-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
}

.detail-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 8, 16, 0.7);
  backdrop-filter: blur(8px);
}

.detail-modal-panel {
  position: relative;
  width: min(1080px, calc(100% - 28px));
  max-height: calc(100vh - 28px);
  overflow: auto;
  margin: 14px auto;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(18, 29, 48, 0.98), rgba(11, 18, 32, 0.97));
  box-shadow: var(--shadow);
}

.detail-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
  margin-bottom: 14px;
}

.detail-modal-head h3 {
  margin-top: 4px;
}

.detail-modal-head p:last-child {
  margin: 8px 0 0;
  color: var(--muted);
}

.detail-modal-content {
  display: grid;
  gap: 14px;
}

.detail-card {
  padding: 16px;
  border: 1px solid rgba(124, 199, 255, 0.14);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.03);
}

.detail-card h4 {
  margin: 0 0 12px;
  font-size: 1rem;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
}

.detail-item {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
}

.detail-item span {
  color: var(--muted);
  font-size: 0.82rem;
}

.detail-item strong {
  font-size: 0.95rem;
}

.detail-analysis {
  display: grid;
  gap: 10px;
}

.detail-analysis-item {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(124, 199, 255, 0.14);
  background: rgba(124, 199, 255, 0.05);
  line-height: 1.6;
}

.detail-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.carbon-brush-trend-card {
  display: grid;
  gap: 14px;
}

.compact-trend-head {
  margin-bottom: 0;
}

.trend-chart-svg {
  width: 100%;
  height: auto;
  display: block;
}

.trend-point {
  fill: var(--accent-2);
  stroke: rgba(7, 16, 29, 0.95);
  stroke-width: 2;
}

.trend-point.is-low {
  fill: var(--danger);
}

.trend-point.is-medium {
  fill: var(--warning);
}

.trend-point.is-high {
  fill: var(--success);
}

.trend-axis-label,
.trend-threshold {
  fill: var(--muted);
  font-size: 11px;
  font-family: "Manrope", sans-serif;
}

.trend-threshold.low {
  fill: var(--danger);
}

.trend-threshold.high {
  fill: var(--success);
}

.trend-empty {
  padding: 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
}

.trend-summary-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.trend-event-list .detail-analysis-item {
  display: grid;
  gap: 4px;
}

.detail-photo {
  max-width: 100%;
  border-radius: 18px;
  border: 1px solid rgba(124, 199, 255, 0.14);
}

.detail-photo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.detail-photo-item {
  display: grid;
  gap: 8px;
}

.detail-photo-item span {
  color: var(--muted);
  font-size: 0.8rem;
}

.app-shell {
  width: min(1440px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 28px;
}

.auth-screen {
  min-height: calc(100vh - 48px);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
  align-items: stretch;
}

.auth-hero,
.auth-card,
.sidebar,
.topbar,
.hero-banner,
.metric-card,
.content-card,
.inspection-card,
.bom-card,
.sidebar-note {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, rgba(28, 28, 28, 0.96), rgba(17, 17, 17, 0.94)),
    linear-gradient(135deg, rgba(255, 122, 24, 0.06), transparent 36%);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.auth-hero {
  padding: 44px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.auth-hero::after {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  right: -120px;
  bottom: -140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 106, 0, 0.26), transparent 62%);
}

.auth-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.02), transparent 42%),
    linear-gradient(180deg, rgba(255, 122, 24, 0.08), transparent 28%);
  pointer-events: none;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Sora", sans-serif;
  line-height: 1.08;
}

h1 {
  font-size: clamp(3rem, 6vw, 5.4rem);
  max-width: 11ch;
}

h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
}

h3 {
  font-size: 1.45rem;
}

.lead,
.card-head p,
.role-option small,
.sidebar-note p,
.status-list span,
.status-list small,
.inspection-card p,
.bom-copy p,
.bom-copy small,
table,
.topbar-meta,
.form-hint {
  color: var(--muted);
}

.lead {
  max-width: 54ch;
  margin: 22px 0 0;
  font-size: 1.06rem;
  line-height: 1.8;
}

.hero-points {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 14px;
  margin-top: 28px;
}

.hero-points article {
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.015)),
    rgba(255, 122, 24, 0.035);
  box-shadow: var(--shadow-soft);
}

.hero-points strong,
.brand-block strong,
.user-chip strong {
  display: block;
}

.hero-points span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}

.auth-card {
  padding: 34px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: var(--orange-glow), var(--shadow);
}

.card-head p:last-child {
  margin: 10px 0 0;
}

.auth-form {
  display: grid;
  gap: 18px;
  margin-top: 26px;
}

.auth-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.auth-actions .btn-ghost {
  grid-column: 1 / -1;
}

.auth-form label,
.contact-form label {
  display: grid;
  gap: 8px;
  font-weight: 600;
}

.auth-form input {
  min-height: 52px;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  outline: none;
}

select,
select option,
select optgroup {
  background-color: #191919;
  color: #f4eee7;
}

select option:checked,
select option:hover {
  background-color: #2a1f18;
  color: #ffffff;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(255, 122, 24, 0.65);
  box-shadow: 0 0 0 4px rgba(255, 106, 0, 0.14), 0 0 28px rgba(255, 106, 0, 0.12);
}

.btn {
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 800;
  transition: transform 180ms ease, opacity 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease, color 180ms ease;
}

.btn:hover,
.menu-item:hover,
.chip-button:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, #ff6a00, #ff8b2b 46%, #ffb25f 100%);
  color: #150d08;
  box-shadow: 0 14px 34px rgba(255, 106, 0, 0.28), inset 0 1px 0 rgba(255, 241, 224, 0.28);
}

.btn-secondary,
.chip-button {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(255, 122, 24, 0.06);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--muted);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  box-shadow: 0 18px 42px rgba(255, 106, 0, 0.38), 0 0 22px rgba(255, 106, 0, 0.2);
}

.btn-secondary:hover,
.btn-ghost:hover,
.chip-button:hover {
  border-color: rgba(255, 122, 24, 0.42);
  color: #fff3e8;
  box-shadow: var(--orange-glow);
}

.form-hint {
  margin: -4px 0 0;
  font-size: 0.9rem;
}

.workspace {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  min-height: calc(100vh - 52px);
  align-items: start;
}

.sidebar {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  background:
    linear-gradient(180deg, rgba(23, 23, 23, 0.98), rgba(12, 12, 12, 0.96)),
    linear-gradient(180deg, rgba(255, 122, 24, 0.04), transparent 42%);
}

.brand-block {
  display: flex;
  gap: 14px;
  align-items: center;
}

.brand-mark {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  font-weight: 800;
  background: linear-gradient(135deg, rgba(255, 106, 0, 1), rgba(255, 149, 60, 0.92));
  color: #1a0e06;
  box-shadow: 0 14px 28px rgba(255, 106, 0, 0.28);
}

.brand-block small {
  color: var(--muted);
}

.menu-list {
  display: grid;
  gap: 10px;
}

.mobile-menu-toggle {
  display: none;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
}

.menu-item {
  text-align: left;
  min-height: 48px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.menu-item.active {
  background: linear-gradient(90deg, rgba(255, 106, 0, 0.16), rgba(255, 106, 0, 0.04));
  border-color: rgba(255, 122, 24, 0.3);
  color: #fff4ea;
  box-shadow: inset 0 0 0 1px rgba(255, 122, 24, 0.08);
}

.menu-item::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 100%;
  bottom: 9px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), transparent);
  transition: right 180ms ease;
}

.menu-item:hover {
  color: #fff4ea;
  border-color: rgba(255, 122, 24, 0.16);
}

.menu-item:hover::after,
.menu-item.active::after {
  right: 16px;
}

.sidebar-note {
  margin-top: auto;
  padding: 18px;
  border-radius: var(--radius-lg);
}

.main-content {
  display: grid;
  gap: 14px;
  align-content: start;
}

.topbar {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background:
    linear-gradient(180deg, rgba(20, 20, 20, 0.96), rgba(15, 15, 15, 0.94)),
    linear-gradient(90deg, rgba(255, 122, 24, 0.06), transparent 28%);
}

.topbar-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.access-chip {
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 122, 24, 0.26);
  background: rgba(255, 106, 0, 0.1);
  color: #ffd8b8;
  font-size: 0.9rem;
  font-weight: 700;
}

.user-chip {
  padding: 10px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
}

.user-chip span {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  color: var(--accent);
}

.panel-section {
  display: none;
  gap: 12px;
}

.panel-section.visible {
  display: grid;
}

.panel-section > .card-head {
  position: relative;
  display: grid;
  gap: 6px;
  padding: 14px 18px 14px 22px;
  border-radius: 22px;
  border: 1px solid rgba(255, 122, 24, 0.14);
  background:
    linear-gradient(90deg, rgba(255, 106, 0, 0.14), transparent 22%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02));
  overflow: hidden;
}

.panel-section > .card-head::before {
  content: "";
  position: absolute;
  inset: 10px auto 10px 10px;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--accent), #ffb05f);
}

.panel-section > .card-head h3 {
  max-width: 20ch;
  font-size: clamp(1.15rem, 2vw, 1.55rem);
}

.panel-section > .card-head p:last-child {
  max-width: 64ch;
  margin: 2px 0 0;
  font-size: 0.92rem;
}

.hero-banner {
  position: relative;
  padding: 18px 20px;
  display: grid;
  gap: 14px;
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(255, 106, 0, 0.22), transparent 34%),
    linear-gradient(135deg, rgba(255, 143, 63, 0.12), rgba(255, 255, 255, 0.015) 42%),
    linear-gradient(180deg, rgba(24, 24, 24, 0.98), rgba(14, 14, 14, 0.96));
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.hero-banner::after {
  content: "";
  position: absolute;
  inset: auto -8% -36% auto;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 122, 24, 0.22), transparent 68%);
  pointer-events: none;
}

.banner-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  position: relative;
  z-index: 1;
}

.banner-stats article,
.metric-card {
  position: relative;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.018)),
    rgba(255, 255, 255, 0.01);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.banner-stats article:hover,
.metric-card:hover {
  box-shadow: var(--orange-glow), var(--shadow-soft);
}

.banner-stats span,
.metric-card span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
}

.banner-stats strong,
.metric-card strong {
  display: block;
  margin-top: 6px;
  font-size: 1.55rem;
  font-family: "Sora", sans-serif;
  letter-spacing: -0.04em;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.chart-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.chart-grid-negatif {
  margin-top: 14px;
}

.module-summary-card::before,
.metric-card::before,
.content-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), rgba(255, 193, 136, 0));
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.content-card {
  position: relative;
  padding: 16px 16px 18px;
  background:
    linear-gradient(180deg, rgba(22, 22, 22, 0.98), rgba(14, 14, 14, 0.95)),
    linear-gradient(135deg, rgba(255, 122, 24, 0.05), transparent 34%);
}

.hero-banner,
.metric-card,
.module-summary-card,
.content-card {
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.metric-card:hover,
.module-summary-card:hover,
.content-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 122, 24, 0.24);
  box-shadow: var(--orange-glow-strong), var(--shadow);
}

.module-intro {
  margin-top: -2px;
  padding: 10px 14px 10px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 122, 24, 0.14);
  border-left: 4px solid rgba(255, 106, 0, 0.58);
  background: rgba(255, 122, 24, 0.05);
  color: #f1ded1;
  line-height: 1.55;
  font-size: 0.92rem;
}

.create-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 20px;
  border: 1px solid rgba(255, 122, 24, 0.12);
  background: rgba(255, 255, 255, 0.02);
}

.create-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
  padding: 2px 2px 0;
}

.create-panel-head h4 {
  margin: 4px 0 0;
  font-family: "Sora", sans-serif;
  font-size: 1rem;
}

.module-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.module-summary-card {
  position: relative;
  padding: 12px 14px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02));
  overflow: hidden;
}

.module-summary-card span {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
}

.module-summary-card strong {
  display: block;
  margin-top: 4px;
  font-size: 1.28rem;
  font-family: "Sora", sans-serif;
  letter-spacing: -0.04em;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
  margin-top: 12px;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid rgba(255, 122, 24, 0.1);
  background: rgba(255, 255, 255, 0.02);
}

.search-field {
  display: grid;
  gap: 6px;
  min-width: 260px;
  flex: 1;
}

.search-field.compact {
  flex: 0 0 220px;
  min-width: 220px;
}

.search-field span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.export-button {
  min-width: 140px;
}

.mini-chart {
  display: grid;
  gap: 10px;
  margin-top: 6px;
}

.chart-row {
  display: grid;
  grid-template-columns: 120px 1fr 52px;
  gap: 12px;
  align-items: center;
}

.chart-row span,
.chart-row strong {
  font-size: 0.92rem;
}

.chart-row span {
  color: var(--muted);
}

.chart-track {
  position: relative;
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.chart-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 18px rgba(255, 106, 0, 0.18);
}

.sample-data-status {
  margin: 0;
  color: #ffcfaa;
  font-size: 0.84rem;
  line-height: 1.55;
}

.icon-button {
  min-width: 44px;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 14px;
  font-size: 1.05rem;
  line-height: 1;
}

.toast-stack {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 60;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100% - 24px));
}

.toast {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 122, 24, 0.22);
  background: rgba(18, 18, 18, 0.96);
  box-shadow: var(--shadow);
  color: var(--text);
}

.toast strong {
  display: block;
  margin-bottom: 4px;
}

.toast span {
  color: var(--muted);
  font-size: 0.92rem;
}

.permission-banner,
.locked-note {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
}

.locked-note {
  border-color: rgba(255, 191, 105, 0.22);
  background: rgba(255, 191, 105, 0.08);
  color: #ffe2b5;
}

#equipment-reference-status {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.typeahead-wrap {
  position: relative;
}

.typeahead-field {
  position: relative;
}

.typeahead-list {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 20;
  display: grid;
  gap: 4px;
  max-height: 260px;
  overflow: auto;
  padding: 8px;
  border: 1px solid rgba(255, 122, 24, 0.14);
  border-radius: 16px;
  background: rgba(18, 18, 18, 0.98);
  box-shadow: var(--shadow);
}

.typeahead-item {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.typeahead-item:hover,
.typeahead-item:focus {
  border-color: rgba(255, 122, 24, 0.35);
  background: rgba(255, 106, 0, 0.12);
  outline: none;
}

.typeahead-empty {
  padding: 10px 12px;
  color: var(--muted);
  font-size: 0.88rem;
}

.user-role-select {
  min-width: 160px;
}

.card-head.inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.chip-button {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
}

.table-wrap {
  overflow: auto;
  margin-top: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.015);
}

[data-panel="negatif-list"] .table-wrap {
  padding: 10px;
  border-color: rgba(255, 122, 24, 0.18);
  background:
    linear-gradient(180deg, rgba(25, 25, 25, 0.98), rgba(14, 14, 14, 0.96)),
    linear-gradient(135deg, rgba(255, 122, 24, 0.06), transparent 38%);
  box-shadow: var(--orange-glow), var(--shadow-soft);
}

[data-panel="negatif-list"] table {
  border-collapse: separate;
  border-spacing: 0 10px;
  min-width: 1080px;
}

[data-panel="negatif-list"] thead th {
  border-bottom: none;
  background: rgba(255, 122, 24, 0.08);
  color: #fff3e7;
}

[data-panel="negatif-list"] thead th:first-child {
  border-radius: 14px 0 0 14px;
}

[data-panel="negatif-list"] thead th:last-child {
  border-radius: 0 14px 14px 0;
}

[data-panel="negatif-list"] tbody td {
  padding: 14px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(36, 36, 36, 0.98), rgba(23, 23, 23, 0.96)),
    linear-gradient(135deg, rgba(255, 122, 24, 0.05), transparent 42%);
  color: #f7f0e8;
}

[data-panel="negatif-list"] tbody td:first-child {
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px 0 0 16px;
}

[data-panel="negatif-list"] tbody td:last-child {
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0 16px 16px 0;
}

[data-panel="negatif-list"] tbody tr:hover td {
  border-color: rgba(255, 122, 24, 0.24);
  background:
    linear-gradient(180deg, rgba(42, 42, 42, 1), rgba(27, 27, 27, 0.98)),
    linear-gradient(135deg, rgba(255, 122, 24, 0.08), transparent 42%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

[data-panel="negatif-list"] tbody td:nth-child(1) {
  font-weight: 800;
  color: #fff5ec;
}

[data-panel="negatif-list"] tbody td:nth-child(4),
[data-panel="negatif-list"] tbody td:nth-child(5),
[data-panel="negatif-list"] tbody td:nth-child(6),
[data-panel="negatif-list"] tbody td:nth-child(7),
[data-panel="negatif-list"] tbody td:nth-child(8) {
  white-space: nowrap;
  font-weight: 700;
}

[data-panel="negatif-list"] tbody td:nth-child(5) {
  color: #ffd5b3;
}

[data-panel="negatif-list"] tbody td:nth-child(6) {
  color: #fff0df;
}

[data-panel="negatif-list"] .action-cell {
  justify-content: flex-end;
}

.mobile-card-list {
  display: none;
  gap: 12px;
  margin-top: 14px;
}

.admin-grid {
  display: grid;
  gap: 14px;
}

.admin-card {
  padding: 18px;
}

.admin-tools {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: end;
}

.compact-form {
  margin-top: 12px;
}

.compact-table {
  margin-top: 12px;
}

.compact-table table {
  min-width: 720px;
}

.file-trigger {
  cursor: pointer;
}

.mobile-data-card {
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
}

.mobile-data-card:hover {
  border-color: rgba(255, 122, 24, 0.24);
  box-shadow: var(--orange-glow);
}

.mobile-data-card strong {
  display: block;
  margin-bottom: 10px;
  font-size: 1rem;
}

.mobile-data-card .mobile-meta {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.92rem;
}

#negatif-list-mobile .mobile-data-card {
  border-color: rgba(255, 122, 24, 0.16);
  background:
    linear-gradient(180deg, rgba(34, 34, 34, 0.98), rgba(20, 20, 20, 0.96)),
    linear-gradient(135deg, rgba(255, 122, 24, 0.06), transparent 40%);
  box-shadow: var(--orange-glow), var(--shadow-soft);
}

#negatif-list-mobile .mobile-data-card strong {
  color: #fff5eb;
}

#negatif-list-mobile .mobile-meta {
  gap: 10px;
  color: #e8dbcf;
}

#negatif-list-mobile .mobile-meta span {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.035);
}

.action-cell,
.card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.table-action {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 122, 24, 0.16);
  background: rgba(255, 255, 255, 0.025);
  color: var(--text);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 700;
}

.table-action.send {
  border-color: rgba(255, 122, 24, 0.38);
  background: rgba(255, 106, 0, 0.16);
  color: #fff0e2;
}

.table-action.danger {
  border-color: rgba(255, 107, 120, 0.28);
  color: #ffc2c8;
}

.table-action:hover {
  border-color: rgba(255, 122, 24, 0.34);
  box-shadow: var(--orange-glow);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 780px;
}

th,
td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  color: var(--text);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(255, 255, 255, 0.02);
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
  border: 1px solid transparent;
}

.tag-danger {
  background: rgba(255, 107, 120, 0.14);
  color: #ffc2c8;
  border-color: rgba(255, 107, 120, 0.26);
}

.tag-warning {
  background: rgba(255, 191, 105, 0.14);
  color: #ffe2b5;
  border-color: rgba(255, 191, 105, 0.26);
}

.tag-success,
.tag-green {
  background: rgba(115, 224, 169, 0.14);
  color: #baf4cf;
  border-color: rgba(115, 224, 169, 0.26);
}

.tag-blue {
  background: rgba(255, 122, 24, 0.14);
  color: #ffd7bc;
  border-color: rgba(255, 122, 24, 0.26);
}

.tag-purple {
  background: rgba(169, 143, 255, 0.14);
  color: #ddd0ff;
  border-color: rgba(169, 143, 255, 0.26);
}

.tag-neutral {
  background: rgba(183, 195, 216, 0.14);
  color: #dae2ef;
  border-color: rgba(183, 195, 216, 0.22);
}

.status-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.status-list article,
.inspection-card,
.bom-card {
  padding: 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.status-list strong,
.inspection-card strong,
.bom-copy strong {
  display: block;
}

.status-list span,
.status-list small {
  display: block;
  margin-top: 5px;
}

.inspection-grid,
.bom-grid {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.inspection-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.service-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.service-board.single-focus {
  grid-template-columns: 1fr;
}

.service-column {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.02);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.service-column-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 122, 24, 0.12);
  background: linear-gradient(90deg, rgba(255, 106, 0, 0.08), rgba(255, 255, 255, 0.015));
}

.service-column-title {
  display: grid;
  gap: 2px;
}

.service-column-head strong {
  font-size: 0.98rem;
}

.service-column-head span {
  color: var(--muted);
  font-size: 0.82rem;
}

.service-list-body {
  max-height: 420px;
  overflow-y: auto;
  padding: 8px;
  display: grid;
  gap: 8px;
}

.service-subgroup {
  display: grid;
  gap: 8px;
  padding: 6px;
  border: 1px solid rgba(255, 122, 24, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.015);
}

.service-subgroup + .service-subgroup {
  margin-top: 2px;
}

.service-subgroup-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 2px 4px 0;
}

.service-subgroup-head strong {
  font-size: 0.82rem;
  color: #e9f2ff;
}

.service-subgroup-head span {
  color: var(--muted);
  font-size: 0.76rem;
}

.service-subgroup-body {
  display: grid;
  gap: 8px;
}

.service-list-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(27, 27, 27, 0.9), rgba(17, 17, 17, 0.84));
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.service-list-item:hover {
  border-color: rgba(255, 122, 24, 0.24);
  box-shadow: var(--orange-glow), inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transform: translateY(-1px);
}

.service-list-item strong {
  display: block;
  margin-top: 4px;
  font-size: 0.94rem;
  line-height: 1.35;
}

.service-list-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.service-list-top small,
.service-list-meta {
  color: var(--muted);
  font-size: 0.8rem;
}

.service-list-actions {
  display: grid;
  gap: 6px;
}

.service-list-main {
  min-width: 0;
}

.table-action.compact {
  min-width: 68px;
  padding: 6px 8px;
  font-size: 0.78rem;
}

.service-list-empty {
  padding: 16px 12px;
  color: var(--muted);
  font-size: 0.86rem;
}

.service-group-detail-list {
  display: grid;
  gap: 10px;
}

.service-group-detail-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 122, 24, 0.12);
  background: rgba(255, 255, 255, 0.025);
  color: var(--text);
  text-align: left;
}

.service-group-detail-item div {
  display: grid;
  gap: 4px;
}

.service-group-detail-item span,
.service-group-detail-item small {
  color: var(--muted);
}

.inspection-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.inspection-card p {
  margin: 14px 0;
  line-height: 1.7;
}

.inspection-card[data-openable="true"] {
  cursor: pointer;
}

.inspection-card {
  position: relative;
}

.service-card-actions {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
}

.icon-action {
  width: 32px;
  min-width: 32px;
  min-height: 32px;
  padding: 0;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.92rem;
  line-height: 1;
}

.inspection-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  color: var(--muted);
  font-size: 0.92rem;
}

.card-actions {
  margin-top: 14px;
}

.service-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.service-form-grid-single {
  grid-template-columns: 1fr;
}

.service-tab-bar,
.service-subtab-bar,
.bom-tab-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.service-tab.active,
.service-subtab.active {
  border-color: rgba(21, 184, 166, 0.4);
  background: rgba(21, 184, 166, 0.14);
  color: #d9fff9;
}

.service-pane,
.electrical-pane,
.bom-pane {
  display: none;
}

.service-pane.visible,
.electrical-pane.visible,
.bom-pane.visible {
  display: block;
}

.inspection-section {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid rgba(255, 122, 24, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.02);
}

.inspection-section-head {
  display: grid;
  gap: 4px;
  margin-bottom: 14px;
}

.inspection-section-head strong {
  display: block;
  color: var(--text);
  font-size: 1rem;
}

.inspection-section-head span {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.6;
}

.input-form {
  padding: 16px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(23, 23, 23, 0.98), rgba(14, 14, 14, 0.95)),
    linear-gradient(135deg, rgba(255, 122, 24, 0.04), transparent 34%);
  margin-top: 14px;
  box-shadow: var(--shadow-soft);
}

.compact-head {
  margin-bottom: 16px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.card-head h3,
.panel-section > .card-head h3 {
  max-width: 26ch;
}

.banner-stats article,
.metric-card {
  padding: 14px 16px;
}

.banner-stats strong,
.metric-card strong {
  margin-top: 6px;
  font-size: 1.5rem;
}

.form-grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.form-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.form-grid-5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.dcs-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

[data-form-type="service-dcs"] .inspection-section {
  padding: 14px;
  border-color: rgba(255, 122, 24, 0.18);
  background:
    linear-gradient(180deg, rgba(31, 31, 31, 0.98), rgba(20, 20, 20, 0.96)),
    linear-gradient(135deg, rgba(255, 122, 24, 0.05), transparent 44%);
}

[data-form-type="service-dcs"] .inspection-section + .inspection-section {
  margin-top: 12px;
}

[data-form-type="service-dcs"] .inspection-section-head {
  margin-bottom: 12px;
}

[data-form-type="service-dcs"] .inspection-section-head strong {
  letter-spacing: 0.02em;
}

[data-form-type="service-dcs"] .inspection-section-head span {
  line-height: 1.5;
}

[data-form-type="service-dcs"] label {
  display: grid;
  gap: 8px;
}

[data-form-type="service-dcs"] input,
[data-form-type="service-dcs"] textarea {
  background: rgba(255, 255, 255, 0.04);
}

.service-inline-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.summary-pill {
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 122, 24, 0.18);
  background: rgba(255, 255, 255, 0.025);
  color: var(--text);
  font-size: 0.86rem;
}

.summary-pill.low,
.legend-chip.low {
  border-color: rgba(255, 107, 107, 0.35);
  background: rgba(255, 107, 107, 0.14);
  color: #ffd1d1;
}

.summary-pill.medium,
.legend-chip.medium {
  border-color: rgba(255, 194, 102, 0.35);
  background: rgba(255, 194, 102, 0.14);
  color: #ffe5b0;
}

.summary-pill.high,
.legend-chip.high {
  border-color: rgba(50, 211, 153, 0.35);
  background: rgba(50, 211, 153, 0.14);
  color: #d7ffef;
}

.carbon-brush-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.legend-chip {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  border: 1px solid rgba(255, 122, 24, 0.18);
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
}

.carbon-brush-matrix-wrap {
  overflow-x: auto;
  border: 1px solid rgba(255, 122, 24, 0.14);
  border-radius: 18px;
  background: rgba(14, 14, 14, 0.66);
}

.carbon-brush-matrix-table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
}

.carbon-brush-matrix-table th,
.carbon-brush-matrix-table td {
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 6px;
  text-align: center;
}

.carbon-brush-matrix-table th {
  background: rgba(255, 122, 24, 0.08);
  color: var(--text);
  font-size: 0.84rem;
}

.carbon-brush-matrix-table td:first-child {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-weight: 700;
  width: 54px;
}

.carbon-brush-input {
  width: 100%;
  min-width: 68px;
  padding: 8px 6px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(16, 16, 16, 0.94);
  color: #fff5eb;
  text-align: center;
  font-size: 0.86rem;
}

.carbon-brush-point {
  border: 1px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
}

.carbon-brush-point.is-replaced {
  border-color: rgba(255, 107, 120, 0.95);
  background: linear-gradient(180deg, rgba(255, 107, 120, 0.42), rgba(196, 38, 67, 0.5));
  color: #fff3f5;
  box-shadow:
    inset 0 0 0 1px rgba(255, 226, 231, 0.24),
    0 0 0 2px rgba(255, 107, 120, 0.28);
}

.carbon-brush-point.is-low.is-replaced,
.carbon-brush-point.is-medium.is-replaced,
.carbon-brush-point.is-high.is-replaced {
  border-color: rgba(255, 107, 120, 0.95);
  background: linear-gradient(180deg, rgba(255, 107, 120, 0.42), rgba(196, 38, 67, 0.5));
  color: #fff3f5;
}

.carbon-brush-input::placeholder {
  color: rgba(238, 246, 255, 0.32);
}

.carbon-brush-input.is-low {
  border-color: rgba(255, 107, 107, 0.45);
  background: rgba(255, 107, 107, 0.18);
  color: #ffe7e7;
}

.carbon-brush-input.is-medium {
  border-color: rgba(255, 194, 102, 0.45);
  background: rgba(255, 194, 102, 0.18);
  color: #fff1cf;
}

.carbon-brush-input.is-high {
  border-color: rgba(50, 211, 153, 0.45);
  background: rgba(50, 211, 153, 0.18);
  color: #ebfff7;
}

.carbon-brush-card-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.inspection-card .summary-pill {
  font-size: 0.78rem;
  padding: 6px 10px;
}

.full-span {
  grid-column: 1 / -1;
}

.input-form .btn {
  margin-top: 16px;
}

.submit-note {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(115, 224, 169, 0.24);
  background: rgba(115, 224, 169, 0.1);
  color: #baf4cf;
  font-size: 0.9rem;
}

.bom-card {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 18px;
  position: relative;
  cursor: pointer;
  border: 1px solid rgba(255, 122, 24, 0.26);
  background:
    linear-gradient(180deg, rgba(32, 24, 18, 0.96), rgba(19, 15, 12, 0.94)),
    linear-gradient(135deg, rgba(255, 122, 24, 0.08), transparent 38%);
  box-shadow:
    0 18px 36px rgba(0, 0, 0, 0.24),
    inset 0 0 0 1px rgba(255, 186, 136, 0.04);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.bom-card:hover,
.bom-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(255, 122, 24, 0.48);
  box-shadow:
    0 24px 48px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(255, 122, 24, 0.14),
    0 0 28px rgba(255, 122, 24, 0.12);
}

.bom-card:focus-visible {
  outline: none;
}

.bom-visual {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.image-placeholder {
  min-height: 210px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  border-radius: 18px;
  border: 1px solid rgba(255, 122, 24, 0.24);
  background:
    linear-gradient(180deg, rgba(255, 122, 24, 0.1), rgba(255, 122, 24, 0.04)),
    rgba(255, 255, 255, 0.055);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.image-placeholder.secondary {
  background:
    linear-gradient(180deg, rgba(255, 157, 66, 0.1), rgba(255, 122, 24, 0.03)),
    rgba(255, 255, 255, 0.04);
}

.image-placeholder.tertiary {
  background:
    linear-gradient(180deg, rgba(255, 204, 153, 0.08), rgba(255, 122, 24, 0.02)),
    rgba(255, 255, 255, 0.04);
}

.image-placeholder img {
  width: 100%;
  height: 126px;
  object-fit: cover;
  display: block;
  background: rgba(0, 0, 0, 0.18);
}

.bom-image-label {
  padding: 10px 12px 8px;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 224, 199, 0.88);
}

.bom-image-name {
  padding: 9px 12px 12px;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.4;
  word-break: break-word;
}

.bom-image-empty {
  align-self: center;
  justify-self: center;
  padding: 0 12px;
  color: rgba(255, 235, 220, 0.68);
  font-size: 0.82rem;
  font-weight: 700;
  text-align: center;
}

.image-placeholder.is-missing {
  border-style: dashed;
}

.bom-copy {
  display: grid;
  gap: 10px;
  align-content: start;
}

.bom-copy p,
.bom-copy small,
.bom-copy span,
.bom-long-text {
  margin: 0;
  line-height: 1.6;
  display: block;
}

.bom-copy span {
  color: var(--text-secondary);
}

.bom-motor-copy {
  gap: 8px;
}

.bom-motor-copy span {
  color: #ffe3cf;
}

.bom-tab-bar {
  margin-bottom: 14px;
}

.bom-long-text {
  padding-top: 4px;
  color: var(--muted);
  white-space: pre-wrap;
}

.bom-copy strong {
  font-size: 1.04rem;
  color: #fff6ef;
}

.bom-copy p {
  color: #ffd8bf;
}

.bom-copy small {
  color: #ffb886;
  font-weight: 700;
}

.bom-card .card-actions {
  grid-column: 1 / -1;
  margin-top: 2px;
}

.bom-detail-photo-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.bom-detail-photo-item {
  gap: 10px;
  align-content: start;
}

.bom-detail-photo-label {
  display: block;
  color: #ffd3b0;
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.bom-detail-photo {
  width: 100%;
  min-height: 240px;
  max-height: 360px;
  object-fit: contain;
  border-radius: 16px;
  border: 1px solid rgba(255, 122, 24, 0.2);
  background: rgba(0, 0, 0, 0.3);
}

.bom-detail-photo-empty {
  min-height: 240px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  border: 1px dashed rgba(255, 122, 24, 0.22);
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
}

@media (max-width: 1180px) {
  .auth-screen,
  .workspace,
  .hero-banner,
  .chart-grid,
  .module-summary-grid,
  .dashboard-grid,
  .inspection-grid,
  .bom-card,
  .service-form-grid {
    grid-template-columns: 1fr;
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .banner-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .bom-visual {
    grid-template-columns: 1fr;
  }

  .image-placeholder {
    min-height: 240px;
  }

  .image-placeholder img {
    height: 150px;
  }

  .bom-detail-photo-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .app-shell {
    width: min(100% - 18px, 1440px);
    padding-top: 10px;
  }

  .auth-hero,
  .auth-card,
  .sidebar,
  .topbar,
  .hero-banner,
  .content-card,
  .metric-card {
    padding: 18px;
    border-radius: 22px;
  }

  .topbar,
  .topbar-meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .topbar-meta,
  .toolbar {
    width: 100%;
  }

  .topbar .btn,
  .toolbar .btn,
  .search-field,
  .search-field.compact {
    width: 100%;
    min-width: 0;
    flex: 1 1 100%;
  }

  .banner-stats,
  .metric-grid,
  .module-summary-grid,
  .bom-visual,
  .form-grid,
  .dcs-form-grid,
  .form-grid-4,
  .form-grid-3,
  .form-grid-5 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .workspace {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .sidebar {
    position: sticky;
    top: 8px;
    z-index: 30;
    padding: 16px;
    gap: 14px;
  }

  .brand-block {
    justify-content: space-between;
  }

  .brand-mark {
    width: 48px;
    height: 48px;
    border-radius: 14px;
  }

  .mobile-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .menu-list {
    display: none;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .sidebar.menu-open .menu-list {
    display: grid;
  }

  .menu-item {
    min-height: 44px;
    padding: 10px 12px;
    font-size: 0.92rem;
  }

  .sidebar-note {
    margin-top: 0;
    padding: 14px;
  }

  .topbar {
    padding: 16px;
  }

  .hero-banner,
  .content-card,
  .inspection-card,
  .bom-card,
  .input-form,
  .metric-card,
  .permission-banner,
  .locked-note {
    padding: 16px;
    border-radius: 18px;
  }

  .banner-stats,
  .metric-grid,
  .inspection-grid,
  .service-board,
  .service-form-grid,
  .chart-grid,
  .module-summary-grid,
  .dcs-form-grid,
  .dashboard-grid,
  .bom-grid,
  .bom-card,
  .bom-visual,
  .menu-list {
    grid-template-columns: 1fr;
  }

  .inspection-head,
  .card-head.inline {
    flex-direction: column;
    align-items: flex-start;
  }

  .service-list-item {
    grid-template-columns: 1fr;
  }

  .service-list-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .service-column-head {
    align-items: start;
  }

  .service-group-detail-item {
    align-items: start;
    flex-direction: column;
  }

  .detail-photo-grid {
    grid-template-columns: 1fr;
  }

  .trend-summary-grid {
    grid-template-columns: 1fr;
  }

  h2 {
    font-size: clamp(1.5rem, 8vw, 2rem);
  }

  h3 {
    font-size: 1.15rem;
  }

  .user-chip,
  .access-chip,
  #print-button,
  #logout-button {
    width: 100%;
  }

  .table-wrap {
    margin-top: 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
  }

  .chart-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .chart-track {
    height: 10px;
  }

  table {
    min-width: 640px;
    font-size: 0.9rem;
  }

  th,
  td {
    padding: 12px 10px;
  }

  .action-cell,
  .card-actions:not(.service-card-actions) {
    flex-direction: column;
    align-items: stretch;
  }

  .table-action:not(.icon-action) {
    justify-content: center;
    width: 100%;
  }

  .toast-stack {
    right: 10px;
    left: 10px;
    width: auto;
  }

  .mobile-card-list {
    display: grid;
  }
}

@media print {
  body {
    background: #ffffff;
    color: #000000;
  }

  body::before,
  #login-screen,
  .sidebar,
  #logout-button,
  #print-button,
  .access-chip,
  .permission-banner,
  .locked-note,
  .toolbar,
  .input-form,
  .table-action,
  .chip-button,
  .toast-stack {
    display: none !important;
  }

  .app-shell,
  .workspace,
  .main-content {
    width: 100%;
    margin: 0;
    padding: 0;
    display: block;
  }

  .topbar,
  .hero-banner,
  .metric-card,
  .content-card,
  .inspection-card,
  .bom-card,
  .status-list article {
    background: #ffffff;
    color: #000000;
    border: 1px solid #d9d9d9;
    box-shadow: none;
  }

  .panel-section {
    display: block !important;
    margin-top: 20px;
    break-inside: avoid;
  }

  .topbar-meta {
    display: none !important;
  }

  .table-wrap {
    overflow: visible;
  }

  table {
    min-width: 0;
  }

  .tag {
    color: #000000;
    background: #f2f2f2;
    border-color: #d9d9d9;
  }
}
