.landing-dashboard {
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

.landing-dashboard .manor-status-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.landing-dashboard .manor-status-table td {
  border: 1.5px solid var(--border-primary);
  padding: 0.5rem 0.75rem;
  vertical-align: top;
  overflow: hidden;
  word-wrap: break-word;
}

.landing-dashboard .manor-status-table .section-title-cell {
  width: 100px;
  font-weight: bold;
  color: var(--text-primary);
  background: var(--bg-secondary);
  text-align: center;
  vertical-align: middle;
}

.landing-dashboard .manor-status-table .content-cell {
  background: var(--bg-panel);
}

.landing-dashboard .status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 4px 12px;
}

.landing-dashboard .status-item {
  display: flex;
  min-width: 0;
}

.landing-dashboard .status-item label {
  color: var(--text-secondary);
  margin-right: 0.5rem;
  white-space: nowrap;
}

.landing-dashboard .status-item .value {
  font-weight: bold;
  overflow: hidden;
  text-overflow: ellipsis;
}

.landing-dashboard .status-item .positive {
  color: var(--accent-green);
}

.landing-dashboard .status-item .negative {
  color: var(--accent-red);
}

.landing-dashboard .guest-status-list,
.landing-dashboard .troop-status-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
}

.landing-dashboard .guest-status-item,
.landing-dashboard .troop-status-item {
  white-space: nowrap;
}

.landing-dashboard .guest-status-item .name,
.landing-dashboard .troop-status-item .name {
  font-weight: bold;
  color: var(--text-primary);
}

.landing-dashboard .guest-status-item .status {
  color: var(--text-muted);
  margin-left: 4px;
}

.landing-dashboard .troop-status-item .count {
  color: var(--accent-green);
  margin-left: 4px;
}

.landing-dashboard .section-title-cell::before {
  content: none;
}

.landing-dashboard .content-cell {
  overflow: hidden;
}

.landing-dashboard > .panel:first-of-type > .panel-header {
  flex-shrink: 0;
}

.landing-dashboard .events-table {
  background: var(--bg-panel);
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.landing-dashboard .events-table-flat {
  box-shadow: none;
  border-radius: 0;
}

.landing-dashboard .events-table thead {
  display: block;
  flex-shrink: 0;
}

.landing-dashboard .events-table thead tr {
  display: flex;
}

.landing-dashboard .events-table thead th:first-child {
  flex: 1;
  min-width: 200px;
}

.landing-dashboard .events-col-content {
  padding: 0.5rem 1rem;
}

.landing-dashboard .events-col-timer {
  width: 120px;
  padding: 0.5rem 1rem;
}

.landing-dashboard .events-col-action {
  width: 80px;
  padding: 0.5rem 1rem;
}

.landing-dashboard .events-table tbody {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  max-height: 220px;
}

.landing-dashboard .events-table tbody tr {
  min-height: 55px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border-primary);
}

.landing-dashboard .events-table tbody tr:last-child {
  border-bottom: none;
}

.landing-dashboard .events-table tbody tr td:only-child {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-panel);
  padding: 0.3rem 0.5rem;
  line-height: 1.4;
}

.landing-dashboard .events-empty-cell {
  text-align: center;
}

.landing-dashboard .events-table tbody tr td:first-child:not(:only-child) {
  flex: 1;
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 0.6rem 1rem;
  gap: 0.5rem;
}

.landing-dashboard .events-table tbody tr td:first-child strong {
  flex-shrink: 0;
  line-height: 1.3;
  font-size: 0.95rem;
  color: var(--text-primary);
  white-space: nowrap;
}

.landing-dashboard .events-table tbody tr td:nth-child(2) {
  width: 120px;
  display: flex;
  align-items: center;
  padding: 0.5rem 1rem;
}

.landing-dashboard .events-table tbody tr td:nth-child(3) {
  width: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
}

.landing-dashboard .events-table tbody tr td:nth-child(2) .muted-text,
.landing-dashboard .events-table tbody tr td:nth-child(3) .muted-text {
  white-space: nowrap;
}

.landing-dashboard .events-table tbody tr td:not(:only-child) .muted-text {
  color: var(--text-muted);
  line-height: 1.3;
  display: inline-block;
  margin-top: 0;
  flex-shrink: 0;
  font-size: 0.85rem;
  padding: 0;
  white-space: nowrap;
}

