/* ===================== GLOBAL ===================== */
body {
    background:
    radial-gradient(circle at top, rgba(88,166,255,.10), transparent 55%),
    radial-gradient(circle at bottom, rgba(34,197,94,.07), transparent 55%),
    #0a182e;
    font-family: 'Segoe UI', Roboto, Arial, sans-serif;
    margin: 0;
    padding: 0;
    color: #e6e6e6;
}

/* ===================== CONTAINER ===================== */
.container {
    width: 90%;
    max-width: 1300px;
    margin: auto;
    padding-top: 40px;
}

/* ===================== TITLES ===================== */
.title {
    font-size: 45px;
    font-weight: 800;
    text-align: center;
    color: #58a6ff;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 20px;
    text-align: center;
    color: #c9d1d9;
    margin-bottom: 40px;
}

/* ===================== HOME BUTTON FIX ===================== */
.back-home {
    display: inline-flex;
    margin-bottom: 35px !important;
    margin-top: 10px;
   
}

/* ===================== GRID ===================== */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    grid-gap: 30px;
}

/* ===================== CARDS / BOXES ===================== */
.box {
    background: rgba(32, 42, 56, 0.65);
    backdrop-filter: blur(6px);
    border: 3px solid rgba(240, 246, 252, 0.09);
    border-radius: 18px;
    padding: 30px;
    text-decoration: none;
    color: #ffffff;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.box:hover {
    background: rgba(31, 111, 235, 0.25);
    border-color: #58a6ff;
    transform: translateY(-6px);
    box-shadow: 0 10px 30px rgba(88, 166, 255, 0.4);
}

.box-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 8px;
}

.box-desc {
    font-size: 14px;
    opacity: 0.85;
}

/* ===================== TABLES ===================== */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.table th,
.table td {
    border: 1px solid #30363d;
    padding: 8px 10px;
    font-size: 14px;
}

.table th {
    background: #161b22;
}

.table tr:hover td {
    background: rgba(88, 166, 255, 0.08);
}

/* ===================== BUTTONS ===================== */
.btn-primary,
.btn-secondary {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    margin-right: 6px;
    transition: background 0.2s ease, transform 0.15s ease;
}

.btn-primary {
    background: #1f6feb;
    color: white;
}

.btn-primary:hover {
    background: #388bfd;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #30363d;
    color: white;
}

.btn-secondary:hover {
    background: #484f58;
    transform: translateY(-2px);
}

.delete-btn {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 10px;
    padding: 8px 14px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s ease, transform 0.15s ease;
}

.delete-btn:hover {
    background: #b02a37;
    transform: translateY(-2px);
}

/* ===================== LISTS ===================== */
.list {
    list-style: none;
    padding: 0;
}

.list li {
    margin-bottom: 8px;
    padding: 3px 0;
    transition: 0.18s ease;
}

.list li:hover {
    padding-left: 6px;
}

.list-link {
    color: #e6e6e6;
    text-decoration: none;
    transition: 0.18s;
}

.list-link:hover {
    text-decoration: underline;
    color: #58a6ff;
}

.no-data {
    color: #999;
}

/* ===================== FORMS ===================== */
.filter-form input[type="text"],
form input[type="text"],
form input[type="file"],
form select {
    padding: 7px 10px;
    border-radius: 8px;
    border: 1px solid #30363d;
    background: #0d1117;
    color: #e6e6e6;
    margin-right: 6px;
    margin-bottom: 6px;
    transition: 0.2s ease;
}

form input[type="text"]:focus,
form select:focus {
    border-color: #58a6ff;
    outline: none;
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 600px) {
    .title {
        font-size: 35px;
    }
    .box {
        height: auto;
    }
}

/* ================================
   FIX: select non si apre (overlay click)
   ================================ */

/* Se esistono overlay/modali invisibili, devono NON prendere click */
.modal-back,
.mon-modal-back,
.noteBack,
#noteBack,
#mBack{
  pointer-events: none !important;
}

/* quando un overlay è davvero visibile, rimettiamo i click */
.modal-back[style*="display: flex"],
.mon-modal-back[style*="display: flex"],
#noteBack[style*="display: flex"],
#mBack[style*="display: flex"]{
  pointer-events: auto !important;
}

/* Assicura che i campi siano sempre cliccabili */
select, input, textarea, button, a {
  pointer-events: auto !important;
  position: relative;
  z-index: 5;
}

/* Evita che wrapper grandi “coprano” i campi */
.ew-card, .ew-grid, .grid, .container, main {
  position: relative;
  z-index: 1;
}


header, .topbar, .navbar {
  z-index: 1 !important;
}

a, button { position: relative; z-index: 50; }
/* ===================== EXTRA WORKS STATS PAGE FIX ===================== */

/* EXTRA WORKS: bottone stats sempre cliccabile */
#btnStatsEW{
  position: relative !important;
  z-index: 999999 !important;
  pointer-events: auto !important;
}
/* FINE EXTRA WORKS STATS PAGE FIX ===================== */






@media (max-width: 900px){
  .grid{ grid-template-columns: 1fr !important; gap: 14px; }
  .card{ padding: 14px !important; }
  .input-text, select, textarea, button{ width: 100% !important; }
  table{ display:block; overflow-x:auto; white-space:nowrap; }
}



