:root {
  color-scheme: light;
  --bg: #f5f6fb;
  --card: #ffffff;
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --text: #1f2430;
  --muted: #6b7280;
  --border: #e3e6f3;
  --shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
  --ring: 0 0 0 3px rgba(79, 70, 229, 0.2);
  --input-bg: #f8fafc;
  --highlight-bg: #f1f0ff;
}

body.theme-dark {
  color-scheme: dark;
  --bg: #0f1118;
  --card: #171a23;
  --primary: #8b8bff;
  --primary-dark: #6d6dff;
  --text: #eef0f6;
  --muted: #a4acc3;
  --border: #2a2f3f;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  --ring: 0 0 0 3px rgba(139, 139, 255, 0.3);
  --input-bg: #111420;
  --highlight-bg: rgba(139, 139, 255, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  font-family: "Inter", "SF Pro Text", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 0.9rem;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  letter-spacing: 0.1px;
}

.save-status {
  position: fixed;
  right: 20px;
  bottom: 20px;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  letter-spacing: 0.2px;
  color: #fff;
  background: #4f46e5;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.25);
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 1000;
}

.api-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 12px 20px;
  background: #dc2626;
  color: #fff;
  font-size: 0.9rem;
  text-align: center;
  z-index: 1100;
}


.save-status.hidden {
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
}

.save-status.saving {
  background: #2563eb;
}

.save-status.saved {
  background: #16a34a;
}

.save-status.error {
  background: #dc2626;
}

.save-status.unsaved {
  background: #f59e0b;
  color: #111827;
}

header {
  padding: 32px 8vw 12px;
}

header.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.menu-dropdown {
  position: relative;
}

.menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  background: #121212;
  border: 1px solid #1f1f1f;
  border-radius: 12px;
  padding: 10px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 2000;
}

.menu-item {
  background: transparent;
  border: 1px solid transparent;
  color: #f5f5f5;
  padding: 10px 12px;
  border-radius: 10px;
  text-align: left;
  cursor: pointer;
  font-size: 0.95rem;
  font-family: inherit;
  display: block;
  width: 100%;
  text-decoration: none;
}

.menu-item:hover {
  border-color: #2a2a2a;
  background: #1a1a1a;
}

.menu-separator {
  height: 1px;
  background: #232323;
  margin: 6px 0;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.checkbox-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid #1f1f1f;
  border-radius: 10px;
  background: #141414;
  color: #f5f5f5;
  font-size: 0.9rem;
}

.checkbox-chip input {
  accent-color: #e9ad3f;
}

.signature-apply-select {
  width: 100%;
  min-width: 160px;
  background: #151515;
  border: 1px solid #2a2a2a;
  color: #f5f5f5;
  padding: 8px 10px;
  border-radius: 8px;
  font-family: inherit;
}

header.page-header .button-link {
  box-shadow: 0 10px 24px rgba(79, 70, 229, 0.2);
}

header h1 {
  margin: 0 0 8px;
  font-size: 2.4rem;
}

header p {
  margin: 0;
  color: var(--muted);
}

main {
  padding: 0 8vw 64px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.overview-page header {
  padding: 0 5vw;
}

.overview-page main {
  padding: 0 5vw 64px;
}

.venue-page main {
  padding: 0 0 64px;
}

.venue-page .card {
  border-radius: 0;
  box-shadow: none;
  border: 1px solid #d9dde3;
}

.venue-page .summary-item {
  border-radius: 0;
}

#venue-metrics-tiles {
  display: grid !important;
  margin-top: 14px;
  margin-bottom: 0;
  margin-left: 0;
  margin-right: 0;
  padding-left: 12px;
  padding-right: 12px;
  box-sizing: border-box;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.venue-page #venue-metrics-tiles .overview-tile {
  justify-content: center;
  align-items: center;
  text-align: center;
  min-height: 130px;
}

.venue-page #venue-metrics-tiles .overview-tile-header {
  justify-content: center;
}

.venue-page #venue-metrics-tiles .overview-stats {
  display: block;
}

.venue-page #venue-metrics-tiles .overview-stat {
  background: transparent;
  border: 0;
  padding: 0;
}

.venue-page #venue-metrics-tiles .overview-tile .value {
  font-size: 2.1rem;
  line-height: 1.1;
}

.venue-page #venue-metrics-tiles .overview-tile .value .break-even-per-day {
  font-size: 0.34em;
  color: #6e6e73;
  font-weight: 600;
  white-space: nowrap;
}

.venue-page #venue-metrics-tiles .overview-tile .value .break-even-layout {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.venue-page #venue-metrics-tiles .overview-tile .value .break-even-main {
  display: inline-block;
  line-height: 1;
}

.venue-page #venue-metrics-tiles .overview-tile .value .break-even-lines {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.1;
}

.venue-page #venue-metrics-tiles .overview-stat .tile-meta {
  margin-top: 8px;
}

.venue-page #show-details-sections {
  margin-top: 16px;
  margin-left: 0;
  margin-right: 0;
}

.venue-page .show-details-accordion {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.venue-page .show-details-accordion details {
  border: 1px solid #d9dde3;
  background: #fff;
}

.venue-page .show-details-accordion summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 16px;
  min-height: 52px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
}

.venue-page .show-details-accordion summary::-webkit-details-marker {
  display: none;
}

.venue-page .show-details-accordion summary::after {
  content: "+";
  margin-left: 10px;
  color: #6e6e73;
  font-size: 1.1rem;
  line-height: 1;
}

.venue-page .show-details-accordion details[open] > summary::after {
  content: "-";
}

.venue-page .show-details-accordion .section-cost-indicator {
  margin-left: auto;
  font-size: 0.76rem;
  font-weight: 600;
  color: #b42318;
  border: 1px solid #f2b8b5;
  background: #fff1f1;
  padding: 2px 8px;
  line-height: 1.3;
}

.venue-page .show-details-accordion .section-cost-indicator.is-income {
  color: #067647;
  border-color: #a6f4c5;
  background: #ecfdf3;
}

.venue-page .show-details-accordion .section-cost-indicator.is-empty {
  visibility: hidden;
  border-color: transparent;
  background: transparent;
  padding: 0;
  min-width: 0;
}

.venue-page .show-details-accordion .section-cost-indicator-group {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.venue-page .show-details-accordion .section-cost-indicator-group .section-cost-indicator {
  margin-left: 0;
}

.venue-page .show-details-panel {
  padding: 0 16px 16px;
}

.venue-page .show-details-subaccordion {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
  margin-right: -16px;
}

.venue-page .show-details-subaccordion details > summary {
  list-style: none;
  cursor: pointer;
  padding: 12px 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

.venue-page .show-details-subaccordion details > summary::-webkit-details-marker {
  display: none;
}

.venue-page .show-details-subaccordion details > summary::after {
  content: "+";
  margin-left: 10px;
  color: #6e6e73;
  font-size: 1.05rem;
  line-height: 1;
}

.venue-page .show-details-subaccordion details[open] > summary::after {
  content: "-";
}

.venue-page .show-details-subaccordion .section-cost-indicator {
  margin-left: auto;
  font-size: 0.76rem;
  font-weight: 600;
  color: #b42318;
  border: 1px solid #f2b8b5;
  background: #fff1f1;
  padding: 2px 8px;
  line-height: 1.3;
}

.venue-page .show-details-subaccordion .section-cost-indicator.is-income {
  color: #067647;
  border-color: #a6f4c5;
  background: #ecfdf3;
}

.venue-page .show-details-subaccordion .section-cost-indicator.is-empty {
  visibility: hidden;
  border-color: transparent;
  background: transparent;
  padding: 0;
  min-width: 0;
}

.venue-page #show-details-sections .theatre-top-tabs {
  display: flex;
  justify-content: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.venue-page #show-details-sections .theatre-top-tabs .summary-item {
  flex: 0 0 220px;
  max-width: 220px;
}

@media (max-width: 900px) {
  .venue-page #show-details-sections .theatre-top-tabs {
    flex-wrap: wrap;
    justify-content: flex-start;
  }
}

.venue-page #show-details-sections .theatre-tab-fields {
  margin-top: 4px;
  gap: 12px;
}

.venue-page #show-details-sections .theatre-tab-fields label {
  font-family: var(--font-body);
  font-size: 0.86rem;
  color: #3f4650;
  gap: 8px;
}

.venue-page #show-details-sections .theatre-tab-fields input,
.venue-page #show-details-sections .theatre-tab-fields select {
  font-family: var(--font-body);
  font-size: 0.88rem;
  border: 1px solid #d9dde3;
  border-radius: 0;
  padding: 12px;
  color: #1d1d1f;
  background: #fff;
  box-shadow: none;
}

.venue-page #show-details-sections .theatre-tab-fields input[readonly] {
  background: #f7f8fa;
  color: #4b5563;
}

.venue-page #show-details-sections .theatre-tab-fields .transfer-list {
  margin-top: 8px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.venue-page #show-details-sections .theatre-tab-fields #deal-type-field {
  grid-column: 1;
}

.venue-page #show-details-sections .theatre-tab-fields #venue-vat-field {
  grid-column: 2;
}

.venue-page #show-details-sections .theatre-tab-fields #hire-cost-field {
  grid-column: 1;
}

.venue-page #show-details-sections .theatre-tab-fields #hire-cost-remaining-field {
  grid-column: 2;
}

.venue-page #show-details-sections .theatre-tab-fields #hire-remaining-due-field {
  grid-column: 1;
}

.venue-page #show-details-sections .theatre-tab-fields #hire-remaining-due-date-field {
  grid-column: 2;
}

.venue-page #show-details-sections .theatre-tab-fields .transferred-hire-field {
  grid-column: 1 / -1;
}

.venue-page #show-details-sections .shows-tickets-fields {
  margin-top: 4px;
  gap: 12px;
}

.venue-page #show-details-sections .shows-tickets-fields label {
  font-family: var(--font-body);
  font-size: 0.86rem;
  color: #3f4650;
  gap: 8px;
}

.venue-page #show-details-sections .shows-tickets-fields input,
.venue-page #show-details-sections .shows-tickets-fields select {
  font-family: var(--font-body);
  font-size: 0.88rem;
  border: 1px solid #d9dde3;
  border-radius: 0;
  padding: 12px;
  color: #1d1d1f;
  background: #fff;
  box-shadow: none;
}

.venue-page #show-details-sections .shows-ticket-metrics {
  margin-bottom: 10px;
}

.venue-page #show-details-sections .contacts-table-wrap {
  margin-top: 4px;
}

.venue-page #show-details-sections .contacts-table-wrap .table-row {
  grid-template-columns: 1.1fr 1.2fr 1fr auto;
  gap: 8px;
}

.venue-page #show-details-sections .contacts-table-wrap .table-row.header {
  font-size: 0.8rem;
}

.venue-page #show-details-sections .contacts-table-wrap input {
  font-family: var(--font-body);
  font-size: 0.88rem;
  border: 1px solid #d9dde3;
  border-radius: 0;
  padding: 10px;
  color: #1d1d1f;
  background: #fff;
  box-shadow: none;
}

.venue-page #show-details-sections .contacts-table-wrap .remove-row {
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid #d9dde3;
  border-radius: 0;
  background: #fff;
  color: #1d1d1f;
  box-shadow: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.venue-page #show-details-sections .contact-add-button {
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid #d9dde3;
  border-radius: 0;
  background: #fff;
  color: #1d1d1f;
  box-shadow: none;
}

.venue-page #show-details-sections .contacts-table-wrap .remove-row:hover,
.venue-page #show-details-sections .contact-add-button:hover {
  border-color: #c8ced8;
  background: #f8fafc;
}

.venue-page #show-details-sections .settlement-subsection {
  padding-right: 16px;
}

.venue-page #show-details-sections .settlement-fields {
  margin-top: 4px;
  gap: 12px;
}

.venue-page #show-details-sections .settlement-fields label {
  font-family: var(--font-body);
  font-size: 0.86rem;
  color: #3f4650;
  gap: 8px;
}

.venue-page #show-details-sections .settlement-fields input,
.venue-page #show-details-sections .settlement-fields select {
  font-family: var(--font-body);
  font-size: 0.88rem;
  border: 1px solid #d9dde3;
  border-radius: 0;
  padding: 12px;
  color: #1d1d1f;
  background: #fff;
  box-shadow: none;
}

.venue-page #show-details-sections .profit-inclusions-subsection {
  padding-right: 16px;
}

.venue-page #show-details-sections .profit-inclusions-subsection .summary-grid {
  margin-top: 8px;
}

.venue-page #show-details-sections .profit-inclusions-subsection .profit-inclusion-item {
  border: 1px solid #d9dde3;
  border-radius: 0;
  box-shadow: none;
  padding: 10px 12px;
  gap: 8px;
}

.venue-page #show-details-sections .profit-inclusions-subsection .profit-inclusion-item .label {
  display: block;
  font-family: var(--font-body);
  font-size: 0.82rem;
  line-height: 1.25;
  min-height: calc(1.25em * 2);
  color: #3f4650;
}

.venue-page #show-details-sections .profit-inclusions-subsection .profit-inclusion-item select {
  width: 100%;
  max-width: none;
  font-family: var(--font-body);
  font-size: 0.88rem;
  border: 1px solid #d9dde3;
  border-radius: 0;
  padding: 10px 12px;
  color: #1d1d1f;
  background: #fff;
  box-shadow: none;
}

.venue-page #show-details-sections .shows-times-subsection {
  padding-right: 16px;
}

.venue-page #show-details-sections .shows-times-subsection .subsection-header {
  justify-content: flex-start;
  margin-bottom: 8px;
  padding-right: 0;
}

.venue-page #show-details-sections .shows-times-table-wrap {
  display: grid;
  gap: 0;
  border: 1px solid #d9dde3;
  width: 100%;
  margin-right: 0;
}

.venue-page #show-details-sections .shows-times-subsection .ghost {
  background: #fff;
  color: #1d1d1f;
  border: 1px solid #d9dde3;
  border-radius: 0;
  box-shadow: none;
  padding: 9px 12px;
}

.venue-page #show-details-sections .shows-times-subsection .ghost:hover {
  transform: none;
  background: #fff;
}

.venue-page #show-details-sections .theatre-charges-subsection {
  padding-right: 16px;
}

.venue-page #show-details-sections .theatre-charges-subsection .subsection-header {
  justify-content: flex-start;
  margin-bottom: 8px;
  padding-right: 0;
}

.venue-page #show-details-sections .theatre-charges-subaccordion {
  margin-bottom: 8px;
}

.venue-page #show-details-sections .theatre-charges-subsection .ghost {
  background: #fff;
  color: #1d1d1f;
  border: 1px solid #d9dde3;
  border-radius: 0;
  box-shadow: none;
  padding: 9px 12px;
}

.venue-page #show-details-sections .theatre-charges-subsection .ghost:hover {
  transform: none;
  background: #fff;
}

.venue-page #show-details-sections .theatre-charges-table-wrap {
  display: grid;
  gap: 0;
  border: 1px solid #d9dde3;
  width: 100%;
}

.venue-page #show-details-sections #theatre-charges .table-row {
  min-width: 0;
  gap: 0;
  grid-template-columns: 1.4fr 1fr 0.8fr 130px;
}

.venue-page #show-details-sections #theatre-other-charges .table-row {
  min-width: 0;
  gap: 0;
  grid-template-columns: 1.4fr 0.9fr 0.8fr 130px;
}

.venue-page #show-details-sections #theatre-charges .table-row.header,
.venue-page #show-details-sections #theatre-other-charges .table-row.header {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #6e6e73;
  background: #f8f9fb;
  border-bottom: 1px solid #d9dde3;
}

.venue-page #show-details-sections #theatre-charges .table-row > *,
.venue-page #show-details-sections #theatre-other-charges .table-row > * {
  padding: 8px 10px;
}

.venue-page #show-details-sections #theatre-charges .table-row:not(.header),
.venue-page #show-details-sections #theatre-other-charges .table-row:not(.header) {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  border-bottom: 1px solid #d9dde3;
  background: #fff;
}

.venue-page #show-details-sections #theatre-charges .table-row:last-child,
.venue-page #show-details-sections #theatre-other-charges .table-row:last-child {
  border-bottom: 0;
}

.venue-page #show-details-sections #theatre-charges .table-row input,
.venue-page #show-details-sections #theatre-charges .table-row select,
.venue-page #show-details-sections #theatre-other-charges .table-row input,
.venue-page #show-details-sections #theatre-other-charges .table-row select {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  font-size: 0.88rem;
  background: #fff;
  padding: 0;
}

.venue-page #show-details-sections #theatre-charges .table-row input,
.venue-page #show-details-sections #theatre-charges .table-row select,
.venue-page #show-details-sections #theatre-other-charges .table-row input,
.venue-page #show-details-sections #theatre-other-charges .table-row select {
  padding: 8px 10px;
}

.venue-page #show-details-sections .theatre-charges-subsection .totals {
  margin-top: 8px;
}

.venue-page #show-details-sections .theatre-documents-subsection {
  padding-right: 16px;
}

.venue-page #show-details-sections .theatre-documents-subsection .subsection-header {
  justify-content: flex-start;
  margin-bottom: 8px;
  padding-right: 0;
  gap: 8px;
  flex-wrap: wrap;
}

.venue-page #show-details-sections .theatre-documents-subsection .ghost {
  background: #fff;
  color: #1d1d1f;
  border: 1px solid #d9dde3;
  border-radius: 0;
  box-shadow: none;
  padding: 9px 12px;
}

.venue-page #show-details-sections .theatre-documents-subsection .ghost:hover {
  transform: none;
  background: #fff;
}

.venue-page #show-details-sections .theatre-documents-table-wrap {
  display: grid;
  gap: 0;
  border: 1px solid #d9dde3;
  width: 100%;
}

.venue-page #show-details-sections #theatre-documents-table .table-row {
  min-width: 0;
  gap: 0;
  grid-template-columns: 1.1fr 0.8fr 0.7fr 1.5fr 96px;
}

.venue-page #show-details-sections #theatre-documents-table .table-row.header {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #6e6e73;
  background: #f8f9fb;
  border-bottom: 1px solid #d9dde3;
}

.venue-page #show-details-sections #theatre-documents-table .table-row > * {
  padding: 8px 10px;
}

.venue-page #show-details-sections #theatre-documents-table .table-row:not(.header) {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  border-bottom: 1px solid #d9dde3;
  background: #fff;
}

.venue-page #show-details-sections #theatre-documents-table .table-row:last-child {
  border-bottom: 0;
}

.venue-page #show-details-sections #theatre-documents-table .table-row input,
.venue-page #show-details-sections #theatre-documents-table .table-row select {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  font-size: 0.88rem;
  background: #fff;
  padding: 8px 10px;
}

.venue-page #show-details-sections #theatre-documents-table .theatre-document-ai-process {
  min-height: 34px;
  width: 100%;
}

.venue-page #show-details-sections #theatre-documents-table .theatre-document-date::-webkit-calendar-picker-indicator {
  opacity: 0;
  display: none;
  pointer-events: none;
}

.venue-page #show-details-sections #theatre-documents-table .theatre-document-file-cell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.venue-page #show-details-sections #theatre-documents-table .theatre-document-file-name {
  font-size: 0.84rem;
  color: #3f4650;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.venue-page #show-details-sections #theatre-documents-table .theatre-document-file-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.venue-page #show-details-sections #theatre-documents-table .table-row .ghost {
  width: auto;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
}

.venue-page #show-details-sections #theatre-documents-table .table-row .ghost.remove-row {
  justify-self: start;
  margin-right: 0;
}

.venue-page #show-details-sections .theatre-documents-ai-subaccordion {
  margin-top: 12px;
}

.venue-page #show-details-sections .theatre-documents-ai-subaccordion > details > summary {
  font-family: var(--font-display);
  font-size: 0.9rem;
}

.venue-page #show-details-sections .theatre-documents-ai-results-subsection {
  padding-right: 16px;
}

.venue-page #show-details-sections .theatre-documents-ai-results-table-wrap {
  display: grid;
  gap: 0;
  border: 1px solid #d9dde3;
  width: 100%;
}

.venue-page #show-details-sections #theatre-contract-ai-results-table .table-row {
  min-width: 0;
  gap: 0;
  grid-template-columns: 1.4fr 0.8fr 0.8fr 0.9fr 1fr 1fr 0.8fr 1fr 96px;
}

.venue-page #show-details-sections #theatre-contract-ai-results-table .table-row.header {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #6e6e73;
  background: #f8f9fb;
  border-bottom: 1px solid #d9dde3;
}

.venue-page #show-details-sections #theatre-contract-ai-results-table .table-row > * {
  padding: 8px 10px;
}

.venue-page #show-details-sections #theatre-contract-ai-results-table .table-row:not(.header) {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  border-bottom: 1px solid #d9dde3;
  background: #fff;
}

.venue-page #show-details-sections #theatre-contract-ai-results-table .table-row:last-child {
  border-bottom: 0;
}

.venue-page #show-details-sections #theatre-contract-ai-results-table .table-row input,
.venue-page #show-details-sections #theatre-contract-ai-results-table .table-row select {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  font-size: 0.88rem;
  background: #fff;
  padding: 8px 10px;
}

.venue-page #show-details-sections #theatre-contract-ai-results-table .table-row .ghost.remove-row {
  justify-self: start;
  margin-right: 0;
}

.venue-page #show-details-sections #theatre-contract-ai-results-table .table-row > :nth-child(2),
.venue-page #show-details-sections #theatre-contract-ai-results-table .table-row > :nth-child(3),
.venue-page #show-details-sections #theatre-contract-ai-results-table .table-row > :nth-child(7) {
  text-align: center;
}

.venue-page #show-details-sections #theatre-contract-ai-results-table .contract-ai-cost,
.venue-page #show-details-sections #theatre-contract-ai-results-table .contract-ai-percentage,
.venue-page #show-details-sections #theatre-contract-ai-results-table .contract-ai-confidence {
  text-align: center;
}

.venue-page #show-details-sections .shoutout-subsection {
  padding-right: 16px;
}

.venue-page #show-details-sections .shoutout-subsection .subsection-header {
  justify-content: flex-start;
  margin-bottom: 8px;
  padding-right: 0;
}

.venue-page #show-details-sections .shoutout-subsection .ghost {
  background: #fff;
  color: #1d1d1f;
  border: 1px solid #d9dde3;
  border-radius: 0;
  box-shadow: none;
  padding: 9px 12px;
}

.venue-page #show-details-sections .shoutout-subsection .ghost:hover {
  transform: none;
  background: #fff;
}

.venue-page #show-details-sections .shoutout-table-wrap {
  display: grid;
  gap: 0;
  border: 1px solid #d9dde3;
  width: 100%;
}

.venue-page #show-details-sections #shoutout-table .table-row {
  min-width: 0;
  gap: 0;
  grid-template-columns: 1fr 1.7fr 0.9fr 1fr 96px;
}

.venue-page #show-details-sections #shoutout-table .table-row.header {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #6e6e73;
  background: #f8f9fb;
  border-bottom: 1px solid #d9dde3;
}

.venue-page #show-details-sections #shoutout-table .table-row > * {
  padding: 8px 10px;
}

.venue-page #show-details-sections #shoutout-table .table-row:not(.header) {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  border-bottom: 1px solid #d9dde3;
  background: #fff;
}

.venue-page #show-details-sections #shoutout-table .table-row:last-child {
  border-bottom: 0;
}

.venue-page #show-details-sections #shoutout-table .table-row input,
.venue-page #show-details-sections #shoutout-table .table-row select {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  font-size: 0.88rem;
  background: #fff;
  padding: 8px 10px;
}

.venue-page #show-details-sections #shoutout-table .table-row .ghost {
  width: auto;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  border: 1px solid #d9dde3;
  border-radius: 0;
  box-shadow: none;
  background: #fff;
  color: #1d1d1f;
}

.venue-page #show-details-sections #shoutout-table .table-row .ghost.remove-row {
  justify-self: start;
  margin-right: 0;
}

.venue-page #show-details-sections .reimbursements-subsection {
  padding-right: 16px;
}

.venue-page #show-details-sections .reimbursements-subsection .subsection-header {
  justify-content: flex-start;
  margin-bottom: 8px;
  padding-right: 0;
}

.venue-page #show-details-sections .reimbursements-subsection .ghost {
  background: #fff;
  color: #1d1d1f;
  border: 1px solid #d9dde3;
  border-radius: 0;
  box-shadow: none;
  padding: 9px 12px;
}

.venue-page #show-details-sections .reimbursements-subsection .ghost:hover {
  transform: none;
  background: #fff;
}

.venue-page #show-details-sections .reimbursements-table-wrap {
  display: grid;
  gap: 0;
  border: 1px solid #d9dde3;
  width: 100%;
}

.venue-page #show-details-sections #payments-table .table-row {
  min-width: 0;
  gap: 0;
  grid-template-columns: 1.6fr 0.9fr 0.9fr 250px;
  align-items: center;
}

.venue-page #show-details-sections #payments-table .table-row.header {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #6e6e73;
  background: #f8f9fb;
  border-bottom: 1px solid #d9dde3;
}

.venue-page #show-details-sections #payments-table .table-row > * {
  padding: 8px 10px;
}

.venue-page #show-details-sections #payments-table .table-row:not(.header) {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  border-bottom: 1px solid #d9dde3;
  background: #fff;
}

.venue-page #show-details-sections #payments-table .table-row:last-child {
  border-bottom: 0;
}

.venue-page #show-details-sections #payments-table .table-row.status-danger {
  background: #fff5f5;
}

.venue-page #show-details-sections #payments-table .table-row.status-warning {
  background: #fffbeb;
}

.venue-page #show-details-sections #payments-table .table-row.status-good {
  background: #f0fdf4;
}

.venue-page #show-details-sections #payments-table .table-row.status-danger > *,
.venue-page #show-details-sections #payments-table .table-row.status-warning > *,
.venue-page #show-details-sections #payments-table .table-row.status-good > * {
  background: transparent;
}

.venue-page #show-details-sections #payments-table .table-row input,
.venue-page #show-details-sections #payments-table .table-row select {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  font-size: 0.88rem;
  background: #fff;
  padding: 8px 10px;
}

.venue-page #show-details-sections #payments-table .table-row.status-danger input,
.venue-page #show-details-sections #payments-table .table-row.status-danger select,
.venue-page #show-details-sections #payments-table .table-row.status-warning input,
.venue-page #show-details-sections #payments-table .table-row.status-warning select,
.venue-page #show-details-sections #payments-table .table-row.status-good input,
.venue-page #show-details-sections #payments-table .table-row.status-good select {
  background: transparent;
}

.venue-page #show-details-sections #payments-table .payment-amount {
  text-align: center;
}

.venue-page #show-details-sections #payments-table .table-row > :nth-child(2),
.venue-page #show-details-sections #payments-table .table-row > :nth-child(3) {
  text-align: center;
}

.venue-page #show-details-sections #payments-table .payment-by {
  text-align: center;
  text-align-last: center;
}

.venue-page #show-details-sections #payments-table .table-row .row-actions {
  justify-self: end;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 8px;
  padding-right: 10px;
}

.venue-page #show-details-sections #payments-table .table-row .ghost {
  width: auto;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  border: 1px solid #d9dde3;
  border-radius: 0;
  box-shadow: none;
  background: #fff;
  color: #1d1d1f;
  white-space: nowrap;
}

.venue-page #show-details-sections .profit-assignments-subsection {
  padding-right: 16px;
}

.venue-page #show-details-sections .profit-assignments-subsection .subsection-header {
  justify-content: flex-start;
  margin-bottom: 8px;
  padding-right: 0;
}

.venue-page #show-details-sections .profit-assignments-subsection .subsection-header .header-actions {
  margin-left: 0;
}

.venue-page #show-details-sections .profit-assignments-subsection .ghost {
  background: #fff;
  color: #1d1d1f;
  border: 1px solid #d9dde3;
  border-radius: 0;
  box-shadow: none;
  padding: 9px 12px;
}

.venue-page #show-details-sections .profit-assignments-subsection .ghost:hover {
  transform: none;
  background: #fff;
}

.venue-page #show-details-sections .profit-assignments-table-wrap {
  display: grid;
  gap: 0;
  border: 1px solid #d9dde3;
  width: 100%;
}

.venue-page #show-details-sections #profit-assignments-predefined-table .table-row {
  min-width: 0;
  gap: 0;
  grid-template-columns: 1.2fr 1.2fr 1.2fr 0.8fr 0.9fr 160px;
  align-items: center;
}

.venue-page #show-details-sections #profit-assignments-custom-table .table-row {
  min-width: 0;
  gap: 0;
  grid-template-columns: 1.6fr 0.8fr 0.9fr 160px;
  align-items: center;
}

.venue-page #show-details-sections #profit-assignments-predefined-table .table-row.header,
.venue-page #show-details-sections #profit-assignments-custom-table .table-row.header {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #6e6e73;
  background: #f8f9fb;
  border-bottom: 1px solid #d9dde3;
}

.venue-page #show-details-sections #profit-assignments-predefined-table .table-row > *,
.venue-page #show-details-sections #profit-assignments-custom-table .table-row > * {
  padding: 8px 10px;
}

.venue-page #show-details-sections #profit-assignments-predefined-table .table-row:not(.header),
.venue-page #show-details-sections #profit-assignments-custom-table .table-row:not(.header) {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  border-bottom: 1px solid #d9dde3;
  background: #fff;
}

.venue-page #show-details-sections #profit-assignments-predefined-table .table-row:last-child,
.venue-page #show-details-sections #profit-assignments-custom-table .table-row:last-child {
  border-bottom: 0;
}

.venue-page #show-details-sections #profit-assignments-predefined-table .table-row input,
.venue-page #show-details-sections #profit-assignments-predefined-table .table-row select,
.venue-page #show-details-sections #profit-assignments-custom-table .table-row input,
.venue-page #show-details-sections #profit-assignments-custom-table .table-row select {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  font-size: 0.88rem;
  background: #fff;
  padding: 8px 10px;
}

.venue-page #show-details-sections #profit-assignments-predefined-table .table-row > :nth-child(4),
.venue-page #show-details-sections #profit-assignments-predefined-table .table-row > :nth-child(5) {
  text-align: center;
}

.venue-page #show-details-sections #profit-assignments-custom-table .table-row > :nth-child(2),
.venue-page #show-details-sections #profit-assignments-custom-table .table-row > :nth-child(3) {
  text-align: center;
}

.venue-page #show-details-sections #profit-assignments-predefined-table .assignment-amount,
.venue-page #show-details-sections #profit-assignments-custom-table .assignment-amount {
  text-align: center;
}

.venue-page #show-details-sections #profit-assignments-predefined-table .table-row .ghost,
.venue-page #show-details-sections #profit-assignments-custom-table .table-row .ghost {
  width: auto;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  border: 1px solid #d9dde3;
  border-radius: 0;
  box-shadow: none;
  background: #fff;
  color: #1d1d1f;
}

.venue-page #show-details-sections #profit-assignments-predefined-table .assignment-complete,
.venue-page #show-details-sections #profit-assignments-custom-table .assignment-complete {
  justify-self: center;
}

.venue-page #show-details-sections #profit-assignments-predefined-table .table-row .ghost.remove-row,
.venue-page #show-details-sections #profit-assignments-custom-table .table-row .ghost.remove-row {
  justify-self: end;
  margin-left: 10px;
  margin-right: 10px;
}

.venue-page #show-details-sections .profit-assignments-table .table-row.completed {
  border-radius: 0;
  background: #f0fdf4;
  border: 0;
  border-bottom: 1px solid #d9dde3;
}

.venue-page #show-details-sections .technical-specs-subsection,
.venue-page #show-details-sections .technical-crew-subsection {
  padding-right: 16px;
}

.venue-page #show-details-sections .technical-crew-charges-subsection,
.venue-page #show-details-sections .technical-timings-subsection,
.venue-page #show-details-sections .technical-production-subsection {
  padding-right: 16px;
}

.venue-page #show-details-sections .technical-fields {
  margin-top: 4px;
  gap: 12px;
}

.venue-page #show-details-sections .technical-fields label {
  font-family: var(--font-body);
  font-size: 0.86rem;
  color: #3f4650;
  gap: 8px;
}

.venue-page #show-details-sections .technical-fields input,
.venue-page #show-details-sections .technical-fields select {
  font-family: var(--font-body);
  font-size: 0.88rem;
  border: 1px solid #d9dde3;
  border-radius: 0;
  padding: 12px;
  color: #1d1d1f;
  background: #fff;
  box-shadow: none;
}

.venue-page #show-details-sections #get-in-time::-webkit-calendar-picker-indicator {
  opacity: 0;
  display: none;
  pointer-events: none;
}

.venue-page #show-details-sections #crew-getout-rate-first-two[readonly],
.venue-page #show-details-sections #crew-getout-rate-additional[readonly] {
  background: #f7f8fa;
  color: #4b5563;
}

.venue-page #show-details-sections .technical-specs-subsection .subsection-header,
.venue-page #show-details-sections .technical-crew-subsection .subsection-header {
  justify-content: flex-start;
  margin-bottom: 8px;
  padding-right: 0;
}

.venue-page #show-details-sections .technical-crew-actions {
  margin: 8px 0 8px;
}

.venue-page #show-details-sections .technical-specs-subsection .ghost,
.venue-page #show-details-sections .technical-crew-subsection .ghost {
  background: #fff;
  color: #1d1d1f;
  border: 1px solid #d9dde3;
  border-radius: 0;
  box-shadow: none;
  padding: 9px 12px;
}

.venue-page #show-details-sections .technical-specs-subsection .ghost:hover,
.venue-page #show-details-sections .technical-crew-subsection .ghost:hover {
  transform: none;
  background: #fff;
}

.venue-page #show-details-sections .technical-specs-table-wrap,
.venue-page #show-details-sections .technical-crew-table-wrap {
  display: grid;
  gap: 0;
  border: 1px solid #d9dde3;
  width: 100%;
}

.venue-page #show-details-sections #technical-specs-table .table-row {
  min-width: 0;
  gap: 0;
  grid-template-columns: 1.2fr 0.8fr 1.5fr 96px;
}

.venue-page #show-details-sections #technical-specs-table .table-row.header,
.venue-page #show-details-sections #crew-shifts .table-row.header {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #6e6e73;
  background: #f8f9fb;
  border-bottom: 1px solid #d9dde3;
}

.venue-page #show-details-sections #technical-specs-table .table-row > *,
.venue-page #show-details-sections #crew-shifts .table-row > * {
  padding: 8px 10px;
}

.venue-page #show-details-sections #technical-specs-table .table-row:not(.header),
.venue-page #show-details-sections #crew-shifts .table-row:not(.header) {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  border-bottom: 1px solid #d9dde3;
  background: #fff;
}

.venue-page #show-details-sections #technical-specs-table .table-row:last-child,
.venue-page #show-details-sections #crew-shifts .table-row:last-child {
  border-bottom: 0;
}