.landing-dashboard .events-table tbody::-webkit-scrollbar {
  width: 10px;
}

.landing-dashboard .events-table tbody::-webkit-scrollbar-track {
  background: var(--bg-hover);
  border-radius: 8px;
  border: 1px solid var(--border-light);
}

.landing-dashboard .events-table tbody::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--accent-gold) 0%, #b8860b 100%);
  border-radius: 8px;
  border: 1px solid var(--border-primary);
}

@media (max-width: 768px) {
  .landing-dashboard .section-title-cell {
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s;
  }

  .landing-dashboard .section-title-cell:hover {
    background: var(--bg-hover);
  }

  .landing-dashboard .section-title-cell::before {
    content: "▼";
    display: inline-block;
    margin-right: 0.5rem;
    font-size: 0.7rem;
    color: var(--accent-gold);
    transition: transform 0.2s;
  }

  .landing-dashboard .section-title-cell.collapsed::before {
    transform: rotate(-90deg);
  }

  .landing-dashboard .content-cell {
    transition: max-height 0.3s ease, padding 0.3s ease, opacity 0.2s ease;
  }

  .landing-dashboard .content-cell.collapsed {
    max-height: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    opacity: 0;
    border-top: none !important;
  }

  .landing-dashboard .manor-status-table,
  .landing-dashboard .manor-status-table tbody,
  .landing-dashboard .manor-status-table tr,
  .landing-dashboard .manor-status-table td {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .landing-dashboard .manor-status-table tr {
    margin-bottom: 0;
    border-bottom: 2px solid var(--border-primary);
  }

  .landing-dashboard .manor-status-table tr:last-child {
    border-bottom: none;
  }

  .landing-dashboard .manor-status-table .section-title-cell {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border-bottom: none;
    font-size: 0.9rem;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .landing-dashboard .manor-status-table .section-title-cell::before {
    content: "▸";
    color: var(--accent-gold);
  }

  .landing-dashboard .manor-status-table .content-cell {
    border-top: none;
    padding: 0.5rem 0.75rem 0.75rem;
  }

  .landing-dashboard .status-grid {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
  }

  .landing-dashboard .status-item {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 0.3rem 0.5rem;
    background: var(--bg-secondary);
    border-radius: 4px;
  }

  .landing-dashboard .status-item label {
    font-size: 0.85rem;
    margin-right: 0.5rem;
  }

  .landing-dashboard .status-item .value {
    font-size: 0.85rem;
    text-align: right;
  }

  .landing-dashboard .guest-status-list,
  .landing-dashboard .troop-status-list {
    gap: 0.4rem;
  }

  .landing-dashboard .guest-status-item,
  .landing-dashboard .troop-status-item {
    font-size: 0.8rem;
    background: var(--bg-secondary);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
  }

  .landing-dashboard .guest-status-item .name,
  .landing-dashboard .troop-status-item .name {
    font-size: 0.8rem;
  }

  .landing-dashboard .guest-status-item .status,
  .landing-dashboard .troop-status-item .count {
    font-size: 0.75rem;
  }

  .landing-dashboard .events-table {
    display: block;
  }

  .landing-dashboard .events-table thead {
    display: none;
  }

  .landing-dashboard .events-table tbody {
    display: flex;
    flex-direction: column;
    max-height: none;
    overflow-y: visible;
  }

  .landing-dashboard .events-table tbody tr {
    display: flex;
    flex-wrap: wrap;
    min-height: auto;
    padding: 0.75rem;
    gap: 0.5rem;
    border-bottom: 1px solid var(--border-primary);
  }

  .landing-dashboard .events-table tbody tr td:first-child:not(:only-child) {
    flex: 1 1 100%;
    padding: 0;
    flex-direction: column;
    align-items: flex-start;
  }

  .landing-dashboard .events-table tbody tr td:nth-child(2) {
    width: auto;
    flex: 1;
    padding: 0;
    justify-content: flex-start;
  }

  .landing-dashboard .events-table tbody tr td:nth-child(3) {
    width: auto;
    flex: 0 0 auto;
    padding: 0;
    justify-content: flex-end;
  }

  .landing-dashboard .events-table tbody tr td:only-child {
    padding: 1rem 0.5rem;
  }

  .landing-dashboard .events-table .btn-secondary,
  .landing-dashboard .events-table .btn-sm {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    min-width: auto;
  }
}
