/* ==== xterm.css 5.5 (MIT) — file esterno, niente CDN ==== */
/**
 * Copyright (c) 2014 The xterm.js authors. All rights reserved.
 * Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
 * https://github.com/chjj/term.js
 * @license MIT
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 *
 * Originally forked from (with the author's permission):
 *   Fabrice Bellard's javascript vt100 for jslinux:
 *   http://bellard.org/jslinux/
 *   Copyright (c) 2011 Fabrice Bellard
 *   The original design remains. The terminal itself
 *   has been extended to include xterm CSI codes, among
 *   other features.
 */

/**
 *  Default styles for xterm.js
 */

.xterm {
    cursor: text;
    position: relative;
    user-select: none;
    -ms-user-select: none;
    -webkit-user-select: none;
}

.xterm.focus,
.xterm:focus {
    outline: none;
}

.xterm .xterm-helpers {
    position: absolute;
    top: 0;
    /**
     * The z-index of the helpers must be higher than the canvases in order for
     * IMEs to appear on top.
     */
    z-index: 5;
}

.xterm .xterm-helper-textarea {
    padding: 0;
    border: 0;
    margin: 0;
    /* Move textarea out of the screen to the far left, so that the cursor is not visible */
    position: absolute;
    opacity: 0;
    left: -9999em;
    top: 0;
    width: 0;
    height: 0;
    z-index: -5;
    /** Prevent wrapping so the IME appears against the textarea at the correct position */
    white-space: nowrap;
    overflow: hidden;
    resize: none;
}

.xterm .composition-view {
    /* TODO: Composition position got messed up somewhere */
    background: #000;
    color: #FFF;
    display: none;
    position: absolute;
    white-space: nowrap;
    z-index: 1;
}

.xterm .composition-view.active {
    display: block;
}

.xterm .xterm-viewport {
    /* On OS X this is required in order for the scroll bar to appear fully opaque */
    background-color: #000;
    overflow-y: scroll;
    cursor: default;
    position: absolute;
    right: 0;
    left: 0;
    top: 0;
    bottom: 0;
}

.xterm .xterm-screen {
    position: relative;
}

.xterm .xterm-screen canvas {
    position: absolute;
    left: 0;
    top: 0;
}

.xterm .xterm-scroll-area {
    visibility: hidden;
}

.xterm-char-measure-element {
    display: inline-block;
    visibility: hidden;
    position: absolute;
    top: 0;
    left: -9999em;
    line-height: normal;
}

.xterm.enable-mouse-events {
    /* When mouse events are enabled (eg. tmux), revert to the standard pointer cursor */
    cursor: default;
}

.xterm.xterm-cursor-pointer,
.xterm .xterm-cursor-pointer {
    cursor: pointer;
}

.xterm.column-select.focus {
    /* Column selection mode */
    cursor: crosshair;
}

.xterm .xterm-accessibility:not(.debug),
.xterm .xterm-message {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    right: 0;
    z-index: 10;
    color: transparent;
    pointer-events: none;
}

.xterm .xterm-accessibility-tree:not(.debug) *::selection {
  color: transparent;
}

.xterm .xterm-accessibility-tree {
  user-select: text;
  white-space: pre;
}