.venue-page #show-details-sections #technical-specs-table .table-row input,
.venue-page #show-details-sections #crew-shifts .table-row input {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  font-size: 0.88rem;
  background: #fff;
  padding: 8px 10px;
}

.venue-page #show-details-sections #technical-specs-table .technical-spec-file-cell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.venue-page #show-details-sections #technical-specs-table .technical-spec-file-name {
  font-size: 0.84rem;
  color: #3f4650;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.venue-page #show-details-sections #technical-specs-table .technical-spec-file-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.venue-page #show-details-sections #technical-specs-table .table-row .ghost,
.venue-page #show-details-sections #crew-shifts .table-row .ghost {
  width: auto;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
}

.venue-page #show-details-sections #technical-specs-table .table-row .ghost.remove-row,
.venue-page #show-details-sections #crew-shifts .table-row .ghost.remove-row {
  justify-self: start;
  margin-right: 0;
}

.venue-page #show-details-sections #crew-shifts .table-row {
  min-width: 0;
  gap: 0;
  grid-template-columns: 1fr 1fr 1fr 96px;
}

.venue-page #show-details-sections #crew-shifts {
  margin-top: 0;
}

.venue-page #show-details-sections #crew-shifts .table-row + .table-row {
  margin-top: 0;
}

.venue-page #show-details-sections #crew-shifts .crew-start::-webkit-calendar-picker-indicator {
  opacity: 0;
  display: none;
  pointer-events: none;
}

.venue-page #show-details-sections .marketing-materials-subsection,
.venue-page #show-details-sections .marketing-costs-subsection,
.venue-page #show-details-sections .marketing-influencers-subsection,
.venue-page #show-details-sections .marketing-local-companies-subsection,
.venue-page #show-details-sections .marketing-ai-subsection,
.venue-page #show-details-sections .marketing-facebook-subsection {
  padding-right: 16px;
}

.venue-page #show-details-sections .marketing-materials-subsection .subsection-header,
.venue-page #show-details-sections .marketing-costs-subsection .subsection-header,
.venue-page #show-details-sections .marketing-influencers-subsection .subsection-header,
.venue-page #show-details-sections .marketing-local-companies-subsection .subsection-header,
.venue-page #show-details-sections .marketing-ai-subsection .subsection-header,
.venue-page #show-details-sections .marketing-facebook-subsection .subsection-header {
  justify-content: flex-start;
  margin-bottom: 8px;
  padding-right: 0;
}

.venue-page #show-details-sections .marketing-facebook-subsection .subsection-header {
  justify-content: space-between;
}

.venue-page #show-details-sections .marketing-facebook-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.venue-page #show-details-sections .marketing-facebook-pills {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.venue-page #show-details-sections .marketing-materials-subsection .ghost,
.venue-page #show-details-sections .marketing-costs-subsection .ghost,
.venue-page #show-details-sections .marketing-influencers-subsection .ghost,
.venue-page #show-details-sections .marketing-local-companies-subsection .ghost,
.venue-page #show-details-sections .marketing-ai-subsection .ghost,
.venue-page #show-details-sections .marketing-facebook-subsection .ghost,
.venue-page #show-details-sections .marketing-facebook-groups-subsection .ghost {
  background: #fff;
  color: #1d1d1f;
  border: 1px solid #d9dde3;
  border-radius: 0;
  box-shadow: none;
  padding: 9px 12px;
}

.venue-page #show-details-sections .marketing-materials-subsection .ghost:hover,
.venue-page #show-details-sections .marketing-costs-subsection .ghost:hover,
.venue-page #show-details-sections .marketing-influencers-subsection .ghost:hover,
.venue-page #show-details-sections .marketing-local-companies-subsection .ghost:hover,
.venue-page #show-details-sections .marketing-ai-subsection .ghost:hover,
.venue-page #show-details-sections .marketing-facebook-subsection .ghost:hover,
.venue-page #show-details-sections .marketing-facebook-groups-subsection .ghost:hover {
  transform: none;
  background: #fff;
}

.venue-page #show-details-sections .marketing-facebook-groups-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.venue-page #show-details-sections .marketing-facebook-groups-ai-feedback {
  margin-left: auto;
  display: grid;
  gap: 6px;
  min-width: min(28rem, 100%);
}

.venue-page #show-details-sections #facebook-groups-ai-status,
.venue-page #show-details-sections #facebook-groups-ai-detail {
  text-align: right;
}

.venue-page #show-details-sections .facebook-groups-ai-progress {
  position: relative;
  width: 100%;
  height: 8px;
  border: 1px solid #d9dde3;
  background: #f3f4f6;
  overflow: hidden;
}

.venue-page #show-details-sections .facebook-groups-ai-progress-bar {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #111827, #4b5563);
  transition: width 220ms ease;
}

.venue-page #show-details-sections .marketing-materials-table-wrap,
.venue-page #show-details-sections .marketing-facebook-table-wrap,
.venue-page #show-details-sections .marketing-contacts-table-wrap {
  display: grid;
  gap: 0;
  border: 1px solid #d9dde3;
  width: 100%;
}

.venue-page #show-details-sections #physical-materials-table .table-row {
  min-width: 0;
  gap: 0;
  grid-template-columns: 1.2fr 0.8fr 0.9fr 0.8fr 0.8fr 96px;
}

.venue-page #show-details-sections #facebook-budget-table .table-row {
  min-width: 0;
  gap: 0;
  grid-template-columns: 0.7fr 1fr 1fr 1fr 1fr;
}

.venue-page #show-details-sections #marketing-costs .table-row {
  min-width: 0;
  gap: 0;
  grid-template-columns: 1.2fr 0.8fr 0.7fr 96px;
}

.venue-page #show-details-sections #marketing-influencers-table .table-row,
.venue-page #show-details-sections #marketing-local-companies-table .table-row {
  min-width: 0;
  gap: 0;
  grid-template-columns: 1fr 1.7fr 1.2fr 0.9fr 0.9fr 0.5fr 0.7fr 0.7fr 96px;
  align-items: center;
  min-height: 0;
}

.venue-page #show-details-sections #facebook-groups-table .table-row {
  min-width: 0;
  gap: 0;
  grid-template-columns: 0.9fr 1.1fr 1.1fr 1.25fr 0.95fr 96px;
  align-items: center;
  min-height: 0;
}

.venue-page #show-details-sections #facebook-group-posts-table .table-row {
  min-width: 0;
  gap: 0;
  grid-template-columns: 0.9fr 1.7fr 1.1fr 96px;
  align-items: stretch;
  min-height: 0;
}

.venue-page #show-details-sections #physical-materials-table .table-row.header,
.venue-page #show-details-sections #facebook-budget-table .table-row.header,
.venue-page #show-details-sections #marketing-costs .table-row.header,
.venue-page #show-details-sections #marketing-influencers-table .table-row.header,
.venue-page #show-details-sections #marketing-local-companies-table .table-row.header,
.venue-page #show-details-sections #facebook-groups-table .table-row.header,
.venue-page #show-details-sections #facebook-group-posts-table .table-row.header {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #6e6e73;
  background: #f8f9fb;
  border-bottom: 1px solid #d9dde3;
}

.venue-page #show-details-sections #physical-materials-table .table-row > *,
.venue-page #show-details-sections #facebook-budget-table .table-row > *,
.venue-page #show-details-sections #marketing-costs .table-row > *,
.venue-page #show-details-sections #marketing-influencers-table .table-row > *,
.venue-page #show-details-sections #marketing-local-companies-table .table-row > *,
.venue-page #show-details-sections #facebook-groups-table .table-row > *,
.venue-page #show-details-sections #facebook-group-posts-table .table-row > * {
  padding: 8px 10px;
  line-height: 1.2;
}

.venue-page #show-details-sections #marketing-influencers-table .table-row.header > *,
.venue-page #show-details-sections #marketing-local-companies-table .table-row.header > * {
  white-space: nowrap;
}

.venue-page #show-details-sections #physical-materials-table .table-row:not(.header),
.venue-page #show-details-sections #facebook-budget-table .table-row:not(.header),
.venue-page #show-details-sections #marketing-costs .table-row:not(.header),
.venue-page #show-details-sections #marketing-influencers-table .table-row:not(.header),
.venue-page #show-details-sections #marketing-local-companies-table .table-row:not(.header),
.venue-page #show-details-sections #facebook-groups-table .table-row:not(.header),
.venue-page #show-details-sections #facebook-group-posts-table .table-row:not(.header) {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  border-bottom: 1px solid #d9dde3;
  background: #fff;
}

.venue-page #show-details-sections #physical-materials-table .table-row:last-child,
.venue-page #show-details-sections #facebook-budget-table .table-row:last-child,
.venue-page #show-details-sections #marketing-costs .table-row:last-child,
.venue-page #show-details-sections #marketing-influencers-table .table-row:last-child,
.venue-page #show-details-sections #marketing-local-companies-table .table-row:last-child,
.venue-page #show-details-sections #facebook-groups-table .table-row:last-child,
.venue-page #show-details-sections #facebook-group-posts-table .table-row:last-child {
  border-bottom: 0;
}

.venue-page #show-details-sections #physical-materials-table .table-row input,
.venue-page #show-details-sections #marketing-costs .table-row input,
.venue-page #show-details-sections #marketing-costs .table-row select {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  font-size: 0.88rem;
  background: #fff;
  padding: 8px 10px;
}

.venue-page #show-details-sections #physical-materials-table .table-row .ghost,
.venue-page #show-details-sections #marketing-costs .table-row .ghost,
.venue-page #show-details-sections #marketing-influencers-table .table-row .ghost,
.venue-page #show-details-sections #marketing-local-companies-table .table-row .ghost,
.venue-page #show-details-sections #facebook-groups-table .table-row .ghost,
.venue-page #show-details-sections #facebook-group-posts-table .table-row .ghost {
  width: auto;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
}

.venue-page #show-details-sections #physical-materials-table .table-row .ghost.remove-row,
.venue-page #show-details-sections #marketing-costs .table-row .ghost.remove-row,
.venue-page #show-details-sections #marketing-influencers-table .table-row .ghost.remove-row,
.venue-page #show-details-sections #marketing-local-companies-table .table-row .ghost.remove-row,
.venue-page #show-details-sections #facebook-groups-table .table-row .ghost.remove-row,
.venue-page #show-details-sections #facebook-group-posts-table .table-row .ghost.remove-row {
  justify-self: end;
  margin-right: 10px;
}

.venue-page #show-details-sections #marketing-influencers-table .table-row:not(.header) > :last-child,
.venue-page #show-details-sections #marketing-local-companies-table .table-row:not(.header) > :last-child,
.venue-page #show-details-sections #facebook-groups-table .table-row:not(.header) > :last-child,
.venue-page #show-details-sections #facebook-group-posts-table .table-row:not(.header) > :last-child {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.venue-page #show-details-sections #marketing-influencers-table .table-row:not(.header),
.venue-page #show-details-sections #marketing-local-companies-table .table-row:not(.header),
.venue-page #show-details-sections #facebook-groups-table .table-row:not(.header) {
  cursor: pointer;
}

.venue-page #show-details-sections #facebook-group-posts-table .table-row:not(.header) {
  cursor: default;
}

.venue-page #show-details-sections #facebook-group-posts-table input,
.venue-page #show-details-sections #facebook-group-posts-table textarea {
  width: 100%;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  font-size: 0.88rem;
  background: #fff;
  padding: 8px 10px;
}

.venue-page #show-details-sections #facebook-group-posts-table textarea {
  resize: vertical;
  min-height: 92px;
}

.venue-page #show-details-sections #facebook-group-posts-table .facebook-group-post-media-cell {
  display: grid;
  gap: 8px;
  align-content: start;
}

.venue-page #show-details-sections #facebook-group-posts-table .facebook-group-post-media-cell select {
  width: 100%;
  border: 1px solid #d9dde3;
  border-radius: 0;
  box-shadow: none;
  font-size: 0.88rem;
  background: #fff;
  padding: 8px 10px;
}

.venue-page #show-details-sections #facebook-group-posts-table .facebook-group-post-media-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.venue-page #show-details-sections #facebook-group-posts-table .facebook-group-post-media-preview {
  width: min(180px, 100%);
  aspect-ratio: 1 / 1;
  border: 1px solid #d9dde3;
  background: #f8f9fb;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.venue-page #show-details-sections #facebook-group-posts-table .facebook-group-post-media-preview img,
.venue-page #show-details-sections #facebook-group-posts-table .facebook-group-post-media-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.venue-page #show-details-sections #facebook-group-posts-table .facebook-group-post-media-empty {
  padding: 12px;
  text-align: center;
  font-size: 0.78rem;
  color: #6e6e73;
}

.venue-page #show-details-sections #facebook-group-posts-table .facebook-group-post-media-meta {
  font-size: 0.78rem;
  color: #6e6e73;
  line-height: 1.3;
  word-break: break-word;
}

.venue-page #show-details-sections #facebook-groups-table .table-row.facebook-group-outstanding-today {
  background: #fef2f2;
}

.venue-page #show-details-sections #facebook-groups-table .table-row.facebook-group-outstanding-today > * {
  color: #991b1b;
}

.venue-page #show-details-sections #marketing-influencers-table .contact-cell,
.venue-page #show-details-sections #marketing-local-companies-table .contact-cell {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.2;
}

.venue-page #show-details-sections #facebook-groups-table .facebook-group-cell {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.2;
}

.venue-page #show-details-sections #facebook-groups-table .facebook-group-rules-text {
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.3;
}

.venue-page #show-details-sections #facebook-groups-table .facebook-group-url-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-width: 0;
}

.venue-page #show-details-sections #facebook-groups-table .facebook-group-url-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.venue-page #show-details-sections #facebook-groups-table .facebook-group-open-link {
  min-width: 28px;
  min-height: 28px;
  padding: 4px 6px;
  line-height: 1;
  font-size: 0.95rem;
}

.venue-page #show-details-sections #facebook-groups-table .facebook-group-next-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 20px;
  width: 100%;
  min-width: 0;
  overflow: hidden;
}

.venue-page #show-details-sections #facebook-groups-table .facebook-group-next-date {
  flex: 0 1 auto;
  min-width: 0;
  white-space: nowrap;
}

.venue-page #show-details-sections #facebook-groups-table .facebook-group-next-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  white-space: nowrap;
  cursor: pointer;
  flex: 0 0 auto;
  margin-left: 0;
}

.venue-page #show-details-sections #facebook-groups-table .facebook-group-next-done {
  margin: 0;
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
  accent-color: #b91c1c;
  background: #fff;
  border: 1px solid #9ca3af;
  border-radius: 2px;
  cursor: pointer;
}

.venue-page #show-details-sections .marketing-facebook-group-logs-subsection {
  display: grid;
  gap: 12px;
}

.venue-page #show-details-sections .facebook-group-logs-list {
  display: grid;
  gap: 0;
}

.venue-page #show-details-sections .facebook-group-log-item {
  border: 1px solid #d9dde3;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}

.venue-page #show-details-sections .facebook-group-log-item + .facebook-group-log-item {
  border-top: 0;
}

.venue-page #show-details-sections .facebook-group-log-item > summary {
  list-style: none;
}

.venue-page #show-details-sections .facebook-group-log-item > summary::marker {
  content: "";
}

.venue-page #show-details-sections .facebook-group-log-item > summary::-webkit-details-marker {
  display: none;
}

.venue-page #show-details-sections .facebook-group-log-item > summary::after {
  content: none;
}

.venue-page #show-details-sections .facebook-group-log-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  cursor: pointer;
  font-size: 0.88rem;
  list-style: none;
}

.venue-page #show-details-sections .facebook-group-log-summary-name {
  font-weight: 600;
  color: #1d1d1f;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.venue-page #show-details-sections .facebook-group-log-summary-right {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 0 0 auto;
}

.venue-page #show-details-sections .facebook-group-log-summary-stats {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.venue-page #show-details-sections .facebook-group-log-summary-metric {
  color: #3f4650;
  white-space: nowrap;
}

.venue-page #show-details-sections .facebook-group-log-summary-metric strong {
  color: #1d1d1f;
  font-weight: 600;
}

.venue-page #show-details-sections .facebook-group-log-summary-toggle {
  flex: 0 0 auto;
  width: 24px;
  text-align: center;
  font-size: 1rem;
  line-height: 1;
  color: #7f1d1d;
}

.venue-page #show-details-sections .facebook-group-log-item[open] .facebook-group-log-summary-toggle::before {
  content: "−";
}

.venue-page #show-details-sections .facebook-group-log-item:not([open]) .facebook-group-log-summary-toggle::before {
  content: "+";
}

.venue-page #show-details-sections .facebook-group-log-posts-table {
  border-top: 1px solid #d9dde3;
  border-left: 0;
  border-right: 0;
  border-bottom: 0;
}

.venue-page #show-details-sections .facebook-group-log-posts-table .table-row.header {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: #f8f9fb;
  border-bottom: 1px solid #d9dde3;
}

.venue-page #show-details-sections .facebook-group-log-posts-table .table-row {
  min-width: 0;
  gap: 0;
  align-items: center;
  grid-template-columns: var(--facebook-group-log-grid-columns, minmax(128px, 0.82fr) minmax(180px, 1.25fr) minmax(96px, 0.68fr) minmax(108px, 0.72fr) minmax(118px, 0.78fr) minmax(118px, 0.78fr));
}

.venue-page #show-details-sections .facebook-group-log-posts-table .table-row > * {
  padding: 8px 10px;
  line-height: 1.2;
  text-align: center;
}

.venue-page #show-details-sections .facebook-group-log-posts-table .table-row > :first-child {
  text-align: left;
}

.venue-page #show-details-sections .facebook-group-log-posts-table .table-row:not(.header) {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  border-bottom: 1px solid #d9dde3;
  background: #fff;
}

.venue-page #show-details-sections .marketing-facebook-groups-controls {
  display: flex;
  width: 100%;
  justify-content: flex-start;
}

.venue-page #show-details-sections #facebook-groups-actions-menu {
  position: relative;
  z-index: 30;
}

.venue-page #show-details-sections #facebook-groups-actions-menu .menu-button {
  background: var(--surface);
  border: 1px solid #e0e0e5;
  padding: 10px 18px;
  border-radius: 0;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.2px;
  color: var(--text);
  font-family: var(--font-display);
}

.venue-page #show-details-sections #facebook-groups-actions-menu .menu-button:hover,
.venue-page #show-details-sections #facebook-groups-actions-menu .menu-button:focus-visible {
  transform: none;
  box-shadow: none;
  background: var(--surface);
  border-color: #e0e0e5;
}

.venue-page #show-details-sections #facebook-groups-actions-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: auto;
  min-width: 270px;
  background: var(--surface);
  border-radius: 16px;
  padding: 12px;
  box-shadow: var(--shadow);
  border: 1px solid #ececef;
  z-index: 500;
}

.venue-page #show-details-sections #facebook-groups-actions-panel.active {
  display: block;
}

.venue-page #show-details-sections #facebook-groups-actions-panel .menu-item,
.venue-page #show-details-sections #facebook-groups-actions-panel .dropdown-item {
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: none;
  background: transparent;
  font-weight: 400;
  cursor: pointer;
  border-radius: 10px;
  display: block;
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 12px;
}

.venue-page #show-details-sections #facebook-groups-actions-panel .menu-item:hover,
.venue-page #show-details-sections #facebook-groups-actions-panel .dropdown-item:hover {
  background: #f3f4f7;
}

.venue-page #show-details-sections #facebook-groups-actions-panel .menu-separator {
  background: #ececef;
  margin: 6px 0;
}

.venue-page #show-details-sections .facebook-group-log-posts-table .table-row:last-child {
  border-bottom: 0;
}

#marketing-contact-detail-dialog {
  width: min(860px, 94vw);
}

#marketing-contact-detail-dialog .marketing-contact-detail-form {
  gap: 12px;
}

#facebook-group-schedule-dialog {
  width: min(1180px, 98vw);
  position: fixed;
  top: 50%;
  left: 50%;
  max-height: calc(100dvh - 24px);
  transform: translate(-50%, -50%) scale(0.985);
}

#facebook-group-schedule-dialog[open] {
  transform: translate(-50%, -50%) scale(1);
}

#facebook-group-schedule-dialog.dialog-closing {
  transform: translate(-50%, -48%) scale(0.985);
}

#facebook-group-schedule-dialog .dialog-form {
  gap: 12px;
  max-height: calc(100dvh - 120px);
  overflow: auto;
  padding-right: 4px;
}

#facebook-group-schedule-preview .table-row {
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) 170px;
  gap: 0;
}

#facebook-group-schedule-preview .table-row > * {
  white-space: nowrap;
}

#facebook-group-schedule-dialog h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1rem;
  color: #1d1d1f;
}

#facebook-group-schedule-dialog label {
  display: grid;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 0.86rem;
  color: #3f4650;
}

#facebook-group-schedule-dialog input:not([type="checkbox"]),
#facebook-group-schedule-dialog select,
#facebook-group-schedule-dialog textarea,
#facebook-group-capture-dialog textarea {
  width: 100%;
  border: 1px solid #d9dde3;
  border-radius: 0;
  box-shadow: none;
  padding: 12px;
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: #1d1d1f;
  background: #fff;
}

#facebook-group-schedule-dialog textarea,
#facebook-group-capture-dialog textarea {
  resize: vertical;
  min-height: 96px;
}

#facebook-group-capture-dialog {
  width: min(860px, 96vw);
  position: fixed;
  top: 50%;
  left: 50%;
  max-height: calc(100dvh - 24px);
  transform: translate(-50%, -50%) scale(0.985);
}

#facebook-group-capture-dialog[open] {
  transform: translate(-50%, -50%) scale(1);
}

#facebook-group-capture-dialog.dialog-closing {
  transform: translate(-50%, -48%) scale(0.985);
}

#facebook-group-capture-dialog .dialog-form {
  gap: 12px;
  max-height: calc(100dvh - 120px);
  overflow: auto;
  padding-right: 4px;
}

#facebook-group-global-start-dialog {
  width: min(560px, 94vw);
  position: fixed;
  top: 50%;
  left: 50%;
  max-height: calc(100dvh - 24px);
  transform: translate(-50%, -50%) scale(0.985);
}

#facebook-group-global-start-dialog[open] {
  transform: translate(-50%, -50%) scale(1);
}

#facebook-group-global-start-dialog.dialog-closing {
  transform: translate(-50%, -48%) scale(0.985);
}

#facebook-group-global-start-dialog .dialog-form {
  gap: 12px;
}

#facebook-group-schedule-dialog .checkbox-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

#facebook-group-schedule-dialog .checkbox-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 40px;
  padding: 10px 12px;
  border: 1px solid #d9dde3;
  border-radius: 0;
  background: #fff;
  color: #1d1d1f;
  cursor: pointer;
  user-select: none;
}

#facebook-group-schedule-dialog .checkbox-chip input {
  accent-color: #1d1d1f;
  width: 16px;
  min-width: 16px;
  max-width: 16px;
  height: 16px;
  min-height: 16px;
  margin: 0;
  padding: 0;
}

#facebook-group-schedule-dialog #facebook-group-schedule-preview {
  border: 1px solid #d9dde3;
  width: 100%;
}

#facebook-group-schedule-dialog #facebook-group-schedule-preview .table-row.header {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #6e6e73;
  background: #f8f9fb;
  border-bottom: 1px solid #d9dde3;
}

#facebook-group-schedule-dialog #facebook-group-schedule-preview .table-row > * {
  padding: 8px 10px;
}

#facebook-group-schedule-dialog #facebook-group-schedule-preview .table-row:not(.header) > * {
  display: flex;
  align-items: center;
}

#facebook-group-schedule-dialog #facebook-group-schedule-preview .table-row:not(.header) {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  border-bottom: 1px solid #d9dde3;
  background: #fff;
}

#facebook-group-schedule-dialog #facebook-group-schedule-preview .table-row:last-child {
  border-bottom: 0;
}

#facebook-group-schedule-dialog .dialog-actions .ghost {
  background: #fff;
  color: #1d1d1f;
  border: 1px solid #d9dde3;
  border-radius: 0;
  box-shadow: none;
}

#facebook-group-schedule-dialog .dialog-actions .ghost:hover {
  transform: none;
  background: #fff;
}

#facebook-group-schedule-dialog .dialog-actions .primary {
  background: #1d1d1f;
  color: #fff;
  border: 1px solid #1d1d1f;
  border-radius: 0;
  box-shadow: none;
  min-height: 34px;
  padding: 8px 10px;
}

#facebook-group-capture-dialog .dialog-actions .ghost,
#facebook-group-capture-dialog .dialog-actions .primary,
#facebook-group-schedule-dialog #facebook-group-read-rules-ai {
  border-radius: 0;
  box-shadow: none;
}

#facebook-group-capture-dialog .dialog-actions .ghost,
#facebook-group-schedule-dialog #facebook-group-read-rules-ai {
  background: #fff;
  color: #1d1d1f;
  border: 1px solid #d9dde3;
}

#facebook-group-capture-dialog .dialog-actions .primary {
  background: #1d1d1f;
  color: #fff;
  border: 1px solid #1d1d1f;
}

#facebook-group-schedule-dialog .dialog-actions .primary:hover {
  background: #111;
  border-color: #111;
  transform: none;
}

#marketing-contact-detail-dialog h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1rem;
  color: #1d1d1f;
}

#marketing-contact-detail-dialog label {
  display: grid;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 0.86rem;
  color: #3f4650;
}

#marketing-contact-detail-dialog label.full-width {
  grid-column: 1 / -1;
}

#marketing-contact-detail-dialog input,
#marketing-contact-detail-dialog select,
#marketing-contact-detail-dialog textarea {
  width: 100%;
  border: 1px solid #d9dde3;
  border-radius: 0;
  box-shadow: none;
  padding: 12px;
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: #1d1d1f;
  background: #fff;
}

#marketing-contact-detail-dialog textarea {
  resize: vertical;
}

#marketing-contact-detail-dialog .dialog-actions .ghost {
  background: #fff;
  color: #1d1d1f;
  border: 1px solid #d9dde3;
  border-radius: 0;
  box-shadow: none;
}

#marketing-contact-detail-dialog .dialog-actions .ghost:hover {
  transform: none;
  background: #fff;
}

#marketing-contact-detail-dialog .dialog-actions .primary {
  background: #1d1d1f;
  color: #fff;
  border: 1px solid #1d1d1f;
  border-radius: 0;
  box-shadow: none;
  min-height: 34px;
  padding: 8px 10px;
}

#marketing-contact-detail-dialog .dialog-actions .primary:hover {
  background: #111;
  border-color: #111;
  transform: none;
}

.venue-page #show-details-sections .marketing-ai-history {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.venue-page #show-details-sections .marketing-ai-history details {
  border: 1px solid #d9dde3;
  background: #fff;
}

.venue-page #show-details-sections .marketing-ai-history summary {
  list-style: none;
  cursor: pointer;
  padding: 12px 14px;
  font-weight: 600;
}

.venue-page #show-details-sections .marketing-ai-history summary::-webkit-details-marker {
  display: none;
}

.venue-page #show-details-sections .marketing-ai-history .marketing-ai-history-body {
  padding-top: 0;
}

.venue-page #show-details-sections .marketing-ai-history .marketing-ai-history-actions-footer {
  margin-top: 8px;
}

.venue-page #show-details-sections .marketing-ai-history .marketing-ai-section {
  border: 1px solid #d9dde3;
  margin-top: 8px;
}

.venue-page #show-details-sections .marketing-ai-history .marketing-ai-section summary {
  padding: 10px 12px;
  font-weight: 600;
  background: #f8f9fb;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.venue-page #show-details-sections .marketing-ai-history .marketing-ai-section-progress {
  font-size: 0.78rem;
  font-weight: 500;
  color: #6e6e73;
}

.venue-page #show-details-sections .marketing-ai-history .marketing-ai-actions-table {
  border: 0;
}

.venue-page #show-details-sections .marketing-ai-history .marketing-ai-actions-table .table-row {
  min-width: 0;
  gap: 0;
  grid-template-columns: 70px 140px 1.6fr 1.2fr;
}

.venue-page #show-details-sections .marketing-ai-history .marketing-ai-actions-table .table-row.header {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #6e6e73;
  background: #f8f9fb;
  border-bottom: 1px solid #d9dde3;
}

.venue-page #show-details-sections .marketing-ai-history .marketing-ai-actions-table .table-row > * {
  padding: 8px 10px;
}

.venue-page #show-details-sections .marketing-ai-history .marketing-ai-actions-table .table-row:not(.header) {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  border-bottom: 1px solid #d9dde3;
  background: #fff;
}

.venue-page #show-details-sections .marketing-ai-history .marketing-ai-actions-table .table-row:last-child {
  border-bottom: 0;
}

.venue-page #show-details-sections .marketing-ai-history .marketing-ai-actions-table .table-row select,
.venue-page #show-details-sections .marketing-ai-history .marketing-ai-actions-table .table-row textarea {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  font-size: 0.88rem;
  background: #fff;
  padding: 8px 10px;
  width: 100%;
}

.venue-page #show-details-sections .tickets-details-subsection,
.venue-page #show-details-sections .tickets-sold-subsection {
  padding-right: 16px;
}

.venue-page #show-details-sections .merch-subsection,
.venue-page #show-details-sections .merch-costs-subsection,
.venue-page #show-details-sections .merch-sales-summary-subsection {
  padding-right: 16px;
}

.venue-page #show-details-sections .merch-subsection .subsection-header {
  justify-content: flex-start;
  margin-bottom: 8px;
  padding-right: 0;
}

.venue-page #show-details-sections .merch-sales-summary-subsection .subsection-header {
  margin-top: 8px;
}

.venue-page #show-details-sections .merch-subsection .ghost {
  background: #fff;
  color: #1d1d1f;
  border: 1px solid #d9dde3;
  border-radius: 0;
  box-shadow: none;
  padding: 9px 12px;
}

.venue-page #show-details-sections .merch-subsection .ghost:hover {
  transform: none;
  background: #fff;
}

.venue-page #show-details-sections .merch-fields {
  margin-top: 4px;
  gap: 12px;
}

.venue-page #show-details-sections .merch-fields label {
  font-family: var(--font-body);
  font-size: 0.86rem;
  color: #3f4650;
  gap: 8px;
}

.venue-page #show-details-sections .merch-fields input,
.venue-page #show-details-sections .merch-fields select {
  font-family: var(--font-body);
  font-size: 0.88rem;
  border: 1px solid #d9dde3;
  border-radius: 0;
  padding: 12px;
  color: #1d1d1f;
  background: #fff;
  box-shadow: none;
}

.venue-page #show-details-sections .merch-fields input[readonly] {
  background: #f7f8fa;
  color: #4b5563;
}

.venue-page #show-details-sections .merch-summary-table-wrap {
  display: grid;
  gap: 0;
  border: 1px solid #d9dde3;
  width: 100%;
}

.venue-page #show-details-sections #merch-admin-summary .table-row {
  min-width: 0;
  gap: 0;
  grid-template-columns: 1.6fr 0.9fr 0.9fr 0.7fr 0.7fr 0.9fr 0.9fr 120px;
}

.venue-page #show-details-sections #merch-admin-summary .table-row.header {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #6e6e73;
  background: #f8f9fb;
  border-bottom: 1px solid #d9dde3;
}

.venue-page #show-details-sections #merch-admin-summary .table-row > * {
  padding: 8px 10px;
}

.venue-page #show-details-sections #merch-admin-summary .table-row:not(.header) {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  border-bottom: 1px solid #d9dde3;
  background: #fff;
}

.venue-page #show-details-sections #merch-admin-summary .table-row:last-child {
  border-bottom: 0;
}

.venue-page #show-details-sections #merch-admin-summary .row-actions {
  justify-self: start;
}

.venue-page #show-details-sections .merch-summary-totals {
  margin-top: 10px;
  max-width: 430px;
}

.venue-page #show-details-sections .merch-total-row {
  border: 1px solid #d9dde3;
  border-radius: 0;
  background: #fff;
  padding: 8px 10px;
}

.venue-page #show-details-sections .personnel-subsection,
.venue-page #show-details-sections .personnel-main-subsection,
.venue-page #show-details-sections .personnel-crewing-subsection,
.venue-page #show-details-sections .personnel-expenses-subsection {
  padding-right: 16px;
}

.venue-page #show-details-sections .personnel-subsection .subsection-header {
  justify-content: flex-start;
  margin-bottom: 8px;
  padding-right: 0;
}

.venue-page #show-details-sections .personnel-subsection .ghost {
  background: #fff;
  color: #1d1d1f;
  border: 1px solid #d9dde3;
  border-radius: 0;
  box-shadow: none;
  padding: 9px 12px;
}

.venue-page #show-details-sections .personnel-subsection .ghost:hover {
  transform: none;
  background: #fff;
}

.venue-page #show-details-sections .personnel-subsection .personnel-group {
  border: 1px solid #d9dde3;
  border-radius: 0;
  background: #fff;
  padding: 12px;
  margin-bottom: 8px;
}

.venue-page #show-details-sections .personnel-subsection .actions {
  gap: 8px;
  align-items: center;
}

.venue-page #show-details-sections .personnel-subsection .roster-select,
.venue-page #show-details-sections .personnel-subsection .crewing-roster-select {
  appearance: none;
  -webkit-appearance: none;
  background: #fff;
  color: #1d1d1f;
  border: 1px solid #d9dde3;
  border-radius: 0;
  box-shadow: none;
  font-family: var(--font-body);
  font-size: 0.88rem;
  line-height: 1;
  height: 38px;
  min-height: 38px;
  max-height: 38px;
  padding: 8px 12px;
  box-sizing: border-box;
}

.venue-page #show-details-sections .personnel-subsection .personnel-group .totals {
  margin-top: 8px;
  font-size: 0.84rem;
}

.venue-page #show-details-sections .personnel-subsection .show-details-subaccordion > details > summary {
  display: flex;
  align-items: center;
  gap: 10px;
}

.venue-page #show-details-sections .personnel-subsection .show-details-subaccordion > details > summary .section-cost-indicator {
  margin-left: auto;
}

.venue-page #show-details-sections .personnel-subsection .show-details-subaccordion > details > summary::after {
  margin-left: 10px;
}

.venue-page #show-details-sections .personnel-subsection .people-table .table-row,
.venue-page #show-details-sections .personnel-subsection #crewing-assignment-table .table-row {
  min-width: 0;
}

.venue-page #show-details-sections .personnel-subsection #personnel-expenses-table {
  display: grid;
  gap: 0;
  border: 1px solid #d9dde3;
  width: 100%;
}

.venue-page #show-details-sections .personnel-subsection #personnel-expenses-table .table-row {
  min-width: 0;
  gap: 0;
  grid-template-columns: 1.2fr 1.4fr 0.8fr 0.7fr 0.8fr;
}

