:root {
      --bg: #f4f6f8;
      --card: #ffffff;
      --text: #111827;
      --muted: #6b7280;
      --border: #d1d5db;
      --border-soft: #e5e7eb;
      --accent: #2563eb;
      --accent-2: #1d4ed8;
      --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, sans-serif;
      --cat-allowed: #16a34a;
      --cat-denied: #dc2626;
      --cat-alarm: #0891b2;
      --cat-event: #64748b;
      --cat-debug: #7c3aed;
      --cat-performance: #d97706;
      --cat-unknown: #94a3b8;
    }

    * { box-sizing: border-box; }
    html, body { min-height: 100%; }

    body {
      margin: 0;
      font-family: var(--sans);
      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);
    }

    button, input, select, textarea { font: inherit; }

    .fa-icon {
      width: 1em;
      height: 1em;
      fill: currentColor;
      flex: 0 0 auto;
    }

    .smartdocs-app-header {
      width: min(1760px, calc(100% - 28px));
      margin: 10px auto 0;
      min-height: 46px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 8px 12px;
      border: 1px solid rgba(203, 213, 225, 0.92);
      border-radius: 16px;
      background: rgba(255, 255, 255, 0.86);
      box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
      backdrop-filter: blur(12px);
      position: sticky;
      top: 8px;
      z-index: 90;
      transition: opacity .22s ease, transform .22s ease, visibility .22s ease;
    }

    .smartdocs-app-header.header-hidden {
      opacity: 0;
      transform: translateY(-110%);
      visibility: hidden;
      pointer-events: none;
    }

    .smartdocs-app-header-main {
      min-width: 0;
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .smartdocs-app-brand {
      flex: 0 0 auto;
      display: inline-flex;
      align-items: center;
      gap: 7px;
      min-height: 30px;
      padding: 0 10px;
      border-radius: 999px;
      color: #fff;
      background: linear-gradient(135deg, var(--accent), var(--accent-2));
      font-size: 12px;
      font-weight: 850;
      letter-spacing: 0.01em;
      box-shadow: inset 0 1px 0 rgba(255,255,255,0.24);
    }

    .smartdocs-app-title-wrap {
      min-width: 0;
      display: grid;
      gap: 1px;
    }

    .smartdocs-app-title {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      color: var(--text);
      font-size: 13.5px;
      line-height: 1.15;
      font-weight: 850;
    }

    .smartdocs-app-subtitle {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      color: var(--muted);
      font-size: 11.5px;
      line-height: 1.2;
    }

    .smartdocs-app-meta {
      flex: 0 0 auto;
      display: inline-flex;
      align-items: center;
      justify-content: flex-end;
      gap: 7px;
    }

    .smartdocs-app-pill {
      min-height: 28px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      padding: 0 9px;
      border: 1px solid var(--border-soft);
      border-radius: 999px;
      background: rgba(248,250,252,0.86);
      color: var(--muted);
      font-size: 11.5px;
      font-weight: 750;
      white-space: nowrap;
    }

    .page {
      width: min(1180px, calc(100% - 28px));
      margin: 28px auto 38px;
    }

    body.wide-output .page,
    body.wide-output .smartdocs-home-footer-only {
      width: min(1840px, calc(100% - 28px));
    }

    .hero {
      position: relative;
      overflow: hidden;
      border-radius: 18px;
      padding: 34px;
      min-height: 210px;
      color: #fff;
      background: linear-gradient(135deg, #3b6eea 0%, #2853d6 100%);
      box-shadow: 0 22px 60px rgba(37, 99, 235, 0.18);
    }

    .hero::after {
      content: "";
      position: absolute;
      top: -80px;
      right: -70px;
      width: 270px;
      height: 270px;
      border-radius: 50%;
      background: rgba(255,255,255,.16);
    }

    .hero-kicker {
      margin: 0 0 8px;
      text-transform: uppercase;
      font-size: 13px;
      letter-spacing: .18em;
      font-weight: 900;
    }

    .hero h1 {
      margin: 0 0 14px;
      font-size: clamp(34px, 5vw, 52px);
      line-height: .95;
      letter-spacing: -.055em;
    }

    .hero p {
      margin: 0;
      max-width: 760px;
      color: rgba(255,255,255,.92);
      line-height: 1.6;
      font-size: 15px;
    }

    .hero-badges {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      margin-top: 22px;
    }

    .hero-badge {
      display: inline-flex;
      align-items: center;
      gap: 7px;
      min-height: 28px;
      padding: 0 10px;
      border: 1px solid rgba(255,255,255,.34);
      border-radius: 999px;
      background: rgba(255,255,255,.13);
      color: #fff;
      font-size: 12px;
      font-weight: 800;
    }

    .section {
      margin-top: 18px;
      border: 1px solid var(--border-soft);
      border-radius: 18px;
      background: rgba(255,255,255,.92);
      box-shadow: 0 14px 36px rgba(17,24,39,.07);
      overflow: visible;
    }

    .section-title {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 16px;
      padding: 20px 20px 12px;
    }

    .section-title h2 {
      margin: 0;
      font-size: 20px;
      line-height: 1.15;
      letter-spacing: -.02em;
    }

    .section-title p {
      margin: 4px 0 0;
      color: var(--muted);
      font-size: 13px;
      line-height: 1.4;
    }

    .toolbar,
    .filterbar,
    .actionbar {
      margin-left: 18px;
      margin-right: 18px;
      padding: 14px;
      border: 1px solid #dbe3ee;
      border-radius: 16px;
      background: rgba(248, 251, 255, .92);
      box-shadow: 0 10px 24px rgba(15,23,42,.08);
      backdrop-filter: blur(12px);
    }

    .toolbar {
      margin-bottom: 18px;
      display: grid;
      grid-template-columns: minmax(230px, 320px) 1fr;
      gap: 12px;
      align-items: end;
    }

    .filterbar {
      position: sticky;
      top: 14px;
      z-index: 70;
      display: grid;
      grid-template-columns:
        minmax(120px, .75fr)
        minmax(120px, .75fr)
        minmax(130px, .85fr)
        minmax(130px, .85fr)
        minmax(280px, 1.8fr)
        minmax(150px, .8fr);
      gap: 10px;
      align-items: end;
      margin-bottom: 10px;
    }

    .actionbar {
      position: sticky;
      top: 102px;
      z-index: 68;
      display: grid;
      grid-template-columns: 1fr auto;
      gap: 12px;
      align-items: end;
      margin-bottom: 22px;
      background: rgba(255,255,255,.92);
    }

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

    .actionbar-row {
      display: flex;
      align-items: center;
      gap: 9px;
      flex-wrap: wrap;
      min-width: 0;
    }

    .visible-count {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: 72px;
      height: 36px;
      padding: 0 10px;
      border: 1px solid #dbe3ee;
      border-radius: 12px;
      background: #fff;
      color: #475569;
      font-size: 11px;
      font-weight: 900;
      font-variant-numeric: tabular-nums;
      white-space: nowrap;
    }

    label {
      display: block;
      margin: 0 0 6px;
      text-transform: uppercase;
      letter-spacing: .12em;
      color: var(--muted);
      font-size: 10.5px;
      font-weight: 900;
    }

    select, input[type=file], input[type=text], textarea {
      width: 100%;
      border: 1px solid var(--border-soft);
      border-radius: 12px;
      background: #fff;
      color: var(--text);
      padding: 10px 12px;
      outline: none;
      box-shadow: 0 1px 0 rgba(17,24,39,.03);
    }

    select:focus, input:focus, textarea:focus {
      border-color: rgba(37,99,235,.55);
      box-shadow: 0 0 0 4px rgba(37,99,235,.10);
    }

    textarea {
      min-height: 340px;
      resize: vertical;
      font-family: var(--mono);
      font-size: 12.5px;
      line-height: 1.48;
      tab-size: 2;
    }

    .log-textarea-wrap {
      padding: 0 18px 16px;
    }

    .actions {
      display: flex;
      gap: 9px;
      flex-wrap: wrap;
      padding: 0 18px 20px;
    }

    button {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 7px;
      width: auto;
      min-height: 38px;
      border: 1px solid var(--accent);
      border-radius: 12px;
      padding: 0 14px;
      background: linear-gradient(135deg, var(--accent), var(--accent-2));
      color: #fff;
      font-weight: 850;
      cursor: pointer;
      box-shadow: 0 8px 18px rgba(37,99,235,.18);
      white-space: nowrap;
    }

    button.secondary,
    .btn-mini.secondary {
      color: #111827;
      border-color: var(--border-soft);
      background: #fff;
      box-shadow: 0 4px 10px rgba(17,24,39,.06);
    }

    button:disabled {
      opacity: .48;
      cursor: not-allowed;
      filter: grayscale(.15);
    }

    .btn-mini {
      min-height: 38px;
      padding: 0 12px;
      border-radius: 12px;
      font-size: 12px;
    }

    button:hover:not(:disabled) { filter: brightness(1.03); }

    .checkLine {
      display: flex;
      align-items: center;
      min-height: 40px;
      color: var(--text);
      font-size: 13px;
      border: 1px solid var(--border-soft);
      border-radius: 12px;
      padding: 0 12px;
      background: #fff;
      white-space: nowrap;
    }

    input[type=checkbox] {
      transform: translateY(1px);
      margin-right: 8px;
      accent-color: var(--accent);
    }

    .legend {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      padding: 0 18px 18px;
    }

    .chip {
      display: inline-flex;
      align-items: center;
      gap: 7px;
      border: 1px solid #dbe3ee;
      border-radius: 999px;
      padding: 6px 10px;
      font-size: 12px;
      color: #475569;
      background: #fff;
      font-weight: 750;
      white-space: nowrap;
    }

    .dot {
      width: 9px;
      height: 9px;
      border-radius: 999px;
      display: inline-block;
    }

    .dot.allowed { background: var(--cat-allowed); }
    .dot.denied { background: var(--cat-denied); }
    .dot.alarm { background: var(--cat-alarm); }
    .dot.event { background: var(--cat-event); }
    .dot.debug { background: var(--cat-debug); }
    .dot.performance { background: var(--cat-performance); }

    .hint, .footerNote {
      padding: 12px 18px;
      border-top: 1px solid var(--border-soft);
      color: var(--muted);
      font-size: 12px;
      line-height: 1.45;
      background: #fbfdff;
    }

    .outputShell {
      position: relative;
      margin: 0 18px 18px;
      border: 1px solid #dbe3ee;
      border-radius: 18px;
      overflow: hidden;
      background: #fff;
    }

    .outputWrap {
      position: relative;
      overflow: auto;
      white-space: nowrap;
      height: max(820px, 88vh);
      max-height: none;
      background: #050608;
      color: #f8fafc;
      padding-bottom: 18px;
      scrollbar-width: none;
      font-variant-ligatures: none;
    }

    body.wide-output .outputWrap {
      height: max(900px, 90vh);
    }

    .outputWrap::-webkit-scrollbar {
      display: none;
      width: 0;
      height: 0;
    }

    .rawCard {
      display: grid;
      grid-template-columns: 58px max-content 58px;
      align-items: stretch;
      width: max-content;
      min-width: 100%;
      min-height: 25px;
      margin: 0;
      border-left: 4px solid var(--cat-unknown);
      border-bottom: 1px solid rgba(255,255,255,.08);
      background: #050608;
      color: #f8fafc;
      font-family: var(--mono);
      cursor: pointer;
      transition: background-color .12s ease, box-shadow .12s ease, border-left-color .12s ease;
    }

    .rawCard.allowed { border-left-color: var(--cat-allowed); }
    .rawCard.denied { border-left-color: var(--cat-denied); }
    .rawCard.alarm { border-left-color: var(--cat-alarm); }
    .rawCard.event { border-left-color: var(--cat-event); }
    .rawCard.debug { border-left-color: var(--cat-debug); }
    .rawCard.performance { border-left-color: var(--cat-performance); }
    .rawCard.unknown { border-left-color: var(--cat-unknown); }

    .rawCard:hover {
      background: #111827;
      box-shadow: inset 0 0 0 9999px rgba(255,255,255,.035);
    }

    .rawCard.selected {
      background: #151103;
      box-shadow:
        inset 0 0 0 1px rgba(245,158,11,.65),
        inset 0 0 0 9999px rgba(245,158,11,.10);
      border-left-color: #f59e0b !important;
    }

    .rawLineNo {
      position: sticky;
      left: 0;
      z-index: 4;
      display: flex;
      align-items: center;
      justify-content: flex-end;
      min-height: 25px;
      padding: 5px 9px 5px 6px;
      background: #080b10;
      border-right: 1px solid rgba(255,255,255,.14);
      color: #94a3b8;
      font-family: var(--mono);
      font-size: 11px;
      line-height: 1.35;
      user-select: none;
    }

    .rawCard:hover .rawLineNo {
      color: #e2e8f0;
      background: #111827;
    }

    .rawCard.selected .rawLineNo {
      color: #fbbf24;
      background: #1f1603;
      border-right-color: rgba(245,158,11,.42);
      font-weight: 900;
    }

    .rawText {
      min-width: max-content;
      padding: 5px 12px 5px 10px;
      white-space: pre;
      word-break: normal;
      overflow-wrap: normal;
      line-height: 1.35;
      font-family: var(--mono);
      font-size: 11.5px;
      color: #f8fafc;
    }

    .rawCard.selected .rawText {
      color: #fff7ed;
    }

    .copyFloating {
      position: sticky;
      right: 8px;
      z-index: 4;
      grid-column: 3;
      align-self: center;
      justify-self: center;
      min-height: 21px;
      margin: 0;
      opacity: .45;
      border: 1px solid rgba(148,163,184,.35);
      background: rgba(15,23,42,.88);
      color: #cbd5e1;
      width: auto;
      padding: 0 7px;
      border-radius: 7px;
      box-shadow: none;
      font-size: 10px;
      font-weight: 800;
      cursor: pointer;
    }

    .rawCard:hover .copyFloating,
    .rawCard.selected .copyFloating {
      opacity: .95;
    }

    mark {
      padding: 0;
      border: 0;
      border-radius: 0;
      background: transparent;
      font-weight: 800;
    }

    mark.mark-ip { color: #22c55e; }
    mark.mark-field { color: #60a5fa; }
    mark.mark-chain { color: #c084fc; }
    mark.mark-warn { color: #f59e0b; }
    mark.mark-bad { color: #ef4444; }

    .emptyState {
      padding: 24px 16px;
      color: #64748b;
      text-align: center;
      font-size: 13px;
      background: #fff;
    }

    .scrollOverlay {
      position: absolute;
      left: 74px;
      right: 74px;
      bottom: 8px;
      height: 13px;
      z-index: 10;
      display: none;
      align-items: center;
      pointer-events: none;
    }

    .outputShell.has-horizontal-scroll .scrollOverlay {
      display: flex;
    }

    .scrollTrack {
      position: relative;
      width: 100%;
      height: 9px;
      border-radius: 999px;
      background: rgba(15, 23, 42, 0.20);
      border: 1px solid rgba(148, 163, 184, 0.35);
      backdrop-filter: blur(7px);
      pointer-events: auto;
      cursor: pointer;
    }

    .scrollThumb {
      position: absolute;
      left: 0;
      top: 1px;
      height: 5px;
      min-width: 38px;
      border-radius: 999px;
      background: rgba(37, 99, 235, 0.80);
      box-shadow: 0 2px 8px rgba(37, 99, 235, 0.28);
      cursor: grab;
    }

    .smartdocs-home-footer-only {
      box-sizing: border-box;
      width: min(1180px, calc(100% - 28px));
      margin: 0 auto 20px;
      border: 1px solid #e5e7eb;
      border-radius: 18px;
      background: rgba(255,255,255,.9);
      box-shadow: 0 8px 20px rgba(17,24,39,.05);
      padding: 14px 18px;
      color: #6b7280;
      font-size: 12px;
      line-height: 1.35;
      text-align: center;
    }

    @media (max-width: 1180px) {
      .filterbar {
        grid-template-columns: repeat(3, minmax(0, 1fr));
      }

      .actionbar {
        top: 210px;
      }

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

      .outputWrap {
        height: max(760px, 82vh);
      }
    }

    @media (max-width: 760px) {
      .smartdocs-app-header, .page, .smartdocs-home-footer-only {
        width: calc(100% - 20px);
      }

      .smartdocs-app-meta { display: none; }
      .hero { padding: 28px 22px; }
      .filterbar { grid-template-columns: 1fr; }
      .actionbar { grid-template-columns: 1fr; }
      .actionbar-row { align-items: stretch; flex-direction: column; }
      .visible-count { width: 100%; }
      .rawCard { grid-template-columns: 44px max-content 0; }
      .copyFloating { display: none; }
      .outputWrap { height: 78vh; }
      textarea { min-height: 260px; }
    }
  
    /* v27 rollback stabile: upload compatto, bottom bar corretta, niente copia per riga */
    .smartdocs-app-header {
      justify-content: flex-start !important;
    }

    .uploadSafe {
      min-width: 0;
    }

    .uploadSafeNative {
      position: absolute !important;
      width: 1px !important;
      height: 1px !important;
      padding: 0 !important;
      margin: -1px !important;
      overflow: hidden !important;
      clip: rect(0 0 0 0) !important;
      white-space: nowrap !important;
      border: 0 !important;
    }

    .uploadSafeBox {
      width: 100%;
      min-height: 42px;
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 6px 8px;
      border: 1px solid #dbe3ee;
      border-radius: 14px;
      background: linear-gradient(180deg, #ffffff, #f8fbff);
      box-shadow: 0 1px 0 rgba(17,24,39,.03), 0 8px 18px rgba(37,99,235,.06);
    }

    .uploadSafeButton {
      flex: 0 0 auto;
      width: auto !important;
      min-width: 104px;
      height: 31px;
      min-height: 31px;
      display: inline-flex !important;
      align-items: center;
      justify-content: center;
      padding: 0 12px;
      margin: 0 !important;
      border: 1px solid #2563eb;
      border-radius: 999px;
      background: linear-gradient(135deg, #2563eb, #1d4ed8);
      color: #fff !important;
      box-shadow: 0 7px 16px rgba(37,99,235,.18);
      cursor: pointer;
      text-transform: none !important;
      letter-spacing: normal !important;
      font-size: 12px !important;
      line-height: 1 !important;
      font-weight: 850 !important;
      white-space: nowrap;
    }

    .uploadSafeButton:hover {
      filter: brightness(1.04);
    }

    .uploadSafeName {
      min-width: 0;
      flex: 1 1 auto;
      height: 31px;
      display: flex;
      align-items: center;
      padding: 0 10px;
      border: 1px solid #e5e7eb;
      border-radius: 999px;
      background: #fff;
      color: #64748b;
      font-size: 12.5px;
      font-weight: 750;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .actionbar.bottom-actionbar {
      position: fixed !important;
      top: auto !important;
      bottom: 16px !important;
      left: 50% !important;
      right: auto !important;
      transform: translateX(-50%) !important;
      z-index: 120 !important;
      width: min(760px, calc(100% - 32px)) !important;
      min-height: 0 !important;
      max-height: none !important;
      height: auto !important;
      margin: 0 !important;
      padding: 10px 12px !important;
      display: grid !important;
      grid-template-columns: minmax(0, 1fr) auto !important;
      align-items: end !important;
      gap: 12px !important;
      overflow: visible !important;
      border: 1px solid rgba(203,213,225,.94) !important;
      border-radius: 18px !important;
      background: rgba(255,255,255,.94) !important;
      box-shadow: 0 18px 48px rgba(15,23,42,.18) !important;
      backdrop-filter: blur(16px) !important;
      opacity: 1;
      visibility: visible;
      pointer-events: auto;
      transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
    }

    .actionbar.bottom-actionbar.is-hidden {
      opacity: 0 !important;
      transform: translateX(-50%) translateY(22px) !important;
      visibility: hidden !important;
      pointer-events: none !important;
    }

    .actionbar.bottom-actionbar label {
      margin: 0 0 6px !important;
      line-height: 1 !important;
    }

    .actionbar.bottom-actionbar .actionbar-row {
      display: flex !important;
      align-items: center !important;
      gap: 8px !important;
      flex-wrap: wrap !important;
      min-height: 0 !important;
    }

    .actionbar.bottom-actionbar .btn-mini {
      min-height: 36px !important;
      height: 36px !important;
      padding: 0 12px !important;
      border-radius: 12px !important;
      font-size: 12px !important;
      line-height: 1 !important;
    }

    .actionbar.bottom-actionbar .visible-count {
      display: inline-flex !important;
      align-items: center !important;
      justify-content: center !important;
      min-width: 78px !important;
      height: 36px !important;
      padding: 0 10px !important;
      border-radius: 12px !important;
      font-size: 11px !important;
      font-weight: 900 !important;
      font-variant-numeric: tabular-nums !important;
      background: #fff !important;
      border: 1px solid #dbe3ee !important;
      color: #475569 !important;
    }

    .rawCard {
      grid-template-columns: 58px max-content !important;
      cursor: pointer;
      transition: background-color .12s ease, box-shadow .12s ease, border-left-color .12s ease;
    }

    .copyFloating {
      display: none !important;
    }

    .rawCard:hover {
      background: #111827 !important;
      box-shadow: inset 0 0 0 9999px rgba(255,255,255,.04);
    }

    .rawCard:hover .rawLineNo {
      color: #e2e8f0;
      background: #111827;
    }

    .rawCard.selected {
      background: #151103 !important;
      box-shadow:
        inset 0 0 0 1px rgba(245,158,11,.70),
        inset 0 0 0 9999px rgba(245,158,11,.12);
      border-left-color: #f59e0b !important;
    }

    .rawCard.selected .rawLineNo {
      color: #fbbf24;
      background: #1f1603;
      border-right-color: rgba(245,158,11,.42);
      font-weight: 900;
    }

    .rawCard.selected .rawText {
      color: #fff7ed;
    }

    .copy-toast {
      position: fixed;
      left: 50%;
      bottom: 92px;
      z-index: 220;
      min-width: 280px;
      max-width: min(460px, calc(100% - 44px));
      padding: 11px 14px;
      border: 1px solid #bbf7d0;
      border-radius: 14px;
      background: rgba(240,253,244,.97);
      color: #166534;
      box-shadow: 0 18px 42px rgba(15,23,42,.18);
      font-size: 13px;
      font-weight: 900;
      text-align: center;
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
      transform: translateX(-50%) translateY(14px);
      transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
      backdrop-filter: blur(12px);
    }

    .copy-toast.is-visible {
      opacity: 1;
      visibility: visible;
      transform: translateX(-50%) translateY(0);
    }

    .copy-toast.is-error {
      border-color: #fecaca;
      background: rgba(254,242,242,.97);
      color: #991b1b;
    }

    .outputWrap {
      padding-bottom: 92px !important;
    }

    .footerNote {
      padding-bottom: 92px !important;
    }

    @media (max-width: 760px) {
      .uploadSafeBox {
        align-items: stretch;
        flex-direction: column;
      }

      .uploadSafeButton {
        width: fit-content !important;
      }

      .uploadSafeName {
        width: 100%;
      }

      .actionbar.bottom-actionbar {
        bottom: 10px !important;
        width: calc(100% - 20px) !important;
        grid-template-columns: 1fr !important;
      }

      .actionbar.bottom-actionbar .actionbar-row {
        flex-direction: column !important;
        align-items: stretch !important;
      }

      .actionbar.bottom-actionbar .btn-mini,
      .actionbar.bottom-actionbar .visible-count {
        width: 100% !important;
      }

      .copy-toast {
        left: 10px;
        right: 10px;
        bottom: 205px;
        min-width: 0;
        max-width: none;
        transform: translateY(14px);
      }

      .copy-toast.is-visible {
        transform: translateY(0);
      }

      .rawCard {
        grid-template-columns: 44px max-content !important;
      }

      .outputWrap {
        padding-bottom: 205px !important;
      }

      .footerNote {
        padding-bottom: 205px !important;
      }
    }

  
    /* v28: reintegro icone SmartDocs FontAwesome */
    .fa-icon {
      width: 1em;
      height: 1em;
      fill: currentColor;
      flex: 0 0 auto;
    }

    button .fa-icon,
    .uploadSafeButton .fa-icon {
      width: 13px;
      height: 13px;
    }

    .hero-badge .fa-icon {
      width: 12px;
      height: 12px;
      opacity: .95;
    }

    .smartdocs-app-brand .fa-icon {
      width: 13px;
      height: 13px;
    }

    .uploadSafeButton {
      gap: 7px !important;
    }

    .btn-mini {
      gap: 7px !important;
    }

  
    /* v30: rimosso Solo rilevanti; filtri RouterOS oggettivi */
    .filterbar {
      grid-template-columns:
        minmax(110px, .65fr)
        minmax(110px, .65fr)
        minmax(120px, .75fr)
        minmax(120px, .75fr)
        minmax(130px, .8fr)
        minmax(110px, .65fr)
        minmax(120px, .75fr)
        minmax(260px, 1.55fr) !important;
      align-items: end !important;
    }

    .filterbar select,
    .filterbar input[type="text"] {
      min-width: 0 !important;
    }

    @media (max-width: 1360px) {
      .filterbar {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
      }
    }

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

    @media (max-width: 620px) {
      .filterbar {
        grid-template-columns: 1fr !important;
      }
    }

  
    /* v31: rimosso Prefix; Protocollo precompilato con protocolli standard */
    .filterbar {
      grid-template-columns:
        minmax(110px, .7fr)
        minmax(110px, .7fr)
        minmax(130px, .85fr)
        minmax(120px, .75fr)
        minmax(130px, .85fr)
        minmax(130px, .85fr)
        minmax(300px, 1.75fr) !important;
      align-items: end !important;
    }

    @media (max-width: 1280px) {
      .filterbar {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
      }
    }

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

    @media (max-width: 620px) {
      .filterbar {
        grid-template-columns: 1fr !important;
      }
    }

  
    /* v33: rimosso filtro Connessione */
    .filterbar {
      grid-template-columns:
        minmax(110px, .75fr)
        minmax(110px, .75fr)
        minmax(130px, .9fr)
        minmax(120px, .8fr)
        minmax(130px, .9fr)
        minmax(320px, 1.9fr) !important;
      align-items: end !important;
    }

    @media (max-width: 1180px) {
      .filterbar {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
      }
    }

    @media (max-width: 760px) {
      .filterbar {
        grid-template-columns: 1fr !important;
      }
    }

  
    /* v36: evidenziazione intelligente RouterOS 6/7 con placeholder anti-nesting */
    mark.mark-topic {
      color: #93c5fd;
      font-weight: 900;
    }

    mark.mark-severity {
      color: #fde68a;
      font-weight: 900;
    }

    mark.mark-debug {
      color: #c084fc;
      font-weight: 900;
    }

    mark.mark-key {
      color: #60a5fa;
      font-weight: 850;
    }

    mark.mark-field {
      color: #bfdbfe;
      font-weight: 850;
    }

    mark.mark-number {
      color: #facc15;
      font-weight: 850;
    }

    mark.mark-mac {
      color: #22d3ee;
      font-weight: 900;
    }

    mark.mark-interface {
      color: #a78bfa;
      font-weight: 900;
    }

    mark.mark-proto {
      color: #38bdf8;
      font-weight: 900;
      text-transform: uppercase;
    }

    mark.mark-service {
      color: #f0abfc;
      font-weight: 900;
    }

    mark.mark-state {
      color: #c4b5fd;
      font-weight: 850;
    }

    mark.mark-ip {
      color: #22c55e;
      font-weight: 900;
    }

    mark.mark-arrow {
      color: #f59e0b;
      font-weight: 900;
    }

    mark.mark-good {
      color: #86efac;
      font-weight: 900;
    }

    mark.mark-warn {
      color: #fbbf24;
      font-weight: 900;
    }

    mark.mark-bad {
      color: #fb7185;
      font-weight: 950;
    }

    mark.mark-signal {
      color: #fb923c;
      font-weight: 900;
    }

    .rawCard.alarm .rawLineNo,
    .rawCard.denied .rawLineNo {
      color: #fecaca;
    }

    .rawCard.allowed .rawLineNo {
      color: #bbf7d0;
    }

    .rawText mark {
      text-shadow: 0 0 10px rgba(255,255,255,.04);
    }

  
    /* v38: bottone Incolla + filtro Servizio basato su porte note */
    .actions {
      align-items: center;
    }

    .filterbar {
      grid-template-columns:
        minmax(105px, .7fr)
        minmax(105px, .7fr)
        minmax(120px, .85fr)
        minmax(110px, .75fr)
        minmax(120px, .85fr)
        minmax(150px, 1fr)
        minmax(280px, 1.75fr) !important;
      align-items: end !important;
    }

    mark.mark-known-service {
      text-decoration: underline;
      text-decoration-style: dotted;
      text-underline-offset: 3px;
      font-weight: 900;
    }

    .config-section-block + .config-section-block {
      margin-top: 18px;
    }

    .config-panel-heading.compact {
      margin-bottom: 9px;
    }

    .config-panel-heading.compact h3 {
      font-size: 16px;
    }

    .config-detail-section {
      padding: 14px 0;
      border-bottom: 1px solid #e2e8f0;
    }

    .config-detail-section:first-child {
      padding-top: 0;
    }

    .config-detail-section:last-child {
      border-bottom: 0;
    }

    .config-detail-section h4 {
      margin: 0 0 11px;
      color: #0f172a;
      font-size: 13px;
    }

    .config-detail-kpi-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px;
    }

    .config-detail-kpi-grid > span {
      display: grid;
      gap: 3px;
      min-height: 54px;
      padding: 9px 10px;
      border: 1px solid #e2e8f0;
      border-radius: 10px;
      background: #f8fafc;
      color: #334155;
      font-size: 10.5px;
      overflow-wrap: anywhere;
    }

    .config-detail-kpi-grid > span > strong {
      color: #64748b;
      font-size: 8.5px;
      letter-spacing: .07em;
      text-transform: uppercase;
    }

    .config-proposal-list {
      display: grid;
      gap: 7px;
      margin-top: 10px;
    }

    .config-proposal-list article {
      display: grid;
      gap: 3px;
      padding: 9px 10px;
      border-left: 4px solid #8b5cf6;
      border-radius: 9px;
      background: #f5f3ff;
    }

    .config-proposal-list article strong {
      color: #5b21b6;
      font-size: 11px;
    }

    .config-proposal-list article span {
      color: #64748b;
      font-size: 9.5px;
    }

    .config-mini-table {
      max-height: 340px;
      overflow: auto;
      border: 1px solid #dbe3ee;
      border-radius: 11px;
    }

    .config-mini-table table {
      width: 100%;
      border-collapse: collapse;
      font-size: 10px;
    }

    .config-mini-table th,
    .config-mini-table td {
      padding: 7px 8px;
      border-bottom: 1px solid #edf1f5;
      text-align: left;
      vertical-align: top;
    }

    .config-mini-table th {
      position: sticky;
      top: 0;
      background: #eef2f7;
      color: #475569;
      font-size: 8.5px;
      letter-spacing: .07em;
      text-transform: uppercase;
    }

    .config-mini-table tr:last-child td {
      border-bottom: 0;
    }

    @media (max-width: 1320px) {
      .filterbar {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
      }
    }

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

    @media (max-width: 620px) {
      .filterbar {
        grid-template-columns: 1fr !important;
      }
    }

  
    /* v40: la barra filtri non è più sticky/overlay, resta ancorata sopra il log */
    .filterbar {
      position: static !important;
      top: auto !important;
      z-index: auto !important;
      margin-bottom: 22px !important;
      box-shadow: 0 8px 22px rgba(15,23,42,.06) !important;
    }

    .outputShell {
      margin-top: 0 !important;
    }

    .section:has(.filterbar) {
      overflow: visible !important;
    }

    /* evita qualsiasi sovrapposizione residua tra filtri e righe log */
    .filterbar + .outputShell,
    .filterbar + .actionbar + .outputShell {
      clear: both;
    }

  
    /* v41: textarea input log più compatta */
    textarea,
    #logInput {
      min-height: 210px !important;
      max-height: 420px;
    }

    .log-textarea-wrap textarea {
      min-height: 210px !important;
    }

    @media (max-width: 760px) {
      textarea,
      #logInput,
      .log-textarea-wrap textarea {
        min-height: 170px !important;
      }
    }

  
    /* v45: stampa/PDF nella barra Vista */
    .print-option {
      display: inline-flex !important;
      align-items: center;
      gap: 6px;
      min-height: 36px;
      margin: 0 !important;
      padding: 0 8px;
      border: 1px solid #dbe3ee;
      border-radius: 12px;
      background: #fff;
      text-transform: none !important;
      letter-spacing: normal !important;
      color: #334155 !important;
      font-size: 11.5px !important;
      font-weight: 800 !important;
      white-space: nowrap;
    }

    .print-option > span {
      color: #64748b;
      font-size: 10.5px;
      font-weight: 900;
      text-transform: uppercase;
      letter-spacing: .08em;
    }

    .print-option select {
      width: auto;
      min-width: 116px;
      height: 28px;
      min-height: 28px;
      padding: 0 24px 0 8px;
      border: 0;
      border-radius: 8px;
      background-color: #f8fafc;
      color: #111827;
      font-size: 12px;
      font-weight: 750;
      box-shadow: none;
    }

    .actionbar.bottom-actionbar {
      width: min(1180px, calc(100% - 32px)) !important;
    }

    @media (max-width: 1120px) {
      .print-option {
        flex: 1 1 210px;
      }

      .print-option select {
        flex: 1 1 auto;
        min-width: 0;
      }
    }

    @media (max-width: 760px) {
      .print-option {
        width: 100%;
        justify-content: space-between;
      }

      .print-option select {
        width: 100%;
      }
    }

  
    /* v46: menu PDF/Stampa compatto stile SmartDocs + stampa paginata */
    .print-hidden-control {
      position: absolute !important;
      width: 1px !important;
      height: 1px !important;
      opacity: 0 !important;
      pointer-events: none !important;
      overflow: hidden !important;
      clip: rect(0 0 0 0) !important;
      white-space: nowrap !important;
    }

    .print-menu-button[aria-expanded="true"] {
      border-color: rgba(37, 99, 235, .55) !important;
      background: #eff6ff !important;
      color: #1d4ed8 !important;
    }

    .log-print-settings-menu {
      position: fixed;
      z-index: 260;
      min-width: 230px;
      max-width: min(92vw, 300px);
      padding: 10px;
      border: 1px solid rgba(203, 213, 225, 0.95);
      border-radius: 16px;
      background: rgba(255,255,255,0.98);
      box-shadow: 0 20px 48px rgba(15, 23, 42, 0.22);
      backdrop-filter: blur(12px);
    }

    .log-print-settings-menu[hidden] {
      display: none !important;
    }

    .log-print-menu-title {
      padding: 4px 6px 10px;
      color: #64748b;
      font-size: 11px;
      font-weight: 900;
      letter-spacing: 0.12em;
      text-transform: uppercase;
    }

    .log-print-menu-item,
    .log-print-menu-field {
      width: 100%;
      display: flex;
      align-items: center;
      gap: 8px;
      border-radius: 12px;
    }

    .log-print-menu-item {
      min-height: 38px;
      padding: 0 10px;
      border: 1px solid transparent;
      background: transparent;
      color: #111827;
      font-family: var(--sans, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif);
      font-weight: 800;
      cursor: pointer;
      text-align: left;
    }

    .log-print-menu-print {
      border-color: transparent;
      background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
      color: white;
      justify-content: center;
      margin-bottom: 8px;
      box-shadow: 0 10px 22px rgba(37, 99, 235, .20);
    }

    .log-print-menu-print:hover {
      filter: brightness(1.03);
      color: white;
    }

    .log-print-menu-field {
      flex-direction: column;
      align-items: stretch;
      padding: 8px 6px 10px;
      margin-bottom: 4px;
      border: 1px solid #e5e7eb;
      background: #f8fafc;
    }

    .log-print-menu-field span {
      color: #64748b;
      font-size: 10px;
      font-weight: 900;
      letter-spacing: 0.11em;
      text-transform: uppercase;
    }

    .log-print-menu-field select {
      width: 100%;
      height: 36px;
      border: 1px solid #d1d5db;
      border-radius: 10px;
      background: white;
      color: #111827;
      font-family: var(--sans, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif);
      font-weight: 700;
      padding: 0 10px;
    }

    /* neutralizza i vecchi controlli inline della v45 */
    .print-option {
      display: none !important;
    }

    .actionbar.bottom-actionbar {
      width: min(920px, calc(100% - 32px)) !important;
    }

    /* v48: opzione intestazioni browser rimossa; stampa sempre pulita */
    @media print {
      @page {
        margin: 0;
      }
    }

  
    /* v49: supporto WatchGuard Firebox / Traffic Monitor */
    mark.wg-cyan {
      color: #00ffff;
      font-weight: 900;
    }

    mark.wg-green {
      color: #00ff00;
      font-weight: 900;
    }

    mark.wg-red {
      color: #ff2b1c;
      font-weight: 900;
    }

    mark.wg-yellow {
      color: #ffff00;
      font-weight: 900;
    }

    mark.wg-orange {
      color: #ff8c00;
      font-weight: 900;
    }

    mark.wg-white {
      color: #f8fafc;
      font-weight: 800;
    }

    mark.wg-key,
    mark.wg-detail {
      color: #a3a3a3;
      font-weight: 650;
    }

    .rawCard.vendor-watchguard.alarm,
    .rawCard.vendor-watchguard.event,
    .rawCard.vendor-watchguard.debug,
    .rawCard.vendor-watchguard.performance {
      border-left-color: #00ffff;
    }

    .rawCard.vendor-watchguard.allowed {
      border-left-color: #00ff00;
    }

    .rawCard.vendor-watchguard.denied {
      border-left-color: #ff2b1c;
    }

  
    /* v50: in modalità WatchGuard nasconde Colore e Processo */
    body.watchguard-mode #categoryFilterGroup,
    body.watchguard-mode #facilityFilterGroup {
      display: none !important;
    }

    body.watchguard-mode .filterbar {
      grid-template-columns:
        minmax(130px, .8fr)
        minmax(130px, .8fr)
        minmax(130px, .8fr)
        minmax(160px, 1fr)
        minmax(320px, 1.9fr) !important;
    }

    @media (max-width: 1180px) {
      body.watchguard-mode .filterbar {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
      }
    }

    @media (max-width: 760px) {
      body.watchguard-mode .filterbar {
        grid-template-columns: 1fr !important;
      }
    }

  
    /* v52: WatchGuard Status Report */
    body.watchguard-status-mode #chainFilterGroup,
    body.watchguard-status-mode #protoFilterGroup,
    body.watchguard-status-mode #serviceFilterGroup {
      display: none !important;
    }

    body.watchguard-status-mode .filterbar {
      grid-template-columns:
        minmax(240px, .9fr)
        minmax(420px, 2.1fr) !important;
    }

    .rawCard.vendor-watchguard-status {
      border-left-color: #64748b;
    }

    .rawCard.vendor-watchguard-status.status-report {
      min-height: 34px;
      border-left-color: #38bdf8;
      border-bottom-color: rgba(56, 189, 248, .35);
      background: linear-gradient(90deg, rgba(14, 116, 144, .34), rgba(5, 6, 8, .96));
    }

    .rawCard.vendor-watchguard-status.status-section {
      min-height: 31px;
      border-left-color: #22d3ee;
      border-bottom-color: rgba(34, 211, 238, .28);
      background: linear-gradient(90deg, rgba(8, 145, 178, .25), rgba(5, 6, 8, .98));
    }

    .rawCard.vendor-watchguard-status.status-healthy {
      border-left-color: #22c55e;
      background: linear-gradient(90deg, rgba(22, 163, 74, .12), #050608 28%);
    }

    .rawCard.vendor-watchguard-status.status-critical {
      border-left-color: #ef4444;
      background: linear-gradient(90deg, rgba(220, 38, 38, .16), #050608 30%);
    }

    .rawCard.vendor-watchguard-status.status-warning {
      border-left-color: #f59e0b;
      background: linear-gradient(90deg, rgba(217, 119, 6, .15), #050608 30%);
    }

    .rawCard.vendor-watchguard-status.status-table-header {
      border-left-color: #a78bfa;
      background: rgba(76, 29, 149, .14);
    }

    .rawCard.vendor-watchguard-status.status-metric {
      border-left-color: #eab308;
    }

    .rawCard.vendor-watchguard-status.status-report .rawText,
    .rawCard.vendor-watchguard-status.status-section .rawText {
      padding-top: 7px;
      padding-bottom: 7px;
      font-size: 12px;
    }

    mark.wgs-report,
    mark.wgs-section,
    mark.wgs-table-header {
      background: transparent;
      padding: 0;
      border-radius: 0;
      font-weight: 900;
    }

    mark.wgs-report {
      color: #7dd3fc;
      letter-spacing: .015em;
    }

    mark.wgs-section {
      color: #67e8f9;
      text-transform: uppercase;
      letter-spacing: .055em;
    }

    mark.wgs-table-header {
      color: #c4b5fd;
    }

    mark.wgs-key {
      color: #60a5fa;
      font-weight: 850;
    }

    mark.wgs-good {
      color: #4ade80;
      font-weight: 900;
    }

    mark.wgs-bad {
      color: #fb7185;
      font-weight: 900;
    }

    mark.wgs-warn {
      color: #fbbf24;
      font-weight: 900;
    }

    mark.wgs-ip {
      color: #34d399;
      font-weight: 850;
    }

    mark.wgs-mac {
      color: #22d3ee;
      font-weight: 850;
    }

    mark.wgs-interface {
      color: #c084fc;
      font-weight: 850;
    }

    mark.wgs-version {
      color: #fde047;
      font-weight: 850;
    }

    mark.wgs-command {
      color: #e2e8f0;
      font-weight: 750;
    }

    mark.wgs-number {
      color: #facc15;
      font-weight: 800;
    }

    mark.wgs-device {
      color: #38bdf8;
      font-weight: 900;
    }

    @media (max-width: 900px) {
      body.watchguard-status-mode .filterbar {
        grid-template-columns: 1fr !important;
      }
    }

  
    /* v53: chiarisce nel selettore il supporto WatchGuard Traffic Monitor + Status Report */
    #deviceType {
      width: 100%;
      min-width: 0;
      max-width: 100%;
    }

    .device-support-hint {
      display: flex;
      align-items: center;
      gap: 7px;
      margin-top: 7px;
      color: #475569;
      font-size: 11.5px;
      font-weight: 700;
      line-height: 1.3;
    }

    .device-support-hint[hidden] {
      display: none !important;
    }

    .device-support-hint .fa-icon {
      width: 13px;
      height: 13px;
      color: #2563eb;
      flex: 0 0 auto;
    }

    @media (max-width: 720px) {
      #deviceType {
        min-width: 0;
        width: 100%;
      }
    }

  
    /* v55: correzione geometria toolbar input */
    .toolbar {
      grid-template-columns: minmax(240px, 320px) minmax(0, 1fr) !important;
      align-items: start !important;
    }

    .toolbar > div {
      min-width: 0;
    }

    #deviceType {
      display: block;
      width: 100% !important;
      min-width: 0 !important;
      max-width: 100% !important;
    }

    .device-support-hint {
      width: 100%;
      max-width: 100%;
      min-width: 0;
      margin-top: 7px;
      padding: 0 3px;
      align-items: flex-start;
    }

    .device-support-hint span {
      min-width: 0;
      overflow-wrap: anywhere;
    }

    .uploadSafe,
    .uploadSafeBox {
      width: 100%;
      min-width: 0;
    }

    @media (max-width: 820px) {
      .toolbar {
        grid-template-columns: 1fr !important;
        align-items: stretch !important;
      }
    }

  
    /* v57: configurazioni Aruba Instant On e ArubaOS-CX */
    body.aruba-mode #categoryFilterGroup,
    body.aruba-mode #protoFilterGroup,
    body.aruba-mode #serviceFilterGroup {
      display: none !important;
    }

    body.aruba-mode .filterbar {
      grid-template-columns:
        minmax(180px, .9fr)
        minmax(220px, 1.1fr)
        minmax(180px, .9fr)
        minmax(360px, 1.8fr) !important;
    }

    .rawCard.vendor-aruba-config {
      border-left-color: #64748b;
    }

    .rawCard.vendor-aruba-config.status-header,
    .rawCard.vendor-aruba-config.status-context {
      border-left-color: #38bdf8;
      background: linear-gradient(90deg, rgba(14, 116, 144, .22), #050608 34%);
    }

    .rawCard.vendor-aruba-config.status-enabled {
      border-left-color: #22c55e;
      background: linear-gradient(90deg, rgba(22, 163, 74, .12), #050608 30%);
    }

    .rawCard.vendor-aruba-config.status-disabled {
      border-left-color: #ef4444;
      background: linear-gradient(90deg, rgba(220, 38, 38, .13), #050608 30%);
    }

    .rawCard.vendor-aruba-config.status-sensitive,
    .rawCard.vendor-aruba-config.status-key-material,
    .rawCard.vendor-aruba-config.status-certificate {
      border-left-color: #f97316;
      background: linear-gradient(90deg, rgba(194, 65, 12, .14), #050608 34%);
    }

    .rawCard.vendor-aruba-config.status-comment,
    .rawCard.vendor-aruba-config.status-separator,
    .rawCard.vendor-aruba-config.status-prompt,
    .rawCard.vendor-aruba-config.status-banner {
      border-left-color: #64748b;
    }

    mark.aruba-comment {
      color: #64748b;
      font-weight: 650;
    }

    mark.aruba-keyword {
      color: #60a5fa;
      font-weight: 900;
    }

    mark.aruba-subkeyword {
      color: #93c5fd;
      font-weight: 800;
    }

    mark.aruba-command {
      color: #e2e8f0;
      font-weight: 800;
    }

    mark.aruba-device {
      color: #22d3ee;
      font-weight: 900;
    }

    mark.aruba-prompt {
      color: #94a3b8;
      font-weight: 850;
    }

    mark.aruba-interface {
      color: #c084fc;
      font-weight: 900;
    }

    mark.aruba-vlan {
      color: #facc15;
      font-weight: 900;
    }

    mark.aruba-ip {
      color: #34d399;
      font-weight: 900;
    }

    mark.aruba-mac {
      color: #2dd4bf;
      font-weight: 900;
    }

    mark.aruba-protocol {
      color: #fb923c;
      font-weight: 850;
    }

    mark.aruba-version {
      color: #fde047;
      font-weight: 900;
    }

    mark.aruba-string,
    mark.aruba-banner {
      color: #cbd5e1;
      font-weight: 700;
    }

    mark.aruba-enabled {
      color: #4ade80;
      font-weight: 900;
    }

    mark.aruba-disabled {
      color: #fb7185;
      font-weight: 900;
    }

    mark.aruba-sensitive-keyword,
    mark.aruba-sensitive-line,
    mark.aruba-secret-boundary {
      color: #fb7185;
      font-weight: 900;
    }

    mark.aruba-secret {
      color: #fda4af;
      font-weight: 650;
    }

    mark.aruba-certificate-boundary {
      color: #fdba74;
      font-weight: 900;
    }

    mark.aruba-certificate {
      color: #fed7aa;
      font-weight: 650;
    }

    @media (max-width: 1100px) {
      body.aruba-mode .filterbar {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
      }
    }

    @media (max-width: 720px) {
      body.aruba-mode .filterbar {
        grid-template-columns: 1fr !important;
      }
    }

  
    /* v59: configurazioni XML WatchGuard */
    body.watchguard-config-mode #categoryFilterGroup,
    body.watchguard-config-mode #protoFilterGroup,
    body.watchguard-config-mode #serviceFilterGroup {
      display: none !important;
    }

    body.watchguard-config-mode .filterbar {
      grid-template-columns:
        minmax(210px, .9fr)
        minmax(260px, 1.2fr)
        minmax(210px, .9fr)
        minmax(380px, 1.8fr) !important;
    }

    .rawCard.vendor-watchguard-config {
      border-left-color: #64748b;
    }

    .rawCard.vendor-watchguard-config.status-section,
    .rawCard.vendor-watchguard-config.status-summary,
    .rawCard.vendor-watchguard-config.status-interface,
    .rawCard.vendor-watchguard-config.status-nat,
    .rawCard.vendor-watchguard-config.status-policy-proxy,
    .rawCard.vendor-watchguard-config.status-proxy,
    .rawCard.vendor-watchguard-config.status-vpn,
    .rawCard.vendor-watchguard-config.status-auth {
      border-left-color: #22d3ee;
      background: linear-gradient(90deg, rgba(8, 145, 178, .17), #050608 34%);
    }

    .rawCard.vendor-watchguard-config.status-enabled,
    .rawCard.vendor-watchguard-config.status-policy-allow {
      border-left-color: #22c55e;
      background: linear-gradient(90deg, rgba(22, 163, 74, .12), #050608 30%);
    }

    .rawCard.vendor-watchguard-config.status-disabled,
    .rawCard.vendor-watchguard-config.status-policy-deny,
    .rawCard.vendor-watchguard-config.status-policy-disabled {
      border-left-color: #ef4444;
      background: linear-gradient(90deg, rgba(220, 38, 38, .13), #050608 30%);
    }

    .rawCard.vendor-watchguard-config.status-sensitive {
      border-left-color: #f97316;
      background: linear-gradient(90deg, rgba(194, 65, 12, .15), #050608 34%);
    }

    .rawCard.vendor-watchguard-config.status-builtin,
    .rawCard.vendor-watchguard-config.status-metadata,
    .rawCard.vendor-watchguard-config.status-revision {
      border-left-color: #64748b;
      opacity: .9;
    }

    mark.wgcfg-label,
    mark.wgcfg-keyword {
      color: #67e8f9;
      font-weight: 900;
    }

    mark.wgcfg-key {
      color: #60a5fa;
      font-weight: 850;
    }

    mark.wgcfg-value {
      color: #e2e8f0;
      font-weight: 750;
    }

    mark.wgcfg-ip {
      color: #34d399;
      font-weight: 900;
    }

    mark.wgcfg-mac {
      color: #2dd4bf;
      font-weight: 900;
    }

    mark.wgcfg-good {
      color: #4ade80;
      font-weight: 900;
    }

    mark.wgcfg-bad {
      color: #fb7185;
      font-weight: 900;
    }

    mark.wgcfg-proxy {
      color: #c084fc;
      font-weight: 900;
    }

    mark.wgcfg-protocol {
      color: #fb923c;
      font-weight: 850;
    }

    mark.wgcfg-number {
      color: #facc15;
      font-weight: 850;
    }

    mark.wgcfg-secret {
      color: #fda4af;
      font-weight: 900;
    }

    @media (max-width: 1180px) {
      body.watchguard-config-mode .filterbar {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
      }
    }

    @media (max-width: 720px) {
      body.watchguard-config-mode .filterbar {
        grid-template-columns: 1fr !important;
      }
    }

  
    /* v61: vista strutturata configurazioni WatchGuard */
    .config-view-toggle {
      display: inline-flex;
      align-items: center;
      padding: 3px;
      gap: 3px;
      border: 1px solid #dbe3ee;
      border-radius: 13px;
      background: #eef2f7;
    }

    .config-view-toggle[hidden] {
      display: none !important;
    }

    .config-view-toggle .config-view-btn {
      border-color: transparent !important;
      background: transparent !important;
      box-shadow: none !important;
    }

    .config-view-toggle .config-view-btn.is-active {
      background: #fff !important;
      color: #1d4ed8 !important;
      border-color: #cbd5e1 !important;
      box-shadow: 0 3px 10px rgba(15, 23, 42, .10) !important;
    }

    body.watchguard-config-mode .actionbar.bottom-actionbar {
      width: min(1100px, calc(100% - 32px)) !important;
    }

    body.watchguard-structured-view #clearSelectionBtn,
    body.watchguard-structured-view #copySelectedBtn {
      display: none !important;
    }

    body.watchguard-structured-view .outputShell {
      background: #f8fafc;
    }

    body.watchguard-structured-view .scrollOverlay {
      display: none !important;
    }

    .outputWrap.structured-config-output {
      height: clamp(720px, 82vh, 1080px) !important;
      padding: 0 !important;
      overflow: auto !important;
      white-space: normal !important;
      background:
        radial-gradient(circle at top right, rgba(37, 99, 235, .07), transparent 32%),
        #f8fafc !important;
      color: #0f172a !important;
      font-family: var(--sans, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif) !important;
    }

    .wg-structured-root {
      min-width: 780px;
      padding: 16px;
    }

    .config-tabs {
      position: sticky;
      top: 0;
      z-index: 30;
      display: flex;
      gap: 7px;
      padding: 8px;
      margin: -2px -2px 16px;
      overflow-x: auto;
      border: 1px solid #dbe3ee;
      border-radius: 15px;
      background: rgba(255, 255, 255, .96);
      box-shadow: 0 10px 28px rgba(15, 23, 42, .10);
      backdrop-filter: blur(14px);
    }

    .config-tab {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 7px;
      min-height: 38px;
      padding: 0 12px;
      border: 1px solid transparent;
      border-radius: 11px;
      background: transparent;
      color: #475569;
      font: inherit;
      font-size: 12px;
      font-weight: 850;
      white-space: nowrap;
      cursor: pointer;
    }

    .config-tab:hover {
      background: #f1f5f9;
      color: #1e293b;
    }

    .config-tab.is-active {
      border-color: #bfdbfe;
      background: #eff6ff;
      color: #1d4ed8;
    }

    .config-tab strong {
      display: inline-flex;
      min-width: 22px;
      height: 22px;
      align-items: center;
      justify-content: center;
      padding: 0 6px;
      border-radius: 999px;
      background: #e2e8f0;
      color: #475569;
      font-size: 10px;
    }

    .config-tab.is-active strong {
      background: #dbeafe;
      color: #1d4ed8;
    }

    .config-structured-content {
      min-height: 560px;
    }

    .config-device-hero {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      align-items: center;
      gap: 24px;
      padding: 22px;
      border: 1px solid #cfe0f4;
      border-radius: 18px;
      background:
        linear-gradient(135deg, rgba(239, 246, 255, .98), rgba(255, 255, 255, .98));
      box-shadow: 0 14px 34px rgba(15, 23, 42, .08);
    }

    .config-eyebrow {
      display: block;
      margin-bottom: 6px;
      color: #2563eb;
      font-size: 10px;
      font-weight: 950;
      letter-spacing: .14em;
      text-transform: uppercase;
    }

    .config-device-hero h3,
    .config-panel-heading h3 {
      margin: 0;
      color: #0f172a;
      font-size: 22px;
      line-height: 1.15;
    }

    .config-device-hero p {
      margin: 7px 0 0;
      color: #64748b;
      font-size: 13px;
    }

    .config-device-meta {
      display: flex;
      flex-wrap: wrap;
      justify-content: flex-end;
      gap: 9px;
      max-width: 560px;
    }

    .config-device-meta span {
      display: grid;
      gap: 2px;
      min-width: 120px;
      padding: 9px 11px;
      border: 1px solid #dbe3ee;
      border-radius: 11px;
      background: #fff;
      color: #334155;
      font-size: 11px;
    }

    .config-device-meta strong {
      color: #64748b;
      font-size: 9px;
      letter-spacing: .09em;
      text-transform: uppercase;
    }

    .config-filter-notice {
      display: flex;
      align-items: center;
      gap: 9px;
      margin-top: 12px;
      padding: 10px 13px;
      border: 1px solid #bfdbfe;
      border-radius: 12px;
      background: #eff6ff;
      color: #1e40af;
      font-size: 12px;
      font-weight: 750;
    }

    .config-summary-grid {
      display: grid;
      grid-template-columns: repeat(4, minmax(150px, 1fr));
      gap: 12px;
      margin-top: 14px;
    }

    .config-summary-card {
      display: grid;
      grid-template-columns: auto 1fr;
      grid-template-rows: auto auto auto;
      align-items: center;
      gap: 2px 9px;
      min-height: 118px;
      padding: 14px;
      border: 1px solid #dbe3ee;
      border-radius: 16px;
      background: #fff;
      color: #0f172a;
      text-align: left;
      cursor: pointer;
      box-shadow: 0 8px 20px rgba(15, 23, 42, .055);
      transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
    }

    .config-summary-card:hover {
      transform: translateY(-2px);
      border-color: #93c5fd;
      box-shadow: 0 14px 28px rgba(15, 23, 42, .10);
    }

    .config-summary-card .fa-icon {
      grid-row: 1 / 4;
      width: 24px;
      height: 24px;
      color: #2563eb;
    }

    .config-summary-value {
      color: #0f172a;
      font-size: 24px;
      font-weight: 950;
      line-height: 1;
    }

    .config-summary-card strong {
      font-size: 12px;
    }

    .config-summary-card small {
      color: #64748b;
      font-size: 10px;
      line-height: 1.25;
    }

    .config-overview-panel {
      margin-top: 14px;
      padding: 18px;
      border: 1px solid #dbe3ee;
      border-radius: 17px;
      background: #fff;
      box-shadow: 0 8px 22px rgba(15, 23, 42, .055);
    }

    .config-panel-heading {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 15px;
      margin-bottom: 14px;
    }

    .config-panel-heading h3 {
      font-size: 18px;
    }

    .config-diagnostic-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 10px;
    }

    .config-diagnostic-card {
      display: grid;
      grid-template-columns: 42px minmax(0, 1fr);
      align-items: center;
      gap: 11px;
      min-height: 82px;
      padding: 12px;
      border: 1px solid #e2e8f0;
      border-left-width: 4px;
      border-radius: 13px;
      background: #f8fafc;
      color: #0f172a;
      text-align: left;
      cursor: pointer;
    }

    .config-diagnostic-card.danger { border-left-color: #ef4444; }
    .config-diagnostic-card.warning { border-left-color: #f59e0b; }
    .config-diagnostic-card.info { border-left-color: #3b82f6; }
    .config-diagnostic-card.secure { border-left-color: #8b5cf6; }

    .config-diagnostic-count {
      display: inline-flex;
      width: 38px;
      height: 38px;
      align-items: center;
      justify-content: center;
      border-radius: 11px;
      background: #fff;
      color: #0f172a;
      font-size: 16px;
      font-weight: 950;
      box-shadow: 0 4px 12px rgba(15, 23, 42, .08);
    }

    .config-diagnostic-card strong {
      display: block;
      font-size: 12px;
    }

    .config-diagnostic-card small {
      display: block;
      margin-top: 3px;
      color: #64748b;
      font-size: 10px;
      line-height: 1.3;
    }

    .config-disclaimer {
      margin: 12px 0 0;
      color: #64748b;
      font-size: 11px;
      line-height: 1.4;
    }

    .config-table-wrap {
      overflow: auto;
      border: 1px solid #dbe3ee;
      border-radius: 15px;
      background: #fff;
      box-shadow: 0 10px 26px rgba(15, 23, 42, .065);
    }

    .config-table {
      width: 100%;
      min-width: 960px;
      border-collapse: separate;
      border-spacing: 0;
      color: #0f172a;
      font-size: 11px;
    }

    .config-table thead {
      position: sticky;
      top: 0;
      z-index: 10;
    }

    .config-table th {
      padding: 11px 10px;
      border-bottom: 1px solid #cbd5e1;
      background: #eef2f7;
      color: #475569;
      font-size: 9.5px;
      font-weight: 950;
      letter-spacing: .08em;
      text-align: left;
      text-transform: uppercase;
      white-space: nowrap;
    }

    .config-table td {
      max-width: 300px;
      padding: 10px;
      border-bottom: 1px solid #edf1f5;
      vertical-align: top;
      line-height: 1.35;
    }

    .config-table td strong {
      display: block;
      font-size: 11.5px;
      overflow-wrap: anywhere;
    }

    .config-table td small {
      display: block;
      margin-top: 3px;
      color: #64748b;
      line-height: 1.3;
    }

    .config-data-row {
      cursor: pointer;
      outline: none;
      transition: background .12s ease;
    }

    .config-data-row:hover,
    .config-data-row:focus {
      background: #eff6ff;
    }

    .config-data-row:last-child td {
      border-bottom: 0;
    }

    .config-status-badge {
      display: inline-flex;
      min-height: 24px;
      align-items: center;
      padding: 0 8px;
      border: 1px solid #cbd5e1;
      border-radius: 999px;
      background: #f8fafc;
      color: #475569;
      font-size: 9.5px;
      font-weight: 900;
      white-space: nowrap;
    }

    .config-status-badge.good {
      border-color: #bbf7d0;
      background: #f0fdf4;
      color: #15803d;
    }

    .config-status-badge.bad {
      border-color: #fecdd3;
      background: #fff1f2;
      color: #be123c;
    }

    .config-status-badge.proxy {
      border-color: #ddd6fe;
      background: #f5f3ff;
      color: #6d28d9;
    }

    .config-status-badge.warn {
      border-color: #fde68a;
      background: #fffbeb;
      color: #a16207;
    }

    .config-list-summary {
      display: flex;
      flex-wrap: wrap;
      gap: 4px;
    }

    .config-list-summary > span,
    .config-detail-chip-list > span,
    .config-diagnostic-items > span {
      display: inline-flex;
      max-width: 210px;
      padding: 3px 6px;
      border-radius: 7px;
      background: #f1f5f9;
      color: #334155;
      font-size: 9.5px;
      font-weight: 750;
      overflow-wrap: anywhere;
    }

    .config-list-summary .config-more {
      background: #dbeafe;
      color: #1d4ed8;
    }

    .config-code {
      font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
      color: #334155;
      overflow-wrap: anywhere;
    }

    .config-ip {
      color: #047857;
      font-weight: 800;
    }

    .config-muted {
      color: #94a3b8;
    }

    .config-summary-text {
      display: block;
      max-width: 720px;
      color: #475569;
      overflow-wrap: anywhere;
    }

    .config-empty {
      display: grid;
      place-items: center;
      gap: 5px;
      min-height: 260px;
      padding: 30px;
      border: 1px dashed #cbd5e1;
      border-radius: 15px;
      background: rgba(255, 255, 255, .75);
      color: #64748b;
      text-align: center;
    }

    .config-empty.compact {
      min-height: 100px;
    }

    .config-empty strong {
      color: #334155;
    }

    .config-diagnostics-list {
      display: grid;
      gap: 10px;
    }

    .config-diagnostic-row {
      display: grid;
      grid-template-columns: 52px minmax(0, 1fr);
      gap: 14px;
      padding: 15px;
      border: 1px solid #dbe3ee;
      border-left-width: 5px;
      border-radius: 14px;
      background: #fff;
    }

    .config-diagnostic-row.ok { border-left-color: #22c55e; }
    .config-diagnostic-row.warning { border-left-color: #f59e0b; }
    .config-diagnostic-row.danger { border-left-color: #ef4444; }
    .config-diagnostic-row.info { border-left-color: #3b82f6; }
    .config-diagnostic-row.secure { border-left-color: #8b5cf6; }

    .config-diagnostic-icon {
      display: inline-flex;
      width: 46px;
      height: 46px;
      align-items: center;
      justify-content: center;
      border-radius: 13px;
      background: #f1f5f9;
      font-size: 17px;
      font-weight: 950;
    }

    .config-diagnostic-row h4 {
      margin: 0;
      font-size: 13px;
    }

    .config-diagnostic-row p {
      margin: 4px 0 8px;
      color: #64748b;
      font-size: 11px;
    }

    .config-diagnostic-items {
      display: flex;
      flex-wrap: wrap;
      gap: 5px;
    }

    .config-detail-drawer[hidden] {
      display: none !important;
    }

    .config-detail-drawer {
      position: fixed;
      inset: 0;
      z-index: 400;
    }

    .config-detail-backdrop {
      position: absolute;
      inset: 0;
      background: rgba(15, 23, 42, .34);
      backdrop-filter: blur(2px);
    }

    .config-detail-panel {
      position: absolute;
      top: 14px;
      right: 14px;
      bottom: 14px;
      display: grid;
      grid-template-rows: auto 1fr auto;
      width: min(520px, calc(100% - 28px));
      overflow: hidden;
      border: 1px solid #cbd5e1;
      border-radius: 20px;
      background: #fff;
      box-shadow: 0 28px 80px rgba(15, 23, 42, .28);
    }

    .config-detail-header {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 14px;
      padding: 18px;
      border-bottom: 1px solid #e2e8f0;
      background: #f8fafc;
    }

    .config-detail-header h3 {
      margin: 0;
      color: #0f172a;
      font-size: 19px;
      overflow-wrap: anywhere;
    }

    .config-detail-close {
      display: inline-flex;
      width: 36px;
      height: 36px;
      align-items: center;
      justify-content: center;
      border: 1px solid #cbd5e1;
      border-radius: 11px;
      background: #fff;
      color: #475569;
      font-size: 24px;
      cursor: pointer;
    }

    .config-detail-body {
      overflow: auto;
      padding: 14px 18px;
    }

    .config-detail-row {
      display: grid;
      grid-template-columns: 145px minmax(0, 1fr);
      gap: 12px;
      padding: 10px 0;
      border-bottom: 1px solid #edf1f5;
      color: #334155;
      font-size: 11.5px;
    }

    .config-detail-row > strong {
      color: #64748b;
      font-size: 9.5px;
      letter-spacing: .07em;
      text-transform: uppercase;
    }

    .config-detail-chip-list {
      display: flex;
      flex-wrap: wrap;
      gap: 5px;
    }

    .config-detail-footer {
      display: flex;
      justify-content: flex-end;
      padding: 12px 18px;
      border-top: 1px solid #e2e8f0;
      background: #f8fafc;
    }

    body.config-detail-open {
      overflow: hidden;
    }

    @media (max-width: 1320px) {
      .config-summary-grid {
        grid-template-columns: repeat(3, minmax(150px, 1fr));
      }
    }

    @media (max-width: 980px) {
      .config-device-hero {
        grid-template-columns: 1fr;
      }

      .config-device-meta {
        justify-content: flex-start;
      }

      .config-diagnostic-grid {
        grid-template-columns: 1fr 1fr;
      }

      body.watchguard-config-mode .actionbar.bottom-actionbar {
        width: min(920px, calc(100% - 24px)) !important;
      }
    }

    @media (max-width: 720px) {
      .wg-structured-root {
        min-width: 680px;
        padding: 10px;
      }

      .config-summary-grid {
        grid-template-columns: repeat(2, minmax(150px, 1fr));
      }

      .config-diagnostic-grid {
        grid-template-columns: 1fr;
      }

      .config-detail-row {
        grid-template-columns: 1fr;
        gap: 4px;
      }
    }

  
    /* v63: policy WatchGuard ordinate e dettagliate */
    .policy-table-wrap {
      max-height: calc(82vh - 160px);
    }

    .policy-config-table {
      min-width: 1580px;
    }

    .policy-config-table th {
      padding: 0;
    }

    .config-sort-button {
      display: flex;
      width: 100%;
      min-height: 42px;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      padding: 9px 10px;
      border: 0;
      background: transparent;
      color: inherit;
      font: inherit;
      font-size: 9.5px;
      font-weight: 950;
      letter-spacing: .08em;
      text-align: left;
      text-transform: uppercase;
      white-space: nowrap;
      cursor: pointer;
    }

    .config-sort-button:hover {
      background: #dbeafe;
      color: #1d4ed8;
    }

    .config-sort-button.is-active {
      background: #e0ecff;
      color: #1d4ed8;
    }

    .config-sort-button strong {
      color: #94a3b8;
      font-size: 10px;
      line-height: 1;
    }

    .config-sort-button.is-active strong {
      color: #2563eb;
    }

    .policy-config-table td:nth-child(1),
    .policy-config-table th:nth-child(1) {
      width: 66px;
      min-width: 66px;
      text-align: center;
    }

    .policy-config-table td:nth-child(2),
    .policy-config-table th:nth-child(2) {
      width: 130px;
      min-width: 130px;
    }

    .policy-config-table td:nth-child(3),
    .policy-config-table th:nth-child(3) {
      min-width: 250px;
    }

    .policy-config-table td:nth-child(4),
    .policy-config-table th:nth-child(4) {
      min-width: 170px;
    }

    .policy-config-table td:nth-child(5),
    .policy-config-table td:nth-child(6),
    .policy-config-table th:nth-child(5),
    .policy-config-table th:nth-child(6) {
      min-width: 210px;
    }

    .policy-config-table td:nth-child(7),
    .policy-config-table th:nth-child(7) {
      min-width: 130px;
    }

    .policy-order {
      display: inline-flex;
      min-width: 32px;
      height: 28px;
      align-items: center;
      justify-content: center;
      border: 1px solid #cbd5e1;
      border-radius: 9px;
      background: #f8fafc;
      color: #334155;
      font-weight: 950;
    }

    .policy-action-cell {
      display: flex;
      align-items: center;
      gap: 7px;
    }

    .policy-enabled-icon {
      display: inline-flex;
      width: 24px;
      height: 24px;
      flex: 0 0 auto;
      align-items: center;
      justify-content: center;
      border-radius: 7px;
      font-size: 15px;
      font-weight: 950;
    }

    .policy-enabled-icon.enabled {
      border: 1px solid #bbf7d0;
      background: #f0fdf4;
      color: #15803d;
    }

    .policy-enabled-icon.disabled {
      border: 1px solid #fecdd3;
      background: #fff1f2;
      color: #be123c;
    }

    .policy-port {
      color: #047857;
      font-weight: 850;
    }

    .policy-detail-topline {
      display: flex;
      align-items: center;
      gap: 11px;
      margin: -2px -2px 12px;
      padding: 12px;
      border: 1px solid #dbe3ee;
      border-radius: 13px;
      background: #f8fafc;
    }

    .policy-detail-topline > div {
      display: grid;
      gap: 2px;
      min-width: 0;
    }

    .policy-detail-topline strong {
      color: #0f172a;
      font-size: 13px;
      overflow-wrap: anywhere;
    }

    .policy-detail-topline span {
      color: #64748b;
      font-size: 10.5px;
    }

    .policy-detail-tabs {
      position: sticky;
      top: -14px;
      z-index: 5;
      display: flex;
      gap: 5px;
      margin: 0 -2px 12px;
      padding: 6px;
      border: 1px solid #dbe3ee;
      border-radius: 12px;
      background: rgba(255, 255, 255, .97);
      backdrop-filter: blur(10px);
    }

    .policy-detail-tab {
      flex: 1 1 0;
      min-height: 34px;
      border: 1px solid transparent;
      border-radius: 9px;
      background: transparent;
      color: #64748b;
      font-size: 11px;
      font-weight: 850;
      cursor: pointer;
    }

    .policy-detail-tab:hover {
      background: #f1f5f9;
      color: #334155;
    }

    .policy-detail-tab.is-active {
      border-color: #bfdbfe;
      background: #eff6ff;
      color: #1d4ed8;
    }

    .policy-detail-content {
      display: grid;
      gap: 0;
    }

    .policy-detail-header-grid,
    .policy-detail-address-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px;
    }

    .policy-detail-header-grid > span,
    .policy-detail-address-grid > article {
      display: grid;
      gap: 6px;
      padding: 11px;
      border: 1px solid #dbe3ee;
      border-radius: 11px;
      background: #f8fafc;
      color: #334155;
      font-size: 11px;
    }

    .policy-detail-header-grid strong,
    .policy-detail-address-grid strong {
      color: #64748b;
      font-size: 9px;
      letter-spacing: .08em;
      text-transform: uppercase;
    }

    .policy-detail-object-list {
      display: flex;
      flex-wrap: wrap;
      gap: 5px;
    }

    .policy-detail-object-list > span {
      display: inline-flex;
      max-width: 100%;
      padding: 5px 7px;
      border-radius: 8px;
      background: #eef2f7;
      color: #334155;
      font-size: 10px;
      font-weight: 750;
      overflow-wrap: anywhere;
    }

    .policy-detail-description {
      min-height: 58px;
      padding: 11px;
      border: 1px solid #dbe3ee;
      border-radius: 11px;
      background: #f8fafc;
      color: #334155;
      font-size: 11px;
      line-height: 1.45;
    }

    @media (max-width: 720px) {
      .policy-detail-header-grid,
      .policy-detail-address-grid {
        grid-template-columns: 1fr;
      }
    }

  
    /* v64: colori e icone Policy Manager */
    .policy-action-icons {
      display: flex;
      align-items: center;
      gap: 5px;
      min-width: 112px;
    }

    .policy-state-icon,
    .policy-main-icon,
    .policy-feature-icon {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      flex: 0 0 auto;
      border-radius: 6px;
    }

    .policy-state-icon {
      width: 20px;
      height: 20px;
      background: transparent;
    }

    .policy-state-icon .fa-icon {
      width: 13px;
      height: 13px;
    }

    .policy-state-icon.enabled {
      color: #15803d;
    }

    .policy-state-icon.disabled {
      color: #dc2626;
    }

    .policy-main-icon {
      width: 25px;
      height: 25px;
      border: 1px solid currentColor;
      background: #fff;
    }

    .policy-main-icon .fa-icon {
      width: 14px;
      height: 14px;
    }

    .policy-main-icon.packet-allowed {
      border-color: #93c5fd;
      background: #eff6ff;
      color: #2563eb;
    }

    .policy-main-icon.proxy-allowed {
      border-color: #86efac;
      background: #f0fdf4;
      color: #16a34a;
    }

    .policy-main-icon.denied {
      border-color: #fda4af;
      background: #fff1f2;
      color: #dc2626;
    }

    .policy-main-icon.disabled {
      border-color: #cbd5e1;
      background: #f1f5f9;
      color: #64748b;
    }

    .policy-feature-icon-list {
      display: inline-flex;
      align-items: center;
      gap: 3px;
      flex-wrap: wrap;
    }

    .policy-feature-icon {
      width: 19px;
      height: 19px;
      border: 1px solid #cbd5e1;
      background: #fff;
      color: #64748b;
    }

    .policy-feature-icon .fa-icon {
      width: 10px;
      height: 10px;
    }

    .policy-feature-icon.app-control {
      border-color: #fdba74;
      background: #fff7ed;
      color: #ea580c;
    }

    .policy-feature-icon.geolocation {
      border-color: #c4b5fd;
      background: #f5f3ff;
      color: #7c3aed;
    }

    .policy-feature-icon.traffic-management {
      border-color: #67e8f9;
      background: #ecfeff;
      color: #0891b2;
    }

    .policy-feature-icon.schedule {
      border-color: #fde68a;
      background: #fffbeb;
      color: #a16207;
    }

    .policy-feature-icon.logging {
      border-color: #93c5fd;
      background: #eff6ff;
      color: #2563eb;
    }

    .policy-feature-icon.notification {
      border-color: #f9a8d4;
      background: #fdf2f8;
      color: #be185d;
    }

    .policy-icon-legend {
      margin-bottom: 10px;
      border: 1px solid #dbe3ee;
      border-radius: 12px;
      background: #fff;
    }

    .policy-icon-legend summary {
      display: flex;
      align-items: center;
      gap: 8px;
      min-height: 38px;
      padding: 0 12px;
      color: #475569;
      font-size: 11px;
      font-weight: 850;
      cursor: pointer;
      list-style: none;
    }

    .policy-icon-legend summary::-webkit-details-marker {
      display: none;
    }

    .policy-icon-legend summary .fa-icon {
      width: 13px;
      height: 13px;
      color: #2563eb;
    }

    .policy-icon-legend-grid {
      display: grid;
      grid-template-columns: repeat(5, minmax(150px, 1fr));
      gap: 7px;
      padding: 10px 12px 12px;
      border-top: 1px solid #edf1f5;
    }

    .policy-icon-legend-grid > span {
      display: flex;
      align-items: center;
      gap: 7px;
      color: #475569;
      font-size: 10px;
    }

    .policy-icon-legend-grid i {
      font-style: normal;
    }

    .policy-config-table .policy-tone-green td:nth-child(n+3):nth-child(-n+7) {
      color: #139b32;
    }

    .policy-config-table .policy-tone-violet td:nth-child(n+3):nth-child(-n+7) {
      color: #6366f1;
    }

    .policy-config-table .policy-tone-system td:nth-child(n+3):nth-child(-n+7),
    .policy-config-table .policy-tone-neutral td:nth-child(n+3):nth-child(-n+7) {
      color: #111827;
    }

    .policy-config-table .policy-tone-green td:nth-child(n+3):nth-child(-n+7) .config-code,
    .policy-config-table .policy-tone-green td:nth-child(n+3):nth-child(-n+7) .config-list-summary > span {
      color: #139b32;
    }

    .policy-config-table .policy-tone-violet td:nth-child(n+3):nth-child(-n+7) .config-code,
    .policy-config-table .policy-tone-violet td:nth-child(n+3):nth-child(-n+7) .config-list-summary > span {
      color: #6366f1;
    }

    .policy-config-table .policy-tone-system td:nth-child(n+3):nth-child(-n+7) .config-code,
    .policy-config-table .policy-tone-system td:nth-child(n+3):nth-child(-n+7) .config-list-summary > span,
    .policy-config-table .policy-tone-neutral td:nth-child(n+3):nth-child(-n+7) .config-code,
    .policy-config-table .policy-tone-neutral td:nth-child(n+3):nth-child(-n+7) .config-list-summary > span {
      color: #111827;
    }

    .policy-config-table .config-list-summary > span {
      border: 0;
      background: transparent;
      padding: 0;
      font-size: inherit;
      font-weight: inherit;
    }

    .policy-config-table .config-list-summary .config-more {
      padding: 2px 5px;
      border-radius: 6px;
      background: #e2e8f0;
      color: #475569 !important;
      font-size: 9px;
      font-weight: 850;
    }

    @media (max-width: 1100px) {
      .policy-icon-legend-grid {
        grid-template-columns: repeat(3, minmax(150px, 1fr));
      }
    }

  
    /* v65: tavolozza Policy Manager basata sulla schermata di riferimento */
    .policy-config-table .policy-tone-black {
      --wg-policy-color: #111111;
    }

    .policy-config-table .policy-tone-green {
      --wg-policy-color: #109b2f;
    }

    .policy-config-table .policy-tone-blue {
      --wg-policy-color: #4b63df;
    }

    .policy-config-table .policy-tone-orange {
      --wg-policy-color: #b06b00;
    }

    .policy-config-table .policy-tone-red {
      --wg-policy-color: #d81818;
    }

    .policy-config-table .policy-tone-magenta {
      --wg-policy-color: #b018b0;
    }

    .policy-config-table tr[class*="policy-tone-"] td:nth-child(n+3):nth-child(-n+7),
    .policy-config-table tr[class*="policy-tone-"] td:nth-child(n+3):nth-child(-n+7) strong,
    .policy-config-table tr[class*="policy-tone-"] td:nth-child(n+3):nth-child(-n+7) small,
    .policy-config-table tr[class*="policy-tone-"] td:nth-child(n+3):nth-child(-n+7) .config-code,
    .policy-config-table tr[class*="policy-tone-"] td:nth-child(n+3):nth-child(-n+7) .config-list-summary > span {
      color: var(--wg-policy-color, #111111) !important;
    }

    .policy-config-table .policy-tone-black td:nth-child(n+3):nth-child(-n+7) {
      font-weight: 500;
    }

    .policy-color-legend {
      display: grid;
      grid-template-columns: repeat(3, minmax(190px, 1fr));
      gap: 7px 14px;
      padding: 10px 12px 12px;
      border-top: 1px solid #edf1f5;
      color: #475569;
      font-size: 10px;
    }

    .policy-color-legend > span {
      display: flex;
      align-items: center;
      gap: 7px;
      min-width: 0;
    }

    .policy-color-swatch {
      display: inline-block;
      width: 18px;
      height: 5px;
      flex: 0 0 auto;
      border-radius: 999px;
      background: #111111;
    }

    .policy-color-swatch.black { background: #111111; }
    .policy-color-swatch.green { background: #109b2f; }
    .policy-color-swatch.blue { background: #4b63df; }
    .policy-color-swatch.orange { background: #b06b00; }
    .policy-color-swatch.red { background: #d81818; }
    .policy-color-swatch.magenta { background: #b018b0; }

    @media (max-width: 900px) {
      .policy-color-legend {
        grid-template-columns: repeat(2, minmax(180px, 1fr));
      }
    }

  
    /* v66: icone rappresentative nelle sezioni e nei dettagli */
    .config-heading-with-icon {
      display: grid !important;
      grid-template-columns: 42px minmax(0, 1fr);
      align-items: center !important;
      justify-content: initial !important;
      gap: 11px !important;
      margin-bottom: 12px;
      padding: 10px 12px;
      border: 1px solid #dbe3ee;
      border-radius: 13px;
      background: linear-gradient(135deg, #ffffff, #f8fafc);
    }

    .config-heading-with-icon > div {
      min-width: 0;
    }

    .config-heading-with-icon h3 {
      margin: 0;
    }

    .config-heading-with-icon p {
      margin: 4px 0 0;
      color: #64748b;
      font-size: 10.5px;
      line-height: 1.35;
    }

    .config-section-icon,
    .config-entity-icon,
    .config-detail-section-icon,
    .config-detail-label-icon,
    .config-drawer-title-icon {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      flex: 0 0 auto;
    }

    .config-section-icon {
      width: 38px;
      height: 38px;
      border: 1px solid #bfdbfe;
      border-radius: 11px;
      background: #eff6ff;
      color: #2563eb;
    }

    .config-section-icon .fa-icon {
      width: 18px;
      height: 18px;
    }

    .config-entity-title {
      display: flex;
      align-items: flex-start;
      gap: 8px;
      min-width: 0;
    }

    .config-entity-icon {
      width: 28px;
      height: 28px;
      margin-top: 1px;
      border: 1px solid #cbd5e1;
      border-radius: 8px;
      background: #f8fafc;
      color: #475569;
    }

    .config-entity-icon .fa-icon {
      width: 13px;
      height: 13px;
    }

    .config-entity-icon.tone-blue,
    .config-icon-badge.tone-blue {
      border-color: #bfdbfe;
      background: #eff6ff;
      color: #2563eb;
    }

    .config-entity-icon.tone-green,
    .config-icon-badge.tone-green {
      border-color: #bbf7d0;
      background: #f0fdf4;
      color: #15803d;
    }

    .config-entity-icon.tone-violet,
    .config-icon-badge.tone-violet {
      border-color: #ddd6fe;
      background: #f5f3ff;
      color: #7c3aed;
    }

    .config-entity-icon.tone-orange,
    .config-icon-badge.tone-orange {
      border-color: #fed7aa;
      background: #fff7ed;
      color: #c2410c;
    }

    .config-entity-copy {
      display: block;
      min-width: 0;
    }

    .config-entity-copy strong,
    .config-entity-copy small {
      display: block;
      overflow-wrap: anywhere;
    }

    .config-icon-badge {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 3px 5px;
      border: 1px solid #dbe3ee;
      border-radius: 9px;
      background: #f8fafc;
    }

    .config-icon-badge > .fa-icon {
      width: 13px;
      height: 13px;
    }

    .config-detail-section-title {
      display: flex !important;
      align-items: center;
      gap: 8px;
    }

    .config-detail-section-icon {
      width: 27px;
      height: 27px;
      border: 1px solid #bfdbfe;
      border-radius: 8px;
      background: #eff6ff;
      color: #2563eb;
    }

    .config-detail-section-icon .fa-icon {
      width: 13px;
      height: 13px;
    }

    .config-detail-label {
      display: flex !important;
      align-items: center;
      gap: 7px;
    }

    .config-detail-label-icon {
      width: 24px;
      height: 24px;
      border: 1px solid #dbe3ee;
      border-radius: 7px;
      background: #f8fafc;
      color: #64748b;
    }

    .config-detail-label-icon .fa-icon {
      width: 11px;
      height: 11px;
    }

    #configDetailTitle {
      display: flex;
      align-items: center;
      gap: 9px;
    }

    .config-drawer-title-icon {
      width: 32px;
      height: 32px;
      border: 1px solid #bfdbfe;
      border-radius: 9px;
      background: #eff6ff;
      color: #2563eb;
    }

    .config-drawer-title-icon .fa-icon {
      width: 15px;
      height: 15px;
    }

    .policy-detail-tab {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
    }

    .policy-detail-tab .fa-icon {
      width: 12px;
      height: 12px;
    }

    .config-diagnostic-visual {
      display: inline-grid;
      grid-template-columns: auto auto;
      align-items: center;
      justify-content: center;
      gap: 4px;
      min-width: 38px;
      min-height: 38px;
    }

    .config-diagnostic-visual .fa-icon {
      width: 14px;
      height: 14px;
    }

    .config-diagnostic-visual b {
      font-size: 12px;
      line-height: 1;
    }

    .config-diagnostic-card.danger .config-diagnostic-visual,
    .config-diagnostic-row.danger .config-diagnostic-visual {
      color: #dc2626;
    }

    .config-diagnostic-card.warning .config-diagnostic-visual,
    .config-diagnostic-row.warning .config-diagnostic-visual {
      color: #d97706;
    }

    .config-diagnostic-card.info .config-diagnostic-visual,
    .config-diagnostic-row.info .config-diagnostic-visual {
      color: #2563eb;
    }

    .config-diagnostic-card.secure .config-diagnostic-visual,
    .config-diagnostic-row.secure .config-diagnostic-visual {
      color: #7c3aed;
    }

    .config-diagnostic-card.ok .config-diagnostic-visual,
    .config-diagnostic-row.ok .config-diagnostic-visual {
      color: #15803d;
    }

    .config-diagnostic-icon .config-diagnostic-visual {
      width: 46px;
      height: 46px;
    }

    @media (max-width: 720px) {
      .config-heading-with-icon {
        grid-template-columns: 36px minmax(0, 1fr);
        padding: 9px;
      }

      .config-section-icon {
        width: 34px;
        height: 34px;
      }
    }

  
    /* v67: contenuto risolto degli oggetti WatchGuard */
    .config-object-ref {
      display: inline-grid;
      grid-template-columns: minmax(0, 1fr);
      gap: 2px;
      max-width: 260px;
      padding: 5px 7px;
      border: 1px solid #cbd5e1;
      border-radius: 9px;
      background: #fff;
      color: #334155;
      font: inherit;
      text-align: left;
      cursor: pointer;
      box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
      transition: border-color .12s ease, background .12s ease, box-shadow .12s ease;
    }

    .config-object-ref:hover,
    .config-object-ref:focus-visible {
      border-color: #60a5fa;
      background: #eff6ff;
      outline: none;
      box-shadow: 0 5px 14px rgba(37, 99, 235, .12);
    }

    .config-object-ref-main {
      display: grid;
      grid-template-columns: 18px minmax(0, 1fr) 14px;
      align-items: center;
      gap: 5px;
      min-width: 0;
    }

    .config-object-ref-icon,
    .config-object-ref-open {
      display: inline-flex;
      align-items: center;
      justify-content: center;
    }

    .config-object-ref-icon {
      color: #2563eb;
    }

    .config-object-ref-open {
      color: #94a3b8;
      opacity: .75;
    }

    .config-object-ref-icon .fa-icon {
      width: 12px;
      height: 12px;
    }

    .config-object-ref-open .fa-icon {
      width: 10px;
      height: 10px;
    }

    .config-object-ref-name {
      min-width: 0;
      font-size: 10px;
      font-weight: 850;
      line-height: 1.15;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .config-object-ref-preview {
      display: flex;
      align-items: center;
      gap: 5px;
      min-width: 0;
      padding-left: 23px;
      color: #64748b;
      font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
      font-size: 8.8px;
      line-height: 1.25;
    }

    .config-object-ref-preview span {
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .config-object-ref-preview b {
      flex: 0 0 auto;
      padding: 1px 4px;
      border-radius: 999px;
      background: #dbeafe;
      color: #1d4ed8;
      font-family: inherit;
      font-size: 8px;
    }

    .config-object-ref.kind-host .config-object-ref-icon {
      color: #047857;
    }

    .config-object-ref.kind-subnet .config-object-ref-icon {
      color: #0f766e;
    }

    .config-object-ref.kind-fqdn .config-object-ref-icon,
    .config-object-ref.kind-dynamic .config-object-ref-icon {
      color: #7c3aed;
    }

    .config-object-ref.kind-range .config-object-ref-icon {
      color: #c2410c;
    }

    .config-object-ref.kind-interface .config-object-ref-icon {
      color: #2563eb;
    }

    .policy-config-table .config-list-summary {
      align-items: stretch;
    }

    .policy-config-table .config-object-ref {
      width: 100%;
      min-width: 145px;
      border-color: rgba(148, 163, 184, .45);
      background: rgba(255, 255, 255, .62);
      color: inherit;
    }

    .policy-config-table tr[class*="policy-tone-"] .config-object-ref-name {
      color: var(--wg-policy-color, #111111);
    }

    .policy-config-table tr[class*="policy-tone-"] .config-object-ref-preview {
      color: var(--wg-policy-color, #64748b);
      opacity: .78;
    }

    .policy-detail-object-list .config-object-ref,
    .config-detail-chip-list .config-object-ref {
      max-width: 100%;
      min-width: min(230px, 100%);
    }

    .config-plain-value {
      display: inline-flex;
      align-items: center;
      min-height: 23px;
      max-width: 230px;
      padding: 3px 6px;
      border-radius: 7px;
      background: #f1f5f9;
      color: inherit;
      overflow-wrap: anywhere;
    }

    .config-object-popover[hidden] {
      display: none !important;
    }

    .config-object-popover {
      position: fixed;
      z-index: 520;
      width: min(430px, calc(100vw - 20px));
      max-height: min(560px, calc(100vh - 20px));
      overflow: auto;
      padding: 12px;
      border: 1px solid #bfdbfe;
      border-radius: 15px;
      background: rgba(255, 255, 255, .98);
      color: #0f172a;
      box-shadow: 0 24px 70px rgba(15, 23, 42, .24);
      backdrop-filter: blur(14px);
    }

    .config-object-popover-header {
      display: flex;
      align-items: center;
      gap: 10px;
      padding-bottom: 10px;
      border-bottom: 1px solid #e2e8f0;
    }

    .config-object-popover-icon {
      display: inline-flex;
      width: 35px;
      height: 35px;
      flex: 0 0 auto;
      align-items: center;
      justify-content: center;
      border: 1px solid #bfdbfe;
      border-radius: 10px;
      background: #eff6ff;
      color: #2563eb;
    }

    .config-object-popover-icon .fa-icon {
      width: 16px;
      height: 16px;
    }

    .config-object-popover-header > span:last-child {
      display: grid;
      gap: 2px;
      min-width: 0;
    }

    .config-object-popover-header strong {
      font-size: 12px;
      overflow-wrap: anywhere;
    }

    .config-object-popover-header small {
      color: #64748b;
      font-size: 9.5px;
    }

    .config-object-popover-meta {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 6px;
      margin: 10px 0;
    }

    .config-object-popover-meta span {
      display: grid;
      gap: 1px;
      padding: 7px;
      border: 1px solid #e2e8f0;
      border-radius: 9px;
      background: #f8fafc;
      color: #64748b;
      font-size: 8.8px;
      text-align: center;
    }

    .config-object-popover-meta b {
      color: #0f172a;
      font-size: 14px;
    }

    .config-object-popover section {
      margin-top: 10px;
    }

    .config-object-popover h4 {
      margin: 0 0 6px;
      color: #475569;
      font-size: 9px;
      font-weight: 950;
      letter-spacing: .08em;
      text-transform: uppercase;
    }

    .config-object-value-list {
      display: grid;
      gap: 5px;
    }

    .config-object-value {
      display: grid;
      grid-template-columns: 26px minmax(0, 1fr);
      align-items: center;
      gap: 7px;
      padding: 6px 7px;
      border: 1px solid #e2e8f0;
      border-radius: 9px;
      background: #f8fafc;
    }

    .config-object-value > i {
      display: inline-flex;
      width: 25px;
      height: 25px;
      align-items: center;
      justify-content: center;
      border-radius: 7px;
      background: #fff;
      color: #2563eb;
      font-style: normal;
    }

    .config-object-value > i .fa-icon {
      width: 12px;
      height: 12px;
    }

    .config-object-value > span {
      display: grid;
      gap: 1px;
      min-width: 0;
    }

    .config-object-value strong {
      color: #64748b;
      font-size: 8.5px;
      letter-spacing: .05em;
      text-transform: uppercase;
    }

    .config-object-value small {
      color: #0f172a;
      font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
      font-size: 10px;
      overflow-wrap: anywhere;
    }

    .config-object-value.kind-host > i,
    .config-object-value.kind-subnet > i {
      color: #047857;
    }

    .config-object-value.kind-fqdn > i,
    .config-object-value.kind-dynamic > i {
      color: #7c3aed;
    }

    .config-object-value.kind-range > i {
      color: #c2410c;
    }

    .config-object-value-more {
      color: #64748b;
      font-size: 9px;
      text-align: right;
    }

    .config-object-nested-list {
      display: flex;
      flex-wrap: wrap;
      gap: 5px;
    }

    .config-object-nested-list > span {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      padding: 4px 6px;
      border-radius: 7px;
      background: #f1f5f9;
      color: #334155;
      font-size: 9px;
      overflow-wrap: anywhere;
    }

    .config-object-nested-list .fa-icon {
      width: 10px;
      height: 10px;
      color: #64748b;
    }

    .config-object-popover footer {
      display: flex;
      align-items: center;
      gap: 6px;
      margin-top: 11px;
      padding-top: 9px;
      border-top: 1px solid #e2e8f0;
      color: #2563eb;
      font-size: 9px;
      font-weight: 750;
    }

    .config-object-popover footer .fa-icon {
      width: 11px;
      height: 11px;
    }

    @media (max-width: 720px) {
      .config-object-ref {
        max-width: 210px;
      }

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

  
    /* v68: corrispondenza Alias → Address object → IP/Subnet/FQDN */
    .config-object-value > span em {
      display: block;
      margin-top: 2px;
      color: #64748b;
      font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
      font-size: 8px;
      font-style: normal;
      line-height: 1.25;
      overflow-wrap: anywhere;
    }

    .config-object-relation-list {
      display: grid;
      gap: 5px;
    }

    .config-object-relation {
      display: grid;
      grid-template-columns: 27px minmax(0, 1fr);
      align-items: center;
      gap: 7px;
      padding: 7px;
      border: 1px solid #bfdbfe;
      border-radius: 9px;
      background: #eff6ff;
    }

    .config-object-relation > i {
      display: inline-flex;
      width: 26px;
      height: 26px;
      align-items: center;
      justify-content: center;
      border-radius: 7px;
      background: #fff;
      color: #2563eb;
      font-style: normal;
    }

    .config-object-relation > i .fa-icon {
      width: 12px;
      height: 12px;
    }

    .config-object-relation > span {
      display: grid;
      gap: 2px;
      min-width: 0;
    }

    .config-object-relation strong {
      color: #1e3a8a;
      font-size: 9.5px;
      overflow-wrap: anywhere;
    }

    .config-object-relation small {
      color: #64748b;
      font-size: 8.5px;
      line-height: 1.3;
      overflow-wrap: anywhere;
    }

  
    /* v69: anteprima solo hover nelle policy e popover interattivo */
    .config-object-ref.no-preview {
      gap: 0;
      min-height: 31px;
      padding-top: 5px;
      padding-bottom: 5px;
    }

    .config-object-ref.no-preview .config-object-ref-main {
      grid-template-columns: 18px minmax(0, 1fr) 14px;
    }

    .policy-config-table .config-object-ref.no-preview {
      width: auto;
      min-width: 130px;
      max-width: 225px;
      background: transparent;
    }

    .policy-detail-object-list .config-object-ref.no-preview {
      width: auto;
      min-width: min(210px, 100%);
      background: #fff;
    }

    .config-object-popover {
      pointer-events: auto;
      overscroll-behavior: contain;
    }

    .config-object-popover footer {
      display: block;
    }

    .config-object-popover-open {
      display: flex;
      width: 100%;
      min-height: 36px;
      align-items: center;
      justify-content: center;
      gap: 7px;
      padding: 0 11px;
      border: 1px solid #bfdbfe;
      border-radius: 10px;
      background: #eff6ff;
      color: #1d4ed8;
      font: inherit;
      font-size: 10px;
      font-weight: 850;
      cursor: pointer;
      transition: background .12s ease, border-color .12s ease, transform .12s ease;
    }

    .config-object-popover-open:hover,
    .config-object-popover-open:focus-visible {
      border-color: #60a5fa;
      background: #dbeafe;
      outline: none;
    }

    .config-object-popover-open:active {
      transform: translateY(1px);
    }

    .config-object-popover-open .fa-icon {
      width: 12px;
      height: 12px;
    }

  
    /* v70: popup oggetti compatto e tipografia uniforme dei log */
    .config-detail-drawer,
    .config-detail-backdrop,
    .config-detail-panel {
      pointer-events: auto;
    }

    body.config-detail-open .config-object-popover {
      display: none !important;
      pointer-events: none !important;
    }

    .config-object-popover-meta.compact {
      grid-template-columns: repeat(2, minmax(0, 1fr));
      margin-bottom: 8px;
    }

    .config-object-map-section {
      margin-top: 8px !important;
    }

    .config-object-compact-map {
      display: grid;
      gap: 6px;
    }

    .config-object-map-row {
      display: grid;
      grid-template-columns: minmax(105px, .9fr) 22px minmax(130px, 1.25fr);
      align-items: center;
      gap: 6px;
      min-height: 42px;
      padding: 7px 8px;
      border: 1px solid #dbe3ee;
      border-radius: 10px;
      background: #f8fafc;
    }

    .config-object-map-object {
      min-width: 0;
      color: #1e3a8a;
      font-size: 9.5px;
      font-weight: 850;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .config-object-map-arrow {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      color: #2563eb;
    }

    .config-object-map-arrow .fa-icon {
      width: 11px;
      height: 11px;
    }

    .config-object-map-value {
      display: grid;
      grid-template-columns: 25px minmax(0, 1fr);
      align-items: center;
      gap: 7px;
      min-width: 0;
    }

    .config-object-map-value > i {
      display: inline-flex;
      width: 25px;
      height: 25px;
      align-items: center;
      justify-content: center;
      border-radius: 7px;
      background: #fff;
      color: #2563eb;
      font-style: normal;
      box-shadow: 0 1px 3px rgba(15, 23, 42, .08);
    }

    .config-object-map-value > i .fa-icon {
      width: 12px;
      height: 12px;
    }

    .config-object-map-value > span {
      display: grid;
      gap: 1px;
      min-width: 0;
    }

    .config-object-map-value strong {
      color: #0f172a;
      font-family: var(--mono);
      font-size: 10px;
      font-weight: 700;
      overflow-wrap: anywhere;
    }

    .config-object-map-value small {
      color: #64748b;
      font-size: 8.5px;
    }

    .config-object-map-row.kind-host .config-object-map-value > i,
    .config-object-map-row.kind-subnet .config-object-map-value > i {
      color: #047857;
    }

    .config-object-map-row.kind-fqdn .config-object-map-value > i,
    .config-object-map-row.kind-dynamic .config-object-map-value > i {
      color: #7c3aed;
    }

    .config-object-map-row.kind-range .config-object-map-value > i {
      color: #c2410c;
    }

    .config-object-map-more,
    .config-object-map-empty {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      min-height: 36px;
      padding: 7px;
      border: 1px dashed #cbd5e1;
      border-radius: 9px;
      color: #64748b;
      font-size: 9px;
    }

    .config-object-map-empty .fa-icon {
      width: 11px;
      height: 11px;
    }

    /* Tutte le viste raw condividono la stessa resa tipografica. */
    .outputWrap .rawCard .rawText {
      font-family: var(--mono) !important;
      font-size: 12px !important;
      line-height: 1.35 !important;
      font-weight: 400 !important;
      font-synthesis: none;
      text-rendering: optimizeLegibility;
      -webkit-font-smoothing: antialiased;
      -moz-osx-font-smoothing: grayscale;
    }

    .outputWrap .rawCard .rawText mark {
      font-family: inherit !important;
      font-size: inherit !important;
      line-height: inherit !important;
      font-weight: 600 !important;
      text-shadow: none !important;
      font-synthesis: none;
    }

    .outputWrap .rawCard.vendor-watchguard-status.status-report .rawText,
    .outputWrap .rawCard.vendor-watchguard-status.status-section .rawText {
      font-size: 12px !important;
    }

    @media (max-width: 720px) {
      .config-object-map-row {
        grid-template-columns: minmax(90px, .8fr) 18px minmax(120px, 1.2fr);
      }
    }

  
    /* ============================================================
       v71 — WatchGuard status strutturato, NAT semantico,
       finestre mobili e stampa dei singoli pannelli
       ============================================================ */

    /* La diagnostica automatica non fa più parte dell'interfaccia. */
    [data-config-tab="diagnostics"],
    [data-config-tab-jump="diagnostics"],
    .config-diagnostics-list,
    .config-diagnostic-grid {
      display: none !important;
    }

    /* Nessuna anteprima hover: gli oggetti si aprono con un clic. */
    .config-object-popover {
      display: none !important;
      pointer-events: none !important;
    }

    .config-object-ref {
      cursor: pointer;
    }

    .config-object-ref:hover,
    .config-object-ref:focus-visible {
      border-color: #60a5fa;
      background: #eff6ff;
      outline: none;
    }

    /* Il body non viene più bloccato dalle finestre di dettaglio. */
    body.config-detail-open {
      overflow: auto !important;
    }

    /* Intestazioni dei pannelli con stampa puntuale. */
    .config-panel-heading.v71-printable-heading,
    .config-heading-with-icon.v71-printable-heading {
      grid-template-columns: auto minmax(0, 1fr) auto;
      align-items: center;
    }

    .config-panel-print {
      display: inline-flex;
      width: 34px;
      height: 34px;
      align-items: center;
      justify-content: center;
      border: 1px solid #cbd5e1;
      border-radius: 10px;
      background: #fff;
      color: #475569;
      cursor: pointer;
      box-shadow: 0 3px 9px rgba(15, 23, 42, .06);
    }

    .config-panel-print:hover,
    .config-panel-print:focus-visible {
      border-color: #60a5fa;
      color: #1d4ed8;
      background: #eff6ff;
      outline: none;
    }

    .config-panel-print .fa-icon {
      width: 13px;
      height: 13px;
    }

    /* Finestre di dettaglio mobili e sovrapponibili. */
    .config-floating-window {
      position: fixed;
      z-index: 2200;
      display: grid;
      grid-template-rows: auto minmax(0, 1fr);
      width: min(760px, calc(100vw - 32px));
      max-height: min(820px, calc(100vh - 32px));
      border: 1px solid #bfdbfe;
      border-radius: 16px;
      background: #fff;
      box-shadow:
        0 26px 70px rgba(15, 23, 42, .24),
        0 8px 24px rgba(15, 23, 42, .12);
      overflow: hidden;
      resize: both;
      min-width: 360px;
      min-height: 260px;
    }

    .config-floating-window.kind-objects {
      width: min(560px, calc(100vw - 32px));
    }

    .config-floating-window.kind-policies,
    .config-floating-window.kind-vpn {
      width: min(860px, calc(100vw - 32px));
    }

    .config-floating-window.is-active {
      border-color: #60a5fa;
      box-shadow:
        0 30px 80px rgba(15, 23, 42, .30),
        0 9px 28px rgba(37, 99, 235, .16);
    }

    .config-floating-header {
      display: grid;
      grid-template-columns: auto minmax(0, 1fr) auto;
      align-items: center;
      gap: 10px;
      min-height: 58px;
      padding: 9px 10px 9px 14px;
      border-bottom: 1px solid #dbe3ee;
      background:
        linear-gradient(135deg, rgba(239, 246, 255, .98), rgba(255, 255, 255, .98));
      cursor: move;
      user-select: none;
      touch-action: none;
    }

    .config-floating-title-icon {
      display: inline-flex;
      width: 34px;
      height: 34px;
      align-items: center;
      justify-content: center;
      border: 1px solid #bfdbfe;
      border-radius: 10px;
      color: #2563eb;
      background: #fff;
    }

    .config-floating-title-icon .fa-icon {
      width: 15px;
      height: 15px;
    }

    .config-floating-title {
      min-width: 0;
    }

    .config-floating-title strong {
      display: block;
      color: #172033;
      font-size: 14px;
      line-height: 1.25;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .config-floating-title small {
      display: block;
      margin-top: 2px;
      color: #64748b;
      font-size: 9px;
      font-weight: 700;
      letter-spacing: .06em;
      text-transform: uppercase;
    }

    .config-floating-actions {
      display: flex;
      gap: 6px;
    }

    .config-floating-action {
      display: inline-flex;
      width: 34px;
      height: 34px;
      align-items: center;
      justify-content: center;
      border: 1px solid #cbd5e1;
      border-radius: 10px;
      background: #fff;
      color: #475569;
      cursor: pointer;
    }

    .config-floating-action:hover,
    .config-floating-action:focus-visible {
      border-color: #60a5fa;
      background: #eff6ff;
      color: #1d4ed8;
      outline: none;
    }

    .config-floating-action.close:hover,
    .config-floating-action.close:focus-visible {
      border-color: #fca5a5;
      background: #fef2f2;
      color: #dc2626;
    }

    .config-floating-action .fa-icon {
      width: 13px;
      height: 13px;
    }

    .config-floating-body {
      min-height: 0;
      padding: 14px;
      overflow: auto;
      overscroll-behavior: contain;
      background: #fff;
    }

    .config-floating-body .config-detail-section:first-child {
      padding-top: 0;
    }

    /* Oggetti tecnici generati: non compaiono come entità utente. */
    .config-generated-object-note {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      color: #64748b;
      font-size: 9px;
    }

    /* NAT semantico. */
    .nat-semantic-grid {
      display: grid;
      gap: 18px;
    }

    .nat-flow {
      display: grid;
      grid-template-columns: minmax(130px, 1fr) 28px minmax(150px, 1fr);
      align-items: center;
      gap: 7px;
      min-width: 300px;
    }

    .nat-flow > span {
      min-width: 0;
    }

    .nat-flow-side {
      display: grid;
      gap: 2px;
    }

    .nat-flow-side strong {
      color: #172033;
      font-size: 10px;
      overflow-wrap: anywhere;
    }

    .nat-flow-side small {
      color: #64748b;
      font-size: 8.5px;
    }

    .nat-flow-arrow {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      color: #f97316;
    }

    .nat-flow-arrow .fa-icon {
      width: 13px;
      height: 13px;
    }

    /* Reti configurate. */
    .network-class-badge {
      display: inline-flex;
      align-items: center;
      gap: 6px;
    }

    /* Status Report strutturato. */
    .wg-status-structured-root {
      display: grid;
      gap: 14px;
      min-width: 0;
      padding: 14px;
    }

    .status-device-switcher {
      display: flex;
      flex-wrap: wrap;
      gap: 7px;
      padding: 8px;
      border: 1px solid #dbe3ee;
      border-radius: 13px;
      background: #f8fafc;
    }

    .status-device-switcher button {
      display: inline-flex;
      align-items: center;
      gap: 7px;
      min-height: 34px;
      padding: 0 12px;
      border: 1px solid transparent;
      border-radius: 9px;
      background: transparent;
      color: #475569;
      font: inherit;
      font-size: 10px;
      font-weight: 800;
      cursor: pointer;
    }

    .status-device-switcher button.is-active {
      border-color: #93c5fd;
      background: #fff;
      color: #1d4ed8;
      box-shadow: 0 2px 8px rgba(37, 99, 235, .10);
    }

    .status-device-switcher .fa-icon {
      width: 12px;
      height: 12px;
    }

    .status-hero {
      display: grid;
      grid-template-columns: minmax(0, 1.45fr) minmax(250px, .75fr);
      gap: 14px;
      padding: 18px;
      border: 1px solid #bfdbfe;
      border-radius: 15px;
      background:
        radial-gradient(circle at top right, rgba(59, 130, 246, .12), transparent 44%),
        linear-gradient(135deg, #f8fbff, #fff);
    }

    .status-hero h3 {
      margin: 3px 0 6px;
      color: #172033;
      font-size: 20px;
    }

    .status-hero p {
      margin: 0;
      color: #64748b;
      font-size: 10px;
      line-height: 1.5;
    }

    .status-hero-meta {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 7px;
    }

    .status-hero-meta span {
      display: grid;
      gap: 2px;
      min-height: 54px;
      padding: 9px;
      border: 1px solid #dbe3ee;
      border-radius: 10px;
      background: rgba(255, 255, 255, .88);
    }

    .status-hero-meta strong {
      color: #64748b;
      font-size: 8px;
      letter-spacing: .06em;
      text-transform: uppercase;
    }

    .status-hero-meta b {
      color: #172033;
      font-size: 11px;
      overflow-wrap: anywhere;
    }

    .status-kpi-grid {
      display: grid;
      grid-template-columns: repeat(6, minmax(110px, 1fr));
      gap: 8px;
    }

    .status-kpi {
      display: grid;
      grid-template-columns: 30px minmax(0, 1fr);
      align-items: center;
      gap: 8px;
      min-height: 66px;
      padding: 10px;
      border: 1px solid #dbe3ee;
      border-radius: 12px;
      background: #fff;
    }

    .status-kpi > i {
      display: inline-flex;
      width: 30px;
      height: 30px;
      align-items: center;
      justify-content: center;
      border-radius: 9px;
      background: #eff6ff;
      color: #2563eb;
      font-style: normal;
    }

    .status-kpi > i .fa-icon {
      width: 14px;
      height: 14px;
    }

    .status-kpi span {
      min-width: 0;
    }

    .status-kpi strong {
      display: block;
      color: #172033;
      font-size: 14px;
      line-height: 1.15;
      overflow-wrap: anywhere;
    }

    .status-kpi small {
      display: block;
      margin-top: 2px;
      color: #64748b;
      font-size: 8.5px;
    }

    .status-kpi.good > i {
      background: #ecfdf5;
      color: #047857;
    }

    .status-kpi.warn > i {
      background: #fff7ed;
      color: #c2410c;
    }

    .status-kpi.bad > i {
      background: #fef2f2;
      color: #dc2626;
    }

    .status-section-block {
      display: grid;
      gap: 10px;
      padding: 14px;
      border: 1px solid #dbe3ee;
      border-radius: 14px;
      background: #fff;
      break-inside: avoid;
    }

    .status-inline-cards {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
      gap: 8px;
    }

    .status-inline-card {
      display: grid;
      gap: 5px;
      padding: 11px;
      border: 1px solid #dbe3ee;
      border-radius: 11px;
      background: #f8fafc;
    }

    .status-inline-card strong {
      color: #172033;
      font-size: 10px;
    }

    .status-inline-card small {
      color: #64748b;
      font-size: 9px;
      line-height: 1.45;
      overflow-wrap: anywhere;
    }

    .status-pill {
      display: inline-flex;
      width: fit-content;
      align-items: center;
      gap: 5px;
      min-height: 24px;
      padding: 0 8px;
      border: 1px solid #cbd5e1;
      border-radius: 999px;
      background: #f8fafc;
      color: #475569;
      font-size: 8.5px;
      font-weight: 800;
    }

    .status-pill.good {
      border-color: #86efac;
      background: #f0fdf4;
      color: #166534;
    }

    .status-pill.warn {
      border-color: #fdba74;
      background: #fff7ed;
      color: #9a3412;
    }

    .status-pill.bad {
      border-color: #fca5a5;
      background: #fef2f2;
      color: #991b1b;
    }

    .status-table-wrap {
      width: 100%;
      overflow: auto;
      border: 1px solid #dbe3ee;
      border-radius: 11px;
    }

    .status-table {
      width: 100%;
      border-collapse: collapse;
      min-width: 620px;
      background: #fff;
      font-size: 9px;
    }

    .status-table th {
      position: sticky;
      top: 0;
      z-index: 1;
      padding: 8px 9px;
      border-bottom: 1px solid #cbd5e1;
      background: #f1f5f9;
      color: #475569;
      text-align: left;
      font-size: 8px;
      letter-spacing: .06em;
      text-transform: uppercase;
      white-space: nowrap;
    }

    .status-table td {
      padding: 7px 9px;
      border-bottom: 1px solid #edf1f5;
      color: #334155;
      vertical-align: top;
      line-height: 1.35;
    }

    .status-table tr:last-child td {
      border-bottom: 0;
    }

    .status-table tbody tr:hover td {
      background: #f8fbff;
    }

    .status-code {
      font-family: var(--mono);
      font-weight: 650;
      color: #0f172a;
      white-space: nowrap;
    }

    .status-empty {
      padding: 18px;
      color: #64748b;
      text-align: center;
      font-size: 10px;
    }

    .status-progress {
      display: grid;
      gap: 5px;
    }

    .status-progress-track {
      height: 7px;
      overflow: hidden;
      border-radius: 999px;
      background: #e2e8f0;
    }

    .status-progress-track span {
      display: block;
      height: 100%;
      border-radius: inherit;
      background: linear-gradient(90deg, #2563eb, #38bdf8);
    }

    .status-progress small {
      color: #64748b;
      font-size: 8.5px;
    }

    /* In modalità strutturata Status Report rimane visibile solo la ricerca. */
    body.watchguard-status-structured #severityFilterGroup,
    body.watchguard-status-structured #facilityFilterGroup,
    body.watchguard-status-structured #chainFilterGroup,
    body.watchguard-status-structured #protoFilterGroup,
    body.watchguard-status-structured #serviceFilterGroup,
    body.watchguard-status-structured #categoryFilterGroup {
      display: none !important;
    }

    body.watchguard-status-structured #filterbar {
      grid-template-columns: minmax(260px, 1fr);
    }

    body.watchguard-status-structured #searchFilterGroup {
      grid-column: 1 / -1;
    }

    /* La tabella oggetti mostra entità logiche, non wrapper tecnici. */
    .config-object-logical-value {
      display: grid;
      gap: 2px;
    }

    .config-object-logical-value strong {
      color: #0f172a;
      font-family: var(--mono);
      font-size: 9.5px;
      font-weight: 700;
    }

    .config-object-logical-value small {
      color: #64748b;
      font-size: 8px;
    }

    @media (max-width: 1100px) {
      .status-kpi-grid {
        grid-template-columns: repeat(3, minmax(120px, 1fr));
      }

      .status-hero {
        grid-template-columns: 1fr;
      }
    }

    @media (max-width: 720px) {
      .config-floating-window {
        left: 8px !important;
        top: 8px !important;
        width: calc(100vw - 16px) !important;
        height: calc(100vh - 16px) !important;
        max-height: none;
        min-width: 0;
        min-height: 0;
        resize: none;
      }

      .status-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

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

    @media print {
      .config-panel-print,
      .config-floating-actions,
      .config-tabs,
      .status-device-switcher {
        display: none !important;
      }

      .config-floating-window {
        position: static !important;
        width: auto !important;
        height: auto !important;
        max-height: none !important;
        min-width: 0 !important;
        box-shadow: none !important;
        border: 0 !important;
        resize: none !important;
      }

      .config-floating-body {
        overflow: visible !important;
      }

      .status-table-wrap,
      .config-table-wrap,
      .config-mini-table {
        overflow: visible !important;
      }

      .status-table thead,
      .config-table thead,
      .config-mini-table thead {
        display: table-header-group;
      }

      .status-section-block,
      .config-section-block,
      .config-detail-section {
        break-inside: avoid-page;
      }
    }

  
    /* ============================================================
       v72 — Alias WatchGuard, rete unificata, DHCP completo,
       ordinamento naturale e stampa professionale
       ============================================================ */

    .network-device-cell {
      display: grid;
      gap: 2px;
    }

    .network-device-cell strong {
      color: #0f172a;
      font-family: var(--mono);
      font-size: 10px;
      font-weight: 750;
      white-space: nowrap;
    }

    .network-device-cell small {
      color: #64748b;
      font-size: 8.5px;
      overflow-wrap: anywhere;
    }

    .network-address-stack,
    .dhcp-value-stack {
      display: grid;
      gap: 3px;
    }

    .network-address-stack > span,
    .dhcp-value-stack > span {
      display: block;
      color: #334155;
      font-size: 9px;
      line-height: 1.35;
      overflow-wrap: anywhere;
    }

    .network-address-stack > span:first-child,
    .dhcp-value-stack > span:first-child {
      color: #0f172a;
      font-family: var(--mono);
      font-weight: 700;
    }

    .dhcp-server-summary {
      display: inline-flex;
      align-items: center;
      gap: 6px;
    }

    .dhcp-reservation-host {
      display: grid;
      gap: 2px;
    }

    .dhcp-reservation-host strong {
      color: #0f172a;
      font-size: 9.5px;
    }

    .dhcp-reservation-host small {
      color: #64748b;
      font-size: 8px;
    }

    .config-table.network-unified-table td:first-child,
    .config-table.dhcp-server-table td:first-child {
      white-space: nowrap;
    }

    .config-print-context {
      display: none;
    }

    @media print {
      .config-print-context {
        display: block;
      }
    }

  
    /* v74: icone SVG disponibili anche nel documento di stampa */
    @media print {
      #smartdocs-print-icon-sprite {
        display: block !important;
        position: absolute !important;
        width: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
      }

      .fa-icon {
        display: inline-block !important;
        width: 1em;
        height: 1em;
        fill: currentColor;
        overflow: visible;
        vertical-align: -.125em;
      }
    }

  
    /* ============================================================
       v75 — Alias completi, tabelle ordinabili, policy/VPN più chiare
       ============================================================ */

    /* Ordinamento piatto, coerente e senza effetto 3D. */
    .config-table th,
    .status-table th,
    .config-mini-table th {
      padding: 0 !important;
    }

    .config-sort-button,
    .table-sort-button {
      display: flex !important;
      width: 100% !important;
      min-height: 36px !important;
      align-items: center !important;
      justify-content: space-between !important;
      gap: 8px !important;
      margin: 0 !important;
      padding: 8px 10px !important;
      border: 0 !important;
      border-radius: 0 !important;
      background: transparent !important;
      color: inherit !important;
      box-shadow: none !important;
      font: inherit !important;
      font-size: inherit !important;
      font-weight: 900 !important;
      letter-spacing: inherit !important;
      text-align: left !important;
      text-transform: inherit !important;
      white-space: nowrap !important;
      cursor: pointer !important;
      filter: none !important;
    }

    .config-sort-button:hover,
    .table-sort-button:hover {
      background: #e6eef8 !important;
      color: #1d4ed8 !important;
    }

    .config-sort-button.is-active,
    .table-sort-button.is-active {
      background: #dbeafe !important;
      color: #1d4ed8 !important;
    }

    .config-sort-button .sort-icon,
    .table-sort-button .sort-icon {
      display: inline-flex;
      width: 16px;
      height: 16px;
      flex: 0 0 auto;
      align-items: center;
      justify-content: center;
      color: #94a3b8;
    }

    .config-sort-button.is-active .sort-icon,
    .table-sort-button.is-active .sort-icon {
      color: #2563eb;
    }

    .config-sort-button .sort-icon .fa-icon,
    .table-sort-button .sort-icon .fa-icon {
      width: 11px;
      height: 11px;
    }

    /* L'ID policy resta leggero: solo la cifra. */
    .policy-order {
      display: inline !important;
      min-width: 0 !important;
      height: auto !important;
      padding: 0 !important;
      border: 0 !important;
      border-radius: 0 !important;
      background: transparent !important;
      color: inherit !important;
      box-shadow: none !important;
      font-weight: 850 !important;
      font-variant-numeric: tabular-nums;
    }

    /* Icone Action uniformi. */
    .policy-action-icons {
      gap: 4px !important;
      min-width: 0 !important;
      flex-wrap: nowrap;
    }

    .policy-state-icon,
    .policy-main-icon,
    .policy-feature-icon {
      width: 22px !important;
      height: 22px !important;
      min-width: 22px !important;
      min-height: 22px !important;
      border-radius: 6px !important;
    }

    .policy-state-icon .fa-icon,
    .policy-main-icon .fa-icon,
    .policy-feature-icon .fa-icon {
      width: 12px !important;
      height: 12px !important;
    }

    .policy-feature-icon-list {
      gap: 4px !important;
      flex-wrap: nowrap !important;
    }

    .policy-main-icon.allowed,
    .policy-flow-action.allowed {
      border-color: #86efac !important;
      background: #f0fdf4 !important;
      color: #15803d !important;
    }

    .policy-main-icon.denied,
    .policy-flow-action.denied {
      border-color: #fca5a5 !important;
      background: #fef2f2 !important;
      color: #dc2626 !important;
    }

    .policy-main-icon.disabled,
    .policy-flow-action.disabled {
      border-color: #cbd5e1 !important;
      background: #f1f5f9 !important;
      color: #334155 !important;
    }

    .policy-service-cell {
      display: grid;
      grid-template-columns: 27px minmax(0, 1fr);
      align-items: center;
      gap: 8px;
      min-width: 145px;
    }

    .policy-service-icon {
      display: inline-flex;
      width: 27px;
      height: 27px;
      align-items: center;
      justify-content: center;
      border: 1px solid #cbd5e1;
      border-radius: 8px;
      background: #fff;
      color: currentColor;
    }

    .policy-service-icon .fa-icon {
      width: 13px;
      height: 13px;
    }

    .policy-service-copy {
      display: grid;
      gap: 2px;
      min-width: 0;
    }

    .policy-service-copy strong,
    .policy-service-copy small {
      overflow-wrap: anywhere;
    }

    /* Flusso DA → A nel dettaglio policy. */
    .policy-flow-grid {
      display: grid;
      grid-template-columns: minmax(0, 1fr) 48px minmax(0, 1fr);
      align-items: stretch;
      gap: 10px;
    }

    .policy-flow-side {
      display: grid;
      align-content: start;
      gap: 10px;
      min-width: 0;
      min-height: 108px;
      padding: 12px;
      border: 1px solid #dbe3ee;
      border-radius: 13px;
      background: #f8fafc;
    }

    .policy-flow-side.destination {
      border-color: #bfdbfe;
      background: #f7fbff;
    }

    .policy-flow-label {
      display: inline-flex;
      align-items: center;
      gap: 7px;
      color: #64748b;
      font-size: 9px;
      font-weight: 950;
      letter-spacing: .09em;
      text-transform: uppercase;
    }

    .policy-flow-label .fa-icon {
      width: 12px;
      height: 12px;
      color: #2563eb;
    }

    .policy-flow-center {
      display: grid;
      place-items: center;
      align-content: center;
      gap: 6px;
      color: #64748b;
      font-size: 8.5px;
      font-weight: 850;
      text-align: center;
      text-transform: uppercase;
    }

    .policy-flow-action {
      display: inline-flex;
      width: 34px;
      height: 34px;
      align-items: center;
      justify-content: center;
      border: 1px solid #cbd5e1;
      border-radius: 10px;
      background: #fff;
    }

    .policy-flow-action .fa-icon {
      width: 16px;
      height: 16px;
    }

    /* VPN: una sola icona per riga e identità ben separate. */
    .vpn-type-cell {
      display: grid;
      grid-template-columns: 28px minmax(0, 1fr);
      align-items: center;
      gap: 8px;
      min-width: 145px;
    }

    .vpn-type-icon {
      display: inline-flex;
      width: 28px;
      height: 28px;
      align-items: center;
      justify-content: center;
      border: 1px solid #ddd6fe;
      border-radius: 8px;
      background: #f5f3ff;
      color: #7c3aed;
    }

    .vpn-type-cell.mobile .vpn-type-icon {
      border-color: #bbf7d0;
      background: #f0fdf4;
      color: #15803d;
    }

    .vpn-type-icon .fa-icon {
      width: 14px;
      height: 14px;
    }

    .vpn-type-copy,
    .vpn-name-cell {
      display: grid;
      gap: 2px;
      min-width: 0;
    }

    .vpn-type-copy strong,
    .vpn-name-cell strong {
      color: #172033;
      font-size: 10.5px;
      overflow-wrap: anywhere;
    }

    .vpn-type-copy small,
    .vpn-name-cell small {
      color: #64748b;
      font-size: 8.5px;
      overflow-wrap: anywhere;
    }

    .identity-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
      gap: 8px;
      margin-top: 10px;
    }

    .identity-grid.compact {
      grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
      margin-top: 0;
      gap: 6px;
    }

    .identity-card {
      display: grid;
      grid-template-columns: 30px minmax(0, 1fr);
      align-items: center;
      gap: 8px;
      min-height: 52px;
      padding: 8px 9px;
      border: 1px solid #dbe3ee;
      border-radius: 10px;
      background: #f8fafc;
    }

    .identity-grid.compact .identity-card {
      min-height: 44px;
      grid-template-columns: 26px minmax(0, 1fr);
      padding: 6px 7px;
    }

    .identity-card > i {
      display: inline-flex;
      width: 30px;
      height: 30px;
      align-items: center;
      justify-content: center;
      border: 1px solid #bfdbfe;
      border-radius: 8px;
      background: #eff6ff;
      color: #2563eb;
      font-style: normal;
    }

    .identity-grid.compact .identity-card > i {
      width: 26px;
      height: 26px;
    }

    .identity-card > i .fa-icon {
      width: 13px;
      height: 13px;
    }

    .identity-card > span {
      display: grid;
      gap: 2px;
      min-width: 0;
    }

    .identity-card strong {
      color: #172033;
      font-size: 9.5px;
      overflow-wrap: anywhere;
    }

    .identity-card small {
      color: #64748b;
      font-size: 8px;
      overflow-wrap: anywhere;
    }

    /* Tabelle Alias più leggibili. */
    .alias-content-list {
      display: grid;
      gap: 4px;
      min-width: 190px;
    }

    .alias-content-value {
      display: grid;
      grid-template-columns: 18px minmax(0, 1fr);
      align-items: center;
      gap: 6px;
      color: #334155;
      font-family: var(--mono);
      font-size: 9.5px;
    }

    .alias-content-value .fa-icon {
      width: 11px;
      height: 11px;
      color: #7c3aed;
    }

    .alias-content-more {
      color: #64748b;
      font-size: 8.5px;
      font-weight: 750;
    }

    @media (max-width: 820px) {
      .policy-flow-grid {
        grid-template-columns: 1fr;
      }

      .policy-flow-center {
        min-height: 44px;
      }

      .policy-flow-action {
        transform: rotate(90deg);
      }
    }

    @media print {
      .config-sort-button,
      .table-sort-button {
        min-height: 0 !important;
        padding: 0 !important;
      }
    }

  
    /* v75 final: dimensioni e colori uniformi della colonna Action */
    .policy-state-icon {
      border: 1px solid #cbd5e1 !important;
      background: #ffffff !important;
    }

    .policy-state-icon.enabled {
      border-color: #86efac !important;
      background: #f0fdf4 !important;
      color: #15803d !important;
    }

    .policy-state-icon.disabled {
      border-color: #cbd5e1 !important;
      background: #f1f5f9 !important;
      color: #334155 !important;
    }

    .policy-feature-icon.allowed {
      border-color: #86efac !important;
      background: #f0fdf4 !important;
      color: #15803d !important;
    }

    .policy-feature-icon.denied {
      border-color: #fca5a5 !important;
      background: #fef2f2 !important;
      color: #dc2626 !important;
    }

    .policy-feature-icon.disabled {
      border-color: #cbd5e1 !important;
      background: #f1f5f9 !important;
      color: #334155 !important;
    }

  
    /* ============================================================
       v76 — rete ordinata, Alias semantici, VPN completa e stampa
       ============================================================ */

    .identity-grid.compact {
      grid-template-columns: repeat(2, minmax(150px, 1fr));
    }

    .identity-more-card {
      display: inline-flex;
      min-height: 44px;
      align-items: center;
      justify-content: center;
      gap: 6px;
      padding: 7px 10px;
      border: 1px dashed #93c5fd;
      border-radius: 10px;
      background: #eff6ff;
      color: #1d4ed8;
      font-size: 9px;
      font-weight: 900;
    }

    .reference-collection {
      display: grid;
      gap: 8px;
      width: 100%;
    }

    .reference-collection-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      color: #475569;
      font-size: 9px;
      font-weight: 900;
      letter-spacing: .06em;
      text-transform: uppercase;
    }

    .reference-collection-count {
      min-width: 28px;
      padding: 3px 7px;
      border-radius: 999px;
      background: #dbeafe;
      color: #1d4ed8;
      text-align: center;
      font-size: 9px;
    }

    .reference-card-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 6px;
    }

    .reference-card {
      display: grid;
      grid-template-columns: 26px minmax(0, 1fr);
      align-items: center;
      gap: 7px;
      min-height: 42px;
      padding: 7px 8px;
      border: 1px solid #dbe3ee;
      border-radius: 10px;
      background: #f8fafc;
    }

    .reference-card > i {
      display: inline-flex;
      width: 26px;
      height: 26px;
      align-items: center;
      justify-content: center;
      border: 1px solid #bfdbfe;
      border-radius: 8px;
      background: #eff6ff;
      color: #2563eb;
      font-style: normal;
    }

    .reference-card > i .fa-icon {
      width: 12px;
      height: 12px;
    }

    .reference-card > span {
      display: grid;
      gap: 2px;
      min-width: 0;
    }

    .reference-card strong {
      color: #172033;
      font-size: 9.5px;
      overflow-wrap: anywhere;
    }

    .reference-card small {
      color: #64748b;
      font-size: 8px;
      overflow-wrap: anywhere;
    }

    .reference-expander {
      border: 1px solid #dbe3ee;
      border-radius: 10px;
      background: #fff;
    }

    .reference-expander summary {
      display: flex;
      min-height: 36px;
      align-items: center;
      justify-content: center;
      padding: 0 10px;
      color: #1d4ed8;
      font-size: 9px;
      font-weight: 900;
      cursor: pointer;
      list-style: none;
    }

    .reference-expander summary::-webkit-details-marker { display: none; }
    .reference-expander .reference-card-grid { padding: 0 8px 8px; }

    .alias-semantic-note {
      display: flex;
      align-items: flex-start;
      gap: 8px;
      padding: 9px 10px;
      border: 1px solid #bfdbfe;
      border-radius: 10px;
      background: #eff6ff;
      color: #334155;
      font-size: 9.5px;
      line-height: 1.4;
    }

    .alias-semantic-note .fa-icon {
      width: 13px;
      height: 13px;
      color: #2563eb;
      flex: 0 0 auto;
      margin-top: 1px;
    }

    .network-subsection + .network-subsection {
      margin-top: 18px;
      padding-top: 16px;
      border-top: 1px solid #e2e8f0;
    }

    .network-subsection-title {
      display: flex;
      align-items: center;
      gap: 8px;
      margin: 0 0 9px;
      color: #334155;
      font-size: 11px;
      font-weight: 900;
    }

    .network-subsection-title .fa-icon {
      width: 13px;
      height: 13px;
      color: #2563eb;
    }

    .network-zone {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      min-height: 23px;
      padding: 0 7px;
      border: 1px solid #dbe3ee;
      border-radius: 999px;
      background: #f8fafc;
      color: #475569;
      font-size: 8.5px;
      font-weight: 850;
      white-space: nowrap;
    }

    .network-zone.external {
      border-color: #fecaca;
      background: #fef2f2;
      color: #b91c1c;
    }

    .network-zone.trusted {
      border-color: #bbf7d0;
      background: #f0fdf4;
      color: #15803d;
    }

    .network-zone.optional {
      border-color: #fde68a;
      background: #fffbeb;
      color: #a16207;
    }

    .network-zone.cluster,
    .network-zone.trunk {
      border-color: #ddd6fe;
      background: #f5f3ff;
      color: #6d28d9;
    }

    .vpn-local-cell {
      display: grid;
      gap: 2px;
      min-width: 120px;
    }

    .vpn-local-cell strong {
      color: #047857;
      font-family: var(--mono);
      font-size: 9.5px;
    }

    .vpn-local-cell small {
      color: #64748b;
      font-size: 8px;
    }

    .policy-to-flow {
      display: grid;
      grid-template-columns: 18px minmax(0, 1fr);
      align-items: start;
      gap: 5px;
    }

    .policy-to-flow > i {
      display: inline-flex;
      width: 18px;
      height: 24px;
      align-items: center;
      justify-content: center;
      color: currentColor;
      font-style: normal;
      opacity: .9;
    }

    .policy-to-flow > i .fa-icon {
      width: 11px;
      height: 11px;
    }

    .policy-flow-grid.clean {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .policy-flow-grid.clean .policy-flow-label {
      gap: 0;
    }

    .policy-detail-section-title-plain {
      margin: 0 0 11px;
      color: #0f172a;
      font-size: 13px;
    }

    .log-print-browser-note {
      margin-top: 4px;
      padding: 8px 9px;
      border: 1px solid #fde68a;
      border-radius: 10px;
      background: #fffbeb;
      color: #92400e;
      font-size: 9px;
      line-height: 1.35;
    }

    @media (max-width: 820px) {
      .identity-grid.compact,
      .reference-card-grid,
      .policy-flow-grid.clean {
        grid-template-columns: 1fr;
      }
    }

    @media print {
      .identity-grid.compact {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
      }

      .reference-expander[open] .reference-card-grid,
      .reference-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
      }
    }

  
    /* ============================================================
       v77 — GUI alleggerita, Ports raggruppate, Alias di zona,
       stampa automatica e Phase 2 NAT isolato
       ============================================================ */

    /* Badge e valori più leggeri: colore sì, contorni no. */
    .config-status-badge,
    .network-zone,
    .status-pill {
      min-height: 22px !important;
      padding: 0 7px !important;
      border: 0 !important;
      box-shadow: none !important;
      font-weight: 800 !important;
    }

    .config-list-summary > span,
    .config-detail-chip-list > span,
    .alias-content-value,
    .identity-more-card,
    .port-type-label {
      border: 0 !important;
      box-shadow: none !important;
    }

    .config-list-summary > span,
    .config-detail-chip-list > span {
      padding: 3px 6px !important;
      background: #f1f5f9 !important;
    }

    .config-code.policy-port {
      padding: 2px 5px;
      border: 0;
      border-radius: 5px;
      background: #f1f5f9;
    }

    /* Sezione Ports divisa per origine. */
    .ports-groups {
      display: grid;
      gap: 16px;
    }

    .ports-group {
      display: grid;
      gap: 8px;
    }

    .ports-group + .ports-group {
      padding-top: 14px;
      border-top: 1px solid #dbe3ee;
    }

    .ports-group-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 0 4px;
    }

    .ports-group-header span {
      display: inline-flex;
      align-items: center;
      gap: 7px;
      color: #334155;
      font-size: 9px;
      font-weight: 900;
      letter-spacing: .08em;
      text-transform: uppercase;
    }

    .ports-group-header small {
      color: #64748b;
      font-size: 8.5px;
      font-weight: 700;
    }

    .ports-group-header .fa-icon {
      width: 12px;
      height: 12px;
      color: #2563eb;
    }

    .port-type-label {
      display: inline-flex;
      align-items: center;
      min-height: 21px;
      padding: 0 6px;
      border-radius: 6px;
      background: #f1f5f9;
      color: #475569;
      font-size: 9px;
      font-weight: 800;
    }

    /* Vincolo orientamento stampa. */
    .log-print-menu-field.is-forced {
      opacity: .76;
    }

    .log-print-menu-field.is-forced select {
      cursor: not-allowed;
      background: #f1f5f9;
      color: #475569;
    }

    .log-print-orientation-note {
      display: none;
      margin-top: 7px;
      padding: 7px 8px;
      border-radius: 8px;
      background: #eff6ff;
      color: #1e3a8a;
      font-size: 8.5px;
      line-height: 1.35;
    }

    .log-print-orientation-note.is-visible {
      display: block;
    }

    /* NAT interno alle route Phase 2. */
    .vpn-route-nat {
      display: grid;
      gap: 2px;
    }

    .vpn-route-nat strong {
      color: #c2410c;
      font-size: 9.5px;
    }

    .vpn-route-nat small {
      color: #64748b;
      font-size: 8px;
      overflow-wrap: anywhere;
    }

    .vpn-route-nat-badge {
      display: inline-flex;
      width: fit-content;
      align-items: center;
      gap: 5px;
      padding: 3px 6px;
      border-radius: 6px;
      background: #fff7ed;
      color: #9a3412;
      font-size: 8.5px;
      font-weight: 850;
    }

    .vpn-route-nat-badge .fa-icon {
      width: 10px;
      height: 10px;
    }

    .vpn-nat-note {
      display: flex;
      align-items: flex-start;
      gap: 7px;
      padding: 8px 10px;
      border-radius: 9px;
      background: #fff7ed;
      color: #7c2d12;
      font-size: 9px;
      line-height: 1.4;
    }

    .vpn-nat-note .fa-icon {
      width: 12px;
      height: 12px;
      flex: 0 0 auto;
      margin-top: 1px;
    }

    /* Dettaglio interfaccia: valori non configurati espliciti. */
    .config-not-configured {
      color: #94a3b8;
      font-style: normal;
    }

    @media print {
      .ports-group + .ports-group {
        padding-top: 4mm;
      }

      .log-print-orientation-note {
        display: none !important;
      }
    }

  
    /* ============================================================
       v78 — SSL VPN, Alias raggruppati, BOVPN NAT/VIF e GUI pulita
       ============================================================ */

    .network-zone-plain {
      color: #475569;
      font-size: 9px;
      font-weight: 700;
      white-space: nowrap;
    }

    .alias-groups {
      display: grid;
      gap: 16px;
    }

    .alias-group {
      display: grid;
      gap: 8px;
    }

    .alias-group + .alias-group {
      padding-top: 14px;
      border-top: 1px solid #dbe3ee;
    }

    .alias-group-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 0 4px;
    }

    .alias-group-header span {
      display: inline-flex;
      align-items: center;
      gap: 7px;
      color: #334155;
      font-size: 9px;
      font-weight: 900;
      letter-spacing: .08em;
      text-transform: uppercase;
    }

    .alias-group-header small {
      color: #64748b;
      font-size: 8.5px;
      font-weight: 700;
    }

    .alias-group-header .fa-icon {
      width: 12px;
      height: 12px;
      color: #2563eb;
    }

    .ssl-resource-list {
      display: grid;
      gap: 6px;
    }

    .ssl-resource-item {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      align-items: center;
      gap: 12px;
      min-height: 38px;
      padding: 8px 10px;
      border-bottom: 1px solid #e5eaf1;
    }

    .ssl-resource-item:last-child {
      border-bottom: 0;
    }

    .ssl-resource-item strong {
      color: #0f172a;
      font-family: var(--mono);
      font-size: 9.5px;
      overflow-wrap: anywhere;
    }

    .ssl-resource-item small {
      color: #64748b;
      font-size: 8.5px;
    }

    .vpn-vif-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px;
    }

    .vpn-vif-grid > span {
      display: grid;
      gap: 3px;
      min-height: 56px;
      padding: 10px;
      border: 1px solid #dbe3ee;
      border-radius: 10px;
      background: #f8fafc;
    }

    .vpn-vif-grid strong {
      color: #64748b;
      font-size: 8px;
      letter-spacing: .06em;
      text-transform: uppercase;
    }

    .vpn-vif-grid b {
      color: #172033;
      font-family: var(--mono);
      font-size: 10px;
      font-weight: 750;
      overflow-wrap: anywhere;
    }

    .vpn-vif-route-table td:first-child {
      font-family: var(--mono);
      font-weight: 700;
    }

    .vpn-nat-original {
      display: grid;
      gap: 2px;
    }

    .vpn-nat-original small {
      color: #64748b;
      font-size: 8px;
    }

    .config-device-hero:has(.config-device-meta:empty) {
      grid-template-columns: minmax(0, 1fr);
    }

    @media (max-width: 720px) {
      .vpn-vif-grid {
        grid-template-columns: 1fr;
      }
    }

    @media print {
      .alias-group + .alias-group {
        padding-top: 4mm;
      }
    }

  
    /* ============================================================
       v79 — hero universale, SSL subnet compatte e autenticazione
       ============================================================ */

    .config-device-hero.has-device-visual {
      grid-template-columns: minmax(0, 1fr) minmax(230px, 340px);
      overflow: hidden;
      position: relative;
      isolation: isolate;
    }

    .config-device-hero.has-device-visual::before {
      content: "";
      position: absolute;
      inset: auto -70px -100px auto;
      width: 270px;
      height: 270px;
      border-radius: 50%;
      background: radial-gradient(
        circle,
        rgba(37, 99, 235, .12),
        rgba(37, 99, 235, 0) 70%
      );
      z-index: -1;
    }

    .device-hero-visual {
      display: flex;
      min-height: 116px;
      align-items: center;
      justify-content: center;
      padding: 4px 0;
    }

    .device-hero-visual svg {
      display: block;
      width: min(100%, 320px);
      height: auto;
      overflow: visible;
      filter: drop-shadow(0 16px 22px rgba(15, 23, 42, .12));
    }

    .device-hero-visual .device-shell {
      fill: #ffffff;
      stroke: #b8c9df;
      stroke-width: 1.5;
    }

    .device-hero-visual .device-panel {
      fill: #eaf2ff;
      stroke: #93b4df;
      stroke-width: 1.2;
    }

    .device-hero-visual .device-dark {
      fill: #1e293b;
    }

    .device-hero-visual .device-port {
      fill: #dbeafe;
      stroke: #60a5fa;
      stroke-width: .8;
    }

    .device-hero-visual .device-led {
      fill: #22c55e;
    }

    .device-hero-visual .device-link {
      fill: none;
      stroke: #6b8fb9;
      stroke-width: 1.5;
      stroke-linecap: round;
      stroke-dasharray: 4 4;
    }

    .device-hero-visual .device-node {
      fill: #ffffff;
      stroke: #7ca4d4;
      stroke-width: 1.25;
    }

    .device-hero-visual .device-node-core {
      fill: #2563eb;
    }

    /* Subnet SSL VPN: due colonne quando c'è spazio, un solo dato. */
    .ssl-resource-list {
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px;
    }

    .ssl-resource-item {
      display: flex;
      min-height: 40px;
      align-items: center;
      padding: 9px 11px;
      border: 1px solid #dbe3ee;
      border-radius: 9px;
      background: #f8fafc;
    }

    .ssl-resource-item:last-child {
      border-bottom: 1px solid #dbe3ee;
    }

    .ssl-resource-item strong {
      width: 100%;
      color: #172033;
      font-size: 10px;
      text-align: left;
    }

    /* Autenticazione */
    .auth-detail-summary {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 8px;
    }

    .auth-detail-summary > span {
      display: grid;
      gap: 3px;
      min-height: 58px;
      padding: 10px;
      border: 1px solid #dbe3ee;
      border-radius: 10px;
      background: #f8fafc;
    }

    .auth-detail-summary strong {
      color: #64748b;
      font-size: 8px;
      font-weight: 850;
      letter-spacing: .07em;
      text-transform: uppercase;
    }

    .auth-detail-summary b {
      color: #172033;
      font-size: 10px;
      font-weight: 750;
      overflow-wrap: anywhere;
    }

    .auth-server-list {
      display: grid;
      gap: 7px;
    }

    .auth-server-card {
      display: grid;
      grid-template-columns: 76px minmax(0, 1fr) auto;
      align-items: center;
      gap: 10px;
      min-height: 48px;
      padding: 9px 10px;
      border: 1px solid #dbe3ee;
      border-radius: 10px;
      background: #fff;
    }

    .auth-server-card > strong {
      color: #475569;
      font-size: 8.5px;
      text-transform: uppercase;
    }

    .auth-server-card > span {
      display: grid;
      gap: 2px;
      min-width: 0;
    }

    .auth-server-card b {
      color: #172033;
      font-family: var(--mono);
      font-size: 9.5px;
      overflow-wrap: anywhere;
    }

    .auth-server-card small {
      color: #64748b;
      font-size: 8px;
    }

    .auth-server-state {
      color: #15803d;
      font-size: 8.5px;
      font-weight: 850;
      white-space: nowrap;
    }

    .auth-server-state.off {
      color: #64748b;
    }

    .auth-members-heading {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 8px;
    }

    .auth-members-heading span {
      color: #64748b;
      font-size: 9px;
    }

    .auth-member-counts {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      color: #475569;
      font-size: 8.5px;
      font-weight: 800;
    }

    .auth-member-domain {
      color: #64748b;
      font-size: 8px;
    }

    @media (max-width: 980px) {
      .config-device-hero.has-device-visual {
        grid-template-columns: 1fr;
      }

      .device-hero-visual {
        min-height: 96px;
      }
    }

    @media (max-width: 720px) {
      .ssl-resource-list,
      .auth-detail-summary {
        grid-template-columns: 1fr;
      }

      .auth-server-card {
        grid-template-columns: 1fr;
      }
    }

    @media print {
      .device-hero-visual svg {
        filter: none;
      }

      .ssl-resource-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
    }

  
    /* ============================================================
       v80 — Authentication Server Any
       ============================================================ */

    .auth-any-explanation {
      display: flex;
      align-items: flex-start;
      gap: 9px;
      padding: 10px 12px;
      border-radius: 10px;
      background: #eff6ff;
      color: #334155;
      font-size: 9px;
      line-height: 1.45;
    }

    .auth-any-explanation .fa-icon {
      width: 12px;
      height: 12px;
      flex: 0 0 auto;
      margin-top: 2px;
      color: #2563eb;
    }

    .auth-any-explanation strong {
      color: #1e3a8a;
    }

    .auth-any-label {
      color: #2563eb;
      font-size: 9px;
      font-weight: 850;
    }

  
    /* ============================================================
       v81 — filtri coerenti nelle configurazioni grafiche
       ============================================================ */

    body.graphical-device-config-view #severityFilterGroup,
    body.graphical-device-config-view #chainFilterGroup {
      opacity: .62;
    }

    body.graphical-device-config-view #severityFilterGroup select,
    body.graphical-device-config-view #chainFilterGroup select {
      cursor: not-allowed;
      border-color: #dbe3ee;
      background:
        linear-gradient(#f1f5f9, #f1f5f9) padding-box,
        linear-gradient(135deg, #e2e8f0, #cbd5e1) border-box;
      color: #64748b;
      box-shadow: none;
    }

    body.graphical-device-config-view #severityFilterGroup label,
    body.graphical-device-config-view #chainFilterGroup label {
      color: #94a3b8;
    }

    body.graphical-device-config-view #searchFilterGroup {
      opacity: 1;
    }

    body.graphical-device-config-view #searchInput {
      border-color: #cbd8ea;
      background: #fff;
      color: #172033;
    }

    body.graphical-device-config-view #filterbar {
      grid-template-columns:
        minmax(190px, .75fr)
        minmax(190px, .75fr)
        minmax(360px, 1.5fr) !important;
    }

    @media (max-width: 900px) {
      body.graphical-device-config-view #filterbar {
        grid-template-columns: 1fr !important;
      }
    }

  
    /* ============================================================
       v82 — viste strutturate Aruba e MikroTik RouterOS (verified)
       ============================================================ */

    .generic-structured-root {
      display: grid;
      gap: 14px;
      min-width: 0;
    }

    .generic-config-content {
      display: grid;
      gap: 16px;
      min-width: 0;
    }

    .generic-config-note {
      display: flex;
      align-items: flex-start;
      gap: 9px;
      padding: 10px 12px;
      border: 1px solid #dbe3ee;
      border-radius: 10px;
      background: #f8fafc;
      color: #475569;
      font-size: 9px;
      line-height: 1.45;
    }

    .generic-config-note .fa-icon {
      width: 12px;
      height: 12px;
      flex: 0 0 auto;
      margin-top: 2px;
      color: #2563eb;
    }

    .generic-plain-status {
      font-weight: 800;
      white-space: nowrap;
    }

    .generic-plain-status.is-up {
      color: #15803d;
    }

    .generic-plain-status.is-down {
      color: #b91c1c;
    }

    .generic-code {
      color: #172033;
      font-family: var(--mono);
      font-size: 9.5px;
      overflow-wrap: anywhere;
    }

    .generic-subtext {
      display: block;
      margin-top: 2px;
      color: #64748b;
      font-size: 8px;
      line-height: 1.35;
      overflow-wrap: anywhere;
    }

    .generic-flow {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      min-width: 0;
    }

    .generic-flow .fa-icon {
      width: 10px;
      height: 10px;
      flex: 0 0 auto;
      color: #2563eb;
    }

    .generic-rule-action {
      font-weight: 850;
      text-transform: uppercase;
    }

    .generic-rule-action.allow,
    .generic-rule-action.accept,
    .generic-rule-action.permit {
      color: #15803d;
    }

    .generic-rule-action.drop,
    .generic-rule-action.reject,
    .generic-rule-action.deny {
      color: #dc2626;
    }

    .generic-rule-action.other {
      color: #475569;
    }

    .generic-service-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px;
    }

    .generic-service-card {
      display: grid;
      gap: 4px;
      min-height: 74px;
      padding: 11px 12px;
      border: 1px solid #dbe3ee;
      border-radius: 11px;
      background: #fff;
    }

    .generic-service-card strong {
      color: #172033;
      font-size: 10px;
    }

    .generic-service-card span {
      color: #475569;
      font-size: 9px;
      line-height: 1.45;
      overflow-wrap: anywhere;
    }

    .generic-service-card small {
      color: #64748b;
      font-size: 8px;
      line-height: 1.4;
    }

    .generic-empty-inline {
      color: #94a3b8;
      font-size: 9px;
    }

    .routeros-path {
      color: #7c3aed;
      font-family: var(--mono);
      font-weight: 800;
    }

    .routeros-object-list {
      display: grid;
      gap: 5px;
    }

    .routeros-object-list > span {
      display: block;
      color: #334155;
      font-family: var(--mono);
      font-size: 8.5px;
      overflow-wrap: anywhere;
    }

    .generic-summary-card {
      appearance: none;
      border: 1px solid #dbe3ee;
      border-radius: 13px;
      background: #fff;
      color: inherit;
      cursor: pointer;
      display: grid;
      grid-template-columns: 34px minmax(0, 1fr);
      grid-template-rows: auto auto;
      gap: 2px 10px;
      min-height: 92px;
      padding: 14px;
      text-align: left;
      transition:
        transform .15s ease,
        border-color .15s ease,
        box-shadow .15s ease;
    }

    .generic-summary-card:hover {
      transform: translateY(-1px);
      border-color: #b8cef7;
      box-shadow: 0 8px 20px rgba(15, 23, 42, .07);
    }

    .generic-summary-card .fa-icon {
      grid-row: 1 / span 2;
      align-self: center;
      width: 25px;
      height: 25px;
      color: #2563eb;
    }

    .generic-summary-card strong {
      align-self: end;
      color: #172033;
      font-size: 11px;
    }

    .generic-summary-card small {
      color: #64748b;
      font-size: 8px;
    }

    .generic-summary-card .generic-summary-number {
      color: #0f172a;
      font-size: 22px;
      font-weight: 900;
      line-height: 1;
    }

    .generic-summary-grid {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 12px;
    }

    .generic-structured-root .config-device-hero {
      min-height: 132px;
    }

    .generic-structured-root .config-device-hero p {
      max-width: 720px;
    }

    body.graphical-device-config-view.generic-vendor-structured
      #categoryFilterGroup,
    body.graphical-device-config-view.generic-vendor-structured
      #facilityFilterGroup,
    body.graphical-device-config-view.generic-vendor-structured
      #protoFilterGroup,
    body.graphical-device-config-view.generic-vendor-structured
      #serviceFilterGroup {
      display: none !important;
    }

    body.graphical-device-config-view.generic-vendor-structured
      #filterbar {
      grid-template-columns:
        minmax(190px, .75fr)
        minmax(190px, .75fr)
        minmax(360px, 1.5fr) !important;
    }

    .mikrotik-config-line .rawText {
      color: #d5dde8;
    }

    .mikrotik-config-line.status-sensitive .rawText {
      color: #fca5a5;
    }

    .mark-ros-path {
      color: #c4b5fd;
      font-weight: 850;
    }

    .mark-ros-command {
      color: #7dd3fc;
      font-weight: 850;
    }

    .mark-ros-key {
      color: #93c5fd;
      font-weight: 750;
    }

    .mark-ros-value {
      color: #e2e8f0;
    }

    .mark-ros-comment {
      color: #94a3b8;
      font-style: italic;
    }

    .mark-ros-secret {
      color: #fda4af;
      font-weight: 850;
    }

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

    @media (max-width: 720px) {
      .generic-summary-grid,
      .generic-service-grid {
        grid-template-columns: 1fr;
      }

      body.graphical-device-config-view.generic-vendor-structured
        #filterbar {
        grid-template-columns: 1fr !important;
      }
    }

    @media print {
      .generic-summary-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
      }

      .generic-summary-card {
        break-inside: avoid;
        box-shadow: none !important;
      }

      .generic-config-content,
      .generic-structured-root {
        overflow: visible !important;
      }
    }

  
    /* ============================================================
       v83 — commutatore Strutturata / Testuale
       ============================================================ */

    .config-view-toggle .config-view-btn:not(.is-active) {
      color: #334155 !important;
      opacity: 1 !important;
      filter: none !important;
      cursor: pointer !important;
    }

    .config-view-toggle .config-view-btn:not(.is-active) .fa-icon {
      color: #475569 !important;
    }

    .config-view-toggle .config-view-btn:not(.is-active):hover {
      color: #1d4ed8 !important;
      background: rgba(255, 255, 255, .72) !important;
    }

    .config-view-toggle .config-view-btn:not(.is-active):hover .fa-icon {
      color: #2563eb !important;
    }

    .config-view-toggle .config-view-btn:focus-visible {
      outline: 2px solid #2563eb;
      outline-offset: 2px;
    }

  
    /* ============================================================
       v84 — filtri coerenti tra vista Strutturata e Testuale
       ============================================================ */

    body:not(.graphical-device-config-view) #severityFilterGroup,
    body:not(.graphical-device-config-view) #facilityFilterGroup,
    body:not(.graphical-device-config-view) #chainFilterGroup {
      opacity: 1 !important;
    }

    body:not(.graphical-device-config-view) #severityFilterGroup select,
    body:not(.graphical-device-config-view) #facilityFilterGroup select,
    body:not(.graphical-device-config-view) #chainFilterGroup select {
      cursor: pointer !important;
      color: #334155 !important;
      background: #fff !important;
      border-color: #cbd8ea !important;
      box-shadow: none;
    }

    body:not(.graphical-device-config-view) #severityFilterGroup label,
    body:not(.graphical-device-config-view) #facilityFilterGroup label,
    body:not(.graphical-device-config-view) #chainFilterGroup label {
      color: var(--muted, #64748b) !important;
    }

  
    /* ============================================================
       v85 — Log & Config Analyzer, guida, textarea compatta
       ============================================================ */

    .hero-badges {
      display: none !important;
    }

    body.v85-structured-active #legendBar,
    body.v85-structured-active #parserHint {
      display: none !important;
    }

    .policy-icon-legend[open] {
      border-color: #b8cef7;
      box-shadow: 0 8px 20px rgba(15, 23, 42, .05);
    }

    .policy-icon-legend summary {
      cursor: pointer;
      user-select: none;
      justify-content: space-between;
    }

    .policy-icon-legend summary::after {
      content: "Nascondi legenda";
      margin-left: auto;
      padding: 4px 8px;
      border-radius: 999px;
      background: #eff6ff;
      color: #1d4ed8;
      font-size: 8px;
      font-weight: 900;
      letter-spacing: .04em;
      text-transform: uppercase;
    }

    .policy-icon-legend:not([open]) summary::after {
      content: "Apri legenda";
    }

    .policy-icon-legend summary .policy-legend-title {
      display: inline-flex;
      align-items: center;
      gap: 8px;
    }

    .policy-icon-legend summary .policy-legend-help {
      color: #64748b;
      font-size: 9px;
      font-weight: 800;
      letter-spacing: 0;
      text-transform: none;
    }

    .log-textarea-wrap {
      position: relative;
    }

    .log-textarea-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 8px;
    }

    .log-textarea-header label {
      margin-bottom: 0 !important;
    }

    .textareaToggleBtn {
      appearance: none;
      display: inline-flex;
      align-items: center;
      gap: 6px;
      min-height: 28px;
      padding: 0 10px;
      border: 1px solid #dbe3ee;
      border-radius: 999px;
      background: #fff;
      color: #334155;
      cursor: pointer;
      font-size: 9px;
      font-weight: 850;
      box-shadow: 0 5px 12px rgba(15, 23, 42, .05);
    }

    .textareaToggleBtn:hover,
    .textareaToggleBtn:focus-visible {
      border-color: #9dc1ff;
      color: #1d4ed8;
      outline: none;
    }

    textarea,
    #logInput,
    .log-textarea-wrap textarea {
      min-height: 92px !important;
      height: 92px;
      max-height: 440px;
    }

    .log-textarea-wrap.is-expanded textarea,
    .log-textarea-wrap.is-expanded #logInput {
      min-height: 260px !important;
      height: 260px;
    }

    .inputModeHint {
      display: flex;
      align-items: center;
      gap: 7px;
      margin-top: 7px;
      color: #64748b;
      font-size: 9px;
      line-height: 1.35;
    }

    .inputModeHint .fa-icon {
      width: 12px;
      height: 12px;
      color: #2563eb;
      flex: 0 0 auto;
    }

    .guide-floating-body {
      display: grid;
      gap: 16px;
    }

    .guide-section {
      display: grid;
      gap: 8px;
      padding-bottom: 14px;
      border-bottom: 1px solid #e5eaf1;
    }

    .guide-section:last-child {
      border-bottom: 0;
      padding-bottom: 0;
    }

    .guide-section h4 {
      margin: 0;
      color: #172033;
      font-size: 13px;
      font-weight: 900;
    }

    .guide-section p,
    .guide-section li {
      color: #475569;
      font-size: 10px;
      line-height: 1.55;
    }

    .guide-section ul {
      display: grid;
      gap: 5px;
      margin: 0;
      padding-left: 18px;
    }

    .guide-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px;
    }

    .guide-card {
      display: grid;
      gap: 5px;
      padding: 10px 11px;
      border: 1px solid #dbe3ee;
      border-radius: 12px;
      background: #f8fafc;
    }

    .guide-card strong {
      color: #172033;
      font-size: 10px;
      font-weight: 900;
    }

    .guide-card span {
      color: #64748b;
      font-size: 9px;
      line-height: 1.45;
    }

    .config-floating-window.kind-guide {
      width: min(860px, calc(100vw - 32px));
    }

    @media (max-width: 720px) {
      .guide-grid {
        grid-template-columns: 1fr;
      }

      .log-textarea-header {
        align-items: flex-start;
        flex-direction: column;
      }
    }

  
    /* ============================================================
       v86 — Guida brand/device, MikroTik servizi e dettagli
       ============================================================ */

    .config-floating-window.kind-guide.is-compact {
      width: min(420px, calc(100vw - 32px)) !important;
      min-width: 320px;
      min-height: 220px;
      max-height: min(520px, calc(100vh - 32px));
    }

    .guide-compact-summary {
      display: none;
      gap: 8px;
    }

    .guide-compact-summary .guide-card {
      background: #fff;
    }

    .config-floating-window.kind-guide.is-compact .guide-floating-body {
      gap: 10px;
    }

    .config-floating-window.kind-guide.is-compact .guide-compact-summary {
      display: grid;
    }

    .config-floating-window.kind-guide.is-compact .guide-section {
      display: none;
    }

    .config-floating-window.kind-guide.is-compact .guide-section.keep-compact {
      display: grid;
      padding-bottom: 0;
      border-bottom: 0;
    }

    .mikrotik-service-sections {
      display: grid;
      gap: 14px;
    }

    .mikrotik-service-block {
      display: grid;
      gap: 8px;
      padding-bottom: 14px;
      border-bottom: 1px solid #dbe3ee;
    }

    .mikrotik-service-block:last-child {
      padding-bottom: 0;
      border-bottom: 0;
    }

    .mikrotik-service-title {
      display: flex;
      align-items: center;
      gap: 8px;
      color: #172033;
      font-size: 13px;
      font-weight: 900;
    }

    .mikrotik-service-title .fa-icon {
      width: 14px;
      height: 14px;
      color: #2563eb;
    }

    .mikrotik-kv-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px;
    }

    .mikrotik-kv-card {
      display: grid;
      gap: 4px;
      min-height: 54px;
      padding: 10px 11px;
      border: 1px solid #dbe3ee;
      border-radius: 10px;
      background: #f8fafc;
    }

    .mikrotik-kv-card strong {
      color: #64748b;
      font-size: 8px;
      letter-spacing: .06em;
      text-transform: uppercase;
    }

    .mikrotik-kv-card span {
      color: #172033;
      font-family: var(--mono);
      font-size: 9.5px;
      font-weight: 700;
      overflow-wrap: anywhere;
    }

    .generic-detail-row {
      cursor: pointer;
    }

    .generic-detail-row:hover td {
      background: #eff6ff !important;
    }

    .generic-detail-row td:first-child {
      box-shadow: inset 3px 0 0 #60a5fa;
    }

    .mikrotik-detail-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px;
    }

    .mikrotik-detail-card {
      display: grid;
      gap: 4px;
      min-height: 58px;
      padding: 10px 11px;
      border: 1px solid #dbe3ee;
      border-radius: 10px;
      background: #f8fafc;
    }

    .mikrotik-detail-card strong {
      color: #64748b;
      font-size: 8px;
      letter-spacing: .06em;
      text-transform: uppercase;
    }

    .mikrotik-detail-card span {
      color: #172033;
      font-family: var(--mono);
      font-size: 9.5px;
      font-weight: 700;
      overflow-wrap: anywhere;
      white-space: pre-wrap;
    }

    .config-floating-window.kind-mikrotik-detail {
      width: min(860px, calc(100vw - 32px));
    }

    @media (max-width: 760px) {
      .mikrotik-kv-grid,
      .mikrotik-detail-grid {
        grid-template-columns: 1fr;
      }
    }

  
    /* ============================================================
       v87 — Guida disponibile anche nella barra principale
       ============================================================ */

    #guideTopBtn {
      white-space: nowrap;
    }

    #guideTopBtn .fa-icon {
      width: 14px;
      height: 14px;
    }

  
    /* ============================================================
       v89 — legenda vista + editor configurazione
       ============================================================ */

    .viewer-legend {
      padding: 10px 18px 14px !important;
      border-top: 0;
      border-bottom: 1px solid #e5eaf1;
      background: linear-gradient(180deg, #fbfdff 0%, #f8fafc 100%);
    }

    body.v85-structured-active #legendBar {
      display: none !important;
    }

    .config-editor-section {
      margin-top: 18px;
    }

    .config-editor-card {
      border: 1px solid #dbe3ee;
      border-radius: 18px;
      background: #fff;
      box-shadow: 0 16px 38px rgba(15, 23, 42, .06);
      overflow: hidden;
    }

    .config-editor-toolbar {
      display: grid;
      grid-template-columns: minmax(220px, 320px) 1fr;
      gap: 12px;
      align-items: end;
      padding: 16px 18px;
      border-bottom: 1px solid #e5eaf1;
      background: linear-gradient(180deg, #fbfdff 0%, #f8fafc 100%);
    }

    .config-editor-toolbar label {
      display: block;
      margin-bottom: 6px;
      color: #64748b;
      font-size: 9px;
      font-weight: 900;
      letter-spacing: .12em;
      text-transform: uppercase;
    }

    .config-editor-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      justify-content: flex-end;
    }

    .config-editor-actions button {
      min-height: 38px;
      white-space: nowrap;
    }

    .config-editor-actions .fa-icon {
      width: 14px;
      height: 14px;
    }

    .config-editor-shell {
      position: relative;
      height: min(480px, 54vh);
      min-height: 300px;
      overflow: hidden;
      background: #050608;
      border-bottom: 1px solid #172033;
    }

    .config-editor-highlight,
    .config-editor-input {
      position: absolute;
      inset: 0;
      margin: 0;
      padding: 18px 20px;
      border: 0;
      border-radius: 0;
      min-height: 0 !important;
      width: 100%;
      height: 100% !important;
      overflow: auto;
      white-space: pre;
      tab-size: 2;
      font-family: var(--mono);
      font-size: 12px;
      line-height: 1.58;
      letter-spacing: 0;
      box-sizing: border-box;
    }

    .config-editor-highlight {
      color: #e5e7eb;
      pointer-events: none;
      background: transparent;
    }

    .config-editor-input {
      z-index: 2;
      resize: none;
      background: transparent;
      color: transparent;
      caret-color: #f8fafc;
      outline: none;
      -webkit-text-fill-color: transparent;
    }

    .config-editor-input::selection {
      background: rgba(96, 165, 250, .38);
      color: transparent;
    }

    .config-editor-input:focus {
      box-shadow: inset 0 0 0 2px rgba(96, 165, 250, .55);
    }

    .config-editor-footer {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 10px 18px;
      color: #64748b;
      font-size: 10px;
      font-weight: 750;
      background: #fbfdff;
    }

    .config-editor-footer span {
      display: inline-flex;
      align-items: center;
      gap: 6px;
    }

    .config-editor-footer .fa-icon {
      width: 12px;
      height: 12px;
      color: #2563eb;
    }

    .syntax-comment { color: #64748b; font-style: italic; }
    .syntax-path { color: #38bdf8; font-weight: 900; }
    .syntax-command { color: #a78bfa; font-weight: 900; }
    .syntax-key { color: #60a5fa; font-weight: 850; }
    .syntax-value { color: #e5e7eb; }
    .syntax-string { color: #fbbf24; }
    .syntax-ip { color: #22c55e; font-weight: 850; }
    .syntax-port { color: #f97316; font-weight: 850; }
    .syntax-action-good { color: #22c55e; font-weight: 900; }
    .syntax-action-bad { color: #ef4444; font-weight: 900; }
    .syntax-warning { color: #f59e0b; font-weight: 850; }
    .syntax-xml-tag { color: #38bdf8; font-weight: 900; }
    .syntax-xml-attr { color: #a78bfa; font-weight: 850; }
    .syntax-xml-entity { color: #fbbf24; }
    .syntax-aruba-mode { color: #38bdf8; font-weight: 900; }
    .syntax-aruba-keyword { color: #a78bfa; font-weight: 900; }

    @media (max-width: 860px) {
      .config-editor-toolbar {
        grid-template-columns: 1fr;
      }

      .config-editor-actions {
        justify-content: flex-start;
      }

      .config-editor-shell {
        height: 360px;
      }
    }

  
    /* ============================================================
       v91 — Editor separato e ripristino filtri log
       ============================================================ */

    .workspace-switcher {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      align-items: center;
      margin: 16px 0 18px;
      padding: 10px;
      border: 1px solid #dbe3ee;
      border-radius: 18px;
      background: rgba(255, 255, 255, .88);
      box-shadow: 0 16px 38px rgba(15, 23, 42, .06);
    }

    .workspace-switcher-btn {
      appearance: none;
      display: inline-flex;
      align-items: center;
      gap: 8px;
      min-height: 42px;
      padding: 0 16px;
      border: 1px solid transparent;
      border-radius: 14px;
      background: #fff;
      color: #334155;
      cursor: pointer;
      font-size: 12px;
      font-weight: 900;
      box-shadow: 0 8px 18px rgba(15, 23, 42, .06);
    }

    .workspace-switcher-btn .fa-icon {
      width: 14px;
      height: 14px;
    }

    .workspace-switcher-btn:hover,
    .workspace-switcher-btn:focus-visible {
      border-color: #9dc1ff;
      color: #1d4ed8;
      outline: none;
    }

    .workspace-switcher-btn.is-active {
      background: #2563eb;
      border-color: #2563eb;
      color: #fff;
      box-shadow: 0 14px 26px rgba(37, 99, 235, .22);
    }

    body:not(.editor-workspace) #configEditorSection {
      display: none !important;
    }

    body.editor-workspace #inputAnalyzerSection,
    body.editor-workspace #viewerAnalyzerSection {
      display: none !important;
    }

    body.editor-workspace #configEditorSection {
      display: block !important;
    }

    body.editor-workspace .workspace-switcher {
      margin-bottom: 18px;
    }

    body.editor-workspace #configEditorSection {
      margin-top: 0;
    }

    #configEditorSection .section-title p {
      max-width: 860px;
    }

    body:not(.graphical-device-config-view)
      #filterbar select:not(:disabled),
    body:not(.graphical-device-config-view)
      #filterbar input:not(:disabled) {
      opacity: 1 !important;
      cursor: pointer;
      color: #0f172a;
      background: #fff;
    }

    body:not(.graphical-device-config-view)
      #filterbar label {
      opacity: 1 !important;
    }

    @media (max-width: 700px) {
      .workspace-switcher {
        display: grid;
      }

      .workspace-switcher-btn {
        justify-content: center;
      }
    }

  

    .home-launchpad {
      position: relative;
      overflow: hidden;
      margin-top: 6px;
    }

    .home-launchpad::before {
      content: "";
      position: absolute;
      inset: 0;
      background: radial-gradient(circle at top right, rgba(37, 99, 235, .08), transparent 34%),
                  radial-gradient(circle at bottom left, rgba(99, 102, 241, .07), transparent 38%);
      pointer-events: none;
    }

    .home-launchpad .section-title,
    .home-launchpad .home-launchpad-grid {
      position: relative;
      z-index: 1;
    }

    .home-launchpad-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 18px;
    }

    .home-app-card {
      display: flex;
      flex-direction: column;
      gap: 16px;
      min-height: 100%;
      padding: 18px;
      border: 1px solid #d7e3f5;
      border-radius: 22px;
      background: rgba(255, 255, 255, .94);
      box-shadow: 0 18px 42px rgba(15, 23, 42, .08);
    }

    .home-app-card__icon {
      width: 58px;
      height: 58px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border-radius: 16px;
      border: 1px solid #bcd0ff;
      background: linear-gradient(180deg, #f7faff 0%, #e8f0ff 100%);
      color: #2563eb;
      box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
    }

    .home-app-card__icon .fa-icon {
      width: 24px;
      height: 24px;
    }

    .home-app-card__eyebrow {
      margin: 0 0 6px;
      color: #4f46e5;
      font-size: 11px;
      font-weight: 900;
      letter-spacing: .18em;
      text-transform: uppercase;
    }

    .home-app-card h3 {
      margin: 0 0 10px;
      color: #111827;
      font-size: 30px;
      line-height: 1.08;
    }

    .home-app-card__content > p:not(.home-app-card__eyebrow) {
      margin: 0;
      color: #475569;
      font-size: 14px;
      line-height: 1.62;
    }

    .home-app-card ul {
      margin: 12px 0 0;
      padding-left: 18px;
      color: #475569;
      font-size: 13px;
      line-height: 1.65;
    }

    .home-app-card__footer {
      margin-top: auto;
      padding-top: 2px;
    }

    .home-app-card__action {
      appearance: none;
      display: inline-flex;
      align-items: center;
      gap: 8px;
      min-height: 44px;
      padding: 0 16px;
      border: 1px solid #2563eb;
      border-radius: 14px;
      background: #2563eb;
      color: #fff;
      cursor: pointer;
      font-size: 13px;
      font-weight: 900;
      box-shadow: 0 12px 24px rgba(37, 99, 235, .22);
    }

    .home-app-card__action:hover,
    .home-app-card__action:focus-visible {
      background: #1d4ed8;
      border-color: #1d4ed8;
      outline: none;
    }

    .home-app-card__action .fa-icon {
      width: 14px;
      height: 14px;
    }

    body.editor-workspace .home-app-card__action[data-home-workspace="editor"],
    body:not(.editor-workspace) .home-app-card__action[data-home-workspace="analyzer"] {
      background: #1d4ed8;
      border-color: #1d4ed8;
    }

    @media (max-width: 980px) {
      .home-launchpad-grid {
        grid-template-columns: 1fr;
      }

      .home-app-card h3 {
        font-size: 26px;
      }
    }

  
    /* ============================================================
       v93 — Home dashboard pulita
       ============================================================ */

    body.home-workspace .hero {
      display: none !important;
    }

    body.home-workspace .workspace-switcher,
    body.home-workspace #inputAnalyzerSection,
    body.home-workspace #viewerAnalyzerSection,
    body.home-workspace #configEditorSection {
      display: none !important;
    }

    body.home-workspace #homeLaunchpadSection {
      display: block !important;
      margin-top: 18px;
    }

    body:not(.home-workspace) #homeLaunchpadSection {
      display: none !important;
    }

    .home-launchpad {
      padding: 20px;
      border: 1px solid #dbe3ee;
      border-radius: 24px;
      background:
        radial-gradient(circle at top right, rgba(37, 99, 235, .08), transparent 34%),
        linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
      box-shadow: 0 22px 54px rgba(15, 23, 42, .08);
    }

    .home-launchpad .section-title {
      margin-bottom: 16px;
    }

    .home-launchpad .section-title h2 {
      font-size: 24px;
    }

    .home-launchpad .section-title p {
      max-width: 720px;
      font-size: 13px;
    }

    .home-launchpad-grid {
      grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
      gap: 18px;
    }

    .home-app-card {
      position: relative;
      min-height: 280px;
      padding: 22px;
      border-radius: 24px;
      transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
    }

    .home-app-card:hover {
      transform: translateY(-2px);
      border-color: #a9c4f5;
      box-shadow: 0 24px 56px rgba(15, 23, 42, .12);
    }

    .home-app-card:focus-within {
      border-color: #2563eb;
      box-shadow: 0 0 0 3px rgba(37, 99, 235, .14), 0 24px 56px rgba(15, 23, 42, .12);
    }

    .home-app-card__icon {
      width: 64px;
      height: 64px;
      border-radius: 18px;
    }

    .home-app-card__content {
      display: grid;
      gap: 10px;
    }

    .home-app-card h3 {
      max-width: 360px;
      font-size: 28px;
    }

    .home-app-card__content > p:not(.home-app-card__eyebrow) {
      max-width: 520px;
      font-size: 14px;
    }

    .home-app-card ul {
      display: none !important;
    }

    .home-app-card__action {
      min-width: 138px;
      justify-content: center;
    }

    #workspaceHomeBtn {
      background: #fff;
      color: #334155;
      border-color: #dbe3ee;
    }

    #workspaceHomeBtn:hover,
    #workspaceHomeBtn:focus-visible {
      color: #1d4ed8;
      border-color: #9dc1ff;
    }

    body.home-workspace #workspaceHomeBtn {
      background: #2563eb;
      color: #fff;
      border-color: #2563eb;
    }

    @media (min-width: 1180px) {
      .home-launchpad-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
    }

    @media (max-width: 700px) {
      .home-launchpad {
        padding: 16px;
      }

      .home-app-card {
        min-height: 240px;
      }

      .home-app-card h3 {
        font-size: 24px;
      }
    }
