.adm { background: #0c0d10; }
.shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100svh; }
.side { position: sticky; top: 0; height: 100svh; display: flex; flex-direction: column; gap: 22px; padding: 22px 16px; border-right: 1px solid var(--line); background: #0a0b0d; }
.side-brand { display: flex; flex-direction: column; gap: 8px; padding: 0 8px; text-decoration: none; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.side-brand img { height: 48px; width: auto; align-self: flex-start; }
.side nav { display: grid; gap: 4px; }
.side-link { display: flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 10px; border: 0; background: transparent; text-align: left; font-size: 15px; color: #c9ccd0; cursor: pointer; transition: background-color .15s, color .15s; }
.side-link:hover { background: rgba(255, 255, 255, .05); color: var(--ink); }
.side-link[aria-current='page'] { background: rgba(176, 133, 255, .1); color: var(--xw); }
.side-foot { margin-top: auto; padding: 12px; border-radius: 12px; border: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.board { padding: 28px clamp(18px, 3vw, 40px) 60px; min-width: 0; }
.banner { margin: 0 0 20px; padding: 12px 16px; border-radius: 12px; border: 1px solid rgba(176, 133, 255, .4); background: rgba(176, 133, 255, .07); color: #ece7a6; font-size: 14px; }
.lt { margin: 0; font-size: clamp(34px, 4vw, 52px); font-weight: 900; font-stretch: 125%; text-transform: uppercase; line-height: .95; }
.board-head { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-end; justify-content: space-between; margin-bottom: 22px; }
.board-head p { margin: 8px 0 0; max-width: 60ch; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; }
.fbtn { min-height: 40px; padding: 0 14px; border-radius: var(--pill); border: 1px solid var(--line2); background: transparent; font-size: 13px; cursor: pointer; }
.fbtn[aria-pressed='true'] { background: var(--ink); color: #0a0b0d; border-color: var(--ink); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 18px; }
.stat { padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: #111317; }
.stat b { display: block; font-size: 28px; font-weight: 900; font-stretch: 120%; }
.stat span { font-size: 13px; color: var(--muted); }
.table-wrap { overflow-x: auto; border-radius: 16px; border: 1px solid var(--line); background: #111317; }
.leads { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 860px; }
.leads th { text-align: left; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); font-weight: 600; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.leads td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.leads tbody tr { cursor: pointer; transition: background-color .15s; }
.leads tbody tr:hover, .leads tbody tr:focus-visible { background: rgba(255, 255, 255, .04); }
.leads tbody tr:last-child td { border-bottom: 0; }
.leads td b { display: block; font-weight: 600; }
.leads td small { display: block; color: var(--dim); }
.new-tag { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 6px; background: var(--xw); color: #0a0b0d; font-size: 11px; font-weight: 700; vertical-align: 1px; }
.pill { display: inline-flex; align-items: center; min-height: 24px; padding: 0 10px; border-radius: var(--pill); border: 1px solid var(--line2); font-size: 12px; white-space: nowrap; }
.pill.src-google { border-color: #6ea1ff; color: #a9c6ff; }
.pill.src-chatgpt { border-color: #67d3b4; color: #9ee8d1; }
.pill.src-instagram { border-color: #ff7bb2; color: #ffadd0; }
.pill.src-facebook { border-color: #7d9dff; color: #b4c6ff; }
.pill.st-new { background: var(--xw); color: #0a0b0d; border-color: var(--xw); }
.pill.st-confirmed, .pill.st-in-shop, .pill.st-ready { border-color: var(--ok); color: var(--ok); }
.pill.st-quoted { border-color: var(--warn); color: var(--warn); }
.pill.st-picked-up { color: var(--muted); }
.fu-ok { color: var(--ok); }
.fu-todo { color: var(--warn); }
.empty { padding: 20px 4px; }
.csv { margin-top: 16px; }
.week { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.wday { padding: 16px; border-radius: 14px; border: 1px solid var(--line); background: #111317; min-height: 160px; }
.wday h2 { margin: 0 0 10px; font-size: 14px; letter-spacing: .1em; text-transform: uppercase; }
.wday ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.wday li { padding: 10px 12px; border-radius: 10px; background: rgba(255, 255, 255, .04); font-size: 14px; }
.wday li small { display: block; color: var(--muted); }
.setup { display: grid; gap: 10px; max-width: 760px; }
.setup .card { padding: 18px; border-radius: 14px; border: 1px solid var(--line); background: #111317; }
.setup .card h2 { margin: 0 0 6px; font-size: 16px; }
.setup .card p { margin: 0; color: #c9ccd0; font-size: 14px; }
.login { display: grid; gap: 14px; }
.lead .l-sub { margin: 0; color: var(--xw); font-weight: 700; }
.lead .dr-head h2 { margin-bottom: 6px; }
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 16px 0; }
.cards div { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); }
.cards small { display: block; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.cards b { font-size: 15px; font-weight: 600; word-break: break-word; }
.cards a { text-decoration: none; }
.tl { margin: 8px 0 0; padding: 0; list-style: none; }
.tl li { position: relative; padding: 0 0 16px 26px; font-size: 14px; }
.tl li::before { content: ''; position: absolute; left: 4px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--ok); }
.tl li::after { content: ''; position: absolute; left: 8.5px; top: 18px; bottom: 0; width: 1px; background: var(--line2); }
.tl li:last-child::after { display: none; }
.tl li.later::before { background: transparent; border: 1.5px solid var(--dim); }
.tl li.todo::before { background: var(--warn); }
.tl li small { display: block; color: var(--muted); }
.h3 { margin: 18px 0 8px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.photos .ph { position: relative; display: block; padding: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; aspect-ratio: 1; background: rgba(255, 255, 255, .04); cursor: zoom-in; }
.photos .ph:not(.ready) { animation: phpulse 1.2s ease-in-out infinite alternate; }
@keyframes phpulse { to { background: rgba(255, 255, 255, .09); } }
.photos img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .35s cubic-bezier(.16, 1, .3, 1), opacity .3s; }
.photos img:not([src]) { opacity: 0; }
.photos .ph::after { content: ''; position: absolute; right: 6px; bottom: 6px; width: 26px; height: 26px; border-radius: 8px; background: rgba(0, 0, 0, .55) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M12 4h4v4M8 16H4v-4M16 4l-5 5M4 16l5-5'/%3E%3C/svg%3E") center / 14px no-repeat; opacity: .85; transition: opacity .2s; }
.photos .ph:hover img { transform: scale(1.05); }
.photos .ph:focus-visible { outline: 2px solid var(--xw); outline-offset: 2px; }
.h3 i { font-style: normal; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--dim); margin-left: 6px; }

/* photo viewer */
.lightbox { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(6, 7, 9, .94); color: #fff; }
.lightbox[open] { display: grid; animation: lbfade .25s ease-out; }
.lightbox::backdrop { background: rgba(0, 0, 0, .6); backdrop-filter: blur(6px); }
@keyframes lbfade { from { opacity: 0; } }
.lb-fig { display: grid; place-items: center; margin: 0; padding: 72px 72px 32px; min-height: 0; cursor: zoom-out; }
.lb-fig img { max-width: 100%; max-height: calc(100dvh - 104px); border-radius: 12px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); cursor: default; }
.lb-fig img.in.zoom { animation: lbzoom .35s cubic-bezier(.16, 1, .3, 1); }
.lb-fig img.in.from-r { animation: lbr .35s cubic-bezier(.16, 1, .3, 1); }
.lb-fig img.in.from-l { animation: lbl .35s cubic-bezier(.16, 1, .3, 1); }
@keyframes lbzoom { from { opacity: 0; transform: scale(.94); } }
@keyframes lbr { from { opacity: 0; transform: translateX(40px); } }
@keyframes lbl { from { opacity: 0; transform: translateX(-40px); } }
.lb-top { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; }
.lb-count { font-size: 14px; font-variant-numeric: tabular-nums; color: #cfd2d6; padding-left: 6px; }
.lb-tools { display: flex; gap: 8px; }
.lb-btn { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .18); background: rgba(20, 22, 26, .7); color: #fff; cursor: pointer; transition: background-color .15s, border-color .15s; }
.lb-btn:hover { background: rgba(255, 255, 255, .14); }
.lb-btn:focus-visible { outline: 2px solid var(--xw); outline-offset: 2px; }
.lb-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); }
.lb-prev { left: 14px; }
.lb-next { right: 14px; }
.lb-nav[hidden] { display: none; }
@media (max-width: 640px) {
  .lb-fig { padding: 68px 10px 84px; }
  .lb-fig img { max-height: calc(100dvh - 152px); }
  .lb-nav { top: auto; bottom: 18px; transform: none; }
  .lb-prev { left: calc(50% - 56px); }
  .lb-next { right: calc(50% - 56px); }
}
.l-actions { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.l-actions .btn { width: auto; min-height: 48px; font-size: 14px; letter-spacing: 0; text-transform: none; }
.l-actions select { grid-column: 1 / -1; min-height: 48px; border-radius: 12px; border: 1px solid var(--line2); background: rgba(255, 255, 255, .04); padding: 0 12px; }
.l-actions .del { grid-column: 1 / -1; background: transparent; border: 0; color: #ff9b8f; min-height: 44px; cursor: pointer; font-size: 14px; }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 14px 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  .side nav { display: flex; flex-wrap: wrap; }
  .side-foot { margin: 0; }
  .stats { grid-template-columns: 1fr 1fr; }
}

.locked .side, .locked .view { display: none !important; }
.locked .shell { grid-template-columns: 1fr; }
.locked .board { min-height: 100svh; display: grid; place-items: center; padding: 24px; background: radial-gradient(60% 50% at 50% 40%, rgba(176, 133, 255, .06), transparent 70%), #0a0b0d; }
.login { width: min(420px, 100%); margin: 0; padding: 32px; border-radius: 22px; border: 1px solid rgba(255, 255, 255, .14);
  background: linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .02)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 30px 80px rgba(0, 0, 0, .5);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); animation: rise .6s var(--ease) both; }
.login-logo { height: 64px; width: auto; }
.login .lt { font-size: 34px; }
.login .btn { width: 100%; }
.side-foot { width: 100%; text-align: left; }

.leads tbody tr { animation: rise .55s cubic-bezier(.16, 1, .3, 1) both; animation-delay: calc(var(--k, 0) * 45ms); }
.stat { animation: rise .6s cubic-bezier(.16, 1, .3, 1) both; }
.stat:nth-child(2) { animation-delay: .05s; } .stat:nth-child(3) { animation-delay: .1s; } .stat:nth-child(4) { animation-delay: .15s; }
.tl li { animation: rise .5s cubic-bezier(.16, 1, .3, 1) both; }
.tl li:nth-child(2) { animation-delay: .08s; } .tl li:nth-child(3) { animation-delay: .16s; } .tl li:nth-child(4) { animation-delay: .24s; } .tl li:nth-child(5) { animation-delay: .32s; } .tl li:nth-child(6) { animation-delay: .4s; }
.lead[open] { animation: slidein .45s cubic-bezier(.16, 1, .3, 1); }

/* ---------- schedule ---------- */
.board-head .saved { align-self: center; padding: 8px 14px; border-radius: 999px; background: rgba(123, 224, 160, .12); color: var(--ok); font-size: 13px; font-weight: 600; opacity: 0; transform: translateY(-4px); transition: opacity .25s, transform .25s; }
.board-head .saved.show { opacity: 1; transform: none; }
.sched { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 14px; align-items: start; }
.sch-card { padding: 20px; border-radius: 16px; border: 1px solid var(--line); background: #111317; }
.sch-card h2 { margin: 0 0 4px; font-size: 17px; }
.sch-card > .muted { margin: 0 0 16px; font-size: 14px; }
.wk-grid { display: grid; gap: 8px; }
.wk-row { display: grid; grid-template-columns: 96px repeat(3, 1fr); gap: 6px; align-items: center; }
.wk-d { font-size: 14px; font-weight: 600; }
.win { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 8px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03);
  color: var(--muted); font-size: 13px; font-weight: 600; white-space: nowrap; cursor: pointer; transition: background-color .18s, border-color .18s, color .18s; }
.win .sw { position: relative; flex: none; width: 26px; height: 16px; border-radius: 999px; background: rgba(255, 255, 255, .16); transition: background-color .2s; }
.win .sw::after { content: ''; position: absolute; left: 2px; top: 2px; width: 12px; height: 12px; border-radius: 50%; background: #d7d9dd; transition: transform .25s cubic-bezier(.34, 1.56, .64, 1); }
.win[aria-pressed='true'] { border-color: rgba(176, 133, 255, .55); background: rgba(176, 133, 255, .14); color: var(--ink); }
.win[aria-pressed='true'] .sw { background: var(--xw); }
.win[aria-pressed='true'] .sw::after { transform: translateX(10px); background: var(--xw-ink); }
.win:hover { border-color: var(--line2); }
.win:focus-visible { outline: 2px solid var(--xw); outline-offset: 2px; }
.sch-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 14px; }
.sch-key { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 0; font-size: 12px; color: var(--muted); }
.sch-key span { display: inline-flex; align-items: center; gap: 6px; }
.sch-key i { width: 14px; height: 6px; border-radius: 3px; }
.k-on { background: var(--xw); } .k-bk { background: #fff; } .k-off { background: rgba(255, 255, 255, .14); }
.k-ch { width: 7px !important; height: 7px !important; border-radius: 50% !important; background: var(--warn); }
.sch-tip { margin: 6px 0 14px !important; font-size: 13px !important; }
.mcal-dow, .mcal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.mcal-dow span { padding-bottom: 6px; text-align: center; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
.mc { position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 6px; min-height: 58px; padding: 7px 6px 7px; border-radius: 10px; border: 1px solid var(--line);
  background: rgba(255, 255, 255, .03); color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: border-color .15s, background-color .15s, transform .2s; }
.mc:hover { border-color: var(--line2); background: rgba(255, 255, 255, .06); }
.mc:focus-visible { outline: 2px solid var(--xw); outline-offset: 2px; }
.mc.past { cursor: default; opacity: .3; border-style: dashed; }
.mc.today .mc-n { color: var(--xw); }
.mc.sel { border-color: var(--xw); background: rgba(176, 133, 255, .12); transform: scale(1.03); }
.mc.ch::after { content: ''; position: absolute; top: 7px; right: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--warn); }
.mc-n { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.mc-n em { display: block; font-style: normal; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.mc-bars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; }
.mc-bars i { height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .12); }
.mc-bars i.on { background: var(--xw); }
.mc-bars i.bk { background: #fff; }
.mc-j { position: absolute; right: 6px; bottom: 15px; font-size: 10px; font-weight: 800; color: #fff; }
.dayed { margin-top: 14px; padding: 16px; border-radius: 14px; border: 1px solid rgba(176, 133, 255, .4); background: rgba(176, 133, 255, .06); animation: deIn .3s cubic-bezier(.16, 1, .3, 1); }
@keyframes deIn { from { opacity: 0; transform: translateY(8px); } }
.de-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.de-head h3 { margin: 0; font-size: 16px; }
.de-badge { padding: 3px 9px; border-radius: 999px; background: rgba(245, 178, 91, .16); color: var(--warn); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.de-badge.plain { background: rgba(255, 255, 255, .08); color: var(--muted); }
.de-wins { display: grid; gap: 8px; }
.de-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 12px; background: rgba(0, 0, 0, .25); }
.de-row b { display: block; font-size: 15px; }
.de-row small { color: var(--muted); font-size: 13px; }
.de-row .win { min-width: 86px; }
.de-warn { margin: 10px 0 0; font-size: 13px; color: var(--warn); }
.de-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.de-actions .btn { min-height: 40px; padding: 0 14px; font-size: 13px; }
.out-tag { font-style: normal; font-size: 11px; color: var(--warn); }
.wday li small a { color: var(--muted); }
@media (max-width: 1100px) { .sched { grid-template-columns: 1fr; } }
@media (max-width: 560px) {
  .wk-row { grid-template-columns: 1fr 1fr 1fr; }
  .wk-d { grid-column: 1 / -1; margin-top: 4px; }
  .win { font-size: 12px; gap: 6px; padding: 0 4px; }
  .win .sw { width: 22px; }
  .win[aria-pressed='true'] .sw::after { transform: translateX(6px); }
  .mc { min-height: 50px; padding: 5px 4px; }
  .mc-n { font-size: 13px; }
}
