/* v7 polish round: findings from the Film comparison review (tablet layout, film colours, chips, small screens). Loaded last. */

/* ---- film colours: their own palette, never the cinema colours ---- */
:root{--ch-f1:#6d5cf6;--ch-f2:#0b9db8;--ch-f3:#64748b}
:root[data-theme="dark"]{--ch-f1:#9b8cff;--ch-f2:#43c6de;--ch-f3:#a3b0c6}
.v7-fchip.f1{box-shadow:inset 0 0 0 2px var(--ch-f1)}.v7-fchip.f2{box-shadow:inset 0 0 0 2px var(--ch-f2)}.v7-fchip.f3{box-shadow:inset 0 0 0 2px var(--ch-f3)}
.v7-fcard.f1{--tc:var(--ch-f1)}.v7-fcard.f2{--tc:var(--ch-f2)}.v7-fcard.f3{--tc:var(--ch-f3)}
.v7-fc-t th.grp.f1{--tc:var(--ch-f1)}.v7-fc-t th.grp.f2{--tc:var(--ch-f2)}.v7-fc-t th.grp.f3{--tc:var(--ch-f3)}
.v7-leg i.f1{background:var(--ch-f1)}.v7-leg i.f2{background:var(--ch-f2)}.v7-leg i.f3{background:var(--ch-f3)}
.v7-fc-ccard .r i.f1{background:var(--ch-f1)}.v7-fc-ccard .r i.f2{background:var(--ch-f2)}.v7-fc-ccard .r i.f3{background:var(--ch-f3)}
/* "Leads" in graphite, not green */
.v7-fcard .m.lead{box-shadow:inset 0 0 0 1.5px var(--text)}
.v7-fcard .m i{color:var(--text);font-weight:700}
.v7-fcard .m>span.lb{font-size:11.5px;letter-spacing:.04em;text-transform:uppercase;color:var(--muted)}
.v7-fcard .m span.v7-d{text-transform:none;letter-spacing:0;font-size:11.5px}
.v7-fcard h3{min-height:2.5em}
.v7-fc-t td.top{font-weight:800;background:color-mix(in srgb,var(--text) 9%,transparent)}
.v7-fc-t tr.tot td{background:var(--raised);border-top:1px solid var(--border-strong)}

/* ---- change chips: neutral and 'new' states ---- */
.v7-d.flat,.v7-d.new{background:var(--raised);color:var(--muted)}
.v7-d.new{color:var(--text)}

/* ---- tablet and below: tables that do not fit become cards (all pages' shared pieces) ---- */
@media(max-width:1100px){
 .page-head{grid-template-columns:1fr!important}
 .page-head .ph-actions{justify-self:start;flex-wrap:wrap}
 .head{flex-wrap:nowrap!important}
 .head .ask-pill .lbl,.head .ask-pill kbd{display:none!important}
 .head .ask-pill{width:40px;min-width:40px!important;padding:0!important;justify-content:center;border-radius:50%}
 .v7-ntbl:has(.v7-fc-t){display:none}
 .v7-fc .v7-rank .v7-ntbl{display:none}
 .v7-fc-cc{display:grid;gap:10px;grid-template-columns:repeat(auto-fit,minmax(260px,1fr))}
 .v7-fc-ccard{display:flex;flex-direction:column;gap:6px;padding:12px;border-radius:14px;background:var(--raised)}
 .v7-fc-ccard .r{display:flex;align-items:center;gap:8px;font-size:13px}
 .v7-fc-ccard .r i{width:9px;height:9px;border-radius:50%;flex:none}
 .v7-fc-ccard .r span{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--muted)}
 .v7-fc .v7-ncards{display:grid;gap:8px;grid-template-columns:repeat(auto-fit,minmax(280px,1fr))}
 .v7-fc .v7-ncard{display:flex;flex-direction:column;gap:6px;padding:12px;border-radius:14px;background:var(--raised);min-width:0}
 .v7-fc .v7-ncard .c1{display:flex;align-items:center;gap:10px}.v7-fc .v7-ncard .c1 b{flex:1;min-width:0}
 .v7-fc .v7-ncard .c2,.v7-fc .v7-ncard .c3{font-size:12.5px;color:var(--muted)}
 .v7-fc .v7-ncard .v7-ghost{align-self:flex-start}
 .v7-fc-pick{flex-wrap:nowrap;overflow-x:auto;padding-bottom:4px}
 .v7-fc [data-menu]{display:none}
 .v7-date-short{white-space:nowrap}
}
.v7-fchip button{width:36px;height:36px}

/* ---- tabs: wrap into a grid when they do not fit ---- */
@media(max-width:767px){
 .v7-tabs{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(112px,1fr));border-radius:18px;overflow:visible}
 .v7-tabs button{min-height:40px;padding:0 10px}
 .v7-pickmenu{position:fixed!important;top:auto!important;bottom:84px!important;left:12px!important;right:12px!important;width:auto!important;max-height:60vh}
 .v7-shows-t{display:none}
 .v7-shows-l{display:flex;flex-direction:column;gap:8px}
 .v7-shows-l .row{display:grid;grid-template-columns:auto 1fr;gap:2px 10px;padding:10px 12px;border-radius:12px;background:var(--raised)}
 .v7-shows-l .row b{font-size:15px;font-variant-numeric:tabular-nums}
 .v7-shows-l .row span{color:var(--muted);font-size:13px}
 .v7-shows-l .row em{grid-column:1/-1;font-style:normal;font-size:12.5px}
}
.v7-shows-l{display:none}
@media(max-width:767px){.v7-shows-l{display:flex}}

