:root {
  --bg: #e4f0fa;
  --panel: #ffffff;
  --ink: #001030;
  --muted: #52647b;
  --line: #b7d7ef;
  --soft: #f1f8ff;
  --accent: #0080f8;
  --accent-dark: #005ec5;
  --accent-soft: #e5f3ff;
  --accent-line: #a8d6ff;
  --navy-soft: #071a3a;
  --danger: #b42318;
  --shadow: 0 18px 38px rgba(0, 16, 48, 0.14);
}
* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

button {
  white-space: nowrap;
}

.workspace {
  height: 100vh;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.topbar {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 24px;
  border-bottom: 1px solid var(--accent-line);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 1px 0 rgba(0, 128, 248, 0.08);
}

.brand {
  display: flex;
  align-items: center;
  min-width: 190px;
}

.brand-logo {
  display: block;
  width: 184px;
  height: 62px;
  object-fit: contain;
  object-position: left center;
}

.status {
  min-width: 160px;
  max-width: min(54vw, 760px);
  color: var(--muted);
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status.error {
  color: var(--danger);
}

.app-grid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(520px, 0.95fr) minmax(560px, 1.05fr);
  gap: 18px;
  padding: 18px;
  overflow: hidden;
}

.tool-panel,
.preview-panel {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--accent-line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.tabs {
  height: 58px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  border-bottom: 2px solid var(--accent);
  background: var(--navy-soft);
}

.tab-button {
  height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(168, 214, 255, 0.28);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.08);
  color: #dbeeff;
  font-weight: 800;
  cursor: pointer;
}

.tab-button.active {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 128, 248, 0.22);
}

.tab-button:hover {
  border-color: var(--accent-line);
}

.tab-view {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 16px;
}

.dropzone {
  min-height: 120px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 5px;
  border: 2px dashed var(--accent);
  border-radius: 8px;
  background: #f2f9ff;
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease, box-shadow 120ms ease;
}

.dropzone input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  opacity: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
}

.dropzone.active {
  border-color: var(--accent-dark);
  background: var(--accent-soft);
  box-shadow: 0 0 0 4px rgba(0, 128, 248, 0.16);
}

.drop-title {
  font-weight: 800;
}

.drop-subtitle,
.count,
.file-meta,
.tile-meta {
  color: var(--muted);
  font-size: 13px;
}

.merge-toolbar {
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.merge-toolbar .count {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.merge-toolbar .secondary {
  flex: 0 0 auto;
}


.merge-footer-settings {
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: linear-gradient(145deg, #ffffff, var(--soft));
}

.merge-footer-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.merge-footer-toggle input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--accent);
}

.merge-footer-company {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.company-footer-controls {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
}

.merge-footer-company input,
.merge-footer-company select {
  min-width: 0;
  height: 36px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  outline: none;
}

.merge-footer-company input:focus,
.merge-footer-company select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 128, 248, 0.12);
}

.merge-footer-company input:disabled,
.merge-footer-company select:disabled {
  background: #edf2f7;
  color: var(--muted);
}

.merge-footer-preview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 7px 10px 5px;
  border-top: 1px solid #9fb2c7;
  background: #ffffff;
  color: #25364b;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 11px;
}

.merge-footer-preview span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.merge-footer-preview span:nth-child(2) {
  text-align: center;
}

.merge-footer-preview span:last-child {
  text-align: right;
}

.merge-footer-live-status {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.merge-footer-live-status.updating {
  color: var(--accent-dark);
}

.thumb-grid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(172px, 1fr));
  grid-auto-rows: 252px;
  gap: 12px;
  overflow: auto;
  padding: 2px 2px 12px;
}

.thumb-tile {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-rows: 156px minmax(0, 1fr) 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  overflow: hidden;
  cursor: grab;
  touch-action: none;
  user-select: none;
  transition: box-shadow 140ms ease, transform 140ms ease, border-color 140ms ease;
}

.thumb-tile:hover {
  border-color: #8fc7f5;
  box-shadow: 0 10px 22px rgba(0, 16, 48, 0.12);
}

.thumb-tile.error {
  border-color: #f3b5ae;
}

.thumb-tile.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 128, 248, 0.18);
}

