:root {
  --bg: #1e2429;
  --panel: #12171b;
  --panel-2: #1f2730;
  --text: #e6edf3;
  --muted: #9db2c3;
  --accent: #00b4d8;
  --danger: #d9534f;
  --border: #303a43;
  --layout-max: 1420px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top, #2b3640, var(--bg) 60%);
  color: var(--text);
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  padding: 20px;
}

.brand-bar {
  position: sticky;
  top: 10px;
  z-index: 30;
  max-width: var(--layout-max);
  margin: 0 auto 16px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid #3b4a57;
  background: rgba(17, 24, 30, 0.82);
  backdrop-filter: blur(8px);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.28);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.brand-main {
  min-width: 0;
}

.brand-name {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.3px;
}

.brand-tagline {
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
}

.brand-links {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  color: #8ecfdf;
  font-size: 13px;
}

.brand-links-primary,
.brand-links-contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.brand-links a {
  color: #a6e8f6;
  text-decoration: none;
  white-space: nowrap;
}

.brand-links .brand-phone,
.brand-links .brand-email {
  color: #cbe0e9;
  white-space: nowrap;
}

.brand-links a:hover {
  text-decoration: underline;
}

.brand-links .brand-divider {
  color: var(--muted);
}

.page {
  max-width: var(--layout-max);
  margin: 0 auto;
  display: grid;
  gap: 16px;
}

