:root {
    --bg: #ecf0f5;
    --panel: #ffffff;
    --ink: #18201e;
    --muted: #68736f;
    --line: #dce3e0;
    --brand: #c2410c;
    --brand-dark: #9a3412;
    --accent: #0f766e;
    --nav: #14201d;
    --soft: #f7faf8;
    --sidebar-width: 220px;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, .10);
    --shadow-md: 0 3px 10px rgba(0, 0, 0, .12);
    --lte-sidebar-width: var(--sidebar-width);
}

* { box-sizing: border-box; }
body {
    margin: 0;
    min-height: 100vh;
    font-family: "Source Sans 3", "Segoe UI", Arial, Helvetica, sans-serif;
    font-size: 13px;
    background: var(--bg);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
}
a { color: var(--brand-dark); text-decoration: none; font-weight: 700; }
h1, h2 { margin: 0 0 16px; letter-spacing: 0; }
h1 { font-size: 25px; font-weight: 600; }
h2 { font-size: 16px; font-weight: 600; }
.brand { color: white; font-weight: 800; font-size: 21px; }
.public-topbar {
    min-height: 68px;
    display: flex;
    align-items: center;
    padding: 0 28px;
    background: linear-gradient(135deg, #14201d, #21342f);
    box-shadow: var(--shadow-md);
}
.app-header {
    min-height: 50px;
    border-bottom: 1px solid var(--line);
    background: rgba(255,255,255,.94) !important;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.app-header .navbar-text { color: var(--muted); font-size: 12px; font-weight: 700; }
.app-user-status { display: flex; align-items: center; gap: 9px; }
.app-user-status strong { color: var(--brand-dark); font-size: 13px; }
.app-user-status span { padding-left: 9px; border-left: 1px solid var(--line); }
.sidebar {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    padding: 16px 10px 12px;
    background: #222d32;
    color: white;
    box-shadow: 16px 0 42px rgba(20, 32, 29, .16);
}
.sidebar-brand { flex: 0 0 auto; padding: 2px 10px 14px; border-bottom: 1px solid rgba(255,255,255,.10); }
.sidebar-brand .brand { display: flex; align-items: center; gap: 9px; min-width: 0; font-size: 19px; }
.sidebar-brand .brand img { width: 34px; height: 34px; flex: 0 0 auto; object-fit: contain; border-radius: 3px; background: white; }
.sidebar-brand .brand strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.public-topbar .brand { display: flex; align-items: center; gap: 10px; }
.public-topbar .brand img { width: 38px; height: 38px; object-fit: contain; border-radius: 3px; background: white; }
.sidebar-user {
    flex: 0 0 auto;
    display: grid;
    gap: 3px;
    margin: 12px 4px 8px;
    padding: 9px 10px;
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 8px;
    background: rgba(255,255,255,.06);
}
.sidebar-user span { color: #aebdb8; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.sidebar-user strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.sidebar-wrapper {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding-bottom: 12px;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #667a73 transparent;
}
.sidebar-wrapper::-webkit-scrollbar { width: 7px; }
.sidebar-wrapper::-webkit-scrollbar-thumb { border-radius: 8px; background: #667a73; }
.sidebar-wrapper::-webkit-scrollbar-track { background: transparent; }
.sidebar nav { display: flex; flex-direction: column; gap: 3px; }
.sidebar-menu { gap: 3px; }
.sidebar nav a {
    position: relative;
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 36px;
    padding: 0 10px;
    border-radius: 3px;
    color: #dce6e2;
    font-size: 13px;
    transition: background .18s ease, color .18s ease, transform .18s ease;
}
.sidebar nav a p { margin: 0; }
.sidebar nav a i { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: #6f827c; transition: inherit; }
.sidebar nav a:hover { color: white; background: rgba(255,255,255,.08); transform: translateX(2px); }
.sidebar nav a.active { color: white; background: #c2410c; box-shadow: none; }
.sidebar nav a.active i { background: #f8d38a; box-shadow: 0 0 0 4px rgba(248,211,138,.15); }
.sidebar .logout-link .nav-link { color: #f7c9b5; }
.sidebar .nav-header { padding: 15px 12px 5px; color: #82958e; font-size: 10px; font-weight: 900; }
.sidebar-toggle {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    background: #eef3f1;
    color: var(--nav) !important;
    font-size: 19px;
    cursor: pointer;
}
.app-shell .page {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px;
}
.public-shell .page { width: min(1200px, calc(100% - 32px)); margin: 32px auto; }
.public-shell .app-wrapper { display: block; min-height: 100vh; }
.app-content { padding: 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.panel, .auth-panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 3px;
    border-top: 3px solid #d2d6de;
    padding: 16px;
    box-shadow: var(--shadow-sm);
    animation: panel-in .32s ease both;
}
.auth-panel { width: min(430px, 100%); margin: 76px auto; }
.form { display: grid; gap: 12px; }
.filters { margin-bottom: 18px; }
.wide { width: 100%; }
label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 700; }
input, select, textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 3px;
    padding: 9px 10px;
    font: inherit;
    color: var(--ink);
    background: #fbfcfc;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
input:focus, select:focus, textarea:focus {
    border-color: var(--brand);
    background: white;
    box-shadow: 0 0 0 4px rgba(194, 65, 12, .12);
}
textarea { resize: vertical; }
.fieldset {
    border: 1px solid var(--line);
    border-radius: 3px;
    padding: 14px;
    background: var(--soft);
}
.fieldset legend {
    padding: 0 8px;
    color: var(--ink);
    font-size: 15px;
    font-weight: 800;
}
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    border: 1px solid var(--line);
    border-radius: 3px;
    padding: 0 13px;
    background: white;
    color: var(--ink);
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(22, 42, 36, .06);
    transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.button.primary { background: var(--brand); border-color: var(--brand); color: white; }
.button.danger { border-color: #f4c7b4; color: #9a3412; background: #fff4ee; }
.button:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(22, 42, 36, .10); }
.button:active { transform: translateY(0); }
.alert { border-left: 4px solid var(--brand); background: #fff0e8; padding: 10px 12px; }
.split { display: grid; grid-template-columns: 340px 1fr; gap: 18px; align-items: start; }
.columns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.columns.compact { grid-template-columns: repeat(6, 1fr); }
.grid.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.movie-card { display: grid; grid-template-columns: 76px 1fr; gap: 12px; background: #fff; border: 1px solid var(--line); border-top: 3px solid #d2d6de; border-radius: 3px; padding: 10px; box-shadow: var(--shadow-sm); transition: border-color .15s ease; }
.movie-card:hover { border-top-color: var(--accent); }
.movie-card img { width: 76px; height: 112px; object-fit: cover; border-radius: 3px; background: #e5e7eb; }
.movie-card p { color: var(--muted); margin: 0 0 10px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 14px; }
.stat { position: relative; overflow: hidden; background: #fff; border: 1px solid var(--line); border-top: 3px solid #d2d6de; border-radius: 3px; padding: 14px; box-shadow: var(--shadow-sm); transition: border-color .15s ease; }
.stat::after { content: ""; position: absolute; inset: auto -22px -34px auto; width: 88px; height: 88px; border-radius: 50%; background: rgba(15,118,110,.07); }
.stat:hover { border-top-color: var(--accent); }
.stat strong { display: block; font-size: 27px; font-weight: 600; }
.stat span { color: var(--muted); }
.cockpit-head { align-items: end; }
.date-switcher {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}
.cockpit-stats { grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); }
.hero-stat {
    background: #00a65a;
    color: white;
    border-color: #008d4c;
}
.hero-stat span { color: #f5dac5; }
.hero-stat::after { background: rgba(255,255,255,.08); }
.checkin-stat { border-top-color: #00a65a; }
.remaining-stat { border-top-color: #f39c12; }
.occupancy-stat { display: grid; grid-template-columns: 64px 1fr; align-items: center; gap: 4px 12px; padding: 14px; }
.occupancy-stat > span, .occupancy-stat > small { grid-column: 2; }
.occupancy-stat > span { align-self: end; font-weight: 800; color: var(--ink); }
.occupancy-stat > small { align-self: start; color: var(--muted); }
.occupancy-ring {
    grid-row: 1 / 3;
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: conic-gradient(var(--accent) calc(var(--value) * 1%), #e3eae7 0);
    position: relative;
}
.occupancy-ring::after { content: ""; position: absolute; width: 48px; height: 48px; border-radius: 50%; background: white; }
.occupancy-ring strong { position: relative; z-index: 1; font-size: 14px; }
.cockpit-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, .9fr);
    gap: 14px;
    margin-bottom: 14px;
}
.dashboard-main-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, .7fr); gap: 14px; align-items: start; }
.capacity-legend { display: flex; gap: 14px; align-items: center; color: var(--muted); font-size: 12px; font-weight: 800; }
.capacity-legend span { display: inline-flex; align-items: center; gap: 6px; }
.capacity-legend i { width: 10px; height: 10px; border-radius: 2px; }
.capacity-legend .sold { background: #0f766e; }
.capacity-legend .checked { background: #00a65a; }
.capacity-session-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 10px; }
.capacity-card { display: grid; grid-template-columns: 74px 1fr; min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 4px; background: white; box-shadow: var(--shadow-sm); }
.capacity-card > img,
.capacity-poster-placeholder { width: 74px; height: 112px; align-self: stretch; object-fit: cover; background: #e5e7eb; }
.capacity-poster-placeholder { display: grid; place-items: center; color: #87908d; font-size: 9px; font-weight: 900; }
.capacity-content { display: grid; gap: 5px; min-width: 0; padding: 10px; }
.capacity-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.capacity-title > div { min-width: 0; }
.capacity-title strong { display: block; overflow: hidden; color: var(--ink); font-size: 19px; line-height: 1.05; text-overflow: ellipsis; white-space: nowrap; }
.capacity-title span { display: block; overflow: hidden; margin-top: 3px; color: var(--muted); font-size: 12px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.capacity-title time { flex: 0 0 auto; padding: 5px 7px; border-radius: 3px; background: #17120f; color: white; font-size: 13px; font-weight: 900; }
.capacity-content > small { color: var(--muted); font-size: 11px; }
.capacity-metric { display: grid; gap: 3px; }
.capacity-metric > span { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; font-weight: 800; }
.capacity-metric > div { height: 7px; overflow: hidden; border-radius: 999px; background: #e5ebe8; }
.capacity-metric i { display: block; height: 100%; border-radius: inherit; animation: meter-grow .65s ease both; }
.capacity-metric i.sold { background: #0f766e; }
.capacity-metric i.checked { background: #00a65a; }
.capacity-content footer { display: flex; justify-content: space-between; gap: 8px; padding-top: 2px; color: var(--muted); font-size: 11px; }
.capacity-content footer b { color: var(--accent); }
.finance-panel { display: grid; gap: 12px; position: sticky; top: 62px; }
.finance-opening { padding: 13px; border-left: 4px solid var(--brand); background: #fff4ee; }
.finance-opening span,
.finance-opening small { display: block; color: var(--muted); }
.finance-opening strong { display: block; margin: 2px 0; color: var(--brand-dark); font-size: 25px; }
.payment-grid { display: grid; gap: 8px; }
.payment-card { padding: 11px 12px; border: 1px solid var(--line); border-left: 4px solid #87908d; border-radius: 3px; background: white; }
.payment-card.cash { border-left-color: #00a65a; }
.payment-card.card { border-left-color: #3c8dbc; }
.payment-card.pix { border-left-color: #f39c12; }
.payment-card span { display: block; color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.payment-card strong { display: block; margin-top: 2px; font-size: 20px; }
.cash-day-list { display: grid; gap: 6px; }
.cash-day-list h3 { margin: 2px 0 4px; font-size: 13px; }
.cash-day-list > div { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 8px 0; border-top: 1px solid var(--line); }
.cash-day-list span strong,
.cash-day-list span { display: block; }
.cash-day-list span { color: var(--muted); font-size: 11px; }
.cash-day-list span strong { color: var(--ink); font-size: 12px; }
.cash-day-list > div > b { align-self: center; grid-row: 1 / 3; grid-column: 2; }
.cash-day-list i { font-size: 10px; font-style: normal; font-weight: 800; text-transform: uppercase; }
.cash-day-list i.aberto { color: #008d4c; }
.cash-day-list i.fechado { color: var(--muted); }
.occupancy-list {
    display: grid;
    gap: 10px;
}
.occupancy-item {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(140px, .8fr) 52px;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 3px;
    background: #fff;
    transition: border-color .18s ease, transform .18s ease;
}
.occupancy-item:hover { border-color: #b9c9c3; }
.occupancy-item strong,
.occupancy-item span { display: block; }
.occupancy-item span { color: var(--muted); font-size: 13px; margin-top: 3px; }
.occupancy-item .checkin-line { color: #0f766e; font-weight: 800; }
.occupancy-item b { text-align: right; }
.occupancy-meter,
.mini-meter {
    height: 12px;
    border-radius: 999px;
    background: #eee5d8;
    overflow: hidden;
}
.occupancy-meter i,
.mini-meter i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #0f766e, #39a38f 55%, #f5c542 82%, #c2410c);
    animation: meter-grow .65s ease both;
}
.bar-chart {
    height: 260px;
    display: flex;
    align-items: end;
    gap: 10px;
    padding-top: 24px;
    position: relative;
    border-bottom: 1px solid var(--line);
    background: repeating-linear-gradient(to top, transparent 0, transparent 63px, rgba(104,115,111,.10) 64px);
}
.bar-column {
    flex: 1;
    min-width: 34px;
    height: 100%;
    display: grid;
    grid-template-rows: 24px 1fr 20px;
    align-items: end;
    text-align: center;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}
.bar-column i {
    width: 100%;
    min-height: 8px;
    display: block;
    border-radius: 7px 7px 3px 3px;
    background: #f39c12;
    box-shadow: none;
    transform-origin: bottom;
    animation: bar-grow .55s ease both;
}
.bar-column b { color: var(--ink); }
.panel-heading { display: flex; align-items: start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.panel-heading h2 { margin-bottom: 0; }
.panel-heading .eyebrow { margin-bottom: 4px; color: var(--accent); }
.chart-legend { padding: 6px 8px; border-radius: 999px; background: #eef6f3; color: var(--accent); font-size: 11px; font-weight: 800; }
.session-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 10px;
}
.session-tile {
    display: grid;
    grid-template-columns: 44px 58px 1fr;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 3px;
    background: #fff;
    transition: border-color .15s ease;
}
.session-tile:hover { border-color: var(--accent); }
.session-poster { width: 44px; height: 62px; object-fit: cover; border-radius: 3px; background: #e5e7eb; }
.session-poster.placeholder { position: relative; }
.session-poster.placeholder::after { content: "FILME"; position: absolute; inset: 0; display: grid; place-items: center; color: #87908d; font-size: 8px; font-weight: 900; }
.session-time {
    display: grid;
    place-items: center;
    min-height: 54px;
    border-radius: 3px;
    background: #17120f;
    color: white;
    font-weight: 900;
}
.session-tile strong,
.session-tile span,
.session-tile small { display: block; }
.session-tile span,
.session-tile small { color: var(--muted); font-size: 13px; }
.session-tile .mini-meter,
.session-tile small { grid-column: 1 / -1; }
.room-sales-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 12px;
}
.room-sale-card {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 3px;
    background: #fff;
    box-shadow: var(--shadow-sm);
}
.room-sale-card strong,
.room-sale-card span,
.room-sale-card b { display: block; }
.room-sale-card span { color: var(--muted); margin: 6px 0; }
.room-revenue-meter { height: 6px; margin-top: 12px; overflow: hidden; border-radius: 999px; background: #e4ebe8; }
.room-revenue-meter i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), #f5c542); animation: meter-grow .65s ease both; }
table { width: 100%; border-collapse: collapse; }
th, td { border-bottom: 1px solid var(--line); padding: 9px 10px; text-align: left; }
th { color: var(--muted); font-size: 11px; text-transform: uppercase; background: #f5f5f5; }
.status-badge { display: inline-flex; align-items: center; min-height: 23px; padding: 0 8px; border-radius: 999px; font-size: 11px; font-weight: 900; }
.status-badge.active { background: #e8f7ef; color: #08783f; }
.status-badge.inactive { background: #f1f3f2; color: #68736f; }
.table-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.table-actions form { margin: 0; }
.table-actions .button { min-height: 30px; padding: 0 9px; font-size: 12px; }
.category-name { display: inline-flex; align-items: center; gap: 7px; }
.category-name svg { width: 18px; height: 18px; color: var(--accent); }
.group-row td {
    background: #17120f;
    color: white;
    font-weight: 800;
    letter-spacing: 0;
}
.movie-cell {
    display: grid;
    grid-template-columns: 42px 1fr;
    align-items: center;
    gap: 10px;
    min-width: 190px;
}
.movie-cell img {
    width: 42px;
    height: 58px;
    object-fit: cover;
    border-radius: 5px;
    background: #e5e1d8;
}
.movie-cell span { font-weight: 800; }
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0; }
#seat-summary { color: var(--muted); font-weight: 700; margin-left: auto; }
.showtime-builder {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(140px, 1fr) auto;
    gap: 14px;
    align-items: end;
}
.showtime-list {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}
.showtime-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 12px;
    background: white;
}
.showtime-row span { font-weight: 800; }
.muted { color: var(--muted); }
.eyebrow {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 5px;
}
.sale-head {
    width: 100%;
    margin-left: 0;
    align-items: center;
    margin-bottom: 6px;
}
.sale-title-strip {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    min-width: 0;
}
.sale-title-strip .eyebrow {
    margin: 0;
    padding: 5px 8px;
    border-radius: 999px;
    background: #17120f;
    color: white;
    white-space: nowrap;
}
.sale-head h1 {
    margin: 0;
    font-size: 25px;
    line-height: 1.12;
}
.sale-meta {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.sale-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 9px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fffdf9;
    color: var(--ink);
    font-size: 13px;
    font-weight: 800;
}
.sale-head-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 0 0 auto;
}
.sale-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: 10px;
    align-items: start;
    padding-bottom: 8px;
}
.route-sale-new .app-header { min-height: 42px; }
.route-sale-new .page { padding-top: 8px; }
.route-sale-new .sale-map-panel { padding-top: 8px; }
.route-sale-new .sale-head { margin-bottom: 4px; }
.sale-workbench {
    width: 100%;
    margin-left: 0;
}
.sale-map-panel { overflow: hidden; padding: 8px; }
.ticket-type-toolbar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding-top: 2px;
}
.ticket-type-toolbar > span { grid-column: 1 / -1; color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.ticket-type-toolbar label { position: relative; display: grid; gap: 1px; min-width: 0; margin: 0; padding: 7px 9px; border: 1px solid var(--line); border-radius: 4px; background: white; cursor: pointer; }
.ticket-type-toolbar input { position: absolute; opacity: 0; }
.ticket-type-toolbar small { color: var(--muted); }
.ticket-type-toolbar label:has(input:checked) { border-color: #f5c542; background: #fff9dc; box-shadow: 0 0 0 2px rgba(245,197,66,.22); }
.sale-map {
    position: relative;
    width: min(100%, calc((100vh - 120px) * 1.6774));
    aspect-ratio: 1040 / 620;
    min-width: 320px;
    margin: 0 auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: repeating-linear-gradient(0deg, #fffdf9, #fffdf9 4.8%, #efe7db 5%), repeating-linear-gradient(90deg, transparent, transparent 3.8%, #efe7db 3.9%);
}
.sale-screen {
    position: absolute;
    display: grid;
    place-items: center;
    border-radius: 4px;
    background: #17120f;
    color: white;
    font-size: clamp(8px, 1.2vw, 12px);
    font-weight: 800;
}
.sale-seat {
    position: absolute;
    display: grid;
    place-items: center;
    margin: 0;
    color: white;
    font-size: clamp(7px, 1.1vw, 11px);
    line-height: 1;
    cursor: pointer;
}
.sale-seat input { position: absolute; opacity: 0; pointer-events: none; }
.sale-seat span {
    display: grid;
    place-items: center;
    width: 96%;
    height: 96%;
    border-radius: 7px 7px 4px 4px;
    background: #15803d;
    box-shadow: 0 4px 9px rgba(15, 118, 110, .22);
}
.sale-seat.large span { background: #0f766e; }
.sale-seat input:checked + span { background: #f5c542; color: #17120f; }
.sale-seat.selected-full span::after,
.sale-seat.selected-half span::after { position: absolute; right: -3px; top: -5px; display: grid; place-items: center; width: 14px; height: 14px; border-radius: 50%; background: #17120f; color: white; font-size: 8px; font-weight: 900; }
.sale-seat.selected-full span::after { content: "I"; }
.sale-seat.selected-half span::after { content: "M"; }
.sale-seat.sold { cursor: not-allowed; }
.sale-seat.sold span { background: #dc2626; color: #fff1f1; box-shadow: none; }
.legend {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i {
    width: 14px;
    height: 14px;
    display: inline-block;
    border-radius: 4px;
}
.legend .free { background: #15803d; }
.legend .selected { background: #f5c542; }
.legend .sold { background: #dc2626; }
.sale-side-panel {
    position: sticky;
    top: 52px;
    z-index: 30;
    display: grid;
    align-self: start;
    gap: 8px;
    padding: 10px;
    max-height: calc(100vh - 112px);
    overflow: auto;
    box-shadow: 0 10px 28px rgba(23, 18, 15, .14);
}
.sale-session-card { display: grid; grid-template-columns: 1fr; gap: 9px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.sale-session-card.has-cover { grid-template-columns: minmax(0, 1fr) 76px; }
.sale-session-info { display: grid; align-content: start; gap: 2px; min-width: 0; }
.sale-session-info .eyebrow { margin: 0; }
.sale-session-info h1 { margin: 1px 0 4px; font-size: 19px; line-height: 1.15; }
.sale-session-info strong { font-size: 17px; }
.sale-session-info > span:last-child { color: var(--muted); font-size: 12px; }
.sale-side-cover { width: 76px; height: 108px; object-fit: contain; object-position: center; border-radius: 4px; background: #eef1ef; }
.sale-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-items: end; }
.sale-summary .summary-item:first-child,
.sale-summary label { grid-column: 1 / -1; }
.sale-summary label { gap: 5px; }
.sale-summary input,
.sale-summary select {
    min-height: 40px;
    padding: 9px 10px;
}
.summary-item {
    min-height: 40px;
    margin: 0;
    display: grid;
    align-content: center;
    gap: 2px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}
.summary-item strong {
    display: block;
    color: var(--ink);
    font-size: 16px;
}
.summary-item.total strong {
    color: var(--brand-dark);
    font-size: 24px;
}
.finish-sale { width: 100%; }
.wizard-open { overflow: hidden; }
.sale-wizard { position: fixed; inset: 0; z-index: 1100; display: grid; place-items: center; padding: 20px; background: rgba(15, 24, 22, .68); }
.sale-conflict { margin: 0 0 12px; padding: 11px 14px; border: 1px solid #e3a008; border-radius: 5px; background: #fff8db; color: #684b00; font-weight: 700; }
.sale-wizard[hidden] { display: none; }
.sale-wizard-dialog { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; width: min(980px, 100%); height: min(720px, calc(100vh - 40px)); overflow: hidden; border-radius: 6px; background: white; box-shadow: 0 28px 80px rgba(0,0,0,.32); }
.sale-wizard-dialog > header { display: flex; justify-content: space-between; gap: 16px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.sale-wizard-dialog > header h2 { margin: 0; font-size: 22px; }
.sale-wizard-dialog > header p { margin: 3px 0 0; color: var(--muted); }
.icon-button { width: 36px; height: 36px; border: 0; border-radius: 50%; background: #eef1ef; color: var(--ink); font-size: 24px; cursor: pointer; }
.product-wizard-layout { display: grid; grid-template-columns: 200px 1fr; min-height: 0; }
.product-category-tree { overflow: auto; padding: 10px; border-right: 1px solid var(--line); background: #f6f8f7; }
.product-category-tree button { width: 100%; min-height: 42px; display: flex; align-items: center; gap: 9px; margin-bottom: 4px; padding: 0 10px; border: 0; border-radius: 4px; background: transparent; color: var(--ink); text-align: left; font-weight: 800; cursor: pointer; }
.product-category-tree button.child { padding-left: 26px; }
.product-category-tree button.active { background: var(--accent); color: white; }
.product-category-tree svg { width: 19px; height: 19px; }
.product-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); align-content: start; gap: 10px; overflow: auto; padding: 14px; }
.product-pick-card { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 94px; padding: 10px; border: 1px solid var(--line); border-radius: 4px; background: white; }
.product-pick-card.selected { border-color: #f39c12; background: #fffaf0; }
.product-pick-card strong,.product-pick-card span,.product-pick-card b { display: block; }
.product-pick-card span { margin: 2px 0 6px; color: var(--muted); font-size: 11px; }
.product-pick-image { width: 58px; height: 58px; object-fit: cover; border-radius: 4px; background: #eef1ef; }
.product-pick-image.placeholder { display: grid; place-items: center; margin: 0; color: var(--muted); }
.product-pick-image.placeholder svg { width: 24px; height: 24px; }
.product-table-name { display: flex; align-items: center; gap: 9px; min-width: 170px; }
.product-table-name img,.product-image-placeholder { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 4px; object-fit: cover; background: #eef1ef; }
.product-image-placeholder { display: grid; place-items: center; color: var(--muted); }
.product-image-placeholder svg { width: 20px; height: 20px; }
.product-image-current { display: flex; align-items: center; gap: 12px; }
.product-image-current img { width: 96px; height: 96px; border-radius: 4px; object-fit: cover; }
.quantity-stepper { display: grid; grid-template-columns: 32px 36px 32px; align-items: center; }
.quantity-stepper button { width: 32px; height: 34px; border: 1px solid var(--line); background: #f6f8f7; font-size: 20px; cursor: pointer; }
.quantity-stepper input { width: 36px; height: 34px; padding: 0; border-right: 0; border-left: 0; border-radius: 0; text-align: center; }
.sale-wizard-dialog > footer { display: flex; align-items: end; justify-content: flex-end; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--line); background: #f8faf9; }
.sale-wizard-dialog > footer > .wizard-total-block { margin-right: auto; }
.sale-wizard-dialog > footer span,.sale-wizard-dialog > footer strong { display: block; }
.sale-wizard-dialog > footer strong { font-size: 23px; color: var(--brand-dark); }
.wizard-payment { display: flex; align-items: end; gap: 8px; }
.wizard-payment label { width: 150px; margin: 0; }
.wizard-payment select,.wizard-payment input { min-height: 38px; }
.wizard-change { min-width: 88px; margin: 0; padding: 0 6px 3px; }
.wizard-change span { color: var(--muted); font-size: 11px; }
.wizard-change strong { font-size: 17px !important; }
.sale-footer {
    grid-column: 1 / -1;
    position: sticky;
    bottom: 5px;
    z-index: 35;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 7px 10px;
    box-shadow: 0 8px 24px rgba(23, 18, 15, .16);
}
.sale-footer .ticket-type-toolbar { grid-template-columns: auto 120px 120px; align-items: stretch; padding: 0; }
.sale-footer .ticket-type-toolbar > span { grid-column: auto; align-self: center; }
.ticket-print {
    width: min(420px, 100%);
    margin: 0 auto;
    padding: 22px;
    border: 1px dashed #17120f;
    background: white;
}
.ticket-stack { display: grid; gap: 14px; }
.qr-ticket {
    display: grid;
    justify-items: center;
    gap: 8px;
    margin: 18px 0 10px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fffdf9;
    text-align: center;
}
.qr-ticket [data-ticket-qr],
.qr-ticket [data-ticket-qr] canvas,
.qr-ticket [data-ticket-qr] img,
.qr-ticket #ticket-qr,
.qr-ticket #ticket-qr canvas,
.qr-ticket #ticket-qr img {
    width: 180px;
    height: 180px;
}
.qr-ticket [data-ticket-qr] img,
.qr-ticket #ticket-qr img { display: block; }
.qr-ticket p {
    margin: 0;
    word-break: break-all;
    font-size: 12px;
}
.qr-reader-panel {
    display: grid;
    gap: 16px;
}
.qr-camera-box {
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: #17120f;
    aspect-ratio: 4 / 3;
}
.qr-camera-box video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.qr-reader-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.qr-manual-form {
    max-width: 560px;
}
.pickup-layout { display: grid; grid-template-columns: minmax(280px, .8fr) minmax(360px, 1.2fr); gap: 14px; align-items: start; }
.pickup-scanner { display: grid; gap: 12px; }
.pickup-cart { position: sticky; top: 62px; display: grid; gap: 10px; min-height: 420px; padding-bottom: 66px; }
.pickup-items { display: grid; align-content: start; gap: 7px; }
.pickup-items article { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 8px; border: 1px solid var(--line); border-left: 4px solid #f39c12; border-radius: 3px; }
.pickup-items article > img,.pickup-image-placeholder { width: 48px; height: 48px; border-radius: 3px; object-fit: cover; background: #eef1ef; }
.pickup-image-placeholder { display: grid !important; place-items: center; color: var(--muted) !important; font-size: 18px !important; }
.pickup-items article strong,.pickup-items article span { display: block; }
.pickup-items article span { color: var(--muted); font-size: 11px; }
.pickup-items article button { width: 30px; height: 30px; border: 0; border-radius: 50%; background: #f1f3f2; font-size: 18px; cursor: pointer; }
.pickup-finish { position: absolute; right: 12px; bottom: 12px; left: 12px; }
.pickup-success { padding: 12px; border-left: 4px solid #00a65a; background: #e8f7ef; color: #08783f; font-weight: 800; }
.validation-card {
    display: grid;
    gap: 6px;
    padding: 22px;
    border-radius: 8px;
    margin-bottom: 18px;
    color: white;
    box-shadow: 0 18px 42px rgba(55, 45, 32, .12);
}
.validation-card strong {
    font-size: 28px;
}
.validation-card.valid { background: #15803d; }
.validation-card.invalid { background: #dc2626; }
.validation-card.used { background: #b45309; }
.validation-card.waiting { background: #2563a8; }
.entry-policy { display: flex; justify-content: space-between; gap: 12px; padding: 11px 12px; border-left: 4px solid #3c8dbc; background: #eef6fb; color: #245474; }
.entry-policy span { text-align: right; }
.validation-detail {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 18px;
    align-items: start;
}
.validation-detail img {
    width: 110px;
    height: 160px;
    object-fit: cover;
    border-radius: 7px;
    border: 1px solid var(--line);
    background: #e5e1d8;
}
.validation-detail p {
    margin: 0 0 10px;
}
.validation-detail .entry-window { padding: 8px 10px; border-left: 3px solid #3c8dbc; background: #eef6fb; color: #245474; }
.validation-detail button:disabled { cursor: not-allowed; opacity: .65; transform: none; }
.settings-section { display: grid; gap: 14px; }
.settings-section h2 { margin-bottom: 0; }
.settings-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.check-label { display: inline-flex; align-items: center; gap: 7px; color: var(--ink); }
.check-label input { width: 16px; height: 16px; margin: 0; padding: 0; accent-color: var(--brand); }
.logo-upload-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding-top: 4px; }
.logo-upload-row > label:not(.check-label) { flex: 1 1 280px; }
.cinema-logo-preview { width: 120px; height: 72px; padding: 5px; object-fit: contain; border: 1px solid var(--line); border-radius: 4px; background: white; }
.room-editor { overflow: auto; border: 1px solid var(--line); border-radius: 8px; background: #e7dfd2; padding: 16px; }
.room-canvas {
    position: relative;
    width: 1040px;
    height: 620px;
    background: repeating-linear-gradient(0deg, #fffdf9, #fffdf9 39px, #efe7db 40px), repeating-linear-gradient(90deg, transparent, transparent 39px, #efe7db 40px);
    border: 1px solid #cabfaf;
    border-radius: 8px;
}
.screen {
    position: absolute;
    left: 270px;
    top: 28px;
    width: 500px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 4px;
    background: #17120f;
    color: white;
    font-size: 12px;
    font-weight: 700;
    cursor: move;
    box-shadow: 0 12px 24px rgba(23, 18, 15, .18);
}
.seat {
    position: absolute;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 7px 7px 4px 4px;
    background: #15803d;
    color: white;
    font-size: 11px;
    font-weight: 700;
    cursor: move;
    user-select: none;
    box-shadow: 0 8px 16px rgba(21, 128, 61, .24);
}
.seat.large { width: 62px; background: #0f766e; box-shadow: 0 8px 16px rgba(15, 118, 110, .25); }
.seat.selected { outline: 3px solid #f5c542; z-index: 4; }
@keyframes panel-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@keyframes meter-grow { from { width: 0; } }
@keyframes bar-grow { from { transform: scaleY(.05); opacity: .45; } to { transform: scaleY(1); opacity: 1; } }
@media (max-width: 860px) {
    .app-user-status { align-items: flex-end; flex-direction: column; gap: 0; line-height: 1.25; }
    .app-user-status span { padding-left: 0; border-left: 0; font-size: 10px; }
    .app-shell .page { width: 100%; margin: 0; padding: 18px 14px 20px; }
    .split, .columns, .columns.compact, .stats, .cockpit-stats, .cockpit-grid, .dashboard-main-grid, .showtime-builder, .sale-layout, .pickup-layout { grid-template-columns: 1fr; }
    .occupancy-item { grid-template-columns: 1fr; }
    .occupancy-item b { text-align: left; }
    .section-head { align-items: flex-start; flex-direction: column; }
    .sale-layout { padding-bottom: 8px; }
    .sale-head, .sale-workbench { width: 100%; }
    .sale-head-actions { width: 100%; justify-content: space-between; }
    .sale-head h1 { font-size: 22px; }
    .sale-map-panel { padding: 6px; overflow: auto; }
    .sale-map { width: 100%; }
    .sale-side-panel { position: static; order: -1; max-height: none; }
    .sale-session-card.has-cover { grid-template-columns: minmax(0, 1fr) 68px; }
    .sale-side-cover { width: 68px; height: 96px; }
    .sale-summary { grid-template-columns: 1fr 1fr; }
    .sale-footer { position: sticky; flex-wrap: wrap; }
    .sale-footer .ticket-type-toolbar { width: 100%; grid-template-columns: 1fr 1fr; }
    .sale-footer .ticket-type-toolbar > span { grid-column: 1 / -1; }
    .sale-footer > .button { width: 100%; }
    .sale-wizard { padding: 0; }
    .sale-wizard-dialog { width: 100%; height: 100%; border-radius: 0; }
    .product-wizard-layout { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
    .product-category-tree { display: flex; gap: 6px; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); }
    .product-category-tree button { width: auto; min-width: max-content; margin: 0; }
    .product-category-tree button.child { padding-left: 10px; }
    .product-picker { grid-template-columns: 1fr; }
    .sale-wizard-dialog > footer { flex-wrap: wrap; }
    .sale-wizard-dialog > footer > .wizard-total-block { width: 100%; margin-right: 0; }
    .wizard-payment { width: 100%; display: grid; grid-template-columns: 1fr 1fr auto; }
    .wizard-payment label { width: auto; }
    .validation-detail { grid-template-columns: 1fr; }
    .validation-detail img { width: 86px; height: 126px; }
    .panel-heading { align-items: flex-start; flex-direction: column; }
    .bar-chart { overflow-x: auto; }
    .settings-title { align-items: flex-start; flex-direction: column; }
    .finance-panel { position: static; }
    .capacity-session-grid { grid-template-columns: 1fr; }
    .pickup-cart { position: relative; top: auto; }
}
@media print {
    body { background: white; }
    .app-header, .app-sidebar, .sidebar-toggle, .public-topbar, .no-print { display: none; }
    .app-shell .page,
    .page { width: 100%; margin: 0; }
    .ticket-print { border: none; width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
