/* Reset the old horizontal toolbar's flex basis in the report selector layout and style Casino Closed Tables. */
html body #kai-workspace.kai-theme .content .kitty-closed-tables-container .kitty-archive-command-panel {
  padding: 18px 20px !important;
  margin: 0 0 14px !important;
  border-radius: 14px !important;
  border: 1px solid #235342 !important;
  border-top: 3px solid #d4af37 !important;
  background: linear-gradient(135deg, #0d2f24 0%, #123c2f 55%, #162a38 100%) !important;
  color: #f8fafc !important;
  box-shadow: 0 10px 26px rgba(9, 30, 24, 0.18) !important;
}
html body #kai-workspace.kai-theme .content .kitty-closed-tables-container .kitty-archive-title-row h1 {
  color: #ffffff !important;
}
html body #kai-workspace.kai-theme .content .kitty-closed-tables-container .kitty-archive-title-row .live-table-count {
  background: linear-gradient(135deg, #fcd34d 0%, #d97706 100%) !important;
  color: #0f172a !important;
  border: 1px solid #fde68a !important;
  font-weight: 900 !important;
}
html body #kai-workspace.kai-theme .content .kitty-closed-tables-container .kitty-archive-presets .btn.secondary {
  background: transparent !important;
  color: #d1fae5 !important;
  border-color: transparent !important;
}
html body #kai-workspace.kai-theme .content .kitty-closed-tables-container .kitty-archive-presets .btn.primary {
  background: linear-gradient(135deg, #d4af37 0%, #b58922 100%) !important;
  color: #0c241b !important;
  border-color: #f3d266 !important;
}
html body #kai-workspace.kai-theme .content .kitty-closed-tables-container .closed-table-card .closed-card-casino-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px;
  padding: 12px 14px !important;
  margin: -4px -4px 2px !important;
  border-radius: 12px !important;
  background: linear-gradient(125deg, #10382c 0%, #0e2923 60%, #192a3a 100%) !important;
  border: 1px solid #245343 !important;
  color: #ffffff !important;
}
html body #kai-workspace.kai-theme .content .kitty-closed-tables-container .closed-table-card .closed-card-casino-header h2 {
  color: #ffffff !important;
}
html body #kai-workspace.kai-theme .content .kitty-closed-tables-container .closed-table-card .table-name-highlight {
  background: linear-gradient(135deg, #fcd34d 0%, #d97706 100%) !important;
  color: #0f172a !important;
  border: 1px solid #fde68a !important;
}
html body #kai-workspace.kai-theme .content .kitty-closed-tables-container .closed-table-card .table-card-title em {
  background: rgba(16, 185, 129, 0.24) !important;
  color: #ecfdf5 !important;
  border: 1px solid rgba(52, 211, 153, 0.5) !important;
}
html body #kai-workspace.kai-theme .content .kitty-closed-tables-container .closed-table-card .table-card-subtitle {
  background: rgba(255, 255, 255, 0.14) !important;
  color: #fef3c7 !important;
  border: 1px solid rgba(253, 230, 138, 0.4) !important;
}
html body #kai-workspace.kai-theme .content .kitty-closed-tables-container .closed-table-card .table-card-subtitle::before {
  background: #fbbf24 !important;
}
html body #kai-workspace.kai-theme .content .kitty-closed-tables-container .closed-table-card .closed-card-kpis > div {
  border: 0 !important;
  background: linear-gradient(135deg, #6d28d9 0%, #5b21b6 100%) !important;
  box-shadow: 0 3px 8px rgba(91, 33, 182, 0.2) !important;
}
html body #kai-workspace.kai-theme .content .kitty-closed-tables-container .closed-table-card .closed-card-kpis > div:nth-child(2) {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
  box-shadow: 0 3px 8px rgba(29, 78, 216, 0.2) !important;
}
html body #kai-workspace.kai-theme .content .kitty-closed-tables-container .closed-table-card .closed-card-kpis > div:nth-child(3) {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%) !important;
  box-shadow: 0 3px 8px rgba(180, 83, 9, 0.24) !important;
}
html body #kai-workspace.kai-theme .content .kitty-closed-tables-container .closed-table-card .closed-card-kpis > div:nth-child(4) {
  background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
  box-shadow: 0 3px 8px rgba(4, 120, 87, 0.2) !important;
}
html body #kai-workspace.kai-theme .content .kitty-closed-tables-container .closed-table-card .closed-card-kpis dt {
  color: rgba(255, 255, 255, 0.9) !important;
}
html body #kai-workspace.kai-theme .content .kitty-closed-tables-container .closed-table-card .closed-card-kpis dd {
  color: #ffffff !important;
}
html body #kai-workspace.kai-theme .content .kitty-closed-tables-container .kitty-round-chip {
  min-width: 32px !important;
  height: 26px !important;
  min-height: 26px !important;
  padding: 0 8px !important;
  border-radius: 6px !important;
  border: 1px solid #94a3b8 !important;
  background: #ffffff !important;
  color: #1e293b !important;
  font-size: 11px !important;
  font-weight: 800 !important;
}
html body #kai-workspace.kai-theme .content .kitty-closed-tables-container .kitty-round-chip.is-active {
  background: linear-gradient(135deg, #0d7a5f 0%, #065f46 100%) !important;
  border-color: #047857 !important;
  color: #ffffff !important;
}