.thumb-tile.drag-lifted {
  position: fixed;
  z-index: 40;
  pointer-events: none;
  opacity: 0.96;
  transform: scale(1.03) rotate(0.4deg);
  box-shadow: 0 22px 44px rgba(0, 16, 48, 0.24);
  cursor: grabbing;
  transition: none;
}

.thumb-placeholder-drop {
  min-width: 0;
  border: 2px dashed var(--accent);
  border-radius: 8px;
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px rgba(0, 128, 248, 0.1);
}

.order-badge,
.page-number-badge {
  position: absolute;
  top: 8px;
  z-index: 2;
  min-width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 800;
}

.order-badge {
  left: 8px;
  background: rgba(0, 16, 48, 0.9);
  color: #ffffff;
}

.page-number-badge {
  right: 8px;
  background: rgba(0, 16, 48, 0.9);
  color: #ffffff;
}

.page-checkbox {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 3;
  width: 24px;
  height: 24px;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
  filter: drop-shadow(0 1px 4px rgba(0, 16, 48, 0.18));
}

.page-checkbox:disabled {
  cursor: wait;
  opacity: 0.75;
}

.thumb-preview {
  width: 100%;
  height: 156px;
  display: grid;
  place-items: center;
  background: #eef6fd;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 0;
  cursor: inherit;
}

.thumb-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--panel);
}

.thumb-placeholder {
  width: 64px;
  height: 82px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--muted);
  font-weight: 800;
}

.tile-body {
  min-width: 0;
  padding: 9px 10px 6px;
}

.tile-name,
.file-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.tile-meta {
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tile-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
  padding: 0 8px 8px;
}

.primary,
.secondary,
.icon-button {
  height: 34px;
  padding: 0 11px;
  background: #ffffff;
  border-color: var(--accent-line);
  color: var(--ink);
}

.primary {
  height: 44px;
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
  box-shadow: 0 8px 16px rgba(0, 128, 248, 0.22);
}

.primary:hover {
  background: var(--accent-dark);
}

.secondary,
.icon-button {
  height: 34px;
  padding: 0 11px;
  background: #ffffff;
  border-color: var(--accent-line);
  color: var(--ink);
}

.icon-button {
  min-width: 38px;
}

.secondary:hover,
.icon-button:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.secondary.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-dark);
}


button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

.actionbar {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.merge-actions {
  grid-template-columns: 1fr;
}

.split-actions {
  grid-template-columns: 1fr auto auto auto;
}
.preview-header {
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 16px;
  border-bottom: 2px solid var(--accent);
  background: var(--navy-soft);
}

.preview-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #ffffff;
  font-size: 18px;
  font-weight: 800;
}

.viewer-empty {
  flex: 1;
  display: grid;
  place-items: center;
  color: var(--muted);
  min-height: 0;
}

.viewer {
  flex: 1;
  width: 100%;
  min-height: 0;
  border: 0;
  background: #edf4fb;
}

.edit-view {
  gap: 12px;
}

.edit-dropzone {
  min-height: 92px;
}

.edit-document-bar,
.edit-page-nav,
.edit-tool-buttons,
.edit-history-actions,
.edit-font-field {
  display: flex;
  align-items: center;
  gap: 8px;
}

.edit-document-bar {
  min-height: 36px;
  justify-content: space-between;
}

