/* Final compact console layer. Loaded after styles.css on purpose. */
:root {
  --radius: 5px;
}

body {
  background: #f3f5f8;
  font-size: 12px;
}

.app-shell {
  grid-template-columns: 176px minmax(0, 1fr);
}

.sidebar {
  padding: 14px 12px;
}

.brand {
  height: 36px;
  gap: 8px;
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 6px;
}

.brand strong {
  font-size: 13px;
}

.brand div > span,
.crumb,
.panel-head p,
.muted-copy {
  font-size: 11px;
}

.nav-list {
  gap: 3px;
  margin-top: 20px;
}

.nav-group {
  margin: 12px 8px 3px;
  font-size: 10px;
}

.nav-item {
  min-height: 30px;
  padding: 0 9px;
  font-size: 12px;
}

.side-note {
  right: 12px;
  bottom: 12px;
  left: 12px;
}

.logout-btn {
  height: 30px;
  font-size: 12px;
}

.topbar {
  min-height: 68px;
  padding: 14px 20px 6px;
}

h1 {
  margin-top: 3px;
  font-size: 20px;
  line-height: 1.18;
}

h2 {
  font-size: 18px;
}

h3 {
  font-size: 14px;
}

.user-pill {
  padding: 6px 11px;
  font-size: 11px;
}

.content {
  width: 100%;
  max-width: none;
  padding: 0 20px 24px;
}

.grid,
.classic-event-list,
.settings-list,
.template-list,
.compact-list {
  gap: 8px;
}

.panel,
.stat-card,
.editor-block,
.upload-box,
.schema-item,
.empty-state {
  border-radius: 6px;
  box-shadow: none;
}

.panel-head {
  min-height: 42px;
  padding: 9px 12px;
}

.panel-body {
  padding: 10px 12px 12px;
}

.classic-filter-panel {
  margin-bottom: 10px;
  padding: 10px;
}

.classic-filter-top,
.classic-filter-bottom {
  gap: 8px;
  margin-bottom: 7px;
}

.search-box,
.select-box {
  height: 32px;
  padding: 0 10px;
  font-size: 12px;
}

.segmented {
  height: 32px;
  padding: 2px;
}

.segmented button {
  height: 26px;
  padding: 0 10px;
  font-size: 12px;
}

.dark-btn,
.accent-btn,
.ghost-btn,
.danger-btn,
.small-btn,
.icon-btn {
  min-height: 28px;
  border-radius: 5px;
  padding: 0 10px;
  font-size: 12px;
  box-shadow: none;
}

.batch-panel {
  min-height: 46px;
  margin-bottom: 8px;
  padding: 9px 12px;
}

.event-count-strip {
  min-height: 32px;
  gap: 12px;
  margin-bottom: 8px;
  padding: 0 11px;
  font-size: 11px;
}

.classic-list-head {
  grid-template-columns: 24px minmax(220px, 1.55fr) 92px 82px 92px 112px 250px;
  min-height: 30px;
  gap: 10px;
  padding: 0 11px;
  font-size: 11px;
}

.classic-event-card {
  grid-template-columns: 24px minmax(220px, 1.55fr) 92px 82px 92px 112px 250px;
  min-height: 64px;
  gap: 10px;
  border-left-width: 3px;
  border-radius: 6px;
  padding: 8px 11px;
}

.classic-title-row strong {
  max-width: 310px;
  font-size: 13px;
}

.pill-row {
  gap: 5px;
  margin-top: 5px;
}

.tag,
.mini-pill {
  min-height: 18px;
  padding: 0 7px;
  font-size: 10px;
}

.classic-subline {
  margin-top: 5px;
  font-size: 11px;
}

.classic-metric span {
  font-size: 10px;
}

.classic-metric strong {
  margin-top: 3px;
  font-size: 12px;
}

.classic-metric .price {
  font-size: 13px;
}

.classic-actions {
  gap: 5px;
}

.classic-actions .small-btn {
  min-width: 44px;
}

.mini-input {
  height: 28px;
  padding: 0 7px;
  font-size: 12px;
}

.mini-textarea {
  min-height: 48px;
  padding: 6px 7px;
  font-size: 12px;
}

.city-group-head,
.city-group-row {
  grid-template-columns: 104px minmax(220px, 1fr) minmax(180px, 0.7fr) 70px;
  gap: 8px;
  padding: 7px 10px;
}

.city-group-row {
  min-height: 64px;
}

.city-chip-list span {
  min-height: 18px;
  padding: 0 6px;
  font-size: 10px;
}

.dashboard-workbench {
  width: 100%;
  grid-template-columns: minmax(0, 1.42fr) minmax(360px, 0.86fr);
  gap: 10px;
  margin-top: 10px;
}

.dashboard-table-wrap {
  overflow: hidden;
}

.dashboard-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.dashboard-table th,
.dashboard-table td {
  padding: 8px 10px;
  white-space: nowrap;
}

.dashboard-table th:nth-child(1),
.dashboard-table td:nth-child(1) {
  width: 46%;
}

.dashboard-table th:nth-child(2),
.dashboard-table td:nth-child(2) {
  width: 14%;
}

.dashboard-table th:nth-child(3),
.dashboard-table td:nth-child(3) {
  width: 10%;
}

.dashboard-table th:nth-child(4),
.dashboard-table td:nth-child(4) {
  width: 13%;
}

.dashboard-table th:nth-child(5),
.dashboard-table td:nth-child(5) {
  width: 17%;
}

.dashboard-table .event-title-cell {
  min-width: 0;
  gap: 8px;
}

.dashboard-table .thumb {
  width: 38px;
  height: 48px;
}

.dashboard-table .event-title-cell > div {
  min-width: 0;
}

.dashboard-table .title-main,
.dashboard-table .title-sub {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-table .small-btn {
  min-width: 44px;
}

.ops-table.compact .sale-ops-head,
.ops-table.compact .sale-ops-row {
  grid-template-columns: minmax(170px, 1.2fr) minmax(92px, 0.55fr) minmax(120px, 0.75fr) minmax(120px, 0.75fr) minmax(240px, 1.4fr);
}

.sale-desc-field {
  grid-column: 1 / -1;
}

.sale-desc-field .mini-textarea,
.sale-desc-field textarea {
  min-height: 54px;
}

.sort-controls {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 4px;
  white-space: nowrap;
}

.sort-btn {
  min-width: 40px !important;
  padding: 0 7px;
}

.sort-btn:disabled {
  opacity: 0.42;
}

.classic-list-head,
.classic-event-card {
  grid-template-columns: 24px minmax(220px, 1.45fr) 88px 78px 88px 106px 310px;
}

.classic-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.rank-row {
  grid-template-columns: 30px 38px minmax(0, 1fr) auto;
  padding: 7px 9px;
}

.thumb.mini {
  width: 36px;
  height: 36px;
}

.sort-mode-btn {
  min-width: 68px;
}

.sort-mode-hint {
  margin-bottom: 8px;
  padding: 6px 10px;
}

.sort-controls {
  align-items: center;
}

.drag-handle {
  width: 27px;
  height: 27px;
  flex: 0 0 auto;
}

.sort-position {
  min-width: 24px;
  height: 24px;
}

.classic-event-card.is-sortable,
.sale-ops-row.is-sortable,
.rank-row.is-sortable,
.simple-banner-card.is-sortable,
.simple-category-card.is-sortable,
.keyword-edit-row.is-sortable {
  border-style: dashed;
  background: #fbfcfe;
}