.venue-page #show-details-sections .personnel-subsection #personnel-expenses-table .table-row.header {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #6e6e73;
  background: #f8f9fb;
  border-bottom: 1px solid #d9dde3;
}

.venue-page #show-details-sections .personnel-subsection #personnel-expenses-table .table-row > * {
  padding: 8px 10px;
}

.venue-page #show-details-sections .personnel-subsection #personnel-expenses-table .table-row:not(.header) {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  border-bottom: 1px solid #d9dde3;
  background: #fff;
}

.venue-page #show-details-sections .personnel-subsection #personnel-expenses-table .table-row:last-child {
  border-bottom: 0;
}

.venue-page #show-details-sections .transport-subsection,
.venue-page #show-details-sections .accommodation-subsection {
  padding-right: 16px;
}

.venue-page #show-details-sections .transport-subsection .subsection-header,
.venue-page #show-details-sections .accommodation-subsection .subsection-header {
  justify-content: flex-start;
  margin-bottom: 8px;
  padding-right: 0;
}

.venue-page #show-details-sections .transport-subsection .ghost,
.venue-page #show-details-sections .accommodation-subsection .ghost {
  background: #fff;
  color: #1d1d1f;
  border: 1px solid #d9dde3;
  border-radius: 0;
  box-shadow: none;
  padding: 9px 12px;
}

.venue-page #show-details-sections .transport-subsection .ghost:hover,
.venue-page #show-details-sections .accommodation-subsection .ghost:hover {
  transform: none;
  background: #fff;
}

.venue-page #show-details-sections .transport-subsection select,
.venue-page #show-details-sections .accommodation-subsection select {
  border: 1px solid #d9dde3;
  border-radius: 0;
  box-shadow: none;
}

.venue-page #show-details-sections #transport-roster-select {
  appearance: none;
  -webkit-appearance: none;
  background: #fff;
  color: #1d1d1f;
  border: 1px solid #d9dde3;
  border-radius: 0;
  box-shadow: none;
  font-family: var(--font-body);
  font-size: 0.88rem;
  line-height: 1;
  height: 38px;
  min-height: 38px;
  max-height: 38px;
  padding: 8px 12px;
  box-sizing: border-box;
}

.venue-page #show-details-sections .transport-table-wrap,
.venue-page #show-details-sections .accommodation-table-wrap {
  display: grid;
  gap: 0;
  border: 1px solid #d9dde3;
  width: 100%;
}

.venue-page #show-details-sections #transport-table .table-row,
.venue-page #show-details-sections #accommodation-table .table-row {
  min-width: 0;
  gap: 0;
}

.venue-page #show-details-sections #accommodation-table .table-row {
  grid-template-columns: 1fr 1.4fr 0.9fr 0.9fr 1fr 0.9fr 0.8fr 110px;
}

.venue-page #show-details-sections #transport-table .table-row.header,
.venue-page #show-details-sections #accommodation-table .table-row.header {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #6e6e73;
  background: #f8f9fb;
  border-bottom: 1px solid #d9dde3;
}

.venue-page #show-details-sections #transport-table .table-row > *,
.venue-page #show-details-sections #accommodation-table .table-row > * {
  padding: 8px 10px;
}

.venue-page #show-details-sections #transport-table .table-row:not(.header),
.venue-page #show-details-sections #accommodation-table .table-row:not(.header) {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  border-bottom: 1px solid #d9dde3;
  background: #fff;
}

.venue-page #show-details-sections #transport-table .table-row:last-child,
.venue-page #show-details-sections #accommodation-table .table-row:last-child {
  border-bottom: 0;
}

.venue-page #show-details-sections #transport-table .table-row input,
.venue-page #show-details-sections #transport-table .table-row select,
.venue-page #show-details-sections #accommodation-table .table-row input,
.venue-page #show-details-sections #accommodation-table .table-row select {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: #fff;
  font-size: 0.88rem;
  padding: 8px 10px;
}

.venue-page #show-details-sections #accommodation-table .table-row .ghost.remove-row {
  white-space: nowrap;
  justify-self: start;
}

#vehicle-dialog .subsection-header {
  justify-content: flex-start;
  margin-bottom: 8px;
  padding-right: 0;
}

#vehicle-dialog .ghost {
  background: #fff;
  color: #1d1d1f;
  border: 1px solid #d9dde3;
  border-radius: 0;
  box-shadow: none;
  padding: 9px 12px;
}

#vehicle-dialog .ghost:hover {
  transform: none;
  background: #fff;
}

#vehicle-dialog #vehicle-table {
  display: grid;
  gap: 0;
  border: 1px solid #d9dde3;
  width: 100%;
}

#vehicle-dialog #vehicle-table .table-row {
  min-width: 0;
  gap: 0;
  grid-template-columns: 1.2fr 1fr 0.9fr 96px;
}

#vehicle-dialog #vehicle-table .table-row.header {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #6e6e73;
  background: #f8f9fb;
  border-bottom: 1px solid #d9dde3;
}

#vehicle-dialog #vehicle-table .table-row > * {
  padding: 8px 10px;
}

#vehicle-dialog #vehicle-table .table-row:not(.header) {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  border-bottom: 1px solid #d9dde3;
  background: #fff;
}

#vehicle-dialog #vehicle-table .table-row:last-child {
  border-bottom: 0;
}

#vehicle-dialog #vehicle-table .table-row input {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: #fff;
  font-size: 0.88rem;
  padding: 8px 10px;
}

#vehicle-dialog #vehicle-table .vehicle-actions .ghost {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
}

#accommodation-quick-assign-dialog .dialog-form {
  max-width: 920px;
}

#accommodation-quick-assign-table {
  display: grid;
  gap: 0;
  border: 1px solid #d9dde3;
  width: 100%;
}

#accommodation-quick-assign-table .table-row {
  min-width: 0;
  gap: 0;
  grid-template-columns: 1.1fr 1.7fr 0.8fr;
}

#accommodation-quick-assign-table .table-row.header {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #6e6e73;
  background: #f8f9fb;
  border-bottom: 1px solid #d9dde3;
}

#accommodation-quick-assign-table .table-row > * {
  padding: 8px 10px;
}

#accommodation-quick-assign-table .table-row:not(.header) {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  border-bottom: 1px solid #d9dde3;
  background: #fff;
}

#accommodation-quick-assign-table .table-row:last-child {
  border-bottom: 0;
}

#accommodation-quick-assign-table .table-row select {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: #fff;
  font-size: 0.88rem;
  padding: 8px 10px;
}

#accommodation-quick-assign-table .table-row.assigned,
#accommodation-quick-assign-table .table-row.unassigned {
  border-radius: 0;
  border: 0;
}

.venue-page #show-details-sections .tickets-details-subsection .subsection-header,
.venue-page #show-details-sections .tickets-sold-subsection .subsection-header {
  justify-content: flex-start;
  margin-bottom: 8px;
  padding-right: 0;
}

.venue-page #show-details-sections .tickets-details-subsection .ghost,
.venue-page #show-details-sections .tickets-sold-subsection .ghost {
  background: #fff;
  color: #1d1d1f;
  border: 1px solid #d9dde3;
  border-radius: 0;
  box-shadow: none;
  padding: 9px 12px;
}

.venue-page #show-details-sections .tickets-details-subsection .ghost:hover,
.venue-page #show-details-sections .tickets-sold-subsection .ghost:hover {
  transform: none;
  background: #fff;
}

.venue-page #show-details-sections .tickets-details-table-wrap,
.venue-page #show-details-sections .tickets-sold-table-wrap {
  display: grid;
  gap: 0;
  border: 1px solid #d9dde3;
  width: 100%;
}

.venue-page #show-details-sections #tickets-table .table-row {
  min-width: 0;
  gap: 0;
  grid-template-columns: 1.4fr 0.8fr 130px;
}

.venue-page #show-details-sections #show-sales-table .table-row {
  min-width: 0;
  gap: 0;
  grid-template-columns: 0.7fr 0.9fr 1fr 1fr;
}

.venue-page #show-details-sections #tickets-table .table-row.header,
.venue-page #show-details-sections #show-sales-table .table-row.header {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #6e6e73;
  background: #f8f9fb;
  border-bottom: 1px solid #d9dde3;
}

.venue-page #show-details-sections #tickets-table .table-row > *,
.venue-page #show-details-sections #show-sales-table .table-row > * {
  padding: 8px 10px;
}

.venue-page #show-details-sections #tickets-table .table-row:not(.header),
.venue-page #show-details-sections #show-sales-table .table-row:not(.header) {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  border-bottom: 1px solid #d9dde3;
  background: #fff;
}

.venue-page #show-details-sections #tickets-table .table-row:last-child,
.venue-page #show-details-sections #show-sales-table .table-row:last-child {
  border-bottom: 0;
}

.venue-page #show-details-sections #tickets-table .table-row input,
.venue-page #show-details-sections #tickets-table .table-row select,
.venue-page #show-details-sections #show-sales-table .table-row input,
.venue-page #show-details-sections #show-sales-table .table-row select {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  font-size: 0.88rem;
  background: #fff;
  padding: 0;
}

.venue-page #show-details-sections #tickets-table .table-row input,
.venue-page #show-details-sections #tickets-table .table-row select {
  padding: 8px 10px;
}

.venue-page #show-details-sections #show-times .table-row .ghost,
.venue-page #show-details-sections #theatre-charges .table-row .ghost,
.venue-page #show-details-sections #theatre-other-charges .table-row .ghost,
.venue-page #show-details-sections #tickets-table .table-row .ghost,
.venue-page #show-details-sections #show-sales-table .table-row .ghost {
  width: 100%;
  padding: 8px 10px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.venue-page #show-details-sections #show-times .table-row .ghost.remove-row {
  width: auto;
  justify-self: end;
  margin-right: 10px;
}

.venue-page #show-details-sections #theatre-charges .table-row .ghost.remove-row,
.venue-page #show-details-sections #theatre-other-charges .table-row .ghost.remove-row,
.venue-page #show-details-sections #tickets-table .table-row .ghost.remove-row {
  width: auto;
  justify-self: end;
  margin-right: 10px;
}

.venue-page #show-details-sections .tickets-sold-subsection #latest-sales-report {
  margin-top: 8px;
}

.venue-page #show-details-sections #show-times .table-row {
  min-width: 0;
  gap: 0;
  grid-template-columns: 0.7fr 1fr 1fr 130px;
}

.venue-page #show-details-sections #show-times .table-row.header {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #6e6e73;
  background: #f8f9fb;
  border-bottom: 1px solid #d9dde3;
}

.venue-page #show-details-sections #show-times .table-row > * {
  padding: 8px 10px;
}

.venue-page #show-details-sections #show-times .table-row:not(.header) {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  border-bottom: 1px solid #d9dde3;
  background: #fff;
}

.venue-page #show-details-sections #show-times .table-row:last-child {
  border-bottom: 0;
}

.venue-page #show-details-sections #show-times .table-row input,
.venue-page #show-details-sections #show-times .table-row select {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  font-size: 0.88rem;
  background: #fff;
  padding: 0;
}

.venue-page #show-details-sections #show-times .show-start,
.venue-page #show-details-sections #show-times .show-doors {
  background: #fff !important;
  color: #1d1d1f;
  outline: none;
  padding-left: 0;
  margin: 0;
  width: 100%;
  min-width: 0;
  color-scheme: light;
}

.venue-page #show-details-sections #show-times .show-start::-webkit-calendar-picker-indicator,
.venue-page #show-details-sections #show-times .show-doors::-webkit-calendar-picker-indicator {
  opacity: 0;
  display: none;
  pointer-events: none;
}

.venue-page #show-details-sections #show-times .show-start::-webkit-clear-button,
.venue-page #show-details-sections #show-times .show-doors::-webkit-clear-button,
.venue-page #show-details-sections #show-times .show-start::-webkit-inner-spin-button,
.venue-page #show-details-sections #show-times .show-doors::-webkit-inner-spin-button {
  display: none;
}

.venue-page #show-details-sections #show-times .show-start:focus,
.venue-page #show-details-sections #show-times .show-doors:focus {
  border: 0;
  box-shadow: none;
  background: #fff !important;
}

.overview-page {
  --bg: #f5f5f7;
  --bg-strong: #ececee;
  --surface: #ffffff;
  --surface-muted: #fafafa;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --accent: #0a84ff;
  --accent-strong: #0066cc;
  --shadow: 0 16px 40px rgba(15, 15, 15, 0.08);
  --radius: 24px;
  --radius-small: 14px;
  --transition: 180ms ease;
  --font-display: "Sora", sans-serif;
  --font-body: "Plus Jakarta Sans", sans-serif;
  --top-nav-height: 56px;
  font-family: var(--font-body);
  color: var(--text);
  min-height: 100vh;
  padding-top: var(--top-nav-height);
}

.overview-page .overview-topbar.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: relative;
  z-index: 20000;
  padding: 0;
  margin: 0;
  min-height: 0;
}

.overview-page .overview-brand {
  display: none;
}

.overview-page .header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.overview-page .menu-dropdown.dropdown {
  position: relative;
  z-index: 40000;
}

.overview-page .menu-button {
  background: var(--surface);
  border: 1px solid #e0e0e5;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.2px;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text);
  font-family: var(--font-display);
}

.overview-page .menu-button:hover {
  transform: none;
  box-shadow: none;
  background: var(--surface);
}

.overview-page .dropdown-menu {
  position: absolute;
  top: 46px;
  right: 0;
  background: var(--surface);
  border-radius: 16px;
  padding: 12px;
  box-shadow: var(--shadow);
  display: none;
  min-width: 190px;
  border: 1px solid #ececef;
  z-index: 50000;
}

.overview-page .dropdown-menu.active {
  display: block;
}

.overview-page .dropdown-menu button,
.overview-page .dropdown-menu a {
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: none;
  background: transparent;
  font-weight: 400;
  cursor: pointer;
  border-radius: 10px;
  display: block;
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 12px;
}

.overview-page .dropdown-menu button:hover,
.overview-page .dropdown-menu a:hover {
  background: transparent;
}

.overview-page .header .header-actions > .dropdown > .menu-button {
  display: none;
}

.overview-page .header .dropdown-menu {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex !important;
  flex-direction: row;
  align-items: stretch;
  justify-content: flex-start;
  gap: 4px;
  padding: 0 4px;
  min-width: 0;
  height: var(--top-nav-height);
  border-radius: 0;
  border: none;
  border-bottom: 1px solid #e5e6ea;
  z-index: 20000;
  overflow: visible;
  background: var(--surface);
}

.overview-page .header .dropdown-menu.active {
  display: flex;
}

.overview-page .header .dropdown-section {
  margin: 0;
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.overview-page .header .dropdown-section:first-of-type {
  margin-left: 6px;
}

.overview-page .header .dropdown-section:last-child {
  margin-left: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.overview-page .header .dropdown-section.system-menu-section {
  margin-left: auto;
}

.overview-page .header-show-pill {
  display: inline-flex;
  align-items: center;
  align-self: center;
  height: 28px;
  padding: 0 10px;
  border: 1px solid #d7dbe2;
  background: #ffffff;
  color: #111827;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
  margin-left: auto;
}

.overview-page .header-pill-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.overview-page .header-pill-row .header-show-pill {
  margin-left: 0;
}

.overview-page .header-email-pill,
.overview-page .header-profit-pill,
.overview-page .header-ammo-visibility-pill {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 0 !important;
  border: 1px solid #d7dbe2 !important;
  background: #ffffff !important;
  color: #111827 !important;
  height: 28px !important;
  min-height: 28px !important;
  padding: 0 10px !important;
  font-family: var(--font-display) !important;
  font-size: 11px !important;
  letter-spacing: 0.02em !important;
  text-transform: uppercase !important;
  line-height: 1.15 !important;
  padding-top: 1px !important;
  box-shadow: none !important;
  cursor: pointer;
}

.overview-page .header-email-pill.has-unread {
  color: #b42318 !important;
  border-color: #f2b8b5 !important;
  background: #fff1f1 !important;
}

.overview-page .header-profit-pill.profit-in {
  color: #166534 !important;
  border-color: #86efac !important;
  background: #ecfdf3 !important;
}

.overview-page .header-profit-pill.profit-out {
  color: #b91c1c !important;
  border-color: #fecaca !important;
  background: #fef2f2 !important;
}

.overview-page .header-email-pill:hover,
.overview-page .header-email-pill:focus,
.overview-page .header-email-pill:active,
.overview-page .header-profit-pill:hover,
.overview-page .header-profit-pill:focus,
.overview-page .header-profit-pill:active,
.overview-page .header-ammo-visibility-pill:hover,
.overview-page .header-ammo-visibility-pill:focus,
.overview-page .header-ammo-visibility-pill:active {
  transform: none !important;
  box-shadow: none !important;
  outline: none !important;
}

.overview-page .header-show-pill.hidden {
  display: none;
}

.overview-page .header-email-pill.hidden,
.overview-page .header-profit-pill.hidden,
.overview-page .header-ammo-visibility-pill.hidden,
.overview-page .header-show-pill.hidden {
  display: none !important;
}

.overview-page .header-pill-row + .dropdown-section.system-menu-section {
  margin-left: 8px;
}

.overview-page .header-show-pill + .dropdown-section.system-menu-section {
  margin-left: 8px;
}

.overview-page .header .dropdown-section-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: auto;
  flex: 0 0 auto;
  height: var(--top-nav-height);
  padding: 0 8px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 12px;
  border-radius: 10px;
  font-family: var(--font-display);
  color: var(--text) !important;
  cursor: pointer;
  text-decoration: none;
}

.overview-page .header .menu-button,
.overview-page .header .dropdown-section-title,
.overview-page .header .dropdown-submenu .menu-item {
  transition: none !important;
}

.overview-page .header .menu-button:hover,
.overview-page .header .menu-button:focus-visible,
.overview-page .header .dropdown-section-title:hover,
.overview-page .header .dropdown-section-title:focus-visible,
.overview-page .header .dropdown-submenu .menu-item:hover,
.overview-page .header .dropdown-submenu .menu-item:focus-visible {
  transform: none !important;
  box-shadow: none !important;
  background: transparent !important;
  border-color: transparent !important;
  color: var(--text) !important;
}

.overview-page .header .dropdown-section-title::after {
  content: "▾";
  margin-left: 2px;
  color: #9aa0ac;
}

.overview-page .header .header-direct-link::after {
  content: none;
}

.overview-page .header .header-direct-link.is-current {
  background: #f3f4f7 !important;
}

.overview-page .header .dropdown-submenu {
  top: 100%;
  left: 0 !important;
  right: auto !important;
}

.calendar-page main {
  padding: 18px 5vw 64px;
  gap: 20px;
}

.tasks-page main {
  padding-top: 18px;
}

.calendar-shell {
  display: grid;
  gap: 18px;
}

.calendar-board {
  background: #fff;
  border: 1px solid #e2e5ec;
  border-radius: 24px;
  padding: 22px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
}

.calendar-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.calendar-toolbar h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.8vw, 2.2rem);
}

.calendar-toolbar p {
  margin: 4px 0 0;
  color: var(--muted);
}

.calendar-toolbar-actions {
  display: inline-flex;
  gap: 10px;
  flex-wrap: wrap;
}

.calendar-toolbar-actions button {
  border: 1px solid #d9dde3;
  background: #fff;
  color: #1d1d1f;
  border-radius: 999px;
  min-height: 40px;
  padding: 0 16px;
  font-family: var(--font-display);
  font-size: 0.84rem;
  cursor: pointer;
}

.calendar-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.calendar-summary-card {
  border: 1px solid #e6e8ef;
  border-radius: 18px;
  padding: 14px 16px;
  background: linear-gradient(180deg, #ffffff 0%, #fafbff 100%);
}

.calendar-summary-card--interactive {
  cursor: pointer;
}

.calendar-summary-card--interactive:hover {
  border-color: #ccd5ea;
  background: linear-gradient(180deg, #fbfcff 0%, #f3f6ff 100%);
}

.calendar-summary-card--interactive:focus-visible {
  outline: 2px solid rgba(79, 70, 229, 0.28);
  outline-offset: 2px;
}

.calendar-summary-card--interactive.is-disabled {
  cursor: default;
  opacity: 0.55;
}

.calendar-summary-card .label {
  display: block;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #7a8190;
  margin-bottom: 8px;
}

.calendar-summary-card .value {
  font-family: var(--font-display);
  font-size: 1.65rem;
  line-height: 1;
}

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}

.calendar-weekdays {
  margin-bottom: 10px;
}

.calendar-weekdays span {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #7a8190;
  padding: 0 6px;
}

.calendar-day {
  min-height: 170px;
  border: 1px solid #e6e8ef;
  border-radius: 20px;
  padding: 12px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.calendar-day.is-outside {
  background: #f7f8fb;
  color: #9aa0ac;
}

.calendar-day.is-today {
  border-color: #c8d2ff;
  box-shadow: inset 0 0 0 1px rgba(79, 70, 229, 0.12);
}

.calendar-day.is-focused {
  border-color: #9eb2ff;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.16);
}

.calendar-day-number {
  font-family: var(--font-display);
  font-size: 0.96rem;
}

.calendar-day-events {
  display: grid;
  gap: 8px;
}

.calendar-event {
  display: block;
  border: 1px solid #e3e7ff;
  background: linear-gradient(180deg, #f7f8ff 0%, #eef1ff 100%);
  color: #1d2a52;
  border-radius: 14px;
  padding: 10px 11px;
  text-decoration: none;
}

.calendar-event:hover {
  border-color: #c8d2ff;
  background: linear-gradient(180deg, #f3f5ff 0%, #e8ecff 100%);
}

.calendar-event-title {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
  line-height: 1.25;
}

.calendar-event-meta {
  display: block;
  margin-top: 4px;
  font-size: 0.77rem;
  color: #52607d;
  line-height: 1.35;
}

.calendar-event-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border: 1px dashed #d6dcec;
  border-radius: 12px;
  font-size: 0.76rem;
  color: #6b7280;
  background: #fafbff;
}

.calendar-lists {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.9fr);
  gap: 18px;
}

.calendar-list-card {
  background: #fff;
  border: 1px solid #e2e5ec;
  border-radius: 24px;
  padding: 20px 22px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.05);
}

.calendar-list-card h2 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: 1.06rem;
}

.calendar-upcoming-list,
.calendar-undated-list {
  display: grid;
  gap: 10px;
}

.calendar-list-item {
  display: block;
  padding: 13px 14px;
  border: 1px solid #e7e9f0;
  border-radius: 16px;
  text-decoration: none;
  color: inherit;
  background: #fff;
}

.calendar-list-item:hover {
  border-color: #ccd3e4;
  background: #fafbff;
}

.calendar-list-item-title {
  display: block;
  font-weight: 600;
  font-size: 0.92rem;
}

.calendar-list-item-meta {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.4;
}

.calendar-empty-state {
  border: 1px dashed #d8dce7;
  border-radius: 18px;
  padding: 16px;
  color: var(--muted);
  background: #fafbfc;
}

@media (max-width: 1100px) {
  .calendar-lists {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .calendar-summary {
    grid-template-columns: 1fr;
  }

  .calendar-weekdays,
  .calendar-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .calendar-weekdays {
    display: none;
  }
}

@media (max-width: 640px) {
  .calendar-page main {
    padding: 14px 4vw 40px;
  }

  .calendar-board,
  .calendar-list-card {
    padding: 16px;
    border-radius: 20px;
  }

  .calendar-grid {
    grid-template-columns: 1fr;
  }

  .calendar-day {
    min-height: 0;
  }
}

.overview-page .header .dropdown-section.system-menu-section .dropdown-submenu {
  left: auto !important;
  right: 0 !important;
  min-width: 132px;
}

.overview-page .header .dropdown-section.system-menu-section .dropdown-submenu .menu-item {
  text-align: right;
  justify-content: flex-end;
}

.overview-page .dropdown-submenu,
.overview-page .dropdown-submenu--nested {
  position: absolute;
  top: 0;
  right: calc(100% + 2px);
  background: var(--surface);
  border-radius: 0;
  padding: 8px;
  box-shadow: none;
  border: none;
  min-width: 190px;
  display: block;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 0.24s ease, transform 0.32s ease, visibility 0.32s ease;
  z-index: 60000;
}

.overview-page .dropdown-menu.submenu-right .dropdown-submenu {
  left: auto;
  right: 0;
}

.overview-page .header .dropdown-section.is-open .dropdown-submenu,
.overview-page .header .dropdown-subitem.is-open .dropdown-submenu--nested {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.overview-page .menu-logo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  width: auto !important;
  flex: 0 0 auto;
  margin-left: 0;
  order: 0;
  padding: 0 22px 0 6px;
  border-radius: 0;
}

.overview-page .header .dropdown-menu > .menu-logo-link {
  width: auto !important;
  flex: 0 0 auto;
}

.overview-page .header .dropdown-menu > .dropdown-section > .dropdown-section-title {
  display: inline-flex !important;
  width: auto !important;
  white-space: nowrap;
}

.overview-page .menu-logo-link::before,
.overview-page .header-logo-link::before {
  content: "";
  display: block;
  width: 44px;
  height: 34px;
  background: url("/fearlessly-taylor-logo.png") center / contain no-repeat;
  transform: none;
}

.overview-page .header-logo-link {
  display: none;
  align-items: center;
  justify-content: center;
  min-height: var(--top-nav-height);
  padding: 0 6px;
  border-radius: 0;
  text-decoration: none;
  flex: 0 0 auto;
}

.overview-page .mobile-menu-toggle {
  display: none !important;
}

@media (max-width: 0px) {
  .overview-page .header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 4px 6px;
    background: var(--surface);
    z-index: 30000;
    flex-direction: row !important;
    justify-content: flex-start !important;
  }

  .overview-page {
    padding-top: 55px;
  }

  .overview-page .header .header-actions {
    order: 1 !important;
    margin-left: 0 !important;
    margin-right: auto !important;
  }

  .overview-page .header .header-actions > .dropdown > .menu-button {
    display: inline-flex;
    width: 38px;
    height: 38px;
    transform: translateY(-5px);
    border-radius: 0;
    border: none;
    background-color: transparent;
    box-shadow: none;
    font-size: 0;
    background-image:
      linear-gradient(#1f2d3f, #1f2d3f),
      linear-gradient(#1f2d3f, #1f2d3f),
      linear-gradient(#1f2d3f, #1f2d3f);
    background-size: 18px 2px, 18px 2px, 18px 2px;
    background-position: center 11px, center 18px, center 25px;
    background-repeat: no-repeat;
  }

  .overview-page .header .dropdown-menu {
    position: fixed;
    top: var(--top-nav-height);
    left: 0;
    right: auto;
    width: min(88vw, 340px);
    height: calc(100dvh - var(--top-nav-height));
    max-height: calc(100dvh - var(--top-nav-height));
    border: none;
    border-right: 1px solid #dde3ee;
    border-radius: 0;
    padding: 10px 10px 14px;
    overflow-y: auto;
    overflow-x: hidden;
    background: #fafafc;
    box-shadow: 14px 0 30px rgba(15, 23, 42, 0.16);
    display: block !important;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(-14px);
    transition: opacity 0.18s ease, transform 0.2s ease, visibility 0.2s ease;
  }

  .overview-page .header .dropdown-menu.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(0);
  }

  .overview-page .header .dropdown-section,
  .overview-page .header .dropdown-section:last-child {
    width: 100% !important;
    display: block !important;
    margin-left: 0 !important;
  }

  .overview-page .header .dropdown-section-title {
    width: 100%;
    min-height: 36px;
    padding: 8px 10px !important;
    justify-content: space-between;
    border-radius: 0;
    font-size: 12px !important;
    line-height: 1.1 !important;
    letter-spacing: 0.08em;
    background: #f0f1f4;
    color: #1f2937;
  }

  .overview-page .header .dropdown-section-title::after {
    content: "▸";
    margin-left: 8px;
    color: #667387;
    transition: transform 0.15s ease;
  }

  .overview-page .header .dropdown-section.is-open .dropdown-section-title::after {
    transform: rotate(90deg);
  }

  .overview-page .header .dropdown-submenu,
  .overview-page .header .dropdown-submenu--nested {
    position: static !important;
    border: none;
    box-shadow: none;
    display: none;
    margin: 6px 0 8px;
    padding: 6px;
    border-radius: 0;
    background: #f4f4f6;
  }

  .overview-page .header .dropdown-section.is-open .dropdown-submenu,
  .overview-page .header .dropdown-subitem.is-open .dropdown-submenu--nested {
    display: block;
  }

  .overview-page .header-logo-link {
    display: none;
    order: 4 !important;
    margin-right: -8px !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}

.card {
  background: var(--card);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 18px;
  border: 1px solid var(--border);
}


.card.highlight {
  border: 2px solid var(--primary);
  background: var(--highlight-bg);
}

h2 {
  margin: 0 0 10px;
  font-size: 1.6rem;
}

h3 {
  margin: 0;
  font-size: 1.2rem;
}

label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--muted);
}

input,
select,
button {
  font: inherit;
}

textarea {
  font: inherit;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  resize: vertical;
}

.primary-link {
  background: var(--primary);
  color: #fff;
  border: 1px solid transparent;
}

.primary-link:hover {
  background: var(--primary-dark);
}

input,
select {
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--input-bg);
  color: inherit;
  height: 44px;
  line-height: 1.2;
}

input[type="date"] {
  padding: 10px 12px;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  opacity: 0;
  display: none;
  pointer-events: none;
}

select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 40px;
  background-color: var(--input-bg);
  background-image: linear-gradient(45deg, transparent 50%, #6b7280 50%),
    linear-gradient(135deg, #6b7280 50%, transparent 50%),
    linear-gradient(to right, transparent, transparent);
  background-position: calc(100% - 18px) calc(1em + 2px),
    calc(100% - 12px) calc(1em + 2px),
    100% 0;
  background-size: 6px 6px, 6px 6px, 2.5em 2.5em;
  background-repeat: no-repeat;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

input:focus,
input:focus-visible,
select:focus,
select:focus-visible,
textarea:focus,
textarea:focus-visible {
  outline: none;
  border-color: #d9dde3;
  box-shadow: none;
}

button {
  border: none;
  padding: 10px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button:hover {
  transform: translateY(-1px);
}

.accept-page {
  max-width: 720px;
  margin: 40px auto;
  padding: 0 8vw;
}

.login-page {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.login-page .card {
  width: 100%;
  max-width: 420px;
}

.login-header {
  text-align: center;
  justify-content: center;
}

.align-card {
  max-width: 720px;
  margin: 40px auto 0;
  padding: 0 8vw;
  width: 100%;
}

.login-header > div {
  width: 100%;
}

.site-footer {
  text-align: center;
  font-size: 0.75rem;
  color: var(--muted);
  padding: 20px 24px 30px;
}

.wide-page {
  padding: 0 8vw 80px;
  margin: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.file-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--muted);
}

.file-actions .button-link {
  align-self: flex-start;
}

.file-actions .label {
  font-size: 0.85rem;
  color: var(--muted);
}

.contact-row .file-actions {
  padding-top: 22px;
}

.deal-docs {
  margin-top: 8px;
}

.accept-page h1 {
  margin-top: 0;
}

.accept-details {
  display: grid;
  gap: 8px;
  margin: 16px 0 20px;
  font-size: 0.95rem;
}

.accept-page .actions {
  margin-top: 16px;
}

.accept-map {
  margin: 16px 0;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.accept-map iframe {
  width: 100%;
  height: 260px;
  border: none;
  display: block;
}

button.primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 8px 20px rgba(95, 75, 255, 0.35);
}

button.primary:hover {
  background: var(--primary-dark);
}

button.ghost {
  background: #eff1ff;
  color: var(--primary);
}

.button-link.ghost {
  background: #eff1ff;
  color: var(--primary);
  padding: 10px 16px;
  border-radius: 999px;
}

.button-link {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid.two {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.overview-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(240px, 1fr));
}

#overview-tasks-section {
  margin-top: 14px;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: 0 5px;
  box-sizing: border-box;
}

#overview-shows-table-section {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

#overview-shows-table {
  gap: 0;
  overflow-x: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: #fff;
  font-size: 0.78rem;
}

#overview-shows-table .table-row {
  min-width: 0;
  grid-template-columns: 0.85fr 1.65fr 0.8fr 0.85fr 0.65fr 0.65fr 0.75fr 0.5fr 0.6fr 0.7fr 0.65fr 0.65fr 0.9fr 0.8fr;
  gap: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
}

#overview-shows-table .table-row > span:nth-child(2) {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#overview-shows-table .table-row > span:nth-child(3) {
  text-align: center;
  padding-top: 0;
  padding-bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

#overview-shows-table .table-row span {
  padding: 8px 8px;
  border-right: 1px solid var(--border);
  line-height: 1.2;
  overflow-wrap: anywhere;
}

#overview-shows-table .table-row span:last-child {
  border-right: 0;
}

#overview-shows-table .table-row span:nth-child(n + 4) {
  text-align: center;
}

#overview-shows-table .overview-ammo-managed-select {
  width: auto;
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  font: inherit;
  text-align: center;
  appearance: none;
  -webkit-appearance: none;
  box-shadow: none;
  line-height: 1.2;
  height: 1.2rem;
  min-height: 0;
  display: inline-block;
  vertical-align: middle;
}

#overview-shows-table .table-row span.status-positive {
  background: #ecfdf3;
  color: #166534;
  font-weight: 600;
}

body.ammo-unmanaged-view #venue-metrics-tiles,
body.ammo-unmanaged-view #header-email-pill,
body.ammo-unmanaged-view [data-ammo-managed-only] {
  display: none !important;
}

#overview-shows-table .table-row span.status-negative {
  background: #fef2f2;
  color: #b91c1c;
  font-weight: 600;
}

#overview-shows-table .table-row span.status-neutral {
  background: #f8fafc;
  color: var(--muted);
}

#overview-shows-table .table-row span.exclusions-none {
  color: #166534;
  font-weight: 600;
}

#overview-shows-table .table-row span.exclusions-has-value {
  color: #b91c1c;
  font-weight: 600;
}

#overview-shows-table .table-row .tickets-required-cell.status-good {
  background: #ecfdf3;
  color: #166534;
  font-weight: 600;
}

#overview-shows-table .table-row .tickets-required-cell.status-danger {
  background: #fef2f2;
  color: #b91c1c;
  font-weight: 600;
}

#overview-shows-table .table-row .facebook-posts-cell.status-good {
  background: #ecfdf3;
  color: #166534;
  font-weight: 600;
}

#overview-shows-table .table-row .facebook-posts-cell.status-danger {
  background: #fef2f2;
  color: #b91c1c;
  font-weight: 700;
}

#overview-shows-table .table-row.header {
  background: #f8fafc;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

#overview-shows-table .table-row:not(.header) {
  border-top: 1px solid var(--border);
  cursor: default;
}

#overview-shows-table .table-row:not(.header):hover {
  background: #f8fafc;
}

