/* =========================================================================
   HostingRent — Area clienti WHMCS · tema "moderno & tech"
   Caricato per ULTIMO da Nexus (sovrascrive theme.min.css / all.min.css).
   Light + Dark automatico (prefers-color-scheme). Font: Sora + IBM Plex Sans.
   ========================================================================= */

@import url('fonts.css');   /* font self-hosted (Sora, IBM Plex Sans/Mono) — stesso dominio, no CSP block */

/* ----------------------------- Tokens ---------------------------------- */
:root {
  --font-display: 'Sora', system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body:    'IBM Plex Sans', system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono:    'IBM Plex Mono', ui-monospace, "SFMono-Regular", Menlo, monospace;

  --brand:        #0962c9;   /* blu HostingRent */
  --brand-strong: #074aa0;
  --brand-2:      #1e8bf0;   /* blu chiaro (gradienti) */
  --accent:       #fea701;   /* arancione HostingRent */
  --accent-strong:#e08f00;

  --bg:        #eef3fa;
  --bg-2:      #e6edf6;
  --surface:   #ffffff;
  --surface-2: #f3f7fc;
  --ink:       #0f1b2d;
  --ink-soft:  #46566c;
  --muted:     #6b7c93;
  --border:    #e1e8f2;
  --border-2:  #eef2f8;

  --ok:   #1f9d57;
  --warn: #d98a00;
  --err:  #d23c3c;

  --radius:   14px;
  --radius-sm:10px;
  --shadow:   0 6px 24px rgba(15,27,45,.08), 0 1px 2px rgba(15,27,45,.05);
  --shadow-lg:0 18px 48px rgba(9,98,201,.16);
  --ring:     0 0 0 4px rgba(9,98,201,.16);
  --grad:     linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  --grad-accent: linear-gradient(135deg, var(--accent) 0%, #ffc24d 100%);
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand:        #3b8ef0;
    --brand-strong: #2f7fe0;
    --brand-2:      #56a6ff;
    --accent:       #ffb733;
    --accent-strong:#ffa50f;

    --bg:        #0a111e;
    --bg-2:      #0d1626;
    --surface:   #121d30;
    --surface-2: #17243a;
    --ink:       #e9eff8;
    --ink-soft:  #b9c6d8;
    --muted:     #8598b0;
    --border:    #223350;
    --border-2:  #1a2740;

    --shadow:    0 8px 28px rgba(0,0,0,.45), 0 1px 2px rgba(0,0,0,.4);
    --shadow-lg: 0 20px 50px rgba(0,0,0,.55);
    --ring:      0 0 0 4px rgba(59,142,240,.25);
  }
}

/* ------------------------------ Base ----------------------------------- */
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4, h5, .h1, .h2, .h3, .h4, .h5,
.card-title, .navbar-brand {
  font-family: var(--font-display);
  letter-spacing: -.01em;
  color: var(--ink);
}
h1, h2, .h1, .h2 { font-weight: 700; }
a { color: var(--brand); transition: color .15s ease; }
a:hover { color: var(--brand-strong); }
code, kbd, pre, .invoice-number, .text-monospace { font-family: var(--font-mono); }
hr { border-top-color: var(--border); }
.text-muted { color: var(--muted) !important; }

/* ----------------------- Header / navbar ------------------------------- */
.header { background: transparent; }

/* Barra "loggato come" in alto */
.header .topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.header .topbar .btn { color: var(--ink-soft); }
.header .topbar .input-group-text { background: transparent; border: 0; color: var(--muted); }
.btn-active-client { color: var(--brand) !important; font-weight: 600; }

/* Riga logo + carrello: sticky con vetro smerigliato */
.header .navbar.navbar-light {
  position: sticky; top: 0; z-index: 1020;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(15,27,45,.02);
}
.header .navbar-brand .logo-img { max-height: 40px; width: auto; }

.header .search .form-control {
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  border-color: var(--border);
  background: var(--surface-2);
}
.header .search .btn {
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  background: var(--surface-2); border-color: var(--border); color: var(--muted);
}

/* Pulsante carrello con contatore arancione */
.cart-btn { color: var(--ink-soft); position: relative; }
.cart-btn .badge {
  background: var(--accent) !important; color: #1b1200 !important;
  font-family: var(--font-body); font-weight: 700;
}