/* ---- film page: only one insight, picker right under the title ---- */
#view:has(.v7-fc) #v6PageInsights .v6-finding:nth-of-type(n+2){display:none}
#view:has(.v7-fc-empty) #v6PageInsights{display:none}
.v7-fc-empty .v7-none{padding:40px 16px}
.v7-sch-page small.nd,.v7-ncard small.nd{display:block;font-size:11px;font-weight:600;color:var(--muted);letter-spacing:.02em}

/* ---- Concessions: weekend vs weekdays ---- */
.v7-wk{display:flex;flex-direction:column;gap:16px}
.v7-wk-card>header{display:flex;align-items:baseline;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:10px}
.v7-wk-card h2{margin:0;font-size:16px;font-weight:800}.v7-wk-card>header span{font-size:13px;color:var(--muted)}
.v7-wk .v7-ncards{display:none}
.v7-wk .sm{display:block;color:var(--muted);font-size:12px;font-weight:500}
.v7-wk td.n,.v7-wk th.n{text-align:right;font-variant-numeric:tabular-nums}
#view:has(.v7-wk) #v6PageInsights .v6-finding:nth-of-type(n+2){display:none}
#view:has(.v7-wk-empty) #v6PageInsights{display:none}
@media(max-width:1100px){
 .v7-wk .v7-ntbl{display:none}
 .v7-wk .v7-ncards{display:grid;gap:8px;grid-template-columns:repeat(auto-fit,minmax(280px,1fr))}
 .v7-wk .v7-ncard{display:flex;flex-direction:column;gap:6px;padding:12px;border-radius:14px;background:var(--raised);min-width:0}
 .v7-wk .v7-ncard .c1{display:flex;align-items:center;gap:10px}
 .v7-wk .v7-ncard .c2,.v7-wk .v7-ncard .c3{font-size:12.5px;color:var(--muted)}
}