#overview-shows-table .table-row[data-show-id] span[data-col] {
  cursor: pointer;
}

#overview-shows-table .table-row span.blocked-date-conflict-cell {
  background: #fef2f2;
  color: #b91c1c;
  font-weight: 700;
}

#overview-shows-table-empty {
  margin: 8px 5vw 0;
}

@media (max-width: 900px) {
  #overview-shows-table .table-row.header {
    display: none;
  }

  #overview-shows-table .table-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 10px;
    padding: 10px;
    border-top: 1px solid var(--border);
    background: #fff;
  }

  #overview-shows-table .table-row span {
    padding: 0;
    border-right: 0;
  }

  #overview-shows-table .table-row span::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 2px;
    color: var(--muted);
    font-size: 0.66rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
  }
}

#overview-task-tiles {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

@media (max-width: 1100px) {
  .overview-grid {
    grid-template-columns: repeat(2, minmax(240px, 1fr));
  }

  #overview-task-tiles {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .overview-grid {
    grid-template-columns: minmax(240px, 1fr);
  }

  #overview-task-tiles {
    grid-template-columns: minmax(240px, 1fr);
  }
}

.overview-controls {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.overview-controls label {
  min-width: 200px;
}

.overview-range {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.85rem;
  background: var(--input-bg);
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
}

.mobile-only {
  display: none;
}

.desktop-only {
  display: inline;
}

.quick-assign-grid {
  display: grid;
  gap: 16px;
}

.quick-assign-group {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  background: var(--input-bg);
}

.quick-assign-group h4 {
  margin: 0 0 10px;
  font-size: 1rem;
}

.quick-assign-list {
  display: grid;
  gap: 8px;
}

.quick-assign-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
}

.quick-assign-row span {
  color: var(--muted);
  font-size: 0.8rem;
}

.quick-assign-row.assigned {
  border-color: #4ade80;
  background: #f0fdf4;
}

#quick-personnel-dialog,
#quick-personnel-assign-dialog {
  position: fixed;
  top: 50% !important;
  left: 50%;
  margin: 0;
  transform: translate(-50%, -50%) scale(0.985);
  width: min(1120px, 96vw);
}

#quick-personnel-dialog[open],
#quick-personnel-assign-dialog[open] {
  transform: translate(-50%, -50%) scale(1);
}

#quick-personnel-dialog.dialog-closing,
#quick-personnel-assign-dialog.dialog-closing {
  transform: translate(-50%, -50%) scale(0.985);
}

#quick-personnel-dialog .dialog-form,
#quick-personnel-assign-dialog .dialog-form {
  width: 100%;
  max-height: min(82vh, 900px);
  overflow: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
}

#blocked-dates-dialog .dialog-form.blocked-dates-dialog-form {
  width: min(1180px, 96vw);
  max-width: min(1180px, 96vw);
}

#blocked-dates-table {
  gap: 0;
  overflow-x: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: #fff;
  font-size: 0.78rem;
}

#blocked-dates-table .table-row {
  min-width: 0;
  grid-template-columns: 0.95fr 0.95fr 3fr 0.75fr 0.75fr;
  gap: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
}

#blocked-dates-table .table-row span {
  padding: 8px 8px;
  border-right: 1px solid var(--border);
  line-height: 1.2;
  overflow-wrap: anywhere;
  display: flex;
  align-items: center;
  min-height: 33px;
}

#blocked-dates-table .table-row span:last-child {
  border-right: 0;
}

#blocked-dates-table .table-row.header {
  background: #f8fafc;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

#blocked-dates-table .table-row:not(.header) {
  border-top: 1px solid var(--border);
}

#blocked-dates-table .table-row:not(.header):hover {
  background: #f8fafc;
}

#blocked-dates-table input {
  width: 100%;
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  box-shadow: none;
  font: inherit;
  line-height: 1.2;
  height: 1.2rem;
  min-height: 0;
  display: block;
}

#blocked-dates-table input:focus {
  outline: none;
  box-shadow: none;
  background: transparent;
}

#blocked-dates-table .row-actions {
  justify-content: center;
}

#blocked-dates-table .row-actions .ghost {
  width: auto;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #111827;
  font: inherit;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

#blocked-dates-table .row-actions .ghost:hover {
  color: #0f62fe;
}

#blocked-dates-table .table-row span.blocked-date-conflict-cell {
  background: #fef2f2;
  color: #b91c1c;
  font-weight: 700;
}

#quick-personnel-assign-dialog .dialog-actions,
#quick-personnel-dialog .dialog-actions {
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: 10px;
  position: sticky;
  bottom: 0;
  background: var(--card);
  padding-top: 8px;
}

#quick-personnel-assign-dialog .dialog-actions .ghost,
#quick-personnel-assign-dialog .dialog-actions .primary,
#quick-personnel-dialog .dialog-actions .ghost,
#quick-personnel-dialog .dialog-actions .primary,
#quick-personnel-assign-dialog .quick-assign-toggle,
#quick-personnel-list .row-actions .ghost {
  border-radius: 10px;
  min-height: 36px;
  padding: 8px 12px;
  font-size: 0.86rem;
  line-height: 1.2;
}

#quick-personnel-list {
  overflow: auto;
}

#default-personnel-dialog {
  position: fixed;
  top: 50% !important;
  left: 50%;
  margin: 0;
  transform: translate(-50%, -50%) scale(0.985);
  width: min(1120px, 96vw);
}

#default-personnel-dialog[open] {
  transform: translate(-50%, -50%) scale(1);
}

#default-personnel-dialog.dialog-closing {
  transform: translate(-50%, -50%) scale(0.985);
}

#default-personnel-dialog .dialog-form {
  width: 100%;
  max-height: min(82vh, 900px);
  overflow: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
}

#default-personnel-dialog .dialog-actions {
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: 10px;
  position: sticky;
  bottom: 0;
  background: var(--card);
  padding-top: 8px;
}

#personnel-expense-dialog {
  position: fixed;
  top: 50% !important;
  left: 50%;
  margin: 0;
  transform: translate(-50%, -50%) scale(0.985);
  width: min(760px, 94vw);
  border: none;
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

#personnel-expense-dialog[open] {
  transform: translate(-50%, -50%) scale(1);
}

#personnel-expense-dialog.dialog-closing {
  transform: translate(-50%, -50%) scale(0.985);
}

#personnel-expense-dialog .dialog-form {
  width: 100%;
  max-height: min(84vh, 860px);
  overflow: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
  gap: 12px;
}

#personnel-expense-dialog h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1rem;
  color: #1d1d1f;
}

#personnel-expense-dialog .grid.two {
  gap: 10px 12px;
}

#personnel-expense-dialog label {
  display: grid;
  gap: 6px;
  font-size: 0.86rem;
  color: #3f4650;
}

#personnel-expense-dialog input,
#personnel-expense-dialog select {
  border: 1px solid #d9dde3;
  border-radius: 0;
  box-shadow: none;
  background: #fff;
  font-size: 0.88rem;
  min-height: 36px;
  padding: 8px 10px;
}

#personnel-expense-dialog .dialog-actions {
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: 10px;
  position: sticky;
  bottom: 0;
  background: #fff;
  padding-top: 8px;
  margin-top: 2px;
}

#personnel-expense-dialog .dialog-actions .ghost,
#personnel-expense-dialog .dialog-actions .primary {
  border-radius: 0;
  min-height: 36px;
  box-shadow: none;
  padding: 8px 12px;
  font-size: 0.86rem;
}

#personnel-expense-dialog .dialog-actions .ghost {
  border: 1px solid #d9dde3;
  background: #fff;
  color: #1d1d1f;
}

#personnel-expense-dialog .dialog-actions .primary {
  border: 1px solid #1d1d1f;
  background: #1d1d1f;
  color: #fff;
}

#personnel-expense-dialog .dialog-actions .ghost:hover,
#personnel-expense-dialog .dialog-actions .primary:hover {
  transform: none;
}

#default-personnel-dialog .dialog-actions .ghost,
#default-personnel-dialog .dialog-actions .primary,
#default-personnel-dialog .quick-assign-toggle {
  border-radius: 10px;
  min-height: 36px;
  padding: 8px 12px;
  font-size: 0.86rem;
  line-height: 1.2;
}

#default-personnel-dialog .quick-assign-toggle {
  min-width: 88px;
}

@media (max-width: 900px) {
  #quick-personnel-dialog,
  #quick-personnel-assign-dialog {
    width: min(94vw, 560px);
  }

  #quick-personnel-dialog .dialog-form,
  #quick-personnel-assign-dialog .dialog-form {
    width: min(94vw, 560px);
    overflow-x: hidden;
    max-height: 86vh;
  }

  #default-personnel-dialog .dialog-form {
    max-height: 86vh;
  }

  .quick-assign-grid {
    grid-template-columns: 1fr;
  }

  .quick-assign-row {
    grid-template-columns: 1fr;
    align-items: flex-start;
  }

  .quick-assign-row .quick-assign-toggle {
    width: 100%;
  }
}

#quick-personnel-list .table-row {
  grid-template-columns: 1.4fr 0.8fr 0.7fr 260px;
  min-width: 760px;
}

#quick-personnel-list .table-row .row-actions {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
  justify-content: flex-end;
}

#quick-personnel-list .table-row .row-actions button {
  white-space: nowrap;
}

.profit-inclusion-item {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.profit-inclusion-item select {
  max-width: 140px;
}

.profit-inclusion-item.included {
  border-color: #4ade80;
  background: #f0fdf4;
}

.profit-inclusion-item.excluded {
  border-color: #f87171;
  background: #fff5f5;
}

.overview-tile {
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--card);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 130px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.overview-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.12);
}

.overview-tile.is-filter-active {
  border-color: #111827;
  box-shadow: inset 0 0 0 1px #111827;
}

.overview-legend-pill {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--highlight-bg);
  color: var(--muted);
  font-size: 0.82rem;
  white-space: nowrap;
}

.overview-legend-pill span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.overview-tile-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.overview-analytics-graph {
  display: none;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  flex: 1;
}

.overview-analytics-title {
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

#overview-show-tiles.show-analytics .overview-tile-info {
  display: none;
}

#overview-show-tiles.show-analytics .overview-analytics-graph {
  display: flex;
}

.overview-analytics-graph .analytics-timeline {
  width: 100%;
  height: 150px;
}

.overview-analytics-graph .analytics-timeline svg {
  width: 100%;
  height: 100%;
}

.overview-analytics-note {
  display: none;
}

#overview-show-tiles.show-analytics .overview-tile {
  min-height: 130px;
}

#overview-show-tiles.show-analytics .overview-badges .status-pill {
  display: none;
}

.payment-total {
  background: var(--highlight-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 16px 0 6px;
}

.payment-total .label {
  color: var(--muted);
  font-size: 0.9rem;
}

.payment-total strong {
  font-size: 1.6rem;
  letter-spacing: 0.3px;
}

#merch-payment-dialog {
  border: none;
  border-radius: 16px;
  padding: 22px;
  width: min(560px, 92vw);
  box-shadow: var(--shadow);
}

#venue-hire-dialog {
  width: min(720px, 94vw);
}

#facebook-marketing-dialog {
  width: min(760px, 94vw);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.card-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.show-files-table {
  display: grid;
  gap: 0;
  border: 1px solid #d9dde3;
  width: 100%;
  overflow: auto;
  min-height: 0;
  flex: 1 1 auto;
}

.show-files-table .table-row {
  min-width: 960px;
  gap: 0;
  grid-template-columns: 1.5fr 1.5fr 0.9fr 0.7fr 0.9fr 130px;
  align-items: center;
}

.show-files-table .table-row.header {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #6e6e73;
  background: #f8f9fb;
  border-bottom: 1px solid #d9dde3;
}

.show-files-table .table-row > span {
  padding: 8px 10px;
}

.show-files-table .table-row:not(.header) {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  border-bottom: 1px solid #d9dde3;
  background: #fff;
}

.show-files-table .table-row:last-child {
  border-bottom: 0;
}

.show-files-table .row-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  white-space: nowrap;
}

.show-files-table .row-actions .ghost {
  border: 1px solid #d9dde3;
  border-radius: 0;
  background: #fff;
  color: #1d1d1f;
  box-shadow: none;
  min-height: 32px;
  padding: 6px 10px;
}

.show-files-table .row-actions .ghost:hover {
  transform: none;
  background: #fff;
}

@media (max-width: 900px) {
  .show-files-table .table-row {
    min-width: 860px;
  }
}

#analytics-visitors-dialog {
  border: none;
  border-radius: 16px;
  padding: 20px;
  width: min(1280px, 98vw);
  box-shadow: var(--shadow);
}

#overview-analytics-dialog {
  border: none;
  border-radius: 16px;
  padding: 20px;
  width: min(980px, 96vw);
  box-shadow: var(--shadow);
}

#overview-analytics-dialog .analytics-timeline {
  width: 100%;
  height: 320px;
}

#overview-analytics-dialog .analytics-timeline svg {
  width: 100%;
  height: 100%;
}

#overview-site-analytics-dialog {
  border: none;
  border-radius: 16px;
  padding: 20px;
  width: min(1120px, 96vw);
  box-shadow: var(--shadow);
}

#overview-site-analytics-dialog .dialog-form {
  gap: 16px;
}

#overview-site-analytics-dialog .table {
  gap: 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: #fff;
  font-size: 0.78rem;
  max-height: 70vh;
  overflow: auto;
}

#overview-site-analytics-dialog .table-row {
  grid-template-columns: minmax(320px, 1.8fr) 120px 120px 120px;
  min-width: 0;
  gap: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  align-items: start;
}

#overview-site-analytics-dialog .table-row > span {
  padding: 8px 8px;
  border-right: 1px solid var(--border);
  line-height: 1.2;
  overflow-wrap: anywhere;
}

#overview-site-analytics-dialog .table-row > span:last-child {
  border-right: 0;
}

#overview-site-analytics-dialog .table-row > span:nth-child(n + 2) {
  text-align: center;
}

#overview-site-analytics-dialog .table-row.header {
  background: #f8fafc;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

#overview-site-analytics-dialog .table-row:not(.header) {
  border-top: 1px solid var(--border);
}

#overview-site-analytics-dialog .table-row:not(.header):hover {
  background: #f8fafc;
}

#overview-site-analytics-dialog .table-row span:first-child {
  display: grid;
  gap: 4px;
}

#overview-site-analytics-dialog .table-row span:first-child strong {
  font-weight: 600;
}

#analytics-visitors-dialog .table {
  max-height: 70vh;
  overflow: auto;
}

#analytics-referrers-dialog {
  border: none;
  border-radius: 16px;
  padding: 20px;
  width: min(720px, 94vw);
  box-shadow: var(--shadow);
}

#analytics-page-url-dialog {
  border: none;
  border-radius: 16px;
  padding: 20px;
  width: min(560px, 92vw);
  box-shadow: var(--shadow);
}

.analytics-timeline {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  padding: 12px;
  background: linear-gradient(140deg, rgba(248, 250, 252, 0.92), rgba(226, 232, 240, 0.35));
  min-height: 200px;
}

.analytics-timeline svg {
  display: block;
  width: 100%;
  height: auto;
}

.analytics-timeline-grid {
  stroke: rgba(15, 23, 42, 0.1);
  stroke-dasharray: 4 6;
}

.analytics-timeline-axis {
  stroke: rgba(15, 23, 42, 0.28);
}

.analytics-timeline-label {
  fill: rgba(15, 23, 42, 0.65);
  font-size: 11px;
}

.analytics-timeline-line {
  fill: none;
  stroke-width: 3;
}

.analytics-timeline-line.views {
  stroke: #2563eb;
}

.analytics-timeline-line.cta {
  stroke: #f97316;
}

.analytics-timeline-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
  font-size: 0.8rem;
  color: var(--muted);
}

.analytics-timeline-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.analytics-timeline-swatch {
  width: 14px;
  height: 6px;
  border-radius: 999px;
}

.analytics-timeline-swatch.is-views {
  background: #2563eb;
}

.analytics-timeline-swatch.is-cta {
  background: #f97316;
}

#show-files-upload-dialog {
  border: none;
  border-radius: 16px;
  padding: 20px;
  width: min(520px, 92vw);
  box-shadow: var(--shadow);
}

#show-files-dialog {
  position: fixed;
  top: 50%;
  left: 50%;
  margin: 0;
  border: 1px solid #d9dde3;
  border-radius: 0;
  padding: 16px;
  width: min(1360px, 98vw);
  height: min(88dvh, 960px);
  box-shadow: none;
  background: #fff;
  transform: translate(-50%, -48%) scale(0.985);
}

#show-files-dialog[open] {
  transform: translate(-50%, -50%) scale(1);
}

#show-files-dialog.dialog-closing {
  transform: translate(-50%, -48%) scale(0.985);
}

#show-files-dialog .dialog-form {
  height: 100%;
  min-height: 0;
  overflow: hidden;
  gap: 12px;
}

#show-files-dialog .subsection-header {
  margin: 0;
}

#show-files-dialog h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1rem;
  color: #1d1d1f;
}

#show-files-dialog .card-actions .ghost {
  border: 1px solid #d9dde3;
  border-radius: 0;
  box-shadow: none;
  background: #fff;
  color: #1d1d1f;
  min-height: 34px;
}

#show-files-dialog .card-actions .ghost:hover {
  transform: none;
  background: #fff;
}

#show-files-dialog #show-files-modal-empty {
  margin: 0;
}


.show-emails-table {
  overflow-x: auto;
}

#show-emails .summary-grid {
  margin-bottom: 12px;
}

.show-emails-table .table-row {
  min-width: 980px;
}

.show-emails-table .table-row > span {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.show-emails-table .cell-to {
  font-size: 0.82rem;
  line-height: 1.2;
}

.show-emails-table .cell-subject {
  line-height: 1.25;
}

.show-emails-table .table-row.email-unread {
  border-left: 4px solid #dc2626;
  background: rgba(220, 38, 38, 0.08);
}

.show-emails-table .table-row.email-read {
  border-left: 4px solid #16a34a;
  background: rgba(22, 163, 74, 0.08);
}

#show-email-settings-dialog {
  border: 1px solid #d9dde3;
  border-radius: 0;
  padding: 16px;
  width: min(940px, 96vw);
  box-shadow: none;
  background: #fff;
}

#show-email-settings-dialog .dialog-form {
  gap: 14px;
  max-height: calc(100dvh - 140px);
  overflow: auto;
  padding-right: 4px;
}

#show-email-settings-dialog h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1rem;
  color: #1d1d1f;
}

#show-email-settings-dialog .grid.two {
  gap: 12px;
}

#show-email-settings-dialog label {
  display: grid;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 0.86rem;
  color: #3f4650;
}

#show-email-settings-dialog input,
#show-email-settings-dialog select {
  width: 100%;
  border: 1px solid #d9dde3;
  border-radius: 0;
  box-shadow: none;
  min-height: 40px;
  padding: 8px 10px;
  font-family: var(--font-body);
  font-size: 0.84rem;
  color: #1d1d1f;
  background: #fff;
  line-height: 1.2;
}

#show-email-settings-dialog input:focus,
#show-email-settings-dialog select:focus {
  outline: none;
  border-color: #1d1d1f;
}

#show-email-settings-dialog .subsection-header {
  justify-content: flex-start;
  margin-bottom: 8px;
  padding-right: 0;
}

#show-email-settings-dialog .subsection-header h4 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.9rem;
  color: #1d1d1f;
}

#show-email-settings-dialog .inline-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  max-width: none;
  margin-bottom: 10px;
}

#show-email-settings-dialog .recipient-inline-field {
  display: flex;
  flex-wrap: nowrap;
  width: 100%;
  gap: 8px;
  align-items: center;
}

#show-email-settings-dialog #show-email-recipient-input {
  flex: 1 1 auto;
  min-width: 0;
}

#show-email-settings-dialog #show-email-recipient-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 132px 140px !important;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: none !important;
  margin-bottom: 10px;
}

#show-email-settings-dialog #show-email-recipient-row > * {
  min-width: 0;
}

#show-email-settings-dialog .ghost {
  background: #fff;
  color: #1d1d1f;
  border: 1px solid #d9dde3;
  border-radius: 0;
  box-shadow: none;
  min-height: 36px;
  padding: 8px 12px;
  font-size: 0.82rem;
  line-height: 1.1;
  white-space: nowrap;
}

#show-email-settings-dialog #show-email-recipient-tag {
  flex: 0 0 132px;
  width: 132px !important;
  min-width: 132px !important;
  max-width: 132px !important;
  -webkit-appearance: auto;
  appearance: auto;
  background-image: none;
}

#show-email-settings-dialog #add-show-email-recipient {
  flex: 0 0 140px;
  width: 140px !important;
  min-width: 140px !important;
  padding-inline: 10px;
}

#show-email-settings-dialog .ghost:hover {
  transform: none;
  background: #fff;
}

#show-email-settings-dialog #show-email-domains-table,
#show-email-settings-dialog #show-email-recipients-table {
  display: grid;
  gap: 0;
  border: 1px solid #d9dde3;
  width: 100%;
}

#show-email-settings-dialog #show-email-domains-table .table-row {
  min-width: 0;
  gap: 0;
  grid-template-columns: 1.4fr 120px;
  align-items: center;
}

#show-email-settings-dialog #show-email-recipients-table .table-row {
  min-width: 0;
  gap: 0;
  grid-template-columns: 1.2fr 0.9fr 120px;
  align-items: center;
}

#show-email-settings-dialog #show-email-domains-table .table-row.header,
#show-email-settings-dialog #show-email-recipients-table .table-row.header {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #6e6e73;
  background: #f8f9fb;
  border-bottom: 1px solid #d9dde3;
}

#show-email-settings-dialog #show-email-domains-table .table-row > *,
#show-email-settings-dialog #show-email-recipients-table .table-row > * {
  padding: 10px 12px;
  font-size: 0.82rem;
}

#show-email-settings-dialog #show-email-domains-table .table-row:not(.header),
#show-email-settings-dialog #show-email-recipients-table .table-row:not(.header) {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  border-bottom: 1px solid #d9dde3;
  background: #fff;
}

#show-email-settings-dialog #show-email-domains-table .table-row:last-child,
#show-email-settings-dialog #show-email-recipients-table .table-row:last-child {
  border-bottom: 0;
}

#show-email-settings-dialog #show-email-domains-table .table-row .ghost,
#show-email-settings-dialog #show-email-recipients-table .table-row .ghost {
  justify-self: end;
  margin-right: 0;
  min-width: 86px;
}

#show-email-settings-dialog .dialog-actions .primary {
  background: #1d1d1f;
  color: #fff;
  border: 1px solid #1d1d1f;
  border-radius: 0;
  box-shadow: none;
  min-height: 40px;
  padding: 8px 12px;
  font-size: 0.82rem;
}

#show-email-settings-dialog .dialog-actions .primary:hover {
  background: #111;
  border-color: #111;
  transform: none;
}

#show-email-tag-dialog {
  border: none;
  border-radius: 16px;
  padding: 20px;
  width: min(520px, 92vw);
  box-shadow: var(--shadow);
}

#show-email-forward-dialog {
  border: none;
  border-radius: 16px;
  padding: 20px;
  width: min(520px, 92vw);
  box-shadow: var(--shadow);
}

#show-email-viewer-dialog {
  border: none;
  border-radius: 16px;
  padding: 20px;
  width: min(1200px, 96vw);
  box-shadow: var(--shadow);
}

#show-email-reply-dialog {
  position: fixed;
  top: 50%;
  left: 50%;
  margin: 0;
  transform: translate(-50%, -48%) scale(0.985);
  border: 1px solid #d9dde3;
  border-radius: 0;
  padding: 14px;
  width: min(1400px, 98vw);
  height: min(92dvh, 980px);
  box-shadow: none;
  background: #fff;
}

#show-email-reply-dialog[open] {
  transform: translate(-50%, -50%) scale(1);
}

#show-email-reply-dialog.dialog-closing {
  transform: translate(-50%, -48%) scale(0.985);
}

#show-email-reply-dialog .dialog-form {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
}

#show-email-reply-dialog h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1rem;
  color: #1d1d1f;
}

#show-email-reply-dialog label {
  display: grid;
  gap: 6px;
  font-family: var(--font-body);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #3f4650;
  font-weight: 600;
}

#show-email-reply-dialog input,
#show-email-reply-dialog select,
#show-email-reply-dialog textarea {
  border: 1px solid #d9dde3;
  border-radius: 0;
  box-shadow: none;
  background: #fff;
  color: #1d1d1f;
  min-height: 36px;
  height: 36px;
  padding: 8px 10px;
  font-size: 0.84rem;
}

#show-email-reply-dialog input:focus,
#show-email-reply-dialog select:focus,
#show-email-reply-dialog textarea:focus {
  outline: none;
  border-color: #1d1d1f;
  box-shadow: none;
}

#show-email-reply-dialog .grid.two {
  gap: 10px;
  flex: 0 0 auto;
}

#show-email-reply-dialog .email-editor-block {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#show-email-reply-dialog .email-editor-toolbar {
  border: 1px solid #d9dde3;
  border-radius: 0;
  background: #fff;
  padding: 8px;
  margin-bottom: 0;
  flex: 0 0 auto;
}

#show-email-reply-dialog .email-editor-toolbar .toolbar-btn {
  border: 1px solid #d9dde3;
  border-radius: 0;
  background: #fff;
}

#show-email-reply-dialog .email-editor-toolbar .toolbar-btn:hover {
  border-color: #1d1d1f;
  background: #fff;
  color: #1d1d1f;
}

#show-email-reply-dialog .email-editor-toolbar .toolbar-select select {
  border: 1px solid #d9dde3;
  border-radius: 0;
  background: #fff;
}

#show-email-reply-dialog .email-editor {
  flex: 1 1 auto;
  min-height: 0;
  border: 1px solid #d9dde3;
  border-radius: 0;
  padding: 10px;
  background: #fff;
  overflow: auto;
}

#show-email-reply-dialog #show-email-reply-attachments {
  height: auto;
  min-height: 36px;
}

#show-email-reply-dialog #show-email-include-original-wrap {
  flex: 0 0 auto;
}

#show-email-reply-dialog #show-email-include-original-wrap .inline-checkbox {
  margin-top: 0;
  gap: 8px;
  font-size: 0.82rem;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
  color: #3f4650;
}

#show-email-reply-dialog #show-email-reply-include-original {
  width: 16px;
  min-width: 16px;
  max-width: 16px;
  height: 16px;
  min-height: 16px;
  margin: 0;
  padding: 0;
  border: 1px solid #d9dde3;
  border-radius: 0;
  box-shadow: none;
  appearance: auto;
  -webkit-appearance: checkbox;
  background: #fff;
}

#show-email-reply-dialog .dialog-actions {
  flex: 0 0 auto;
}

#show-email-reply-dialog .dialog-actions .ghost,
#show-email-reply-dialog .dialog-actions .primary {
  border-radius: 0;
  min-height: 36px;
  box-shadow: none;
}

#show-email-reply-dialog .dialog-actions .ghost {
  border: 1px solid #d9dde3;
  background: #fff;
  color: #1d1d1f;
}

#show-email-reply-dialog .dialog-actions .primary {
  border: 1px solid #1d1d1f;
  background: #1d1d1f;
  color: #fff;
}

#system-message-dialog {
  border: none;
  border-radius: 16px;
  padding: 20px;
  width: min(420px, 90vw);
  box-shadow: var(--shadow);
}

#system-message-dialog.status-negative h3 {
  color: #f87171;
}

#system-message-dialog.status-positive h3 {
  color: #34d399;
}

.email-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.email-editor-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--muted);
}

.email-editor-block label {
  font-weight: 500;
}

.email-editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--input-bg);
  margin-bottom: 10px;
  user-select: none;
}

.email-editor-toolbar .toolbar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  cursor: pointer;
  user-select: none;
}

.email-editor-toolbar .toolbar-btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  stroke: currentColor;
  display: block;
  min-width: 16px;
  min-height: 16px;
  opacity: 0.75;
}

.email-editor-toolbar .toolbar-btn:hover {
  border-color: var(--primary);
  background: var(--highlight-bg);
  color: var(--primary);
}

.email-editor-toolbar .toolbar-btn:active {
  transform: translateY(1px);
}

.email-editor-toolbar .toolbar-divider {
  width: 1px;
  height: 24px;
  background: var(--border);
}

.email-editor-toolbar .toolbar-select {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--muted);
  padding-left: 4px;
}

.email-editor-toolbar .toolbar-select select {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 4px 8px;
  height: 34px;
}

.email-attachments {
  margin-bottom: 16px;
}

.email-attachments h4 {
  margin: 0 0 8px;
}

.attachments-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.attachments-list a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eff1ff;
  color: var(--primary);
  text-decoration: none;
  font-size: 0.8rem;
}

.email-body {
  background: var(--input-bg);
  border-radius: 12px;
  padding: 16px;
  max-height: 60vh;
  overflow: auto;
}

.email-editor {
  min-height: 200px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: #fff;
}

input.is-readonly {
  background: #f1f5f9;
  color: var(--muted);
  cursor: not-allowed;
}

.inline-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

@media (max-width: 720px) {
  #show-email-reply-dialog,
  #show-email-viewer-dialog {
    width: min(96vw, 560px);
    padding: 16px;
  }

  #show-emails-dialog {
    inset: 0;
  }

  .email-workspace-form {
    padding: 12px;
  }

  .email-workspace-shell {
    grid-template-columns: 1fr;
  }

  .email-workspace-sidebar {
    border-right: none;
    border-bottom: 1px solid var(--border);
    max-height: 52vh;
  }

  .filters-row {
    grid-template-columns: 1fr;
  }

  .email-inbox-row {
    min-height: 72px;
    padding: 4px 10px;
  }

  .email-inbox-line {
    min-height: 64px;
    grid-template-columns: minmax(90px, 130px) minmax(0, 1fr) minmax(86px, 102px);
    gap: 8px;
  }

  .email-inbox-sender {
    font-size: 0.78rem;
  }

  .email-inbox-subject {
    font-size: 0.79rem;
  }

  .email-inbox-snippet {
    font-size: 0.74rem;
  }

  .email-inbox-snippet {
    -webkit-line-clamp: 1;
    min-height: 1.2em;
  }

  #show-email-reply-dialog .grid.two {
    grid-template-columns: 1fr;
  }

  .email-editor-toolbar {
    gap: 6px;
    padding: 8px;
    position: sticky;
    top: 0;
    z-index: 1;
  }

  .email-editor-toolbar .toolbar-btn {
    width: 30px;
    height: 30px;
  }

  .email-editor-toolbar .toolbar-btn svg {
    width: 15px;
    height: 15px;
    min-width: 15px;
    min-height: 15px;
  }

  .email-editor-toolbar .toolbar-select select {
    height: 30px;
    padding: 4px 6px;
  }

  .email-editor {
    min-height: 180px;
  }

  .email-meta-grid {
    grid-template-columns: 1fr;
  }

  .dialog-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .dialog-actions button {
    width: 100%;
  }
}

@media (max-width: 1024px) {
  .show-emails-table {
    overflow-x: visible;
  }

  .show-emails-table .table-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    min-width: 0;
    padding: 12px;
  }

  .show-emails-table .table-row.header {
    display: none;
  }

  .show-emails-table .table-row > span {
    display: grid;
    grid-template-columns: minmax(0, 140px) 1fr;
    gap: 10px;
  }

  .show-emails-table .table-row > span::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.78rem;
  }

  .show-emails-table .row-actions {
    display: flex;
    gap: 8px;
  }
}

.notification-banner {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 2000;
  max-width: min(420px, 92vw);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 16px;
  background: #0f172a;
  color: #f8fafc;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.25);
}

.notification-banner .notification-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.95rem;
}

.notification-banner .notification-text strong {
  font-weight: 600;
}

.notification-banner .notification-text span {
  color: rgba(248, 250, 252, 0.8);
  font-size: 0.85rem;
}

.notification-banner .notification-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.notification-banner .primary {
  background: #38bdf8;
  color: #0f172a;
}

.notification-banner .ghost {
  color: #e2e8f0;
  border-color: rgba(248, 250, 252, 0.4);
}

.meta-alert-banner {
  position: fixed;
  left: 20px;
  right: 20px;
  bottom: 20px;
  z-index: 2600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #fff7ed;
  color: #7c2d12;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.18);
}

.meta-alert-banner.hidden {
  display: none;
}

.meta-alert-banner.is-critical {
  background: #7f1d1d;
  color: #fef2f2;
  border-color: rgba(255, 255, 255, 0.08);
}

.meta-alert-banner.is-warning {
  background: #fff7ed;
  color: #7c2d12;
}

.meta-alert-banner.is-info {
  background: #eff6ff;
  color: #1e3a8a;
}

.meta-alert-banner__text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.meta-alert-banner__text strong {
  font-weight: 700;
}

.meta-alert-banner__text span {
  font-size: 0.9rem;
  line-height: 1.35;
}

.meta-alert-banner__actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.meta-alert-banner.is-critical .ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.28);
}

.meta-alert-banner.is-critical .primary {
  background: #fff;
  color: #7f1d1d;
}

@media (max-width: 720px) {
  .meta-alert-banner {
    left: 12px;
    right: 12px;
    bottom: 12px;
    flex-direction: column;
    align-items: flex-start;
  }

  .meta-alert-banner__actions {
    width: 100%;
    justify-content: flex-end;
  }
}

@media (max-width: 640px) {
  .notification-banner {
    left: 16px;
    right: 16px;
    bottom: 16px;
    flex-direction: column;
    align-items: flex-start;
  }

.notification-banner .notification-actions {
  width: 100%;
  justify-content: flex-end;
}
}

.email-import-overlay {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  z-index: 2600;
  min-width: 220px;
  max-width: min(92vw, 560px);
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid #d9dde3;
  background: #ffffff;
  color: #1d1d1f;
  font-size: 0.86rem;
  font-weight: 600;
  text-align: center;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.14);
  pointer-events: none;
}

.email-import-overlay.hidden {
  display: none;
}

.email-import-overlay.is-loading {
  border-color: #cdd5df;
  background: #f8f9fb;
  color: #1d1d1f;
}

.email-import-overlay.is-success {
  border-color: #b7ebd5;
  background: #ecfdf3;
  color: #166534;
}

.email-import-overlay.is-error {
  border-color: #f2b8b5;
  background: #fff1f1;
  color: #b42318;
}

#overview-payments-dialog {
  width: min(1180px, 97vw);
}

#overview-payments-dialog .dialog-form {
  max-height: calc(100dvh - 120px);
  overflow: auto;
}

.overview-payments-accordion {
  display: grid;
  gap: 10px;
}

