:root {
  --navy-950: #0a1422;
  --navy-900: #0f1c2e;
  --navy-800: #17283f;
  --ink: #162033;
  --ink-soft: #334155;
  --muted: #52637a;
  --muted-light: #64748b;
  --line: #e2e8f0;
  --line-soft: #edf2f7;
  --surface: #ffffff;
  --bg: #f3f6fa;
  --accent: #f59e0b;
  --accent-strong: #d97706;
  --accent-soft: #fef3c7;
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .04);
  --shadow-md: 0 12px 32px rgba(15, 23, 42, .08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", "SF Pro Text", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  touch-action: manipulation;
}

body.sidebar-open {
  overflow: hidden;
}

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

button {
  cursor: pointer;
}

h1,
h2,
p {
  margin-top: 0;
}

svg.icon {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

:focus-visible {
  outline: 2px solid var(--accent-strong);
  outline-offset: 2px;
}

.sidebar :focus-visible {
  outline-color: var(--accent);
}

/* ---------- Layout ---------- */

.app {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  min-height: 100vh;
  min-height: 100dvh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  background: radial-gradient(circle at 20% 0%, rgba(245, 158, 11, .08), transparent 34%), linear-gradient(180deg, var(--navy-900), var(--navy-950));
  border-right: 1px solid rgba(255, 255, 255, .06);
  color: #cbd5e1;
  z-index: 40;
}

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

/* ---------- Sidebar ---------- */

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 20px 18px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 11px;
  background: linear-gradient(145deg, #fbbf24, #f59e0b);
  color: var(--navy-900);
  box-shadow: 0 4px 14px rgba(245, 158, 11, .25);
}

.brand-mark .icon {
  width: 22px;
  height: 22px;
  stroke-width: 2.2;
}

.brand-text {
  min-width: 0;
  flex: 1;
}

.brand-text strong {
  display: block;
  color: #fff;
  font-size: 18px;
  letter-spacing: -.01em;
  line-height: 1.2;
}

.brand-text span {
  display: block;
  margin-top: 2px;
  color: #8294aa;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.sidebar-close {
  display: none;
  color: #94a3b8;
}

.sidebar-close:hover {
  background: rgba(255, 255, 255, .08);
  color: #fff;
}

.sidebar-search {
  position: relative;
  margin: 14px 16px 10px;
}

.sidebar-search .search-icon {
  position: absolute;
  top: 50%;
  left: 11px;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  color: #7b8ea5;
  pointer-events: none;
}

.sidebar-search input {
  width: 100%;
  height: 38px;
  padding: 0 34px 0 34px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 9px;
  background: rgba(255, 255, 255, .055);
  color: #e2e8f0;
  font-size: 13px;
  outline: none;
  transition: border-color .15s, background .15s, box-shadow .15s;
}

.sidebar-search input::placeholder {
  color: #7e90a6;
}

.sidebar-search input:focus {
  border-color: rgba(245, 158, 11, .65);
  background: rgba(255, 255, 255, .08);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, .12);
}

.sidebar-search input::-webkit-search-cancel-button {
  display: none;
}

.search-clear {
  position: absolute;
  top: 50%;
  right: 6px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  transform: translateY(-50%);
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #94a3b8;
}

.search-clear:hover {
  background: rgba(255, 255, 255, .1);
  color: #fff;
}

.search-clear .icon {
  width: 14px;
  height: 14px;
}

.sidebar-toolbar {
  padding: 0 16px 13px;
}

.sidebar-nav {
  display: flex;
  gap: 6px;
  padding: 0 16px 12px;
}

.sidebar-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
  height: 33px;
  padding: 0 9px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 8px;
  background: rgba(255, 255, 255, .035);
  color: #aebed0;
  font-size: 11.5px;
  font-weight: 600;
  text-align: left;
  transition: background .15s, border-color .15s, color .15s;
}

.sidebar-nav-btn:hover {
  background: rgba(255, 255, 255, .08);
  color: #fff;
}

.sidebar-nav-btn.is-active {
  border-color: rgba(245, 158, 11, .35);
  background: rgba(245, 158, 11, .13);
  color: #fff;
}

.sidebar-nav-btn .icon {
  width: 15px;
  height: 15px;
  flex: none;
}

.sidebar-nav-btn.is-active .icon {
  color: var(--accent);
}

.nav-count {
  display: inline-grid;
  place-items: center;
  min-width: 17px;
  height: 17px;
  margin-left: auto;
  padding: 0 4px;
  border-radius: 999px;
  background: #b91c1c;
  color: #fff;
  font-size: 9.5px;
  font-weight: 700;
  line-height: 1;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 38px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .15s;
}

.btn .icon {
  width: 16px;
  height: 16px;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .18);
}

.btn-primary:hover {
  background: #26344b;
}

