      :root {
        --bg: #0b111d;
        --panel: #11192b;
        --panel-2: #18233b;
        --text: #e8eef6;
        --muted: #9fb2c7;
        --accent: #4fa4ff;
        --accent-2: #7c6cff;
        --success: #3ddc97;
        --error: #ff7a7a;
        --border: rgba(255, 255, 255, 0.08);
      }
      * {
        box-sizing: border-box;
      }
      body {
        margin: 0;
        min-height: 100vh;
        font-family: "Manrope", "Space Grotesk", system-ui, -apple-system, sans-serif;
        background: radial-gradient(circle at 15% 20%, rgba(79, 164, 255, 0.14), transparent 40%),
          radial-gradient(circle at 80% -5%, rgba(124, 108, 255, 0.14), transparent 40%),
          linear-gradient(145deg, #0b1628, #0e1c32);
        color: var(--text);
        padding: 26px 18px 40px;
        display: flex;
        justify-content: center;
        align-items: flex-start;
      }
      .app {
        position: relative;
        width: 100%;
        max-width: 1140px;
        background: var(--panel);
        border: 1px solid var(--border);
        border-radius: 18px;
        padding: 24px 24px 24px;
        box-shadow: 0 20px 70px rgba(0, 0, 0, 0.55);
        backdrop-filter: blur(10px);
        height: auto;
      }
      header {
        display: flex;
        justify-content: space-between;
        gap: 14px;
        flex-wrap: wrap;
        align-items: center;
      }
      h1 {
        margin: 4px 0 2px;
        font-size: 26px;
        letter-spacing: 0.2px;
        font-family: "Space Grotesk", "Manrope", sans-serif;
      }
      .subtitle {
        margin: 0;
        color: var(--muted);
        line-height: 1.5;
      }
      .eyebrow {
        text-transform: uppercase;
        letter-spacing: 0.2em;
        font-size: 12px;
        color: var(--accent);
        margin: 0;
        font-weight: 700;
      }
      .chip {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 9px 9px;
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid var(--border);
        color: var(--muted);
        font-size: 12px;
        cursor: pointer;
        text-align: left;
        transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
      }
      .chip strong {
        color: var(--text);
      }
      .chip:hover {
        transform: translateY(-1px);
        border-color: rgba(79, 164, 255, 0.4);
      }
      .chip:focus-visible {
        outline: 2px solid var(--accent);
        outline-offset: 2px;
      }
      .header-actions {
        align-items: center;
      }
      .snow-toggle {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid var(--border);
        color: var(--text);
      }
      .snow-toggle .pill {
        background: rgba(79, 164, 255, 0.14);
        color: var(--accent);
      }
      .snow-toggle[aria-pressed="false"] {
        opacity: 0.75;
      }
      .snow-toggle[aria-pressed="false"] .pill {
        background: rgba(255, 255, 255, 0.08);
        color: var(--muted);
      }
      .nav {
        margin: 18px 0 12px;
        display: inline-flex;
        flex-wrap: wrap;
        gap: 10px;
      }
      .nav button {
        border: 1px solid var(--border);
        background: rgba(255, 255, 255, 0.04);
        color: var(--text);
        padding: 10px 16px;
        border-radius: 12px;
        font-weight: 700;
        letter-spacing: 0.2px;
        cursor: pointer;
        display: inline-flex;
        align-items: center;
      }
      .nav button.disabled {
        opacity: 0.5;
        cursor: not-allowed;
        pointer-events: none;
      }
      .nav button.active {
        /*background: linear-gradient(135deg, var(--accent), var(--accent-2));*/
        background: linear-gradient(135deg, var(--accent), var(--accent-2));
        color: #0b1624;
        border-color: transparent;
      }
      /*--------------------------------------------------------------------*/
      


      .nav button svg {
        width: 18px;
        height: 18px;
        stroke: currentColor;
        stroke-width: 1.8;
        fill: none;
        stroke-linecap: round;
        stroke-linejoin: round;
      }
      .subnav {
        margin: 10px 0 8px;
        display: flex;
        gap: 10px;
        flex-wrap: wrap;
      }
      .subnav button {
        border: 1px solid var(--border);
        background: rgba(255, 255, 255, 0.04);
        color: var(--text);
        padding: 9px 13px;
        border-radius: 10px;
        font-weight: 700;
        letter-spacing: 0.2px;
        cursor: pointer;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
      }
      .subnav button.icon-tab {
        padding: 9px 12px;
      }
      .subnav button svg {
        width: 18px;
        height: 18px;
        stroke: currentColor;
        stroke-width: 1.8;
        fill: none;
        stroke-linecap: round;
        stroke-linejoin: round;
      }
      .subnav button.active {
        background: linear-gradient(135deg, var(--accent), var(--accent-2));
        color: #0b1624;
        border-color: transparent;
      }
      .report-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        width: 100%;
      }
      .report-count {
        font-size: 12px;
        font-weight: 700;
        padding: 6px 10px;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.08);
        color: var(--muted);
        white-space: nowrap;
        margin-left: auto;
        text-align: right;
      }
      .report-row {
        display: flex;
        flex-wrap: wrap;
        gap: 12px;
        margin-top: 6px;
      }
      .report-row span {
        line-height: 1.4;
      }
      .report-item .user-row .meta {
        width: 100%;
      }
      .test-topic-item .actions {
        display: flex;
        gap: 8px;
        width: 100%;
      }
      .test-topic-item .actions .btn {
        flex: 1;
        justify-content: center;
      }
      .banner {
        margin: 8px 0 14px;
        padding: 10px 12px;
        border-radius: 12px;
        border: 1px solid var(--border);
        background: rgba(255, 255, 255, 0.04);
        color: var(--muted);
        font-size: 14px;
      }
      .banner.success {
        color: var(--success);
        border-color: rgba(61, 220, 151, 0.4);
      }
      .banner.error {
        color: var(--error);
        border-color: rgba(255, 122, 122, 0.5);
      }
      .tab {
        display: none;
      }
      .tab.active {
        display: block;
      }
      .card,
      .panel {
        background: var(--panel-2);
        border: 1px solid var(--border);
        border-radius: 14px;
        padding: 16px;
      }
      .panel-head {
        display: flex;
        justify-content: space-between;
        gap: 10px;
        align-items: center;
      }
      .panel h3,
      .card h2 {
        margin: 0 0 6px;
        font-size: 18px;
        font-family: "Space Grotesk", "Manrope", sans-serif;
      }
      .question-title {
        margin: 0 0 6px;
        font-size: 18px;
        font-family: "Space Grotesk", "Manrope", sans-serif;
        line-height: 1.4;
      }
      .code-block {
        margin: 8px 0;
        padding: 12px;
        background: rgba(10, 14, 22, 0.7);
        border: 1px solid var(--border);
        border-radius: 10px;
        overflow-x: auto;
        font-family: "SFMono-Regular", "Menlo", "Consolas", "Liberation Mono", monospace;
        font-size: 13px;
        color: #e6edf7;
      }
      .code-block code {
        white-space: pre;
      }
      .muted {
        color: var(--muted);
      }
      .small {
        font-size: 13px;
      }
      .btn {
        border: none;
        cursor: pointer;
        font-weight: 700;
        letter-spacing: 0.2px;
        padding: 11px 14px;
        border-radius: 10px;
      }
      .btn:disabled,
      .btn.disabled {
        pointer-events: none;
        cursor: not-allowed;
        background: linear-gradient(135deg, #3b455b, #2f374a);
        color: var(--muted);
        border: 1px solid var(--border);
        box-shadow: none;
        filter: saturate(0.6) brightness(0.95);
      }
      .link-button {
        background: transparent;
        border: none;
        color: var(--accent);
        text-decoration: underline;
        padding: 0;
        font-weight: 700;
        cursor: pointer;
      }
      .btn-primary {
        background: linear-gradient(135deg, var(--accent), var(--accent-2));
        color: #0b1624;
        box-shadow: 0 14px 45px rgba(79, 164, 255, 0.35);
      }
      .btn-ghost {
        background: rgba(255, 255, 255, 0.05);
        color: var(--text);
        border: 1px solid var(--border);
      }
      .btn-danger {
        background: rgba(255, 122, 122, 0.12);
        color: var(--error);
        border: 1px solid rgba(255, 122, 122, 0.3);
      }
      #reportQuestion {
        padding: 6px 10px;
        font-size: 12px;
        border-radius: 8px;
      }
      #reportQuestion svg {
        width: 18px;
        height: 18px;
        stroke: currentColor;
        stroke-width: 1.8;
        fill: none;
        stroke-linecap: round;
        stroke-linejoin: round;
      }
      .quiz-meta,
      .actions {
        display: flex;
        gap: 10px;
        flex-wrap: wrap;
        align-items: center;
      }
      .quiz-nav-actions {
        justify-content: space-between;
        margin-top: 14px;
        margin-bottom: 40px;
      }
      .quiz-meta {
        justify-content: space-between;
      }
      .quiz-timer {
        font-size: 12px;
        font-weight: 600;
        letter-spacing: 0.3px;
        padding: 6px 10px;
        border-radius: 999px;
        border: 1px solid var(--border);
        background: rgba(255, 255, 255, 0.08);
        color: var(--text);
      }
      .quiz-meta-block {
        margin-bottom: 10px;
      }
      .quiz-meta-line {
        display: inline-flex;
        align-items: baseline;
        gap: 8px;
        flex-wrap: wrap;
      }
      .home-actions {
        margin-top: 20px;
        margin-bottom: 4px;
        justify-content: center;
        flex-wrap: nowrap;
      }
      #nextBtn {
        margin-left: auto;
      }
      #prevBtn,
      #nextBtn {
        min-width: 80px;
        padding: 10px 16px;
        font-size: 16px;
      }
      .btn_np:hover{
        box-shadow: 0 16px 50px rgba(79, 164, 255, 0.4);
        transition-duration: 0.3s;
        /*background-color: var(--success);*/
        border-color: var(--success);
        color: var(--success);
        padding: 2rem;
      }
      #reportQuestion:hover {
        background-color: var(--error);
        border: 0px;
        color: white;
        transition-duration: 0.3s;
      }
      /*
      #quizHomeBtn:hover {
        box-shadow: 0 16px 50px rgba(79, 164, 255, 0.4);
        transition-duration: 0.3s;
      }
      */
      .quiz-meta-separator {
        color: var(--muted);
      }
      .quiz-meta-source {
        color: var(--muted);
        margin-top: 2px;
      }
      .option {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        white-space: normal;
        word-break: break-word;
        text-align: left;
        padding: 12px 14px;
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.05);
        color: var(--text);
        border: 1px solid var(--border);
        transition: transform 120ms ease, filter 120ms ease, border-color 120ms ease;
        cursor: pointer;
        font-size: 16px;
      }
      .option:hover {
        filter: brightness(1.05);
      }
      .option:active {
        transform: translateY(1px);
      }
      .option.correct {
        border-color: rgba(61, 220, 151, 0.8);
        background: rgba(61, 220, 151, 0.1);
      }
      .option.wrong {
        border-color: rgba(255, 122, 122, 0.8);
        background: rgba(255, 122, 122, 0.1);
      }
      .feedback {
        margin-top: 10px;
        font-weight: 700;
        text-align: center;
      }
      .explanation {
        margin-top: 10px;
        padding: 10px 12px;
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.06);
        border: 1px solid var(--border);
        color: var(--text);
        font-size: 14px;
        line-height: 1.5;
      }
      .explanation-title {
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        font-size: 12px;
        margin-bottom: 6px;
        color: var(--muted);
      }
      .feedback.ok {
        color: var(--success);
      }
      .feedback.ko {
        color: var(--error);
      }
      .summary {
        margin-top: 14px;
        padding: 14px;
        /*
        width: fit-content;
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
        */
        border-radius: 14px;
        background: linear-gradient(135deg, rgba(79, 164, 255, 0.16), rgba(124, 108, 255, 0.16));
        border: 1px solid var(--border);
        text-align: center;
      }
      .summary-media {
        margin-top: 10px;
        display: flex;
        justify-content: center;
      }
      .summary-image {
        width: 100%;
        max-width: 520px;
        height: auto;
        border-radius: 16px;
        border: 1px solid rgba(255, 255, 255, 0.6);
        box-shadow: 0 14px 28px rgba(16, 24, 40, 0.18);
        background: #ffffff;
        padding: -1px;
      }
      .grid {
        display: grid;
        gap: 14px;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        margin-top: 12px;
      }
      .options {
        display: flex;
        flex-direction: column;
        gap: 10px;
        width: 100%;
        max-width: 100%;
      }
      .report-options {
        margin-top: 6px;
        gap: 8px;
      }
      .report-options .option {
        cursor: default;
        font-size: 14px;
        padding: 8px 10px;
        display: flex;
        justify-content: space-between;
        align-items: center;
      }
      .admin-grid {
        display: grid;
        gap: 14px;
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
        margin-top: 10px;
      }
      .wide {
        grid-column: span 2;
      }
      .table-wrap {
        overflow: auto;
        border-radius: 10px;
        border: 1px solid var(--border);
        margin-top: 8px;
        width: 100%;
        max-width: 100%;
      }
      table {
        width: 100%;
        table-layout: fixed;
        border-collapse: collapse;
        /* min-width: 420px; */
        font-size: 14px;
      }
      .question-row {
        cursor: pointer;
      }
      .question-detail {
        display: none;
      }
      .question-detail.active {
        display: table-row;
      }
      .question-detail td {
        background: rgba(255, 255, 255, 0.03);
      }
      th,
      td {
        text-align: left;
        padding: 10px 12px;
        border-bottom: 1px solid var(--border);
        word-break: break-word;
      }
      th {
        background: rgba(255, 255, 255, 0.03);
        color: var(--muted);
        font-weight: 700;
        letter-spacing: 0.1px;
      }
      tr:last-child td {
        border-bottom: none;
      }
      @media (max-width: 720px) {
        .table-wrap table,
        .table-wrap thead,
        .table-wrap tbody,
        .table-wrap th,
        .table-wrap td,
        .table-wrap tr {
          /* display: block; */
          width: 100%;
        }
        .table-wrap thead {
          display: none;
        }
        .table-wrap tr {
          margin-bottom: 12px;
          border: 1px solid var(--border);
          border-radius: 10px;
          overflow: hidden;
        }
        .table-wrap td {
          border-bottom: 1px solid var(--border);
          display: flex;
          justify-content: space-between;
          gap: 5px;
          align-items: flex-start;
        }
        .table-wrap td:last-child {
          border-bottom: none;
        }
        .table-wrap td::before {
          content: attr(data-label);
          font-weight: 700;
          color: var(--muted);
          flex: 0 0 120px;
          max-width: 140px;
          text-transform: none;
        }
      }
      .pill {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 4px 8px;
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.08);
        font-weight: 700;
        font-size: 12px;
      }
      .pill.success {
        background: rgba(61, 220, 151, 0.12);
        color: var(--success);
      }
      .user-page-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 10px;
        flex-wrap: wrap;
        margin-bottom: 12px;
      }
      .user-profile-card {
        margin-top: 6px;
      }
      .user-profile-grid {
        display: grid;
        gap: 10px;
      }
      .user-profile-row {
        display: flex;
        justify-content: space-between;
        align-items: baseline;
        padding: 12px;
        border-radius: 12px;
        border: 1px solid var(--border);
        background: rgba(255, 255, 255, 0.04);
      }
      .user-profile-row strong {
        color: var(--text);
        font-size: 15px;
      }
      .stats-block {
        display: grid;
        gap: 6px;
      }
      .chart-wrap {
        position: relative;
        width: 100%;
        max-width: 100%;
        border: 1px solid var(--border);
        border-radius: 12px;
        padding: 10px;
        background: rgba(255, 255, 255, 0.03);
      }
      .chart-wrap canvas {
        width: 100% !important;
        height: clamp(220px, 45vh, 360px) !important;
      }
      @media (max-width: 720px) {
        .chart-wrap {
          padding: 8px;
        }
        .chart-wrap canvas {
          height: clamp(200px, 50vh, 320px) !important;
        }
      }
      .actions-row {
        display: flex;
        gap: 6px;
        flex-wrap: wrap;
        justify-content: flex-start;
      }
      .actions.actions-full {
        width: 100%;
      }
      .btn.btn-full {
        width: 100%;
        justify-content: center;
      }
      .user-list {
        display: grid;
        gap: 10px;
      }
      .user-item {
        display: grid;
        gap: 4px;
      }
      .user-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 10px;
        padding: 12px;
        border-radius: 12px;
        border: 1px solid var(--border);
        background: rgba(255, 255, 255, 0.04);
        color: var(--text);
        cursor: pointer;
        transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
        text-align: left;
      }
      .user-row:hover {
        transform: translateY(-1px);
        border-color: rgba(79, 164, 255, 0.4);
      }
      .user-row .meta {
        display: grid;
        gap: 6px;
        width: 100%;
      }
      .user-row .title {
        font-weight: 700;
      }
      .user-row .subtitle {
        margin: 0;
        color: var(--muted);
        font-size: 15px;
      }
      .user-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        width: 100%;
      }
      .user-role {
        font-size: 12px;
        font-weight: 700;
        padding: 6px 10px;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.08);
        color: var(--muted);
        white-space: nowrap;
        margin-left: auto;
        text-align: right;
      }
      .user-actions {
        margin-top: 4px;
      }
      .topic-choice {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px;
        border-radius: 12px;
        border: 1px solid var(--border);
        background: rgba(255, 255, 255, 0.04);
        color: var(--text);
        cursor: pointer;
        transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
      }
      .topic-choice:hover {
        transform: translateY(-1px);
        border-color: rgba(79, 164, 255, 0.4);
      }
      .test-toggle-link {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 0;
      }
      .test-toggle-link span {
        font-weight: 400;
      }
      .test-footer {
        margin-top: 10px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
      }
      .icon-chevron {
        width: 20px;
        height: 20px;
        transition: transform 160ms ease;
      }
      .test-card.is-open .icon-chevron {
        transform: rotate(180deg);
      }
      .test-topic-list {
        margin-top: 10px;
        display: grid;
        gap: 8px;
      }
      .test-topic-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 10px;
        padding: 8px 10px;
        border-radius: 10px;
        border: 1px solid var(--border);
        background: rgba(255, 255, 255, 0.04);
      }
      .topic-choice input[type="checkbox"] {
        width: auto;
        margin: 0;
        accent-color: rgba(79, 164, 255, 0.9);
      }
      .topic-choice-label {
        display: grid;
        gap: 4px;
        flex: 1;
      }
      .topic-choice-title {
        font-weight: 700;
      }
      .topic-metrics {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        gap: 6px;
        min-width: 120px;
      }
      .topic-progress {
        width: clamp(90px, 22vw, 150px);
        height: 6px;
        border-radius: 999px;
        border: 1px solid var(--border);
        background: rgba(255, 255, 255, 0.06);
        overflow: hidden;
      }
      .topic-progress-bar {
        display: block;
        height: 100%;
        width: 0;
        background: linear-gradient(90deg, rgba(79, 164, 255, 0.9), rgba(61, 220, 151, 0.9));
        transition: width 200ms ease;
      }
      .topic-progress-label {
        line-height: 1.1;
      }
      .topic-collapse {
        border: 1px solid var(--border);
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.03);
        padding: 6px;
      }
      .topic-collapse + .topic-collapse {
        margin-top: 10px;
      }
      .topic-collapse[open] {
        background: rgba(255, 255, 255, 0.05);
      }
      .topic-collapse-summary {
        list-style: none;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        cursor: pointer;
        padding: 8px 10px;
        border-radius: 10px;
        font-weight: 700;
      }
      .topic-collapse-summary::-webkit-details-marker {
        display: none;
      }
      .topic-collapse-title {
        font-size: 15px;
      }
      .topic-collapse-body {
        display: grid;
        gap: 10px;
        padding: 8px 6px 6px;
      }
      .user-detail {
        /* margin-top: 10px; */
        display: none;
      }
      .user-detail.active {
        display: block;
      }
      .user-detail .actions {
        justify-content: center;
        width: 100%;
      }
      .user-detail .actions .btn {
        flex: 1 25 0;
      }
      form {
        display: grid;
        gap: 10px;
        margin-top: 8px;
        width: 100%;
        max-width: 100%;
      }
      label {
        display: grid;
        gap: 6px;
        color: var(--muted);
        font-size: 14px;
      }
      #importForm label {
        min-width: 0;
        overflow-wrap: anywhere; /* Prevent long CSV headers from overflowing the container */
      }
      input,
      textarea,
      select {
        width: 100%;
        max-width: 100%;
        padding: 10px 12px;
        border-radius: 10px;
        border: 1px solid var(--border);
        background: rgba(255, 255, 255, 0.04);
        color: var(--text);
        font-size: 14px;
      }
      textarea {
        resize: vertical;
        min-height: 72px;
      }
      .empty {
        padding: 12px;
        color: var(--muted);
      }
      .hidden {
        display: none;
      }
      .notice {
        padding: 10px 12px;
        border-radius: 10px;
        border: 1px dashed var(--border);
        background: rgba(255, 255, 255, 0.03);
        color: var(--muted);
        margin-bottom: 10px;
      }
      .auth-error {
        position: fixed;
        inset: 0;
        display: none;
        align-items: center;
        justify-content: center;
        padding: 18px;
        background: linear-gradient(145deg, rgba(12, 17, 27, 0.94), rgba(19, 27, 44, 0.94));
        backdrop-filter: blur(6px);
        z-index: 999;
      }
      .auth-error.active {
        display: flex;
      }
      .auth-card {
        width: min(520px, 100%);
        background: var(--panel);
        border: 1px solid var(--border);
        border-radius: 16px;
        padding: 18px 16px;
        text-align: center;
        box-shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
      }
      .auth-card h2 {
        margin: 0 0 8px;
        font-size: 22px;
      }
      .auth-card p {
        margin: 4px 0 0;
        color: var(--muted);
      }
      div.contenitore {background:#000;color:#FFF;width:100%;height:1000px;padding:20px;}
.icon-check {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  display: inline-block;
  vertical-align: middle;
}