.overview-payments-accordion .section-cost-indicator {
  border: 1px solid #d9dde3;
  background: #f8f9fb;
  color: #1d1d1f;
  padding: 4px 10px;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.overview-payments-accordion .section-cost-indicator.is-income {
  background: rgba(16, 185, 129, 0.14);
  border-color: rgba(16, 185, 129, 0.3);
  color: #166534;
}

.overview-payments-accordion .section-cost-indicator-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

#overview-payments-dialog .overview-payments-members-table .table-row {
  min-width: 0;
  gap: 0;
  grid-template-columns: minmax(0, 1.85fr) minmax(90px, 0.7fr) minmax(90px, 0.6fr) minmax(82px, 0.55fr) minmax(112px, 0.7fr);
  align-items: center;
}

#overview-payments-dialog .overview-payments-members-table .table-row > * {
  min-width: 0;
}

#overview-payments-dialog .overview-payments-members-table .table-row.header {
  font-size: 0.72rem;
}

#overview-payments-dialog .overview-payments-members-table .table-row.header > * {
  white-space: nowrap;
}

#overview-payments-dialog .overview-payments-members-table .table-row > *:last-child {
  display: flex;
  justify-content: flex-end;
  white-space: nowrap;
}

#overview-payments-dialog .overview-payments-members-table .overview-payment-toggle {
  white-space: nowrap;
}

#overview-payments-dialog .overview-payments-members-table .table-row.paid {
  background: rgba(16, 185, 129, 0.13);
}

#overview-payments-dialog .overview-payments-members-table .table-row.unpaid {
  background: rgba(239, 68, 68, 0.11);
}

#overview-payments-dialog .overview-payments-members-table .table-row.paid:not(.header) {
  border-bottom-color: rgba(16, 185, 129, 0.2);
}

#overview-payments-dialog .overview-payments-members-table .table-row.unpaid:not(.header) {
  border-bottom-color: rgba(239, 68, 68, 0.18);
}

#overview-show-detail-dialog {
  padding: 0;
  width: min(980px, 96vw);
  overflow: visible;
  position: fixed;
  top: 50% !important;
  left: 50%;
  margin: 0;
  transform: translate(-50%, -49%) scale(0.985);
}

#overview-show-detail-dialog .dialog-form {
  --detail-pad-left: 10px;
  --detail-pad-right: 18px;
  padding: 18px var(--detail-pad-right) 0 var(--detail-pad-left);
  gap: 4px;
  max-height: 90vh;
  overflow-y: auto;
}

#overview-show-detail-dialog .dialog-form > h3 {
  margin: 0;
}

#overview-show-detail-dialog .dialog-form > #overview-show-detail-subtitle {
  margin: 2px 0 8px;
}

#overview-show-detail-dialog[open] {
  transform: translate(-50%, -50%) scale(1);
}

#overview-show-detail-dialog.dialog-closing {
  transform: translate(-50%, -49%) scale(0.985);
}

#overview-show-detail-content {
  display: grid;
  gap: 12px;
}

#overview-show-detail-content .overview-modal-top-actions {
  display: flex;
  justify-content: flex-end;
  margin: 2px 0 2px;
}

#overview-show-detail-content .overview-modal-top-actions .overview-profit-mode-toggle {
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid #d9dde3;
  border-radius: 0;
  background: #fff;
  color: #1d1d1f;
  box-shadow: none;
}

#overview-show-detail-content .overview-detail-table {
  width: calc(100% + var(--detail-pad-left) + var(--detail-pad-right));
  margin-left: calc(var(--detail-pad-left) * -1);
  margin-right: calc(var(--detail-pad-right) * -1);
  gap: 0;
  overflow-x: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: #fff;
  font-size: 0.8rem;
}

#overview-show-detail-content .overview-detail-table.cols-2 .table-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#overview-show-detail-content .overview-detail-table.cols-3 .table-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

#overview-show-detail-content .overview-detail-table.cols-4 .table-row {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

#overview-show-detail-content .overview-detail-table .table-row {
  min-width: 0;
  gap: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
}

#overview-show-detail-content .overview-detail-table .table-row > span {
  padding: 8px 10px;
  border-right: 1px solid var(--border);
  line-height: 1.2;
  overflow-wrap: anywhere;
  display: flex;
  align-items: center;
}

#overview-show-detail-content .overview-detail-table .table-row > span:last-child {
  border-right: 0;
}

#overview-show-detail-content .overview-detail-table .table-row > span:nth-child(n + 2) {
  justify-content: center;
  text-align: center;
}

#overview-show-detail-content .overview-detail-table .table-row > span:first-child {
  justify-content: flex-start;
  text-align: left;
}

#overview-show-detail-content .cost-tree-toggle {
  width: 16px;
  min-width: 16px;
  height: 16px;
  border: 0;
  background: transparent;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  line-height: 1;
  margin-right: 8px;
  padding: 0;
  cursor: pointer;
  box-shadow: none;
  outline: none;
  transform: none !important;
  transition: none !important;
}

#overview-show-detail-content .cost-tree-toggle.is-leaf {
  opacity: 0.45;
  cursor: default;
}

#overview-show-detail-content .cost-tree-toggle:hover,
#overview-show-detail-content .cost-tree-toggle:focus,
#overview-show-detail-content .cost-tree-toggle:active {
  border: 0;
  background: transparent;
  color: var(--text);
  box-shadow: none;
  outline: none;
  transform: none !important;
  transition: none !important;
}

#overview-show-detail-content .cost-tree-label {
  min-width: 0;
}

#overview-show-detail-content .cost-tree-child > span:first-child {
  padding-left: 44px;
}

#overview-show-detail-content .cost-tree-child.cost-tree-child-total > span:first-child {
  padding-left: 60px;
}

#overview-show-detail-content .cost-tree-branch {
  color: var(--muted);
  margin-right: 8px;
}

#overview-show-detail-content .overview-detail-table .table-row.header {
  background: #f8fafc;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

#overview-show-detail-content .overview-detail-table .table-row:not(.header) {
  border-top: 1px solid var(--border);
}

#overview-show-detail-content .overview-detail-table .table-row.footer {
  border-top: 1px solid var(--border);
  background: #f8fafc;
  font-weight: 600;
}

#overview-show-detail-content .overview-detail-table .table-row.footer > span:first-child {
  padding-left: 20px;
}

#overview-show-detail-content h4 {
  margin: 4px 0 0;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

#overview-show-detail-title {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

#overview-show-detail-subtitle {
  margin: 0 0 6px;
  line-height: 1.25;
  padding-bottom: 12px;
}

#overview-show-detail-dialog .dialog-actions {
  display: none;
}

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 10px;
  border-radius: 10px;
}

.mobile-menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}

.mobile-menu-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 1200;
}

@media (max-width: 720px) {
  .mobile-menu-toggle {
    display: inline-flex;
    padding: 8px;
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
  }

  header.page-header {
    position: relative;
  }

  .header-actions {
    width: 100%;
  }

  header.page-header .header-actions {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 18px 16px 24px;
    background: var(--bg);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 12px;
    transform: translateY(-110%);
    transition: transform 0.2s ease;
    z-index: 1300;
  }

  body.menu-open .page-header .header-actions {
    transform: translateY(0);
  }

  body.menu-open .mobile-menu-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  #dashboard-menu-toggle {
    display: none;
  }

  .overview-page #dashboard-menu-toggle {
    display: inline-flex;
  }

  .menu-dropdown {
    width: 100%;
  }

  header.page-header .menu-panel {
    position: static;
    min-width: 0;
    width: 100%;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    gap: 12px;
  }

  header.page-header .menu-panel.hidden {
    display: flex;
  }

  header.page-header .menu-separator {
    display: none;
  }

  header.page-header .menu-panel .menu-item {
    color: var(--primary);
    border-color: transparent;
    background: #eff1ff;
    border-radius: 999px;
    justify-content: center;
    width: 100%;
    display: flex;
    align-self: stretch;
  }

  header.page-header .menu-panel .menu-item:first-child {
    box-shadow: 0 10px 24px rgba(79, 70, 229, 0.2);
  }

  header.page-header .menu-panel .menu-item:hover {
    background: #e5e8ff;
  }

  .overview-page .mobile-menu-toggle {
    display: none !important;
  }

  .overview-page header.page-header {
    position: relative;
  }

  .overview-page header.page-header .header-actions {
    position: static;
    width: auto;
    padding: 0;
    background: transparent;
    box-shadow: none;
    transform: none;
    transition: none;
    display: flex;
    flex-direction: row;
    gap: 12px;
  }

  .overview-page #dashboard-menu-toggle {
    display: none !important;
  }

  .overview-page header.page-header .menu-panel {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    min-width: 0;
    width: auto;
    background: var(--surface);
    border: none;
    box-shadow: none;
    padding: 0 4px;
    gap: 4px;
    display: flex !important;
    flex-direction: row;
    height: var(--top-nav-height);
  }

  .overview-page header.page-header .menu-panel.hidden {
    display: flex !important;
  }

  .overview-page header.page-header .menu-panel .menu-item {
    color: var(--text);
    border: none;
    background: transparent;
    border-radius: 10px;
    justify-content: flex-start;
    width: auto;
    display: inline-flex;
    align-items: center;
  }

  .overview-page header.page-header .menu-panel .menu-item:hover {
    background: transparent;
  }

  .overview-page .header .dropdown-section {
    width: auto !important;
    display: inline-flex !important;
    margin-left: 0 !important;
  }

  .overview-page .header .dropdown-section:first-of-type {
    margin-left: auto !important;
  }

}

#users-dialog {
  width: min(900px, 96vw);
}

#users-dialog .dialog-form.users-dialog-form {
  gap: 18px;
}

.users-dialog-panel {
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 249, 255, 0.96));
  padding: 16px;
  border-radius: 18px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
}

.users-dialog-panel--table {
  padding-bottom: 10px;
}

.users-create-grid {
  align-items: end;
}

.users-dialog-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}

#users-table .table-row {
  grid-template-columns: 1.2fr 0.8fr 1fr 1.4fr 180px;
  min-width: 900px;
  align-items: center;
}

#users-table .table-row:not(.header) {
  border-radius: 16px;
}

.user-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.user-field span {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.user-field .user-value {
  font-size: 0.95rem;
  color: var(--text);
}

.user-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.user-personnel-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.user-personnel-row .muted {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-personnel-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.user-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

#task-create-dialog,
#overview-task-create-dialog {
  width: min(760px, 94vw);
}

.overview-tile.status-danger {
  border-color: #f87171;
  background: #fff5f5;
}

.overview-tile.status-warning {
  border-color: #fbbf24;
  background: #fffbeb;
}

.overview-tile.status-good {
  border-color: #4ade80;
  background: #f0fdf4;
}

.payments-table .table-row.status-danger {
  border-color: #f87171;
  background: #fff5f5;
}

.payments-table .table-row.status-warning {
  border-color: #fbbf24;
  background: #fffbeb;
}

.payments-table .table-row.status-good {
  border-color: #4ade80;
  background: #f0fdf4;
}

.profit-assignments-table .table-row.status-danger,
#profit-assignments-table .table-row.status-danger {
  border-color: #f87171;
  background: #fff5f5;
}

.profit-assignments-table .table-row.status-good,
#profit-assignments-table .table-row.status-good {
  border-color: #4ade80;
  background: #f0fdf4;
}

.table-row.status-danger {
  border-color: #f87171;
  background: #fff5f5;
}

.table-row.status-good {
  border-color: #4ade80;
  background: #f0fdf4;
}

.overview-tile-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.overview-tile h3 {
  margin: 0 0 4px;
  font-size: 1rem;
}

.overview-tile .tile-meta {
  color: var(--muted);
  font-size: 0.8rem;
}

.overview-tile-status {
  display: flex;
  align-items: center;
}

.overview-badge {
  background: #e0e7ff;
  color: #4338ca;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.overview-badges {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.overview-warning-trigger {
  border: 1px solid #fca5a5;
  background: #fef2f2;
  color: #b91c1c;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  padding: 3px 9px;
  cursor: pointer;
}

.overview-analytics-pills {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.overview-analytics-pill {
  font-size: 0.64rem;
  padding: 2px 6px;
}


.overview-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.overview-stat {
  background: rgba(15, 23, 42, 0.04);
  border-radius: 10px;
  padding: 6px 8px;
}

.overview-stat.status-danger {
  background: rgba(220, 38, 38, 0.12);
  border: 1px solid rgba(220, 38, 38, 0.35);
}

.overview-stat.status-danger .label,
.overview-stat.status-danger .value {
  color: #b91c1c;
}

.overview-email-stat {
  cursor: pointer;
}

#facebook-group-schedule-preview .facebook-group-post-status {
  width: 100%;
  min-width: 92px;
  margin: 0;
  padding: 6px 10px;
  height: 34px;
  line-height: 1.2;
}

.overview-stat .label {
  color: var(--muted);
  font-size: 0.68rem;
  white-space: nowrap;
}

.overview-stat .value {
  font-size: 1.05rem;
  font-weight: 600;
}

#overview-task-tiles .overview-tile {
  justify-content: center;
  align-items: center;
  text-align: center;
}

#overview-task-tiles .overview-tile-header {
  justify-content: center;
}

#overview-task-tiles .overview-stats {
  display: block;
}

#overview-task-tiles .overview-stat {
  background: transparent;
  border: 0;
  padding: 0;
}

#overview-task-tiles .overview-stat .value {
  font-size: 2.1rem;
  line-height: 1.1;
}

#overview-task-tiles .overview-stat .tile-meta {
  margin-top: 8px;
}

@media (max-width: 1100px) {
  .overview-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .overview-stats {
    grid-template-columns: 1fr;
  }
}

#show-details {
  border-radius: 24px;
  border: 1px solid #d2e3fc;
  box-shadow: 0 14px 40px rgba(26, 115, 232, 0.09);
  background: linear-gradient(180deg, #fbfdff 0%, #ffffff 100%);
}

#show-details .subsection-header h2 {
  color: #174ea6;
  font-size: 1.4rem;
}

#show-details .grid.two {
  gap: 14px;
}

#show-details label {
  color: #5f6368;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

#show-details input {
  border-radius: 10px;
  border-color: #dadce0;
  background: #fff;
  font-family: "Google Sans", "Roboto", "Segoe UI", Arial, sans-serif;
}

#show-details input:focus {
  border-color: #1a73e8;
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.18);
}

#show-emails {
  border-radius: 24px;
  border: 1px solid #d2e3fc;
  background: linear-gradient(145deg, #f8fbff 0%, #ffffff 72%);
  box-shadow: 0 14px 36px rgba(26, 115, 232, 0.08);
}

#show-emails .subsection-header h2 {
  color: #174ea6;
}

#show-email-viewer-dialog {
  border-radius: 22px;
  border: 1px solid #d2e3fc;
  box-shadow: 0 20px 44px rgba(32, 33, 36, 0.2);
}

#show-email-viewer-dialog .subsection-header h3 {
  color: #202124;
}

#show-email-viewer-dialog .email-meta-grid {
  background: #f8fafd;
  border: 1px solid #e6ebf2;
  border-radius: 14px;
  padding: 12px;
}

#show-emails-dialog {
  position: fixed;
  top: var(--top-nav-height);
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 3200;
  background: #fff;
  font-family: "Google Sans", "Roboto", "Segoe UI", Arial, sans-serif;
}

body.email-workspace-open {
  overflow: hidden;
}

.email-workspace-form {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 0;
  gap: 0;
}

.email-workspace-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid #d9dde3;
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 2;
}

.email-toolbar-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

#show-emails-dialog .email-workspace-toolbar .ghost,
#show-emails-dialog .email-workspace-toolbar .tab {
  border: 1px solid #d9dde3;
  border-radius: 0;
  background: #fff;
  color: #1d1d1f;
  min-height: 34px;
  padding: 8px 10px;
  box-shadow: none;
  font-weight: 600;
  font-size: 0.86rem;
}

#show-emails-dialog .email-workspace-toolbar .tab.active {
  background: #f8f9fb;
}

#show-emails-dialog .email-workspace-toolbar .ghost:hover,
#show-emails-dialog .email-workspace-toolbar .tab:hover {
  transform: none;
  background: #fff;
}

#show-emails-dialog .email-workspace-toolbar #show-emails-compose {
  min-height: 34px;
  border-radius: 0;
  box-shadow: none;
  padding: 8px 10px;
}

.email-workspace-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 14px;
  border-bottom: 1px solid #d9dde3;
  background: #fff;
}

.email-workspace-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.email-workspace-logo {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  color: #fff;
  background: linear-gradient(140deg, #ea4335 0%, #1a73e8 100%);
}

.email-workspace-title h3 {
  margin: 0;
  font-size: 1.25rem;
  color: #202124;
  letter-spacing: 0;
}

.email-header-actions {
  gap: 8px;
}

.email-header-actions .ghost {
  border-radius: 999px;
  border: 1px solid #dadce0;
  color: #3c4043;
  background: #fff;
  padding: 8px 14px;
}

.email-header-actions .ghost:hover {
  border-color: #1a73e8;
  color: #1a73e8;
  background: #e8f0fe;
}

.email-workspace-shell {
  min-height: 0;
  flex: 1;
  display: grid;
  grid-template-columns: minmax(360px, 44%) minmax(0, 56%);
  border: 0;
  border-radius: 0;
  overflow: hidden;
  background: #fff;
  box-shadow: none;
}

.email-workspace-sidebar {
  min-width: 0;
  border-right: 1px solid #e6ebf2;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
}

.email-sidebar-header {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#show-emails-dialog .email-sidebar-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

#show-emails-dialog .email-sidebar-actions .ghost {
  border: 1px solid #d9dde3;
  border-radius: 0;
  background: #fff;
  color: #1d1d1f;
  min-height: 34px;
  padding: 8px 10px;
  box-shadow: none;
}

#show-emails-dialog .email-sidebar-actions .ghost:hover {
  transform: none;
  background: #fff;
}

#show-email-search-dialog {
  width: min(760px, 94vw);
}

#show-email-search-dialog .dialog-form {
  gap: 12px;
}

#show-email-search-dialog h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1rem;
  color: #1d1d1f;
}

#show-email-search-dialog .filters-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

#show-email-search-dialog .email-filters label {
  color: #3f4650;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-weight: 600;
}

#show-email-search-dialog .email-filters input,
#show-email-search-dialog .email-filters select {
  border: 1px solid #d9dde3;
  border-radius: 0;
  box-shadow: none;
  background: #fff;
  color: #1d1d1f;
}

#show-email-search-dialog .dialog-actions .ghost {
  border: 1px solid #d9dde3;
  border-radius: 0;
  background: #fff;
  color: #1d1d1f;
  box-shadow: none;
}

#show-email-search-dialog .dialog-actions .ghost:hover {
  transform: none;
  background: #fff;
}

#show-email-search-dialog .dialog-actions .primary {
  background: #1d1d1f;
  border: 1px solid #1d1d1f;
  border-radius: 0;
  box-shadow: none;
}

#show-email-search-dialog .dialog-actions .primary:hover {
  background: #111;
  border-color: #111;
  transform: none;
}

#show-emails-compose {
  align-self: flex-start;
  min-height: 46px;
  min-width: 124px;
  border-radius: 16px;
  background: #c2e7ff;
  color: #001d35;
  border: 1px solid #b8dcf5;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.16);
}

#show-emails-compose:hover {
  background: #b7dcf6;
}

.email-tabs {
  display: flex;
  gap: 8px;
}

.email-tabs .tab {
  border: 1px solid #dadce0;
  background: #fff;
  color: #3c4043;
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
}

.email-tabs .tab.active {
  background: #e8f0fe;
  border-color: #d2e3fc;
  color: #174ea6;
}

.filters-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.email-filters label {
  color: #5f6368;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}

.email-filters input,
.email-filters select {
  border-radius: 12px;
  border: 1px solid #dadce0;
  background: #fff;
  box-shadow: none;
}

.email-filters input:focus,
.email-filters select:focus {
  border-color: #1a73e8;
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.16);
}

.email-tab-panel {
  min-height: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.email-tab-panel.hidden {
  display: none;
}

.email-inbox-list {
  min-height: 0;
  height: 100%;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  border: 1px solid #eceff4;
  border-radius: 0;
  background: #fff;
}

.email-inbox-row {
  border: 0;
  border-bottom: 1px solid #eceff4;
  background: #fff;
  padding: 0 14px;
  cursor: pointer;
  display: block;
  min-height: 56px;
  transition: background 0.12s ease, box-shadow 0.12s ease;
}

.email-inbox-row:hover {
  background: #fff;
  box-shadow: inset 0 1px 0 #eceff4, inset 0 -1px 0 #eceff4;
}

.email-inbox-row.is-selected {
  background: #fff;
}

.email-inbox-row.is-unread {
  font-weight: 700;
}

.email-inbox-line {
  min-height: 56px;
  display: grid;
  grid-template-columns: minmax(130px, 220px) minmax(0, 1fr) minmax(130px, 158px);
  align-items: center;
  gap: 12px;
}

.email-inbox-meta {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: nowrap;
}

.email-inbox-meta-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.email-inbox-sender {
  font-weight: 500;
  color: #202124;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.email-inbox-time {
  font-size: 0.75rem;
  color: #5f6368;
  white-space: nowrap;
  justify-self: end;
}

.email-attachment-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.72rem;
  font-weight: 700;
  background: #e8f0fe;
  color: #174ea6;
  border: 1px solid #d2e3fc;
}

.email-inbox-subject {
  font-size: 0.86rem;
  color: #202124;
  font-weight: 500;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.email-inbox-subjectline {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.email-inbox-snippet {
  font-size: 0.82rem;
  color: #5f6368;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 0;
}

.email-workspace-preview {
  min-width: 0;
  min-height: 0;
  background: #fff;
  display: flex;
  flex-direction: column;
}

.email-preview-empty {
  flex: 1;
  display: grid;
  place-items: center;
  color: #5f6368;
  font-size: 1rem;
  background: radial-gradient(circle at center, #f7faff 0%, #ffffff 72%);
}

.email-preview-content {
  min-height: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px;
}

.email-preview-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.email-preview-top h4 {
  margin: 0;
  font-size: 1.24rem;
  line-height: 1.3;
  color: #202124;
}

.email-preview-content .email-body {
  min-height: 0;
  flex: 1;
  max-height: none;
  border: 1px solid #e6ebf2;
  border-radius: 16px;
  background: #fff;
}

.email-preview-content .card-actions .ghost,
.action-menu .action-menu-toggle {
  border: 1px solid #dadce0;
  border-radius: 999px;
  background: #fff;
  color: #3c4043;
}

.email-preview-content .card-actions .ghost:hover,
.action-menu .action-menu-toggle:hover {
  background: #e8f0fe;
  border-color: #d2e3fc;
  color: #174ea6;
}

#show-emails-dialog.inbox-full-width .email-workspace-shell {
  grid-template-columns: 1fr;
}

#show-emails-dialog.inbox-full-width .email-workspace-preview {
  display: none;
}

#show-emails-dialog.email-message-full-width .email-workspace-shell {
  grid-template-columns: 1fr;
}

#show-emails-dialog.email-message-full-width .email-workspace-sidebar {
  display: none;
}

.action-menu {
  position: relative;
  display: inline-flex;
}

.email-inbox-meta .action-menu .action-menu-toggle {
  min-height: 24px;
  padding: 2px 8px;
  font-size: 0.7rem;
  border-radius: 999px;
  line-height: 1.1;
}

.action-menu-list {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: #fff;
  border: 1px solid #dfe3eb;
  border-radius: 12px;
  box-shadow: 0 12px 26px rgba(60, 64, 67, 0.2);
  display: none;
  min-width: 170px;
  padding: 8px;
  z-index: 10;
  flex-direction: column;
  gap: 6px;
}

.action-menu-list.open {
  display: flex;
}

.action-menu-list .ghost {
  justify-content: flex-start;
  width: 100%;
  border-radius: 10px;
  border: 1px solid transparent;
  background: #fff;
  color: #202124;
}

.action-menu-list .ghost:hover {
  background: #f1f3f4;
  border-color: #eceff4;
}

#show-emails-dialog {
  font-family: var(--font-body);
}

#show-emails-dialog .email-workspace-sidebar {
  border-right: 1px solid #d9dde3;
  background: #fff;
  gap: 0;
  padding: 0;
  min-height: 0;
  overflow: hidden;
}

#show-emails-dialog #show-emails-compose {
  align-self: flex-start;
  min-height: 34px;
  min-width: 0;
  border-radius: 0;
  border: 1px solid #d9dde3;
  background: #fff;
  color: #1d1d1f;
  font-weight: 600;
  box-shadow: none;
  padding: 8px 10px;
}

#show-emails-dialog #show-emails-compose:hover {
  transform: none;
  background: #fff;
}

#show-emails-dialog .email-tabs {
  gap: 6px;
}

#show-emails-dialog .email-tabs .tab {
  border: 1px solid #d9dde3;
  background: #fff;
  color: #1d1d1f;
  padding: 8px 10px;
  border-radius: 0;
  font-weight: 600;
  font-size: 0.86rem;
}

#show-emails-dialog .email-tabs .tab.active {
  background: #fff;
  border-color: #d9dde3;
  color: #1d1d1f;
}

#show-emails-dialog .email-filters label {
  color: #3f4650;
  font-family: var(--font-body);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-weight: 600;
}

#show-emails-dialog .email-filters input,
#show-emails-dialog .email-filters select {
  border-radius: 0;
  border: 1px solid #d9dde3;
  background: #fff;
  box-shadow: none;
  font-size: 0.88rem;
  color: #1d1d1f;
}

#show-emails-dialog .email-filters input:focus,
#show-emails-dialog .email-filters select:focus {
  border-color: #d9dde3;
  box-shadow: none;
}

#show-emails-dialog .email-tab-panel {
  min-height: 0;
  flex: 1;
  overflow: hidden;
}

#show-emails-dialog .email-inbox-list {
  flex: 1;
  height: auto;
  border: 1px solid #d9dde3;
  border-radius: 0;
  gap: 0;
  border-top: 0;
  border-left: 0;
  border-right: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

#show-emails-dialog .email-inbox-row {
  border-bottom: 1px solid #d9dde3;
  background: #fff;
  min-height: 54px;
  padding: 0 12px;
  box-shadow: none;
}

#show-emails-dialog .email-inbox-row:hover {
  background: #f8f9fb;
  box-shadow: none;
}

#show-emails-dialog .email-inbox-row.is-selected {
  background: #f8f9fb;
}

#show-emails-dialog .email-inbox-sender,
#show-emails-dialog .email-inbox-subject {
  color: #1d1d1f;
}

#show-emails-dialog .email-inbox-time,
#show-emails-dialog .email-inbox-snippet {
  color: #5f6570;
}

#show-emails-dialog .email-attachment-pill {
  border-radius: 0;
  padding: 2px 6px;
  font-size: 0.7rem;
  font-weight: 600;
  background: #f8f9fb;
  color: #1d1d1f;
  border: 1px solid #d9dde3;
}

#show-emails-dialog .email-preview-empty {
  background: #fff;
  color: #5f6570;
}

#show-emails-dialog .email-preview-content {
  padding: 14px;
  gap: 12px;
}

#show-emails-dialog .email-preview-top h4 {
  font-family: var(--font-display);
  font-size: 1rem;
  color: #1d1d1f;
}

#show-emails-dialog .email-preview-content .email-body {
  border: 1px solid #d9dde3;
  border-radius: 0;
  background: #fff;
}

#show-emails-dialog .email-preview-content .card-actions .ghost,
#show-emails-dialog .action-menu .action-menu-toggle,
#show-emails-dialog .action-menu-list .ghost {
  border: 1px solid #d9dde3;
  border-radius: 0;
  background: #fff;
  color: #1d1d1f;
  box-shadow: none;
}

#show-emails-dialog .email-preview-content .card-actions .ghost:hover,
#show-emails-dialog .action-menu .action-menu-toggle:hover,
#show-emails-dialog .action-menu-list .ghost:hover {
  transform: none;
  background: #fff;
}

#show-emails-dialog .action-menu-list {
  border: 1px solid #d9dde3;
  border-radius: 0;
  box-shadow: none;
}

@media (max-width: 1100px) {
  .email-workspace-shell {
    grid-template-columns: minmax(300px, 1fr) minmax(0, 1fr);
  }

  .email-inbox-line {
    grid-template-columns: minmax(108px, 170px) minmax(0, 1fr) minmax(110px, 130px);
  }
}

@media (max-width: 720px) {
  #show-details {
    border-radius: 18px;
  }

  #show-emails-dialog {
    top: var(--top-nav-height);
    right: 0;
    bottom: 0;
    left: 0;
  }

  .email-workspace-form {
    padding: 0;
  }

  .email-workspace-header {
    flex-wrap: wrap;
    align-items: center;
  }

  .email-workspace-shell {
    grid-template-columns: 1fr;
    border-radius: 0;
  }

  .email-workspace-sidebar {
    border-right: none;
    border-bottom: 1px solid #e6ebf2;
    max-height: 52vh;
  }

  .email-sidebar-header {
    gap: 8px;
  }

  #show-emails-compose {
    min-height: 42px;
    min-width: 112px;
  }

  .filters-row {
    grid-template-columns: 1fr;
  }

  .email-inbox-row {
    min-height: 70px;
    padding: 2px 10px;
  }

  .email-inbox-line {
    min-height: 64px;
    grid-template-columns: minmax(88px, 126px) minmax(0, 1fr) minmax(84px, 104px);
    gap: 8px;
  }

  .email-inbox-sender {
    font-size: 0.78rem;
  }

  .email-inbox-subject {
    font-size: 0.79rem;
  }

  .email-inbox-snippet {
    font-size: 0.74rem;
  }
}

.section-spacer {
  height: 16px;
}

.merch-thumb {
  width: 54px;
  height: 54px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
}

#merch-stock-table .table-row {
  grid-template-columns: 1fr 1fr;
}

#merch-inventory-table .table-row {
  grid-template-columns: 1fr 1fr 1fr;
}

#merch-stock-subtract-table .table-row {
  grid-template-columns: 1fr 1fr;
}

.merch-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.merch-field .field-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

#report-table .table-row {
  grid-template-columns: 1.4fr 0.7fr 0.8fr 0.8fr 0.8fr 0.6fr 0.7fr 0.9fr;
}

.report-totals {
  margin-top: 16px;
}

#report-table .table-row > span,
#report-table .table-row.header > span,
#merch-sales-table .table-row > span,
#merch-sales-table .table-row.header > span,
#merch-sales-log .table-row > span,
#merch-sales-log .table-row.header > span {
  text-align: left;
  justify-self: start;
}

#merch-admin-summary .table-row > span,
#merch-admin-summary .table-row.header > span {
  text-align: left;
  justify-self: start;
}

#merch-admin-summary .table-row {
  grid-template-columns: 1.6fr 0.9fr 0.9fr 0.7fr 0.7fr 0.9fr 0.9fr 120px;
}

#merch-admin-summary .row-actions {
  justify-self: start;
}

.merch-summary-totals {
  margin-top: 12px;
  display: grid;
  gap: 6px;
  max-width: 420px;
}

.merch-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
}

#merch-sales-table .table-row {
  grid-template-columns: 90px 1.3fr 0.7fr 0.7fr 0.7fr 0.6fr 1.1fr 0.8fr auto;
}

#merch-reverse-table .table-row {
  grid-template-columns: 1fr 0.6fr 0.6fr auto;
}

#merch-sales .subsection {
  margin-bottom: 16px;
}

#merch-sales .summary-grid {
  margin-top: 16px;
}

#merch-sales .subsection + .subsection {
  margin-top: 20px;
}

#merch-sales .subsection .header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

#merch-sales-log .table-row {
  grid-template-columns: 1.2fr 1.2fr 0.7fr 0.7fr 0.7fr 1fr 120px;
}

#merch-single-sale-table .table-row,
#merch-replace-sale-table .table-row {
  grid-template-columns: 56px 1.2fr 0.9fr 0.7fr 70px 110px;
}

#merch-single-sale-table .merch-thumb,
#merch-replace-sale-table .merch-thumb {
  width: 42px;
  height: 42px;
}

#merch-sales-table .table-row.header,
#merch-packages-sales .table-row.header,
#merch-sales-log .table-row.header {
  padding: 10px 12px;
}

.grid.three {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.grid.four {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.subsection {
  margin-top: 14px;
}

.subsection-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  gap: 10px;
  flex-wrap: wrap;
}

.subsection-header .actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.dashboard-actions {
  margin: 16px 0 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
}

.resource-group {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #d9dde3;
}

.resource-group:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.resource-group h3 {
  margin: 0 0 8px;
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #6e6e73;
  font-weight: 600;
}

#resources-dialog,
#resources-dialog-fallback {
  position: fixed;
  top: 50%;
  left: 50%;
  margin: 0;
  border: 1px solid #d9dde3;
  border-radius: 0;
  padding: 16px;
  width: min(980px, 96vw);
  max-height: min(86dvh, 920px);
  box-shadow: none;
  background: #fff;
  transform: translate(-50%, -48%) scale(0.985);
}

#resources-dialog[open],
#resources-dialog-fallback[open] {
  transform: translate(-50%, -50%) scale(1);
}

#resources-dialog.dialog-closing,
#resources-dialog-fallback.dialog-closing {
  transform: translate(-50%, -48%) scale(0.985);
}

#resources-dialog .dialog-form,
#resources-dialog-fallback .dialog-form {
  max-height: calc(86dvh - 36px);
  overflow: auto;
  gap: 12px;
  padding-right: 4px;
}

#resources-dialog .dialog-form > h3,
#resources-dialog-fallback .dialog-form > h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1rem;
  color: #1d1d1f;
}

#resources-dialog .dashboard-actions,
#resources-dialog-fallback .dashboard-actions {
  margin: 8px 0 0;
  gap: 8px;
}

#resources-dialog .dashboard-actions .ghost,
#resources-dialog .dashboard-actions .button-link,
#resources-dialog-fallback .dashboard-actions .ghost,
#resources-dialog-fallback .dashboard-actions .button-link {
  border: 1px solid #d9dde3;
  border-radius: 0;
  background: #fff;
  color: #1d1d1f;
  box-shadow: none;
  min-height: 34px;
  padding: 8px 12px;
}

#resources-dialog .dashboard-actions .ghost:hover,
#resources-dialog .dashboard-actions .button-link:hover,
#resources-dialog-fallback .dashboard-actions .ghost:hover,
#resources-dialog-fallback .dashboard-actions .button-link:hover {
  transform: none;
  background: #fff;
}

#resources-dialog .dialog-actions .ghost,
#resources-dialog-fallback .dialog-actions .ghost {
  border: 1px solid #d9dde3;
  border-radius: 0;
  background: #fff;
  color: #1d1d1f;
  box-shadow: none;
  min-height: 34px;
}

#roster-dialog,
#vehicle-dialog,
#crewing-dialog {
  position: fixed;
  top: 50%;
  left: 50%;
  margin: 0;
  border: 1px solid #d9dde3;
  border-radius: 0;
  padding: 16px;
  box-shadow: none;
  background: #fff;
  transform: translate(-50%, -48%) scale(0.985);
}

