:root {
  color-scheme: dark;
  --bg: #030404;
  --panel: #0b0d0e;
  --panel-2: #101314;
  --panel-3: #151819;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.18);
  --text: #f4f6f5;
  --muted: #a7adad;
  --subtle: #6f7778;
  --accent: #19c7b2;
  --accent-2: #30d5c8;
  --accent-soft: rgba(25, 199, 178, 0.16);
  --ready: #52d86f;
  --processing: #58baf7;
  --received: #69c7e8;
  --failed: #ff6262;
  --warning: #ffc14f;
  --shadow: 0 22px 80px rgba(0, 0, 0, 0.45);
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 32% 8%, rgba(25, 199, 178, 0.08), transparent 30%),
    radial-gradient(circle at 78% 38%, rgba(62, 129, 255, 0.07), transparent 26%),
    var(--bg);
  color: var(--text);
}

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

button {
  color: inherit;
}

.app-shell {
  display: grid;
  grid-template-columns: 250px minmax(330px, 1.15fr) minmax(330px, 0.95fr);
  min-height: 100vh;
  padding: 12px;
  gap: 10px;
}

.side-panel,
.timeline-panel,
.inspector-panel {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(16, 19, 20, 0.96), rgba(7, 8, 9, 0.98));
  box-shadow: var(--shadow);
}

.side-panel {
  display: flex;
  flex-direction: column;
  overflow: auto;
  padding: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 4px 16px;
}

.brand-mark {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  color: var(--accent-2);
  overflow: visible;
}

.brand-ring,
.brand-link {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand-ring {
  stroke-width: 1.45;
  opacity: 0.9;
}

.brand-link {
  stroke-width: 1.35;
  opacity: 0.9;
}

.brand-node {
  fill: currentColor;
  stroke: none;
}

.brand strong,
.brand span {
  display: block;
}

.brand strong {
  font-size: 18px;
  letter-spacing: 0;
}

.brand span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.quick-capture-panel {
  padding: 6px 0 18px;
}

.quick-capture-button {
  display: grid;
  grid-template-columns: 20px 1fr auto;
  align-items: center;
  width: 100%;
  border: 1px solid rgba(25, 199, 178, 0.48);
  border-radius: var(--radius);
  padding: 12px 14px;
  background: linear-gradient(135deg, rgba(31, 199, 180, 0.94), rgba(18, 139, 130, 0.94));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
  color: white;
  cursor: pointer;
}

.quick-capture-button span:nth-child(2) {
  text-align: left;
  font-weight: 700;
}

kbd {
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  font-family: inherit;
}

.quick-capture-form,
.token-form {
  display: grid;
  gap: 9px;
}

.quick-capture-form {
  margin-top: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.22);
}

.capture-dropzone {
  position: relative;
  display: grid;
  gap: 10px;
  min-height: 174px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.24);
  transition: border-color 0.16s ease, background 0.16s ease;
}

.capture-dropzone.is-dragging,
.capture-dropzone:focus-within {
  border-color: rgba(25, 199, 178, 0.72);
  background: rgba(25, 199, 178, 0.08);
}

.capture-dropzone textarea {
  min-height: 112px;
  border: 0;
  padding: 44px 12px 10px;
  background: transparent;
  box-shadow: none;
}

.capture-add-file {
  position: absolute;
  top: 8px;
  left: 8px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(25, 199, 178, 0.48);
  border-radius: 7px;
  padding: 0;
  background: rgba(25, 199, 178, 0.14);
  color: var(--accent-2);
  font-size: 20px;
  line-height: 0;
  font-weight: 400;
}

.capture-original-toggle {
  position: absolute;
  top: 8px;
  right: 8px;
  display: inline-grid;
  grid-template-columns: 20px 34px;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  margin: 0;
  border: 1px solid rgba(25, 199, 178, 0.48);
  border-radius: 7px;
  padding: 3px 6px;
  background: rgba(25, 199, 178, 0.14);
  color: var(--accent-2);
  cursor: pointer;
}

