/*
  Smart Tools UI — tema condiviso
  Versione: 2026.07.025

  Questo file contiene esclusivamente la veste grafica comune ai tool:
  token, sfondo, header, pannelli, pulsanti, campi, menu, dialog, splitter,
  stati, footer e regole responsive di base.

  Per centralizzarlo, pubblicare questo file su un percorso comune e lasciare
  locale solo il CSS strutturale del singolo tool. In Diagram Lab questo foglio
  viene caricato DOPO css/diagram-lab.css e ne applica la skin condivisa.
*/

:root {
  color-scheme: light;

  /* Token originali della famiglia SmartDocs / Smart Tools */
  --bg: #f4f6f8;
  --card: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --border: #d1d5db;
  --border-soft: #e5e7eb;
  --accent: #2563eb;
  --accent-2: #1d4ed8;
  --accent-soft: #eff6ff;
  --warning-bg: #fff7ed;
  --warning-border: #fed7aa;
  --warning-text: #9a3412;
  --danger: #b91c1c;
  --success: #15803d;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Helvetica Neue", "Noto Sans", "Liberation Sans", sans-serif;

  /* Alias usati dai tool esistenti */
  --surface: var(--card);
  --surface-2: #f8fafc;
  --border-strong: #cbd5e1;
  --primary: var(--accent);
  --primary-hover: var(--accent-2);
  --shadow: 0 12px 30px rgba(15, 23, 42, 0.09);
  --radius: 16px;
  --app-footer-height: 48px;
  --smarttools-header-block: 76px;
  --smarttools-hero-block: 124px;

  font-family: var(--sans);
}

* { box-sizing: border-box; }

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

body.smarttools-ui {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 20% 0%, #dbeafe 0%, transparent 60%),
    radial-gradient(900px 500px at 100% 20%, #e0e7ff 0%, transparent 55%),
    var(--bg);
  font-family: var(--sans);
}

body.smarttools-ui button,
body.smarttools-ui select,
body.smarttools-ui input,
body.smarttools-ui textarea { font-family: inherit; }

/* ===== Header comune ===== */
body.smarttools-ui .app-header {
  width: min(1920px, calc(100% - 28px));
  height: 58px;
  min-height: 58px;
  margin: 10px auto 8px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(203, 213, 225, 0.92);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(12px);
  position: relative;
  z-index: 90;
}

body.smarttools-ui .brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 11px;
}

body.smarttools-ui .brand-mark {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.24), 0 7px 18px rgba(37, 99, 235, .22);
}

body.smarttools-ui .brand-mark .fa-icon {
  width: 20px;
  height: 20px;
}

body.smarttools-ui .brand h1 {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  line-height: 1.15;
  font-weight: 850;
  letter-spacing: -.015em;
}

body.smarttools-ui .brand p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.2;
}

body.smarttools-ui .header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

body.smarttools-ui .ui-theme-toggle {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  background: rgba(255,255,255,.62);
  white-space: nowrap;
}

body.smarttools-ui .ui-theme-button {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease, transform .16s ease;
}

body.smarttools-ui .ui-theme-button .fa-icon {
  width: 14px;
  height: 14px;
}

body.smarttools-ui .ui-theme-button:hover {
  border-color: var(--border-soft);
  background: var(--surface);
  color: var(--text);
}

body.smarttools-ui .ui-theme-button:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .22);
  outline-offset: 1px;
}

body.smarttools-ui .ui-theme-button.active,
body.smarttools-ui .ui-theme-button[aria-pressed="true"] {
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 5px 13px rgba(37, 99, 235, .24);
}

body.smarttools-ui .ui-theme-button.active:hover,
body.smarttools-ui .ui-theme-button[aria-pressed="true"]:hover {
  color: #fff;
  transform: translateY(-1px);
}

body.smarttools-ui .badge {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 9px;
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  background: #ecfdf5;
  color: #166534;
  font-size: 11.5px;
  line-height: 1;
  font-weight: 800;
  white-space: nowrap;
}

body.smarttools-ui .badge.neutral {
  color: var(--muted);
  background: rgba(248, 250, 252, .92);
  border-color: var(--border-soft);
}