.btn-accent {
  background: linear-gradient(180deg, #fbbf24, var(--accent));
  color: #2a1c02;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .22);
}

.btn-accent:hover {
  background: linear-gradient(180deg, #fcd34d, #fbbf24);
}

.btn-ghost {
  background: #fff;
  border-color: var(--line);
  color: var(--ink-soft);
}

.btn-ghost:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: var(--ink);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-danger:hover {
  background: #b91c1c;
}

.btn-danger-ghost {
  background: transparent;
  border-color: var(--line);
  color: #b91c1c;
}

.btn-danger-ghost:hover {
  background: var(--danger-soft);
  border-color: #fecaca;
  color: #991b1b;
}

.btn-sm {
  height: 34px;
  padding: 0 11px;
  border-radius: 8px;
  font-size: 12.5px;
}

.btn-block {
  width: 100%;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  transition: background .15s, color .15s, border-color .15s;
}

.icon-btn:hover {
  background: #f1f5f9;
  color: var(--ink);
}

.sidebar .icon-btn {
  color: #94a3b8;
}

.sidebar .icon-btn:hover {
  background: rgba(255, 255, 255, .08);
  color: #fff;
}

.tree-cap {
  padding: 3px 22px 6px;
  color: #71859d;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.tree {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 2px 10px 18px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, .16) transparent;
}

.tree::-webkit-scrollbar {
  width: 8px;
}

.tree::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 8px;
  background: rgba(255, 255, 255, .14);
  background-clip: padding-box;
}

.tree ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.tree-row {
  display: flex;
  align-items: center;
  min-height: 34px;
  padding-left: calc(var(--depth, 0) * 13px);
  border-radius: 8px;
  transition: background .12s;
}

.tree-row:hover {
  background: rgba(255, 255, 255, .05);
}

.tree-row.is-selected {
  background: rgba(245, 158, 11, .13);
  box-shadow: inset 3px 0 0 var(--accent);
}

.tree-caret {
  width: 24px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  flex: none;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #7f92a9;
}

button.tree-caret:hover {
  background: rgba(255, 255, 255, .08);
  color: #e2e8f0;
}

.tree-caret .icon {
  width: 13px;
  height: 13px;
  transition: transform .15s;
}

.tree-caret.is-open .icon {
  transform: rotate(90deg);
}

.tree-caret.placeholder {
  visibility: hidden;
}

.tree-label {
  min-width: 0;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px 6px 0;
  border: 0;
  background: transparent;
  color: #b9c6d6;
  text-align: left;
  font-size: 13px;
}

.tree-label .icon {
  width: 16px;
  height: 16px;
  flex: none;
  color: #8498b0;
}

.tree-row.is-selected .tree-label {
  color: #fff;
  font-weight: 600;
}

.tree-row.is-selected .tree-label .icon {
  color: var(--accent);
}

.tree-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tree-name mark {
  padding: 0 1px;
  border-radius: 2px;
  background: rgba(245, 158, 11, .32);
  color: #fff;
}

.tree-empty {
  padding: 26px 14px;
  text-align: center;
  color: #8294aa;
}

.tree-empty .icon {
  width: 28px;
  height: 28px;
  margin-bottom: 8px;
  color: #5f748c;
}

.tree-empty p {
  margin: 0 0 12px;
  font-size: 12.5px;
  line-height: 1.5;
}

.tree-empty .btn {
  color: #e2e8f0;
  border-color: rgba(255, 255, 255, .14);
}

.tree-empty .btn:hover {
  background: rgba(255, 255, 255, .08);
}

.sidebar-footer {
  padding: 13px 16px 15px;
  border-top: 1px solid rgba(255, 255, 255, .07);
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 5px;
  margin-bottom: 10px;
  color: #7f92a9;
  font-size: 11px;
}

.stats b {
  color: #d7e0ea;
  font-weight: 600;
}

.stats .stat-sep {
  color: #4d6178;
}

.backup-actions {
  display: flex;
  gap: 7px;
}

.backup-actions .btn {
  flex: 1;
  height: 32px;
  padding: 0 8px;
  border-color: rgba(255, 255, 255, .1);
  background: rgba(255, 255, 255, .035);
  color: #aebed0;
  font-size: 11.5px;
}

.backup-actions .btn:hover {
  background: rgba(255, 255, 255, .08);
  color: #fff;
}

.backup-actions .icon {
  width: 14px;
  height: 14px;
}

.sidebar-backdrop {
  display: none;
}

/* ---------- Topbar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 64px;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(243, 246, 250, .9);
  backdrop-filter: blur(10px);
}

.menu-btn {
  display: none;
  flex: none;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  font-size: 12.5px;
}

.breadcrumbs::-webkit-scrollbar {
  display: none;
}

.crumb {
  padding: 4px 5px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  font-size: inherit;
  white-space: nowrap;
}

button.crumb:hover {
  background: #e8edf4;
  color: var(--ink);
}

.crumb.current {
  color: var(--ink);
  font-weight: 600;
}

.crumb-sep {
  flex: none;
  color: #c2cddb;
}

.crumb-sep .icon {
  width: 13px;
  height: 13px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex: none;
}

.reminder-btn {
  position: relative;
  width: 38px;
  height: 38px;
  border-color: var(--line);
  background: #fff;
  color: var(--muted);
}

.reminder-btn:hover {
  border-color: #cbd5e1;
  background: #fff;
  color: var(--ink);
}

.reminder-btn.has-reminders {
  border-color: #fcd34d;
  background: #fffbeb;
  color: #b45309;
}

.reminder-count {
  position: absolute;
  top: -5px;
  right: -5px;
  display: grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border: 2px solid var(--bg);
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 9.5px;
  font-weight: 700;
  line-height: 1;
}

/* ---------- Content ---------- */

.content {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 26px 28px 64px;
}

.detail-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  column-gap: 17px;
  row-gap: 0;
  margin-bottom: 20px;
}

.detail-head .meta-row,
.detail-head .notes-box {
  flex-basis: 100%;
}

.entity-icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  flex: none;
  border: 1px solid #fde68a;
  border-radius: 15px;
  background: linear-gradient(145deg, #fffbeb, #fef3c7);
  color: #a16207;
}

.entity-icon.is-group {
  border-color: #dbe4ef;
  background: linear-gradient(145deg, #f8fafc, #eef3f9);
  color: #475569;
}

.entity-icon .icon {
  width: 27px;
  height: 27px;
}

.entity-main {
  min-width: 0;
  flex: 1;
  padding-top: 1px;
}

.entity-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.type-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 5px;
  background: #e9eef5;
  color: #52637a;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.type-badge.is-machine {
  background: var(--accent-soft);
  color: #92400e;
}

.entity-kicker .kicker-muted {
  color: var(--muted-light);
  font-size: 11.5px;
}

.detail-head h1 {
  margin: 0;
  font-size: clamp(22px, 2.5vw, 28px);
  line-height: 1.2;
  letter-spacing: -.025em;
  overflow-wrap: anywhere;
}

.entity-sub {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12.5px;
}

.head-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: none;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 22px;
  margin-top: 14px;
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, .62);
}

.meta-item {
  display: flex;
  align-items: baseline;
  gap: 7px;
  min-width: 0;
  font-size: 12.5px;
}

