/* Tutto Cast dashboard - Tutto Media brand, Apple Liquid Glass direction. */

@font-face { font-family: "Unbounded"; src: url("fonts/Unbounded-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Unbounded"; src: url("fonts/Unbounded-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Unbounded"; src: url("fonts/Unbounded-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Unbounded"; src: url("fonts/Unbounded-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
  --ink: #0F120E;
  --ink-2: #161a14;
  --lime: #C3D82D;
  --lime-deep: #9fb51a;
  --mist: #ECF5E6;
  --dim: rgba(236, 245, 230, .62);
  --faint: rgba(236, 245, 230, .38);
  --line: rgba(236, 245, 230, .12);
  --glass: rgba(236, 245, 230, .065);
  --glass-2: rgba(236, 245, 230, .11);
  --glass-3: rgba(236, 245, 230, .16);
  --danger: #ff6b5e;
  --warn: #ffc15e;
  --r-xl: 30px;
  --r-lg: 22px;
  --r-md: 16px;
  --r-sm: 12px;
  --display: "Unbounded", -apple-system, BlinkMacSystemFont, sans-serif;
  --text: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", system-ui, sans-serif;
  --spring: cubic-bezier(.2, .9, .25, 1.15);
  --ease: cubic-bezier(.25, .8, .25, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--ink);
  color: var(--mist);
  font: 15px/1.45 var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Ambient light behind the glass: slow-drifting lime glows + film grain */
.ambient { position: fixed; inset: 0; z-index: -2; overflow: hidden; pointer-events: none; }
.ambient i { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .55; will-change: transform; }
.ambient i:nth-child(1) { width: 46vw; height: 46vw; left: -12vw; top: -14vw; background: radial-gradient(circle, rgba(195,216,45,.42), rgba(195,216,45,0) 68%); animation: drift1 28s var(--ease) infinite alternate; }
.ambient i:nth-child(2) { width: 40vw; height: 40vw; right: -10vw; top: 22vh; background: radial-gradient(circle, rgba(120,170,60,.30), rgba(120,170,60,0) 70%); animation: drift2 34s var(--ease) infinite alternate; }
.ambient i:nth-child(3) { width: 52vw; height: 52vw; left: 24vw; bottom: -30vw; background: radial-gradient(circle, rgba(195,216,45,.22), rgba(195,216,45,0) 70%); animation: drift3 40s var(--ease) infinite alternate; }
@keyframes drift1 { to { transform: translate(10vw, 8vh) scale(1.08); } }
@keyframes drift2 { to { transform: translate(-8vw, -10vh) scale(.92); } }
@keyframes drift3 { to { transform: translate(-6vw, -6vh) scale(1.1); } }
.grain { position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .06; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }

/* ---------- Liquid Glass material ---------- */
.glass {
  position: relative;
  background: linear-gradient(160deg, rgba(236,245,230,.11), rgba(236,245,230,.035) 55%, rgba(236,245,230,.06));
  -webkit-backdrop-filter: blur(30px) saturate(175%);
  backdrop-filter: blur(30px) saturate(175%);
  border-radius: var(--r-xl);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.16),
    inset 0 -1px 0 rgba(255,255,255,.03),
    0 24px 60px -28px rgba(0,0,0,.75),
    0 2px 10px -4px rgba(0,0,0,.4);
}
/* specular rim: bright top-left edge fading out, a hint of lime bottom-right */
.glass::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(140deg, rgba(255,255,255,.42), rgba(255,255,255,.08) 28%, rgba(255,255,255,.03) 62%, rgba(195,216,45,.28));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.glass.soft { background: rgba(236,245,230,.045); box-shadow: inset 0 1px 0 rgba(255,255,255,.08); }
.glass.soft::before { opacity: .55; }

/* ---------- typography ---------- */
h1, h2, h3, .display { font-family: var(--display); letter-spacing: -.01em; margin: 0; }
h1 { font-size: clamp(26px, 3.2vw, 38px); font-weight: 600; line-height: 1.08; }
h2 { font-size: 20px; font-weight: 600; }
h3 { font-size: 15px; font-weight: 500; }
.eyebrow { font: 500 11px/1 var(--display); letter-spacing: .16em; text-transform: uppercase; color: var(--lime); }
.dim { color: var(--dim); }
.faint { color: var(--faint); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; }
.script { font-family: var(--display); font-weight: 400; font-style: normal; text-transform: lowercase; color: var(--lime); }
a { color: var(--lime); text-decoration: none; }
svg[aria-hidden="true"] { width: 18px; height: 18px; flex: none; }
.row > svg[aria-hidden="true"] { color: var(--lime); }

/* ---------- app frame ---------- */
.app { display: grid; grid-template-columns: 272px 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 16px; margin: 16px 0 16px 16px; height: calc(100vh - 32px);
  display: flex; flex-direction: column; padding: 22px 14px 16px; overflow: hidden;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 10px 18px; }
.brand img { width: 44px; height: auto; }
.brand .word { font: 700 17px/1 var(--display); letter-spacing: .02em; }
.brand .word span { color: var(--lime); font-weight: 500; }
.brand .sub { font-size: 11px; color: var(--faint); margin-top: 4px; letter-spacing: .02em; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a, .nav button.navbtn {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px;
  color: var(--dim); font-weight: 500; border: 0; background: none; font: inherit; cursor: pointer; text-align: left;
  transition: background .25s var(--ease), color .2s;
}
.nav a:hover { background: var(--glass); color: var(--mist); }
.nav a.on { background: var(--glass-2); color: var(--mist); box-shadow: inset 0 1px 0 rgba(255,255,255,.12); }
.nav a.on svg { color: var(--lime); }
.nav svg { width: 19px; height: 19px; flex: none; }
.nav-label { font: 500 10px/1 var(--display); letter-spacing: .16em; text-transform: uppercase; color: var(--faint); padding: 18px 12px 8px; }
.client-links { overflow-y: auto; flex: 1; margin: 0 -4px; padding: 0 4px; }
.client-links a { font-size: 14px; padding: 8px 12px; }
.client-links .count { margin-left: auto; font-size: 11px; color: var(--faint); display: flex; align-items: center; gap: 6px; }
.side-foot { padding: 14px 10px 0; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tagline { font: 400 12px/1.3 var(--display); color: var(--lime); }

.main { padding: 34px clamp(18px, 3.4vw, 48px) 120px; min-width: 0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 26px; }
.page-head .lead { margin-top: 8px; color: var(--dim); max-width: 60ch; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--dim); font-size: 13px; margin-bottom: 14px; }
.back:hover { color: var(--mist); }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.spacer { flex: 1; }
.stack { display: flex; flex-direction: column; gap: 14px; }

/* ---------- controls ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 18px; border-radius: 999px; border: 0; cursor: pointer;
  font: 600 14px/1 var(--text); color: var(--mist);
  background: linear-gradient(180deg, rgba(236,245,230,.16), rgba(236,245,230,.07));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.2), inset 0 0 0 1px rgba(236,245,230,.1), 0 6px 18px -10px rgba(0,0,0,.7);
  -webkit-backdrop-filter: blur(20px) saturate(160%); backdrop-filter: blur(20px) saturate(160%);
  transition: transform .35s var(--spring), background .2s, box-shadow .2s, opacity .2s;
  white-space: nowrap;
}
.btn:hover { background: linear-gradient(180deg, rgba(236,245,230,.22), rgba(236,245,230,.1)); }
.btn:active { transform: scale(.96); }
.btn svg { width: 17px; height: 17px; }
.btn.primary {
  color: #111408; background: linear-gradient(180deg, #d6ea4a, var(--lime) 55%, #b4c923);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55), inset 0 -2px 6px rgba(80,100,0,.25), 0 10px 26px -10px rgba(195,216,45,.65);
}
.btn.primary:hover { filter: brightness(1.05); }
.btn.danger { color: var(--danger); }
.btn.ghost { background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; color: var(--dim); }
.btn.ghost:hover { color: var(--mist); background: var(--glass); }
.btn.sm { height: 32px; padding: 0 13px; font-size: 13px; }
.btn.icon { width: 40px; padding: 0; }
.btn.icon.sm { width: 32px; }
.btn[disabled] { opacity: .45; pointer-events: none; }

label.field { display: flex; flex-direction: column; gap: 7px; font-size: 13px; color: var(--dim); font-weight: 500; }
.input, select.input, textarea.input {
  width: 100%; height: 46px; padding: 0 16px; border-radius: 14px; border: 0; outline: 0;
  font: 500 15px var(--text); color: var(--mist);
  background: rgba(8, 10, 7, .38);
  box-shadow: inset 0 1px 2px rgba(0,0,0,.45), inset 0 0 0 1px rgba(236,245,230,.1);
  transition: box-shadow .2s, background .2s;
}
select.input { appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1.5l5 5 5-5' fill='none' stroke='%23ECF5E6' stroke-opacity='.6' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat; background-position: right 16px center; }
select.input option { background: #1b2018; color: var(--mist); }
.input:focus { background: rgba(8,10,7,.5); box-shadow: inset 0 1px 2px rgba(0,0,0,.45), inset 0 0 0 1px rgba(195,216,45,.7), 0 0 0 4px rgba(195,216,45,.14); }
.input.sm { height: 34px; padding: 0 10px; border-radius: 10px; font-size: 13px; }
select.input.sm { padding-right: 28px; background-position: right 10px center; }
.input::placeholder { color: var(--faint); }

.code-input { height: 74px; text-align: center; font: 600 34px/1 var(--display); letter-spacing: .22em; text-transform: uppercase; border-radius: 20px; }

/* iOS-style switch */
.switch { position: relative; width: 50px; height: 30px; flex: none; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch i { position: absolute; inset: 0; border-radius: 999px; background: rgba(236,245,230,.16); box-shadow: inset 0 0 0 1px rgba(236,245,230,.1); transition: background .3s var(--ease); pointer-events: none; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 3px 8px rgba(0,0,0,.35); transition: transform .45s var(--spring); }
.switch input:checked + i { background: var(--lime); }
.switch input:checked + i::after { transform: translateX(20px); }
.switch-row { display: flex; align-items: center; gap: 12px; }

/* segmented control with a sliding glass thumb */
.seg { position: relative; display: inline-flex; padding: 4px; border-radius: 999px; background: rgba(8,10,7,.35); box-shadow: inset 0 0 0 1px rgba(236,245,230,.08), inset 0 1px 3px rgba(0,0,0,.4); }
.seg button { position: relative; z-index: 1; height: 36px; padding: 0 18px; border: 0; background: none; color: var(--dim); font: 600 14px var(--text); border-radius: 999px; cursor: pointer; transition: color .25s; white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; }
.seg button.on { color: var(--mist); }
.seg button .n { font-size: 11px; color: var(--faint); font-weight: 600; }
.seg .thumb { position: absolute; z-index: 0; top: 4px; bottom: 4px; border-radius: 999px; background: linear-gradient(180deg, rgba(236,245,230,.2), rgba(236,245,230,.09)); box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 4px 14px -6px rgba(0,0,0,.6); transition: left .5s var(--spring), width .5s var(--spring); }
.seg.sm button { height: 30px; padding: 0 13px; font-size: 13px; }
.seg-wrap { overflow-x: auto; margin-bottom: 22px; scrollbar-width: none; }
.seg-wrap::-webkit-scrollbar { display: none; }

/* ---------- cards, grids, lists ---------- */
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid.wide { grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); }
.card { padding: 22px; transition: transform .45s var(--spring); }
a.card, .card.click { cursor: pointer; color: inherit; display: block; }
a.card:hover, .card.click:hover { transform: translateY(-3px); }
.stats { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin-bottom: 30px; }
.stat { padding: 20px 22px; }
.stat .k { font-size: 12px; color: var(--dim); font-weight: 600; letter-spacing: .02em; }
.stat .v { font: 600 34px/1.1 var(--display); margin-top: 10px; }
.stat .v small { font-size: 16px; color: var(--faint); font-weight: 500; }
.section { margin-top: 34px; }
.section > .row { margin-bottom: 14px; }
.list { padding: 6px; }
.list .item { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 18px; transition: background .2s; }
.list .item + .item { box-shadow: 0 -1px 0 var(--line); }
.list a.item { color: inherit; }
.list a.item:hover, .list .item.click:hover { background: var(--glass); cursor: pointer; }
.list .item .grow { flex: 1; min-width: 0; }
.list .item .title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--dim); background: var(--glass); box-shadow: inset 0 0 0 1px var(--line); white-space: nowrap; }
.chip.lime { color: #111408; background: var(--lime); box-shadow: none; }
.chip.ok { color: var(--lime); }
.chip.off { color: var(--faint); }

.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--faint); flex: none; }
.dot.on { background: var(--lime); box-shadow: 0 0 0 0 rgba(195,216,45,.6); animation: pulse 2.4s infinite; }
.dot.off { background: var(--danger); opacity: .75; }
.dot.never { background: transparent; box-shadow: inset 0 0 0 1.5px var(--faint); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(195,216,45,.55); } 70% { box-shadow: 0 0 0 9px rgba(195,216,45,0); } 100% { box-shadow: 0 0 0 0 rgba(195,216,45,0); } }

.client-card .name { font: 600 19px/1.2 var(--display); margin: 4px 0 14px; }
.client-card .meta { display: flex; gap: 8px; flex-wrap: wrap; }
.new-card { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 140px; color: var(--dim); font-weight: 600; border-radius: var(--r-xl); border: 1.5px dashed rgba(236,245,230,.2); cursor: pointer; transition: all .3s var(--ease); background: none; font-family: var(--text); font-size: 15px; }
.new-card:hover { color: var(--lime); border-color: rgba(195,216,45,.6); background: rgba(195,216,45,.05); }

.empty { text-align: center; padding: 54px 24px; }
.empty .art { width: 96px; height: auto; display: block; margin: 0 auto 20px; opacity: .95; }
.empty h2 { margin-bottom: 8px; }
.empty p { color: var(--dim); max-width: 46ch; margin: 0 auto 20px; }

.banner { display: flex; align-items: center; gap: 14px; padding: 14px 18px; margin-bottom: 18px; border-radius: 18px; }
.banner svg { color: var(--lime); flex: none; width: 20px; height: 20px; }

/* ---------- screens ---------- */
.screen-card { padding: 14px 14px 18px; }
.screen-card .body { padding: 14px 6px 0; }
.screen-card .name { font: 600 16px/1.25 var(--display); }
.screen-card .zones { margin-top: 10px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--dim); }
.screen-card .zones b { color: var(--mist); font-weight: 600; }
.status { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--dim); }