/* ===== Hero comune dei tool ===== */
body.smarttools-ui .tool-hero {
  width: min(1920px, calc(100% - 28px));
  height: 116px;
  min-height: 116px;
  margin: 0 auto 8px;
  padding: 18px 30px;
  display: flex;
  align-items: center;
  border: 1px solid rgba(37, 99, 235, .34);
  border-radius: 22px;
  color: #fff;
  background: linear-gradient(135deg, #3f73ed 0%, #2f5ddd 58%, #254fd0 100%);
  box-shadow: 0 16px 34px rgba(37, 99, 235, .20);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

body.smarttools-ui .tool-hero::before,
body.smarttools-ui .tool-hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
  z-index: -1;
}

body.smarttools-ui .tool-hero::before {
  width: 260px;
  height: 260px;
  right: -72px;
  top: -118px;
  background: rgba(255, 255, 255, .14);
}

body.smarttools-ui .tool-hero::after {
  width: 118px;
  height: 118px;
  right: 168px;
  bottom: -82px;
  border: 1px solid rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .055);
}

body.smarttools-ui .tool-hero-content {
  position: relative;
  z-index: 1;
  width: min(940px, calc(100% - 170px));
}

body.smarttools-ui .tool-hero-kicker {
  margin: 0 0 5px;
  color: rgba(255,255,255,.92);
  font-size: 11px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
}

body.smarttools-ui .tool-hero h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(29px, 3.2vw, 40px);
  line-height: 1;
  font-weight: 900;
  letter-spacing: -.045em;
}

body.smarttools-ui .tool-hero p:not(.tool-hero-kicker) {
  margin: 9px 0 0;
  max-width: 860px;
  color: rgba(255,255,255,.92);
  font-size: 13.5px;
  line-height: 1.45;
  font-weight: 560;
}

/* ===== Area applicazione e pannelli ===== */
body.smarttools-ui .workspace {
  height: calc(100vh - var(--smarttools-header-block) - var(--smarttools-hero-block) - var(--app-footer-height));
  min-height: 0;
  padding: 0 14px 10px;
}

body.smarttools-ui .panel {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(203, 213, 225, .92);
  border-radius: 16px;
  background: rgba(255, 255, 255, .90);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

body.smarttools-ui .editor-panel,
body.smarttools-ui .preview-panel { border-radius: 16px; }

body.smarttools-ui .panel-toolbar {
  min-height: 54px;
  padding: 8px 10px;
  gap: 8px;
  border-bottom: 1px solid var(--border-soft);
  background: linear-gradient(180deg, rgba(239, 246, 255, .76) 0%, rgba(255, 255, 255, .94) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.82);
}

body.smarttools-ui .toolbar-group { gap: 7px; }

/* ===== Pulsanti e campi ===== */
body.smarttools-ui .button,
body.smarttools-ui .icon-button,
body.smarttools-ui .select {
  min-height: 36px;
  border: 1px solid var(--border-soft);
  border-radius: 11px;
  background: #fff;
  color: var(--text);
  box-shadow: 0 1px 2px rgba(17, 24, 39, .04);
  transition: border-color .16s ease, background .16s ease, color .16s ease, box-shadow .16s ease, transform .05s ease;
}

body.smarttools-ui .button {
  padding: 0 12px;
  font-weight: 750;
}

body.smarttools-ui .icon-button {
  width: 36px;
  min-width: 36px;
  padding: 0;
}

body.smarttools-ui .select {
  padding-left: 10px;
  padding-right: 28px;
  font-weight: 650;
  outline: none;
}

body.smarttools-ui .button:hover,
body.smarttools-ui .icon-button:hover,
body.smarttools-ui .select:hover {
  border-color: #bfdbfe;
  background: var(--accent-soft);
  color: var(--accent-2);
}

body.smarttools-ui .button:focus-visible,
body.smarttools-ui .icon-button:focus-visible,
body.smarttools-ui .select:focus-visible,
body.smarttools-ui input:focus-visible,
body.smarttools-ui textarea:focus-visible {
  border-color: #93c5fd;
  outline: none;
  box-shadow: 0 0 0 4px rgba(147, 197, 253, .35);
}

body.smarttools-ui .button:active,
body.smarttools-ui .icon-button:active { transform: translateY(1px); }

body.smarttools-ui .button.primary {
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 5px 14px rgba(37, 99, 235, .18);
}

body.smarttools-ui .button.primary:hover {
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent-2), #1e40af);
  color: #fff;
}