.meta-item span {
  color: var(--muted-light);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.meta-item strong {
  color: var(--ink-soft);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.notes-box {
  margin-top: 14px;
  padding: 12px 15px;
  border-left: 3px solid #cbd5e1;
  border-radius: 0 9px 9px 0;
  background: #f8fafc;
}

.notes-box strong {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.notes-box p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.panel {
  margin-top: 18px;
  padding: 19px 20px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.panel-head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 15px;
}

.panel-head h2 {
  margin: 0;
  font-size: 15.5px;
  letter-spacing: -.01em;
}

.count-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 21px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #52637a;
  font-size: 11px;
  font-weight: 700;
}

.panel-head .btn {
  margin-left: auto;
}

.panel-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.panel-head .panel-actions .btn {
  margin-left: 0;
}

.child-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 9px;
}

.child-card {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  transition: border-color .15s, background .15s, box-shadow .15s, transform .15s;
}

.child-card:hover {
  border-color: #cbd5e1;
  background: #fbfdff;
  box-shadow: 0 3px 10px rgba(15, 23, 42, .06);
  transform: translateY(-1px);
}

.child-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 9px;
  background: #f1f5f9;
  color: #64748b;
}

.child-icon .icon {
  width: 17px;
  height: 17px;
}

.child-body {
  min-width: 0;
  flex: 1;
}

.child-body strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.child-body small {
  display: block;
  margin-top: 1px;
  overflow: hidden;
  color: var(--muted-light);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.child-arrow {
  flex: none;
  color: #b3c0d0;
}

.child-arrow .icon {
  width: 15px;
  height: 15px;
}

.empty-inline {
  padding: 22px 18px;
  border: 1px dashed #d6e0eb;
  border-radius: 10px;
  background: #fbfcfe;
  color: var(--muted);
  text-align: center;
  font-size: 12.5px;
  line-height: 1.55;
}

.empty-inline strong {
  color: var(--ink-soft);
  font-weight: 600;
}

.table-wrap {
  overflow-x: auto;
  margin: 0 -4px;
}

.components-table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
  font-size: 12.5px;
}

.components-table th {
  padding: 0 10px 9px;
  border-bottom: 1px solid var(--line);
  color: var(--muted-light);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .075em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.components-table th.num {
  width: 58px;
  text-align: center;
}

.components-table th.actions-col {
  width: 102px;
}

.components-table td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}

.components-table tbody tr:last-child td {
  border-bottom: 0;
}

.components-table tbody tr:hover {
  background: #fbfcfe;
}

.component-name {
  display: block;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.ref-code {
  color: var(--muted);
  font-family: "Cascadia Code", Consolas, "SFMono-Regular", monospace;
  font-size: 11.5px;
  white-space: nowrap;
}

.num {
  text-align: center;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

.notes-cell {
  max-width: 270px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-line;
}

.muted-dash {
  color: #c2cddb;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
  white-space: nowrap;
}

.status-dot {
  width: 5px;
  height: 5px;
  flex: none;
  border-radius: 50%;
  background: currentColor;
}

.status-operativo {
  background: #ecfdf5;
  color: #047857;
}

.status-mantenimiento {
  background: #fffbeb;
  color: #b45309;
}

.status-averiado {
  background: #fef2f2;
  color: #b91c1c;
}

.status-baja {
  background: #f1f5f9;
  color: #52637a;
}

.row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 1px;
  white-space: nowrap;
}

.row-actions .icon-btn {
  width: 29px;
  height: 29px;
  color: #a7b4c4;
}

.row-actions .icon-btn .icon {
  width: 14px;
  height: 14px;
}

.row-actions .icon-btn:hover {
  background: #f1f5f9;
  color: var(--ink-soft);
}

.row-actions .icon-btn.danger:hover {
  background: var(--danger-soft);
  color: #b91c1c;
}

.maint-cell {
  min-width: 118px;
}

.maint-mini-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.maint-mini {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 150px;
  padding: 2px 6px;
  border-radius: 5px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}

.maint-mini .maint-dot {
  width: 5px;
  height: 5px;
  flex: none;
}

.maint-mini.is-overdue {
  background: var(--danger-soft);
  color: #b91c1c;
}

.maint-mini.is-today {
  background: #fffbeb;
  color: #92400e;
}

.maint-mini.is-soon {
  background: #fff7ed;
  color: #9a3412;
}

.maint-mini.is-unset {
  background: #f8fafc;
  color: var(--muted-light);
}

.maint-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-strong);
}

.maint-dot.corrective {
  background: var(--danger);
}

/* ---------- Maintenance ---------- */

.maintenance-panel .panel-head {
  flex-wrap: wrap;
}

.maintenance-panel .panel-head .btn {
  margin-left: auto;
}

.maint-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(235px, 1fr));
  gap: 10px;
}

.maint-card {
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-left: 3px solid #cbd5e1;
  border-radius: 10px;
  background: #fbfcfe;
}

.maint-card.is-overdue {
  border-color: #fecaca;
  border-left-color: var(--danger);
  background: #fff7f7;
}

.maint-card.is-today {
  border-color: #fde68a;
  border-left-color: var(--accent);
  background: #fffdf5;
}

.maint-card.is-soon {
  border-color: #fed7aa;
  border-left-color: #ea580c;
  background: #fffbf7;
}

.maint-card.is-unset {
  border-left-color: #cbd5e1;
  background: #fbfcfe;
}

.maint-card-head {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.maint-type-label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.maint-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  padding: 2px 7px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #047857;
  font-size: 9.5px;
  font-weight: 700;
  white-space: nowrap;
}

.maint-pill.is-overdue {
  background: #fee2e2;
  color: #b91c1c;
}

.maint-pill.is-today {
  background: var(--accent-soft);
  color: #92400e;
}

.maint-pill.is-soon {
  background: #ffedd5;
  color: #9a3412;
}

.maint-pill.is-unset {
  background: #f1f5f9;
  color: var(--muted);
}

.maint-pill.is-disabled {
  background: #f1f5f9;
  color: var(--muted);
}

.maint-due {
  display: block;
  margin-top: 8px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -.015em;
  line-height: 1.3;
}

.maint-card.is-overdue .maint-due {
  color: #991b1b;
}

.maint-meta {
  margin: 4px 0 0;
  color: var(--muted-light);
  font-size: 11.5px;
  line-height: 1.45;
}