/* ---- Film comparison: compared with last year ---- */
.v7-ly>header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:12px}
.v7-ly h2{margin:0;font-size:16px;font-weight:800}.v7-ly>header span{font-size:13px;color:var(--muted)}
.v7-ly .v7-stats{margin-bottom:10px}
.v7-ly .v7-leg{justify-content:flex-start;margin-top:4px}
.v7-ly-lists{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-top:14px}
.v7-ly-lists h3{margin:0 0 6px;font-size:13px;font-weight:700;color:var(--muted);letter-spacing:.02em}
.v7-ly-lists ol{list-style:none;margin:0;padding:0}
.v7-ly-lists li{display:grid;grid-template-columns:22px minmax(0,1fr) auto 42px;align-items:center;gap:8px;padding:9px 0;border-top:1px solid var(--border)}
.v7-ly-lists li .rk{color:var(--muted);font-size:12px}
.v7-ly-lists li .ti{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.v7-ly-lists li b{font-variant-numeric:tabular-nums}
.v7-ly-lists li small{color:var(--muted);text-align:right}
@media(max-width:767px){.v7-ly-lists{grid-template-columns:1fr}.v7-ly .v7-stats{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:1100px){.v7-wk .v7-ntbl.keep{display:block;overflow-x:auto}}

/* ---- Schedule, the Vista way: a panel per cinema, a sticky header per screen, subtotal per screen ---- */
.v7-sch tr.v7-grp th{position:sticky;top:calc(var(--ph-h,0px) + var(--sh-h,56px));z-index:3;background:var(--raised);text-align:left;font-size:12.5px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:var(--text);padding:8px 12px;border-top:1px solid var(--border-strong,var(--border))}
.v7-sch tr.v7-grp{cursor:default}.v7-sch tr.v7-grp:hover{background:transparent}
.v7-sch tr.v7-stot{cursor:default;font-weight:700}
.v7-sch tr.v7-stot td{background:color-mix(in srgb,var(--raised) 70%,var(--surface));border-top:1px solid var(--border-strong,var(--border));padding-top:10px;padding-bottom:10px}
.v7-sch tr.v7-stot:hover{background:transparent}
.v7-sch td.pcard{font-size:12px;color:var(--muted);min-width:150px;max-width:210px;line-height:1.35}
.v7-sch th.ins,.v7-sch td.ins{width:56px;text-align:center}
.v7-ins{display:inline-grid;place-items:center;width:28px;height:28px;border-radius:9px;background:var(--raised);color:var(--text);font-size:13px;box-shadow:inset 0 0 0 1px var(--border)}
.v7-ochip{display:inline-block;min-width:58px;text-align:center;padding:4px 10px;border-radius:99px;font-weight:700;font-size:13px;font-variant-numeric:tabular-nums;color:var(--text)}
.v7-ochip.zero{background:var(--surface);box-shadow:inset 0 0 0 1px var(--border);color:var(--muted)}
.v7-ochip.lo{background:color-mix(in srgb,var(--ch-rose) 26%,var(--surface))}
.v7-ochip.mid{background:color-mix(in srgb,var(--ch-butter) 32%,var(--surface))}
.v7-ochip.hi{background:color-mix(in srgb,var(--ch-mint) 32%,var(--surface))}
.v7-gh{position:sticky;top:calc(var(--ph-h,0px) + var(--sh-h,56px));z-index:2;display:flex;justify-content:space-between;align-items:baseline;gap:8px;padding:8px 12px;margin:8px 0 6px;border-radius:10px;background:var(--raised);font-size:12.5px;font-weight:800;letter-spacing:.06em;text-transform:uppercase}
.v7-gh small{font-weight:500;letter-spacing:0;text-transform:none;color:var(--muted)}
@media(max-width:767px){.v7-gh{top:var(--sh-h,56px)}.v7-sec-h{flex-wrap:wrap;row-gap:2px;padding:8px 14px;min-height:0}.v7-sec-h .meta{margin-left:0;width:100%;font-size:12.5px}}
@media(max-width:767px){#view:has(.v7-sch-page) #v6PageInsights .v6-finding:nth-of-type(n+2){display:none}}
.v7-sec .v7-tbl{overflow-x:clip}

/* ---- Timeline: wider scale, two-line blocks with sold and left, nothing clipped ---- */
.v7-tl{min-width:1700px}
.v7-tl-lane .trk{height:68px}
.v7-tb{display:grid!important;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto auto;align-items:center;gap:0 8px;padding:6px 10px!important;white-space:normal!important}
.v7-tb b{grid-column:1;grid-row:1;font-size:12px}
.v7-tb span{grid-column:1;grid-row:2;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12.5px;color:var(--text);font-weight:600}
.v7-tb small{grid-column:1;grid-row:3;font-size:11px;color:var(--muted);white-space:nowrap}
.v7-tb em{grid-column:2;grid-row:1;margin:0}
.v7-tb{grid-template-rows:auto auto auto}
.v7-tl-lane .trk{height:78px}
.v7-tb{top:5px;bottom:5px}

/* ---- Home: screening schedule, screen-wise per cinema ---- */
.v7-scrs{display:flex;flex-direction:column;gap:6px;margin:10px 0 6px}
.v7-scr{display:grid;grid-template-columns:44px minmax(0,1fr);gap:8px;align-items:start}
.v7-scr .n{font-size:11.5px;font-weight:800;letter-spacing:.05em;color:var(--muted);padding-top:3px}
.v7-scr .c{display:flex;flex-wrap:wrap;gap:4px}
.v7-scr .v7-ochip{min-width:0;padding:2px 7px;font-size:11px;font-weight:600}
.v7-scr .v7-ochip i{font-style:normal;color:var(--muted);font-weight:500}
.v7-sc .v7-occ{padding:3px 9px;border-radius:99px}

/* ---- Film comparison: whole-rupee gross fits its tile, phone tap targets ---- */
.v7-fcard .m b{font-size:clamp(15px,2.2vw,22px);overflow-wrap:anywhere}
@media(max-width:767px){
 .v7-fc .v7-ghost,.v7-fc button.cmp,.v7-fcard .v7-ghost{min-height:40px}
 .v7-fchip button{width:40px;height:40px}
}

/* ---- Schedule round 2: cinema header in the cinema colour, indented screens, compact boxes and controls ---- */
.v7-sec-h.t-sky{background:color-mix(in srgb,var(--ch-sky) 22%,var(--surface))}
.v7-sec-h.t-mint{background:color-mix(in srgb,var(--ch-mint) 22%,var(--surface))}
.v7-sec-h.t-butter{background:color-mix(in srgb,var(--ch-butter) 26%,var(--surface))}
.v7-sec-h.t-rose{background:color-mix(in srgb,var(--ch-rose) 22%,var(--surface))}
.v7-sec-h .nm{font-size:16px}
.v7-sec-h .meta{font-weight:600;color:var(--text)}
.v7-sec-h .meta .v7-occ{font-weight:700}
/* screen = parent, its shows = children (indented) */
.v7-sch tr.v7-row td:first-child,.v7-sch tr.v7-stot td:first-child{padding-left:34px}
.v7-sch tr.v7-grp th{padding-left:14px;font-size:13px}
.v7-sch td.g{font-weight:700}
.v7-sch tr.v7-stot td{font-weight:800}
.v7-cards .v7-card{margin-left:14px}
/* four compact boxes */
.v7-sch-page .v7-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.v7-sch-page .v7-stat{padding:9px 14px;border-radius:14px}
.v7-sch-page .v7-stat span{font-size:11px}
.v7-sch-page .v7-stat b{font-size:20px}
.v7-sch-page .v7-stat small{min-height:0}
@media(max-width:767px){.v7-sch-page .v7-stats{grid-template-columns:repeat(2,minmax(0,1fr))}}
/* smaller filter bar */
.v7-tools{gap:8px}
.v7-search input,.v7-sel{height:34px!important;font-size:13px!important;border-radius:10px!important}
.v7-sel{padding:0 26px 0 10px!important;max-width:210px}
.v7-search{max-width:280px}
.v7-band{height:34px;padding:0 12px;font-size:12.5px}
.v7-tools .v7-ghost,.v7-tools .v7-seg button{height:34px;min-height:0;padding:0 12px;font-size:12.5px}
.v7-chk{font-size:12.5px}

.v7-ins .ic{width:15px;height:15px}

/* ---- Schedule toolbar: icon buttons, one occupancy dropdown, menus that stay inside the page ---- */
.v7-icons{display:inline-flex;align-items:center;gap:6px;margin-left:auto}
.v7-ib{width:34px;height:34px;display:inline-grid;place-items:center;padding:0;border:0;border-radius:10px;background:var(--surface);color:var(--text);box-shadow:inset 0 0 0 1px var(--border-strong);cursor:pointer;transition:background-color .14s ease,box-shadow .14s ease}
.v7-ib svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round}
.v7-ib:hover{background:var(--raised)}
.v7-ib:focus-visible{outline:2px solid var(--focus-ring,#264fb7);outline-offset:2px}
.v7-ib[aria-pressed="true"],.v7-ib[aria-expanded="true"]{background:var(--text);color:var(--surface);box-shadow:none}
.v7-menu{position:fixed}
@media(max-width:767px){.v7-icons{margin-left:0;width:100%;justify-content:flex-end}}

/* ---- Page and tab transitions: opacity only, held while the page settles ---- */
#view.v7-settling{opacity:.1;transition:opacity .08s linear}
#view.v7-settled{animation:v7ViewIn .2s ease-out both}
@keyframes v7ViewIn{from{opacity:0}to{opacity:1}}
@media(prefers-reduced-motion:reduce){#view.v7-settling,#view.v7-settled{animation:none;transition:none;opacity:1}}

/* ---- Insights: a soft gradient so the card separates from the page, calmer reading rhythm ---- */
#v6PageInsights,#v6PlannedInsights,.ai-brief{
 background:linear-gradient(135deg,color-mix(in srgb,var(--ch-sky) 16%,var(--surface)) 0%,var(--surface) 52%,color-mix(in srgb,var(--ch-rose) 9%,var(--surface)) 100%)!important;
 border:1px solid color-mix(in srgb,var(--ch-sky) 26%,var(--border))!important;
 box-shadow:var(--elev-1)!important}
#v6PageInsights .v6-finding,#v6PlannedInsights .v6-finding{line-height:1.6}
#v6PageInsights .v6-finding+.v6-finding,#v6PlannedInsights .v6-finding+.v6-finding{border-top:1px solid color-mix(in srgb,var(--ch-sky) 20%,var(--border));margin-top:12px;padding-top:12px}
.v7-search{flex:1 1 170px;max-width:210px}
.v7-sel[data-film]{max-width:170px}.v7-sel[data-occ]{max-width:190px}.v7-sel[data-sort]{max-width:160px}

/* ---- Export: one icon button, a small menu (Excel, PDF), never in the way of titles ---- */
.v7-export{position:relative;display:inline-flex}
.v7-export[hidden]{display:none!important}
.v7-export-btn{width:38px;height:38px;display:inline-grid;place-items:center;padding:0;border:0;border-radius:12px;background:var(--surface);color:var(--text);box-shadow:inset 0 0 0 1px var(--border-strong);cursor:pointer;transition:background-color .14s ease}
.v7-export-btn:hover{background:var(--raised)}
.v7-export-btn:focus-visible{outline:2px solid var(--focus-ring,#264fb7);outline-offset:2px}
.v7-export-btn[aria-expanded="true"]{background:var(--text);color:var(--surface);box-shadow:none}
.v7-export-menu{position:absolute;top:calc(100% + 8px);right:0;z-index:60;min-width:220px;padding:6px;border-radius:14px;background:var(--surface);box-shadow:0 18px 50px rgba(15,23,42,.22),inset 0 0 0 1px var(--border-strong)}
.v7-export-menu .v6-export-actions{display:flex!important;flex-direction:column;gap:2px;margin:0;padding:0}
.v7-export-menu .tool-btn,.v7-export-menu [data-report-download]{display:flex!important;align-items:center;gap:10px;width:100%;height:40px;padding:0 12px;border:0;border-radius:9px;background:transparent;box-shadow:none;color:var(--text);font:600 13.5px var(--font-body,inherit);text-align:left;cursor:pointer;text-decoration:none;justify-content:flex-start}
.v7-export-menu .tool-btn:hover,.v7-export-menu [data-report-download]:hover{background:var(--raised)}
.v7-export-menu .lbl{display:inline!important}
.v7-export-menu [data-report-download]{font-weight:500;color:var(--muted);font-size:12.5px}
@media(max-width:767px){.v7-export-menu{right:auto;left:0}}
.page-head .ph-actions .v7-export-menu .tool-btn,.page-head .ph-actions .v7-export-menu [data-report-download]{width:100%!important;height:40px!important;min-width:0!important;padding:0 12px!important;border-radius:9px!important;justify-content:flex-start!important;gap:10px!important;background:transparent!important}
.page-head .ph-actions .v7-export-menu .tool-btn:hover{background:var(--raised)!important}
.page-head .ph-actions .v7-export-menu .tool-btn .lbl{display:inline!important}

/* ---- One table-header style across the app ---- */
#view table thead th{font-size:11.5px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:var(--muted)}
#view table td.n,#view table th.n,#view table td.num,#view table th.num{font-variant-numeric:tabular-nums}

/* ---- Wide tables on small screens: a soft edge shows there is more to scroll to ---- */
@media(max-width:1100px){
 .tt-scroll,.co-scroll,.cc-report-scroll,.v6-analytics-table-wrap,.v7-ntbl.keep{
  background:
   linear-gradient(to right,var(--surface) 30%,transparent) left center/36px 100% no-repeat local,
   linear-gradient(to left,var(--surface) 30%,transparent) right center/36px 100% no-repeat local,
   radial-gradient(farthest-side at 0 50%,rgba(15,23,42,.18),transparent) left center/12px 100% no-repeat scroll,
   radial-gradient(farthest-side at 100% 50%,rgba(15,23,42,.18),transparent) right center/12px 100% no-repeat scroll;
  -webkit-overflow-scrolling:touch}
}

/* ---- Daily sales details ---- */
.daily-owner-kpis article small{display:block;margin-top:3px;font-size:11.5px}
.daily-owner .v7-zero{color:var(--muted)!important}

/* ---- Saved views: tap targets on phone ---- */
@media(max-width:767px){.sv-act button{min-height:40px;padding:0 14px}}
.v7-sched h2 .v7-day{font-size:13px;font-weight:500;color:var(--muted);margin-left:8px}