#roster-dialog {
  width: min(1560px, 98vw);
  height: min(88dvh, 980px);
}

#vehicle-dialog {
  width: min(1160px, 97vw);
  height: auto;
  max-height: min(84dvh, 900px);
}

#crewing-dialog {
  width: min(1320px, 98vw);
  height: auto;
  max-height: min(86dvh, 940px);
}

#roster-dialog[open],
#vehicle-dialog[open],
#crewing-dialog[open] {
  transform: translate(-50%, -50%) scale(1);
}

#roster-dialog.dialog-closing,
#vehicle-dialog.dialog-closing,
#crewing-dialog.dialog-closing {
  transform: translate(-50%, -48%) scale(0.985);
}

#roster-dialog .dialog-form,
#vehicle-dialog .dialog-form,
#crewing-dialog .dialog-form {
  height: 100%;
  min-height: 0;
  overflow: hidden;
  gap: 10px;
}

#vehicle-dialog .dialog-form {
  height: auto;
  max-height: calc(min(84dvh, 900px) - 32px);
  overflow: auto;
}

#crewing-dialog .dialog-form {
  height: auto;
  max-height: calc(min(86dvh, 940px) - 32px);
  overflow: auto;
}

#roster-dialog h3,
#vehicle-dialog h3,
#crewing-dialog h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1rem;
  color: #1d1d1f;
}

#roster-dialog .muted,
#vehicle-dialog .muted,
#crewing-dialog .muted {
  margin: 0;
}

#roster-dialog .subsection-header,
#vehicle-dialog .subsection-header,
#crewing-dialog .subsection-header {
  justify-content: flex-start;
  margin: 0;
}

#roster-dialog .ghost,
#vehicle-dialog .ghost,
#crewing-dialog .ghost {
  background: #fff;
  color: #1d1d1f;
  border: 1px solid #d9dde3;
  border-radius: 0;
  box-shadow: none;
  min-height: 34px;
  padding: 8px 12px;
}

#roster-dialog .ghost:hover,
#vehicle-dialog .ghost:hover,
#crewing-dialog .ghost:hover {
  transform: none;
  background: #fff;
}

#roster-dialog #roster-table,
#vehicle-dialog #vehicle-table,
#crewing-dialog #crewing-table {
  display: grid;
  gap: 0;
  align-content: start;
  border: 1px solid #d9dde3;
  width: 100%;
  min-height: 0;
  flex: 1 1 auto;
  overflow: auto;
}

#vehicle-dialog #vehicle-table {
  flex: 0 0 auto;
  max-height: min(58dvh, 620px);
}

#crewing-dialog #crewing-table {
  flex: 0 0 auto;
  max-height: min(60dvh, 660px);
}

#roster-dialog #roster-table .table-row,
#vehicle-dialog #vehicle-table .table-row,
#crewing-dialog #crewing-table .table-row {
  min-width: 0;
  gap: 0;
  align-items: center;
}

#roster-dialog #roster-table .table-row.header,
#vehicle-dialog #vehicle-table .table-row.header,
#crewing-dialog #crewing-table .table-row.header {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #6e6e73;
  background: #f8f9fb;
  border-bottom: 1px solid #d9dde3;
}

#roster-dialog #roster-table .table-row > *,
#vehicle-dialog #vehicle-table .table-row > *,
#crewing-dialog #crewing-table .table-row > * {
  padding: 8px 10px;
}

#roster-dialog #roster-table .table-row:not(.header),
#vehicle-dialog #vehicle-table .table-row:not(.header),
#crewing-dialog #crewing-table .table-row:not(.header) {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  border-bottom: 1px solid #d9dde3;
  background: #fff;
}

#roster-dialog #roster-table .table-row:last-child,
#vehicle-dialog #vehicle-table .table-row:last-child,
#crewing-dialog #crewing-table .table-row:last-child {
  border-bottom: 0;
}

#roster-dialog #roster-table input,
#roster-dialog #roster-table select,
#vehicle-dialog #vehicle-table input,
#crewing-dialog #crewing-table input {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: #fff;
  font-size: 0.88rem;
  padding: 8px 10px;
}

#roster-dialog .dialog-actions,
#vehicle-dialog .dialog-actions,
#crewing-dialog .dialog-actions {
  flex: 0 0 auto;
}

@media (max-width: 900px) {
  #roster-dialog,
  #vehicle-dialog,
  #crewing-dialog {
    width: min(98vw, 98vw);
    height: min(88dvh, 88dvh);
  }
}

.dashboard-list {
  display: grid;
  gap: 12px;
}

.dashboard-table .table-row {
  grid-template-columns: 1.5fr 0.9fr 0.7fr 1fr 0.7fr 1fr 0.9fr 1fr 0.9fr minmax(160px, 1fr);
}

.dashboard-table .table-row span:last-child {
  justify-self: end;
}

.dashboard-table .table-row.header {
  padding: 0 12px;
}

.dashboard-table .table-row > span {
  align-self: center;
}

.dashboard-table .row-actions {
  flex-wrap: nowrap;
  gap: 6px;
}

.dashboard-table .row-actions .ghost {
  padding: 6px 12px;
}

.show-card {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.show-meta {
  display: grid;
  gap: 4px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}

.status-positive {
  color: #166534;
}

.status-negative {
  color: #991b1b;
}

.status-neutral {
  color: #374151;
}

.status-pill.status-positive {
  background: #dcfce7;
}

.status-pill.status-negative {
  background: #fee2e2;
}

.status-pill.status-neutral {
  background: #e5e7eb;
}

.show-card h4 {
  margin: 0 0 4px;
}

.show-card span {
  color: var(--muted);
  font-size: 0.85rem;
}

.roster-table .table-row {
  grid-template-columns: 1.2fr 1fr 1.6fr 1.1fr 1.8fr 0.9fr 0.9fr 0.9fr 1.2fr 120px;
  min-width: 980px;
}

.vehicle-table .table-row {
  grid-template-columns: 1.4fr 1.2fr 1fr auto;
  min-width: 620px;
}

.itinerary-table .table-row {
  grid-template-columns: 40px 2fr 1fr 1fr;
}

.itinerary-table .table-row.header span:first-child {
  opacity: 0;
}

.table {
  display: grid;
  gap: 10px;
  overflow-x: auto;
}

.table-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  align-items: center;
  min-width: 680px;
}

.table-row:not(.header) {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
}

.table-row.header {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}

.table-row.footer {
  font-weight: 600;
  background: #f8fafc;
  border: 1px dashed var(--border);
}

.table-cell-field .cell-label {
  display: none;
}

.overview-page.show-ai-page {
  padding-top: 0;
}

.show-ai-page header {
  padding: 6px 16px 8px;
}

.show-ai-page .show-ai-header {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: flex-start;
  gap: 12px;
}

.show-ai-page .show-ai-header-copy {
  min-width: 0;
}

.show-ai-page .show-ai-header-copy p {
  margin-bottom: 8px;
}

.show-ai-page header h1 {
  font-size: 1.5rem;
  margin: 0 0 4px;
}

.show-ai-page .show-ai-header-actions {
  justify-content: flex-end;
}

.show-ai-page .show-ai-back-button {
  background: #fff;
  color: #1d1d1f;
  border: 1px solid #d9dde3;
  border-radius: 0;
  box-shadow: none;
  padding: 9px 12px;
  margin-top: 6px;
}

.show-ai-page .show-ai-back-button:hover {
  transform: none;
  background: #fff;
}

.show-ai-page main {
  padding: 0 0 64px;
}

.show-ai-page .show-ai-workspace {
  margin-top: 0;
}

.show-ai-page .show-details-accordion {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.show-ai-page .show-details-accordion details {
  border: 1px solid #d9dde3;
  background: #fff;
}

.show-ai-page .show-details-accordion summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
}

.show-ai-page .show-details-accordion summary::-webkit-details-marker {
  display: none;
}

.show-ai-page .show-details-accordion summary::after {
  content: "+";
  margin-left: auto;
  color: #6e6e73;
  font-size: 1.1rem;
  line-height: 1;
}

.show-ai-page .show-details-accordion details[open] > summary::after {
  content: "-";
}

.show-ai-page .show-details-panel {
  padding: 0 16px 16px;
}

.show-ai-page .show-details-subaccordion {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
  margin-right: -16px;
}

.show-ai-page .show-details-subaccordion details {
  border: 1px solid #d9dde3;
}

.show-ai-page .show-details-subaccordion summary {
  padding: 12px 14px;
}

.show-ai-page .show-ai-detail-meta {
  margin-left: auto;
  font-size: 0.78rem;
  font-weight: 500;
  color: #6e6e73;
}

.show-ai-page .show-ai-controls-panel .subsection-header,
.show-ai-page .show-ai-actions-panel .subsection-header {
  justify-content: flex-start;
  margin-bottom: 8px;
}

.show-ai-page #show-ai-workspace .ghost,
.show-ai-page #show-ai-workspace .button-link.ghost {
  background: #fff;
  color: #1d1d1f;
  border: 1px solid #d9dde3;
  border-radius: 0;
  box-shadow: none;
  padding: 9px 12px;
}

.show-ai-page #show-ai-workspace .ghost:hover,
.show-ai-page #show-ai-workspace .button-link.ghost:hover {
  transform: none;
  background: #fff;
}

.show-ai-page #show-ai-history-table,
.show-ai-page #show-ai-actions-table {
  display: grid;
  gap: 0;
  border: 1px solid #d9dde3;
  width: 100%;
}

.show-ai-page #show-ai-history-table .table-row {
  min-width: 0;
  gap: 0;
  grid-template-columns: 1.1fr 2.4fr 0.9fr 1fr 0.8fr;
}

.show-ai-page #show-ai-actions-table .table-row {
  min-width: 0;
  gap: 0;
  grid-template-columns: 70px 140px 130px 2fr 1.5fr 1.5fr;
  align-items: start;
}

.show-ai-page #show-ai-history-table .table-row.header,
.show-ai-page #show-ai-actions-table .table-row.header {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #6e6e73;
  background: #f8f9fb;
  border-bottom: 1px solid #d9dde3;
}

.show-ai-page #show-ai-history-table .table-row > *,
.show-ai-page #show-ai-actions-table .table-row > * {
  padding: 8px 10px;
}

.show-ai-page #show-ai-history-table .table-row:not(.header),
.show-ai-page #show-ai-actions-table .table-row:not(.header) {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  border-bottom: 1px solid #d9dde3;
  background: #fff;
}

.show-ai-page #show-ai-history-table .table-row:last-child,
.show-ai-page #show-ai-actions-table .table-row:last-child {
  border-bottom: 0;
}

.show-ai-page #show-ai-history-table .table-row[data-recommendation-id] {
  cursor: pointer;
}

.show-ai-page #show-ai-history-table .table-row.active {
  background: #f8fbff;
}

.show-ai-page .show-ai-actions-table textarea,
.show-ai-page .show-ai-actions-table select {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: #fff;
  padding: 8px 10px;
  width: 100%;
  font-size: 0.88rem;
}

.show-ai-page .show-ai-actions-table textarea {
  min-height: 84px;
}

.show-ai-page .show-ai-actions-table input[type="checkbox"] {
  width: auto;
}

@media (max-width: 980px) {
  .show-ai-page .show-ai-header {
    grid-template-columns: 1fr;
    align-items: flex-start;
  }
  .show-ai-page .show-ai-header-actions {
    justify-content: flex-start;
  }
}

.monies-owing-section {
  margin-top: 18px;
}

.monies-owing-section h4 {
  margin: 8px 0 10px;
}

.monies-owing-table .table-row {
  grid-template-columns: 1.3fr 1.6fr 0.8fr 0.8fr 0.9fr;
  min-width: 760px;
}

#overview-costs-due-dialog {
  width: min(980px, 96vw);
}

#overview-costs-due-dialog .dialog-form {
  max-height: calc(100dvh - 120px);
  overflow: auto;
}

#overview-costs-due-dialog .summary-grid {
  grid-template-columns: minmax(220px, 320px);
}

#overview-unread-emails-dialog {
  width: min(1080px, 96vw);
}

#overview-unread-emails-dialog .dialog-form {
  max-height: calc(100dvh - 120px);
  overflow: auto;
}

#overview-unread-emails-dialog .summary-grid {
  grid-template-columns: minmax(220px, 320px);
}

.costs-due-accordion {
  display: grid;
  gap: 10px;
}

.costs-due-accordion details {
  border: 1px solid #d9dde3;
  background: #fff;
}

.costs-due-accordion summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  cursor: pointer;
  font-weight: 600;
  color: #1d1d1f;
  list-style: none;
}

.costs-due-accordion summary:focus,
.costs-due-accordion summary:focus-visible {
  outline: none;
  box-shadow: none;
  background: #fff;
}

.costs-due-table .table-row:focus,
.costs-due-table .table-row:focus-visible {
  outline: none;
  box-shadow: none;
}

.costs-due-accordion summary::-webkit-details-marker {
  display: none;
}

.costs-due-summary-total {
  color: #b42318;
}

.costs-due-table {
  display: grid;
  gap: 0;
  border-top: 1px solid #d9dde3;
  width: 100%;
}

.costs-due-table .table-row {
  min-width: 0;
  gap: 0;
  grid-template-columns: 1.8fr 0.7fr 0.7fr 0.8fr;
  align-items: center;
}

.costs-due-table .table-row.header {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #6e6e73;
  background: #f8f9fb;
  border-bottom: 1px solid #d9dde3;
}

.costs-due-table .table-row > * {
  padding: 8px 10px;
}

.costs-due-table .table-row:not(.header) {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  border-bottom: 1px solid #d9dde3;
  background: #fff;
}

.costs-due-table .table-row:last-child {
  border-bottom: 0;
}

.costs-due-table .table-row.footer {
  font-weight: 600;
  background: #f8f9fb;
}

.overview-unread-accordion {
  display: grid;
  gap: 10px;
}

.overview-unread-accordion details {
  border: 1px solid #d9dde3;
  background: #fff;
}

.overview-unread-accordion summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  cursor: pointer;
  font-weight: 600;
  color: #1d1d1f;
  list-style: none;
}

.overview-unread-accordion summary:focus,
.overview-unread-accordion summary:focus-visible {
  outline: none;
  box-shadow: none;
  background: #fff;
}

.overview-unread-accordion summary::-webkit-details-marker {
  display: none;
}

.overview-unread-summary-total {
  color: #b42318;
}

.overview-unread-table {
  display: grid;
  gap: 0;
  border-top: 1px solid #d9dde3;
  width: 100%;
}

.overview-unread-table .table-row {
  min-width: 0;
  gap: 0;
  grid-template-columns: 1.3fr 1.9fr 0.8fr;
  align-items: center;
}

.overview-unread-table .table-row.header {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #6e6e73;
  background: #f8f9fb;
  border-bottom: 1px solid #d9dde3;
}

.overview-unread-table .table-row > * {
  padding: 8px 10px;
}

.overview-unread-table .table-row:not(.header) {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  border-bottom: 1px solid #d9dde3;
  background: #fff;
}

.overview-unread-table .table-row:last-child {
  border-bottom: 0;
}

.overview-unread-table .overview-unread-email-row {
  cursor: pointer;
}

.overview-unread-table .overview-unread-email-row:hover {
  background: #f8f9fb;
}

.overview-unread-table .overview-unread-email-row:focus,
.overview-unread-table .overview-unread-email-row:focus-visible {
  outline: none;
  box-shadow: none;
  background: #fff;
}

#reimbursement-assign-table .table-row {
  grid-template-columns: 1.2fr 0.8fr 1.5fr 0.9fr 0.8fr auto;
  min-width: 780px;
}

#reimbursement-assign-dialog .dialog-form {
  width: min(1040px, 96vw);
}

#reimbursement-assign-dialog #reimbursement-assign-table {
  display: grid;
  gap: 0;
  border: 1px solid #d9dde3;
  width: 100%;
}

#reimbursement-assign-dialog #reimbursement-assign-table .table-row {
  min-width: 0;
  gap: 0;
  grid-template-columns: 1.2fr 0.8fr 1.5fr 0.9fr 0.8fr 116px;
  align-items: center;
}

#reimbursement-assign-dialog #reimbursement-assign-table .table-row.header {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #6e6e73;
  background: #f8f9fb;
  border-bottom: 1px solid #d9dde3;
}

#reimbursement-assign-dialog #reimbursement-assign-table .table-row > * {
  padding: 8px 10px;
}

#reimbursement-assign-dialog #reimbursement-assign-table .table-row:not(.header) {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  border-bottom: 1px solid #d9dde3;
  background: #fff;
}

#reimbursement-assign-dialog #reimbursement-assign-table .table-row:last-child {
  border-bottom: 0;
}

#reimbursement-assign-dialog #reimbursement-assign-table .reimbursement-assign-amount {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: #fff;
  padding: 8px 10px;
  font-size: 0.88rem;
  width: 100%;
}

#reimbursement-assign-dialog #reimbursement-assign-table .ghost.reimbursement-assign-button,
#reimbursement-assign-dialog .dialog-actions .ghost {
  background: #fff;
  color: #1d1d1f;
  border: 1px solid #d9dde3;
  border-radius: 0;
  box-shadow: none;
  min-height: 34px;
  padding: 8px 10px;
}

#reimbursement-assign-dialog #reimbursement-assign-table .ghost.reimbursement-assign-button:hover,
#reimbursement-assign-dialog .dialog-actions .ghost:hover {
  transform: none;
  background: #fff;
}

#reimbursement-payment-dialog .dialog-form {
  width: min(980px, 96vw);
  gap: 12px;
}

#reimbursement-payment-dialog h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1rem;
  color: #1d1d1f;
}

#reimbursement-payment-dialog .summary-grid {
  margin: 0;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

#reimbursement-payment-dialog .summary-item {
  border: 1px solid #d9dde3;
  border-radius: 0;
  box-shadow: none;
  background: #fff;
  padding: 10px 12px;
  min-height: 0;
}

#reimbursement-payment-dialog .inline-field {
  display: grid;
  gap: 8px;
  font-size: 0.86rem;
  color: #3f4650;
}

#reimbursement-payment-dialog #reimbursement-amount {
  width: 100%;
  border: 1px solid #d9dde3;
  border-radius: 0;
  box-shadow: none;
  padding: 12px;
  font-size: 0.88rem;
  background: #fff;
}

#reimbursement-payment-dialog #reimbursement-history-table {
  display: grid;
  gap: 0;
  border: 1px solid #d9dde3;
  width: 100%;
}

#reimbursement-payment-dialog #reimbursement-history-table .table-row {
  min-width: 0;
  gap: 0;
  grid-template-columns: 1.6fr 0.9fr 0.9fr 150px;
  align-items: center;
}

#reimbursement-payment-dialog #reimbursement-history-table .table-row.header {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #6e6e73;
  background: #f8f9fb;
  border-bottom: 1px solid #d9dde3;
}

#reimbursement-payment-dialog #reimbursement-history-table .table-row > * {
  padding: 8px 10px;
}

#reimbursement-payment-dialog #reimbursement-history-table .table-row:not(.header) {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  border-bottom: 1px solid #d9dde3;
  background: #fff;
}

#reimbursement-payment-dialog #reimbursement-history-table .table-row:last-child {
  border-bottom: 0;
}

#reimbursement-payment-dialog #reimbursement-history-table .table-row > :nth-child(2),
#reimbursement-payment-dialog #reimbursement-history-table .table-row > :nth-child(3) {
  text-align: center;
}

#reimbursement-payment-dialog #reimbursement-history-table .row-actions {
  justify-content: flex-end;
  flex-wrap: nowrap;
}

#reimbursement-payment-dialog #reimbursement-history-table .ghost.reimbursement-remove,
#reimbursement-payment-dialog .dialog-actions .ghost {
  background: #fff;
  color: #1d1d1f;
  border: 1px solid #d9dde3;
  border-radius: 0;
  box-shadow: none;
  min-height: 34px;
  padding: 8px 10px;
  white-space: nowrap;
}

#reimbursement-payment-dialog #reimbursement-history-table .ghost.reimbursement-remove:hover,
#reimbursement-payment-dialog .dialog-actions .ghost:hover {
  transform: none;
  background: #fff;
}

#reimbursement-payment-dialog .dialog-actions .primary {
  background: #1d1d1f;
  color: #fff;
  border: 1px solid #1d1d1f;
  border-radius: 0;
  box-shadow: none;
  min-height: 34px;
  padding: 8px 10px;
}

#reimbursement-payment-dialog .dialog-actions .primary:hover {
  background: #111;
  border-color: #111;
  transform: none;
}

.reimbursement-history {
  margin-top: 18px;
}

.reimbursement-history h4 {
  margin: 0 0 10px;
}

#reimbursement-history-table .table-row {
  grid-template-columns: 1.4fr 0.8fr 0.9fr auto;
  min-width: 680px;
}

.row-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.flex-spacer {
  flex: 1;
}

.dialog-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 16px 0;
}

#merch-package-items .table-row {
  grid-template-columns: 1.4fr 0.8fr 0.6fr 0.6fr 120px;
}

#merch-package-items .table-row.header {
  padding: 10px 12px;
}

.package-item-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--muted);
}

.package-item-field span {
  display: none;
}

#merch-packages-table .table-row,
#merch-packages-sales .table-row {
  grid-template-columns: 1.2fr 0.6fr 2fr auto;
}
.checkbox-field {
  display: flex;
  align-items: center;
  justify-content: center;
}

.checkbox-field input {
  width: 16px;
  height: 16px;
}

.contact-row {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-bottom: 16px;
}

.contact-group {
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #fff;
}

.contact-group .subsection-header {
  margin-bottom: 12px;
}

#crew-shifts .table-row {
  align-items: center;
  grid-template-columns: 1fr 1fr 1fr auto;
}

#crew-shifts .table-row.header {
  grid-template-columns: 1fr 1fr 1fr auto;
}

#crew-shifts {
  margin-top: 12px;
}

#crew-shifts .table-row + .table-row {
  margin-top: 8px;
}

.table-row input,
.table-row select {
  width: 100%;
}

#merch-item-sizes {
  min-height: 140px;
}

.merch-sizes-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.size-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 0.9rem;
  cursor: pointer;
}

.size-pill input {
  accent-color: #4f46e5;
}

.personnel-group {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 16px;
  background: #fafbff;
}

.personnel-group .actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.people-table .table-row {
  grid-template-columns: 1.4fr 1.4fr 1fr 1.4fr 0.9fr 1fr 1fr auto auto auto auto;
}

.accept-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--muted);
  white-space: nowrap;
}

.accept-toggle input {
  width: auto;
}

.roster-table .table-row {
  grid-template-columns: 1.2fr 1fr 1.6fr 1.1fr 1.8fr 0.9fr 0.9fr 0.9fr 1.2fr 120px;
  min-width: 980px;
}

.crewing-group .actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.crewing-assignment-table .table-row {
  grid-template-columns: 1.3fr 1.4fr 0.8fr auto;
}

.crewing-table .table-row {
  grid-template-columns: 1.2fr 1fr 1.2fr 1fr 1fr auto;
  min-width: 760px;
}

.crewing-assignment-table .company-contact {
  color: var(--muted);
  font-size: 0.85rem;
}

.table-row .icon-button {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.roster-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.roster-field span {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.roster-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.vehicle-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.vehicle-field span {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.vehicle-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.crewing-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.crewing-field span {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.crewing-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.rate-wrapper {
  display: flex;
  gap: 8px;
  align-items: center;
}

.rate-wrapper .shift-button {
  white-space: nowrap;
}

.transport-table .table-row {
  grid-template-columns: 1.2fr 1fr 1fr 1fr 1fr 240px;
  align-items: center;
}

.travel-select {
  min-width: 240px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.inline-field.compact {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
}

.dialog-inline-button {
  align-self: flex-end;
}

.transfer-list {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--muted);
}

.transfer-list .transfer-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid var(--border);
}

.transfer-list .transfer-item .status {
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
}

.transfer-list .transfer-item.pending {
  border-color: #fbbf24;
  background: #fffbeb;
}

.transfer-list .transfer-item.paid {
  border-color: #4ade80;
  background: #f0fdf4;
}

.file-note {
  display: block;
  margin-top: 6px;
  font-size: 0.85rem;
  color: var(--muted);
}

.accommodation-table .table-row {
  grid-template-columns: 1.1fr 1.6fr 0.9fr 0.9fr 1.1fr 0.8fr 220px;
  align-items: center;
}

.payments-table .table-row {
  grid-template-columns: 1.4fr 0.8fr 0.8fr 160px;
  align-items: center;
}

#profit-assignments-predefined-table .table-row {
  grid-template-columns: 1.2fr 1.4fr 1.4fr 0.8fr 0.9fr 160px;
  min-width: 980px;
  align-items: center;
}

#profit-assignments-custom-table .table-row {
  grid-template-columns: 1.6fr 0.8fr 0.9fr 160px;
  min-width: 720px;
  align-items: center;
}

.tasks-table .table-row {
  grid-template-columns: 1.2fr 0.8fr 1.6fr 1.1fr 0.8fr 160px;
  min-width: 900px;
  align-items: center;
}

#show-tasks-table .table-row {
  grid-template-columns: 0.9fr 1.8fr 1.2fr 0.8fr 160px;
  min-width: 760px;
}

#overview-payments-table .table-row {
  grid-template-columns: 1.6fr 0.8fr 140px;
  min-width: 640px;
  align-items: center;
}

.task-assign-table .table-row {
  grid-template-columns: 1.4fr 1fr 160px;
  min-width: 520px;
  align-items: center;
}

.task-assigned {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: space-between;
}

.task-assigned-names {
  color: var(--muted);
  font-size: 0.9rem;
}

.task-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.task-highlight {
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.4);
}

.task-detail-body {
  white-space: pre-wrap;
  background: #f8fafc;
  border-radius: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  min-height: 120px;
}

.transport-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.transport-actions button {
  white-space: nowrap;
}

.transport-assign {
  display: flex;
  gap: 6px;
  align-items: center;
}

.transport-assign select {
  min-width: 140px;
}

.transport-cost {
  font-weight: 600;
}

.assigned-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 36px;
}

.transport-assign-table .table-row {
  grid-template-columns: 1fr 1fr 1.6fr;
  align-items: start;
}

.accommodation-assign-table .table-row {
  grid-template-columns: 1fr 1fr 1.6fr;
  align-items: start;
}

.assigned-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 0.8rem;
}

.people-table .table-row.accommodation-assigned {
  box-shadow: inset 4px 0 0 #22c55e;
}

.assigned-chip button {
  border: none;
  background: transparent;
  cursor: pointer;
  font-weight: 700;
  color: inherit;
}

.recoupment-grid {
  display: grid;
  gap: 12px;
}

.recoupment-row {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.paid-toggle {
  white-space: nowrap;
}

.paid-from-merch-toggle {
  white-space: nowrap;
}

.reduction-toggle {
  white-space: nowrap;
}

.icon-button {
  padding: 0 8px;
  line-height: 1;
  font-size: 1.1rem;
}

.people-table .table-row.paid {
  border-radius: 10px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
}

.people-table .table-row.paid-from-merch {
  background: #ecfdf3;
  border-color: #86efac;
}

.profit-assignments-table .table-row.completed,
#profit-assignments-table .table-row.completed {
  border-radius: 10px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.section-warning {
  border-color: #f87171 !important;
  background: rgba(254, 226, 226, 0.6);
}

.input-warning {
  border-color: #f87171 !important;
  background: rgba(254, 226, 226, 0.6);
}

.personnel-group .table-row.unassigned {
  border-radius: 10px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
}

.personnel-group .table-row.assigned {
  border-radius: 10px;
  background: #ecfdf3;
  border: 1px solid #bbf7d0;
}

.accommodation-quick-assign .table-row.assigned {
  border-radius: 10px;
  background: #ecfdf3;
  border: 1px solid #bbf7d0;
}

.accommodation-quick-assign .table-row.unassigned {
  border-radius: 10px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
}

.show-sales-table .table-row {
  grid-template-columns: 0.6fr 1fr 1fr 1fr;
}

.inline-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 240px;
}

.stacked-fields {
  display: grid;
  gap: 14px;
  max-width: 420px;
}

input[readonly] {
  background: #f8fafc;
  color: #475569;
}

#profit-split-status {
  font-weight: 600;
}

.muted {
  color: var(--muted);
}

.totals {
  margin-top: 10px;
  font-weight: 600;
}

.hidden {
  display: none;
}

.break-even-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.summary-section {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.summary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.summary-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.summary-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid var(--border);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.summary-item.status-negative {
  border-color: #f87171;
  background: #fff5f5;
}

#facebook-pool-assign-dialog.status-negative {
  border: 1px solid #f87171;
  background: #fff5f5;
}

.summary-item.clickable {
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.summary-item.clickable:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.12);
}

.grid.single {
  grid-template-columns: minmax(220px, 360px);
  justify-content: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.section-gap {
  margin-bottom: 12px;
}

.summary-item strong {
  font-size: 1.1rem;
}

.facebook-budget-summary {
  margin-top: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.facebook-budget-summary .summary-item {
  padding: 10px 12px;
  background: #f8fafc;
}

.summary-item .note {
  font-size: 0.85rem;
  color: var(--muted);
}

.summary-header h3 {
  margin: 0;
}

.summary-header .ghost {
  font-size: 0.9rem;
}

.venue-page #break-even #export-show-report,
.venue-page #break-even #open-profit-splits-show {
  border: 1px solid #d9dde3;
  border-radius: 0;
  background: #fff;
  color: #1d1d1f;
  min-height: 34px;
  box-shadow: none;
  padding: 8px 12px;
}

.venue-page #break-even #export-show-report:hover,
.venue-page #break-even #open-profit-splits-show:hover {
  transform: none;
  background: #fff;
}

#profit-splits-dialog {
  position: fixed;
  top: 50%;
  left: 50%;
  margin: 0;
  border: 1px solid #d9dde3;
  border-radius: 0;
  padding: 16px;
  width: min(760px, 96vw);
  box-shadow: none;
  background: #fff;
  transform: translate(-50%, -48%) scale(0.985);
}

#profit-splits-dialog[open] {
  transform: translate(-50%, -50%) scale(1);
}

#profit-splits-dialog.dialog-closing {
  transform: translate(-50%, -48%) scale(0.985);
}

#profit-splits-dialog .dialog-form {
  gap: 12px;
  max-height: calc(100dvh - 140px);
  overflow: auto;
  padding-right: 4px;
}

#profit-splits-dialog h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1rem;
  color: #1d1d1f;
}

#profit-splits-dialog .stacked-fields {
  max-width: none;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

#profit-splits-dialog .inline-field {
  max-width: none;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #3f4650;
  font-weight: 600;
}

#profit-splits-dialog input[type="number"] {
  border: 1px solid #d9dde3;
  border-radius: 0;
  box-shadow: none;
  background: #fff;
  color: #1d1d1f;
  min-height: 36px;
  height: 36px;
  padding: 8px 10px;
  font-size: 0.84rem;
}

#profit-splits-dialog input[type="number"]:focus {
  outline: none;
  border-color: #1d1d1f;
  box-shadow: none;
}

#profit-splits-dialog .toggle-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

#profit-splits-dialog #use-show-profit-splits {
  width: 16px;
  min-width: 16px;
  max-width: 16px;
  height: 16px;
  min-height: 16px;
  margin: 0;
  padding: 0;
  border: 1px solid #d9dde3;
  border-radius: 0;
  box-shadow: none;
  background: #fff;
}

#profit-splits-dialog #profit-split-status {
  margin: 0;
  font-size: 0.84rem;
  font-weight: 600;
  color: #3f4650;
}

#profit-splits-dialog .dialog-actions .ghost,
#profit-splits-dialog .dialog-actions .primary {
  border-radius: 0;
  min-height: 36px;
  box-shadow: none;
}

#profit-splits-dialog .dialog-actions .ghost {
  border: 1px solid #d9dde3;
  background: #fff;
  color: #1d1d1f;
}

#profit-splits-dialog .dialog-actions .primary {
  border: 1px solid #1d1d1f;
  background: #1d1d1f;
  color: #fff;
}

@media (max-width: 900px) {
  #profit-splits-dialog .stacked-fields {
    grid-template-columns: 1fr;
  }
}

.toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.break-even-grid .label {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
}

#weekly-sales-dialog {
  position: fixed;
  border: none;
  border-radius: 16px;
  padding: 20px;
  width: min(1500px, 96vw);
  max-height: 92vh;
  top: 50%;
  left: 50%;
  margin: 0;
  transform: translate(-50%, -50%) scale(0.985);
  overflow: hidden;
  box-shadow: var(--shadow);
}

#weekly-sales-dialog[open] {
  transform: translate(-50%, -50%) scale(1);
}

#weekly-sales-dialog.dialog-closing {
  transform: translate(-50%, -50%) scale(0.985);
}

#weekly-sales-dialog .dialog-form {
  gap: 14px;
  max-height: calc(92vh - 40px);
  overflow: auto;
  padding-right: 4px;
}

#weekly-sales-dialog h3 {
  margin: 0;
}

#weekly-sales-dialog .muted {
  margin: 0;
}

#weekly-sales-sections {
  display: grid;
  gap: 12px;
}

#weekly-sales-sections .weekly-sales-section {
  border: 1px solid #d9dde3;
  border-radius: 0;
  background: #fff;
}

#weekly-sales-sections .weekly-sales-panel {
  padding: 0 12px 12px;
}

#weekly-sales-sections .weekly-sales-controls {
  justify-content: flex-start;
  margin: 8px 0;
}

#weekly-sales-dialog .weekly-sales-table {
  display: grid;
  gap: 0;
  border: 1px solid #d9dde3;
  overflow-x: auto;
  overflow-y: hidden;
  width: 100%;
}

#weekly-sales-dialog .weekly-sales-table .table-row {
  min-width: 1280px;
  gap: 0;
  grid-template-columns: 160px 130px 150px 110px 130px minmax(360px, 1fr) 110px;
  align-items: center;
}

#weekly-sales-dialog .weekly-sales-table .table-row.header {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #6e6e73;
  background: #f8f9fb;
  border-bottom: 1px solid #d9dde3;
}

#weekly-sales-dialog .weekly-sales-table .table-row > * {
  padding: 8px 10px;
}

#weekly-sales-dialog .weekly-sales-table .table-row:not(.header) {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  border-bottom: 1px solid #d9dde3;
  background: #fff;
}

#weekly-sales-dialog .weekly-sales-table .table-row:last-child {
  border-bottom: 0;
}

#weekly-sales-dialog .weekly-sales-table input {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  font-size: 0.88rem;
  background: #fff;
  padding: 8px 10px;
}

#weekly-sales-dialog .weekly-sales-table .weekly-percent-sold,
#weekly-sales-dialog .weekly-sales-table .weekly-percent-remaining {
  text-align: center;
  white-space: nowrap;
}

#weekly-sales-dialog .weekly-file-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

