* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bgSidebar: #f3f3ed;
  --border: #e2e2db;
  --text: #1a1a18;
  --textFaint: #a0a09b;
  --accent: #1fa5ce;
  --accentLight: #e8f4f5;
  --accentBorder: #b2d8dc;
  --radiusSm: 6px;
}

body {
  font-family: 'IBM Plex Sans', sans-serif;
  background: #fcfcf9;
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
}

/* ── TOPBAR ── */
.topbarLogo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
  border-left: 2px solid transparent;
  padding: 5px;
  border-radius: 5px;
  color:#333;
  
}

.topbarLogo:hover {

background-color: rgba(255,255,255,0.5);
color:#000;
}

/* ── LAYOUT ── */
.app {
  display: grid;
  grid-template-columns: 300px 1fr;
  min-height: 100vh;
}

/* ── SIDEBAR ── */
.sidebar {
  background: var(--bgSidebar);
  border-right: 1px solid var(--border);
  /*
  display: flex;
  flex-direction: column;
  gap: 16px;
  */
  padding: 20px 16px;
  
  overflow-y: auto;
}

/* ── MAIN ── */
.main {
  background: #fcfcf9;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px;
}

/* ── BOX CARDS ── */
.box {
  background: rgba(255,255,255,0.5);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 10px;
}

.boxHeader {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--border);
}

.boxTitle {
  font-size: 12px;
  font-weight: 500;
  color: rgba(0,0,0,0.7);
}

.boxBody {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

/* ── DROP ZONE ── */
#dropZone {
  border: 1.5px dashed #ccccc5;
  border-radius: var(--radiusSm);
  padding: 22px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s, background 0.15s;
  background: var(--bgSidebar);
}

#dropZone:hover, #dropZone.dragOver {
  border-color: var(--accent);
  background: var(--accentLight);
}

#dropZone .dzIcon { color: var(--textFaint); }
#dropZone p { font-size: 12px; color: #6b6b67; }
#dropZone span { font-size: 11px; color: var(--textFaint); }
#fileInput { display: none; }

/* ── CONTROL GROUPS (SEAMLESS) ── */
.controlGroup {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.controlLabel {
  font-size: 11px;
  font-weight: 500;
  color: #6b6b67;
  display: flex;
  justify-content: space-between;
}

.rangeInput {
  width: 100%;
  accent-color: var(--accent);
  height: 4px;
  border-radius: 2px;
  outline: none;
  background: var(--border);
  -webkit-appearance: none;
}

.rangeInput::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
}

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 4px 0;
}

.toolRow {
  display: flex;
  gap: 8px;
}

.toolRow .btn {
  flex: 1;
}

/* ── BUTTONS ── */
.btn {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 12px;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: var(--radiusSm);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: background 0.15s, transform 0.1s, opacity 0.15s;
  width: 100%;
}

.btnPrimary {
  background: var(--accent);
  color: #fff;
}

.btnPrimary:hover:not(:disabled) { background: #1a6872; }
.btnPrimary:active:not(:disabled) { transform: scale(0.98); }
.btnPrimary:disabled { opacity: 0.35; cursor: not-allowed; }

.btnOutline {
  background: #ffffff;
  color: var(--accent);
  border: 1px solid var(--accentBorder);
}

.btnOutline:hover:not(:disabled) { background: var(--accentLight); }
.btnOutline:active:not(:disabled) { transform: scale(0.98); }
.btnOutline:disabled { opacity: 0.35; cursor: not-allowed; }

.btn.active {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

.btnRow {
  display: flex;
  gap: 8px;
}

.btnRow .btn { flex: 1; }

/* ── FILE CHIP ── */
.fileChip {
  display: none;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border-radius: var(--radiusSm);
  background: var(--accentLight);
  border: 1px solid var(--accentBorder);
  font-size: 12px;
  color: var(--accent);
  font-weight: 500;
  overflow: hidden;
}

.fileChip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.fileChip svg { flex-shrink: 0; }

/* ── HINT ── */
.hint {
  font-size: 11px;
  color: var(--textFaint);
  text-align: center;
  line-height: 1.4;
}

/* ── EMPTY STATE ── */
.emptyState {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--textFaint);
  text-align: center;
}

.emptyState svg { opacity: 0.25; }
.emptyState p { font-size: 13px; }

/* ── RESULT CARD ── */
.resultCard {
  display: none;
  width: 100%;
  max-width: 760px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  animation: fadeUp 0.28s ease both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.resultHeader {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bgSidebar);
}

.resultTitle {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  flex: 1;
}

.resultBody {
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f3f3ed;
  /*min-height: 200px; */
  user-select: none;
}

.resultBody canvas {
  max-width: 100%;
  max-height: 800px;
  object-fit: contain;
  display: block;
  border-radius: 2px;
  touch-action: none;
  background-color: #fff;
}





  .menu {
    display: grid;
    grid-template-columns: 25px 1fr;
    font-size: 12px;
    font-weight: 500;
    color:#666;
    text-decoration: none;
    margin-bottom: 8px;

  }

  .menu:hover {

    color:#111;

  }
  .menuIco {
    font-size: 20px;
  }

  .menuTxt {
    display: flex;
    align-items: center;
  }