.maint-hint {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.history-block {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
}

.history-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.history-head h3 {
  margin: 0;
  font-size: 12px;
  letter-spacing: .01em;
}

.history-head .btn {
  margin-left: auto;
}

.history-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.history-item {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line-soft);
}

.history-item:last-child {
  border-bottom: 0;
}

.history-item .maint-dot {
  margin-top: 5px;
}

.history-body {
  min-width: 0;
  flex: 1;
}

.history-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
}

.history-line strong {
  color: var(--ink-soft);
  font-size: 11.5px;
  font-weight: 700;
}

.history-line time {
  color: var(--muted-light);
  font-size: 10.5px;
}

.history-note {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.history-empty {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
}

/* ---------- Calendar ---------- */

.calendar-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.calendar-eyebrow {
  margin: 0 0 3px;
  color: #92400e;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.calendar-head h1 {
  margin: 0 0 4px;
  font-size: clamp(22px, 2.5vw, 28px);
  line-height: 1.2;
  letter-spacing: -.025em;
}

.calendar-sub {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
}

.calendar-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.calendar-month {
  min-width: 142px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.calendar-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.calendar-stat {
  min-width: 0;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--muted);
  text-align: left;
  box-shadow: var(--shadow-sm);
  transition: border-color .15s, background .15s, box-shadow .15s;
}

.calendar-stat:hover {
  border-color: #cbd5e1;
  background: #fbfdff;
  box-shadow: 0 3px 10px rgba(15, 23, 42, .06);
}

.calendar-stat strong {
  display: block;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}

.calendar-stat span {
  display: block;
  margin-top: 2px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .01em;
}

.calendar-stat.is-danger {
  border-color: #fecaca;
  background: #fff7f7;
}

.calendar-stat.is-danger strong {
  color: #b91c1c;
}

.calendar-panel {
  padding: 13px 14px 15px;
}

.calendar-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 4px;
  table-layout: fixed;
}

.calendar-table th {
  padding: 3px 2px 7px;
  color: var(--muted-light);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .06em;
  text-align: center;
  text-transform: uppercase;
}

.calendar-table td {
  padding: 0;
  vertical-align: top;
}

.cal-day,
.cal-empty {
  min-height: 84px;
  border-radius: 8px;
}

.cal-day {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  min-width: 0;
  padding: 6px 5px;
  border: 1px solid var(--line-soft);
  background: #fff;
  color: var(--ink-soft);
  text-align: left;
  transition: border-color .12s, background .12s, box-shadow .12s;
}

.cal-day:hover {
  border-color: #cbd5e1;
  background: #fbfdff;
}

.cal-day.is-today {
  border-color: #f59e0b;
  background: #fffbeb;
}

.cal-day.is-selected {
  border-color: var(--ink);
  box-shadow: 0 0 0 1px var(--ink);
}

.cal-day.has-overdue {
  box-shadow: inset 3px 0 0 var(--danger);
}

.cal-day.is-selected.has-overdue {
  box-shadow: inset 3px 0 0 var(--danger), 0 0 0 1px var(--ink);
}

.cal-num {
  display: block;
  padding: 0 1px;
  color: var(--ink-soft);
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
}

.cal-day.is-today .cal-num {
  color: #92400e;
}

