/* MeloTools Toolbox 2026 — ferramentas locais, claras e consistentes. */
.mt-toolbox-section {
  --tool-accent: #0b73d9;
  --tool-accent-soft: color-mix(in srgb, var(--tool-accent) 10%, transparent);
}

.mt-toolbox-section .mt-tool-intro {
  max-width: 760px;
}

.mt-toolbox-section .mt-tool-surface {
  display: grid;
  gap: 18px;
  margin-top: 20px;
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid var(--line, #d9e2ec);
  border-radius: 22px;
  background:
    radial-gradient(circle at 95% 5%, var(--tool-accent-soft), transparent 33%),
    var(--card, #fff);
  box-shadow: 0 16px 40px rgba(15, 23, 42, .07);
}

.mt-toolbox-section .mt-tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.mt-toolbox-section .mt-tool-field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.mt-toolbox-section .mt-tool-field-wide {
  grid-column: 1 / -1;
}

.mt-toolbox-section .mt-tool-field > label,
.mt-toolbox-section .mt-tool-label {
  color: var(--text, #162133);
  font-size: .82rem;
  font-weight: 750;
  letter-spacing: .01em;
}

.mt-toolbox-section input,
.mt-toolbox-section select,
.mt-toolbox-section textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  border: 1px solid var(--line, #cfd9e6);
  border-radius: 12px;
  outline: 0;
  color: var(--text, #172033);
  background: var(--input-bg, #fff);
  font: inherit;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.mt-toolbox-section textarea {
  min-height: 132px;
  resize: vertical;
  line-height: 1.55;
}

.mt-toolbox-section input:focus,
.mt-toolbox-section select:focus,
.mt-toolbox-section textarea:focus {
  border-color: var(--tool-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--tool-accent) 18%, transparent);
}

.mt-toolbox-section .mt-tool-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.mt-toolbox-section .mt-tool-actions .btn {
  min-width: 132px;
}

.mt-toolbox-section .mt-tool-result {
  min-height: 58px;
  padding: 15px 17px;
  border: 1px solid color-mix(in srgb, var(--tool-accent) 22%, var(--line, #d9e2ec));
  border-radius: 14px;
  color: var(--text, #172033);
  background: color-mix(in srgb, var(--tool-accent) 5%, var(--card, #fff));
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.mt-toolbox-section .mt-tool-result:empty::before {
  content: "O resultado aparece aqui.";
  color: var(--muted, #64748b);
}

.mt-toolbox-section .mt-tool-result strong {
  color: var(--tool-accent);
}

.mt-toolbox-section .mt-tool-result code,
.mt-toolbox-section .mt-code-output {
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
}

.mt-toolbox-section .mt-code-output {
  white-space: pre-wrap;
}

.mt-toolbox-section .mt-metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.mt-toolbox-section .mt-metric {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid var(--line, #d9e2ec);
  border-radius: 14px;
  background: var(--card, #fff);
}

.mt-toolbox-section .mt-metric small {
  color: var(--muted, #64748b);
}

.mt-toolbox-section .mt-metric strong {
  color: var(--text, #172033);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
}

.mt-toolbox-section .mt-palette {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  overflow: hidden;
  min-height: 116px;
  border: 1px solid var(--line, #d9e2ec);
  border-radius: 16px;
}

.mt-toolbox-section .mt-color-chip {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 12px 6px;
  border: 0;
  color: #fff;
  font: 700 .72rem/1.1 "Cascadia Code", Consolas, monospace;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .65);
  cursor: pointer;
}

.mt-toolbox-section .mt-color-preview {
  min-height: 88px;
  border: 1px solid var(--line, #d9e2ec);
  border-radius: 16px;
  background: #0b73d9;
}

.mt-toolbox-section .mt-checklist {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mt-toolbox-section .mt-check-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 11px;
  padding: 11px 12px;
  border: 1px solid var(--line, #d9e2ec);
  border-radius: 12px;
  background: var(--card, #fff);
}

.mt-toolbox-section .mt-check-item input {
  width: 19px;
  min-height: 19px;
}

.mt-toolbox-section .mt-check-item.is-done span {
  color: var(--muted, #64748b);
  text-decoration: line-through;
}

.mt-toolbox-section .mt-icon-button {
  display: inline-grid;
  width: 34px;
  min-width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line, #d9e2ec);
  border-radius: 9px;
  color: var(--muted, #64748b);
  background: transparent;
  cursor: pointer;
}

.mt-toolbox-section .mt-progress {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--line, #d9e2ec);
}

.mt-toolbox-section .mt-progress > span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--tool-accent);
  transition: width .25s ease;
}

.mt-toolbox-section .mt-pomodoro-clock {
  display: grid;
  width: min(240px, 80vw);
  aspect-ratio: 1;
  margin: 4px auto;
  place-items: center;
  border: 9px solid color-mix(in srgb, var(--tool-accent) 18%, var(--line, #d9e2ec));
  border-radius: 50%;
  color: var(--text, #172033);
  background: var(--card, #fff);
  box-shadow: inset 0 0 0 1px var(--line, #d9e2ec), 0 18px 38px rgba(15, 23, 42, .1);
  font: 800 clamp(2.35rem, 8vw, 4rem)/1 "Cascadia Code", Consolas, monospace;
}

.mt-toolbox-section .mt-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.mt-toolbox-section .mt-board-cell {
  min-height: 130px;
  padding: 14px;
  border: 1px solid var(--line, #d9e2ec);
  border-radius: 14px;
  background: var(--card, #fff);
}

.mt-toolbox-section .mt-board-cell h3 {
  margin: 0 0 8px;
  color: var(--text, #172033);
  font-size: .95rem;
}

.mt-toolbox-section .mt-board-cell ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted, #64748b);
}

.mt-toolbox-section .mt-preview {
  min-height: 180px;
}

.mt-toolbox-section .mt-preview h1,
.mt-toolbox-section .mt-preview h2,
.mt-toolbox-section .mt-preview h3 {
  margin: .75em 0 .35em;
}

.mt-toolbox-section .mt-preview a {
  color: var(--tool-accent);
}

.mt-toolbox-section .mt-status-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.mt-toolbox-section .mt-status-item {
  padding: 11px 12px;
  border: 1px solid var(--line, #d9e2ec);
  border-radius: 11px;
  background: var(--card, #fff);
}

.mt-toolbox-section .mt-status-item strong {
  display: inline-block;
  min-width: 42px;
}

html[data-color-mode="dark"] .mt-toolbox-section {
  --tool-accent: #55b7ff;
  --tool-accent-soft: rgba(85, 183, 255, .12);
}

html[data-color-mode="dark"] .mt-toolbox-section .mt-tool-surface,
html[data-color-mode="dark"] .mt-toolbox-section .mt-tool-result,
html[data-color-mode="dark"] .mt-toolbox-section .mt-metric,
html[data-color-mode="dark"] .mt-toolbox-section .mt-check-item,
html[data-color-mode="dark"] .mt-toolbox-section .mt-board-cell,
html[data-color-mode="dark"] .mt-toolbox-section .mt-pomodoro-clock {
  box-shadow: none;
}

html[data-ui-theme="xp"] .mt-toolbox-section {
  --tool-accent: #0759d7;
}

html[data-ui-theme="xp"] .mt-toolbox-section .mt-tool-surface,
html[data-ui-theme="xp"] .mt-toolbox-section .mt-tool-result,
html[data-ui-theme="xp"] .mt-toolbox-section .mt-metric,
html[data-ui-theme="xp"] .mt-toolbox-section .mt-check-item,
html[data-ui-theme="xp"] .mt-toolbox-section .mt-board-cell {
  border-radius: 6px;
  box-shadow: none;
}

html[data-ui-theme="xp"] .mt-toolbox-section .mt-tool-surface {
  border-width: 2px;
}

@media (max-width: 720px) {
  .mt-toolbox-section .mt-tool-grid,
  .mt-toolbox-section .mt-board,
  .mt-toolbox-section .mt-status-list {
    grid-template-columns: 1fr;
  }

  .mt-toolbox-section .mt-metric-grid {
    grid-template-columns: 1fr;
  }

  .mt-toolbox-section .mt-palette {
    grid-template-columns: 1fr;
  }

  .mt-toolbox-section .mt-color-chip {
    min-height: 58px;
  }
}

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