html body #kai-workspace.kai-theme .kitty-closed-tables-container .kitty-report-toolbar {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: start;
  justify-content: stretch;
  gap: 14px;
  min-height: 0;
  padding: 16px 18px !important;
  border-radius: 13px !important;
  border: 1px solid #d4e2dc !important;
  border-left: 4px solid #0d7a5f !important;
  background: linear-gradient(180deg, #ffffff 0%, #f6fbf9 100%) !important;
}
html body #kai-workspace.kai-theme .kitty-closed-tables-container .kitty-report-toolbar > div:first-child {
  flex: none !important;
  width: 100%;
  min-height: 0;
  margin: 0;
}
html body #kai-workspace.kai-theme .kitty-closed-tables-container .kitty-report-toolbar > div:first-child p {
  margin: 4px 0 0;
  line-height: 1.45;
  color: #526772;
}
html body #kai-workspace.kai-theme .kitty-closed-tables-container .kitty-report-selection {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  width: 100%;
  min-width: 0;
  gap: 10px;
  flex: none !important;
}
html body #kai-workspace.kai-theme .kitty-closed-tables-container .kitty-report-selectors {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  align-items: end;
  gap: 12px;
}
html body #kai-workspace.kai-theme .kitty-closed-tables-container .kitty-report-selectors label {
  font-size: 11px !important;
  font-weight: 750 !important;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #475569 !important;
}

/* 3-column report groups in toolbar, 2 buttons per group (PDF, Download XL) */
html body #kai-workspace.kai-theme .kitty-closed-tables-container .kitty-report-actions {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: 100%;
  min-width: 0;
  gap: 10px;
  align-items: stretch;
}
html body #kai-workspace.kai-theme .kitty-closed-tables-container .kitty-report-format {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  width: 100%;
  min-width: 0;
  gap: 6px;
  flex: none !important;
  padding: 4px;
  background: #edf2f7;
  border: 1px solid #d5e0ec;
  border-radius: 9px;
  box-sizing: border-box;
}
html body #kai-workspace.kai-theme .content .kitty-closed-tables-container .kitty-report-format > .btn,
html body #kai-workspace.kai-theme .content .kitty-closed-tables-container .kitty-report-format > .btn.secondary {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 100% !important;
  min-width: 0 !important;
  height: 36px !important;
  min-height: 36px !important;
  margin: 0 !important;
  gap: 6px;
  padding: 4px 10px !important;
  border-radius: 6px !important;
  font-size: 11.5px !important;
  font-weight: 750 !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: #0d7a5f !important;
  border: 1px solid #095c47 !important;
  color: #ffffff !important;
}
html body #kai-workspace.kai-theme .content .kitty-closed-tables-container .kitty-report-format > .btn.reports-download-btn {
  background: #5b4bc4 !important;
  border-color: #4a3ba8 !important;
  color: #ffffff !important;
}
html body #kai-workspace.kai-theme .content .kitty-closed-tables-container .kitty-report-format > .btn svg {
  display: block !important;
  color: #ffffff !important;
  width: 14px !important;
  height: 14px !important;
  min-width: 14px !important;
  flex: 0 0 14px !important;
}
html body #kai-workspace.kai-theme .content .kitty-closed-tables-container .kitty-report-format > .btn:disabled {
  opacity: 0.5 !important;
  cursor: not-allowed;
}