.cal-events {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.cal-event {
  display: block;
  overflow: hidden;
  padding: 2px 4px;
  border-radius: 4px;
  background: #fef3c7;
  color: #92400e;
  font-size: 9px;
  font-weight: 600;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cal-event.corrective {
  background: #fee2e2;
  color: #991b1b;
}

.cal-event.is-overdue {
  box-shadow: inset 2px 0 0 #b91c1c;
}

.cal-more {
  padding-left: 4px;
  color: var(--muted);
  font-size: 8.5px;
  font-weight: 700;
}

.cal-empty {
  border: 1px dashed #eef2f7;
  background: #fafcfe;
}

.calendar-agenda {
  margin-top: 14px;
}

.agenda-head {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.agenda-head h2 {
  margin: 0;
  font-size: 14.5px;
  letter-spacing: -.01em;
}

.agenda-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.agenda-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line-soft);
}

.agenda-item:last-child {
  border-bottom: 0;
}

.agenda-item .maint-dot {
  margin-top: 5px;
}

.agenda-main {
  min-width: 0;
  flex: 1;
}

.agenda-main strong {
  display: block;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.agenda-path {
  display: block;
  margin-top: 1px;
  color: var(--muted-light);
  font-size: 10.5px;
  overflow-wrap: anywhere;
}

.agenda-when {
  display: inline-flex;
  align-items: center;
  margin-top: 4px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 700;
}

.agenda-when.is-overdue {
  background: #fee2e2;
  color: #b91c1c;
}

.agenda-when.is-today {
  background: var(--accent-soft);
  color: #92400e;
}

.agenda-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: none;
}

.agenda-actions .btn {
  height: 30px;
  padding: 0 9px;
  font-size: 11px;
}

.agenda-empty {
  padding: 18px;
  border: 1px dashed #d6e0eb;
  border-radius: 9px;
  background: #fbfcfe;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
}

.calendar-note {
  margin: 12px 0 0;
  padding: 9px 12px;
  border: 1px solid #fde68a;
  border-radius: 8px;
  background: #fffbeb;
  color: #78350f;
  font-size: 11.5px;
  line-height: 1.5;
}

/* ---------- Reminders ---------- */

.reminder-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

.reminder-stat {
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fbfcfe;
}

.reminder-stat strong {
  display: block;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.reminder-stat span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

.reminder-stat.is-danger {
  border-color: #fecaca;
  background: #fff7f7;
}

.reminder-stat.is-danger strong {
  color: #b91c1c;
}

.reminder-group + .reminder-group {
  margin-top: 15px;
}

.reminder-group h3 {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.reminder-group h3 .count-chip {
  height: 17px;
  min-width: 18px;
  font-size: 9.5px;
}

.reminder-item {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  width: 100%;
  padding: 9px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  transition: border-color .12s, background .12s;
}

.reminder-item + .reminder-item {
  margin-top: 5px;
}

.reminder-item:hover {
  border-color: #cbd5e1;
  background: #fbfdff;
}

.reminder-item .maint-dot {
  margin-top: 5px;
}

.reminder-item-main {
  min-width: 0;
  flex: 1;
}

.reminder-item-main strong {
  display: block;
  font-size: 12px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.reminder-item-main small {
  display: block;
  margin-top: 1px;
  color: var(--muted-light);
  font-size: 10px;
  overflow-wrap: anywhere;
}

.reminder-when {
  flex: none;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.reminder-when.is-overdue {
  color: #b91c1c;
}

.reminder-when.is-today {
  color: #92400e;
}

.reminder-empty {
  padding: 24px 18px;
  border: 1px dashed #d6e0eb;
  border-radius: 10px;
  background: #fbfcfe;
  color: var(--muted);
  text-align: center;
  font-size: 12.5px;
  line-height: 1.55;
}

.reminder-empty strong {
  display: block;
  margin-bottom: 3px;
  color: var(--ink-soft);
  font-weight: 600;
}

.images-cell {
  min-width: 86px;
}

.table-thumbs {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.table-thumbs img {
  width: 30px;
  height: 30px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
}

.table-thumb-count {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.image-fieldset {
  grid-column: 1 / -1;
  margin: 2px 0 0;
  padding: 13px 14px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcfe;
}

.image-fieldset legend {
  padding: 0 5px;
  color: var(--ink-soft);
  font-size: 11.5px;
  font-weight: 700;
}

.image-fieldset > .field-hint {
  margin: 0 0 10px;
}

.image-picker {
  width: auto;
  height: 34px;
  padding: 0 11px;
  border-color: var(--line);
  background: #fff;
  color: var(--ink-soft);
  font-size: 12px;
}

.image-picker:hover {
  border-color: #cbd5e1;
  color: var(--ink);
}

.image-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(74px, 1fr));
  gap: 8px;
  margin-top: 10px;
  min-height: 0;
}

.image-preview-grid:empty {
  display: none;
}

.image-thumb {
  position: relative;
  margin: 0;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #f8fafc;
}

.image-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.image-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(15, 23, 42, .62);
  color: #fff;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}

.image-remove:hover {
  background: rgba(220, 38, 38, .86);
}

.image-gallery {
  margin-top: 16px;
}

.image-gallery .panel-head {
  margin-bottom: 8px;
}

.image-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 8px;
}

.image-thumb-link {
  display: block;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #f8fafc;
  transition: border-color .12s, box-shadow .12s, transform .12s;
}

.image-thumb-link:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(15, 23, 42, .08);
  transform: translateY(-1px);
}

.image-thumb-link img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.image-thumb-link.small {
  border-radius: 6px;
}

.image-thumb-link.small img {
  aspect-ratio: 1 / 1;
  width: 30px;
  height: 30px;
}

.history-images {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.history-images img {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 7px;
  border: 1px solid var(--line);
}

.maint-dialog-summary .image-gallery {
  grid-column: 1 / -1;
}

/* ---------- Dashboard ---------- */

.dashboard-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.dashboard-head h1 {
  margin: 2px 0 4px;
  font-size: clamp(22px, 2.5vw, 28px);
  line-height: 1.2;
  letter-spacing: -.025em;
}

.dashboard-sub {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
}

.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.dashboard-stat {
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.dashboard-stat strong {
  display: block;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}

.dashboard-stat span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
}

.dashboard-stat.is-danger {
  border-color: #fecaca;
  background: #fff7f7;
}

.dashboard-stat.is-danger strong {
  color: #b91c1c;
}

.dashboard-machine-list {
  display: grid;
  gap: 8px;
}

.dashboard-machine {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  transition: border-color .12s, background .12s, box-shadow .12s, transform .12s;
}

.dashboard-machine:hover {
  border-color: #cbd5e1;
  background: #fbfdff;
  box-shadow: 0 3px 10px rgba(15, 23, 42, .06);
  transform: translateY(-1px);
}

.dashboard-machine-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 9px;
  background: var(--accent-soft);
  color: #92400e;
}

.dashboard-machine-icon .icon {
  width: 18px;
  height: 18px;
}

.dashboard-machine-body {
  min-width: 0;
  flex: 1;
}

.dashboard-machine-body strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.dashboard-machine-body small {
  display: block;
  margin-top: 1px;
  color: var(--muted-light);
  font-size: 11px;
  overflow-wrap: anywhere;
}

@media (max-width: 960px) {
  .dashboard-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .dashboard-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-head .calendar-controls .btn {
    flex: 1 1 0;
  }
}

/* ---------- Image icons ---------- */

.tree-thumb {
  width: 16px;
  height: 16px;
  flex: none;
  border-radius: 4px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, .12);
}

.child-thumb {
  width: 17px;
  height: 17px;
  object-fit: cover;
  border-radius: 5px;
  border: 1px solid var(--line);
}

.entity-icon.has-image {
  padding: 0;
  overflow: hidden;
  background: #f8fafc;
}

.entity-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.component-name-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.component-name-cell .component-name {
  min-width: 0;
}

.table-thumb-btn {
  flex: none;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.table-thumb-btn img {
  width: 28px;
  height: 28px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
  transition: border-color .12s, transform .12s;
}

.table-thumb-btn:hover img {
  border-color: #cbd5e1;
  transform: scale(1.04);
}

/* ---------- Dashboard images ---------- */

.dashboard-machine-icon.has-image {
  padding: 0;
  overflow: hidden;
  background: #f8fafc;
}

.dashboard-machine-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---------- Large image cards ---------- */

.dashboard-machine {
  flex-direction: column;
  align-items: stretch;
  padding: 0;
  overflow: hidden;
}

.dashboard-machine-icon {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  border-radius: 10px 10px 0 0;
  background: var(--accent-soft);
  color: #92400e;
}

.dashboard-machine-icon.has-image {
  padding: 0;
  background: #f8fafc;
}

.dashboard-machine-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.dashboard-machine-body {
  padding: 12px 14px 14px;
}

@media (max-width: 640px) {
  .dashboard-machine {
    max-width: 75vw;
    margin-left: auto;
    margin-right: auto;
  }
}

.child-card {
  flex-direction: column;
  align-items: stretch;
  padding: 0;
  overflow: hidden;
}

.child-icon {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  border-radius: 10px 10px 0 0;
  background: #f1f5f9;
  color: #64748b;
}

.child-icon:has(img) {
  padding: 0;
  background: #f8fafc;
}

.child-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.child-body {
  padding: 11px 12px 12px;
}

@media (max-width: 640px) {
  .child-card {
    max-width: 75vw;
    margin-left: auto;
    margin-right: auto;
  }
}

.components-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px;
}

@media (max-width: 640px) {
  .components-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.component-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.component-card-media {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #f1f5f9;
  color: #64748b;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.component-card-image {
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.component-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .12s;
}

.component-card-image:hover img {
  transform: scale(1.04);
}

.component-card-image-count {
  position: absolute;
  right: 6px;
  bottom: 6px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(15, 23, 42, .62);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
}

.component-card-placeholder .icon {
  width: 34px;
  height: 34px;
}

.component-card-body {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 10px;
  min-width: 0;
}

.component-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
}

.component-card-head .component-name {
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.component-card-head .status {
  flex: none;
  font-size: 9.5px;
  padding: 2px 6px;
}

.component-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 8px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
}

.component-card-meta .ref-code {
  color: var(--muted);
  font-size: 10px;
}

.component-card-maint {
  display: inline-flex;
  align-items: center;
}

.component-card-notes {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.component-card .row-actions {
  margin-top: auto;
  padding-top: 4px;
  justify-content: flex-end;
}

/* ---------- Voice input ---------- */

.field {
  position: relative;
}

.field-mic {
  position: absolute;
  right: 7px;
  bottom: 7px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s, transform .15s;
  z-index: 2;
}

.field-mic:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
  color: var(--ink);
}

.field-mic .icon {
  width: 14px;
  height: 14px;
}

.field-mic.is-listening {
  background: #fee2e2;
  border-color: #fecaca;
  color: #b91c1c;
  animation: voice-pulse 1.1s ease-in-out infinite;
}

@keyframes voice-pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(220, 38, 38, .35);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(220, 38, 38, 0);
  }
}