.brand-footer {
  max-width: var(--layout-max);
  margin: 20px auto 6px;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid #33424f;
  background: linear-gradient(180deg, #18232a, #121a20);
  color: #cbeefa;
  font-size: clamp(18px, 2.2vw, 24px);
  font-weight: 700;
  letter-spacing: 0.3px;
  text-align: center;
}

.brand-footer a {
  color: #9be7ff;
  text-decoration: underline;
  text-underline-offset: 2px;
  word-break: break-word;
}

.brand-created-by-footer {
  max-width: var(--layout-max);
  margin: 8px auto 14px;
  padding: 0 18px;
  color: rgba(203, 238, 250, 0.55);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2px;
  text-align: center;
}

.brand-created-by-footer a {
  color: rgba(155, 231, 255, 0.7);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.hero {
  background: linear-gradient(180deg, #1a232b, #11161a);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: 0.4px;
}

.hero p {
  margin: 6px 0 0;
  color: var(--muted);
}

.panel {
  background: linear-gradient(180deg, #171f25, var(--panel));
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
}

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

.meta-card {
  background: var(--panel-2);
  border: 1px solid #2d3842;
  border-radius: 10px;
  padding: 10px;
}

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

.meta-card .value {
  margin-top: 2px;
  font-size: 16px;
  font-weight: 700;
}

.progress {
  width: 100%;
  height: 12px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #2b3842;
  margin-bottom: 16px;
  background: #0f1418;
}

.progress > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #00b4d8, #d9534f);
  transition: width 200ms ease;
}

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

.node {
  margin-bottom: 8px;
  border: 1px solid #2c3740;
  border-radius: 10px;
  background: #1a232a;
}

.node > button {
  width: 100%;
  text-align: left;
  cursor: pointer;
  background: transparent;
  border: none;
  color: var(--text);
  padding: 10px 12px;
  font-size: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  touch-action: manipulation;
}

.node > button:hover {
  background: rgba(255, 255, 255, 0.03);
}

.node > button:active {
  background: rgba(255, 255, 255, 0.05);
}

.folder-left {
  min-width: 0;
  flex: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.folder-chevron {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #365161;
  border-radius: 6px;
  background: #1b2b36;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  color: #a7e6f5;
  transition: color 140ms ease, border-color 140ms ease, background-color 140ms ease, transform 140ms ease;
}

.node.open .folder-chevron {
  color: #d7f4fc;
  border-color: #5e8ea4;
  background: #224050;
}

.node > button:hover .folder-chevron {
  border-color: #4f768b;
  background: #203643;
  transform: scale(1.03);
}

.node > button:active .folder-chevron {
  transform: scale(0.96);
}

.folder-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.folder-size,
.file-size {
  flex-shrink: 0;
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.child-list {
  list-style: none;
  margin: 0;
  padding: 0 12px 10px 20px;
  display: none;
}

.child-list.open {
  display: block;
}

.file-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  color: var(--muted);
  padding: 6px 0;
  border-bottom: 1px dashed #2c3740;
  font-size: 14px;
}

.file-name {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-row:last-child {
  border-bottom: none;
}

.bad {
  color: #ff9f9b;
}

.good {
  color: #7be8fb;
}

.center {
  text-align: center;
  color: var(--muted);
}

.muted {
  color: var(--muted);
}

.catalog-lock-card {
  max-width: 560px;
  margin: 6px auto;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #131b21;
}

.catalog-lock-card h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.catalog-lock-card p {
  margin: 0 0 12px;
  color: var(--muted);
}

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

.catalog-unlock-form input {
  flex: 1;
  min-height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #10161a;
  color: var(--text);
  padding: 8px 10px;
}

.catalog-unlock-form button {
  min-height: 38px;
  padding: 8px 12px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(180deg, #00c1e8, #00a3c1);
  color: #0b171d;
  cursor: pointer;
  font-weight: 700;
}

.catalog-unlock-status {
  margin-top: 10px;
}

.catalog-unlock-status.error {
  color: #ff9f9b;
}

.catalog-unlock-status.success {
  color: #7be8fb;
}

.copy-row {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  align-items: center;
}

.copy-row input {
  flex: 1;
  min-height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #10161a;
  color: var(--text);
  padding: 8px 10px;
}

.copy-row button {
  min-height: 38px;
  padding: 8px 12px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(180deg, #00c1e8, #00a3c1);
  color: #0b171d;
  cursor: pointer;
  font-weight: 700;
  white-space: nowrap;
  min-width: 110px;
}

.copy-row button.secondary {
  background: #27313a;
  color: var(--text);
  border: 1px solid var(--border);
}

.tree-controls {
  display: grid;
  grid-template-columns: auto minmax(280px, 1fr);
  gap: 12px;
  align-items: start;
  margin: 12px 0 10px;
}

.tree-control-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tree-controls button {
  min-height: 36px;
  padding: 8px 12px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(180deg, #00c1e8, #00a3c1);
  color: #0b171d;
  cursor: pointer;
  font-weight: 700;
}

.tree-controls button.secondary {
  background: #27313a;
  color: var(--text);
  border: 1px solid var(--border);
}

.tree-search {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.tree-search-field {
  display: flex;
  gap: 8px;
  align-items: center;
}

.tree-search-field input {
  flex: 1;
  min-width: 0;
  min-height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #10161a;
  color: var(--text);
  padding: 8px 10px;
}

.tree-search-field button {
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #27313a;
  color: var(--text);
  cursor: pointer;
  font-weight: 700;
  white-space: nowrap;
}

.tree-search-status {
  min-height: 18px;
  font-size: 13px;
}

.merged-compare-panel {
  margin: 14px 0 12px;
  border: 1px solid #34556a;
  border-radius: 14px;
  background: radial-gradient(circle at top right, rgba(33, 96, 130, 0.22), rgba(17, 26, 32, 0) 45%),
    linear-gradient(180deg, #18242d, #10181e);
  padding: 0 16px 16px;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.24);
}

.merged-compare-summary {
  padding: 12px 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.merged-compare-body {
  display: grid;
  gap: 14px;
}

.merged-compare-header-actions {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.merged-compare-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.merged-compare-header h3 {
  margin: 0;
  font-size: 22px;
  letter-spacing: 0.01em;
}

.merged-compare-lead {
  margin: 0;
  max-width: 720px;
  font-size: 13px;
  color: #b8d0dd;
  line-height: 1.35;
}

.merged-compare-power-toggle {
  min-height: 46px;
  min-width: 190px;
  border-radius: 999px;
  border: 1px solid #3f6177;
  padding: 10px 18px;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.merged-compare-power-toggle:hover {
  transform: translateY(-1px);
}

.merged-compare-power-toggle.is-on {
  color: #07283a;
  background: linear-gradient(180deg, #5ce3ff, #18bfdc);
  box-shadow: 0 8px 18px rgba(15, 173, 215, 0.3);
}

.merged-compare-power-toggle.is-off {
  color: #cadde7;
  background: linear-gradient(180deg, #2b3944, #1d2831);
  border-color: #4a6070;
}

.merged-compare-filter-toggle {
  min-height: 46px;
  min-width: 220px;
  border-radius: 999px;
  border: 1px solid #3f6177;
  padding: 10px 18px;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.merged-compare-filter-toggle:hover {
  transform: translateY(-1px);
}

.merged-compare-filter-toggle:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.merged-compare-filter-toggle.is-on {
  color: #3a1b00;
  background: linear-gradient(180deg, #ffd989, #f3b84f);
  border-color: #c69640;
  box-shadow: 0 8px 18px rgba(243, 184, 79, 0.24);
}

.merged-compare-filter-toggle.is-off {
  color: #cadde7;
  background: linear-gradient(180deg, #2b3944, #1d2831);
  border-color: #4a6070;
}

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

.merged-compare-field {
  display: grid;
  gap: 7px;
  align-content: start;
  border: 1px solid #2f4758;
  border-radius: 12px;
  background: #111b22;
  padding: 10px;
}

.merged-compare-field > span {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.merged-compare-field select,
.merged-compare-field input {
  min-height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #10161a;
  color: var(--text);
  padding: 8px 10px;
}

.merged-folder-picker-field {
  grid-column: span 2;
}

.merged-folder-selection-summary {
  font-size: 12px;
  line-height: 1.35;
}

.merged-folder-selection {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.merged-folder-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid #305063;
  border-radius: 999px;
  background: rgba(14, 50, 67, 0.5);
  color: #c2e8f7;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  line-height: 1.2;
}

.merged-folder-picker {
  border: 1px solid #365264;
  border-radius: 10px;
  background: #0f181f;
}

.merged-folder-picker summary {
  list-style: none;
  cursor: pointer;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 700;
  color: #cae8f5;
}

.merged-folder-picker summary::-webkit-details-marker {
  display: none;
}

.merged-folder-picker[open] {
  border-color: #4f7c95;
  box-shadow: 0 0 0 1px rgba(92, 227, 255, 0.16);
}

.merged-folder-picker-body {
  border-top: 1px solid #294252;
  padding: 10px;
  display: grid;
  gap: 8px;
}

.merged-folder-picker-tools {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.merged-folder-picker-tools input {
  min-height: 36px;
  border-radius: 9px;
  border: 1px solid #355262;
  background: #111b22;
  color: var(--text);
  padding: 7px 9px;
}

.merged-folder-picker-tools button {
  min-height: 36px;
}

.merged-folder-picker-list {
  max-height: 220px;
  overflow: auto;
  display: grid;
  gap: 7px;
  padding-right: 2px;
}

.merged-folder-tree-row {
  display: flex;
  align-items: stretch;
  gap: 6px;
  padding-left: calc(var(--folder-depth) * 12px);
}

.merged-folder-tree-toggle {
  width: 26px;
  min-height: 36px;
  border-radius: 8px;
  border: 1px solid #2f4452;
  background: #111a22;
  color: #93b9cc;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}

.merged-folder-tree-toggle:hover {
  border-color: #4c758c;
  color: #cbecfb;
}

.merged-folder-tree-toggle.is-placeholder {
  visibility: hidden;
  pointer-events: none;
}

.merged-folder-option-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  border: 1px solid #2f4452;
  border-radius: 8px;
  background: #121b22;
  padding: 7px 9px;
  cursor: pointer;
  text-align: left;
  color: inherit;
  width: 100%;
  min-height: 36px;
}

.merged-folder-option-tree-row {
  flex: 1;
}

.merged-folder-option-row.is-selected {
  border-color: #57b8dd;
  background: linear-gradient(180deg, rgba(22, 83, 111, 0.5), rgba(14, 30, 41, 0.6));
  box-shadow: 0 0 0 1px rgba(87, 184, 221, 0.2);
}

.merged-folder-option-row.is-query-match {
  border-color: #4f7f95;
  box-shadow: 0 0 0 1px rgba(99, 167, 196, 0.14);
}

.merged-folder-option-row.is-mismatch {
  border-color: #9c6f2f;
  background: linear-gradient(180deg, rgba(68, 46, 19, 0.58), rgba(30, 22, 14, 0.6));
  box-shadow: 0 0 0 1px rgba(200, 150, 72, 0.2);
}

.merged-folder-option-row.is-mismatch .merged-folder-option-label {
  color: #f2d7a6;
}

.merged-folder-option-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid #4f6675;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #d6f4ff;
  font-size: 11px;
  flex: 0 0 auto;
  background: #17232c;
}

.merged-folder-option-row.is-selected .merged-folder-option-dot {
  border-color: #7dd8f5;
  background: #2a93bd;
  color: #052232;
}

.merged-folder-option-dot.is-mismatch {
  border-color: #e3b164;
  background: #8a5f27;
  color: #fff4de;
}

.merged-folder-option-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12px;
  color: #d4e9f2;
  line-height: 1.2;
  word-break: break-word;
}

.merged-folder-option-label {
  font-weight: 600;
}

.merged-folder-option-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  font-size: 10px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-weight: 700;
  color: #f7dfb1;
  border: 1px solid rgba(229, 169, 82, 0.55);
  background: rgba(121, 79, 25, 0.35);
  border-radius: 999px;
  padding: 2px 7px;
}

.merged-folder-option-subtext {
  font-size: 11px;
  color: #8eb3c3;
}

.merged-target-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.merged-target-actions {
  display: inline-flex;
  gap: 6px;
}

.merged-target-actions button {
  min-width: 74px;
}

.merged-target-grid {
  border: 1px solid #31495b;
  border-radius: 10px;
  background: #0f181f;
  max-height: 220px;
  overflow: auto;
  padding: 8px;
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.merged-target-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid #334a59;
  border-radius: 10px;
  background: #0f171d;
  padding: 8px 10px;
  font-size: 12px;
  color: #d8eaf3;
  cursor: pointer;
  text-align: left;
  width: 100%;
  min-width: 0;
  transition: border-color 0.14s ease, background 0.14s ease, transform 0.14s ease;
}

.merged-target-row:hover {
  transform: translateY(-1px);
  border-color: #5e89a3;
}

.merged-target-row.is-selected {
  border-color: #69c9eb;
  background: linear-gradient(180deg, rgba(18, 84, 114, 0.52), rgba(15, 31, 41, 0.7));
  box-shadow: 0 0 0 1px rgba(105, 201, 235, 0.22);
}

.merged-target-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid #4f6675;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #d6f4ff;
  font-size: 11px;
  flex: 0 0 auto;
  margin-top: 2px;
  background: #17232c;
}

.merged-target-row.is-selected .merged-target-dot {
  border-color: #93e5ff;
  background: #36a9d6;
  color: #06273a;
}

.merged-target-label {
  min-width: 0;
  flex: 1 1 auto;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.25;
}

.merged-compare-status {
  font-size: 13px;
  line-height: 1.35;
}

.merged-compare-results {
  display: grid;
  gap: 10px;
}

.merged-compare-section {
  border: 1px solid #2b3c47;
  border-radius: 10px;
  overflow: hidden;
  background: #0f151a;
}

.merged-compare-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid #26343d;
  background: linear-gradient(180deg, #17232b, #121b22);
}

.merged-compare-section-title {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.01em;
  color: #d8ecf8;
}

.merged-compare-section-note {
  margin: 0;
  font-size: 11px;
  color: #8eafbf;
}

.merged-compare-section-body {
  max-height: 290px;
  overflow: auto;
}

.merged-compare-empty {
  padding: 18px 14px;
  font-size: 13px;
}

.merged-compare-table,
.merged-file-compare-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 940px;
}

.merged-compare-table th,
.merged-compare-table td,
.merged-file-compare-table th,
.merged-file-compare-table td {
  border-bottom: 1px solid #26343d;
  padding: 7px 8px;
  text-align: left;
  font-size: 12px;
  white-space: nowrap;
}

.merged-compare-table th,
.merged-file-compare-table th {
  background: #17222a;
  color: #b7cfdd;
  position: sticky;
  top: 0;
  z-index: 2;
}

.merged-table-sort-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.merged-table-sort-btn:hover {
  color: #d9eeff;
}

.merged-table-sort-btn:focus-visible {
  outline: 1px solid #4b88a8;
  outline-offset: 2px;
  border-radius: 4px;
}

.merged-table-sort-indicator {
  font-size: 10px;
  line-height: 1;
  opacity: 0.55;
  flex: 0 0 auto;
}

.merged-table-sort-btn.is-active .merged-table-sort-indicator {
  opacity: 1;
  color: #93deff;
}

.merged-compare-table tr.is-different td,
.merged-file-compare-table tr.is-different td {
  background: rgba(219, 89, 79, 0.08);
}

.merged-compare-table tr.is-match td,
.merged-file-compare-table tr.is-match td {
  background: rgba(0, 180, 216, 0.05);
}

.merged-unified-search-panel {
  margin: 6px 0 12px;
  border: 1px solid #315064;
  border-radius: 12px;
  background: linear-gradient(180deg, #141f27, #101920);
  padding: 12px;
  display: grid;
  gap: 8px;
}

.merged-unified-search-label {
  margin: 0;
  font-size: 14px;
  letter-spacing: 0.01em;
}

.merged-unified-search-field {
  display: flex;
  gap: 8px;
  align-items: center;
}

.merged-unified-search-field input {
  flex: 1;
  min-width: 0;
  min-height: 38px;
  border-radius: 10px;
  border: 1px solid #365364;
  background: #10161a;
  color: var(--text);
  padding: 8px 10px;
}

.merged-folder-picker-tools button,
.merged-target-actions button,
.merged-unified-search-field button {
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid #365364;
  border-radius: 10px;
  background: linear-gradient(180deg, #25313a, #1a242d);
  color: #d8eaf4;
  cursor: pointer;
  font-weight: 700;
  font-size: 12px;
  white-space: nowrap;
  transition: border-color 0.14s ease, background 0.14s ease, transform 0.14s ease;
}

.merged-folder-picker-tools button:hover,
.merged-target-actions button:hover,
.merged-unified-search-field button:hover {
  border-color: #5a859d;
  background: linear-gradient(180deg, #2d3c47, #23313a);
  transform: translateY(-1px);
}

.merged-folder-picker-tools button:active,
.merged-target-actions button:active,
.merged-unified-search-field button:active {
  transform: translateY(0);
}

.merged-unified-search-status {
  font-size: 12px;
  line-height: 1.35;
}

.merged-source-grid {
  display: grid;
  gap: 12px;
}

.merged-source-section {
  border: 1px solid #2f3c46;
  border-radius: 12px;
  background: #151e25;
  padding: 10px;
}

.merged-source-head {
  display: grid;
  gap: 3px;
  margin-bottom: 8px;
}

.merged-source-head h3 {
  margin: 0;
  font-size: 16px;
}

.merged-source-meta {
  color: var(--muted);
  font-size: 12px;
}

.merged-source-compare-meta {
  font-size: 11px;
  line-height: 1.35;
}

.merged-source-compare-meta.is-different {
  color: #f0c47e;
}

.merged-source-capacity-meta {
  font-size: 11px;
  letter-spacing: 0.01em;
}

.merged-source-progress {
  margin: 2px 0 0;
  height: 10px;
  border-color: #2f4452;
}

.merged-tree-controls {
  margin: 0 0 8px;
}

.pdf-export-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(6, 10, 14, 0.72);
  display: grid;
  place-items: center;
  padding: 18px;
}

.pdf-export-dialog {
  width: min(560px, 96vw);
  border-radius: 14px;
  border: 1px solid #33414c;
  background: linear-gradient(180deg, #182127, #121920);
  padding: 16px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.42);
}

.pdf-export-dialog h3 {
  margin: 0;
  font-size: 22px;
}

.pdf-export-subtitle {
  margin: 6px 0 14px;
  color: var(--muted);
  font-size: 13px;
}

.pdf-export-field {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.pdf-export-field > span {
  font-size: 12px;
  color: var(--muted);
}

.pdf-export-field select,
.pdf-export-field input[type="number"] {
  min-height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #10161a;
  color: var(--text);
  padding: 8px 10px;
}

.pdf-export-checkbox {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border: 1px solid #2b3942;
  border-radius: 10px;
  background: #152028;
  padding: 10px;
}

.pdf-export-checkbox input {
  margin-top: 2px;
}

.pdf-export-checkbox span {
  color: #c7dbe7;
  font-size: 13px;
  line-height: 1.35;
}

.pdf-export-note {
  margin-top: 12px;
  border: 1px solid #2f3f49;
  border-radius: 10px;
  background: #18242d;
  color: #b6ccda;
  font-size: 12px;
  padding: 8px 10px;
}

.pdf-export-status {
  margin-top: 10px;
  min-height: 18px;
  font-size: 13px;
}

.pdf-export-status.error {
  color: #ff9f9b;
}

.pdf-export-status.success {
  color: #7be8fb;
}

.pdf-export-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}

.pdf-export-actions button {
  min-height: 36px;
  padding: 8px 12px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(180deg, #00c1e8, #00a3c1);
  color: #0b171d;
  cursor: pointer;
  font-weight: 700;
}

.pdf-export-actions button.secondary {
  background: #27313a;
  color: var(--text);
  border: 1px solid var(--border);
}

.pdf-export-actions button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.tree-tip-banner {
  margin: 0 0 10px;
  border: 1px solid #2d3f4a;
  border-radius: 10px;
  background: #18222a;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.tree-tip-text {
  color: var(--muted);
  font-size: 13px;
}

.tree-tip-dismiss {
  flex-shrink: 0;
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #263642;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.search-hidden {
  display: none !important;
}

.node.search-hit {
  border-color: #4a6c7e;
  box-shadow: inset 0 0 0 1px rgba(0, 180, 216, 0.18);
}

.node.search-hit > button {
  background: linear-gradient(180deg, rgba(0, 180, 216, 0.12), rgba(0, 180, 216, 0.04));
}

.file-row.search-hit {
  margin: 4px 0;
  padding: 8px 10px;
  border: 1px solid #365664;
  border-radius: 8px;
  background: rgba(0, 180, 216, 0.08);
  color: var(--text);
}

.file-row.search-hit .file-size {
  color: #cfeaf2;
}

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

@media (max-width: 600px) {
  body {
    padding: 14px;
  }

  .brand-bar {
    top: 6px;
    padding: 10px 12px;
    flex-direction: column;
    align-items: flex-start;
  }

  .brand-links {
    align-items: flex-start;
  }

  .brand-links-primary,
  .brand-links-contact {
    justify-content: flex-start;
  }

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

  .copy-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .copy-row input {
    grid-column: 1 / -1;
  }

  .tree-controls {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .merged-compare-controls {
    grid-template-columns: 1fr;
  }

  .merged-folder-picker-field {
    grid-column: auto;
  }

  .merged-folder-picker-tools {
    grid-template-columns: 1fr;
  }

  .merged-target-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .merged-target-actions {
    width: 100%;
  }

  .merged-target-actions button {
    flex: 1;
  }

  .merged-target-grid {
    grid-template-columns: 1fr;
  }

  .merged-compare-section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .merged-compare-section-body {
    max-height: 260px;
  }

  .tree-control-buttons {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .tree-search-field {
    display: grid;
    grid-template-columns: 1fr;
  }

  .catalog-unlock-form {
    flex-direction: column;
  }

  .catalog-unlock-form button {
    width: 100%;
  }

  .tree-controls button {
    width: 100%;
    min-height: 42px;
  }

  .tree-search-field button {
    width: 100%;
    min-height: 42px;
  }


  .node > button {
    min-height: 44px;
    padding: 10px;
  }

  .folder-name,
  .file-name {
    white-space: normal;
    word-break: break-word;
  }

  .file-row {
    align-items: flex-start;
  }

  .tree-tip-banner {
    align-items: flex-start;
    flex-direction: column;
  }

  .tree-tip-dismiss {
    width: 100%;
  }

  .tree-tip-text {
    font-size: 12px;
  }
}
