/* Acquarium — tema "abisso": blu profondo, vetro, bioluminescenza */
:root {
  --bg0: #020a14; --bg1: #04101c; --bg2: #0a1d30;
  --glass: rgba(140, 200, 255, .05); --glass2: rgba(140, 200, 255, .09);
  --line: rgba(140, 200, 255, .12); --line2: rgba(140, 200, 255, .22);
  --text: #e6f1ff; --mute: #8ba3bf; --dim: #5d7590;
  --acc: #5ee6ff; --acc2: #6ef0b4; --accglow: rgba(94, 230, 255, .35);
  --ok: #4ade80; --warn: #fbbf24; --bad: #fb7185;
  --r: 18px; --r2: 12px;
  --font: 'Outfit', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
}
.theme-marino { --acc: #5ee6ff; --acc2: #818cf8; --accglow: rgba(94, 230, 255, .35); }
.theme-dolce  { --acc: #6ef0b4; --acc2: #bef264; --accglow: rgba(110, 240, 180, .32);
  --bg0: #020d0c; --bg1: #04141a; --bg2: #0a2226; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html { background: var(--bg0); }
body {
  margin: 0; min-height: 100vh; font-family: var(--font); font-size: 16px; line-height: 1.45; color: var(--text);
  background: var(--bg0); padding-bottom: env(safe-area-inset-bottom);
}
a { color: var(--acc); text-decoration: none; }
b { font-weight: 600; }

/* bolle che salgono */
.ocean { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 0;
  background:
    radial-gradient(1200px 600px at 80% -10%, color-mix(in srgb, var(--acc) 18%, transparent), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, color-mix(in srgb, var(--acc2) 10%, transparent), transparent 60%),
    linear-gradient(180deg, var(--bg1), var(--bg0) 70%); }
.ocean span {
  position: absolute; bottom: -40px; width: 10px; height: 10px; border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--acc) 50%, transparent);
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.35), transparent 60%);
  animation: rise linear infinite; opacity: .5;
}
.ocean span:nth-child(1) { left: 6%;  animation-duration: 19s; }
.ocean span:nth-child(2) { left: 18%; width: 6px; height: 6px; animation-duration: 14s; animation-delay: 4s; }
.ocean span:nth-child(3) { left: 33%; width: 14px; height: 14px; animation-duration: 24s; animation-delay: 2s; }
.ocean span:nth-child(4) { left: 52%; width: 5px; height: 5px; animation-duration: 12s; animation-delay: 7s; }
.ocean span:nth-child(5) { left: 67%; animation-duration: 21s; animation-delay: 1s; }
.ocean span:nth-child(6) { left: 78%; width: 7px; height: 7px; animation-duration: 16s; animation-delay: 9s; }
.ocean span:nth-child(7) { left: 89%; width: 12px; height: 12px; animation-duration: 26s; animation-delay: 5s; }
.ocean span:nth-child(8) { left: 95%; width: 4px; height: 4px; animation-duration: 11s; animation-delay: 3s; }
@keyframes rise {
  0% { transform: translate(0, 0); opacity: 0; }
  10% { opacity: .55; }
  50% { transform: translate(14px, -55vh); }
  100% { transform: translate(-8px, -110vh); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .ocean span { display: none; } }

/* barra in alto */
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  background: color-mix(in srgb, var(--bg0) 72%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { font-weight: 600; letter-spacing: .02em; color: var(--text); font-size: 18px; display: flex; align-items: center; gap: 8px; }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; box-shadow: 0 0 14px var(--accglow); }
.topnav { margin-left: auto; }
.iconbtn { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: var(--glass); border: 1px solid var(--line); color: var(--text); font-size: 24px; line-height: 1; padding-bottom: 3px; }
.userchip { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; color: var(--bg0); font-weight: 700;
  background: linear-gradient(135deg, var(--acc), var(--acc2)); box-shadow: 0 0 18px var(--accglow); }

.wrap { position: relative; z-index: 1; max-width: 920px; margin: 0 auto; padding: 18px 16px 40px; }
.foot { position: relative; z-index: 1; text-align: center; color: var(--dim); font-size: 12px; padding: 10px 0 30px; letter-spacing: .08em; text-transform: uppercase; }

/* tipografia */
h1, .h1 { font-size: 30px; font-weight: 600; margin: 4px 0 6px; letter-spacing: -.01em; line-height: 1.1; }
.h2 { font-size: 15px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--mute); margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.h2.red { color: var(--bad); }
.h2row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.h2row .h2 { margin: 0; }
.count { font-family: var(--mono); font-size: 12px; background: var(--glass2); border: 1px solid var(--line); padding: 1px 8px; border-radius: 99px; color: var(--text); letter-spacing: 0; }
.eyebrow { margin: 0; color: var(--acc); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; }
.muted { color: var(--mute); }
.small { font-size: 14px; }
.hint { color: var(--dim); font-size: 13px; margin-top: 16px; }
.empty-inline { padding: 8px 2px; }

.hero { padding: 6px 2px 18px; }
.block { margin: 22px 0; }

/* bottoni */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-weight: 500; cursor: pointer;
  padding: 11px 18px; border-radius: 99px; border: 1px solid var(--line2); background: var(--glass2); color: var(--text);
  transition: transform .12s, box-shadow .2s, background .2s;
}
.btn:hover { background: rgba(140,200,255,.14); }
.btn:active { transform: scale(.97); }
.btn.primary { border: 0; color: #02121c; font-weight: 600; background: linear-gradient(135deg, var(--acc), var(--acc2)); box-shadow: 0 6px 24px -6px var(--accglow); }
.btn.small { padding: 7px 14px; font-size: 14px; }
.btn.ghost { background: transparent; }
.btn.danger { background: rgba(251,113,133,.12); border-color: rgba(251,113,133,.4); color: #fecdd3; }
.btn.wide { width: 100%; }
.btnrow { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.mini { font: inherit; font-size: 12px; font-family: var(--mono); padding: 3px 8px; border-radius: 99px; border: 1px solid var(--line); background: transparent; color: var(--mute); cursor: pointer; }
.x { font: inherit; font-size: 18px; line-height: 1; width: 26px; height: 26px; border-radius: 50%; border: 1px solid transparent; background: transparent; color: var(--dim); cursor: pointer; }
.x:hover { color: var(--bad); border-color: rgba(251,113,133,.4); }
.edit { color: var(--mute); padding: 6px 8px; border-radius: 10px; font-size: 16px; }
.edit:hover { color: var(--acc); background: var(--glass); }

/* card & form */
.card { background: var(--glass); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); margin-bottom: 14px; }
.form { display: grid; gap: 14px; }
.form label { display: grid; gap: 6px; font-size: 13px; color: var(--mute); letter-spacing: .02em; }
input, select, textarea {
  font: inherit; font-size: 16px; color: var(--text); width: 100%;
  background: rgba(2, 10, 20, .55); border: 1px solid var(--line); border-radius: var(--r2); padding: 11px 13px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--acc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--acc) 20%, transparent); }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--mute) 50%), linear-gradient(135deg, var(--mute) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
input[type=date], input[type=datetime-local] { min-height: 46px; }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--acc); }
textarea { resize: vertical; }
::placeholder { color: var(--dim); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.span2 { grid-column: span 2; }
@media (max-width: 560px) { .row2 { grid-template-columns: 1fr; } .row3 { grid-template-columns: 1fr 1fr; } .row3 .span2 { grid-column: 1 / -1; } }
.combo { display: flex; gap: 0; }
.combo input { flex: 1 1 auto; width: 1%; border-top-right-radius: 0; border-bottom-right-radius: 0; min-width: 0; }
.combo select, .combo .unit, .combo output { flex: 0 0 auto; width: 84px; max-width: 110px; border-top-left-radius: 0; border-bottom-left-radius: 0; border-left: 0; }
.combo output { display: flex; align-items: center; padding: 0 12px; border: 1px solid var(--line); border-left: 0; border-radius: 0 var(--r2) var(--r2) 0; color: var(--acc); font-family: var(--mono); font-size: 14px; white-space: nowrap; }
.combo output:empty { display: none; }
.combo input:only-child, .combo input:has(+ output:empty) { border-radius: var(--r2); }
.narrow { max-width: 90px; }
.check-line { display: flex !important; grid-template-columns: none; align-items: flex-start; gap: 10px !important; font-size: 14px !important; color: var(--text) !important; }
.check-line input { margin-top: 3px; }
.form.inline { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.form.inline > * { flex: 1 1 140px; }
.form.inline .btn { flex: 0 0 auto; }

details > summary { cursor: pointer; list-style: none; }
details > summary::-webkit-details-marker { display: none; }
.formcard { padding: 0; overflow: hidden; }
.formcard > summary { padding: 15px 18px; font-weight: 600; color: var(--acc); display: flex; align-items: center; }
.formcard > summary::after { content: '▾'; margin-left: auto; color: var(--mute); transition: transform .2s; }
.formcard[open] > summary::after { transform: rotate(180deg); }
.formcard[open] > summary { border-bottom: 1px solid var(--line); }
.formcard > form { padding: 18px; }
.formcard .danger-line { padding: 0 18px 18px; }
details.sub > summary { color: var(--acc); font-size: 14px; padding: 6px 0; }
details.sub[open] > summary { margin-bottom: 10px; }

.flash { position: relative; z-index: 2; padding: 12px 16px; border-radius: var(--r2); margin-bottom: 16px; border: 1px solid; animation: drop .35s ease-out; }
.flash-ok { background: rgba(74,222,128,.1); border-color: rgba(74,222,128,.35); color: #bbf7d0; }
.flash-warn { background: rgba(251,191,36,.1); border-color: rgba(251,191,36,.4); color: #fde68a; }
.flash-err { background: rgba(251,113,133,.1); border-color: rgba(251,113,133,.4); color: #fecdd3; }
@keyframes drop { from { transform: translateY(-8px); opacity: 0; } }

/* chip */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px 16px; padding: 0 16px; }
.chips.scroll::-webkit-scrollbar { display: none; }
.chip { font: inherit; font-size: 14px; white-space: nowrap; padding: 7px 13px; border-radius: 99px; background: var(--glass); border: 1px solid var(--line); color: var(--text); cursor: pointer; }
.chip.on { background: color-mix(in srgb, var(--acc) 18%, transparent); border-color: var(--acc); color: var(--acc); }
.quickadd { display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 8px; margin: 0 -16px 16px; padding: 2px 16px; scrollbar-width: none; }
.quickadd::-webkit-scrollbar { display: none; }

/* badge & pill */
.badge { display: inline-block; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; padding: 3px 10px; border-radius: 99px; font-weight: 600; }
.badge.marino { background: rgba(94,230,255,.12); color: #8cf0ff; border: 1px solid rgba(94,230,255,.35); }
.badge.dolce { background: rgba(110,240,180,.12); color: #9ff7c9; border: 1px solid rgba(110,240,180,.35); }
.pill { font-size: 12px; padding: 3px 10px; border-radius: 99px; font-weight: 500; }
.pill.late { background: rgba(251,113,133,.15); color: #fda4af; }
.pill.today { background: rgba(251,191,36,.15); color: #fcd34d; }
.pill.ok { background: rgba(74,222,128,.12); color: #86efac; }

/* card vasca */
.tankgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.tankcard {
  position: relative; overflow: hidden; display: block; color: var(--text); padding: 18px; border-radius: 22px;
  background: linear-gradient(160deg, rgba(140,200,255,.08), rgba(140,200,255,.02)); border: 1px solid var(--line);
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.tankcard:hover { transform: translateY(-2px); border-color: var(--line2); }
.tankcard.marino { --tc: #5ee6ff; } .tankcard.dolce { --tc: #6ef0b4; }
.tankcard:hover { box-shadow: 0 10px 40px -12px color-mix(in srgb, var(--tc) 45%, transparent); }
.tc-top { display: flex; justify-content: space-between; align-items: center; }
.tankcard h3 { font-size: 22px; font-weight: 600; margin: 14px 0 2px; }
.tc-stats { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 16px; }
.tc-stats div { display: grid; }
.tc-stats b { font-family: var(--mono); font-size: 18px; font-weight: 600; }
.tc-stats span { font-size: 11px; color: var(--mute); text-transform: uppercase; letter-spacing: .05em; }
.good { color: var(--ok); } .warn { color: var(--warn); }
.tc-wave { position: absolute; left: -10%; right: -10%; bottom: -36px; height: 70px; opacity: .22; border-radius: 45%;
  background: radial-gradient(ellipse at center, var(--tc), transparent 70%); animation: sway 9s ease-in-out infinite; }
@keyframes sway { 50% { transform: translateX(6%) scaleY(1.2); } }

.empty { text-align: center; padding: 30px 18px; }
.empty .big { font-size: 44px; margin: 0; }

/* attività */
.tasks { display: grid; gap: 8px; }
.task { display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 10px; border-radius: 16px; background: var(--glass); border: 1px solid var(--line); flex: 1; min-width: 0; }
.task.due-late { border-color: rgba(251,113,133,.35); background: linear-gradient(90deg, rgba(251,113,133,.08), var(--glass) 40%); }
.task.due-today { border-color: color-mix(in srgb, var(--c) 40%, transparent); }
.check {
  width: 44px; height: 44px; flex: 0 0 44px; border-radius: 14px; cursor: pointer; display: grid; place-items: center; font-size: 20px;
  background: color-mix(in srgb, var(--c) 14%, transparent); border: 1px solid color-mix(in srgb, var(--c) 45%, transparent);
  transition: transform .15s, background .2s, box-shadow .2s;
}
.check:hover { background: color-mix(in srgb, var(--c) 30%, transparent); box-shadow: 0 0 18px color-mix(in srgb, var(--c) 40%, transparent); }
.check:hover span { display: none; }
.check:hover::after { content: '✓'; color: var(--c); font-weight: 700; font-size: 22px; }
.check:active { transform: scale(.9); }
.task-body { flex: 1; min-width: 0; }
.task-title { font-weight: 500; }
.task-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 13px; color: var(--mute); margin-top: 2px; }
.dose { font-family: var(--mono); color: var(--c); }
.tankname { font-weight: 500; }
.tankname.marino { color: #8cf0ff; } .tankname.dolce { color: #9ff7c9; }
.task-side { display: grid; justify-items: end; gap: 4px; }
.due { font-size: 13px; color: var(--mute); white-space: nowrap; }
.due-late .due { color: var(--bad); font-weight: 600; }
.due-today .due { color: var(--warn); font-weight: 500; }
.task-wrap { display: flex; align-items: center; gap: 4px; }

/* testata vasca & schede */
.tankhead { padding: 4px 2px 12px; }
.tankhead h1 { margin-top: 10px; }
.tabs { position: sticky; top: calc(57px + env(safe-area-inset-top)); z-index: 10; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none;
  margin: 0 -16px 18px; padding: 8px 16px; background: color-mix(in srgb, var(--bg0) 75%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line); }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { white-space: nowrap; padding: 8px 14px; border-radius: 99px; color: var(--mute); font-size: 15px; font-weight: 500; }
.tabs a.on { color: #02121c; background: linear-gradient(135deg, var(--acc), var(--acc2)); box-shadow: 0 4px 18px -4px var(--accglow); }

/* statistiche */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
@media (max-width: 700px) { .stats { grid-template-columns: 1fr 1fr; } }
.stat { padding: 14px; border-radius: 16px; background: var(--glass); border: 1px solid var(--line); display: grid; gap: 2px; min-width: 0; }
.stat-label { font-size: 12px; color: var(--mute); text-transform: uppercase; letter-spacing: .05em; }
.stat b { font-size: 22px; font-weight: 600; }
.stat small { color: var(--mute); font-size: 13px; overflow: hidden; text-overflow: ellipsis; }

/* parametri */
.paramgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.param { display: grid; gap: 2px; padding: 12px 14px; border-radius: 16px; background: var(--glass); border: 1px solid var(--line); color: var(--text); position: relative; overflow: hidden; }
.param::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--dim); }
.param.st-ok::before { background: var(--ok); box-shadow: 0 0 12px var(--ok); }
.param.st-low::before, .param.st-high::before { background: var(--bad); box-shadow: 0 0 12px var(--bad); }
.param.st-low, .param.st-high { border-color: rgba(251,113,133,.35); }
.p-label { font-size: 12px; color: var(--mute); text-transform: uppercase; letter-spacing: .05em; }
.p-val { font-family: var(--mono); font-size: 24px; font-weight: 600; }
.p-val small { font-size: 12px; color: var(--mute); margin-left: 4px; font-family: var(--font); font-weight: 400; }
.st-low .p-val, .st-high .p-val { color: #fda4af; }
.p-range { font-size: 12px; color: var(--dim); }

/* test: campi */
.pins { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.pin span { display: flex; justify-content: space-between; color: var(--text); font-size: 14px; }
.pin em { font-style: normal; color: var(--dim); font-size: 12px; }
.pin input { font-family: var(--mono); font-size: 18px; text-align: center; }
.pin input.ok { border-color: var(--ok); box-shadow: 0 0 0 3px rgba(74,222,128,.12); }
.pin input.bad { border-color: var(--bad); box-shadow: 0 0 0 3px rgba(251,113,133,.15); }
.pin input.auto { border-style: dashed; }

/* grafico */
.chart { padding: 12px 8px 6px; min-height: 230px; }
.chart svg { width: 100%; height: 240px; display: block; overflow: visible; }
.chart .axis { stroke: var(--line); stroke-width: 1; }
.chart .band { fill: color-mix(in srgb, var(--ok) 10%, transparent); }
.chart .bandline { stroke: color-mix(in srgb, var(--ok) 45%, transparent); stroke-dasharray: 4 4; }
.chart .line { fill: none; stroke: var(--acc); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; filter: drop-shadow(0 0 6px var(--accglow)); }
.chart .area { fill: url(#cg); }
.chart .pt { fill: var(--bg1); stroke: var(--acc); stroke-width: 2; }
.chart .pt.bad { stroke: var(--bad); fill: var(--bad); }
.chart text { fill: var(--mute); font-size: 11px; font-family: var(--mono); }
.chart .lbl { fill: var(--text); font-size: 12px; }
.chart .empty { fill: var(--dim); font-family: var(--font); font-size: 14px; }

/* tabelle */
.tablewrap { overflow-x: auto; padding: 0; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { padding: 9px 10px; text-align: center; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-weight: 500; color: var(--mute); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; position: sticky; top: 0; background: var(--bg1); }
th small { display: block; text-transform: none; color: var(--dim); font-size: 11px; }
td { font-family: var(--mono); }
td.date { text-align: left; font-family: var(--font); position: sticky; left: 0; background: var(--bg1); }
td.date small { display: block; color: var(--dim); font-size: 11px; }
td.st-low, td.st-high { color: #fda4af; background: rgba(251,113,133,.08); }
td.st-ok { color: var(--text); }
.ptable td { font-family: var(--font); }
.ptable td:first-child { text-align: left; }
.ptable input { padding: 7px 9px; font-size: 15px; text-align: center; font-family: var(--mono); }
.ptable tr.off { opacity: .45; }
.c { text-align: center; }

/* diario */
.timeline { position: relative; padding-left: 4px; }
.tl-month { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--acc); margin: 18px 0 8px 54px; }
.tl-month:first-child { margin-top: 0; }
.tl-item { position: relative; display: flex; gap: 12px; padding: 8px 0; }
.tl-item::before { content: ''; position: absolute; left: 19px; top: 0; bottom: 0; width: 2px; background: linear-gradient(var(--line), var(--line)); }
.tl-dot { position: relative; z-index: 1; width: 40px; height: 40px; flex: 0 0 40px; border-radius: 50%; display: grid; place-items: center; font-size: 17px;
  background: color-mix(in srgb, var(--c) 16%, var(--bg1)); border: 1px solid color-mix(in srgb, var(--c) 50%, transparent); }
.tl-body { flex: 1; min-width: 0; padding-top: 2px; }
.tl-title { font-weight: 500; }
.tl-detail { font-size: 14px; color: var(--mute); }
.tl-notes { font-size: 14px; color: var(--text); opacity: .85; margin-top: 4px; padding: 8px 10px; border-left: 2px solid color-mix(in srgb, var(--c) 60%, transparent); background: var(--glass); border-radius: 0 10px 10px 0; }
.tl-side { display: grid; justify-items: end; align-content: start; gap: 2px; }
.tl-date { font-family: var(--mono); font-size: 12px; color: var(--mute); text-align: right; }

/* abitanti & attrezzatura */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.lcard, .ecard { padding: 14px 16px; border-radius: 16px; background: var(--glass); border: 1px solid var(--line); }
.lc-head { display: flex; justify-content: space-between; gap: 8px; }
.lc-name { font-weight: 600; font-size: 17px; }
.qty { font-family: var(--mono); color: var(--acc); font-size: 14px; }
.lc-sci { font-style: italic; color: var(--mute); font-size: 14px; }
.lc-sci.normal { font-style: normal; }
.lc-meta { font-size: 13px; color: var(--mute); margin-top: 8px; }
.lc-meta b { color: var(--acc); font-weight: 500; }
.lc-notes { font-size: 14px; margin-top: 8px; opacity: .85; }
.lc-out { margin-top: 10px; }
.lc-out > summary { font-size: 13px; color: var(--dim); }
.lc-out[open] > summary { margin-bottom: 8px; }
.ecard { display: flex; gap: 12px; align-items: flex-start; }
.ec-icon { width: 44px; height: 44px; flex: 0 0 44px; display: grid; place-items: center; font-size: 22px; border-radius: 14px; background: var(--glass2); border: 1px solid var(--line); }
.ec-body { flex: 1; min-width: 0; }
.ec-cat { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--acc); }
.settings { font-family: var(--mono); font-size: 13px; margin-top: 8px; padding: 8px 10px; background: rgba(2,10,20,.5); border-radius: 10px; border: 1px solid var(--line); }
.history > summary { display: flex; align-items: center; gap: 8px; color: var(--mute); font-weight: 500; }
.gone { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 6px; }
.gone li { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 14px; padding: 6px 0; border-bottom: 1px solid var(--line); }

/* agenda: ripetizione */
.freq { border: 1px solid var(--line); border-radius: var(--r2); padding: 12px; margin: 0; display: grid; gap: 12px; }
.freq legend { font-size: 13px; color: var(--mute); padding: 0 6px; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg label, .daybox { display: block !important; cursor: pointer; }
.seg input, .daybox input { position: absolute; opacity: 0; pointer-events: none; }
.seg span, .daybox span { display: inline-block; padding: 7px 12px; border-radius: 99px; border: 1px solid var(--line); color: var(--text); font-size: 14px; }
.seg input:checked + span, .daybox input:checked + span { background: color-mix(in srgb, var(--acc) 18%, transparent); border-color: var(--acc); color: var(--acc); }
.freq-n label { display: flex !important; align-items: center; gap: 8px; color: var(--text) !important; font-size: 15px !important; }
.freq-week { display: flex; flex-wrap: wrap; gap: 6px; }
.freq-week .daybox span { width: 46px; text-align: center; padding: 7px 0; }

/* scelta tipo vasca */
.typepick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.typeopt { cursor: pointer; display: block !important; }
.typeopt input { position: absolute; opacity: 0; }
.typeopt span { display: grid; gap: 4px; padding: 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--glass); color: var(--text); transition: all .2s; }
.typeopt b { font-size: 18px; }
.typeopt small { color: var(--mute); }
.typeopt.marino input:checked + span { border-color: #5ee6ff; background: rgba(94,230,255,.1); box-shadow: 0 0 24px -6px rgba(94,230,255,.5); }
.typeopt.dolce input:checked + span { border-color: #6ef0b4; background: rgba(110,240,180,.1); box-shadow: 0 0 24px -6px rgba(110,240,180,.5); }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; }
.kv dt { color: var(--mute); font-size: 14px; }
.kv dd { margin: 0; }
.dangerzone { border-color: rgba(251,113,133,.25); }
.note { color: var(--mute); font-size: 15px; }

/* login */
.login { max-width: 380px; margin: 6vh auto 0; }
.login-logo { text-align: center; margin-bottom: 22px; }
.logo-svg { width: 96px; height: 96px; filter: drop-shadow(0 0 20px rgba(94,230,255,.35)); animation: float 6s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-6px); } }
.login h1 { font-size: 34px; margin-top: 10px; }

/* installazione app */
.installcard { display: flex; gap: 14px; align-items: flex-start; border-color: color-mix(in srgb, var(--acc) 40%, transparent);
  background: linear-gradient(135deg, color-mix(in srgb, var(--acc) 12%, transparent), var(--glass)); }
.installcard[hidden] { display: none; }
.installcard img { border-radius: 14px; flex: 0 0 52px; box-shadow: 0 0 20px var(--accglow); }
.ic-body { flex: 1; min-width: 0; }
.ic-body p { margin: 4px 0 10px; }
.ios-steps { margin: 6px 0 12px; padding-left: 20px; color: var(--text); }
.ios-steps li { margin: 3px 0; }
.ios-share { display: inline-block; padding: 0 5px; border: 1px solid var(--line2); border-radius: 6px; font-size: 12px; }
@media (display-mode: standalone) { .topbar { padding-top: calc(12px + env(safe-area-inset-top)); } }
