.admin-shell { position: relative; z-index: 2; min-height: 100svh; padding: 88px 18px 18px; display: grid; grid-template-columns: minmax(280px, 30vw) 1fr; gap: 18px; }
.admin-intro { position: sticky; top: 88px; align-self: start; height: calc(100svh - 106px); padding: clamp(42px, 5vw, 78px) clamp(24px, 4vw, 62px); overflow: hidden; border: 1px solid var(--line); border-radius: 32px; background: linear-gradient(145deg, rgba(255,255,255,.105), rgba(255,255,255,.035) 52%, rgba(147,147,147,.055)); -webkit-backdrop-filter: blur(40px) saturate(170%); backdrop-filter: blur(40px) saturate(170%); box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 30px 75px rgba(0,0,0,.26); }
.admin-intro h1 { font-size: clamp(3.7rem, 6vw, 7rem); }
.admin-intro > p:last-child { max-width: 260px; margin: 42px 0 0; color: var(--muted); font-size: .88rem; line-height: 1.6; }
.admin-workspace { min-width: 0; padding: clamp(40px, 5vw, 74px) clamp(22px, 5vw, 78px) 70px; }
.tabs { display: flex; gap: clamp(18px, 2.6vw, 34px); padding: 0 4px 18px; overflow-x: auto; border-bottom: 1px solid var(--line-soft); scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { position: relative; padding: 10px 0; border: 0; border-radius: 0; color: var(--muted); background: transparent; box-shadow: none; cursor: pointer; font-size: .72rem; letter-spacing: .09em; text-transform: uppercase; white-space: nowrap; transition: color .25s; }
.tab::after { content: ""; position: absolute; left: 50%; width: 0; bottom: -19px; height: 2px; border-radius: 2px; background: var(--accent-bright); box-shadow: 0 0 16px rgba(175,175,175,.7); transform: translateX(-50%); transition: width .25s; }
.tab:hover, .tab.active { color: var(--text); background: transparent; box-shadow: none; }
.tab.active::after { width: 100%; }
.workspace-title { display: grid; grid-template-columns: 34px 1fr; align-items: end; margin: 50px 0 24px; }
.workspace-title span { padding-bottom: 9px; color: var(--accent); font-size: .62rem; letter-spacing: .13em; }
.workspace-title h2 { font-size: clamp(2.7rem, 4.7vw, 5rem); }
.admin-panel { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.admin-panel[hidden] { display: none !important; }
.tool { position: relative; min-width: 0; min-height: 145px; padding: 20px; display: grid; grid-template-columns: 42px minmax(0,1fr) auto; grid-template-rows: auto 1fr; align-items: start; gap: 0 14px; overflow: hidden; border: 1px solid var(--line); border-radius: 24px; color: var(--text); background: linear-gradient(145deg, rgba(255,255,255,.11), rgba(255,255,255,.04) 55%, rgba(141,141,141,.055)); -webkit-backdrop-filter: blur(34px) saturate(180%); backdrop-filter: blur(34px) saturate(180%); box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 18px 45px rgba(0,0,0,.18); text-align: left; text-decoration: none; transition: transform .3s, border-color .3s, background .3s, box-shadow .3s; }
.tool::before { content: ""; position: absolute; width: 75%; height: 70%; left: -20%; top: -48%; border-radius: 50%; background: rgba(255,255,255,.13); filter: blur(28px); pointer-events: none; }
.tool:hover:not(.static) { transform: translateY(-4px); border-color: rgba(221,221,221,.34); background: linear-gradient(145deg, rgba(255,255,255,.15), rgba(255,255,255,.055) 54%, rgba(148,148,148,.085)); box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 24px 60px rgba(0,0,0,.24); }
.tool-icon { width: 38px; height: 38px; grid-row: 1 / 3; display: grid; place-items: center; border: 1px solid rgba(228,228,228,.24); border-radius: 13px; color: var(--accent-bright); background: linear-gradient(145deg, rgba(255,255,255,.14), rgba(255,255,255,.055)); box-shadow: inset 0 1px 0 rgba(255,255,255,.18); font-size: .72rem; font-weight: 700; }
.tool span:nth-child(2) { min-width: 0; align-self: end; }
.tool small, .tool strong { display: block; }
.tool small { margin-bottom: 8px; color: var(--muted); font-size: .61rem; letter-spacing: .12em; text-transform: uppercase; }
.tool strong { font-size: clamp(1rem,1.6vw,1.36rem); font-weight: 450; line-height: 1.25; overflow-wrap: anywhere; }
.tool i { color: var(--accent); font-style: normal; }
.tool b { align-self: start; color: var(--muted); font-size: .63rem; font-weight: 500; }
.tool b + i { grid-column: 3; justify-self: end; }
.tool b.ok { color: var(--green); }.tool b.warn { color: #e8bc72; }
.speed-button { cursor: pointer; font: inherit; }
.bookmarks-panel { display: block; }
.bookmark-toolbar { position: sticky; top: 78px; z-index: 3; display: flex; align-items: center; gap: 12px; margin-bottom: 28px; padding: 10px; border: 1px solid var(--liquid-edge); border-radius: 22px; background: var(--liquid-panel-strong); -webkit-backdrop-filter: blur(58px) saturate(215%); backdrop-filter: blur(58px) saturate(215%); box-shadow: inset 0 1px 0 var(--liquid-inset), var(--liquid-shadow); }
.bookmark-search { min-width: 0; flex: 1; display: flex; align-items: center; gap: 10px; padding: 4px 8px; color: var(--muted); }
.bookmark-search input { width: 100%; min-width: 0; padding: 8px 0; border: 0; outline: 0; color: var(--text); background: transparent; font: inherit; font-size: 1rem; }
.bookmark-search input::placeholder { color: var(--muted); }
.bookmark-count { flex: none; padding: 0 8px; color: var(--muted); font-size: .69rem; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.bookmark-group { margin-top: 34px; }
.bookmark-group:first-child { margin-top: 0; }
.bookmark-group h3 { margin: 0 0 13px; color: var(--muted); font-size: .72rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.bookmark-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.bookmark-card { min-width: 0; padding: 14px; display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 12px; border: 1px solid var(--liquid-edge); border-radius: 19px; color: var(--text); background: var(--liquid-panel); -webkit-backdrop-filter: blur(44px) saturate(200%); backdrop-filter: blur(44px) saturate(200%); box-shadow: inset 0 1px 0 var(--liquid-inset), 0 12px 32px rgba(0,0,0,.11); text-decoration: none; transition: transform .25s, background .25s, border-color .25s; }
.bookmark-card:hover { transform: translateY(-2px); border-color: rgba(225,225,225,.46); background: var(--liquid-panel-strong); }
.bookmark-icon { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--liquid-edge); border-radius: 12px; color: var(--accent-bright); background: rgba(255,255,255,.07); font-size: .68rem; font-weight: 700; }
.bookmark-card > span:nth-child(2) { min-width: 0; }
.bookmark-card strong, .bookmark-card small { display: block; overflow-wrap: anywhere; }
.bookmark-card strong { font-size: .96rem; font-weight: 520; }
.bookmark-card small { margin-top: 4px; color: var(--muted); font-size: .72rem; }
.bookmark-card i { color: var(--accent); font-style: normal; }
.bookmark-empty { padding: 42px 10px; color: var(--muted); text-align: center; }
html[data-theme="light"] .bookmark-toolbar, html[data-theme="light"] .bookmark-card { background: var(--liquid-panel); }
html[data-theme="light"] .bookmark-icon { color: #565656; background: rgba(245,245,245,.34); }

html[data-theme="light"] .admin-intro {
  background: linear-gradient(145deg, rgba(255,255,255,.8), rgba(255,255,255,.43) 54%, rgba(157,157,157,.12));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.95), 0 30px 72px rgba(91,91,91,.16);
}
html[data-theme="light"] .admin-intro > p:last-child { color: #6e6e6e; }
html[data-theme="light"] .tab { color: #6e6e6e; background: transparent; box-shadow: none; }
html[data-theme="light"] .tab:hover,
html[data-theme="light"] .tab.active { color: #0f0f0f; border-color: transparent; background: transparent; box-shadow: none; }
html[data-theme="light"] .tool {
  color: #1f1f1f;
  background: linear-gradient(145deg, rgba(255,255,255,.82), rgba(250,250,250,.5) 52%, rgba(159,159,159,.12));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.98), 0 18px 42px rgba(88,88,88,.13);
}
html[data-theme="light"] .tool:hover:not(.static) { border-color: rgba(113,113,113,.32); background: linear-gradient(145deg, rgba(255,255,255,.96), rgba(250,250,250,.67) 54%, rgba(153,153,153,.16)); box-shadow: inset 0 1px 0 #fff, 0 24px 58px rgba(88,88,88,.17); }
html[data-theme="light"] .tool-icon { color: #565656; border-color: rgba(94,94,94,.2); background: linear-gradient(145deg, rgba(255,255,255,.9), rgba(234,234,234,.56)); box-shadow: inset 0 1px 0 #fff; }
html[data-theme="light"] .tool small,
html[data-theme="light"] .tool b { color: #6e6e6e; }

.admin-intro,
.tool,
.tab {
  border-color: var(--liquid-edge);
  background: var(--liquid-panel);
  -webkit-backdrop-filter: blur(58px) saturate(215%) brightness(1.055);
  backdrop-filter: blur(58px) saturate(215%) brightness(1.055);
  box-shadow: inset 0 1px 0 var(--liquid-inset), inset 0 -1px 0 var(--liquid-edge-soft), var(--liquid-shadow);
}
.admin-intro { background: var(--liquid-panel-strong); }
html[data-theme="light"] .admin-intro {
  background: var(--liquid-panel-strong);
  box-shadow: inset 0 1px 0 var(--liquid-inset), inset 0 -1px 0 var(--liquid-edge-soft), var(--liquid-shadow);
}
html[data-theme="light"] .tool,
html[data-theme="light"] .tab {
  background: var(--liquid-panel);
  box-shadow: inset 0 1px 0 var(--liquid-inset), inset 0 -1px 0 var(--liquid-edge-soft), var(--liquid-shadow);
}
.tool::before { background: rgba(255,255,255,.2); filter: blur(36px); }
html[data-theme="light"] .tool::before { background: rgba(255,255,255,.42); }
.tool:hover:not(.static) {
  border-color: rgba(225,225,225,.46);
  background: var(--liquid-panel-strong);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.48), inset 0 -1px 0 var(--liquid-edge-soft), 0 30px 70px rgba(0,0,0,.27);
}
html[data-theme="light"] .tool:hover:not(.static) {
  border-color: rgba(255,255,255,.94);
  box-shadow: inset 0 1px 0 #fff, inset 0 -1px 0 rgba(101,101,101,.1), 0 30px 70px rgba(96,96,96,.2);
}
.tool-icon {
  border-color: var(--liquid-edge);
  background: radial-gradient(100% 85% at 15% 0%, rgba(255,255,255,.32), transparent 58%), rgba(255,255,255,.065);
  -webkit-backdrop-filter: blur(24px) saturate(190%);
  backdrop-filter: blur(24px) saturate(190%);
  box-shadow: inset 0 1px 0 var(--liquid-inset), 0 10px 26px rgba(0,0,0,.12);
}
html[data-theme="light"] .tool-icon { background: radial-gradient(100% 85% at 15% 0%, rgba(255,255,255,.62), transparent 58%), rgba(245,245,245,.28); box-shadow: inset 0 1px 0 #fff, 0 10px 26px rgba(96,96,96,.1); }
.tab { box-shadow: none; }
.tab:hover,
.tab.active { box-shadow: none; }
html[data-theme="light"] .tab:hover,
html[data-theme="light"] .tab.active {
  color: #0f0f0f;
  background: transparent;
  box-shadow: none;
}

/* La navigazione resta tipografica: nessun pannello o riquadro dietro alle etichette. */
.tabs .tab,
html[data-theme="light"] .tabs .tab,
.tabs .tab:hover,
.tabs .tab.active,
html[data-theme="light"] .tabs .tab:hover,
html[data-theme="light"] .tabs .tab.active {
  border: 0;
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: none;
}

@media (max-width: 900px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-intro { position: relative; top: auto; height: auto; padding-bottom: 40px; }
  .admin-intro > p:last-child { margin-top: 30px; }
}
@media (max-width: 650px) {
  .admin-shell { padding: 80px 12px 12px; gap: 12px; }
  .admin-intro { padding: 36px 20px 34px; border-radius: 26px; }
  .admin-intro h1 { font-size: 3.7rem; }
  .admin-workspace { padding: 34px 18px 50px; }
  .tabs { margin: 0 -18px; padding-left: 18px; padding-right: 18px; }
  .workspace-title { margin-top: 40px; }
  .admin-panel { grid-template-columns: 1fr; }
  .tool { min-height: 120px; }
  .bookmark-toolbar { top: 70px; }
  .bookmark-grid { grid-template-columns: 1fr; }
  .bookmark-count { display: none; }
}