body.smarttools-ui .button.ghost { background: rgba(255,255,255,.64); }

body.smarttools-ui .button.danger-soft {
  border-color: #fecaca;
  background: #fff1f2;
  color: #9f1239;
}

body.smarttools-ui .button.danger-soft:hover {
  border-color: #fda4af;
  background: #ffe4e6;
  color: #881337;
}

body.smarttools-ui .button:disabled,
body.smarttools-ui .icon-button:disabled,
body.smarttools-ui .select:disabled {
  opacity: .48;
  cursor: not-allowed;
  transform: none;
}

body.smarttools-ui .field-label {
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 850;
  letter-spacing: .075em;
  text-transform: uppercase;
}

body.smarttools-ui .fa-icon {
  fill: currentColor;
  color: inherit;
}

/* ===== Barre informative ===== */
body.smarttools-ui .editor-meta,
body.smarttools-ui .editor-footer,
body.smarttools-ui .status-bar,
body.smarttools-ui .icon-result-info,
body.smarttools-ui .examples-preview-status {
  color: var(--muted);
  background: rgba(248, 250, 252, .92);
  border-color: var(--border-soft);
}

body.smarttools-ui .status-dot.ok { background: var(--success); }
body.smarttools-ui .status-dot.error { background: var(--danger); }

body.smarttools-ui .error-box {
  border-color: #fecaca;
  background: #fff1f2;
  color: #991b1b;
}

/* ===== Splitter comune ===== */
body.smarttools-ui .divider {
  cursor: col-resize;
  position: relative;
  z-index: 35;
  display: grid;
  place-items: center;
  touch-action: none;
}

body.smarttools-ui .divider::before {
  content: "";
  position: absolute;
  inset: 8px 12px;
  width: 3px;
  justify-self: center;
  border-radius: 999px;
  background: rgba(148, 163, 184, .55);
  opacity: 1;
  transition: background .18s ease, box-shadow .18s ease;
}

body.smarttools-ui .divider-handle {
  position: relative;
  z-index: 1;
  width: 34px;
  height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(148, 163, 184, .95);
  border-radius: 999px;
  background: rgba(255,255,255,.98);
  color: var(--accent);
  box-shadow: 0 12px 28px rgba(15, 23, 42, .16);
  font-size: 17px;
  font-weight: 900;
}

body.smarttools-ui .divider:hover::before,
body.smarttools-ui .divider.dragging::before,
body.smarttools-ui .divider:focus-visible::before {
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .12);
}

body.smarttools-ui .divider:hover .divider-handle,
body.smarttools-ui .divider.dragging .divider-handle,
body.smarttools-ui .divider:focus-visible .divider-handle {
  border-color: #93c5fd;
  background: #fff;
  color: var(--accent-2);
  box-shadow: 0 14px 30px rgba(37, 99, 235, .20);
  transform: none;
}

/* ===== Anteprima ===== */
body.smarttools-ui .preview-viewport,
body.smarttools-ui .examples-preview-box {
  background: rgba(249, 251, 253, .90);
}

body.smarttools-ui .preview-grid {
  opacity: .45;
}

body.smarttools-ui .viewport-hint {
  border: 1px solid rgba(203, 213, 225, .88);
  border-radius: 10px;
  background: rgba(255,255,255,.88);
  color: var(--muted);
  box-shadow: 0 5px 16px rgba(15, 23, 42, .06);
  backdrop-filter: blur(7px);
}

/* ===== Dialog e modali ===== */
body.smarttools-ui .help-dialog {
  border: 1px solid rgba(203, 213, 225, .94);
  border-radius: 18px;
  background: rgba(255,255,255,.98);
  color: var(--text);
  box-shadow: 0 28px 90px rgba(15, 23, 42, .28);
}

body.smarttools-ui .help-dialog::backdrop {
  background: rgba(15, 23, 42, .46);
  backdrop-filter: blur(3px);
}