.tv { position: relative; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: #050605; box-shadow: inset 0 0 0 1px rgba(236,245,230,.1), 0 14px 30px -18px rgba(0,0,0,.9); }
.tv .zone { position: absolute; overflow: hidden; background: #0a0c09; }
.tv .zone + .zone { box-shadow: -1px 0 0 rgba(0,0,0,.6); }
.tv .zone .bgimg { position: absolute; inset: -10%; background-size: cover; background-position: center; filter: blur(10px) brightness(.55); }
.tv .zone img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.tv .zone img.cover { object-fit: cover; }
.tv .zone.empty { background: repeating-linear-gradient(135deg, rgba(236,245,230,.04) 0 10px, rgba(236,245,230,.015) 10px 20px); display: flex; align-items: center; justify-content: center; }
.tv .zone.empty span { font-size: 11px; color: var(--faint); font-weight: 600; text-align: center; padding: 6px; }
.tv .bug { position: absolute; right: 2.2%; bottom: 3.5%; height: 7%; min-height: 10px; display: flex; align-items: center; gap: 4%; padding: 0 2.4%; border-radius: 999px; background: rgba(15,18,14,.55); box-shadow: inset 0 0 0 1px rgba(255,255,255,.14); }
.tv .bug img { height: 62%; }
.tv .shine { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(120deg, rgba(255,255,255,.08), rgba(255,255,255,0) 35%); }
.tv-live { width: 100%; border: 0; display: block; }

.layout-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.layout-opt { border: 0; padding: 10px; border-radius: 18px; background: rgba(8,10,7,.3); color: var(--dim); cursor: pointer; text-align: left; font: 600 13px var(--text); box-shadow: inset 0 0 0 1px var(--line); transition: all .25s var(--ease); }
.layout-opt:hover { color: var(--mist); }
.layout-opt.on { color: var(--mist); box-shadow: inset 0 0 0 2px var(--lime), 0 0 0 4px rgba(195,216,45,.12); background: rgba(195,216,45,.06); }
.layout-opt .mini { position: relative; aspect-ratio: 16/9; border-radius: 8px; background: #070806; margin-bottom: 9px; overflow: hidden; }
.layout-opt .mini i { position: absolute; border-radius: 4px; background: rgba(236,245,230,.18); outline: 2px solid #070806; }
.layout-opt.on .mini i:first-child { background: rgba(195,216,45,.7); }
.layout-opt.on .mini i + i { background: rgba(195,216,45,.35); }

/* ---------- media ---------- */
.drop { display: flex; align-items: center; gap: 18px; padding: 22px 24px; border-radius: var(--r-xl); border: 1.5px dashed rgba(236,245,230,.22); cursor: pointer; transition: all .3s var(--ease); margin-bottom: 20px; }
.drop:hover, .drop.over { border-color: var(--lime); background: rgba(195,216,45,.06); }
.drop .ico { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: rgba(195,216,45,.14); color: var(--lime); flex: none; }
.drop .ico svg { width: 24px; height: 24px; }
.drop b { font-size: 16px; }
.uploads { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.up { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-radius: 14px; font-size: 13px; }
.up .bar { flex: 1; height: 6px; border-radius: 3px; background: rgba(236,245,230,.1); overflow: hidden; }
.up .bar i { display: block; height: 100%; width: 0; background: var(--lime); border-radius: 3px; transition: width .2s; }
.up .nm { width: 38%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.up.err { color: var(--danger); }
.media-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); }
.tile { padding: 8px 8px 12px; border-radius: 22px; position: relative; }
.tile .pic { display: block; position: relative; aspect-ratio: 1; border-radius: 16px; overflow: hidden; background: #070806; }
.tile .pic img { width: 100%; height: 100%; object-fit: contain; display: block; }
.tile .pic .ar { position: absolute; left: 8px; top: 8px; }
.tile .nm { font-size: 13px; font-weight: 600; margin: 10px 6px 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .sub { font-size: 12px; color: var(--faint); margin: 0 6px; }
.tile .acts { position: absolute; right: 14px; top: 14px; display: flex; gap: 6px; opacity: 0; transition: opacity .2s; }
.tile:hover .acts, .tile:focus-within .acts { opacity: 1; }
.tile.pick { cursor: pointer; }
.tile.pick.sel { box-shadow: inset 0 0 0 2px var(--lime), 0 0 0 4px rgba(195,216,45,.15); }
.tile .check { position: absolute; right: 16px; top: 16px; width: 26px; height: 26px; border-radius: 50%; background: rgba(15,18,14,.6); box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.6); display: grid; place-items: center; }
.tile.sel .check { background: var(--lime); box-shadow: none; color: #111408; }
.tile .check svg { width: 15px; height: 15px; opacity: 0; }
.tile.sel .check svg { opacity: 1; }

/* ---------- playlists ---------- */
.pl-layout { display: grid; grid-template-columns: 290px 1fr; gap: 20px; align-items: start; }
.pl-items { display: flex; flex-direction: column; gap: 8px; }
.pl-item { display: grid; grid-template-columns: 22px 64px 1fr auto; align-items: center; gap: 14px; padding: 8px 12px 8px 8px; border-radius: 18px; background: rgba(8,10,7,.28); box-shadow: inset 0 0 0 1px var(--line); transition: transform .3s var(--spring), box-shadow .2s; }
.pl-item.dragging { opacity: .4; }
.pl-item.over { box-shadow: inset 0 0 0 2px var(--lime); }
.pl-item .handle { cursor: grab; color: var(--faint); display: grid; place-items: center; }
.pl-item .handle svg { width: 18px; height: 18px; }
.pl-item .th { width: 64px; height: 64px; border-radius: 12px; background: #070806; overflow: hidden; }
.pl-item .th img { width: 100%; height: 100%; object-fit: contain; }
.pl-item .info { min-width: 0; }
.pl-item .info .nm { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-item .ctl { display: flex; align-items: center; gap: 8px; }
.pl-item .secs { width: 74px; }
.pl-item .fit { width: 92px; }
.savebar { position: sticky; bottom: 18px; margin-top: 20px; padding: 10px 10px 10px 22px; border-radius: 999px; display: flex; align-items: center; gap: 12px; z-index: 5; }

/* ---------- modal sheet ---------- */
.overlay { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(4,5,4,.5); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); animation: fade .25s var(--ease); }
.sheet { width: min(620px, 100%); max-height: calc(100vh - 40px); overflow: auto; padding: 28px; animation: pop .5s var(--spring);
  background: linear-gradient(160deg, rgba(40,46,36,.86), rgba(20,24,18,.88)); }
.sheet.wide { width: min(980px, 100%); }
.sheet .head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.sheet .foot { display: flex; align-items: center; gap: 10px; margin-top: 26px; flex-wrap: wrap; }
.sheet .form { display: flex; flex-direction: column; gap: 18px; }
.sheet .two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.sheet hr { border: 0; height: 1px; background: var(--line); margin: 6px 0; }
.kv { display: grid; grid-template-columns: 120px 1fr; gap: 6px 14px; font-size: 13px; }
.kv dt { color: var(--faint); }
.kv dd { margin: 0; color: var(--dim); word-break: break-word; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(.96); } }
.overlay.out { animation: fade .2s var(--ease) reverse forwards; }

/* toast */
.toasts { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 80; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 20px; border-radius: 999px; font-weight: 600; font-size: 14px; animation: drop .55s var(--spring); background: linear-gradient(160deg, rgba(48,56,42,.85), rgba(24,28,22,.88)); }
.toast svg { width: 18px; height: 18px; color: var(--lime); }
.toast.err svg { color: var(--danger); }
@keyframes drop { from { opacity: 0; transform: translateY(-14px) scale(.94); } }

/* menu */
.menu { position: absolute; z-index: 60; min-width: 200px; padding: 6px; animation: pop .35s var(--spring); background: linear-gradient(160deg, rgba(44,50,40,.9), rgba(22,26,20,.92)); border-radius: 18px; }
.menu button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 10px 12px; border: 0; background: none; color: var(--mist); font: 500 14px var(--text); border-radius: 12px; cursor: pointer; text-align: left; }
.menu button:hover { background: var(--glass-2); }
.menu button.danger { color: var(--danger); }
.menu svg { width: 17px; height: 17px; }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login .card { width: min(420px, 100%); padding: 40px 34px 30px; text-align: center; }
.login .logo { width: 104px; height: auto; display: block; margin: 0 auto 22px; filter: drop-shadow(0 6px 18px rgba(195,216,45,.35)); }
.login h1 { font-size: 30px; }
.login form { display: flex; flex-direction: column; gap: 14px; margin-top: 26px; }
.login .btn { height: 48px; }
.login .foot { margin-top: 22px; font-size: 12px; color: var(--faint); }
.shake { animation: shake .45s var(--ease); }
@keyframes shake { 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }

.spin { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid rgba(236,245,230,.15); border-top-color: var(--lime); animation: rot .8s linear infinite; }
.loading { display: grid; place-items: center; padding: 80px 0; }
@keyframes rot { to { transform: rotate(360deg); } }

/* ---------- small screens: sidebar becomes a floating tab bar ---------- */
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; top: auto; bottom: 14px; left: 50%; transform: translateX(-50%); margin: 0; height: auto; width: auto; padding: 6px; z-index: 40; border-radius: 999px; flex-direction: row; }
  .sidebar .brand, .sidebar .nav-label, .sidebar .client-links, .sidebar .side-foot { display: none; }
  .nav { flex-direction: row; gap: 2px; }
  .nav a { flex-direction: column; gap: 3px; padding: 8px 16px; font-size: 10px; border-radius: 999px; }
  .nav a span { display: block; }
  .main { padding-top: 24px; }
  .pl-layout { grid-template-columns: 1fr; }
  .sheet .two { grid-template-columns: 1fr; }
  .pl-item { grid-template-columns: 18px 52px 1fr; }
  .pl-item .th { width: 52px; height: 52px; }
  .pl-item .ctl { grid-column: 2 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
.btn.primary.danger-fill { color: #210907; background: linear-gradient(180deg, #ff9086, var(--danger) 55%, #e5493a); box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 10px 26px -10px rgba(255,107,94,.6); }
