/* Pannello staff Acquatic — stesso stile dello store, giorno e notte */

body.adm { display: grid; grid-template-columns: 264px 1fr; min-height: 100vh; background: var(--bg); }

/* ---------- barra laterale ---------- */

.adm-side {
  position: sticky; top: 0; height: 100vh; z-index: 5; display: flex; flex-direction: column; padding: 22px 16px 18px; color: #a7bed4; overflow-y: auto;
  background:
    linear-gradient(180deg, rgba(9, 22, 40, .97) 0%, rgba(11, 28, 50, .95) 55%, rgba(13, 42, 76, .93) 100%),
    url("/img/acquatic-background.webp") center / cover no-repeat;
  box-shadow: 1px 0 0 rgba(255, 255, 255, .04);
}
.adm-brand { display: flex; align-items: center; gap: 12px; padding: 2px 8px 22px; margin-bottom: 14px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.adm-brand img { width: 46px; height: 46px; object-fit: contain; filter: drop-shadow(0 6px 12px rgba(0, 0, 0, .35)); transition: transform .3s cubic-bezier(.25, .8, .25, 1); }
.adm-brand:hover img { transform: rotate(-4deg) scale(1.06); }
.adm-brand span { display: flex; flex-direction: column; line-height: 1.2; }
.adm-brand b { font-family: var(--display); font-size: 18px; color: #fff; letter-spacing: -.02em; }
.adm-brand i { font-style: normal; font-size: 10.5px; letter-spacing: 1.5px; text-transform: uppercase; color: #7dc0ff; margin-top: 2px; }

.adm-nav-label { display: block; padding: 0 12px 8px; font-family: var(--display); font-size: 10.5px; font-weight: 600; letter-spacing: 1.6px; text-transform: uppercase; color: #5f7d9c; }
.adm-nav { display: flex; flex-direction: column; gap: 3px; }
.adm-nav a {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 11px; color: #b4c8dc;
  font-family: var(--display); font-size: 14.5px; font-weight: 500; transition: background .18s, color .18s, transform .18s;
}
.adm-nav-ico { width: 30px; height: 30px; display: grid; place-items: center; flex: none; }
.adm-nav-ico .px { width: 26px; height: 26px; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .35)); transition: transform .3s cubic-bezier(.25, .8, .25, 1); }
.adm-nav a:hover { background: rgba(255, 255, 255, .07); color: #fff; transform: translateX(2px); }
.adm-nav a:hover .px { transform: rotate(-6deg) scale(1.1); }
.adm-nav a.is-on { background: linear-gradient(135deg, #1580f5, #0b57ac); color: #fff; font-weight: 600; box-shadow: 0 8px 20px rgba(15, 116, 230, .35); }
.adm-nav a.is-on::before { content: ''; position: absolute; left: -16px; top: 9px; bottom: 9px; width: 4px; border-radius: 0 4px 4px 0; background: #5cb0ff; }

.adm-side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 3px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .08); }
.adm-me { display: flex; align-items: center; gap: 11px; padding: 8px 10px 12px; }
.adm-me-av { width: 38px; height: 38px; display: grid; place-items: center; flex: none; border-radius: 11px; background: linear-gradient(135deg, #1580f5, #3b9dff); color: #fff; font-family: var(--display); font-weight: 700; font-size: 16px; box-shadow: 0 6px 14px rgba(15, 116, 230, .35); }
.adm-me span { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.adm-me b { color: #fff; font-family: var(--display); font-size: 14px; overflow: hidden; text-overflow: ellipsis; }
.adm-me i { font-style: normal; color: #7d97b2; font-size: 12px; }
.adm-side-foot a, .adm-side-foot button {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: transparent; border: 0;
  color: #8ba7c1; font-family: var(--display); font-size: 13.5px; width: 100%; text-align: left; transition: background .16s, color .16s;
}
.adm-side-foot a:hover, .adm-side-foot button:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.adm-side-foot button:hover { color: #fca5a5; }

/* ---------- testata ---------- */

.adm-main { display: flex; flex-direction: column; min-width: 0; }
.adm-top {
  display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 32px; position: sticky; top: 0; z-index: 4;
  background: color-mix(in srgb, var(--panel) 86%, transparent); backdrop-filter: blur(12px); box-shadow: 0 1px 0 var(--line-soft);
}
.adm-crumb { display: block; font-family: var(--display); font-size: 11px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: var(--blue); }
.adm-top h1 { font-size: 24px; margin-top: 2px; }
.adm-top-r { display: flex; align-items: center; gap: 12px; }
.adm-top-r .theme-btn { margin-left: 0; }
.adm-status {
  display: inline-flex; align-items: center; gap: 9px; padding: 9px 14px; border-radius: 30px; font-size: 13px; font-weight: 600;
  background: var(--panel-2); border: 1px solid var(--line-soft); color: var(--grey);
}
.adm-status.is-on { color: #15803d; background: rgba(34, 197, 94, .08); border-color: rgba(34, 197, 94, .25); }
.adm-status.is-off { color: #b91c1c; background: rgba(239, 68, 68, .07); border-color: rgba(239, 68, 68, .22); }
[data-theme="dark"] .adm-status.is-on { color: #4ade80; }
[data-theme="dark"] .adm-status.is-off { color: #f87171; }

.adm-body { padding: 28px 32px 60px; flex: 1; }
.adm-foot { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 18px 32px; border-top: 1px solid var(--line-soft); color: var(--grey-2); font-size: 12.5px; }
.adm-foot .signature a { color: var(--ink); }

/* ---------- card statistiche ---------- */

.adm-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; margin-bottom: 26px; }
.adm-card { background: var(--panel); border: 1px solid var(--line-soft); border-radius: 16px; padding: 20px 22px; box-shadow: var(--shadow-sm); }
.adm-cards .adm-card {
  position: relative; overflow: hidden; padding: 20px 22px 22px; transition: transform .22s, box-shadow .22s, border-color .22s;
  --acc: var(--blue);
}
.adm-cards .adm-card::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--acc); opacity: .9; }
.adm-cards .adm-card::before {
  content: ''; position: absolute; right: -40px; top: -40px; width: 150px; height: 150px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--acc) 22%, transparent), transparent 70%); pointer-events: none;
}
.adm-cards .adm-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--acc) 45%, transparent); }
.adm-card-ico { position: absolute; right: 14px; top: 12px; width: 56px; height: 56px; }
.adm-card-ico .px { width: 100%; height: 100%; }
.adm-cards .adm-card:hover .px { transform: translateY(-3px) rotate(-6deg) scale(1.08); }
.adm-cards .adm-card b { position: relative; display: block; font-family: var(--display); font-weight: 800; font-size: 30px; color: var(--ink); margin-top: 34px; line-height: 1.1; letter-spacing: -.02em; }
.adm-cards .adm-card span:not(.adm-card-ico) { position: relative; display: block; margin-top: 6px; font-size: 11.5px; color: var(--grey-2); text-transform: uppercase; letter-spacing: 1.1px; font-weight: 600; }
.adm-card .ico { color: var(--blue); }
.adm-cards .acc-gold { --acc: #e8b923; } .adm-cards .acc-blue { --acc: #2f8cff; } .adm-cards .acc-amber { --acc: #f59e0b; }
.adm-cards .acc-wood { --acc: #b07a3a; } .adm-cards .acc-green { --acc: #22c55e; }

/* ---------- pannelli e tabelle ---------- */

.adm-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 22px; align-items: start; }
.adm-panel { background: var(--panel); border: 1px solid var(--line-soft); border-radius: 16px; box-shadow: var(--shadow-sm); overflow: hidden; }
.adm-panel > h3 {
  position: relative; padding: 17px 22px 17px 36px; border-bottom: 1px solid var(--line-soft); font-size: 16px;
  display: flex; align-items: center; gap: 10px; justify-content: space-between; background: var(--panel-2);
}
.adm-panel > h3::before { content: ''; position: absolute; left: 22px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 2px; background: var(--blue); box-shadow: 0 0 0 4px var(--blue-soft); }
.adm-panel .pad { padding: 20px 22px; }

table.tbl, table.adm-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
table.tbl th, table.adm-table th {
  font-family: var(--display); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 1.1px; color: var(--grey-2);
  text-align: left; padding: 13px 12px; background: var(--panel-2); border-bottom: 1px solid var(--line-soft);
}
table.tbl td, table.adm-table td { padding: 14px 12px; border-top: 1px solid var(--line-soft); vertical-align: middle; color: var(--grey); }
table.tbl tbody tr, table.adm-table tbody tr { transition: background .15s; }
table.tbl tbody tr:hover td, table.adm-table tbody tr:hover td { background: var(--blue-soft); }
table.tbl b, table.adm-table b { color: var(--ink); }
table.adm-table a { color: var(--blue); font-family: var(--display); font-weight: 600; }
table.tbl td a, table.adm-table td a { white-space: nowrap; }
.adm-panel table.tbl th:first-child, .adm-panel table.tbl td:first-child, .adm-card table.adm-table th:first-child { padding-left: 22px; }
.adm-panel table.tbl th:last-child, .adm-panel table.tbl td:last-child { padding-right: 22px; }
.adm-card > table.adm-table { margin: 0 -22px; width: calc(100% + 44px); }
.adm-card > table.adm-table td:first-child { padding-left: 22px; }
.adm-card > table.adm-table th:last-child, .adm-card > table.adm-table td:last-child { padding-right: 22px; }

.status-pill { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .04); }

/* ---------- grafico ---------- */

.bars { display: flex; align-items: flex-end; gap: 8px; height: 150px; padding: 18px 4px 0; border-bottom: 1px dashed var(--line); }
.bars .bar { flex: 1; background: linear-gradient(180deg, var(--blue-hot), var(--blue)); border-radius: 7px 7px 2px 2px; min-height: 4px; position: relative; animation: grow .8s cubic-bezier(.2, 1, .3, 1) both; box-shadow: 0 6px 14px rgba(15, 116, 230, .22); }
.bars .bar span { position: absolute; inset: auto 0 -22px; text-align: center; font-size: 10.5px; color: var(--grey-2); }
.bars .bar b {
  position: absolute; left: 50%; top: -30px; transform: translateX(-50%) translateY(4px); padding: 2px 7px; border-radius: 6px;
  background: var(--ink); color: var(--panel); font-size: 11.5px; font-family: var(--display); opacity: 0; transition: .18s; white-space: nowrap;
}
.bars .bar:hover { filter: brightness(1.1); }
.bars .bar:hover b { opacity: 1; transform: translateX(-50%); }
@keyframes grow { from { transform: scaleY(0); transform-origin: bottom; } }

/* ---------- moduli e liste ---------- */

.adm-toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 20px; padding: 14px 16px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line-soft); box-shadow: var(--shadow-sm); }
.adm-toolbar form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.adm-toolbar input, .adm-toolbar select { width: auto; min-width: 210px; padding: 10px 14px; border-radius: 10px; }
.adm-toolbar .spacer { flex: 1; }

.adm-form { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.adm-form .full { grid-column: 1 / -1; }
.adm-body .field label { color: var(--grey); }
.adm-body input[type=text], .adm-body input[type=email], .adm-body input[type=password], .adm-body input[type=number],
.adm-body input[type=search], .adm-body select, .adm-body textarea { border-radius: 10px; background: var(--panel-2); }
.adm-body input:focus, .adm-body select:focus, .adm-body textarea:focus { background: var(--panel); }

.mini-list { display: grid; gap: 2px; }
.mini-list .row { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 12px 10px; margin: 0 -10px; border-radius: 10px; border-bottom: 1px solid var(--line-soft); font-size: 14px; transition: background .15s; }
.mini-list .row:hover { background: var(--panel-2); }
.mini-list .row:last-child { border: 0; }
.mini-list .row b { color: var(--ink); }

.img-grid { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.img-cell { position: relative; width: 132px; }
.img-cell img { width: 132px; height: 88px; object-fit: cover; border: 1px solid var(--line-soft); border-radius: 11px; box-shadow: var(--shadow-sm); }
.img-cell form { position: absolute; top: 6px; right: 6px; }
.img-cell button { background: var(--bad); border: 0; color: #fff; border-radius: 7px; padding: 5px 6px; line-height: 0; box-shadow: var(--shadow-sm); }

.log-line { display: flex; gap: 10px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--line-soft); font-size: 13.5px; color: var(--grey); }
.log-line:last-child { border: 0; }
.log-line b { flex: none; font-family: var(--display); text-transform: uppercase; letter-spacing: .8px; color: var(--blue); font-size: 10px; padding: 2px 7px; border-radius: 6px; background: var(--blue-soft); min-width: 0; }
.log-line time { margin-left: auto; color: var(--grey-2); font-size: 12px; white-space: nowrap; }

.cmd-box { background: #0b1626; border: 1px solid var(--line-soft); border-radius: 10px; padding: 12px 14px; font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; color: #d7e6f5; white-space: pre-wrap; word-break: break-word; }

details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
details[open] > form { animation: toastIn .22s ease both; }

[data-theme="dark"] [style*="border:1px solid #fecaca"] { border-color: rgba(239, 68, 68, .35) !important; }

/* ---------- accesso ---------- */

.login-page { display: grid; grid-template-columns: 1.1fr .9fr; min-height: 100vh; background: var(--bg); }
.login-art {
  position: relative; overflow: hidden; display: flex; flex-direction: column; padding: 34px 48px; color: #fff;
  background:
    linear-gradient(160deg, rgba(9, 22, 40, .9) 0%, rgba(16, 40, 68, .8) 58%, rgba(15, 62, 108, .72) 100%),
    url("/img/acquatic-background.webp") center / cover no-repeat;
}
.login-art::before { content: ''; position: absolute; inset: 0; background: radial-gradient(600px 320px at 80% 15%, rgba(59, 157, 255, .26), transparent 70%); pointer-events: none; }
.login-back { position: relative; display: inline-flex; align-items: center; gap: 8px; width: max-content; font-size: 13.5px; font-weight: 600; color: #8fb0d0; transition: color .18s; }
.login-back:hover { color: #fff; }
.login-art-in { position: relative; margin: auto 0; max-width: 520px; animation: toastIn .6s cubic-bezier(.2, 1, .3, 1) both; }
.login-logo { width: 150px; margin-bottom: 26px; filter: drop-shadow(0 20px 36px rgba(0, 0, 0, .45)); animation: float 7s ease-in-out infinite; }
.login-art .kicker { color: #7dc0ff; }
.login-art h2 { color: #fff; font-size: clamp(28px, 3vw, 40px); margin: 12px 0 12px; line-height: 1.15; }
.login-art h2 em { font-style: normal; color: var(--blue-hot); }
.login-art p { color: #c3d4e6; font-size: 15.5px; margin: 0; }
.login-items { display: flex; gap: 18px; margin-top: 34px; }
.login-items .px { width: 56px; height: 56px; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .4)); animation: float 6s ease-in-out infinite; }
.login-items .px:nth-child(2) { animation-delay: -1.5s; } .login-items .px:nth-child(3) { animation-delay: -3s; } .login-items .px:nth-child(4) { animation-delay: -4.5s; }

.login-side { position: relative; display: grid; place-items: center; padding: 40px 28px; }
.login-theme { position: absolute; top: 22px; right: 22px; }
.login-box { width: min(400px, 100%); animation: toastIn .5s .1s cubic-bezier(.2, 1, .3, 1) both; }
.login-box h1 { font-size: 34px; margin: 10px 0 6px; }
.login-box p.sub { color: var(--grey); margin: 0 0 28px; font-size: 15px; }
.login-input { position: relative; }
.login-input .ico { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--grey-2); pointer-events: none; z-index: 1; }
.login-input input { height: 52px; padding-left: 44px !important; border-radius: 12px; background: var(--panel); }
.login-submit { width: 100%; height: 52px; justify-content: center; margin-top: 8px; border-radius: 12px; }

/* ---------- responsive ---------- */

@media (max-width: 1100px) {
  .adm-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  body.adm { grid-template-columns: 1fr; }
  .adm-side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px; padding: 14px; }
  .adm-brand { border: 0; padding: 0; margin: 0; }
  .adm-nav-label, .adm-me { display: none; }
  .adm-nav { flex-direction: row; flex-wrap: wrap; flex: 1 1 100%; }
  .adm-nav a { padding: 7px 10px; font-size: 13.5px; }
  .adm-nav a.is-on::before { display: none; }
  .adm-side-foot { margin: 0; border: 0; padding: 0; flex-direction: row; }
  .adm-form { grid-template-columns: 1fr; }
  .adm-body, .adm-top, .adm-foot { padding-inline: 18px; }
  .adm-top { position: static; }
  .adm-status { display: none; }
  .login-page { grid-template-columns: 1fr; }
  .login-art { padding: 26px 24px 34px; }
  .login-logo { width: 96px; margin-bottom: 16px; }
  .login-items { display: none; }
}