.field textarea ~ .field-mic.field-mic-textarea {
  bottom: 9px;
}

.sidebar-search {
  position: relative;
}

.sidebar-mic {
  position: absolute;
  right: 34px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  border-color: rgba(255, 255, 255, .1);
  background: rgba(255, 255, 255, .06);
  color: #94a3b8;
  z-index: 3;
}

.sidebar-mic:hover {
  background: rgba(255, 255, 255, .1);
  color: #fff;
}

.sidebar-mic.is-listening {
  background: rgba(220, 38, 38, .18);
  border-color: rgba(220, 38, 38, .35);
  color: #fca5a5;
}

.no-voice .field-mic,
.no-voice .sidebar-mic {
  display: none;
}

.field input,
.field textarea {
  padding-right: 40px;
}

.sidebar-search input {
  padding-right: 62px;
}

/* ---------- Empty states ---------- */

.empty-state {
  margin-top: 3vh;
  padding: 64px 28px 56px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.empty-mark {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  margin: 0 auto 20px;
  border: 1px solid #fde68a;
  border-radius: 20px;
  background: linear-gradient(145deg, #fffbeb, #fde68a);
  color: #92400e;
  box-shadow: 0 8px 24px rgba(245, 158, 11, .12);
}

.empty-mark .icon {
  width: 32px;
  height: 32px;
}

.empty-state h1 {
  margin: 0 0 10px;
  font-size: clamp(23px, 3vw, 28px);
  letter-spacing: -.025em;
}

.empty-state > p {
  max-width: 480px;
  margin: 0 auto 24px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.65;
}

.empty-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
}

.empty-hint {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 7px 11px;
  margin-top: 27px;
  color: var(--muted-light);
  font-size: 11.5px;
}

.empty-hint span:not(.hint-sep) {
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fbfcfe;
}

.empty-hint .hint-sep {
  color: #cbd5e1;
}

/* ---------- Dialogs ---------- */

.dialog {
  width: 100%;
  max-width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: var(--ink);
  overflow: visible;
}

.dialog::backdrop {
  background: rgba(8, 16, 28, .58);
  backdrop-filter: blur(3px);
}

.dialog[open] {
  animation: dialog-in .16s ease-out;
}

@keyframes dialog-in {
  from {
    opacity: 0;
    transform: translateY(5px) scale(.99);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.dialog-card {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(2, 6, 23, .38);
  overflow: hidden;
}

.dialog-sm {
  max-width: min(430px, calc(100vw - 32px));
}

.dialog-maint {
  max-width: min(700px, calc(100vw - 32px));
}

.dialog-reminders {
  max-width: min(570px, calc(100vw - 32px));
}

.dialog-title-group {
  min-width: 0;
}

.dialog-kicker {
  display: block;
  margin-bottom: 2px;
  color: #92400e;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.dialog-sub {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.dialog-maint .dialog-foot {
  flex-wrap: wrap;
}

.maint-dialog-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 17px;
}

.maint-dialog-summary .maint-card {
  padding: 11px 12px;
}

.maint-dialog-summary .maint-due {
  font-size: 14.5px;
}

.maint-record {
  padding-top: 15px;
  border-top: 1px solid var(--line-soft);
}

.maint-record h3 {
  margin: 0 0 10px;
  font-size: 13px;
  letter-spacing: -.005em;
}

.maint-record .field textarea {
  min-height: 66px;
}

.maint-dialog-history {
  margin-top: 17px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
}

.maint-dialog-history h3 {
  margin: 0 0 3px;
  font-size: 13px;
}

.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.dialog-head h2 {
  margin: 0;
  font-size: 17px;
  letter-spacing: -.015em;
}

.dialog-body {
  padding: 19px 20px;
  overflow-y: auto;
}

.dialog-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 13px 20px;
  border-top: 1px solid var(--line);
  background: #f8fafc;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

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

.field label {
  color: var(--ink-soft);
  font-size: 11.5px;
  font-weight: 600;
}

.field label .req {
  color: var(--danger);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid #d6e0eb;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 13.5px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}

.field input,
.field select {
  height: 39px;
  padding: 0 10px;
}

.field textarea {
  min-height: 82px;
  padding: 9px 10px;
  line-height: 1.5;
  resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #a7b4c4;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--accent-strong);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, .13);
}

.field-hint {
  color: var(--muted-light);
  font-size: 10.5px;
}

.field-error {
  display: none;
  margin: 0;
  color: var(--danger);
  font-size: 10.5px;
}

.field.has-error .field-error {
  display: block;
}

.field.has-error input,
.field.has-error select,
.field.has-error textarea {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, .08);
}

.maint-fieldset {
  grid-column: 1 / -1;
  margin: 2px 0 0;
  padding: 13px 14px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcfe;
}

.maint-fieldset legend {
  padding: 0 5px;
  color: var(--ink-soft);
  font-size: 11.5px;
  font-weight: 700;
}

.maint-fieldset > .field-hint {
  margin: -4px 0 10px;
}

.maint-type + .maint-type {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line-soft);
}

.maint-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.maint-toggle input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--accent-strong);
}