/* Barra di navigazione principale */
.main-navbar-wrapper {
  background: transparent;
  border-bottom: 1px solid var(--border-2);
}
.main-navbar-wrapper .nav-link {
  color: var(--ink-soft); font-weight: 500; border-radius: var(--radius-sm);
  padding: .5rem .9rem; transition: background .15s ease, color .15s ease;
}
.main-navbar-wrapper .nav-link:hover { color: var(--brand); background: var(--surface-2); }
.main-navbar-wrapper .nav-item.active > .nav-link,
.main-navbar-wrapper .nav-link.active { color: var(--brand); background: var(--surface-2); }
.main-navbar-wrapper .dropdown-menu {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  box-shadow: var(--shadow); background: var(--surface); padding: .35rem;
}
.main-navbar-wrapper .dropdown-item { border-radius: 8px; color: var(--ink-soft); }
.main-navbar-wrapper .dropdown-item:hover { background: var(--surface-2); color: var(--brand); }

/* thin brand accent line under the header */
.header::after {
  content: ""; display: block; height: 3px;
  background: var(--grad);
}

/* --------------------------- Breadcrumb -------------------------------- */
.master-breadcrumb {
  background: transparent;
  padding: 1.25rem 0 .25rem;
}
.master-breadcrumb .breadcrumb { background: transparent; padding: 0; margin: 0; }
.master-breadcrumb .breadcrumb-item, .master-breadcrumb a { color: var(--muted); }
.master-breadcrumb .breadcrumb-item.active { color: var(--ink); }