.xterm .live-region {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.xterm-dim {
    /* Dim should not apply to background, so the opacity of the foreground color is applied
     * explicitly in the generated class and reset to 1 here */
    opacity: 1 !important;
}

.xterm-underline-1 { text-decoration: underline; }
.xterm-underline-2 { text-decoration: double underline; }
.xterm-underline-3 { text-decoration: wavy underline; }
.xterm-underline-4 { text-decoration: dotted underline; }
.xterm-underline-5 { text-decoration: dashed underline; }

.xterm-overline {
    text-decoration: overline;
}

.xterm-overline.xterm-underline-1 { text-decoration: overline underline; }
.xterm-overline.xterm-underline-2 { text-decoration: overline double underline; }
.xterm-overline.xterm-underline-3 { text-decoration: overline wavy underline; }
.xterm-overline.xterm-underline-4 { text-decoration: overline dotted underline; }
.xterm-overline.xterm-underline-5 { text-decoration: overline dashed underline; }

.xterm-strikethrough {
    text-decoration: line-through;
}

.xterm-screen .xterm-decoration-container .xterm-decoration {
        z-index: 6;
        position: absolute;
}

.xterm-screen .xterm-decoration-container .xterm-decoration.xterm-decoration-top-layer {
        z-index: 7;
}

.xterm-decoration-overview-ruler {
    z-index: 8;
    position: absolute;
    top: 0;
    right: 0;
    pointer-events: none;
}

.xterm-decoration-top {
    z-index: 2;
    position: relative;
}


/* ================================================================
   COPIA DI SICUREZZA del foglio generale (solo la parte che serve a
   questa pagina). Senza !important: quando _genstyle.css c'è vince
   lui, quando manca valgono queste regole. Colori = palette del sito.
   ================================================================ */
:root{
  --bg-color:#0a7276; --container-bg:#c8e8e6; --outside-text:#eaf6f5;
  --hover-bg:#b0d8d5; --header-bg:#eef5f3; --border-color:#9cc7c4;
  --text-color:#0a3d40; --text-muted:#48686a; --accent-color:#086a6d;
  --accent-hover:#0c8f94; --folder-color:#206c98; --folder-hover:#2e86b8;
  --prompt-color:#206c98; --prompt-hover:#3485b5; --prompt-text:#ffffff;
}
html,body{background-color:var(--bg-color);color:var(--outside-text);
  font-family:'Segoe UI',Arial,sans-serif;margin:0;padding:20px;}
table{width:100%;max-width:1000px;margin:20px auto;border-collapse:collapse;
  background:var(--container-bg);border:1px solid var(--border-color);
  box-shadow:0 4px 15px rgba(4,36,38,.35);}
th,td{padding:12px 16px;border-bottom:1px solid var(--border-color);
  color:var(--text-color);font-size:1rem;text-align:left;}
th{background:var(--header-bg);color:var(--text-muted);font-weight:600;
  text-transform:uppercase;font-size:.85rem;letter-spacing:.05em;white-space:nowrap;}
tr:hover{background:var(--hover-bg);}
td{height:56px;white-space:nowrap;vertical-align:middle;}
a{color:var(--accent-color);text-decoration:none;font-weight:500;}
a:hover{color:var(--accent-hover);text-decoration:underline;}
input[type="button"],input[type="submit"],button,label.gest-sfoglia{
  background-color:var(--prompt-color);color:var(--prompt-text);border:none;
  padding:6px 14px;cursor:pointer;font-weight:600;font-size:.9rem;
  font-family:inherit;transition:background .2s;}
button:hover,label.gest-sfoglia:hover{background-color:var(--prompt-hover);}
button:disabled{background-color:var(--prompt-color);opacity:.55;cursor:not-allowed;}
::selection{background:#3584e4;color:#fff;}
.file-name{font-size:1.2em;}
th.titolo-pagina{text-transform:none;font-size:1.5rem;letter-spacing:normal;
  color:var(--text-color);font-weight:700;white-space:normal;text-align:center;}
td.riepilogo{background:var(--header-bg);color:var(--text-muted);font-weight:600;
  font-size:.85rem;letter-spacing:.05em;text-transform:uppercase;white-space:nowrap;}

/* ================================================================
   SPECIFICO DEL TERMINALE — con !important per vincere le regole
   generiche del foglio di stile (td { height:56px; nowrap } ecc.)
   ================================================================ */
.hidden{display:none!important}

/* ---- pulsanti emoji (↻ riavvia, 🖥️ esci): allineati alle emoji-link
   del sito principale (a.vassoio-zip / a.lente-vedi di _genstyle.css):
   stesse dimensioni, niente sfondo/bordo, hover = dissolvenza (opacity:0.7)
   senza sottolineatura ---- */
button.trm-tbtn{margin:0!important;
  text-transform:none!important;font-size:1.3rem!important;font-weight:600!important;
  line-height:1.2!important;padding:2px 4px!important;
  background:none!important;border:none!important;
  color:var(--text-color)!important;cursor:pointer!important;
  text-decoration:none!important;}
a.trm-tbtn{margin:0!important;
  text-transform:none!important;font-size:1.3rem!important;font-weight:600!important;
  line-height:1.2!important;padding:2px 4px!important;display:inline-flex!important;
  align-items:center;
  background:none!important;border:none!important;
  color:var(--text-color)!important;
  text-decoration:none!important;}
a.trm-tbtn:hover,button.trm-tbtn:hover{background:none!important;
  color:var(--text-color)!important;text-decoration:none!important;
  opacity:0.7;}

/* ---- chip «riga in corso» (eco alla cieca mentre l'output vola):
      appare SOLO quando c'è una riga in attesa, in fondo a destra
      del video del terminale ---- */
#stDraft{position:absolute;right:16px;bottom:12px;max-width:60%;z-index:30;
  text-transform:none!important;font-family:Consolas,"Courier New",monospace!important;
  font-weight:400!important;font-size:.85rem!important;color:#0a3d40;
  background:rgba(238,245,243,.94);border:1px solid var(--border-color);
  border-radius:3px;padding:2px 10px;pointer-events:none;letter-spacing:0;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
  box-shadow:0 2px 10px rgba(4,36,38,.28);}
#stDraft:empty{display:none!important;}

/* ---- area del terminale ---- */
td.trm-term{height:auto!important;padding:8px!important;position:relative;}
#terminal{height:460px;width:100%;background:#c8e8e6;cursor:text;
  font-family:Consolas,"Courier New",monospace;font-size:16.5px;}