.maint-toggle .maint-dot {
  width: 8px;
  height: 8px;
}

.maint-config {
  margin-top: 9px;
  padding-left: 24px;
}

.maint-config .form-grid {
  gap: 9px;
}

.maint-config .field label {
  font-size: 10.5px;
}

.maint-config .field input,
.maint-config .field select {
  height: 34px;
  font-size: 12.5px;
}

.interval-row {
  display: flex;
  gap: 6px;
}

.interval-row input {
  min-width: 0;
  flex: 1;
}

.interval-row select {
  width: 105px;
  flex: none;
}

.maint-config .field {
  margin-bottom: 9px;
}

.maint-config > .field-hint {
  margin: 0;
}

.confirm-body {
  padding: 27px 24px 12px;
  text-align: center;
}

.confirm-icon {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--danger-soft);
  color: var(--danger);
}

.confirm-icon .icon {
  width: 24px;
  height: 24px;
}

.confirm-body h2 {
  margin: 0 0 7px;
  font-size: 17px;
  line-height: 1.35;
}

.confirm-body p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.dialog-sm .dialog-foot {
  justify-content: center;
  padding: 14px 20px;
}

/* ---------- Lightbox ---------- */

.dialog-lightbox {
  max-width: 98vw;
  max-height: 98vh;
  padding: 0;
  background: transparent;
}

.lightbox-card {
  position: relative;
  display: inline-block;
  width: fit-content;
  background: transparent;
  border-radius: 0;
  overflow: visible;
}

.lightbox-close {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(15, 23, 42, .62);
  color: #fff;
  cursor: pointer;
}

.lightbox-close:hover {
  background: rgba(220, 38, 38, .86);
}

.lightbox-stage {
  position: relative;
  width: fit-content;
  height: fit-content;
  max-width: 98vw;
  max-height: 98vh;
  display: grid;
  place-items: center;
  overflow: visible;
  background: transparent;
  touch-action: none;
  user-select: none;
}

.lightbox-stage img {
  display: block;
  min-width: 120px;
  max-width: 98vw;
  max-height: 98vh;
  width: auto;
  height: auto;
  object-fit: contain;
  transform-origin: center center;
  transition: transform .12s ease;
  will-change: transform;
  pointer-events: none;
}

.lightbox-toolbar {
  position: absolute;
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, .72);
  backdrop-filter: blur(6px);
}

.lightbox-tool {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #e2e8f0;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}

.lightbox-tool:hover {
  background: rgba(255, 255, 255, .12);
  color: #fff;
}

.lightbox-tool:disabled {
  opacity: .35;
  cursor: not-allowed;
}

.lightbox-reset {
  width: auto;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

#lightboxZoomLabel {
  min-width: 40px;
  text-align: center;
  color: #e2e8f0;
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* ---------- Assistant ---------- */

.dialog-assistant {
  max-width: min(620px, calc(100vw - 32px));
}

.assistant-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 320px;
}

.assistant-log {
  flex: 1 1 auto;
  min-height: 180px;
  max-height: 360px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 4px 2px;
}

.assistant-message {
  max-width: 92%;
  padding: 9px 11px;
  border-radius: 10px;
  font-size: 12.5px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.assistant-message.user {
  align-self: flex-end;
  background: var(--ink);
  color: #fff;
}

.assistant-message.assistant {
  align-self: flex-start;
  background: #f8fafc;
  color: var(--ink);
  border: 1px solid var(--line);
}

.assistant-message.assistant strong {
  color: var(--ink-soft);
}

.assistant-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.assistant-form {
  display: flex;
  gap: 8px;
}

.assistant-form input {
  flex: 1 1 auto;
  min-width: 0;
  height: 38px;
  padding: 0 10px;
  border: 1px solid #d6e0eb;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  outline: none;
}

.assistant-form input:focus {
  border-color: var(--accent-strong);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, .13);
}

@media (max-width: 640px) {
  .assistant-body {
    min-height: 260px;
  }

  .assistant-log {
    max-height: 260px;
  }
}

/* ---------- Assistant FAB ---------- */

.assistant-fab {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 70;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(180deg, #fbbf24, #f59e0b);
  color: #2a1c02;
  box-shadow: 0 10px 28px rgba(245, 158, 11, .35), 0 2px 8px rgba(15, 23, 42, .18);
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
}

.assistant-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(245, 158, 11, .4), 0 4px 10px rgba(15, 23, 42, .2);
}

.assistant-fab .icon {
  width: 24px;
  height: 24px;
}

@media (max-width: 640px) {
  .assistant-fab {
    left: 14px;
    bottom: 14px;
    width: 50px;
    height: 50px;
  }
}

/* ---------- Auth ---------- */

body:not(.is-authenticated) .app {
  display: none;
}

.auth-screen {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: radial-gradient(circle at 20% 0%, rgba(245, 158, 11, .12), transparent 34%), linear-gradient(180deg, var(--navy-900), var(--navy-950));
}

body.is-authenticated .auth-screen {
  display: none;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  padding: 28px 24px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 18px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 24px 80px rgba(2, 6, 23, .42);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.auth-brand .brand-mark {
  width: 38px;
  height: 38px;
}

.auth-brand strong {
  color: var(--navy-900);
  font-size: 20px;
  letter-spacing: -.01em;
}

.auth-card h1 {
  margin: 0 0 6px;
  color: var(--navy-900);
  font-size: 22px;
  letter-spacing: -.02em;
}

.auth-card > p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.auth-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}

.auth-tab {
  flex: 1;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink-soft);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

.auth-tab.is-active {
  border-color: var(--accent-strong);
  background: var(--accent-soft);
  color: #92400e;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auth-form .field {
  gap: 4px;
}

.auth-form .field input {
  height: 40px;
  border-color: #d6e0eb;
}

.auth-error {
  margin: 10px 0 0;
  padding: 9px 11px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fff7f7;
  color: #b91c1c;
  font-size: 12px;
  line-height: 1.45;
}

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: min(440px, calc(100vw - 32px));
  padding: 10px 15px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 10px;
  background: var(--navy-900);
  color: #f1f5f9;
  box-shadow: 0 12px 40px rgba(2, 6, 23, .3);
  font-size: 12.5px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 14px);
  transition: opacity .2s, transform .2s;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast .icon {
  width: 16px;
  height: 16px;
  color: #34d399;
}