/* ----------------------------- Buttons --------------------------------- */
.btn {
  border-radius: var(--radius-sm); font-weight: 600;
  font-family: var(--font-body); letter-spacing: .01em;
  transition: transform .12s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--grad); border: 0; color: #fff;
  box-shadow: 0 6px 16px rgba(9,98,201,.28);
}
.btn-primary:hover, .btn-primary:focus {
  background: linear-gradient(135deg, var(--brand-strong), var(--brand));
  box-shadow: 0 10px 22px rgba(9,98,201,.36); color: #fff;
}
.btn-outline-primary {
  border: 1.5px solid var(--brand); color: var(--brand); background: transparent;
}
.btn-outline-primary:hover { background: var(--brand); border-color: var(--brand); color: #fff; }

.btn-secondary { background: var(--accent); border: 0; color: #241700; }
.btn-secondary:hover { background: var(--accent-strong); color: #241700; }

.btn-default, .btn-light {
  background: var(--surface); border: 1px solid var(--border); color: var(--ink-soft);
}
.btn-default:hover, .btn-light:hover { background: var(--surface-2); border-color: var(--brand); color: var(--brand); }

.btn-success { background: var(--ok); border: 0; }
.btn-danger  { background: var(--err); border: 0; }

/* ------------------------- Cards / panels ------------------------------ */
.card, .panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card { transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.card-columns.home .card:hover,
.panel-hover:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: color-mix(in srgb, var(--brand) 45%, var(--border));
}
.panel-heading, .card-header {
  background: transparent; border-bottom: 1px solid var(--border);
  font-family: var(--font-display); font-weight: 600;
}
.pricing-card-title { color: var(--ink); font-weight: 700; }

/* ---------------------------- Forms ------------------------------------ */
.form-control, .custom-select {
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.form-control::placeholder { color: var(--muted); }
.form-control:focus, .custom-select:focus {
  border-color: var(--brand); box-shadow: var(--ring); background: var(--surface);
  color: var(--ink);
}
.input-group-text { background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); }
label { color: var(--ink-soft); font-weight: 500; }

/* ---------------------------- Tables ----------------------------------- */
.table { color: var(--ink); }
.table thead th {
  border-bottom: 2px solid var(--border);
  color: var(--muted); font-family: var(--font-display);
  font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em;
}
.table td, .table th { border-top-color: var(--border-2); }
.table-hover tbody tr:hover { background: var(--surface-2); }
.card .table:last-child { margin-bottom: 0; }

/* ---------------------- Sidebar / list nav ----------------------------- */
.sidebar .list-group { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.sidebar .list-group-item {
  background: var(--surface); border-color: var(--border-2); color: var(--ink-soft);
  font-weight: 500;
}
.sidebar .list-group-item.active,
.sidebar .list-group-item:hover {
  background: var(--surface-2); color: var(--brand); border-color: var(--border-2);
}
.sidebar .list-group-item.active { box-shadow: inset 3px 0 0 var(--brand); }
.sidebar .panel, .sidebar .card { box-shadow: var(--shadow); }

/* --------------------------- Alerts ------------------------------------ */
.alert { border-radius: var(--radius-sm); border: 1px solid transparent; }
.alert-success { background: color-mix(in srgb, var(--ok) 12%, var(--surface)); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 30%, transparent); }
.alert-danger  { background: color-mix(in srgb, var(--err) 12%, var(--surface)); color: var(--err); border-color: color-mix(in srgb, var(--err) 30%, transparent); }
.alert-warning { background: color-mix(in srgb, var(--warn) 14%, var(--surface)); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.alert-info    { background: color-mix(in srgb, var(--brand) 10%, var(--surface)); color: var(--brand); border-color: color-mix(in srgb, var(--brand) 26%, transparent); }
.badge-dark { background: var(--ink) !important; }

/* -------------------- Homepage: azioni rapide -------------------------- */
.action-icon-btns a {
  display: block; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem 1rem; text-align: center;
  color: var(--ink-soft); font-weight: 600; font-family: var(--font-display);
  box-shadow: var(--shadow); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, color .18s ease;
}
.action-icon-btns a:hover {
  transform: translateY(-4px); color: var(--brand);
  border-color: color-mix(in srgb, var(--brand) 45%, var(--border));
  box-shadow: var(--shadow-lg);
}
.action-icon-btns .ico-container {
  width: 62px; height: 62px; margin: 0 auto .75rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: 16px; background: var(--grad); color: #fff; font-size: 1.5rem;
  box-shadow: 0 8px 18px rgba(9,98,201,.30);
}
.action-icon-btns a:nth-child(1) .ico-container { background: var(--grad); }
.action-icon-btns .card-accent-pomegranate .ico-container,
.action-icon-btns .card-accent-sun-flower .ico-container { background: var(--grad-accent); color: #241700; box-shadow: 0 8px 18px rgba(254,167,1,.30); }

/* --------------------- Domain search (homepage) ------------------------ */
#domain-checker, .domain-checker, .domainchecker-container {
  background: var(--grad);
  border-radius: 0;
}
#domainchecker .form-control, .domain-checker .form-control {
  border-radius: var(--radius-sm);
}

/* ---------------------------- Footer ----------------------------------- */
.footer {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  color: var(--muted);
  margin-top: 3rem;
}
.footer .nav-link { color: var(--ink-soft); }
.footer .nav-link:hover { color: var(--brand); }
.footer .copyright { color: var(--muted); }
.footer .btn-outline-light { border-color: var(--border); color: var(--ink-soft); }

/* ==================== Dashboard clienti (clientareahome) ================ */
/* Colori semantici (riusati da tile e bottoni pannelli) */
.bg-color-blue        { background-color: var(--brand) !important;  color:#fff !important; }
.bg-color-green       { background-color: var(--ok) !important;     color:#fff !important; }
.bg-color-red,
.bg-color-pomegranate { background-color: var(--err) !important;    color:#fff !important; }
.bg-color-gold,
.bg-color-sun-flower  { background-color: var(--accent) !important; color:#241700 !important; }

/* --- Riga di tile statistiche --- */
.tiles .tile {
  display: flex; flex-direction: column; align-items: flex-start; gap: .2rem;
  height: 100%; margin: .4rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.15rem 1.2rem;
  box-shadow: var(--shadow); color: var(--ink-soft); text-decoration: none;
  position: relative; overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.tiles .tile:hover {
  transform: translateY(-4px); box-shadow: var(--shadow-lg);
  border-color: color-mix(in srgb, var(--brand) 40%, var(--border));
}
.tiles .tile i {
  width: 46px; height: 46px; border-radius: 13px; margin-bottom: .5rem;
  display: flex; align-items: center; justify-content: center; font-size: 1.25rem;
  background: color-mix(in srgb, var(--brand) 12%, transparent); color: var(--brand);
}
.tiles .tile .stat {
  font-family: var(--font-display); font-weight: 700; font-size: 2rem;
  line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums;
}
.tiles .tile .title {
  font-size: .8rem; text-transform: uppercase; letter-spacing: .04em;
  color: var(--muted); font-weight: 600;
}
.tiles .tile .highlight { display: none; }
/* icona colorata per significato (via :has sul bar semaforo Nexus) */
.tiles .tile:has(.bg-color-blue) i  { background: color-mix(in srgb, var(--brand) 12%, transparent);  color: var(--brand); }
.tiles .tile:has(.bg-color-green) i { background: color-mix(in srgb, var(--ok) 14%, transparent);     color: var(--ok); }
.tiles .tile:has(.bg-color-red) i   { background: color-mix(in srgb, var(--err) 13%, transparent);    color: var(--err); }
.tiles .tile:has(.bg-color-gold) i  { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent-strong); }

/* --- Pannelli home (card-accent-*) --- */
.client-home-cards .card { overflow: hidden; }
.client-home-cards .card-header {
  display: flex; align-items: center; background: transparent;
  border-bottom: 1px solid var(--border); padding: .85rem 1.15rem;
}
.client-home-cards .card-title {
  font-size: 1rem; font-weight: 600; font-family: var(--font-display);
  display: flex; align-items: center; gap: .5rem; width: 100%;
}
.client-home-cards .card-title > i { color: var(--brand); }
.client-home-cards .card-header .btn-xs {
  padding: .28rem .7rem; font-size: .74rem; border-radius: 100px; font-weight: 600;
}
.client-home-cards .list-group { border-radius: 0; box-shadow: none; }
.client-home-cards .list-group-item {
  border-color: var(--border-2); color: var(--ink-soft);
  padding: .72rem 1.15rem; background: var(--surface);
}
.client-home-cards .list-group-item-action:hover { background: var(--surface-2); color: var(--brand); }
.client-home-cards .card-footer { background: transparent; border-top: 1px solid var(--border-2); }
.client-home-cards .badge, .tiles .badge {
  background: var(--surface-2); color: var(--ink-soft); font-weight: 600;
  border: 1px solid var(--border);
}

/* ==================== Homepage pubblica: HERO ========================== */
.home-domain-search {
  background: linear-gradient(135deg, var(--brand-strong) 0%, var(--brand) 55%, var(--brand-2) 100%) !important;
  position: relative; overflow: hidden; margin-bottom: 2.5rem;
}
.home-domain-search::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(60% 120% at 15% 0%, rgba(255,255,255,.16), transparent 60%),
    radial-gradient(50% 120% at 100% 100%, rgba(254,167,1,.22), transparent 55%);
}
.home-domain-search .container { position: relative; z-index: 1; }
.home-domain-search .p-5 { padding: 3.5rem 1rem !important; }
.home-domain-search h2 {
  color: #fff; font-family: var(--font-display); font-weight: 800;
  font-size: clamp(1.7rem, 3.4vw, 2.6rem); letter-spacing: -.02em;
  margin-bottom: 1.4rem; text-wrap: balance;
}
.home-domain-search .input-group {
  max-width: 680px; margin: 0 auto; border-radius: 14px; overflow: hidden;
  box-shadow: 0 20px 45px rgba(3,25,60,.35);
}
.home-domain-search .form-control {
  border: 0; padding: 1rem 1.25rem; font-size: 1.05rem; height: auto;
}
.home-domain-search .form-control:focus { box-shadow: none; }
.home-domain-search .input-group .btn { border: 0; padding: 0 1.7rem; font-weight: 700; }
.home-domain-search .btn-primary { background: var(--accent); color: #241700; box-shadow: none; }
.home-domain-search .btn-primary:hover { background: var(--accent-strong); }
.home-domain-search .btn-success { background: rgba(255,255,255,.16); color: #fff; }
.home-domain-search .btn-success:hover { background: rgba(255,255,255,.28); }
.home-domain-search .tld-logos {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 1.4rem;
  list-style: none; padding: 0; margin: 1.6rem 0 0;
}
.home-domain-search .tld-logos li {
  color: rgba(255,255,255,.92); font-size: .9rem; font-weight: 500;
  display: flex; align-items: center; gap: .45rem;
}
.home-domain-search .tld-logos img { height: 22px; width: auto; filter: brightness(0) invert(1); opacity: .9; }
.home-domain-search .btn-link { color: rgba(255,255,255,.85); font-weight: 600; }
.home-domain-search .btn-link:hover { color: #fff; }

/* ---- Card gruppi prodotto (homepage) ---- */
.card-columns.home .card-body { padding: 2rem 1.6rem; }
.card-columns.home .pricing-card-title { font-size: 1.2rem; margin-bottom: .4rem; }

/* ---- Icone azioni rapide (accent per categoria) ---- */
.action-icon-btns .card-accent-teal .ico-container         { background: linear-gradient(135deg,#12a5a5,#0d6a70); color:#fff; box-shadow:0 8px 18px rgba(13,106,112,.30); }
.action-icon-btns .card-accent-pomegranate .ico-container  { background: linear-gradient(135deg,#e0524d,#c0392b); color:#fff; box-shadow:0 8px 18px rgba(192,57,43,.28); }
.action-icon-btns .card-accent-sun-flower .ico-container   { background: linear-gradient(135deg,#ffc24d,#fea701); color:#241700; box-shadow:0 8px 18px rgba(254,167,1,.30); }
.action-icon-btns .card-accent-asbestos .ico-container     { background: linear-gradient(135deg,#8695a6,#5d6d7e); color:#fff; box-shadow:0 8px 18px rgba(93,109,126,.26); }
.action-icon-btns .card-accent-green .ico-container        { background: linear-gradient(135deg,#2ecc77,#1f9d57); color:#fff; box-shadow:0 8px 18px rgba(31,157,87,.28); }
.action-icon-btns .card-accent-midnight-blue .ico-container{ background: var(--grad); color:#fff; box-shadow:0 8px 18px rgba(9,98,201,.30); }

/* ======================= Menu principale ============================== */
.main-navbar-wrapper { background: var(--surface); border-bottom: 1px solid var(--border); }
.main-navbar-wrapper .container { padding-top: .15rem; padding-bottom: .15rem; }
.main-navbar-wrapper .navbar-nav > .nav-item { margin: .25rem .1rem; }
.main-navbar-wrapper .nav-link { position: relative; }
.main-navbar-wrapper .nav-item.active > .nav-link,
.main-navbar-wrapper .nav-link.active {
  color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, transparent);
}
/* indicatore attivo */
.main-navbar-wrapper .nav-item.active > .nav-link::after,
.main-navbar-wrapper .nav-link.active::after {
  content: ""; position: absolute; left: .9rem; right: .9rem; bottom: 0;
  height: 2px; background: var(--brand); border-radius: 2px;
}
.main-navbar-wrapper .dropdown-toggle::after { color: var(--muted); }

/* Topbar "loggato come" più discreta */
.header .topbar .btn-active-client { font-weight: 700; }

/* ============================== Login ================================= */
/* Overlay a tutto schermo: copre header/menu/footer di WHMCS (niente chrome). */
.hr-login {
  position: fixed; inset: 0; z-index: 3000; overflow-y: auto;
  display: grid; grid-template-columns: 1.05fr .95fr;
  background: var(--bg); font-family: var(--font-body);
}
@media (max-width: 860px) {
  .hr-login { grid-template-columns: 1fr; }
  .hr-login__brand { display: none; }
}

/* Pannello brand (sinistra) */
.hr-login__brand {
  position: relative; overflow: hidden; color: #fff;
  display: flex; align-items: center;
  padding: 3rem clamp(2rem, 4vw, 4.5rem);
  background: linear-gradient(150deg, var(--brand-strong) 0%, var(--brand) 55%, var(--brand-2) 100%);
}
.hr-login__brand::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(52% 55% at 10% 6%, rgba(255,255,255,.16), transparent 60%),
    radial-gradient(62% 60% at 100% 100%, rgba(254,167,1,.28), transparent 55%);
}
.hr-login__brandwrap { position: relative; z-index: 1; max-width: 460px; }
.hr-login__logo { height: 40px; width: auto; margin-bottom: 2.5rem; filter: brightness(0) invert(1); }
.hr-login__title {
  font-family: var(--font-display); font-weight: 800; letter-spacing: -.02em;
  font-size: clamp(1.9rem, 2.6vw, 2.7rem); line-height: 1.12; margin: 0 0 1rem; text-wrap: balance;
}
.hr-login__sub { font-size: 1.05rem; color: rgba(255,255,255,.85); margin: 0 0 2.25rem; }
.hr-login__feats { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .9rem; }
.hr-login__feats li { display: flex; align-items: center; gap: .8rem; color: rgba(255,255,255,.92); font-weight: 500; }
.hr-login__feats i {
  width: 36px; height: 36px; border-radius: 10px; flex: none;
  background: rgba(255,255,255,.14); display: flex; align-items: center; justify-content: center; font-size: .95rem;
}

/* Pannello form (destra) */
.hr-login__panel { display: flex; align-items: center; justify-content: center; padding: clamp(1.5rem, 4vw, 3rem); }
.hr-login__card { width: 100%; max-width: 400px; }
.hr-login__mobilelogo { display: none; text-align: center; margin-bottom: 1.75rem; }
.hr-login__mobilelogo img { height: 40px; }
@media (max-width: 860px) { .hr-login__mobilelogo { display: block; } }
.hr-login__h { font-family: var(--font-display); font-weight: 700; font-size: 1.7rem; color: var(--ink); margin: 0 0 .25rem; }
.hr-login__hsub { color: var(--muted); margin: 0 0 1.75rem; }

.hr-login .form-group { margin-bottom: 1.1rem; }
.hr-login label { font-weight: 600; font-size: .85rem; color: var(--ink-soft); margin-bottom: .35rem; }
.hr-login__pwrow { display: flex; justify-content: space-between; align-items: center; }
.hr-login__forgot { font-size: .8rem; color: var(--brand); font-weight: 600; }
.hr-login .input-group-text {
  background: var(--surface-2); border: 1px solid var(--border); border-right: 0;
  color: var(--muted); border-radius: 10px 0 0 10px;
}
.hr-login .form-control { border: 1px solid var(--border); border-radius: 0; padding: .72rem .9rem; height: auto; font-size: .98rem; }
.hr-login .input-group > .form-control:last-child { border-radius: 0 10px 10px 0; }
.hr-login .input-group-merge .form-control { border-left: 0; }
.hr-login .btn-reveal-pw { border: 1px solid var(--border); border-left: 0; background: var(--surface); color: var(--muted); border-radius: 0 10px 10px 0; }
.hr-login__remember { display: flex; align-items: center; gap: .5rem; font-weight: 500; color: var(--ink-soft); font-size: .9rem; margin: .25rem 0 1.25rem; }
.hr-login__submit { display: block; width: 100%; padding: .82rem; font-size: 1rem; font-weight: 700; }
.hr-login__linked:empty { display: none; }
.hr-login__foot { text-align: center; margin-top: 1.5rem; color: var(--muted); font-size: .9rem; }
.hr-login__foot a { font-weight: 700; }

/* ======================= APP-SHELL (layout nuovo) ===================== */
.hr-side-cb { display: none; }
.hr-app { min-height: 100vh; }

/* --- Sidebar verticale --- */
.hr-side {
  position: fixed; top: 0; left: 0; bottom: 0; width: 266px; z-index: 1000;
  display: flex; flex-direction: column;
  background: var(--surface); border-right: 1px solid var(--border);
}
.hr-side__logo { display: flex; align-items: center; padding: 1.15rem 1.4rem; border-bottom: 1px solid var(--border-2); }
.hr-side__logo img { max-height: 34px; width: auto; }
.hr-side__nav { flex: 1; overflow-y: auto; padding: .75rem .7rem; display: flex; flex-direction: column; gap: 2px; }
.hr-side__nav::-webkit-scrollbar { width: 8px; }
.hr-side__nav::-webkit-scrollbar-thumb { background: var(--border); border-radius: 8px; }

.hr-navlink {
  display: flex; align-items: center; gap: .75rem; padding: .62rem .8rem;
  border-radius: 11px; color: var(--ink-soft); font-weight: 500; font-size: .95rem;
  text-decoration: none; cursor: pointer; list-style: none; user-select: none;
}
.hr-navlink::-webkit-details-marker { display: none; }
.hr-navlink__ico { width: 20px; text-align: center; color: var(--muted); font-size: .95rem; flex: none; }
.hr-navlink__txt { flex: 1; min-width: 0; }
.hr-navlink:hover { background: var(--surface-2); color: var(--brand); }
.hr-navlink:hover .hr-navlink__ico { color: var(--brand); }
.hr-navlink.active { background: color-mix(in srgb, var(--brand) 10%, transparent); color: var(--brand); }
.hr-navlink.active .hr-navlink__ico { color: var(--brand); }
.hr-navlink__chev { font-size: .68rem; color: var(--faint); transition: transform .2s ease; }
details[open] > .hr-navlink .hr-navlink__chev { transform: rotate(180deg); }
.hr-navsub { display: flex; flex-direction: column; gap: 1px; padding: 2px 0 4px 2.55rem; }
.hr-navsub__link { padding: .42rem .6rem; border-radius: 8px; color: var(--muted); font-size: .88rem; text-decoration: none; }
.hr-navsub__link:hover { color: var(--brand); background: var(--surface-2); }
.hr-navsub__link.active { color: var(--brand); font-weight: 600; background: color-mix(in srgb, var(--brand) 8%, transparent); }
.hr-badge { background: var(--accent); color: #241700; font-size: .68rem; font-weight: 700; padding: 1px 7px; border-radius: 100px; }

.hr-side__foot { display: flex; align-items: center; gap: .4rem; padding: .7rem .8rem; border-top: 1px solid var(--border-2); }
.hr-account { display: flex; align-items: center; gap: .6rem; flex: 1; min-width: 0; text-decoration: none; color: var(--ink); }
.hr-account__av { width: 36px; height: 36px; border-radius: 50%; flex: none; background: var(--grad); color: #fff; display: flex; align-items: center; justify-content: center; font-size: .85rem; }
.hr-account__name { font-weight: 600; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hr-logout { color: var(--muted); padding: .5rem; border-radius: 9px; display: flex; }
.hr-logout:hover { color: var(--err); background: var(--surface-2); }

/* --- Shell (contenuto a destra) --- */
.hr-shell { margin-left: 266px; min-height: 100vh; display: flex; flex-direction: column; }
.hr-app--guest .hr-shell { margin-left: 0; }

/* --- Top bar --- */
.hr-topbar {
  position: sticky; top: 0; z-index: 900; height: 64px;
  display: flex; align-items: center; gap: .9rem; padding: 0 clamp(1rem, 3vw, 1.75rem);
  background: color-mix(in srgb, var(--surface) 85%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(12px); backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.hr-burger { display: none; width: 42px; height: 42px; border-radius: 10px; align-items: center; justify-content: center; color: var(--ink-soft); cursor: pointer; margin: 0; }
.hr-burger:hover { background: var(--surface-2); color: var(--brand); }
.hr-topbar__logo { display: none; }
.hr-topbar__crumb { flex: 1; min-width: 0; overflow: hidden; }
.hr-topbar__crumb .breadcrumb { margin: 0; padding: 0; background: transparent; font-size: .9rem; flex-wrap: nowrap; }
.hr-topbar__crumb .breadcrumb-item, .hr-topbar__crumb .breadcrumb a { color: var(--muted); white-space: nowrap; }
.hr-topbar__crumb .breadcrumb-item.active { color: var(--ink); font-weight: 600; }
.hr-topbar__actions { display: flex; align-items: center; gap: .35rem; margin-left: auto; }
.hr-iconbtn { position: relative; width: 42px; height: 42px; border-radius: 11px; border: 0; background: transparent; color: var(--ink-soft); display: flex; align-items: center; justify-content: center; cursor: pointer; text-decoration: none; font-size: 1.05rem; }
.hr-iconbtn:hover { background: var(--surface-2); color: var(--brand); }
.hr-iconbtn--admin:hover { color: var(--warn); }
.hr-dot { position: absolute; top: 6px; right: 6px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 10px; background: var(--accent); color: #241700; font-size: .64rem; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.hr-notif { position: relative; }
#accountNotificationsContent { position: absolute; right: 0; top: 52px; width: 320px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); z-index: 1100; }

/* --- Main + footer --- */
.hr-main { flex: 1; }
#main-body { padding: clamp(1.25rem, 3vw, 2rem); max-width: 1360px; margin: 0 auto; width: 100%; }
.hr-row { display: flex; gap: 1.5rem; align-items: flex-start; }
.hr-ctxside { width: 262px; flex: none; }
.hr-content { flex: 1; min-width: 0; }
@media (max-width: 900px) { .hr-row { flex-direction: column; } .hr-ctxside { width: 100%; } }
.hr-foot { border-top: 1px solid var(--border); padding: 1.3rem clamp(1rem, 3vw, 2rem); }
.hr-foot__inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; max-width: 1360px; margin: 0 auto; color: var(--muted); font-size: .85rem; }
.hr-foot__links { display: flex; align-items: center; gap: 1.25rem; }
.hr-foot__links a { color: var(--ink-soft); }
.hr-foot__loc { background: none; border: 0; color: var(--ink-soft); cursor: pointer; display: inline-flex; align-items: center; gap: .4rem; }

/* --- Scrim (mobile) --- */
.hr-scrim { display: none; }

/* --- Responsive: sidebar off-canvas --- */
@media (max-width: 991px) {
  .hr-side { transform: translateX(-100%); transition: transform .25s ease; box-shadow: var(--shadow-lg); }
  .hr-side-cb:checked ~ .hr-app .hr-side { transform: none; }
  .hr-shell { margin-left: 0; }
  .hr-scrim { display: block; position: fixed; inset: 0; z-index: 999; background: rgba(8,15,28,.5); opacity: 0; visibility: hidden; transition: opacity .2s ease, visibility .2s ease; }
  .hr-side-cb:checked ~ .hr-app .hr-scrim { opacity: 1; visibility: visible; }
  .hr-burger { display: flex; }
  .hr-topbar__logo { display: flex; align-items: center; }
  .hr-topbar__logo img { max-height: 30px; }
  body { overflow-x: hidden; }
}

/* ==================== Client area — pagine interne ==================== */
/* Intestazione pagina + respiro contenuto */
.primary-content > h1:first-child,
.primary-content > h2:first-child {
  font-family: var(--font-display); font-weight: 700; letter-spacing: -.01em;
  margin: 0 0 1.25rem; font-size: 1.6rem;
}

/* --- Tabelle elenco (servizi, fatture, domini) — DataTables --- */
.table-list, table.dataTable {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  border-collapse: separate !important; border-spacing: 0; width: 100%;
}
.table-list thead th, table.dataTable thead th {
  background: var(--surface-2); border-bottom: 1px solid var(--border) !important;
  color: var(--muted); font-family: var(--font-display); font-weight: 600;
  font-size: .74rem; text-transform: uppercase; letter-spacing: .05em;
  padding: .85rem 1rem; border-top: 0;
}
.table-list tbody td, table.dataTable tbody td {
  padding: .9rem 1rem; border-top: 1px solid var(--border-2); vertical-align: middle;
}
.table-list tbody tr:hover, table.dataTable tbody tr:hover { background: var(--surface-2); }
.table-list tbody tr:first-child td { border-top: 0; }

/* DataTables: barra ricerca / lunghezza / paginazione */
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: .45rem .7rem; background: var(--surface); color: var(--ink);
}
.dataTables_wrapper .dataTables_filter input:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }
.dataTables_wrapper .dataTables_info { color: var(--muted); font-size: .85rem; }
.dataTables_wrapper .dataTables_paginate .paginate_button {
  border: 1px solid var(--border) !important; border-radius: 8px !important;
  margin: 0 2px; padding: .35rem .7rem !important; color: var(--ink-soft) !important;
  background: var(--surface) !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current {
  background: var(--brand) !important; border-color: var(--brand) !important; color: #fff !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
  background: var(--surface-2) !important; color: var(--brand) !important; border-color: var(--brand) !important;
}

/* --- Pillole di stato (servizi/fatture/domini/preventivi) --- */
.label, .label.status, .invoice-status, .product-status, .badge {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .32rem .72rem; border-radius: 100px; font-weight: 600;
  font-size: .74rem; letter-spacing: .01em; line-height: 1.25; border: 1px solid transparent;
}
.label.status::before, .invoice-status::before, .product-status::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .9;
}
/* verde: attivo / pagato / accettato / completato */
.label-success, .badge-success,
.status-active, .status-paid, .status-accepted, .status-completed, .status-delivered,
.product-status-active {
  background: color-mix(in srgb, var(--ok) 13%, transparent); color: var(--ok);
}
/* blu: in attesa / info / rimborsato */
.label-info, .badge-info, .label-primary, .badge-primary,
.status-pending, .status-pendingregistration, .status-pendingtransfer, .status-refunded, .status-draft,
.product-status-pending {
  background: color-mix(in srgb, var(--brand) 11%, transparent); color: var(--brand);
}
/* arancio: sospeso / non pagata / grazia */
.label-warning, .badge-warning,
.status-suspended, .status-unpaid, .status-graceperiod, .status-redemptionperiod,
.product-status-suspended {
  background: color-mix(in srgb, var(--warn) 15%, transparent); color: var(--warn);
}
/* rosso: scaduta / frode / collections / persa */
.label-danger, .badge-danger,
.status-overdue, .status-expired, .status-fraud, .status-collections, .status-lost, .status-dead {
  background: color-mix(in srgb, var(--err) 12%, transparent); color: var(--err);
}
/* grigio: cancellato / terminato / chiuso */
.label-default, .badge-secondary, .badge-light,
.status-cancelled, .status-terminated, .status-closed, .status-transferredaway, .status-fraud-cancelled,
.product-status-cancelled, .product-status-terminated {
  background: var(--surface-2); color: var(--muted); border-color: var(--border);
}

/* --- Tabs --- */
.nav-tabs { border-bottom: 1px solid var(--border); gap: .15rem; }
.nav-tabs .nav-link {
  border: 0; border-bottom: 2px solid transparent; color: var(--muted);
  font-weight: 600; padding: .7rem 1rem; background: transparent; border-radius: 8px 8px 0 0;
}
.nav-tabs .nav-link:hover { color: var(--ink); background: var(--surface-2); }
.nav-tabs .nav-link.active { color: var(--brand); background: transparent; border-bottom-color: var(--brand); }

/* --- Paginazione (Bootstrap) --- */
.pagination .page-link {
  border: 1px solid var(--border); color: var(--ink-soft); border-radius: 8px !important;
  margin: 0 2px; background: var(--surface);
}
.pagination .page-link:hover { background: var(--surface-2); color: var(--brand); border-color: var(--brand); }
.pagination .page-item.active .page-link { background: var(--brand); border-color: var(--brand); color: #fff; }

/* --- Progress (uso disco/banda) --- */
.progress { background: var(--surface-2); border-radius: 100px; height: 9px; overflow: hidden; }
.progress-bar { background: var(--grad); }
.progress-bar.bg-danger { background: var(--err); }
.progress-bar.bg-warning { background: var(--warn); }

/* --- Form orizzontali (profilo, ecc.) --- */
.col-form-label, .control-label { font-weight: 600; color: var(--ink-soft); }
.custom-file-label { border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--muted); }
.custom-control-label::before { border-color: var(--border); }
.custom-control-input:checked ~ .custom-control-label::before { background: var(--brand); border-color: var(--brand); }
.form-check-input:checked { accent-color: var(--brand); }

/* --- Well / box grigi --- */
.well { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: none; }

/* --- Dettaglio prodotto: header stato --- */
.product-status { font-size: .8rem; }
.product-status-text { color: var(--ink-soft); }

/* --- Btn group --- */
.btn-group > .btn { border-radius: 0; }
.btn-group > .btn:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.btn-group > .btn:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

/* --------------------------- Utilities --------------------------------- */
::selection { background: color-mix(in srgb, var(--brand) 28%, transparent); }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 6px; }

/* Dark: rifiniture su elementi con colori "hardcoded" da Nexus */
@media (prefers-color-scheme: dark) {
  body, #main-body { background: var(--bg); }
  .well, .panel-default > .panel-heading { background: var(--surface-2); }
  .modal-content, .dropdown-menu, .popover { background: var(--surface); color: var(--ink); border-color: var(--border); }
  .close { color: var(--ink); text-shadow: none; }
  .page-header { border-bottom-color: var(--border); }
  .text-dark { color: var(--ink) !important; }
  .bg-light, .bg-white { background: var(--surface) !important; }
}