#weekly-sales-dialog .weekly-file-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.84rem;
  color: #3f4650;
}

#weekly-sales-dialog .weekly-file-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  flex-shrink: 0;
}

#weekly-sales-dialog .ghost {
  background: #fff;
  color: #1d1d1f;
  border: 1px solid #d9dde3;
  border-radius: 0;
  box-shadow: none;
  min-height: 34px;
  padding: 8px 10px;
  white-space: nowrap;
}

#weekly-sales-dialog .ghost:hover {
  transform: none;
  background: #fff;
}

#weekly-sales-dialog summary:focus,
#weekly-sales-dialog summary:focus-visible,
#weekly-sales-dialog details:focus,
#weekly-sales-dialog details:focus-visible,
#weekly-sales-dialog input:focus,
#weekly-sales-dialog input:focus-visible,
#weekly-sales-dialog select:focus,
#weekly-sales-dialog select:focus-visible,
#weekly-sales-dialog button:focus,
#weekly-sales-dialog button:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

#weekly-sales-dialog input:focus,
#weekly-sales-dialog input:focus-visible,
#weekly-sales-dialog select:focus,
#weekly-sales-dialog select:focus-visible {
  border-color: #d9dde3 !important;
  background: #fff !important;
}

#weekly-sales-dialog summary {
  outline: none;
}

#weekly-sales-dialog details > summary::-moz-focus-inner {
  border: 0;
}

#weekly-sales-dialog .dialog-actions {
  flex-wrap: nowrap;
  justify-content: flex-end;
}

#weekly-sales-dialog .weekly-sales-table .remove-row {
  justify-self: start;
}

#shift-dialog {
  border: none;
  border-radius: 16px;
  padding: 20px;
  width: min(520px, 90vw);
  box-shadow: var(--shadow);
}

.dialog-form {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: calc(100vh - 132px);
  overflow: auto;
  overscroll-behavior: contain;
  padding-right: 2px;
}

dialog .dialog-actions button[value="cancel"],
dialog .card-actions button[value="cancel"] {
  display: none !important;
}

dialog {
  position: absolute;
  top: var(--dialog-page-top, 72px);
  left: 50%;
  margin: 0;
  opacity: 0;
  transform: translate(-50%, 8px) scale(0.985);
  transition: opacity 180ms ease, transform 180ms ease;
  overflow: visible;
}

dialog[open] {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

dialog::backdrop {
  background: rgba(15, 23, 42, 0.35);
  opacity: 0;
  transition: opacity 180ms ease;
}

dialog[open]::backdrop {
  opacity: 1;
}

dialog.dialog-closing {
  opacity: 0;
  transform: translate(-50%, 8px) scale(0.985);
}

dialog.dialog-closing::backdrop {
  opacity: 0;
}

.dialog-x-close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 34px;
  height: 34px;
  border: 1px solid #111827;
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: none !important;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
  cursor: pointer;
  z-index: 5;
}

.dialog-x-close > span {
  display: block;
  font-size: 1.3rem;
  line-height: 1;
  transform: translateY(-4px);
}

.dialog-x-close:hover,
.dialog-x-close:focus,
.dialog-x-close:active {
  transform: none !important;
  transition: none !important;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
  background: #fff;
  color: var(--text);
  border-color: #111827;
}

.shift-list {
  display: grid;
  gap: 10px;
}

.shift-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.dialog-actions.align-start {
  justify-content: flex-start;
}

.show-delete-admin-section {
  margin: 24px 0 8px;
  padding: 16px;
  border: 1px solid #fca5a5;
  background: #fff1f2;
  display: grid;
  gap: 10px;
}

.show-delete-admin-section h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: #991b1b;
}

.delete-show-button {
  border-color: #b91c1c !important;
  background: #b91c1c !important;
  color: #fff !important;
}

.delete-show-button:hover {
  border-color: #991b1b !important;
  background: #991b1b !important;
}

#contract-ai-detail-dialog {
  width: min(920px, 94vw);
}

#contract-ai-detail-dialog .contract-ai-detail-dialog-form {
  gap: 14px;
}

#contract-ai-detail-dialog h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1rem;
  color: #1d1d1f;
}

#contract-ai-detail-dialog .grid.two {
  gap: 12px;
}

#contract-ai-detail-dialog label {
  display: grid;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 0.86rem;
  color: #3f4650;
}

#contract-ai-detail-dialog input {
  width: 100%;
  border: 1px solid #d9dde3;
  border-radius: 0;
  box-shadow: none;
  padding: 12px;
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: #1d1d1f;
  background: #fff;
}

#contract-ai-detail-dialog input[readonly] {
  background: #f8f9fb;
}

#contract-ai-detail-dialog .contract-ai-detail-block {
  border: 1px solid #d9dde3;
  background: #fff;
  padding: 12px;
}

#contract-ai-detail-dialog .contract-ai-detail-block h4 {
  margin: 0 0 8px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6e6e73;
}

#contract-ai-detail-dialog .contract-ai-detail-block p {
  margin: 0;
  font-size: 0.9rem;
  color: #1d1d1f;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 220px;
  overflow: auto;
}

.image-preview-dialog {
  border: none;
  padding: 0;
  background: transparent;
  max-width: 92vw;
  max-height: 92vh;
}

.image-preview-dialog::backdrop {
  background: rgba(15, 23, 42, 0.75);
}

.image-preview-form {
  position: relative;
  background: #0f172a;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.35);
  overflow: auto;
  max-width: 92vw;
  max-height: 92vh;
}

.image-preview-form img {
  display: block;
  max-width: 100%;
  max-height: 80vh;
  border-radius: 12px;
  object-fit: contain;
  touch-action: pinch-zoom;
}

.image-preview-close {
  position: absolute;
  top: 8px;
  right: 8px;
  border: none;
  background: rgba(15, 23, 42, 0.7);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.image-preview-close:hover {
  background: rgba(15, 23, 42, 0.9);
}

@media (max-width: 900px) {
  main {
    padding: 0 6vw 40px;
  }

  .mobile-only {
    display: inline-flex;
  }

  .desktop-only {
    display: none;
  }

  #merch-items .dashboard-actions {
    display: none;
  }

  .people-table .table-row {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  }

  #quick-personnel-list .table-row.header {
    display: none;
  }

  #quick-personnel-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  #quick-personnel-list .table-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    min-width: 0;
  }

  #quick-personnel-list .table-row span {
    width: 100%;
  }

  #quick-personnel-list .table-row .row-actions {
    justify-content: flex-start;
  }

  #quick-personnel-list .table-row .row-actions button {
    width: auto;
  }

  #roster-table .table-row.header,
  #vehicle-table .table-row.header,
  #crewing-table .table-row.header,
  #merch-items-table .table-row.header,
  #merch-packages-list .table-row.header,
  #merch-packages-table .table-row.header {
    display: none;
  }

  #roster-table,
  #vehicle-table,
  #crewing-table,
  #merch-items-table,
  #merch-packages-list,
  #merch-packages-table {
    overflow-x: visible;
  }

  #roster-table .table-row,
  #vehicle-table .table-row,
  #crewing-table .table-row,
  #merch-items-table .table-row,
  #merch-packages-list .table-row,
  #merch-packages-table .table-row {
    min-width: 0;
    grid-template-columns: 1fr;
  }

  #roster-table .roster-field span {
    display: block;
  }

  #vehicle-table .vehicle-field span {
    display: block;
  }

  #crewing-table .crewing-field span {
    display: block;
  }

  #merch-package-items .table-row.header {
    display: none;
  }

  #merch-package-items .table-row {
    min-width: 0;
    grid-template-columns: 1fr;
  }

  #merch-package-items .table-row > span,
  #merch-package-items .table-row > input,
  #merch-package-items .table-row > select,
  #merch-package-items .table-row > button {
    width: 100%;
  }

  #users-table .table-row.header {
    display: none;
  }

  #users-table {
    overflow-x: visible;
  }

  #users-table .table-row {
    min-width: 0;
    grid-template-columns: 1fr;
  }

  #users-table .user-field span {
    display: block;
  }

  .monies-owing-table .table-row.header {
    display: none;
  }

  .monies-owing-table {
    overflow-x: visible;
  }

  .monies-owing-table .table-row {
    min-width: 0;
    grid-template-columns: 1fr;
  }

  .monies-owing-table .table-row > span {
    width: 100%;
  }

  .monies-owing-table .table-row > span::before {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
    margin-bottom: 4px;
  }

  .monies-owing-table .table-row > span:nth-child(1)::before {
    content: "Show";
  }

  .monies-owing-table .table-row > span:nth-child(2)::before {
    content: "Description";
  }

  .monies-owing-table .table-row > span:nth-child(3)::before {
    content: "Owed (£)";
  }

  .monies-owing-table .table-row > span:nth-child(4)::before {
    content: "Paid (£)";
  }

  .monies-owing-table .table-row > span:nth-child(5)::before {
    content: "Remaining (£)";
  }

  .costs-due-table .table-row.header {
    display: none;
  }

  .costs-due-table {
    overflow-x: visible;
  }

  .costs-due-table .table-row {
    min-width: 0;
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .costs-due-table .table-row > span {
    width: 100%;
    padding: 0;
    border-right: 0;
  }

  .costs-due-table .table-row > span::before {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
    margin-bottom: 4px;
  }

  .costs-due-table .table-row > span:nth-child(1)::before {
    content: "Cost";
  }

  .costs-due-table .table-row > span:nth-child(2)::before {
    content: "Owed (£)";
  }

  .costs-due-table .table-row > span:nth-child(3)::before {
    content: "Paid (£)";
  }

  .costs-due-table .table-row > span:nth-child(4)::before {
    content: "Remaining (£)";
  }

  #overview-payments-dialog .overview-payments-members-table .table-row.header {
    display: grid;
  }

  #overview-payments-dialog .overview-payments-members-table {
    overflow-x: auto;
  }

  #overview-payments-dialog .overview-payments-members-table .table-row {
    min-width: 720px;
    grid-template-columns: minmax(0, 1.85fr) minmax(90px, 0.7fr) minmax(90px, 0.6fr) minmax(82px, 0.55fr) minmax(112px, 0.7fr);
    gap: 0;
  }

  #overview-payments-dialog .overview-payments-members-table .table-row > span {
    width: auto;
    padding: 8px 10px;
    border-right: 0;
  }

  #overview-payments-dialog .overview-payments-members-table .table-row > span::before {
    display: none;
  }

  .overview-unread-table .table-row.header {
    display: none;
  }

  .overview-unread-table {
    overflow-x: visible;
  }

  .overview-unread-table .table-row {
    min-width: 0;
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .overview-unread-table .table-row > span {
    width: 100%;
    padding: 0;
    border-right: 0;
  }

  .overview-unread-table .table-row > span::before {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
    margin-bottom: 4px;
  }

  .overview-unread-table .table-row > span:nth-child(1)::before {
    content: "From";
  }

  .overview-unread-table .table-row > span:nth-child(2)::before {
    content: "Subject";
  }

  .overview-unread-table .table-row > span:nth-child(3)::before {
    content: "Received";
  }

  #merch-inventory-table .table-row.header,
  #merch-stock-table .table-row.header,
  #merch-stock-subtract-table .table-row.header {
    display: none;
  }

  #merch-inventory-table .table-row,
  #merch-stock-table .table-row,
  #merch-stock-subtract-table .table-row {
    min-width: 0;
    grid-template-columns: 1fr;
  }

  #merch-inventory-table .merch-field,
  #merch-stock-table .merch-field,
  #merch-stock-subtract-table .merch-field {
    width: 100%;
  }

  #merch-package-items .package-item-field span {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }

  #facebook-budget-table .budget-card-title {
    font-weight: 600;
  }

  #facebook-budget-table .budget-line {
    display: flex;
    justify-content: space-between;
    gap: 12px;
  }

  #facebook-budget-table .budget-line-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
  }

  #facebook-budget-table .budget-line-value {
    font-weight: 600;
  }

.facebook-budget-controls .grid.two {
  gap: 12px;
  margin-bottom: 20px;
}

.facebook-budget-controls .grid.two + .summary-grid {
  margin-top: 20px;
}

.facebook-budget-controls .summary-grid {
  margin-top: 24px;
}

.facebook-budget-controls .facebook-budget-secondary {
  margin-top: 24px;
}

  #merch-admin-summary .merch-summary-title {
    font-weight: 600;
  }

  #merch-admin-summary .merch-summary-line {
    display: flex;
    justify-content: space-between;
    gap: 12px;
  }

  #merch-admin-summary .merch-summary-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
  }

  #merch-admin-summary .merch-summary-value {
    font-weight: 600;
  }

  .merch-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .merch-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: space-between;
  }

  .merch-card-header h3 {
    margin: 0;
    font-size: 1.05rem;
  }

  .merch-card-header .muted {
    margin: 4px 0 0;
  }

  .merch-card-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
  }

  .merch-thumb.placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: #f1f5f9;
    color: #94a3b8;
    font-size: 0.85rem;
  }

  #show-list .table-row.header {
    display: none;
  }

  #show-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: stretch;
  }

  .show-card {
    background: var(--card);
    border-radius: 16px;
    padding: 16px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
    align-self: stretch;
    text-align: left;
    justify-items: stretch;
  }

  .show-card-header {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: center;
    justify-items: start;
    width: 100%;
  }

  .show-card-header > div {
    min-width: 0;
    text-align: left;
  }

  .show-card-header h3 {
    margin: 0;
    font-size: 1.1rem;
  }

  .show-card-header .muted {
    margin: 4px 0 0;
  }

  .show-card-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    justify-items: start;
    width: 100%;
  }

  .show-card-metrics > div {
    text-align: left;
  }

  .merch-card-header {
    display: grid;
    grid-template-columns: 54px 1fr auto;
    align-items: center;
    gap: 12px;
  }

  .merch-card-header > div {
    min-width: 0;
    text-align: left;
  }

  #merch-packages-list .merch-card {
    background: #f8fafc;
    border-color: #dbeafe;
  }

  #merch-packages-list .merch-card-header {
    grid-template-columns: 1fr auto;
  }

  #merch-packages-list .merch-card-header h3 {
    font-size: 1rem;
  }

  #merch-packages-list .merch-card-header p {
    font-size: 0.82rem;
    line-height: 1.35;
  }

  .merch-card-header .merch-thumb,
  .merch-card-header .merch-thumb.placeholder {
    width: 54px;
    height: 54px;
  }

  .show-card-metrics .label {
    display: block;
    color: var(--muted);
    font-size: 0.8rem;
    margin-bottom: 4px;
  }

  .show-card-metrics strong {
    font-size: 1rem;
  }

  .show-card-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
  }

  .table-row {
    min-width: 0;
  }

  .itinerary-table .table-row {
    grid-template-columns: 32px 1fr;
  }

  .itinerary-table .table-row span:nth-child(n + 3) {
    display: none;
  }
}

@media (max-width: 640px) {
  header {
    padding: 24px 6vw 8px;
  }

  header.page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .header-actions {
    width: 100%;
  }

  .header-actions .button-link,
  .header-actions button {
    width: 100%;
    justify-content: center;
  }


  .grid.two,
  .grid.three,
  .grid.four {
    grid-template-columns: 1fr;
  }

  .summary-grid,
  .recoupment-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-actions {
    gap: 8px;
  }

  .table-row {
    min-width: 620px;
  }

  .accept-page,
  .wide-page {
    padding: 0 6vw 40px;
  }
}

@media (max-width: 900px) {
  .venue-page .table {
    overflow-x: visible;
  }

  .venue-page .table-row.header {
    display: none;
  }

  .venue-page .table-row {
    min-width: 0 !important;
    grid-template-columns: 1fr !important;
  }

  .venue-page .table-row > * {
    width: 100%;
  }

  .venue-page .table-cell-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  .venue-page .table-cell-field .cell-label,
  .venue-page .table-row > [data-label]::before {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
    margin-bottom: 4px;
  }

  .venue-page .table-row .row-actions,
  .venue-page .table-row .button-group {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .venue-page .table-row {
    min-width: 0 !important;
  }
}

@media (max-width: 900px) {
  #weekly-sales-dialog {
    width: min(1500px, 98vw);
  }

  #weekly-sales-dialog .weekly-sales-table .table-row.header {
    display: grid !important;
  }

  #weekly-sales-dialog .weekly-sales-table .table-row {
    min-width: 1280px !important;
    grid-template-columns: 160px 130px 150px 110px 130px minmax(360px, 1fr) 110px !important;
  }

  #weekly-sales-dialog .weekly-sales-table .table-row > * {
    width: auto !important;
  }
}

.facebook-ads-shell {
  width: min(1400px, calc(100vw - 48px));
  margin: calc(var(--top-nav-height) + 24px) auto 48px;
  display: grid;
  gap: 24px;
}

.facebook-ads-hero,
.facebook-ads-layout,
.facebook-ads-summary-grid {
  display: grid;
  gap: 24px;
}

.facebook-ads-hero {
  grid-template-columns: 1fr auto;
  align-items: end;
}

.facebook-ads-status {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.facebook-ads-summary-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.facebook-ads-layout {
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
}

.facebook-audience-results,
.facebook-recommendations-list,
.facebook-audit-list {
  display: grid;
  gap: 16px;
}

.facebook-audience-card,
.facebook-recommendation-card,
.facebook-audit-entry {
  border: 1px solid rgba(122, 83, 101, 0.14);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.82);
  padding: 18px 20px;
  box-shadow: 0 16px 36px rgba(83, 44, 60, 0.08);
}

.facebook-audience-card-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.facebook-audience-columns,
.facebook-recommendation-columns {
  display: grid;
  gap: 16px;
}

.facebook-audience-columns {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.facebook-recommendation-columns {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.facebook-audience-columns ul,
.facebook-recommendation-columns ul {
  margin: 10px 0 0;
  padding-left: 18px;
}

.facebook-audit-entry {
  display: grid;
  gap: 6px;
}

.facebook-show-pipeline .table-row {
  grid-template-columns: minmax(220px, 1.5fr) 0.6fr 0.6fr 0.8fr 0.7fr 0.8fr 1fr;
}

@media (max-width: 1100px) {
  .facebook-ads-summary-grid,
  .facebook-ads-layout,
  .facebook-audience-columns,
  .facebook-recommendation-columns {
    grid-template-columns: 1fr;
  }

  .facebook-ads-hero {
    grid-template-columns: 1fr;
  }

  .facebook-ads-status {
    justify-content: flex-start;
  }
}

.facebook-ads-workspace,
.facebook-ads-config-shell {
  width: auto;
  margin: 12px;
  padding: 0;
  box-sizing: border-box;
  display: grid;
  gap: 12px;
}

.facebook-ads-manager-workspace {
  grid-template-rows: auto auto;
  height: auto;
  overflow: visible;
}

.facebook-ads-page main {
  padding: 0;
}

.facebook-ads-page {
  overflow: hidden;
}

.facebook-ads-workspace {
  grid-template-rows: auto minmax(0, 1fr);
  height: calc(100vh - var(--top-nav-height) - 24px);
  overflow: hidden;
}

.facebook-show-overview-card .subsection-header {
  align-items: flex-start;
}

.facebook-ads-summary-strip {
  align-items: stretch;
}

.facebook-budget-pool-tile {
  width: 100%;
  border: 1px solid rgba(227, 230, 243, 0.96);
  text-align: left;
}

.facebook-warning-tile {
  width: 100%;
  text-align: left;
}

.facebook-campaign-warning-button {
  border: none;
  cursor: pointer;
}

.facebook-ads-page .facebook-campaign-warning-button:not(:disabled) {
  background: #dc2626;
  color: #fff;
  border-color: #dc2626;
}

.facebook-ads-page .facebook-campaign-warning-button:not(:disabled):hover {
  background: #b91c1c;
  border-color: #b91c1c;
}

.facebook-ads-page .facebook-campaign-warning-button:disabled {
  opacity: 0.45;
  cursor: default;
}

.facebook-campaign-actions {
  position: relative;
}

.facebook-campaign-actions-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  display: none;
  background: #fff;
  border: 1px solid rgba(31, 36, 48, 0.08);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(15, 15, 15, 0.12);
  padding: 8px;
  z-index: 30;
}

.facebook-campaign-actions.is-open .facebook-campaign-actions-menu {
  display: grid;
  gap: 4px;
}

.facebook-campaign-actions-menu button {
  appearance: none;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 10px 12px;
  border-radius: 10px;
  font: inherit;
  color: var(--text);
  cursor: pointer;
}

.facebook-show-actions-menu {
  min-width: 240px;
}

.facebook-show-automation-pill {
  appearance: none;
  border: 1px solid #f2b8b5;
  background: #fff1f1;
  padding: 2px 8px;
  font: inherit;
  line-height: 1.3;
  cursor: pointer;
}

.facebook-show-automation-pill.is-income {
  border-color: #a6f4c5;
  background: #ecfdf3;
}

.facebook-show-approval-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  font-size: 0.76rem;
  font-weight: 600;
  color: #344054;
  border: 1px solid #d0d5dd;
  background: #f8fafc;
  padding: 2px 8px;
  line-height: 1.3;
  border-radius: 999px;
}

.facebook-campaign-actions-menu button:hover {
  background: #f4f5f8;
}

.facebook-ads-main-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
  min-height: 0;
  overflow: hidden;
}

.facebook-show-drawer-toggle {
  position: fixed;
  left: -22px;
  top: calc(var(--top-nav-height) + ((100vh - var(--top-nav-height)) / 2));
  transform: translateY(-50%);
  z-index: 24;
  width: 14px;
  height: 56px;
  border: 1px solid rgba(31, 36, 48, 0.12);
  border-left: 0;
  border-radius: 0 12px 12px 0;
  background: #cb6d2d;
  color: #fff;
  font-size: 1.05rem;
  line-height: 1;
  display: grid;
  place-items: center;
  box-shadow: 0 14px 30px rgba(15, 15, 15, 0.12);
  cursor: pointer;
}

.facebook-show-drawer-toggle-icon {
  display: inline-block;
  transform: translateX(8px);
}

.facebook-show-drawer-toggle:hover {
  background: #8f5a2a;
  transform: translateY(-50%);
}

.facebook-show-list-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  position: fixed;
  top: var(--top-nav-height);
  left: 0;
  bottom: 0;
  width: 320px;
  max-width: calc(100vw - 48px);
  z-index: 22;
  transform: translateX(calc(-100% - 16px));
  transition: transform 180ms ease;
  border-radius: 0 20px 20px 0;
}

.facebook-ads-main-grid.is-open .facebook-show-list-card {
  transform: translateX(0);
}

.facebook-show-list {
  display: grid;
  gap: 12px;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.facebook-show-list-item {
  border: 1px solid rgba(122, 83, 101, 0.14);
  background: rgba(255, 255, 255, 0.86);
  border-radius: 18px;
  padding: 14px 16px;
  display: grid;
  gap: 6px;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 14px 30px rgba(83, 44, 60, 0.08);
}

.facebook-show-list-item.is-active {
  border-color: rgba(189, 71, 110, 0.36);
  background: linear-gradient(180deg, rgba(255, 246, 249, 0.98) 0%, rgba(255, 255, 255, 0.96) 100%);
}

.facebook-show-detail,
.facebook-campaign-stack {
  display: grid;
  gap: 12px;
}

.facebook-audience-builder-card {
  display: grid;
  gap: 12px;
}

.facebook-audience-stack.show-details-accordion {
  gap: 0;
}

.facebook-audience-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.facebook-audience-meta-grid .label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 6px;
}

.facebook-audience-metric {
  border: 1px solid #d9dde3;
  background: #fff;
  padding: 10px 12px;
  min-height: 72px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 4px;
}

.facebook-audience-metric strong {
  font-size: 1rem;
  line-height: 1.2;
  color: #1d1d1f;
}

.facebook-audience-stack {
  display: grid;
  gap: 12px;
}

.facebook-audience-builder-shell .show-details-panel > .facebook-audience-stack.show-details-accordion {
  margin-top: 12px;
}

.facebook-visibility-schedule-shell .show-details-panel {
  padding-top: 12px;
}

.facebook-visibility-schedule-toolbar {
  margin-bottom: 12px;
}

.facebook-visibility-schedule-toolbar p {
  margin: 0;
}

.facebook-visibility-schedule-meta {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
  margin-bottom: 12px;
}

.facebook-visibility-notes-card {
  border: 1px solid #d9dde3;
  background: #fff;
  padding: 10px 12px;
  display: grid;
  gap: 6px;
}

.facebook-visibility-notes-card p {
  margin: 0;
}

.facebook-visibility-table-wrap {
  overflow: auto;
  border: 1px solid #d9dde3;
  background: #fff;
}

.facebook-visibility-table {
  min-width: 1320px;
  display: grid;
  grid-template-columns: 220px repeat(48, minmax(18px, 1fr));
  gap: 0;
  align-items: stretch;
}

.facebook-visibility-table-corner,
.facebook-visibility-hour-header,
.facebook-visibility-day-label,
.facebook-visibility-block {
  border-right: 1px solid #e6e8ee;
  border-bottom: 1px solid #e6e8ee;
}

.facebook-visibility-table-corner {
  background: #f8fafc;
  min-height: 42px;
}

.facebook-visibility-hour-header {
  min-height: 42px;
  display: grid;
  place-items: center;
  background: #f8fafc;
  font-size: 0.7rem;
  font-weight: 600;
  color: #667085;
}

.facebook-visibility-hour-header.is-major {
  background: #eef3fb;
}

.facebook-visibility-day-label {
  padding: 10px 12px;
  display: flex;
  align-items: center;
  background: #fff;
  min-height: 64px;
}

.facebook-visibility-day-label strong {
  font-size: 0.9rem;
}

.facebook-visibility-block {
  appearance: none;
  min-width: 18px;
  height: 64px;
  padding: 0;
  background: #fff;
  cursor: pointer;
  border-top: 0;
  border-left: 0;
  border-radius: 0;
  display: block;
}

.facebook-visibility-block:hover {
  background: #fef3f2;
}

.facebook-visibility-block.is-active {
  background: #067647;
}

.facebook-visibility-block.is-active:hover {
  background: #055f39;
}

.facebook-visibility-block.is-major {
  box-shadow: inset 1px 0 0 rgba(23, 92, 211, 0.12);
}

.facebook-audience-card {
  background: #fff;
}

.facebook-audience-stack.show-details-accordion .facebook-audience-card + .facebook-audience-card {
  border-top: 0;
}

.facebook-audience-stack.show-details-accordion .facebook-audience-card {
  border-radius: 0;
  box-shadow: none;
  padding: 0;
}

.facebook-audience-stack.show-details-accordion .facebook-audience-card summary {
  border-radius: 0;
  overflow: hidden;
  min-height: 48px;
  height: 48px;
  max-height: 48px;
  padding: 12px 16px;
  gap: 8px;
  box-sizing: border-box;
}

.facebook-audience-stack.show-details-accordion .facebook-audience-card > .show-details-panel {
  padding-top: 0;
}

.facebook-audience-stack.show-details-accordion .facebook-audience-card .subsection-header {
  margin-bottom: 10px;
}

.facebook-audience-stack.show-details-accordion .facebook-audience-card summary > span:first-child {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.facebook-audience-stack.show-details-accordion .facebook-audience-card .section-cost-indicator {
  white-space: nowrap;
}

.facebook-audience-stack.show-details-accordion .facebook-audience-card .section-cost-indicator-group {
  flex-wrap: nowrap;
}

.facebook-audience-remove-pill {
  appearance: none;
  border: 1px solid #f3b0ad;
  background: #fff2f1;
  color: #b42318;
  border-radius: 999px;
  padding: 2px 10px;
  line-height: 1.3;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
}

.facebook-audience-remove-pill:hover {
  background: #ffe4e1;
}

.facebook-audience-sync-pill {
  appearance: none;
  border: 1px solid #b9d7f8;
  background: #eef6ff;
  color: #175cd3;
  border-radius: 999px;
  padding: 2px 10px;
  line-height: 1.3;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
}

.facebook-audience-sync-pill:hover {
  background: #ddeeff;
}

.facebook-sync-overlay {
  position: fixed;
  inset: 0;
  z-index: 70000;
  display: none;
  box-sizing: border-box;
  width: 100vw;
  max-width: none;
  height: 100vh;
  max-height: none;
  padding: 0;
  margin: 0;
  border: none;
  background: rgba(20, 23, 31, 0.42);
  overflow: hidden;
}

.facebook-sync-overlay.is-open {
  display: block;
  pointer-events: auto;
}

.facebook-sync-overlay-card {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(440px, 92vw);
  max-width: 92vw;
  display: grid;
  gap: 14px;
  padding: 22px 24px;
  border: 1px solid rgba(217, 221, 227, 0.9);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 24px 60px rgba(31, 41, 55, 0.24);
}

.facebook-sync-overlay-card h3 {
  margin: 0;
}

.facebook-sync-spinner {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 3px solid rgba(194, 127, 149, 0.18);
  border-top-color: #c27f95;
  animation: facebook-sync-spin 0.85s linear infinite;
}

.facebook-sync-progress {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #eef2f6;
}

.facebook-sync-progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #c27f95 0%, #d98da4 100%);
  transition: width 220ms ease;
}

.facebook-sync-progress-meta {
  display: flex;
  justify-content: flex-end;
  font-size: 0.84rem;
  font-weight: 600;
  color: #4b5563;
}

body.facebook-sync-active {
  overflow: hidden;
}

@keyframes facebook-sync-spin {
  to {
    transform: rotate(360deg);
  }
}

.facebook-audience-fields.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.facebook-audience-fields textarea,
.facebook-audience-fields input,
.facebook-audience-fields select {
  width: 100%;
}

.facebook-audience-checkbox {
  display: grid;
  gap: 8px;
  align-content: start;
}

.facebook-audience-checkbox input {
  width: auto;
  justify-self: start;
}

.facebook-audience-signal-note,
.facebook-campaign-audience-note {
  margin: 0;
}

.facebook-audience-signal-note {
  margin-top: 8px;
}

.facebook-meta-mapping-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  margin-bottom: 12px;
  border: 1px solid #d9dde3;
  background: #f8fafc;
}

.facebook-meta-mapping-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.facebook-meta-mapping-header strong {
  display: block;
  margin-top: 4px;
  font-size: 0.98rem;
  color: #1d1d1f;
}

.facebook-meta-mapping-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.facebook-meta-mapping-list {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid #d9dde3;
  background: #fff;
}

.facebook-meta-mapping-list ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 4px;
}

.facebook-audience-mapping-accordion {
  margin-bottom: 12px;
  border: 1px solid #d9dde3;
  background: #fff;
}

.facebook-audience-card > .show-details-panel > .facebook-audience-mapping-accordion + .facebook-audience-mapping-accordion {
  border-top: 1px solid #d9dde3;
}

.facebook-audience-mapping-accordion summary {
  cursor: pointer;
  padding: 12px 14px;
  font-weight: 600;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.facebook-audience-mapping-accordion summary::-webkit-details-marker {
  display: none;
}

.facebook-audience-mapping-accordion summary::after {
  content: "+";
  margin-left: auto;
  font-size: 1rem;
  color: var(--muted);
}

.facebook-audience-mapping-accordion[open] > summary::after {
  content: "-";
}

.facebook-audience-mapping-table {
  margin-top: 10px;
}

.facebook-audience-mapping-row button {
  min-width: 96px;
}

.facebook-meta-targeting-code {
  margin: 0;
  padding: 10px 12px;
  overflow: auto;
  border: 1px solid #d9dde3;
  background: #0f172a;
  color: #e2e8f0;
  font-size: 0.8rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.facebook-campaign-audience-note {
  margin-top: 12px;
}

.facebook-ads-page .show-details-accordion {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.facebook-ads-page .show-details-accordion details {
  border: 1px solid #d9dde3;
  background: #fff;
}

.facebook-ads-page .show-details-accordion details + details {
  border-top: 0;
}

.facebook-ads-page .show-details-accordion summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 16px;
  min-height: 52px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
}

.facebook-ads-page .show-details-accordion summary::-webkit-details-marker {
  display: none;
}

.facebook-ads-page .show-details-accordion summary::after {
  content: "+";
  margin-left: 10px;
  color: #6e6e73;
  font-size: 1.1rem;
  line-height: 1;
}

.facebook-ads-page .show-details-accordion details[open] > summary::after {
  content: "-";
}

.facebook-ads-page .show-details-accordion .section-cost-indicator {
  margin-left: auto;
  font-size: 0.76rem;
  font-weight: 600;
  color: #b42318;
  border: 1px solid #f2b8b5;
  background: #fff1f1;
  padding: 2px 8px;
  line-height: 1.3;
}

.facebook-ads-page .show-details-accordion .section-cost-indicator.is-income {
  color: #067647;
  border-color: #a6f4c5;
  background: #ecfdf3;
}

.facebook-ads-page .show-details-accordion .section-cost-indicator.is-neutral {
  color: #344054;
  border-color: #d0d5dd;
  background: #f8fafc;
}

.facebook-ads-page .show-details-accordion .section-cost-indicator.is-empty {
  visibility: hidden;
  border-color: transparent;
  background: transparent;
  padding: 0;
  min-width: 0;
}

.facebook-ads-page .show-details-accordion .section-cost-indicator-group {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.facebook-ads-page .show-details-accordion .section-cost-indicator-group .section-cost-indicator {
  margin-left: 0;
}

.facebook-ads-page .show-details-panel {
  padding: 0 16px 16px;
}

.facebook-show-detail {
  min-height: 0;
  overflow: auto;
  align-content: start;
  padding-right: 0;
  padding-top: 0;
}

@media (max-width: 1280px) {
  .facebook-visibility-table {
    min-width: 1180px;
  }
}

@media (max-width: 900px) {
  .facebook-visibility-schedule-meta {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .facebook-visibility-table {
    min-width: 1040px;
  }
}

.facebook-back-link {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
}

#facebook-manager-table-section {
  width: 100%;
}

#facebook-manager-table {
  gap: 0;
  overflow-x: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: #fff;
  font-size: 0.78rem;
}

#facebook-manager-table .table-row {
  min-width: 0;
  grid-template-columns: 0.9fr 1.7fr 0.95fr 0.85fr 0.85fr 0.9fr 0.8fr;
  gap: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
}

#facebook-manager-table .table-row > span:nth-child(2) {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#facebook-manager-table .table-row span {
  padding: 8px 8px;
  border-right: 1px solid var(--border);
  line-height: 1.2;
  overflow-wrap: anywhere;
}

#facebook-manager-table .table-row span:last-child {
  border-right: 0;
}

#facebook-manager-table .table-row span:nth-child(n + 3) {
  text-align: center;
}

#facebook-manager-table .table-row.header {
  background: #f8fafc;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

#facebook-manager-table .table-row:not(.header) {
  border-top: 1px solid var(--border);
  cursor: pointer;
}

#facebook-manager-table .table-row:not(.header):hover {
  background: #f8fafc;
}

