/* COMMANDI TECH — STILE CONDIVISO */
:root {
  color-scheme: dark;
  --bg: #07101f;
  --panel: #0d1b30;
  --panel-2: #10233d;
  --line: #1c4169;
  --blue: #0788f9;
  --blue-2: #35b6ff;
  --text: #edf6ff;
  --muted: #a8bdd4;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  padding: 20px;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  background:
    radial-gradient(ellipse at 80% 0%, rgba(0, 117, 255, .13), transparent 35%),
    var(--bg);
  color: var(--text);
}
a { color: var(--blue-2); }
.site-header {
  position: relative;
  z-index: 20;
  margin: -20px -20px 28px;
  padding: 15px clamp(16px, 3vw, 38px);
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  background: rgba(5, 16, 33, .96);
  border-bottom: 1px solid #174878;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .22);
}
.site-logo {
  color: #f4f9ff;
  text-decoration: none;
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  font-weight: 900;
  letter-spacing: 1.3px;
  white-space: nowrap;
}
.site-logo::after { content: " TECH"; color: var(--blue-2); }
.site-logo { font-size: 0; }
.site-logo::before { content: "COMMANDI"; font-size: clamp(1.15rem, 2vw, 1.55rem); }
.site-logo::after { font-size: clamp(1.15rem, 2vw, 1.55rem); }
.main-menu { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.main-menu a, .dropdown-toggle {
  display: inline-flex;
  align-items: center;
  color: #d9eaff;
  text-decoration: none;
  padding: 10px 13px;
  border-radius: 8px;
  font: inherit;
  font-size: .94rem;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}
.main-menu a:hover, .dropdown-toggle:hover,
.main-menu a:focus-visible, .dropdown-toggle:focus-visible {
  background: #0d3760;
  border-color: #15548a;
  color: #fff;
  outline: none;
}
.dropdown { position: relative; }
.dropdown-menu {
  display: none;
  position: absolute;
  z-index: 1000;
  top: calc(100% + 5px);
  left: 0;
  min-width: 205px;
  padding: 7px;
  background: #08172b;
  border: 1px solid #17609b;
  border-radius: 10px;
  box-shadow: 0 14px 32px #0008;
}
.dropdown-menu a { display: block; white-space: nowrap; }
.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu { display: block; }
.menu-toggle {
  display: none;
  color: #fff;
  background: #0c3154;
  border: 1px solid #17609b;
  border-radius: 9px;
  padding: 9px 12px;
  font-size: 1.05rem;
  cursor: pointer;
}
.home-wrap { max-width: 1440px; margin: 0 auto; }
.dashboard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  gap: 22px;
  align-items: start;
}
.dashboard-main { min-width: 0; }
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(26px, 4vw, 48px);
  border-radius: 18px;
  background:
    radial-gradient(circle at 88% 30%, rgba(0, 150, 255, .24), transparent 29%),
    linear-gradient(125deg, #0c1b31 0%, #0b2d52 65%, #073f71 100%);
  color: white;
  border: 1px solid #1b5d91;
  box-shadow: 0 14px 40px #0003;
}
.hero::after {
  content: "";
  position: absolute;
  width: 300px;
  height: 300px;
  right: -70px;
  top: -95px;
  border: 1px solid rgba(64, 183, 255, .23);
  border-radius: 50%;
  box-shadow: 0 0 0 24px rgba(64,183,255,.035), 0 0 0 52px rgba(64,183,255,.025);
  pointer-events: none;
}
.eyebrow {
  color: #62caff;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: .78rem;
  font-weight: 800;
}
.hero h1 { margin: 10px 0 14px; font-size: clamp(2rem, 4.2vw, 3.4rem); line-height: 1.05; letter-spacing: -.7px; }
.hero h1 span { color: #28aaff; }
.hero p { max-width: 720px; color: #c8e2fb; line-height: 1.7; font-size: 1.03rem; }
.primary-link, .page-card a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #0795ff, #0873df);
  color: #fff;
  text-decoration: none;
  padding: 11px 16px;
  border-radius: 8px;
  font-weight: 800;
  border: 1px solid #32a9ff;
  box-shadow: 0 6px 18px rgba(0, 121, 255, .16);
  transition: transform .18s ease, filter .18s ease;
}
.primary-link:hover, .page-card a:hover { filter: brightness(1.12); transform: translateY(-1px); }
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 28px 0 14px;
}
.section-heading h2 { margin: 0; font-size: 1.18rem; letter-spacing: .4px; }
.section-heading a { color: #43baff; text-decoration: none; font-size: .9rem; }
.category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.category-card {
  min-height: 115px;
  padding: 17px;
  border: 1px solid #1a4168;
  border-radius: 12px;
  background: linear-gradient(145deg, #0c1c31, #0a1728);
}
.category-card .category-icon { display: block; color: #36b7ff; font-size: 1.35rem; margin-bottom: 10px; }
.category-card h3 { margin: 0 0 6px; font-size: 1rem; }
.category-card p { margin: 0; color: var(--muted); font-size: .83rem; line-height: 1.45; }
.page-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.page-card {
  display: flex;
  flex-direction: column;
  min-height: 220px;
  background: linear-gradient(155deg, #10213a, #0a1728);
  border: 1px solid #20476f;
  border-radius: 13px;
  padding: 20px;
  color: #f8fafc;
  box-shadow: 0 10px 25px rgba(0,0,0,.13);
  transition: transform .18s ease, border-color .18s ease;
}
.page-card:hover { transform: translateY(-3px); border-color: #168ce4; }
.card-category {
  display: inline-block;
  align-self: flex-start;
  margin-bottom: 12px;
  padding: 5px 8px;
  border-radius: 5px;
  background: #073b67;
  color: #6bcaff;
  font-size: .68rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .6px;
}
.page-card h2 { margin: 0 0 10px; font-size: 1.12rem; }
.page-card p { color: #b9cde2; line-height: 1.55; font-size: .91rem; flex: 1; }
.page-card a { align-self: flex-start; margin-top: 12px; }
.side-panel { display: grid; gap: 14px; }
.info-card {
  padding: 18px;
  background: linear-gradient(150deg, #0c1c30, #081526);
  border: 1px solid #19456e;
  border-radius: 13px;
}
.info-card h3 { margin: 0 0 14px; font-size: .9rem; text-transform: uppercase; letter-spacing: .7px; }
.stat-number { color: #42baff; font-size: 2rem; font-weight: 900; line-height: 1.1; }
.stat-caption { color: #a8bdd4; font-size: .85rem; margin-top: 7px; line-height: 1.45; }
.quick-links { display: grid; gap: 3px; }
.quick-links a { padding: 9px 0; color: #c9e5ff; text-decoration: none; border-bottom: 1px solid #18334e; font-size: .9rem; }
.quick-links a:last-child { border-bottom: 0; }
.site-footer {
  margin: 30px auto 0;
  padding: 18px 12px 8px;
  max-width: 1100px;
  text-align: center;
  color: #829ab4;
  font-size: .87rem;
  border-top: 1px solid #1b3550;
}
#quizBox {
  background: linear-gradient(145deg, #111f33, #0b1727);
  border: 1px solid #1d4164;
  box-shadow: 0 14px 38px #0003;
}
#quizBox h2 { color: #e8f5ff; }
#questionBox, #questionText { line-height: 1.6; }
button, select, input, textarea { max-width: 100%; }
button { transition: filter .15s ease; }
button:hover { filter: brightness(1.08); }
@media (max-width: 980px) {
  .dashboard-layout { grid-template-columns: 1fr; }
  .side-panel { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .category-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  body { padding: 12px !important; }
  .site-header { margin: -12px -12px 18px; padding: 13px 15px; gap: 12px; }
  .menu-toggle { display: inline-block; margin-left: auto; }
  .main-menu { display: none; width: 100%; flex-direction: column; align-items: stretch; gap: 3px; }
  .main-menu.is-open { display: flex; }
  .main-menu > a, .dropdown-toggle { width: 100%; justify-content: space-between; text-align: left; }
  .dropdown { width: 100%; }
  .dropdown-menu { position: static; min-width: 0; box-shadow: none; margin: 3px 0 8px; }
  .dropdown:hover .dropdown-menu { display: none; }
  .dropdown:focus-within .dropdown-menu { display: block; }
  .dropdown.is-open .dropdown-menu { display: block; }
  .hero { padding: 25px 21px; }
  .hero h1 { font-size: 2rem; }
  .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .side-panel { grid-template-columns: 1fr; }
  .page-grid { grid-template-columns: 1fr; }
  #quizBox { width: 100% !important; max-width: 100%; padding: 14px !important; }
  #timerBox { float: none !important; margin: 12px 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

/* DASHBOARD COMMANDI TECH — MODALITÀ NOTTURNA */
:root { --bg:#030b16; --panel:#071729; --panel-2:#0a1c30; --line:#173b5d; --blue:#0788f9; --blue-2:#22b9ff; --text:#eef6ff; --muted:#a9c3df; }
body { padding:0; background:#030b16; color:var(--text); }
.site-header { margin:0; min-height:80px; padding:12px clamp(16px,2vw,30px); display:flex; flex-wrap:nowrap; gap:22px; background:rgba(4,13,26,.98); border-bottom:1px solid #173b5d; box-shadow:0 8px 25px #0005; }
.site-logo { display:flex; align-items:center; gap:12px; min-width:300px; font-size:initial; letter-spacing:0; white-space:normal; }
.site-logo::before,.site-logo::after { content:none; }
.logo-mark { display:none; }
.logo-copy { display:flex; flex-direction:column; gap:2px; }
.logo-title { color:#f4f8ff; font-size:clamp(1.3rem,2.1vw,1.8rem); line-height:1.05; font-weight:900; letter-spacing:1px; }
.logo-title b { color:#159dff; }
.logo-tagline { color:#9ebbd8; font-size:.72rem; font-weight:500; letter-spacing:0; }
.lab-search { display:flex; align-items:center; gap:10px; flex:1; max-width:430px; padding:0 13px; height:42px; border:1px solid #1b3b5b; border-radius:8px; background:#071525; color:#9dbce0; }
.lab-search span { font-size:1.35rem; }
.lab-search input { min-width:0; width:100%; border:0; outline:0; background:transparent; color:#eff7ff; font:inherit; }
.lab-search input::placeholder { color:#7895b5; }
.main-menu { margin-left:auto; flex-wrap:nowrap; gap:6px; }
.main-menu a { padding:11px 13px; border-radius:0; color:#c9dcf4; }
.main-menu a.active { color:#25aaff; border-bottom:2px solid #168dff; }
.main-menu a:hover { background:#0b2a49; }
.menu-toggle { white-space:nowrap; }
.home-wrap { max-width:none; margin:0; }
.dashboard-layout { display:grid; grid-template-columns:250px minmax(0,1fr); gap:0; align-items:stretch; }
.side-panel { display:flex; flex-direction:column; gap:3px; padding:26px 14px 20px; min-height:calc(100vh - 80px); background:#040e1c; border-right:1px solid #142e49; }
.side-panel > a { display:flex; align-items:center; gap:13px; padding:12px 13px; color:#c5dbf4; text-decoration:none; border-radius:7px; font-size:.94rem; }
.side-panel > a:hover { background:#0a2540; color:#fff; }
.side-panel > a.side-active { color:#9be0ff; background:linear-gradient(90deg,#0b3d70,#08284b); border-left:3px solid #159cff; }
.side-label { margin:20px 13px 7px; color:#8caed2; font-size:.7rem; letter-spacing:1.3px; font-weight:800; }
.dashboard-main { padding:0 0 20px; min-width:0; }
.hero { display:flex; align-items:center; justify-content:space-between; gap:28px; min-height:300px; padding:38px clamp(24px,3.2vw,48px); border-radius:0; border:0; border-bottom:1px solid #173b5d; background:radial-gradient(ellipse at 78% 45%,rgba(0,122,255,.2),transparent 34%),linear-gradient(110deg,#061424,#03101f 65%,#04172b); box-shadow:none; }
.hero::after { display:none; }
.hero-content { position:relative; z-index:1; max-width:700px; }
.hero-brand { display:flex; align-items:center; gap:18px; }
.hero-logo-mark { display:inline-flex; align-items:center; justify-content:center; width:68px; height:58px; color:#16baff; border:1px solid #079cff; border-radius:7px; font:bold 2rem Consolas,monospace; box-shadow:0 0 20px #008cff35; }
.hero h1 { margin:0; font-size:clamp(2rem,3.5vw,3.4rem); letter-spacing:-.7px; }
.hero h1 span { color:#14b8ff; }
.hero p { max-width:620px; color:#a8c9ec; line-height:1.65; font-size:.98rem; }
.hero .hero-tagline { color:#f1f7ff; margin:12px 0 4px; }
.primary-link { margin-top:6px; padding:12px 18px; border-radius:8px; background:linear-gradient(135deg,#168fff,#0874e5); }
.terminal-card { width:min(340px,34%); min-width:245px; padding:16px 20px 18px; border:1px solid #078eea; border-radius:9px; background:rgba(1,10,20,.88); box-shadow:0 12px 35px #0005; }
.terminal-dots { display:flex; gap:7px; margin-bottom:14px; }
.terminal-dots i { display:block; width:9px; height:9px; border-radius:50%; background:#ff5d65; }
.terminal-dots i:nth-child(2) { background:#ffcc32; }.terminal-dots i:nth-child(3) { background:#12d77a; }
.terminal-card code { color:#9edcff; font: .87rem/1.7 Consolas,monospace; overflow-wrap:anywhere; }
.terminal-card code span { color:#00e89b; }
.section-heading { margin:0; padding:22px clamp(22px,2.5vw,36px) 14px; }
.section-heading h2 { text-transform:none; font-size:1.2rem; }
.dashboard-stats { display:flex; border:1px solid #183653; border-radius:8px; overflow:hidden; }
.dashboard-stats span { padding:9px 12px; color:#a9c8e7; font-size:.76rem; border-right:1px solid #183653; white-space:nowrap; }
.dashboard-stats span:last-child { border:0; }
.dashboard-stats b { color:#45caff; }
.category-grid { grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; padding:0 clamp(22px,2.5vw,36px); }
.category-card { display:flex; flex-direction:column; min-height:190px; padding:17px 18px; border-radius:9px; background:linear-gradient(145deg,#08192b,#061321); border:1px solid #183653; border-left:5px solid var(--accent,#168fff); }
.category-top { display:flex; align-items:center; gap:13px; }
.category-card .category-icon { color:var(--accent,#168fff); font-size:2rem; line-height:1; margin:0; }
.category-card h3 { font-size:1rem; margin:0; }
.category-card p { margin:18px 0; flex:1; color:#b3cbe4; font-size:.84rem; line-height:1.55; }
.category-bottom { display:flex; align-items:center; justify-content:space-between; gap:8px; color:#d7e8fb; font-size:.75rem; }
.category-bottom a { color:var(--accent,#168fff); border:1px solid var(--accent,#168fff); padding:8px 10px; border-radius:7px; text-decoration:none; font-size:.7rem; font-weight:800; white-space:nowrap; }
.category-bottom a:hover { background:color-mix(in srgb,var(--accent,#168fff) 15%,transparent); }
.accent-blue { --accent:#149dff; }.accent-green { --accent:#00dfa8; }.accent-gold { --accent:#ffc21c; }.accent-purple { --accent:#ad52ff; }
.lab-heading { margin-top:10px; }
.page-grid { padding:0 clamp(22px,2.5vw,36px); grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:14px; }
.page-card { min-height:205px; padding:18px; border-radius:9px; background:linear-gradient(145deg,#091a2c,#061321); border-color:#183653; box-shadow:none; }
.page-card:hover { border-color:#149dff; }
.card-category { background:#092d4b; color:#65caff; }
.page-card a { align-self:flex-start; }
.side-panel .info-card { margin-top:auto; padding:17px; background:linear-gradient(145deg,#061b31,#061222); border-color:#123a5c; }
.side-promo .promo-icon { color:#13aaff; font:bold 1.6rem Consolas,monospace; }
.side-promo h3 { color:#4bd5ff; text-transform:none; font-size:1rem; margin:8px 0; }
.side-promo p { margin:0; color:#a9c6e3; font-size:.82rem; line-height:1.5; }
.feature-footer { display:flex; flex-wrap:wrap; gap:18px; justify-content:space-between; margin:30px clamp(22px,2.5vw,36px) 0; padding:22px 0 8px; border-top:1px solid #18324d; }
.feature-footer span { display:grid; grid-template-columns:auto 1fr; column-gap:10px; color:#b8d7f6; font-size:.8rem; }
.feature-footer span:first-letter { color:#6ebdff; }
.feature-footer small { grid-column:2; color:#829fbe; margin-top:4px; }
.site-footer { margin:0; padding:18px; max-width:none; background:#030b16; border-top:1px solid #132a42; }
@media (max-width:1200px) { .category-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } .terminal-card { width:280px; } .dashboard-stats span { padding:8px; } }
@media (max-width:900px) { .site-header { flex-wrap:wrap; } .site-logo { min-width:0; flex:1; } .lab-search { order:4; max-width:none; flex-basis:100%; } .dashboard-layout { grid-template-columns:1fr; } .side-panel { min-height:0; display:flex; flex-direction:row; flex-wrap:wrap; align-items:center; padding:10px 14px; border-right:0; border-bottom:1px solid #142e49; } .side-panel > a { padding:9px; } .side-label,.side-promo { display:none; } .hero { min-height:260px; } }
@media (max-width:700px) { body { padding:0 !important; } .site-header { margin:0; padding:12px; gap:10px; } .logo-tagline { display:none; } .main-menu { display:none; order:5; width:100%; flex-direction:row; flex-wrap:wrap; margin:0; } .main-menu.is-open { display:flex; } .main-menu a { padding:9px; } .menu-toggle { display:inline-block; margin-left:0; } .hero { padding:25px 20px; min-height:0; } .hero-brand { gap:12px; } .hero-logo-mark { width:48px; height:46px; font-size:1.5rem; } .hero h1 { font-size:1.8rem; } .terminal-card { display:none; } .section-heading { align-items:flex-start; flex-direction:column; padding:20px; } .dashboard-stats { flex-wrap:wrap; } .dashboard-stats span { font-size:.7rem; } .category-grid,.page-grid { grid-template-columns:1fr; padding:0 20px; } .category-card { min-height:170px; } .feature-footer { margin:25px 20px 0; flex-direction:column; } .side-panel { gap:2px; } .side-panel > a { font-size:.8rem; gap:6px; } }