.capture-original-toggle svg {
  width: 18px;
  height: 18px;
}

.capture-original-toggle svg path {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.capture-original-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.capture-original-toggle span {
  position: relative;
  width: 32px;
  height: 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
}

.capture-original-toggle span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--muted);
  transition: transform 0.16s ease, background 0.16s ease;
}

.capture-original-toggle input:checked + span {
  background: rgba(25, 199, 178, 0.34);
}

.capture-original-toggle input:checked + span::after {
  transform: translateX(14px);
  background: var(--accent-2);
}

.capture-file-list {
  display: grid;
  gap: 6px;
  padding: 0 10px 10px;
}

.capture-file {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto 24px;
  gap: 8px;
  align-items: center;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 6px 7px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--muted);
  font-size: 12px;
}

.capture-file__icon {
  display: grid;
  place-items: center;
  color: var(--accent-2);
}

.capture-file__icon .source-icon {
  width: 18px;
  height: 18px;
}

.capture-file__name {
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.capture-file__size {
  color: var(--subtle);
}

.capture-file button {
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 6px;
  padding: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.quick-capture-form[hidden] {
  display: none;
}

.nav-section {
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.nav-section h2 {
  margin: 0 0 11px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

label {
  color: var(--muted);
  font-size: 12px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 10px 11px;
  background: rgba(0, 0, 0, 0.28);
  color: var(--text);
  outline: none;
}

textarea {
  resize: none;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.28) transparent;
}

textarea::-webkit-scrollbar {
  width: 8px;
}

textarea::-webkit-scrollbar-track {
  background: transparent;
}

textarea::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  background-clip: content-box;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(25, 199, 178, 0.72);
  box-shadow: 0 0 0 3px rgba(25, 199, 178, 0.12);
}

.token-form button,
.quick-capture-form button,
.search-form button,
.secondary-button,
.inspector-actions button {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 9px 11px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.04));
  color: var(--text);
  cursor: pointer;
}

.quick-capture-form button {
  border-color: rgba(25, 199, 178, 0.5);
  background: var(--accent-soft);
}

.filter-list {
  display: grid;
  gap: 5px;
}

.filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 7px 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.filter-row:hover,
.filter-row.is-active {
  border-color: rgba(25, 199, 178, 0.45);
  background: rgba(25, 199, 178, 0.12);
  color: var(--text);
}

.filter-row__label {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.filter-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  color: var(--accent-2);
  text-align: center;
}

.source-icon {
  color: currentColor;
}

.source-icon path,
.source-icon circle,
.source-icon rect {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
}

.status-dot--received {
  background: var(--received);
}

.status-dot--processing {
  background: var(--processing);
}

.status-dot--ready {
  background: var(--ready);
}

.status-dot--failed {
  background: var(--failed);
}

.sync-line {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
}

.secondary-button {
  width: 100%;
}

.device-footer {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  padding: 12px 2px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.device-footer div {
  display: grid;
  gap: 5px;
}

.device-footer strong {
  color: var(--warning);
  font-weight: 600;
}

.device-footer strong.is-ready {
  color: var(--ready);
}

.settings-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  min-height: 40px;
  padding: 8px 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
}

.settings-button svg {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
}

.settings-button svg path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.settings-button:hover {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.settings-dialog {
  width: min(460px, calc(100vw - 32px));
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 0;
  background: var(--panel);
  color: var(--text);
  box-shadow: var(--shadow);
}

.settings-dialog::backdrop {
  background: rgba(0, 0, 0, 0.66);
}

.settings-card {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.settings-card header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 2px;
}

.settings-card h2,
.settings-card p {
  margin: 0;
}

.settings-card h2 {
  font-size: 18px;
}

.settings-card p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.settings-card header button {
  width: 30px;
  height: 30px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 24px;
  cursor: pointer;
}

.settings-hint {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
}

.settings-card > button[type="submit"] {
  border-color: rgba(25, 199, 178, 0.5);
  background: var(--accent-soft);
}

.timeline-panel {
  display: flex;
  flex-direction: column;
}

.timeline-toolbar,
.inspector-topbar {
  border-bottom: 1px solid var(--line);
  background: rgba(10, 12, 13, 0.84);
}

.timeline-toolbar {
  display: grid;
  grid-template-columns: minmax(150px, auto) 1fr;
  gap: 18px;
  align-items: center;
  padding: 13px 16px;
}

.toolbar-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.toolbar-title h1,
.inspector-topbar h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
}

