/* =========================================================
   HUBMIO THEME
   File centrale: /includes/ui/hubmio_theme.css
   ========================================================= */

:root{
  --hub-bg:#020b1e;
  --hub-card-1:rgba(8,31,67,.86);
  --hub-card-2:rgba(5,20,48,.78);
  --hub-card-3:rgba(18,19,58,.78);
  --hub-cyan:#29d7ff;
  --hub-blue:#3284ff;
  --hub-violet:#8257ff;
  --hub-text:#f5fbff;
  --hub-muted:#aebfd6;
  --hub-border:rgba(67,210,255,.34);
  --hub-border-hover:rgba(91,226,255,.66);
}

html, body{
  min-height:100%;
}

body{
  color:var(--hub-text);
  background-color:#020b1e;
  background-image:
    linear-gradient(180deg, rgba(2,10,28,.12) 0%, rgba(2,10,28,.28) 100%),
    url('/assets/img/hubmio-dashboard-bg.png');
  background-size:cover;
  background-position:center top;
  background-repeat:no-repeat;
  background-attachment:fixed;
}

@media (max-width:991.98px){
  body{
    background-attachment:scroll;
    background-size:auto 100vh;
    background-position:center top;
  }
}

/* PAGE HEADER / SECTION TOOLBAR */
.ui-page-head h1,
.section-title{
  color:#f7fbff;
  font-weight:750;
  letter-spacing:.01em;
  text-shadow:0 1px 14px rgba(0,194,255,.12);
}

.ui-page-head .text-muted,
.section-title + .text-muted{
  color:#b4c6dd !important;
}

/* CARDS / BOX */
.mod-box,
.mod-card.card{
  position:relative;
  isolation:isolate;
  background:
    linear-gradient(145deg, var(--hub-card-1) 0%, var(--hub-card-2) 55%, var(--hub-card-3) 100%);
  border:1px solid var(--hub-border);
  border-radius:20px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.07),
    0 18px 42px rgba(0,0,0,.28),
    0 0 0 1px rgba(0,195,255,.03),
    0 0 28px rgba(0,174,255,.08);
  overflow:hidden;
  backdrop-filter:blur(14px) saturate(135%);
  -webkit-backdrop-filter:blur(14px) saturate(135%);
  transition:transform .22s ease, box-shadow .22s ease, border-color .22s ease, background .22s ease;
}

.mod-box::before,
.mod-card.card::before{
  content:"";
  position:absolute;
  inset:0;
  z-index:-1;
  pointer-events:none;
  background:
    radial-gradient(circle at 12% 0%, rgba(0,216,255,.16), transparent 34%),
    radial-gradient(circle at 100% 100%, rgba(143,72,255,.13), transparent 38%);
}

.mod-box::after,
.mod-card.card::after{
  content:"";
  position:absolute;
  left:18px;
  right:18px;
  top:0;
  height:1px;
  pointer-events:none;
  background:linear-gradient(90deg, transparent, rgba(95,224,255,.82), rgba(154,94,255,.60), transparent);
  opacity:.72;
}

.mod-box:hover,
.mod-card.card:hover{
  transform:translateY(-4px);
  border-color:var(--hub-border-hover);
  background:
    linear-gradient(145deg, rgba(10,38,80,.92) 0%, rgba(6,24,56,.86) 55%, rgba(23,22,70,.86) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.09),
    0 22px 48px rgba(0,0,0,.34),
    0 0 0 1px rgba(0,206,255,.06),
    0 0 34px rgba(0,194,255,.15),
    0 0 46px rgba(127,67,255,.08);
}

.mod-card .card-body{
  position:relative;
  z-index:1;
  padding:20px;
}

.mod-card .card-title{
  color:#f7fbff;
  font-weight:750;
}

.mod-card .text-muted,
.mod-box .text-muted,
.card-note,
.user-note,
.kpi-label{
  color:var(--hub-muted) !important;
}