body.smarttools-ui .dialog-header,
body.smarttools-ui .dialog-footer {
  border-color: var(--border-soft);
  background: rgba(248, 250, 252, .82);
}

body.smarttools-ui .dialog-header h2 { font-weight: 850; }
body.smarttools-ui .dialog-subtitle,
body.smarttools-ui .dialog-body p { color: var(--muted); }
body.smarttools-ui .dialog-body code {
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent-2);
}

body.smarttools-ui .icon-search,
body.smarttools-ui .config-field input,
body.smarttools-ui .config-field textarea,
body.smarttools-ui .config-field select {
  border-color: var(--border-soft);
  border-radius: 11px;
  background: #fff;
}

body.smarttools-ui .icon-search:focus-within {
  border-color: #93c5fd;
  box-shadow: 0 0 0 4px rgba(147, 197, 253, .30);
}

/* Correzione hover catalogo icone: nessun contenuto bianco su bianco. */
body.smarttools-ui .icon-tile {
  border-color: var(--border-soft);
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  box-shadow: 0 1px 2px rgba(17,24,39,.035);
}

body.smarttools-ui .icon-tile:hover,
body.smarttools-ui .icon-tile:focus-visible {
  border-color: #93c5fd;
  background: var(--accent-soft);
  color: var(--accent-2);
  box-shadow: 0 8px 18px rgba(37, 99, 235, .10);
}

body.smarttools-ui .icon-tile.selected,
body.smarttools-ui .icon-tile.selected:hover,
body.smarttools-ui .icon-tile.selected:focus-visible {
  border-color: var(--accent);
  background: #dbeafe;
  color: #1e3a8a;
}

body.smarttools-ui .icon-tile .fa-icon,
body.smarttools-ui .icon-tile span {
  color: inherit;
  fill: currentColor;
}

body.smarttools-ui .icon-tile small { color: var(--muted); }

body.smarttools-ui .selected-icon-card,
body.smarttools-ui .icon-operation-bar,
body.smarttools-ui .icon-section,
body.smarttools-ui .examples-preview-head,
body.smarttools-ui .examples-list-panel,
body.smarttools-ui .examples-preview-panel {
  border-color: var(--border-soft);
}

/* ===== Menu esportazione / menu contestuali ===== */
body.smarttools-ui .export-menu-panel {
  padding: 10px;
  border: 1px solid rgba(203, 213, 225, .95);
  border-radius: 16px;
  background: rgba(255,255,255,.985);
  box-shadow: 0 20px 48px rgba(15, 23, 42, .22);
  backdrop-filter: blur(12px);
}

body.smarttools-ui .export-menu-heading {
  color: var(--muted);
  font-weight: 900;
  letter-spacing: .11em;
}

body.smarttools-ui .export-menu-item {
  min-height: 50px;
  border-radius: 12px;
  color: var(--text);
}

body.smarttools-ui .export-menu-item:hover,
body.smarttools-ui .export-menu-item:focus-visible {
  border-color: #bfdbfe;
  background: var(--accent-soft);
  color: var(--accent-2);
}

body.smarttools-ui .export-menu-item > .fa-icon { color: var(--accent); }
body.smarttools-ui .export-menu-item small { color: var(--muted); }
body.smarttools-ui .export-menu-setting {
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  background: #f8fafc;
}
body.smarttools-ui .export-menu-separator { background: var(--border-soft); }

/* ===== Footer comune ===== */
body.smarttools-ui .app-footer {
  width: min(1920px, calc(100% - 28px));
  height: 40px;
  min-height: 40px;
  margin: 0 auto 8px;
  padding: 0 14px;
  border: 1px solid rgba(226, 232, 240, .92);
  border-radius: 14px;
  background: rgba(255,255,255,.80);
  color: var(--muted);
  box-shadow: 0 8px 22px rgba(15, 23, 42, .04);
  backdrop-filter: blur(10px);
}

body.smarttools-ui .footer-product strong {
  color: var(--text);
  font-weight: 850;
}

body.smarttools-ui .footer-version a {
  color: var(--accent-2);
  font-weight: 800;
}

/* ===== Toast ===== */
body.smarttools-ui .toast {
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 12px;
  background: #172033;
  color: #fff;
  box-shadow: 0 16px 34px rgba(15, 23, 42, .28);
}