#facebook-manager-table .table-row .status-positive {
  background: #ecfdf3;
  color: #166534;
  font-weight: 600;
}

#facebook-manager-table .table-row .status-negative {
  background: #fef2f2;
  color: #b91c1c;
  font-weight: 600;
}

#facebook-manager-table-empty {
  margin: 8px 0 0;
}

#facebook-budget-pool-dialog {
  border: none;
  border-radius: 18px;
  padding: 22px;
  width: min(1100px, calc(100vw - 48px));
  box-shadow: var(--shadow);
}

#facebook-show-budget-assign-dialog {
  border: none;
  border-radius: 18px;
  padding: 22px;
  width: min(1220px, calc(100vw - 48px));
  box-shadow: var(--shadow);
}

#facebook-campaign-budget-dialog {
  border: none;
  border-radius: 18px;
  padding: 22px;
  width: min(560px, calc(100vw - 48px));
  box-shadow: var(--shadow);
}

#facebook-break-even-dialog {
  border: none;
  border-radius: 18px;
  padding: 22px;
  width: min(820px, calc(100vw - 48px));
  box-shadow: var(--shadow);
}

#facebook-break-even-dialog .subsection-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: nowrap;
  position: relative;
  padding-right: 88px;
}

#facebook-break-even-dialog .subsection-header > div:first-child {
  flex: 1;
  min-width: 0;
}

#facebook-break-even-dialog .subsection-header .row-actions {
  position: absolute;
  top: 0;
  right: 0;
  margin-left: 0;
  flex: 0 0 auto;
  flex-wrap: nowrap;
}

#facebook-warnings-dialog {
  border: none;
  border-radius: 18px;
  padding: 22px;
  width: min(1120px, calc(100vw - 48px));
  box-shadow: var(--shadow);
}

#facebook-daily-budget-dialog {
  border: none;
  border-radius: 18px;
  padding: 22px;
  width: min(1080px, calc(100vw - 48px));
  box-shadow: var(--shadow);
  outline: none;
}

#facebook-ad-generate-dialog {
  border: none;
  border-radius: 18px;
  padding: 22px;
  width: min(880px, calc(100vw - 48px));
  box-shadow: var(--shadow);
}

.facebook-warnings-list {
  display: grid;
  gap: 8px;
  margin-top: 0;
}

.facebook-warning-card {
  display: grid;
  gap: 4px;
  padding: 0;
  border-radius: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
}

.facebook-warning-card > p {
  margin: 0;
}

.facebook-budget-target-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.facebook-budget-target-card {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid rgba(31, 36, 48, 0.08);
  border-radius: 0;
  background: #fbfbfd;
  box-shadow: none;
}

.facebook-budget-custom-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-top: 14px;
}

.facebook-budget-custom-ticket-result {
  margin-top: 8px;
}

.facebook-budget-target-card-wide {
  grid-column: 1 / -1;
}

.facebook-daily-budget-table .table-row {
  grid-template-columns: minmax(180px, 1fr) 120px 140px 160px;
}

.facebook-daily-budget-insights {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.facebook-daily-budget-button {
  border: none;
  background: transparent;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  outline: none;
  box-shadow: none;
}

.facebook-daily-budget-tile {
  cursor: pointer;
}

.facebook-daily-budget-tile:focus,
.facebook-daily-budget-tile:focus-visible,
.facebook-daily-budget-button:focus,
.facebook-daily-budget-button:focus-visible,
#facebook-daily-budget-dialog:focus,
#facebook-daily-budget-dialog:focus-visible {
  outline: none;
  box-shadow: none;
}

.facebook-daily-budget-table .table {
  background: transparent;
  border: none;
  border-radius: 0;
  overflow: hidden;
  outline: none;
  box-shadow: none;
  gap: 0;
}

.facebook-daily-budget-table .table-row {
  margin: 0;
  border-radius: 0;
  background: transparent;
  border-bottom: none;
  padding: 12px 16px;
  gap: 0;
}

.facebook-daily-budget-table .table-row:not(.header) {
  border: 0;
  border-radius: 0;
}

.facebook-daily-budget-table .table-row.header {
  background: #f8f9fc;
  font-weight: 600;
  border-bottom: 1px solid rgba(31, 36, 48, 0.08);
}

.facebook-daily-budget-table {
  margin-top: 0;
  border: 1px solid rgba(31, 36, 48, 0.08);
  border-radius: 16px;
  overflow: auto;
  max-height: min(56vh, 680px);
  background: #fff;
  outline: none;
  box-shadow: none;
}

.facebook-daily-budget-table:focus,
.facebook-daily-budget-table:focus-visible,
.facebook-daily-budget-table .table:focus,
.facebook-daily-budget-table .table:focus-visible,
.facebook-daily-budget-table .table:focus-within,
#facebook-daily-budget-dialog .dialog-form:focus,
#facebook-daily-budget-dialog .dialog-form:focus-visible {
  outline: none;
  box-shadow: none;
}

#facebook-daily-budget-rows {
  display: contents;
  margin: 0;
  padding: 0;
}

#facebook-daily-budget-rows .table-row {
  border-top: 1px solid rgba(31, 36, 48, 0.08);
}

#facebook-daily-budget-rows .table-row:first-child {
  border-top: none;
}

.facebook-budget-pool-toolbar {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.facebook-budget-pool-table {
  overflow-x: auto;
}

.facebook-budget-pool-table .table-row {
  grid-template-columns: minmax(180px, 1.2fr) 120px 140px minmax(220px, 1fr) 120px;
}

.facebook-budget-pool-table input {
  width: 100%;
}

.facebook-show-budget-assign-table {
  overflow-x: auto;
}

.facebook-show-budget-assign-table .table-row {
  grid-template-columns: 120px minmax(220px, 1.2fr) 120px 140px 140px 150px 100px;
}

.facebook-show-budget-assign-table input {
  width: 100%;
}

.facebook-break-even-table {
  border: 1px solid rgba(31, 36, 48, 0.08);
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
}

.facebook-break-even-table .table {
  gap: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.facebook-break-even-table .table-row {
  grid-template-columns: minmax(240px, 1fr) 180px 140px;
  border-radius: 0;
  margin: 0;
  border-bottom: 1px solid rgba(31, 36, 48, 0.08);
  padding: 12px 16px;
  gap: 0;
}

.facebook-break-even-table .table-row:last-child {
  border-bottom: 0;
}

.facebook-break-even-table .table-row.header {
  background: #f8f9fc;
  font-weight: 600;
  border-bottom: 1px solid rgba(31, 36, 48, 0.08);
}

.facebook-break-even-table .table-row.facebook-break-even-group-row {
  background: #f8f9fc;
  font-weight: 600;
}

.facebook-break-even-table .table-row.facebook-break-even-subrow {
  background: #fcfcfe;
}

.facebook-break-even-table .table-row.facebook-break-even-subrow > :first-child {
  padding-left: 18px;
}

#facebook-break-even-rows {
  display: contents;
  margin: 0;
  padding: 0;
}

#facebook-break-even-rows .table-row {
  border-top: 1px solid rgba(31, 36, 48, 0.08);
}

#facebook-break-even-rows .table-row:first-child {
  border-top: none;
}

.facebook-ads-page input[type="number"]::-webkit-outer-spin-button,
.facebook-ads-page input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.facebook-ads-page input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.facebook-ads-page .is-readonly {
  background: #f5f6fb;
  color: var(--text);
  cursor: default;
}

.facebook-ads-page button.primary {
  background: #1f2430;
  color: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.16);
}

.facebook-ads-page button.primary:hover {
  background: #151922;
}

.facebook-ads-page button.facebook-push-meta-alert,
.facebook-ads-page .facebook-push-meta-alert {
  background: #dc2626;
  border-color: #dc2626;
  color: #fff;
  box-shadow: 0 10px 24px rgba(220, 38, 38, 0.22);
}

.facebook-ads-page button.facebook-push-meta-alert:hover,
.facebook-ads-page .facebook-push-meta-alert:hover {
  background: #b91c1c;
  border-color: #b91c1c;
  color: #fff;
}

.facebook-ads-page button.ghost {
  background: #f5f6fb;
  color: #1f2430;
  border-color: rgba(31, 36, 48, 0.12);
}

.facebook-ads-page button.ghost:hover {
  background: #eceff6;
}

.facebook-ads-page a.ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 10px 18px;
  border: 1px solid rgba(31, 36, 48, 0.12);
  border-radius: 999px;
  background: #f5f6fb;
  color: #1f2430;
  font: inherit;
  text-decoration: none;
}

.facebook-ads-page a.ghost:hover {
  background: #eceff6;
  text-decoration: none;
}

.facebook-show-meta-grid,
.facebook-campaign-meta-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
}

.facebook-campaign-meta-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 12px;
}

.facebook-campaign-meta-grid .overview-tile {
  border-radius: 0;
}

.facebook-campaign-summary-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.facebook-campaign-summary-copy strong,
.facebook-campaign-summary-copy .muted {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.facebook-campaign-summary-copy .muted {
  font-size: 0.8rem;
}

.facebook-show-meta-grid .label,
.facebook-campaign-meta-grid .label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 6px;
}

.facebook-show-meta-grid .overview-tile {
  border-radius: 0;
}

.facebook-show-meta-grid .overview-tile-button {
  cursor: pointer;
}

.facebook-show-meta-grid .overview-tile-button:hover {
  background: #f8fafc;
}

.facebook-show-overview-card {
  border-radius: 0;
}

.facebook-show-meta-grid .overview-stat .value.is-text {
  font-size: 1rem;
  line-height: 1.25;
  white-space: normal;
  word-break: break-word;
}

.facebook-campaign-fields.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 12px;
}

.facebook-ad-table .table-row {
  grid-template-columns: 140px 92px 92px 180px 220px minmax(240px, 1fr) minmax(180px, 1fr) 110px;
}

.facebook-ad-table textarea,
.facebook-ad-table input,
.facebook-ad-table select,
.facebook-campaign-fields input,
.facebook-campaign-fields select,
.facebook-audience-fields input,
.facebook-audience-fields select,
.facebook-audience-fields textarea,
.facebook-ads-config-shell input,
.facebook-ads-config-shell select {
  width: 100%;
}

.facebook-placement-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin: 0;
}

.facebook-placement-grid {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.facebook-campaign-card > .show-details-panel {
  padding-top: 12px;
  gap: 12px;
}

.facebook-campaign-stack.show-details-accordion > .facebook-campaign-card,
.facebook-campaign-stack.show-details-accordion > .facebook-campaign-card > summary,
.facebook-campaign-stack.show-details-accordion > .facebook-campaign-card > .show-details-panel {
  border-radius: 0;
}

.facebook-campaign-empty-state {
  min-height: 52px;
  display: flex;
  align-items: center;
  border-radius: 0;
}

.facebook-campaign-empty-state .muted {
  margin: 0;
}

.facebook-campaign-card > .show-details-panel > .subsection-header {
  margin-bottom: 0;
}

.facebook-campaign-card > .show-details-panel > .facebook-campaign-details-accordion {
  margin: 12px 0 0;
}

.facebook-campaign-card > .show-details-panel > .facebook-campaign-details-accordion + .facebook-campaign-details-accordion {
  margin-top: 0;
}

.facebook-campaign-details-accordion > .show-details-panel {
  padding-top: 10px;
}

.facebook-placement-panel .card {
  padding: 10px 12px;
  border-radius: 0;
  box-shadow: none;
}

.facebook-placement-panel .card h4 {
  margin: 0;
}

.facebook-ad-accordion {
  display: grid;
  gap: 8px;
}

.facebook-ad-card {
  border: 1px solid rgba(20, 25, 34, 0.08);
  border-radius: 0;
  background: #fff;
  overflow: hidden;
  box-shadow: none;
}

.facebook-ad-card > summary {
  padding: 12px 16px;
}

.facebook-ad-card-topline {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.facebook-ad-card-meta {
  display: grid;
  gap: 6px;
}

.facebook-ad-switch,
.facebook-ad-toggle-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

.facebook-automation-summary {
  margin-top: 12px;
}

.facebook-automation-section {
  border-radius: 0;
}

.facebook-automation-table-wrap {
  overflow: auto;
}

.facebook-automation-table {
  gap: 0;
  border: 1px solid rgba(31, 36, 48, 0.08);
  border-radius: 0;
  background: #fff;
}

.facebook-automation-table .table-row {
  grid-template-columns: 160px 140px 160px 140px minmax(220px, 1.2fr) minmax(220px, 1.1fr) minmax(220px, 1.1fr);
  gap: 0;
  margin: 0;
  border-radius: 0;
  border-top: 1px solid rgba(31, 36, 48, 0.08);
  padding: 0;
}

.facebook-automation-table .table-row.header {
  border-top: 0;
  background: #f8f9fc;
}

.facebook-automation-table .table-row > span {
  padding: 12px 12px;
  border-right: 1px solid rgba(31, 36, 48, 0.08);
  overflow-wrap: anywhere;
}

.facebook-automation-table .table-row > span:last-child {
  border-right: 0;
}

.facebook-automation-empty-row {
  display: block;
}

.facebook-automation-empty-cell {
  display: block;
  padding: 16px 12px;
}

.facebook-approvals-table .table-row {
  grid-template-columns: 160px 140px 160px minmax(240px, 1.1fr) minmax(220px, 1.1fr) 180px;
}

.facebook-approval-actions {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
}

.facebook-approval-actions .ghost {
  min-height: 34px;
  padding: 8px 12px;
}

.facebook-toggle-switch {
  user-select: none;
}

.facebook-campaign-master-switch {
  margin-right: 4px;
}

.facebook-toggle-control {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.facebook-toggle-control input {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 56px;
  height: 32px;
  margin: 0;
  cursor: pointer;
}

.facebook-toggle-slider {
  position: relative;
  width: 56px;
  height: 32px;
  border-radius: 999px;
  background: #d8dde5;
  border: 1px solid rgba(20, 25, 34, 0.12);
  transition: background 160ms ease, border-color 160ms ease;
}

.facebook-toggle-slider::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(20, 25, 34, 0.18);
  transition: transform 160ms ease;
}

.facebook-toggle-control input:checked + .facebook-toggle-slider {
  background: #0d6b45;
  border-color: #0d6b45;
}

.facebook-toggle-control input:checked + .facebook-toggle-slider::after {
  transform: translateX(24px);
}

.facebook-toggle-control input:focus-visible + .facebook-toggle-slider {
  outline: 2px solid rgba(13, 107, 69, 0.28);
  outline-offset: 2px;
}

.facebook-ad-card-body {
  display: grid;
  grid-template-columns: minmax(160px, 220px) 1fr;
  gap: 14px;
  margin: 12px 0;
  align-items: stretch;
}

.facebook-ad-card-preview {
  border-radius: 0;
  overflow: hidden;
  min-height: 120px;
  max-height: 120px;
  background: linear-gradient(145deg, #f4ebe2, #e7f0ea);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
}

.facebook-ad-card-preview img,
.facebook-ad-card-preview video,
.facebook-asset-thumb img,
.facebook-asset-thumb video,
.facebook-preview-media img,
.facebook-preview-media video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.facebook-preview-placeholder {
  color: #6a6d78;
  font-size: 0.95rem;
  text-align: center;
  padding: 24px;
}

.facebook-ads-subsection-header {
  margin-bottom: 8px;
}

.facebook-ads-subsection-header {
  justify-content: flex-start;
}

.facebook-ad-warning-pill {
  border: 1px solid #f2b8b5;
  background: #fff1f1;
  color: #b42318;
  cursor: pointer;
}

.facebook-ad-warning-pill:hover {
  background: #ffe7e7;
}

.facebook-ad-warning-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
}

.facebook-ad-empty-state {
  border-radius: 0;
  box-shadow: none;
}

.facebook-ad-card-copy .label {
  display: block;
  margin-bottom: 6px;
}

.facebook-ad-card-copy {
  display: grid;
  grid-template-columns: minmax(220px, 0.85fr) minmax(0, 1.15fr);
  gap: 14px;
  min-width: 0;
}

.facebook-ad-card-copy-main,
.facebook-ad-card-copy-side {
  min-width: 0;
}

.facebook-ad-card-copy-main {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 10px;
}

.facebook-ad-card-copy-block,
.facebook-ad-card-copy-side {
  padding: 12px 14px;
  border: 1px solid rgba(20, 25, 34, 0.06);
  background: rgba(255, 255, 255, 0.82);
}

.facebook-ad-card-copy-block {
  display: grid;
  gap: 4px;
}

.facebook-ad-card-copy-block strong {
  font-size: 0.98rem;
  line-height: 1.3;
  color: #1f2430;
}

.facebook-ad-card-copy-block span:last-child {
  color: #5f6676;
  font-size: 0.9rem;
  line-height: 1.35;
}

.facebook-ad-card-copy-side {
  display: grid;
  align-content: start;
}

.facebook-ad-card-copy-side p {
  margin: 0;
  color: #1f2430;
  font-size: 0.92rem;
  line-height: 1.45;
  white-space: pre-wrap;
}

.facebook-ad-editor-dialog {
  width: min(1200px, calc(100vw - 48px));
  max-width: 1200px;
}

.facebook-ad-editor-form {
  min-width: 0;
  position: relative;
}

.facebook-ad-editor-overlay {
  position: absolute;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(20, 23, 31, 0.42);
  backdrop-filter: blur(2px);
}

.facebook-ad-editor-overlay.hidden {
  display: none;
}

.facebook-ad-editor-overlay-card {
  width: min(440px, 92vw);
  display: grid;
  gap: 14px;
  padding: 22px 24px;
  border: 1px solid rgba(217, 221, 227, 0.9);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 24px 60px rgba(31, 41, 55, 0.24);
}

.facebook-ad-editor-overlay-card h3 {
  margin: 0;
}

.facebook-ad-generate-dialog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.facebook-ad-generate-partial {
  margin-top: 12px;
}

.facebook-ad-generate-partial.hidden {
  display: none;
}

.facebook-ad-editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 18px;
}

.facebook-ad-editor-fields,
.facebook-ad-preview-panel {
  display: grid;
  gap: 12px;
  align-content: start;
}

.facebook-ad-preview-panel > .subsection-header {
  margin: 0;
  align-items: flex-start;
}

.facebook-ad-preview-panel > .subsection-header h4,
.facebook-ad-preview-panel > .subsection-header p {
  margin: 0;
}

.facebook-ad-editor-status-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.facebook-ad-assets-panel {
  padding: 16px;
  border-radius: 18px;
  background: rgba(246, 249, 246, 0.9);
  border: 1px solid rgba(20, 25, 34, 0.06);
}

.facebook-ad-upload-button {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.facebook-ad-assets-panel > .subsection-header {
  margin: 0 0 6px;
  align-items: center;
}

.facebook-ad-assets-panel > .subsection-header h4,
.facebook-ad-assets-panel > #facebook-ad-editor-upload-status {
  margin: 0;
}

.facebook-ad-upload-button > .ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
}

.facebook-ad-assets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 96px));
  gap: 10px;
  align-items: start;
  justify-content: start;
}

.facebook-asset-card {
  position: relative;
  display: block;
  border: 1px solid rgba(20, 25, 34, 0.08);
  border-radius: 14px;
  padding: 6px;
  background: #fff;
  text-align: left;
  width: 96px;
  overflow: visible;
}

.facebook-asset-card.is-selected {
  border-color: #0d6b45;
  box-shadow: 0 0 0 2px rgba(13, 107, 69, 0.16);
}

.facebook-asset-thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: visible;
  border-radius: 10px;
  background: #edf1ef;
  display: flex;
  align-items: center;
  justify-content: center;
}

.facebook-asset-thumb img,
.facebook-asset-thumb video {
  border-radius: 10px;
}

.facebook-asset-pill,
.facebook-asset-delete {
  position: absolute;
  top: -12px;
  min-width: 26px;
  height: 26px;
  padding: 0 8px;
  border-radius: 999px;
  border: 2px solid #fff;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.facebook-asset-pill {
  top: -17px;
  right: -14px;
  background: #0d6b45;
  box-shadow: 0 6px 16px rgba(13, 107, 69, 0.28);
}

.facebook-asset-delete {
  left: -8px;
  background: #b42318;
  font-size: 0.78rem;
  box-shadow: 0 6px 16px rgba(180, 35, 24, 0.24);
}

.facebook-asset-context-menu {
  position: absolute;
  z-index: 9999;
  min-width: 220px;
  padding: 8px;
  border-radius: 14px;
  background: rgba(20, 25, 34, 0.96);
  box-shadow: 0 18px 40px rgba(20, 25, 34, 0.28);
}

.facebook-asset-context-menu button {
  width: 100%;
  border: 0;
  background: transparent;
  color: #fff;
  text-align: left;
  padding: 10px 12px;
  border-radius: 10px;
}

.facebook-asset-context-menu button:hover {
  background: rgba(255, 255, 255, 0.12);
}

.facebook-asset-validation-list {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}

.facebook-asset-validation-item {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(20, 25, 34, 0.08);
}

.facebook-asset-validation-item.is-ok {
  border-color: rgba(13, 107, 69, 0.24);
  background: rgba(232, 245, 237, 0.92);
}

.facebook-asset-validation-item.is-warning {
  border-color: rgba(180, 120, 24, 0.24);
  background: rgba(255, 246, 226, 0.95);
}

.facebook-placement-asset-fields {
  margin-top: 12px;
}

.facebook-ad-guidance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.facebook-ad-guidance-grid .card {
  padding: 12px 14px;
}

.facebook-ad-preview-stack {
  display: grid;
  gap: 8px;
  align-content: start;
}

.facebook-preview-accordion {
  border: 1px solid rgba(20, 25, 34, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  overflow: hidden;
  margin: 0;
}

.facebook-preview-accordion > summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  list-style: none;
}

.facebook-preview-accordion > summary::-webkit-details-marker {
  display: none;
}

.facebook-preview-accordion > summary::after {
  content: "+";
  font-size: 1.15rem;
  line-height: 1;
  color: #495061;
}

.facebook-preview-accordion[open] > summary::after {
  content: "-";
}

.facebook-preview-card {
  background: transparent;
}

.facebook-preview-card-story {
  max-width: 360px;
  margin-inline: auto;
}

.facebook-preview-media {
  min-height: 220px;
  background: linear-gradient(180deg, #d8e1ea, #f4ebe2);
}

.facebook-preview-feed-shell {
  border: 1px solid #d7dbe4;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.facebook-preview-instagram-shell {
  border: 1px solid #dbdbdb;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.facebook-preview-feed-header,
.facebook-preview-story-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px 10px;
}

.facebook-preview-identity,
.facebook-preview-story-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.facebook-preview-feed-header {
  padding-left: 10px;
}

.facebook-preview-avatar {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: linear-gradient(145deg, #2b4f95, #5e87d9);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  flex: 0 0 auto;
}

.facebook-preview-avatar-story {
  width: 34px;
  height: 34px;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px #d63384;
  background: linear-gradient(145deg, #4c39d3, #ff6a00);
}

.facebook-preview-avatar-instagram {
  background: linear-gradient(145deg, #5b2cff, #ff6a00 62%, #ff2d55);
}

.facebook-preview-identity-copy,
.facebook-preview-story-profile div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.facebook-preview-identity-copy strong,
.facebook-preview-story-profile strong {
  font-size: 0.9rem;
  color: #1c1e21;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.facebook-preview-identity-copy span,
.facebook-preview-story-profile span,
.facebook-preview-header-menu,
.facebook-preview-story-ui {
  font-size: 0.78rem;
  color: #65676b;
}

.facebook-preview-feed-copy {
  padding: 0 14px 12px;
}

.facebook-preview-feed-copy p,
.facebook-preview-story-copy p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.42;
  color: #1c1e21;
  white-space: normal;
}

.facebook-preview-see-more {
  display: inline;
  border: 0;
  background: transparent;
  padding: 0;
  margin-left: 4px;
  color: #65676b;
  font: inherit;
  font-weight: 600;
  cursor: default;
}

.facebook-preview-link-card {
  border-top: 1px solid #ebedf0;
  border-bottom: 1px solid #ebedf0;
  background: #f2f3f5;
}

.facebook-preview-instagram-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
}

.facebook-preview-instagram-shell .facebook-preview-media {
  min-height: 360px;
  background: #f4f4f5;
}

.facebook-preview-instagram-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px 8px;
  color: #1c1e21;
  font-size: 1rem;
}

.facebook-preview-instagram-actions-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.facebook-preview-instagram-copy {
  display: grid;
  gap: 10px;
  padding: 0 12px 14px;
}

.facebook-preview-instagram-copy p {
  margin: 0;
  font-size: 0.91rem;
  line-height: 1.42;
  color: #1c1e21;
}

.facebook-preview-instagram-copy strong {
  font-weight: 700;
}

.facebook-preview-instagram-linkline {
  display: grid;
  gap: 4px;
  color: #1c1e21;
}

.facebook-preview-instagram-linkline strong {
  font-size: 0.92rem;
  line-height: 1.3;
}

.facebook-preview-instagram-linkline span {
  color: #65676b;
  font-size: 0.84rem;
  line-height: 1.35;
}

.facebook-preview-instagram-cta {
  border: 0;
  background: transparent;
  color: #0095f6;
  font-weight: 700;
  font-size: 0.86rem;
  padding: 0;
  text-align: left;
}

.facebook-preview-link-meta {
  padding: 10px 14px 0;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #65676b;
}

.facebook-preview-link-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 14px 12px;
}

.facebook-preview-link-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.facebook-preview-link-copy h5 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.24;
  color: #1c1e21;
}

.facebook-preview-link-copy span {
  color: #65676b;
  font-size: 0.84rem;
  line-height: 1.35;
}

.facebook-preview-link-cta,
.facebook-preview-story-cta {
  border: 0;
  background: #e4e6eb;
  color: #050505;
  font-weight: 600;
  font-size: 0.8rem;
  padding: 10px 14px;
  min-height: 38px;
  white-space: nowrap;
}

.facebook-preview-feed-footer {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  text-align: center;
  gap: 8px;
  padding: 10px 14px;
  color: #65676b;
  font-size: 0.84rem;
  font-weight: 600;
}

.facebook-preview-story-shell {
  position: relative;
  min-height: 640px;
  border-radius: 28px;
  overflow: hidden;
  background: #111318;
  color: #fff;
  border: 1px solid #2c2f36;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.28);
}

.facebook-preview-card-story .facebook-preview-media {
  min-height: 640px;
}

.facebook-preview-story-topbar {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 2;
  color: #fff;
  background: linear-gradient(180deg, rgba(9, 10, 13, 0.72), rgba(9, 10, 13, 0));
}

.facebook-preview-story-profile strong,
.facebook-preview-story-profile span,
.facebook-preview-story-ui {
  color: #fff;
}

.facebook-preview-story-bottom {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 2;
  display: grid;
  gap: 12px;
  padding: 18px 16px 16px;
  background: linear-gradient(180deg, rgba(9, 10, 13, 0), rgba(9, 10, 13, 0.92));
}

.facebook-preview-story-copy {
  display: grid;
  gap: 4px;
}

.facebook-preview-story-copy strong {
  font-size: 1rem;
  line-height: 1.2;
  color: #fff;
}

.facebook-preview-story-cta {
  width: 100%;
  justify-content: center;
  background: #fff;
  color: #111318;
  border-radius: 999px;
 }

.facebook-preview-story-copy p {
  display: none;
}

.facebook-preview-card-story .facebook-preview-placeholder {
  min-height: 640px;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.8);
  background: linear-gradient(180deg, #2f3440, #17191f);
}

.facebook-preview-feed-shell .facebook-preview-placeholder {
  min-height: 320px;
  display: grid;
  place-items: center;
}

@media (max-width: 960px) {
  .facebook-ad-card-body,
  .facebook-ad-editor-layout {
    grid-template-columns: 1fr;
  }

  .facebook-ad-card-preview {
    max-height: 180px;
    min-height: 180px;
  }

  .facebook-ad-card-copy {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1180px) {
  .facebook-ads-main-grid,
  .facebook-show-meta-grid,
  .facebook-audience-meta-grid,
  .facebook-meta-mapping-grid,
  .facebook-campaign-meta-grid,
  .facebook-campaign-fields.grid.three,
  .facebook-audience-fields.grid.three {
    grid-template-columns: 1fr;
  }

  .facebook-ads-page {
    overflow: auto;
  }

  .facebook-ads-workspace {
    height: auto;
    overflow: visible;
  }

  .facebook-show-list-card,
  .facebook-show-list,
  .facebook-show-detail {
    min-height: auto;
    overflow: visible;
    padding-right: 0;
  }

  .facebook-show-list-card {
    position: static;
    width: auto;
    max-width: none;
    transform: none;
    border-radius: 24px;
  }

  .facebook-show-drawer-toggle {
    position: static;
    transform: none;
    width: auto;
    height: auto;
    border-left: 1px solid rgba(31, 36, 48, 0.12);
    border-radius: 999px;
    padding: 10px 16px;
    font-size: 0.95rem;
    box-shadow: none;
  }

  .facebook-show-detail {
    padding-top: 0;
  }
}

.drive-page .drive-main {
  gap: 0;
}

.drive-page {
  overflow: hidden;
}

.drive-page main {
  padding: 12px;
  height: calc(100vh - var(--drive-header-height, 88px));
  min-height: 0;
}

.drive-browser-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 100%;
  min-height: 0;
  padding: 12px;
  border-radius: 0;
  box-shadow: none;
}

.drive-titlebar {
  min-width: 0;
}

.drive-browser-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.drive-pathbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.drive-breadcrumb {
  appearance: none;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  border-radius: 0;
  padding: 7px 10px;
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}

.drive-breadcrumb.is-current {
  background: #f3f4f6;
  cursor: default;
}

.drive-breadcrumb:disabled {
  opacity: 1;
}

.ghost.compact,
.primary.compact {
  padding: 8px 12px;
  min-height: 0;
  border-radius: 0;
  box-shadow: none;
}

.drive-page .ghost,
.drive-page .primary,
.drive-page .button-link {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 0;
  box-shadow: none;
}

.drive-page .primary:hover,
.drive-page .ghost:hover,
.drive-page .button-link:hover {
  background: #f3f4f6;
  color: var(--text);
  border-color: #cfd5e3;
}

.drive-actions {
  position: relative;
}

.drive-actions-button {
  min-width: 120px;
}

.drive-actions-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 220px;
  padding: 6px 0;
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: none;
  border-radius: 0;
  display: none;
  z-index: 30;
}

.drive-actions-menu.is-open {
  display: block;
}

.drive-actions-item {
  color: var(--text);
  border: none;
  border-radius: 0;
  background: #fff;
}

.drive-actions-item:hover {
  background: #f3f4f6;
}

.drive-actions-separator {
  height: 1px;
  margin: 6px 0;
  background: var(--border);
}

.drive-table-header,
.drive-table-row {
  grid-template-columns: minmax(260px, 2.2fr) minmax(120px, 0.9fr) minmax(180px, 1fr) minmax(120px, 0.8fr) minmax(120px, 0.9fr);
}

.drive-table-header > :last-child,
.drive-table-row > :last-child {
  text-align: center;
}

.drive-table-row {
  min-width: 980px;
}

.drive-table {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  align-content: start;
  grid-auto-rows: max-content;
  gap: 0;
}

.drive-table-row--folder,
.drive-table-row--parent,
.drive-table-row:not(.header) {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.drive-table-row:not(.header) {
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
}

.drive-table-row:not(.header) + .drive-table-row:not(.header) {
  border-top: 1px solid var(--border);
}

.drive-table-row:not(.header):last-child {
  border-bottom: 1px solid var(--border);
}

.drive-entry-name {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  width: 100%;
}

.drive-entry-link {
  appearance: none;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-width: 0;
  min-height: 100%;
  padding: 0;
  border: none;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.drive-entry-name > strong,
.drive-entry-link > strong {
  min-width: 0;
  flex: 1 1 auto;
}

.drive-entry-name strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drive-entry-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 0;
  background: #f3f4f6;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 700;
  flex: 0 0 auto;
}

.drive-row-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.drive-upload-overlay {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: min(380px, calc(100vw - 24px));
  z-index: 2100;
}

.drive-upload-overlay.hidden {
  display: none;
}

.drive-upload-overlay-card {
  border: 1px solid rgba(17, 24, 39, 0.08);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(18px);
  box-shadow: none;
  border-radius: 0;
  padding: 16px;
  overflow-x: hidden;
}

.drive-upload-overlay-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.drive-upload-overlay-header h3 {
  margin: 0 0 4px;
  font-size: 1rem;
}

.drive-upload-queue {
  display: grid;
  gap: 10px;
  max-height: min(60vh, 520px);
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
}

.drive-upload-item {
  border: 1px solid rgba(79, 70, 229, 0.08);
  background: #fff;
  border-radius: 0;
  padding: 12px;
  min-width: 0;
  overflow: hidden;
}

.drive-upload-item--error {
  border-color: rgba(220, 38, 38, 0.2);
}

.drive-upload-item--done {
  border-color: rgba(22, 163, 74, 0.2);
}

.drive-upload-item-header,
.drive-upload-item-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.drive-upload-item-header strong {
  font-size: 0.95rem;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drive-upload-item-header span {
  flex: 0 0 auto;
  white-space: nowrap;
}

.drive-upload-item p {
  margin: 6px 0 10px;
  font-size: 0.8rem;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drive-upload-progress-track {
  position: relative;
  height: 8px;
  border-radius: 0;
  background: #eceff8;
  overflow: hidden;
}

.drive-upload-progress-bar {
  position: absolute;
  inset: 0 auto 0 0;
  background: #6b7280;
  border-radius: inherit;
}

.drive-upload-item-footer {
  margin-top: 8px;
  font-size: 0.8rem;
  color: var(--muted);
}

.drive-upload-item-footer span:first-child {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drive-upload-item-footer span:last-child {
  flex: 0 0 3.5rem;
  text-align: right;
  white-space: nowrap;
}

.drive-global-drop {
  position: fixed;
  inset: 64px 18px 18px;
  z-index: 2050;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.drive-global-drop.hidden {
  display: none;
}

.drive-global-drop-card {
  min-width: min(520px, calc(100vw - 72px));
  max-width: 760px;
  padding: 28px 32px;
  border-radius: 0;
  border: 2px dashed #9ca3af;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: none;
  text-align: center;
}

@media (max-width: 1100px) {
  .drive-page main {
    padding: 10px;
  }
}

@media (max-width: 900px) {
  .drive-browser-header {
    grid-template-columns: 1fr;
  }

  .drive-actions-menu {
    left: 0;
    right: auto;
  }
}

@media (max-width: 720px) {
  .drive-page main {
    padding: 8px;
  }

  .drive-upload-overlay {
    right: 12px;
    left: 12px;
    width: auto;
  }

  .drive-global-drop {
    inset: 64px 12px 12px;
  }

  .drive-global-drop-card {
    min-width: 0;
    width: 100%;
    padding: 22px 18px;
  }
}