.toolbar-title span {
  color: var(--muted);
  font-size: 12px;
}

.search-form {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  align-items: center;
}

.search-box {
  display: flex;
  flex: 1 1 260px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding-left: 11px;
  background: rgba(0, 0, 0, 0.3);
}

.search-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  color: var(--muted);
}

.search-icon circle,
.search-icon path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.search-box input {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.search-form select {
  flex: 0 0 132px;
}

.search-form input[type="date"],
.search-form [data-tag-filter],
.search-form [data-category-filter] {
  flex: 0 1 116px;
}

.search-form button {
  flex: 0 0 42px;
}

.timeline-list {
  display: grid;
  align-content: start;
  overflow: auto;
}

.timeline-item {
  display: grid;
  grid-template-columns: 58px 34px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 90px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 14px 14px 14px 16px;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.timeline-item:hover,
.timeline-item.is-selected {
  background: linear-gradient(90deg, rgba(25, 199, 178, 0.14), rgba(25, 199, 178, 0.04) 55%, transparent);
}

.timeline-item.is-selected {
  outline: 1px solid rgba(25, 199, 178, 0.72);
  outline-offset: -1px;
}

.timeline-item__time {
  display: grid;
  gap: 2px;
  color: var(--muted);
  font-size: 12px;
}

.timeline-item__time strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
}

.timeline-item__icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.timeline-item__icon .source-icon {
  width: 20px;
  height: 20px;
}

.timeline-item__content {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.timeline-item__title {
  overflow: hidden;
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timeline-item__preview {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-pill,
.pill {
  width: fit-content;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 4px 7px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 12px;
}

.status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 82px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 6px 9px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 12px;
  font-weight: 650;
}

.status--received {
  color: var(--received);
  border-color: rgba(105, 199, 232, 0.36);
  background: rgba(105, 199, 232, 0.1);
}

.status--processing {
  color: var(--processing);
  border-color: rgba(88, 186, 247, 0.42);
  background: rgba(88, 186, 247, 0.1);
}

.status--ready {
  color: var(--ready);
  border-color: rgba(82, 216, 111, 0.36);
  background: rgba(82, 216, 111, 0.1);
}

.status--failed {
  color: var(--failed);
  border-color: rgba(255, 98, 98, 0.42);
  background: rgba(255, 98, 98, 0.1);
}

.inspector-panel {
  display: flex;
  flex-direction: column;
  overflow: auto;
}

.inspector-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 16px;
}

.inspector-topbar button {
  width: 30px;
  height: 30px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 24px;
  cursor: pointer;
}

.inspector-document {
  min-width: 0;
}

.inspector-document__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.inspector-title-block {
  min-width: 0;
  width: 100%;
}

.field {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.055);
}

.field-label {
  display: block;
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 12px;
}

.field--title {
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--text);
  font-size: 19px;
  font-weight: 750;
  box-shadow: none;
}

.inspector-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.inspector-meta-line span:not(:last-child)::after {
  content: "·";
  margin-left: 7px;
  color: var(--subtle);
}

.inspector-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
}

.inspector-actions .danger-button {
  color: #ffb7b7;
  border-color: rgba(255, 98, 98, 0.36);
}

.inspector-section {
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.inspector-section h2 {
  margin: 0 0 11px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.field--summary {
  margin-bottom: 14px;
  line-height: 1.5;
  min-height: 0;
}

.inspector-section--body .field--body {
  min-height: 130px;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--text);
  line-height: 1.55;
  box-shadow: none;
}

.inspector-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  border-bottom: 1px solid var(--line);
}