/* ===== Scrollbar discreta ===== */
body.smarttools-ui * {
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

body.smarttools-ui *::-webkit-scrollbar { width: 10px; height: 10px; }
body.smarttools-ui *::-webkit-scrollbar-track { background: transparent; }
body.smarttools-ui *::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 999px;
  background: #cbd5e1;
  background-clip: padding-box;
}
body.smarttools-ui *::-webkit-scrollbar-thumb:hover { background-color: #94a3b8; }

/* ===== Responsive comune ===== */
@media (max-width: 900px) {
  body.smarttools-ui { overflow: auto; }

  body.smarttools-ui .app-header {
    width: calc(100% - 16px);
    height: auto;
    min-height: 54px;
    margin: 6px auto 8px;
  }

  body.smarttools-ui .tool-hero {
    width: calc(100% - 16px);
    height: auto;
    min-height: 104px;
    margin: 0 auto 8px;
    padding: 18px 22px;
  }

  body.smarttools-ui .tool-hero-content {
    width: min(860px, calc(100% - 80px));
  }

  body.smarttools-ui .workspace {
    height: auto;
    min-height: calc(100vh - 180px);
    padding: 0 8px 10px;
  }

  body.smarttools-ui .app-footer {
    width: calc(100% - 16px);
    height: auto;
    min-height: 42px;
    padding: 8px 12px;
  }
}

@media (max-width: 720px) {
  body.smarttools-ui .brand p,
  body.smarttools-ui .badge,
  body.smarttools-ui .ui-theme-button span { display: none; }
  body.smarttools-ui .ui-theme-button { width: 32px; padding: 0; }

  body.smarttools-ui .tool-hero {
    min-height: 96px;
    padding: 16px 18px;
    border-radius: 18px;
  }

  body.smarttools-ui .tool-hero-content { width: calc(100% - 42px); }
  body.smarttools-ui .tool-hero h2 { font-size: 29px; }
  body.smarttools-ui .tool-hero p:not(.tool-hero-kicker) {
    margin-top: 7px;
    font-size: 12.5px;
    line-height: 1.35;
  }

  body.smarttools-ui .app-footer {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
  }
}

@media print {
  body.smarttools-ui .app-header,
  body.smarttools-ui .tool-hero,
  body.smarttools-ui .app-footer { display: none !important; }
}

/* Pulsante unico per il cambio tema Light/Dark. */
body.smarttools-ui .ui-theme-toggle-single {
  min-height: 38px;
  padding: 0 12px;
  border-color: var(--border-soft);
  background: rgba(255,255,255,.62);
}

body.smarttools-ui .ui-theme-toggle-single:not([aria-pressed="true"]):hover {
  background: var(--surface);
}


/* ========================================================================== 
   Smart Tools v2026.07.026 — interfaccia compatta e adattiva
   ========================================================================== */

html { scroll-behavior: smooth; }

/* L'header resta disponibile mentre l'area di lavoro occupa quasi tutto lo schermo.
   Il componente hero è opzionale e non viene istanziato da Diagram Lab. */
body.smarttools-ui {
  overflow-x: hidden;
  overflow-y: auto;
  min-height: 100%;
}

body.smarttools-ui .app-header {
  position: sticky;
  top: 8px;
  z-index: 90;
}

body.smarttools-ui .tool-hero {
  position: relative;
  flex: 0 0 auto;
}

body.smarttools-ui .workspace {
  height: calc(100vh - var(--smarttools-header-block) - var(--app-footer-height));
  height: calc(100dvh - var(--smarttools-header-block) - var(--app-footer-height));
  min-height: 610px;
}

/* Densità leggermente maggiore per le barre operative. */
body.smarttools-ui .panel-toolbar {
  min-height: 46px;
  padding: 6px 8px;
  gap: 6px;
}
body.smarttools-ui .toolbar-group { gap: 5px; }
body.smarttools-ui .button,
body.smarttools-ui .icon-button,
body.smarttools-ui .select {
  min-height: 32px;
  border-radius: 9px;
  font-size: 12px;
}
body.smarttools-ui .button { padding-inline: 9px; gap: 5px; }
body.smarttools-ui .icon-button { width: 32px; min-width: 32px; padding: 0; }
body.smarttools-ui .icon-button .fa-icon { width: 14px; height: 14px; }

/* Catalogo icone: la skin comune rispetta la nuova densità del tool. */
body.smarttools-ui .icon-tile { border-radius: 10px; }

@media (max-width: 1500px) {
  body.smarttools-ui .panel-toolbar { padding: 5px 7px; }
  body.smarttools-ui .button,
  body.smarttools-ui .select { font-size: 11.5px; }
  body.smarttools-ui .select.compact { max-width: 102px; }
}

@media (max-width: 1180px) {
  body.smarttools-ui .app-header { width: calc(100% - 18px); }
  body.smarttools-ui .tool-hero { width: calc(100% - 18px); }
  body.smarttools-ui .workspace { padding-inline: 9px; }
}

@media (max-width: 900px) {
  body.smarttools-ui .app-header {
    top: 6px;
    position: sticky;
  }
  body.smarttools-ui .workspace {
    height: auto;
    min-height: 0;
  }
}

@media (max-width: 720px) {
  body.smarttools-ui .app-header {
    gap: 8px;
    padding: 7px 9px;
  }
  body.smarttools-ui .brand { gap: 8px; }
  body.smarttools-ui .brand-mark { width: 34px; height: 34px; border-radius: 11px; }
  body.smarttools-ui .brand-mark .fa-icon { width: 17px; height: 17px; }
  body.smarttools-ui .brand h1 { font-size: 14px; }
  body.smarttools-ui .header-actions { gap: 5px; }
  body.smarttools-ui .header-actions .button span { display: none; }
  body.smarttools-ui .header-actions .button,
  body.smarttools-ui .ui-theme-toggle-single {
    width: 32px;
    min-width: 32px;
    padding-inline: 0;
  }
  body.smarttools-ui .tool-hero {
    min-height: 92px;
    padding: 14px 17px;
  }
  body.smarttools-ui .tool-hero h2 { font-size: 27px; }
  body.smarttools-ui .tool-hero p:not(.tool-hero-kicker) {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }
}

@media (max-width: 480px) {
  body.smarttools-ui .app-header,
  body.smarttools-ui .tool-hero,
  body.smarttools-ui .app-footer { width: calc(100% - 10px); }
  body.smarttools-ui .brand p { display: none; }
  body.smarttools-ui .tool-hero {
    min-height: 82px;
    padding: 12px 14px;
    border-radius: 15px;
  }
  body.smarttools-ui .tool-hero-content { width: calc(100% - 20px); }
  body.smarttools-ui .tool-hero-kicker { font-size: 9px; }
  body.smarttools-ui .tool-hero h2 { font-size: 24px; }
  body.smarttools-ui .tool-hero p:not(.tool-hero-kicker) { font-size: 11.5px; }
}

/* Rifiniture responsive finali v2026.07.026. */
body.smarttools-ui .app-header { top: 0; }

@media (max-width: 1500px) {
  body.smarttools-ui .preview-toolbar .field-label { display: none; }
}

@media (max-width: 900px) {
  body.smarttools-ui .app-header { top: 0; }
  body.smarttools-ui .divider { display: none; }
}
body.smarttools-ui { padding-bottom: 8px; }
@media (min-width: 901px) {
  body.smarttools-ui .workspace {
    height: calc(100vh - var(--smarttools-header-block) - var(--app-footer-height) + 10px);
    height: calc(100dvh - var(--smarttools-header-block) - var(--app-footer-height) + 10px);
  }
}



/* Diagram Lab v2026.07.026 — drag & drop, tema chiaro */
body.smarttools-ui .drop-hint {
  border-color: #bfdbfe;
  background: rgba(239, 246, 255, .82);
  color: #47617d;
}
body.smarttools-ui .file-drop-overlay {
  border-color: #3b82f6;
  background: rgba(239, 246, 255, .94);
  color: #1d4ed8;
  backdrop-filter: blur(8px);
}
body.smarttools-ui .file-drop-card {
  border-color: rgba(59, 130, 246, .34);
  background: rgba(255, 255, 255, .94);
}
body.smarttools-ui .editor-panel.file-drag-active {
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .18), var(--shadow);
}