/* BUTTONS */
.btn.btn-primary{
  color:#fff;
  border:1px solid rgba(97,226,255,.58);
  border-radius:10px;
  background:linear-gradient(135deg, #00a8ff 0%, #4169ff 52%, #7b4dff 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.22),
    0 8px 18px rgba(0,145,255,.22),
    0 0 18px rgba(92,93,255,.13);
  font-weight:650;
  transition:all .18s ease;
}

.btn.btn-primary:hover{
  color:#fff;
  border-color:rgba(129,237,255,.84);
  background:linear-gradient(135deg, #10b9ff 0%, #5577ff 50%, #8d5cff 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.28),
    0 10px 24px rgba(0,155,255,.30),
    0 0 22px rgba(115,82,255,.20);
  transform:translateY(-1px);
}

.btn.btn-outline-primary,
.btn.btn-outline-secondary{
  color:#d9f7ff;
  border:1px solid rgba(80,204,255,.36);
  border-radius:10px;
  background:linear-gradient(180deg, rgba(18,71,114,.44), rgba(17,34,76,.42));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.06), 0 5px 14px rgba(0,0,0,.12);
  font-weight:600;
  transition:all .18s ease;
}

.btn.btn-outline-primary:hover,
.btn.btn-outline-secondary:hover{
  color:#fff;
  border-color:rgba(89,222,255,.68);
  background:linear-gradient(180deg, rgba(14,113,166,.58), rgba(57,45,131,.58));
  box-shadow:0 8px 18px rgba(0,153,255,.18), 0 0 16px rgba(89,204,255,.10);
  transform:translateY(-1px);
}

.btn.btn-outline-danger{
  color:#ffc5cf;
  border:1px solid rgba(255,94,125,.42);
  border-radius:10px;
  background:rgba(129,26,53,.20);
}

.btn.btn-outline-danger:hover{
  color:#fff;
  border-color:rgba(255,116,143,.75);
  background:rgba(183,39,72,.42);
}

/* FORMS */
.form-label{
  color:#e7f4ff;
  font-weight:600;
}

.form-control,
.form-select{
  color:#ecf8ff;
  background:rgba(7,26,55,.72);
  border:1px solid rgba(82,196,255,.24);
  border-radius:10px;
}

.form-control:focus,
.form-select:focus{
  color:#fff;
  background:rgba(8,31,65,.84);
  border-color:rgba(73,216,255,.62);
  box-shadow:0 0 0 .2rem rgba(41,191,255,.12);
}

.form-control::placeholder{
  color:#7f96b1;
}

.form-text{
  color:#8ea5bf !important;
}

/* TABLES */
.mod-table-wrap{
  border-radius:14px;
  overflow:auto;
  border:1px solid rgba(79,200,255,.18);
}

.table{
  --bs-table-bg:transparent;
  --bs-table-color:#eaf6ff;
  --bs-table-border-color:rgba(91,170,220,.14);
  margin-bottom:0;
}

.table thead th{
  color:#eaf8ff;
  background:linear-gradient(180deg, rgba(20,64,105,.72) 0%, rgba(18,33,76,.70) 100%);
  border-bottom-color:rgba(86,215,255,.24);
}

.table tbody td{
  background:rgba(5,21,48,.54);
}

.table tbody tr:hover td{
  background:rgba(12,47,84,.66);
}

.table .text-muted{
  color:#8fa8c4 !important;
}

/* SEARCH / SMALL PANELS */
.user-search-box{
  border:1px solid rgba(76,205,255,.22);
  background:linear-gradient(145deg, rgba(8,35,70,.56), rgba(22,22,67,.48));
  border-radius:14px;
  padding:12px;
  margin-top:14px;
  margin-bottom:14px;
}

/* MODALS */
.modal-content{
  color:#edf8ff;
  border-radius:18px;
  border:1px solid rgba(72,211,255,.34);
  background:linear-gradient(145deg, rgba(7,28,61,.98), rgba(17,19,59,.98));
  box-shadow:0 18px 44px rgba(0,0,0,.42), 0 0 28px rgba(0,177,255,.10);
}

.modal-header,
.modal-footer{
  background:transparent;
  border-color:rgba(82,190,240,.14);
}

.modal .btn-close{
  filter:invert(1) grayscale(1) brightness(1.6);
}

/* BADGES / KPI */
.badge{
  border:1px solid rgba(255,255,255,.10);
  box-shadow:0 3px 10px rgba(0,0,0,.14);
}

.kpi-number{
  color:#fff;
  font-size:1.6rem;
  line-height:1;
  font-weight:750;
  text-shadow:0 0 16px rgba(37,200,255,.14);
}

.page-grid{
  margin-top:20px;
}

@media (max-width:767.98px){
  .mod-box,
  .mod-card.card{
    border-radius:17px;
    backdrop-filter:blur(9px);
    -webkit-backdrop-filter:blur(9px);
  }

  .mod-box:hover,
  .mod-card.card:hover{
    transform:none;
  }

  .mod-card .card-body{
    padding:17px;
  }
}
/* =========================================================
   HUBMIO · correzione globale tendine native (Chrome/Edge)
   Da aggiungere in fondo a /includes/ui/hubmio_theme.css
   ========================================================= */

/* Consente al browser di disegnare il menu nativo con palette scura. */
select.form-select,
select.form-control,
select:not([class]){
  color-scheme:dark;
}

/* Alcune pagine legacy impostavano il colore scuro sulle option:
   !important mantiene questa regola centrale prevalente. */
select option,
select optgroup,
select.form-select option,
select.form-control option{
  color:#f5fbff !important;
  background-color:#112c50 !important;
}

/* Colori richiesti al browser; l'evidenziazione nativa puo' dipendere dal SO. */
select option:checked{
  color:#fff !important;
  background-color:#2065ad !important;
}

select option:disabled{
  color:#9cafc9 !important;
  background-color:#112c50 !important;
}