#terminal .xterm{height:100%;}
@media (max-width:640px){ #terminal{height:340px} }

/* ---- pannello file di _shared ---- */
th.trm-up{text-transform:none!important;letter-spacing:normal!important;
  font-weight:400!important;font-size:1rem!important;height:auto!important;
  white-space:normal!important;color:var(--text-color)!important;}
/* v4.0: la barra si ESTENDE per tutta la larghezza della cella (che ora
   spanna le 5 colonne): tasti a sinistra, limiti a destra, come la
   barra di caricamento di _gestione.php; in strettezza va a capo */
.trm-upform{display:flex;flex-wrap:wrap;gap:10px;align-items:center;
  justify-content:space-between;}
.trm-upnav{display:flex;flex-wrap:wrap;gap:6px;align-items:center;}
.trm-upsx{display:flex;flex-wrap:wrap;gap:10px;align-items:center;position:relative;}
.trm-updx{display:flex;flex-wrap:wrap;gap:10px;align-items:center;}
#upInput{position:absolute;width:1px;height:1px;opacity:0;overflow:hidden;}
#upMsg{color:var(--text-muted);font-size:.9rem;}
#upMsg.err{color:#9b2c23;}
#upMsg.ok{color:#0c6b3f;}
table.trm-drop{outline:4px dashed var(--accent-color);outline-offset:-8px;}

button.trm-nome{background:none!important;border:none!important;
  color:var(--accent-color)!important;font-weight:500!important;font-size:1.2rem!important;
  padding:0!important;cursor:pointer!important;text-align:left;font-family:inherit;
  text-transform:none!important;letter-spacing:normal!important;}
button.trm-nome:hover{background:none!important;color:var(--accent-hover)!important;
  text-decoration:underline!important;}
button.trm-nome.trm-dir{color:var(--folder-color)!important;font-weight:700!important;}
button.trm-nome.trm-dir:hover{color:var(--folder-hover)!important;text-decoration:underline!important;}
td.trm-dim{text-align:right!important;}
th.trm-colaz{width:1%!important;}
td.trm-az{text-align:right!important;width:1%!important;}
button.trm-del{background:none!important;border:none!important;color:var(--text-muted)!important;
  font-size:1.1rem!important;font-weight:400!important;padding:2px 6px!important;
  cursor:pointer!important;text-transform:none!important;}
button.trm-del:hover{background:none!important;color:#9b2c23!important;}
td.trm-vuoto{height:auto!important;white-space:normal!important;text-align:center!important;
  color:var(--text-muted)!important;background:var(--container-bg)!important;
  font-size:1rem!important;text-transform:none!important;letter-spacing:normal!important;
  font-weight:400!important;}

/* ---- overlay (sessione scaduta / shell terminata) ---- */
#overlay{position:fixed;inset:0;background:rgba(10,114,118,.78);
  display:flex;align-items:center;justify-content:center;z-index:60;padding:20px;}
.trm-ov{width:440px;max-width:94vw;padding:26px 24px;background:var(--container-bg);
  border:1px solid var(--border-color);box-shadow:0 14px 50px rgba(4,36,38,.5);
  text-align:center;color:var(--text-color);}
.trm-ov h2{margin:0 0 10px;font-size:1.25rem;color:var(--text-color);}
.trm-ov p{margin:0 0 18px;color:var(--text-muted);font-size:.95rem;line-height:1.55;
  white-space:normal;}
.trm-ov-actions{display:flex;gap:10px;justify-content:center;flex-wrap:wrap;}

/* ---- toast ---- */
#toast{position:fixed;bottom:26px;left:50%;transform:translateX(-50%);
  background:var(--container-bg);color:var(--text-color);
  border:1px solid var(--border-color);padding:9px 20px;font-size:.92rem;
  box-shadow:0 8px 30px rgba(4,36,38,.45);z-index:70;max-width:90vw;}