.inspector-grid .inspector-section {
  border-bottom: 0;
}

.inspector-grid .inspector-section + .inspector-section {
  border-left: 1px solid var(--line);
}

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

.metadata-grid--plain {
  grid-template-columns: 1fr;
}

dt {
  color: var(--muted);
  font-size: 12px;
}

dd {
  margin: 4px 0 0;
  color: var(--text);
  font-size: 13px;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 9px;
}

.inline-adder {
  margin-top: 8px;
}

.inline-adder summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  place-items: center;
  min-width: 29px;
  min-height: 26px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 3px 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  list-style: none;
}

.inline-adder summary::-webkit-details-marker {
  display: none;
}

.inline-adder__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}

.inline-adder__row--relation {
  grid-template-columns: minmax(0, 1fr) minmax(118px, auto) auto auto;
}

.inline-adder__row button,
.inline-adder__row select {
  min-height: 34px;
}

.inline-adder__row button {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  cursor: pointer;
}

.field--chips {
  min-height: 34px;
  padding: 8px 9px;
  font-size: 13px;
}

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

pre {
  overflow: auto;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  background: rgba(0, 0, 0, 0.25);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.detail-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.detail-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted);
  font-size: 13px;
}

.detail-list strong {
  color: var(--text);
  font-weight: 500;
}

.processing-rail {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.processing-step {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted);
  font-size: 12px;
}

.processing-step--ready,
.processing-step--received {
  color: var(--ready);
  border-color: rgba(82, 216, 111, 0.34);
}

.processing-step--processing {
  color: var(--processing);
  border-color: rgba(88, 186, 247, 0.38);
}

.processing-step--failed {
  color: var(--failed);
  border-color: rgba(255, 98, 98, 0.38);
}

.empty-state {
  display: grid;
  place-content: center;
  min-height: 260px;
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

.empty-state h2 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 18px;
}

.empty-state p {
  max-width: 320px;
  margin: 0 auto;
  line-height: 1.5;
}

@media (max-width: 1280px) {
  .timeline-toolbar {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .search-form {
    justify-content: stretch;
  }

  .search-box {
    flex: 1 1 100%;
  }

  .search-form select {
    flex: 1 1 148px;
  }

  .search-form input[type="date"],
  .search-form [data-tag-filter],
  .search-form [data-category-filter] {
    display: none;
  }
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 246px minmax(360px, 1fr);
    grid-template-areas:
      "side timeline"
      "side inspector";
  }

  .side-panel {
    grid-area: side;
  }

  .timeline-panel {
    grid-area: timeline;
    min-height: 52vh;
  }

  .inspector-panel {
    grid-area: inspector;
    min-height: 46vh;
  }
}

@media (max-width: 760px) {
  .app-shell {
    display: block;
    padding: 0;
  }

  .side-panel,
  .timeline-panel,
  .inspector-panel {
    border-right: 0;
    border-left: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .side-panel {
    max-height: none;
  }

  .nav-section {
    display: none;
  }

  .device-footer {
    align-items: center;
  }

  .inline-adder__row,
  .inline-adder__row--relation {
    grid-template-columns: 1fr;
  }

  .timeline-toolbar {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .search-form {
    grid-template-columns: minmax(0, 1fr) 42px;
  }

  .search-form select,
  .search-form input[type="date"],
  .search-form [data-tag-filter],
  .search-form [data-category-filter],
  .search-form button[type="submit"] {
    display: none;
  }

  .timeline-item {
    grid-template-columns: 34px minmax(0, 1fr) auto;
    min-height: 72px;
  }

  .timeline-item__time {
    display: none;
  }

  .status {
    min-width: 0;
    padding: 5px 7px;
    font-size: 11px;
  }

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

  .inspector-grid .inspector-section + .inspector-section {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}
