.sheet-top .badge{margin-right:8px}.sheet-top p{margin:10px 0}.sheet-filters{display:flex;flex-wrap:wrap;align-items:end;gap:12px}.sheet-filters label{display:grid;gap:6px;min-width:140px;flex:1}.sheet-filters input,.sheet-filters select{width:100%;min-height:44px}.sheet-scroll{max-width:100%;overflow:auto;margin-top:20px;max-height:65vh}.sheet-grid{table-layout:auto;min-width:2400px}.sheet-grid th{position:sticky;top:0;z-index:1;background:var(--card,#f1f5f4);color:var(--text,#143e43)}.sheet-grid th>div{resize:horizontal;overflow:auto;min-width:120px;width:150px}.sheet-grid td{vertical-align:top;max-width:350px;white-space:pre-wrap;overflow-wrap:anywhere}.sheet-grid textarea{width:100%;min-width:140px;min-height:44px;resize:vertical;border:1px solid transparent;background:transparent;color:inherit;font:inherit;padding:8px}.sheet-grid textarea:hover,.sheet-grid textarea:focus{border-color:currentColor;background:var(--card,#fff)}.sheet-grid [aria-invalid=true]{outline:2px solid #ad332e}.sheet-pending{opacity:.75;font-size:.9em}.sheet-pagination{justify-content:space-between;margin-top:16px}.sheet-caption{text-align:left;padding:8px}.sheet-mobile{display:none}.sheet-record{border-bottom:1px solid #9cacab;padding:14px 0}.sheet-record summary{cursor:pointer;min-height:44px}.sheet-record summary small{display:block}.sheet-record dl>div{padding:8px 0;display:grid;grid-template-columns:1fr 1.3fr;gap:12px}.sheet-record dt{font-size:.85rem;opacity:.8}.sheet-record dd{margin:0;min-width:0;overflow-wrap:anywhere}.sheet-record textarea{width:100%;min-height:44px;font:inherit;color:inherit;background:transparent;border:1px solid #9cacab}.sheet-record [aria-invalid=true]{outline:2px solid #ad332e}@media(max-width:700px){.sheet-scroll{display:none}.sheet-mobile{display:block}.sheet-filters label{min-width:calc(50% - 12px)}.sheet-filters label:first-child{flex-basis:100%}.sheet-pagination{flex-wrap:wrap}}

/* Keep controls intrinsic and rows compact in both PACIFA themes. */
#spreadsheet-workspace{min-width:0;max-width:100%}
#spreadsheet-workspace .card{min-width:0}
.sheet-scroll{width:100%;overscroll-behavior-x:contain}
.sheet-grid{width:max-content;min-width:2800px;border-collapse:collapse;table-layout:auto}
.sheet-grid th,.sheet-grid td{padding:8px 10px;box-sizing:border-box}
.sheet-grid td{height:auto;vertical-align:top;white-space:normal;overflow-wrap:normal;min-width:160px;border-bottom:1px solid var(--border,#daccc0)}
.sheet-grid th>div{min-width:140px;width:160px}
.sheet-grid td textarea,.sheet-grid td select:not([hidden]){box-sizing:border-box;width:100%;min-width:140px;height:38px;min-height:38px;max-height:120px;margin:0;padding:7px 9px;font:inherit;line-height:22px}
.sheet-grid td textarea{display:block;white-space:pre-wrap;overflow:auto;resize:vertical}
.sheet-grid td select[hidden]{display:none!important}
.sheet-grid .sheet-calendar-cell{min-width:300px;width:300px;max-width:320px;white-space:normal;overflow-wrap:normal}
.sheet-calendar-cell button{display:inline-block;white-space:nowrap;word-break:normal;overflow-wrap:normal;padding:7px 10px;min-height:36px;margin:0 5px 4px 0;width:auto}
.sheet-calendar-cell small{display:block;font-size:11px;line-height:15px;max-width:250px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sheet-performer-picker{position:relative;margin:0;min-width:160px;max-width:260px}
.sheet-performer-picker>summary{display:flex;align-items:center;justify-content:space-between;gap:8px;box-sizing:border-box;min-height:38px;padding:7px 9px;border:1px solid var(--border,#cbb8a6);border-radius:8px;cursor:pointer;list-style:none;line-height:22px}
.sheet-performer-picker>summary::-webkit-details-marker{display:none}
.sheet-performer-picker>summary span:first-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sheet-performer-picker>summary:focus-visible{outline:2px solid var(--accent,#367e80);outline-offset:2px}
.sheet-performer-menu{position:absolute;top:calc(100% + 4px);left:0;z-index:5;min-width:220px;max-width:280px;padding:8px;background:var(--t-card,var(--card,#fffaf5));color:var(--t-ink,var(--text,#143e43));border:1px solid var(--border,#cbb8a6);border-radius:10px;box-shadow:0 8px 24px #0003;white-space:normal}
.sheet-performer-options{max-height:180px;overflow:auto}
.sheet-performer-options label{display:flex;align-items:center;gap:8px;min-height:36px;margin:0;padding:4px;cursor:pointer}
.sheet-performer-options input[type=checkbox]{width:18px;min-width:18px;height:18px;min-height:18px;margin:0;padding:0}
.sheet-performer-actions{display:flex;justify-content:flex-end;gap:6px;padding-top:8px;border-top:1px solid var(--border,#cbb8a6)}
.sheet-performer-actions button{min-height:36px;padding:6px 10px;white-space:nowrap}
@media(max-width:700px){.sheet-record .sheet-performer-picker{max-width:100%;min-width:0}.sheet-record .sheet-performer-menu{left:auto;right:0;min-width:200px}.sheet-record select[hidden]{display:none!important}}

/* Company payment inputs: green headings and cells, independent of column position. */
.sheet-grid :is(th,td):is([data-col="eventPay"],[data-col="paymentStatus"],[data-col="performerPayout"],[data-col="payoutStatus"]){background:#edf8ef!important;color:#16462b!important}
.sheet-grid th:is([data-col="eventPay"],[data-col="paymentStatus"],[data-col="performerPayout"],[data-col="payoutStatus"]){background:#c3e5ca!important;color:#16462b!important}
.sheet-grid td:is([data-col="eventPay"],[data-col="paymentStatus"],[data-col="performerPayout"],[data-col="payoutStatus"]) :is(select,textarea){background:#e3f3e7!important;color:#16462b!important;border-color:#87b793!important}

.sheet-time-picker input[hidden]{display:none!important}.sheet-time-picker button{box-sizing:border-box;width:100%;min-width:140px;min-height:38px;padding:7px 9px;margin:0;white-space:nowrap;text-align:left}.sheet-time-dialog{max-width:540px}.sheet-time-dialog input[type=time]{min-height:44px;width:100%}.sheet-time-day{font-weight:600}.sheet-time-dialog [role=alert]{color:#a22b24}

dialog.event-dialog.sheet-time-dialog[open]{width:min(540px,calc(100vw - 24px));height:auto;max-width:540px;max-height:90dvh;min-height:0;padding:24px;overflow:auto;gap:12px}dialog.sheet-time-dialog h2,dialog.sheet-time-dialog>p{margin:0}dialog.sheet-time-dialog form{display:grid;gap:14px;align-content:start}dialog.sheet-time-dialog form p{margin:0}dialog.sheet-time-dialog .actions{margin:0}

.sheet-line-dialog{width:min(620px,calc(100vw - 24px));max-height:90dvh;overflow:auto}.sheet-line-fields{padding:20px;display:grid;gap:12px}.sheet-line-fields label{display:grid;gap:5px}.sheet-line-fields fieldset label{display:flex;align-items:center}.sheet-line-fields input[type=checkbox]{width:auto}.sheet-line-time{display:grid;grid-template-columns:1fr 1fr;gap:12px}.sheet-line-fields [data-error]{color:#aa2929}.sheet-calendar-cell .badge{white-space:normal}
dialog.event-dialog.sheet-line-dialog[open]{width:min(620px,calc(100vw - 24px));height:auto;max-width:620px;max-height:90dvh;overflow:auto;padding:0;display:block}