.toast.error .icon {
  color: #f87171;
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .app {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 300px;
    max-width: 86vw;
    visibility: hidden;
    transform: translateX(-102%);
    transition: transform .22s ease, visibility 0s linear .22s;
    box-shadow: 24px 0 60px rgba(2, 6, 23, .28);
  }

  body.sidebar-open .sidebar {
    visibility: visible;
    transform: translateX(0);
    transition: transform .22s ease, visibility 0s;
  }

  .sidebar-close {
    display: inline-grid;
  }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 35;
    display: block;
    background: rgba(8, 16, 28, .52);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s;
  }

  body.sidebar-open .sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .menu-btn {
    display: inline-grid;
  }

  .topbar {
    padding: 0 16px;
  }

  .content {
    padding: 22px 18px 52px;
  }

  .empty-state {
    margin-top: 12px;
  }
}

@media (max-width: 640px) {
  .topbar {
    height: 58px;
    gap: 8px;
  }

  .topbar-actions .btn {
    width: 34px;
    padding: 0;
  }

  .topbar-actions .btn-label {
    display: none;
  }

  .content {
    padding: 18px 14px 44px;
  }

  .detail-head {
    flex-wrap: wrap;
    gap: 12px;
  }

  .entity-icon {
    width: 47px;
    height: 47px;
    border-radius: 12px;
  }

  .entity-icon .icon {
    width: 23px;
    height: 23px;
  }

  .entity-main {
    flex: 1;
    min-width: calc(100% - 62px);
  }

  .head-actions {
    width: 100%;
  }

  .head-actions .btn {
    flex: 1;
  }

  .meta-row {
    gap: 6px 16px;
  }

  .panel {
    padding: 16px 15px 17px;
  }

  .panel-head {
    flex-wrap: wrap;
  }

  .panel-head h2 {
    font-size: 15px;
  }

  .panel-head .btn {
    margin-left: 0;
    width: 100%;
    margin-top: 2px;
  }

  .panel-actions {
    width: 100%;
    margin-left: 0;
    margin-top: 2px;
  }

  .panel-head .panel-actions .btn {
    flex: 1 1 0;
    width: auto;
    margin-top: 0;
    padding: 0 8px;
    font-size: 11.5px;
  }

  .child-grid {
    grid-template-columns: 1fr;
  }

  .empty-state {
    padding: 44px 18px 40px;
    border-radius: 15px;
  }

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

  .dialog-foot {
    padding: 12px 16px;
  }

  .dialog-head,
  .dialog-body {
    padding-left: 16px;
    padding-right: 16px;
  }

  .notes-cell {
    max-width: 180px;
  }

  .calendar-head {
    align-items: flex-start;
  }

  .calendar-controls {
    width: 100%;
    gap: 4px;
  }

  .calendar-month {
    flex: 1;
    min-width: 0;
  }

  .calendar-summary {
    gap: 6px;
  }

  .calendar-stat {
    padding: 9px 8px;
  }

  .calendar-stat strong {
    font-size: 17px;
  }

  .calendar-stat span {
    font-size: 9.5px;
  }

  .calendar-panel {
    padding: 9px 7px 11px;
  }

  .calendar-table {
    border-spacing: 2px;
  }

  .calendar-table th {
    padding: 2px 1px 5px;
    font-size: 8.5px;
    letter-spacing: .03em;
  }

  .cal-day,
  .cal-empty {
    min-height: 54px;
  }

  .cal-day {
    align-items: center;
    gap: 3px;
    padding: 3px 2px;
  }

  .cal-num {
    font-size: 10.5px;
  }

  .cal-events {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 3px;
  }

  .cal-event {
    width: 6px;
    height: 6px;
    padding: 0;
    border-radius: 50%;
    background: var(--accent-strong);
    color: transparent;
    font-size: 0;
  }

  .cal-event.corrective {
    background: var(--danger);
  }

  .cal-event.is-overdue {
    box-shadow: 0 0 0 1.5px #7f1d1d;
  }

  .cal-more {
    padding: 0;
    font-size: 8px;
  }

  .agenda-item {
    flex-wrap: wrap;
  }

  .agenda-actions {
    width: 100%;
    justify-content: flex-end;
  }

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

  .dialog-maint .dialog-foot {
    gap: 6px;
  }

  .dialog-maint .dialog-foot .btn {
    flex: 1 1 auto;
    padding: 0 10px;
  }

  .reminder-btn {
    width: 34px;
    height: 34px;
  }

  .reminder-summary {
    gap: 6px;
  }

  .reminder-stat {
    padding: 8px;
  }

  .reminder-stat strong {
    font-size: 16px;
  }

  .reminder-item {
    flex-wrap: wrap;
  }

  .reminder-when {
    margin-left: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}
