/* Protos Cloud - installer.protosdataprotection.it e app.protosdataprotection.it */
:root {
  --navy: #111827; --navy-2: #1f2937; --blue: #1d6fd8; --blue-soft: #e8f1fc; --orange: #e8730c; --orange-soft: #fff1e3;
  --bg: #f3f6fa; --ink: #0f1b2d; --muted: #5a6b82; --line: #dde5ef; --ok: #138a4b; --danger: #c62828; --radius: 14px;
  --bs-primary: #1d6fd8; --bs-primary-rgb: 29, 111, 216; --bs-body-font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --bs-body-color: var(--ink); --bs-body-bg: var(--bg); --bs-link-color: #1557b0; --bs-link-color-rgb: 21, 87, 176;
}
html, body { background: var(--bg); color: var(--ink); }
body { font-size: .94rem; -webkit-tap-highlight-color: transparent; }
.btn-primary { --bs-btn-bg: var(--blue); --bs-btn-border-color: var(--blue); --bs-btn-hover-bg: #1559b3; --bs-btn-hover-border-color: #1559b3; --bs-btn-active-bg: #124a96; }
.text-bg-warning { background-color: #f5a524 !important; color: #2a1800 !important; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

/* ------------------------------------------------------------------ layout */
.side { position: fixed; inset: 0 auto 0 0; width: 248px; background: var(--navy); color: #fff; display: flex; flex-direction: column; padding: 18px 14px; z-index: 30; }
.side .brand { display: flex; flex-direction: column; gap: 8px; padding: 6px 8px 22px; text-decoration: none; }
.side .brand img { width: 170px; height: auto; }
.tag { align-self: flex-start; font-size: .68rem; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; color: #fff; background: var(--orange); padding: 2px 8px; border-radius: 5px; }
.portal-app .tag { background: var(--blue); }
.side .nav-link { display: flex; align-items: center; gap: 12px; color: #d1d5db; border-radius: 10px; padding: 10px 12px; margin-bottom: 2px; font-weight: 500; }
.side .nav-link i { font-size: 1.1rem; width: 20px; text-align: center; }
.side .nav-link:hover { background: var(--navy-2); color: #fff; }
.side .nav-link.active { background: var(--orange); color: #111827; font-weight: 600; }
.portal-app .side .nav-link.active { background: var(--blue); color: #fff; }
.side-foot { margin-top: auto; padding: 12px 10px 0; border-top: 1px solid rgba(255,255,255,.1); }
.main { margin-left: 248px; min-height: 100vh; }
.topbar { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.93); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); padding: 14px 28px; padding-top: max(14px, env(safe-area-inset-top)); }
.topbar h1 { font-size: 1.3rem; font-weight: 700; margin: 0; }
.content { padding: 22px 28px 40px; max-width: 1400px; }
.bottom-nav { display: none; }
@media (max-width: 991px) {
  .side { display: none; }
  .main { margin-left: 0; padding-bottom: 76px; }
  .content { padding: 16px; }
  .topbar { padding: 12px 16px; padding-top: max(12px, env(safe-area-inset-top)); }
  .bottom-nav { display: flex; position: fixed; inset: auto 0 0 0; z-index: 40; background: #fff; border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
  .bottom-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px; font-size: .7rem; color: var(--muted); text-decoration: none; }
  .bottom-nav a i { font-size: 1.25rem; }
  .bottom-nav a.active { color: var(--blue); font-weight: 600; }
  .table-cards thead { display: none; }
  .table-cards tr { display: block; border-bottom: 1px solid var(--line); padding: 10px 12px; }
  .table-cards td { display: flex; justify-content: space-between; gap: 12px; border: 0 !important; padding: 3px 0 !important; }
  .table-cards td[data-label]::before { content: attr(data-label); color: var(--muted); font-size: .8rem; }
  .table-cards td.td-main { display: block; font-size: 1rem; }
  .table-cards td.text-end { justify-content: flex-end; }
}

/* -------------------------------------------------------------- accesso */
.main-guest { min-height: 100vh; background: radial-gradient(700px 400px at 0% 0%, rgba(55,65,81,.8), transparent 60%), radial-gradient(600px 400px at 100% 100%, rgba(232,115,12,.35), transparent 60%), var(--navy); }
.portal-app .main-guest { background: radial-gradient(700px 400px at 0% 0%, rgba(55,65,81,.8), transparent 60%), radial-gradient(600px 400px at 100% 100%, rgba(29,111,216,.4), transparent 60%), var(--navy); }
.main-guest .content { max-width: none; }
.login-wrap { min-height: calc(100vh - 60px); display: flex; align-items: center; justify-content: center; }
.login-card { width: 100%; max-width: 430px; background: #fff; border-radius: 18px; overflow: hidden; box-shadow: 0 24px 60px rgba(0,0,0,.35); }
.login-brand { background: var(--navy); padding: 24px; display: flex; flex-direction: column; gap: 10px; border-bottom: 3px solid var(--orange); }
.portal-app .login-brand { border-bottom-color: var(--blue); }

/* ---------------------------------------------------------------- card */
.card { border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 1px 2px rgba(15,27,45,.04); }
.card-header { background: #fff; border-bottom: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0 !important; padding: 13px 18px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.kpi { padding: 18px; display: flex; gap: 14px; align-items: center; height: 100%; }
.kpi .ico { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; flex-shrink: 0; }
.kpi .v { font-size: 1.6rem; font-weight: 700; line-height: 1.1; }
.kpi .l { color: var(--muted); font-size: .82rem; font-weight: 500; }
.ico-blue { background: var(--blue-soft); color: var(--blue); } .ico-green { background: #e3f5ea; color: var(--ok); }
.ico-orange { background: var(--orange-soft); color: var(--orange); } .ico-red { background: #fde8e8; color: var(--danger); }
.health { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .82rem; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.health.success { background: #e3f5ea; color: #0e6b3a; } .health.warning { background: #fff1d6; color: #7a4a00; }
.health.danger { background: #fde8e8; color: #a11d1d; } .health.secondary { background: #eceff4; color: #46566c; }
.hero-ico { width: 64px; height: 64px; border-radius: 18px; display: flex; align-items: center; justify-content: center; font-size: 2rem; flex-shrink: 0; }
.hero-ico.sm { width: 46px; height: 46px; border-radius: 13px; font-size: 1.4rem; }
.hero-ico.success { background: #e3f5ea; color: var(--ok); } .hero-ico.warning { background: #fff1d6; color: #d18400; }
.hero-ico.danger { background: #fde8e8; color: var(--danger); } .hero-ico.secondary { background: #eceff4; color: #64748b; }
.site-card { transition: transform .12s, box-shadow .12s; } .site-card:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(15,27,45,.08); }

.table { --bs-table-bg: transparent; margin-bottom: 0; }
.table > :not(caption) > * > * { padding: .7rem .9rem; border-color: #edf1f6; }
.table thead th { font-size: .74rem; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); font-weight: 600; background: #f8fafc; border-bottom: 1px solid var(--line); white-space: nowrap; }
tr.row-link { cursor: pointer; }
.nav-tabs .nav-link { font-weight: 500; color: var(--muted); } .nav-tabs .nav-link.active { color: var(--ink); font-weight: 600; }
.alert-item { display: flex; gap: 14px; padding: 14px 18px; border-bottom: 1px solid #edf1f6; align-items: flex-start; }
.alert-item:last-child { border-bottom: 0; }
.alert-item .lv { width: 4px; align-self: stretch; border-radius: 4px; background: #9aa8bb; flex-shrink: 0; }
.alert-item .lv.critical { background: var(--danger); } .alert-item .lv.warning { background: #f5a524; }
.alert-item.acked { opacity: .65; }