/* Card Action Bar Buttons: View Scoresheet, Round PDF, Game PDF, Edit Details, Delete */
html body #kai-workspace.kai-theme .content .kitty-closed-tables-container .kitty-closed-primary-bar > .btn {
  padding: 0 11px !important;
  font-size: 11.5px !important;
  height: 38px !important;
  min-height: 38px !important;
}
html body #kai-workspace.kai-theme .content .kitty-closed-tables-container .kitty-closed-primary-bar > .btn.view-scoresheet-btn {
  flex: 1 1 135px;
}
html body #kai-workspace.kai-theme .content .kitty-closed-tables-container .kitty-closed-primary-bar > .btn.secondary.card-round-pdf-btn {
  background: #0d7a5f !important;
  border-color: #095c47 !important;
  color: #ffffff !important;
}
html body #kai-workspace.kai-theme .content .kitty-closed-tables-container .kitty-closed-primary-bar > .btn.secondary.card-game-pdf-btn {
  background: #1d4ed8 !important;
  border-color: #1e40af !important;
  color: #ffffff !important;
}
html body #kai-workspace.kai-theme .content .kitty-closed-tables-container .kitty-closed-primary-bar > .btn.secondary.edit-details-btn {
  background: #334155 !important;
  border-color: #1e293b !important;
  color: #ffffff !important;
}
html body #kai-workspace.kai-theme .content .kitty-closed-tables-container .kitty-closed-primary-bar > .btn.danger-button.delete-table-btn {
  background: #be123c !important;
  border-color: #9f1239 !important;
  color: #ffffff !important;
}

@media (max-width: 900px) {
  html body #kai-workspace.kai-theme .kitty-closed-tables-container .kitty-report-actions {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}
@media (max-width: 700px) {
  html body #kai-workspace.kai-theme .kitty-closed-tables-container .kitty-report-selectors {
    grid-template-columns: minmax(0, 1fr);
  }
}


/* High-specificity Kaiadmin overrides for Players Score Page */
html body #kai-workspace.kai-theme .content .kitty-players-score-page .kitty-archive-title-row h1 {
  color: #ffffff !important;
}
html body #kai-workspace.kai-theme .content .kitty-players-score-page .kitty-archive-title-row .live-table-count {
  background: linear-gradient(135deg, #fcd34d 0%, #d97706 100%) !important;
  color: #0f172a !important;
  border: 1px solid #fde68a !important;
  font-weight: 900 !important;
}
html body #kai-workspace.kai-theme .content .kitty-players-score-page .kitty-players-table thead tr {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%) !important;
}
html body #kai-workspace.kai-theme .content .kitty-players-score-page .kitty-players-table thead th {
  background: transparent !important;
  color: #f8fafc !important;
}


/* High-specificity overrides for Collapsible Report Drawer & Toggle Button */
html body #kai-workspace.kai-theme .content .kitty-closed-tables-container .kitty-report-drawer-panel {
  padding: 0 !important;
  border: 1px solid #0d7a5f !important;
  background: #ffffff !important;
}
html body #kai-workspace.kai-theme .content .kitty-closed-tables-container .kitty-report-drawer-panel .kitty-report-toolbar-head {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 14px 18px !important;
  background: linear-gradient(135deg, #0f172a 0%, #133a2e 100%) !important;
  border-bottom: 2px solid #d4af37 !important;
}
html body #kai-workspace.kai-theme .content .kitty-closed-tables-container .kitty-report-drawer-panel .kitty-report-toolbar-head strong {
  color: #ffffff !important;
}
html body #kai-workspace.kai-theme .content .kitty-closed-tables-container .kitty-report-drawer-panel .kitty-report-toolbar-head p {
  color: #cbd5e1 !important;
}