.edit-document-bar .count {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.edit-controls {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.edit-page-nav {
  flex-wrap: wrap;
  margin-bottom: 12px;
  font-weight: 800;
}

.edit-page-nav input {
  width: 72px;
  height: 34px;
  padding: 0 8px;
  border: 1px solid var(--accent-line);
  border-radius: 6px;
}

.edit-help {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-left: 4px solid var(--accent);
  border-radius: 6px;
  background: #ffffff;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.edit-footer-settings {
  margin-bottom: 14px;
}

.edit-tool-buttons {
  margin-bottom: 12px;
}

.edit-tool-buttons .secondary {
  flex: 1;
}

.edit-update-button {
  width: 100%;
  margin-bottom: 6px;
}

.edit-update-help {
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.edit-field {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.edit-field textarea,
.edit-field input {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid var(--accent-line);
  border-radius: 7px;
  background: #ffffff;
  color: var(--ink);
  resize: vertical;
}

.edit-field textarea:focus,
.edit-field input:focus {
  outline: 3px solid rgba(0, 128, 248, 0.16);
  border-color: var(--accent);
}

.edit-font-field {
  display: grid;
  grid-template-columns: auto 90px auto;
  justify-content: start;
}

.edit-font-field input {
  height: 36px;
  padding: 0 8px;
}

.edit-history-actions {
  flex-wrap: wrap;
}

.edit-actions {
  grid-template-columns: 1fr auto;
}

.edit-page-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 22px;
  background: #cbd8e4;
}

.edit-pages {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding-bottom: 22px;
}

.edit-page-stage {
  position: relative;
  flex: 0 0 auto;
  width: min(100%, 918px);
  margin: 0 auto;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(0, 16, 48, 0.28);
}

.edit-company-footer-preview {
  position: absolute;
  z-index: 4;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 0 4%;
  border-top: 1px solid #9eaebe;
  color: #26384d;
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1;
  pointer-events: none;
}

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

.edit-company-footer-number {
  text-align: right;
}

.edit-company-footer-middle {
  min-width: 0;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.edit-page-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: #ffffff;
  color: var(--muted);
  font-weight: 800;
}

.edit-page-badge {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 8;
  padding: 5px 8px;
  border-radius: 6px;
  background: rgba(0, 16, 48, 0.82);
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  pointer-events: none;
}

.edit-page-stage img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
  user-select: none;
}

.edit-overlay-layer {
  position: absolute;
  inset: 0;
  touch-action: none;
  cursor: crosshair;
}

.edit-overlay {
  position: absolute;
  min-width: 5px;
  min-height: 5px;
  overflow: visible;
  pointer-events: none;
}

.edit-overlay.cover {
  border: 1px dashed #c2410c;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: inset 0 0 0 1px rgba(194, 65, 12, 0.14);
}

.edit-overlay.text {
  border: 1px dashed var(--accent);
  background: rgba(229, 243, 255, 0.38);
  color: #000000;
  white-space: pre-wrap;
  line-height: 1.16;
  cursor: move;
  pointer-events: auto;
}

.edit-overlay.text span {
  display: block;
  max-width: 100%;
  max-height: 100%;
  overflow: hidden;
}

.edit-overlay.draft {
  z-index: 5;
  opacity: 0.72;
}

.edit-overlay.transforming {
  z-index: 7;
  box-shadow: 0 0 0 3px rgba(0, 128, 248, 0.22);
}

.edit-resize-handle {
  position: absolute;
  right: -7px;
  bottom: -7px;
  width: 15px;
  height: 15px;
  border: 2px solid #ffffff;
  border-radius: 3px;
  background: var(--accent);
  cursor: nwse-resize;
  pointer-events: auto;
}

.edit-overlay-remove {
  position: absolute;
  top: -11px;
  right: -11px;
  z-index: 6;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid #ffffff;
  border-radius: 50%;
  background: #b42318;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  pointer-events: auto;
}


@media (max-width: 1120px) {
  .app-grid {
    grid-template-columns: 1fr;
  }

  body {
    overflow: auto;
  }

  .workspace {
    height: auto;
    min-height: 100%;
    overflow: visible;
  }

  .app-grid {
    overflow: visible;
  }

  .preview-panel {
    min-height: 620px;
  }
}

@media (max-width: 720px) {
  .topbar {
    padding: 0 14px;
  }

  .status {
    min-width: 0;
  }

  .app-grid {
    padding: 12px;
  }

  .tab-view {
    padding: 12px;
  }

  .thumb-grid {
    grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
    grid-auto-rows: 242px;
  }

  .merge-actions,
  .split-actions,
  .edit-actions {
    grid-template-columns: 1fr;
  }

  .edit-page-scroll {
    padding: 10px;
  }
}

/* Modern AcoPDF shell */
:root {
  --bg: #eef3f8;
  --muted: #607086;
  --line: #d7e2ed;
  --soft: #f6f9fc;
  --shadow: 0 18px 48px rgba(0, 27, 69, 0.11);
}

body {
  background:
    radial-gradient(circle at 8% 0%, rgba(0, 128, 248, 0.10), transparent 32%),
    linear-gradient(180deg, #f7faff 0%, var(--bg) 100%);
}

.topbar {
  height: 82px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(115deg, #001030 0%, #082a58 62%, #005ec5 140%);
  box-shadow: 0 10px 30px rgba(0, 16, 48, 0.18);
}

.brand {
  min-width: 0;
  padding: 4px 12px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
}

.brand-logo {
  width: auto;
  height: 54px;
  max-width: 220px;
  object-fit: contain;
}

.status {
  min-width: 130px;
  padding: 9px 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.10);
  color: #e8f4ff;
  font-size: 13px;
  font-weight: 700;
}

.status.error {
  border-color: rgba(255, 190, 184, 0.35);
  background: rgba(180, 35, 24, 0.30);
  color: #fff0ef;
}

.app-grid {
  gap: 20px;
  padding: 20px;
}

.tool-panel,
.preview-panel {
  border: 1px solid rgba(183, 205, 225, 0.72);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.tabs {
  height: 66px;
  gap: 6px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  background: #f6f9fd;
}

.tab-button {
  height: 40px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #42546b;
}

.tab-button:hover {
  border-color: var(--accent-line);
  background: #ffffff;
}

.tab-button.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(0, 94, 197, 0.24);
}

.tab-view {
  padding: 20px;
}

.dropzone {
  border-radius: 16px;
  background: linear-gradient(145deg, #f8fcff, #edf7ff);
}

.dropzone:hover {
  background: #eaf6ff;
  box-shadow: inset 0 0 0 1px rgba(0, 128, 248, 0.12), 0 10px 24px rgba(0, 94, 197, 0.08);
}

.thumb-tile {
  border-radius: 14px;
}

.primary,
.secondary,
.icon-button {
  border-radius: 10px;
  font-weight: 750;
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease, border-color 120ms ease;
}

.primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(0, 94, 197, 0.28);
}

.preview-header {
  height: 66px;
  border-bottom: 0;
  background: linear-gradient(105deg, #001030, #082a58);
}

.edit-controls {
  padding: 16px;
  border: 1px solid #dce7f1;
  border-radius: 14px;
  background: #f8fbfe;
}

.edit-help {
  padding: 12px 14px;
  border: 1px solid #dcecff;
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  background: #ffffff;
}

.edit-tool-buttons {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.edit-tool-buttons .secondary {
  min-width: 0;
  height: 42px;
  padding: 0 8px;
}

.edit-update-button {
  height: 46px;
  border-radius: 11px;
}

.edit-page-scroll {
  padding: 28px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12) 25%, transparent 25%) 0 0 / 18px 18px,
    #c8d3df;
}

.edit-page-stage {
  border-radius: 3px;
  box-shadow: 0 16px 40px rgba(0, 16, 48, 0.24);
}

.edit-overlay.text,
.edit-overlay.image {
  border: 0;
  outline: 1.5px solid var(--accent);
  background: rgba(229, 243, 255, 0.16);
  cursor: default;
  pointer-events: auto;
}

.edit-text-content {
  width: 100%;
  height: 100%;
  padding: 0;
  overflow: hidden;
  outline: none;
  color: #000000;
  font-family: Arial, Helvetica, sans-serif;
  white-space: pre-wrap;
  line-height: 1.18;
  cursor: text;
}

.edit-text-content:empty::before {
  content: attr(data-placeholder);
  color: #6d7f95;
  font-style: italic;
}

.edit-pasted-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.8);
  pointer-events: none;
}

.edit-move-handle {
  position: absolute;
  left: 4px;
  top: -23px;
  z-index: 7;
  height: 20px;
  padding: 0 7px;
  display: grid;
  place-items: center;
  border-radius: 5px 5px 0 0;
  background: var(--accent);
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  cursor: move;
  pointer-events: auto;
}

.edit-resize-handle {
  width: 17px;
  height: 17px;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0, 16, 48, 0.22);
}

@media (max-width: 720px) {
  .topbar {
    height: 72px;
  }

  .brand-logo {
    width: auto;
    height: 45px;
    max-width: 170px;
  }

  .company-footer-controls {
    grid-template-columns: 1fr;
  }

  .app-grid {
    padding: 10px;
    gap: 12px;
  }

  .tabs {
    overflow-x: auto;
  }

  .edit-tool-buttons {
    grid-template-columns: 1fr;
  }
}
