body {
  font-family: Arial, sans-serif;
  width: 80%;
  margin: 2rem auto;
  line-height: 1.4;
}

.title-bar {
  width: 100vw;
  margin: -2rem 0 1.2rem calc((100% - 100vw) / 2);
  background-color: #447799;
  color: white;
}

.title-bar-inner {
  width: 80%;
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.site-logo {
  width: 50px;
  height: 50px;
  background-color: white;
  border-radius: 5px;
  object-fit: contain;
}

.title-bar h1 {
  margin: 0;
  font-size: 2rem;
  font-weight: bold;
  line-height: 1.1;
}

.admin-title-bar {
  background-color: #9f2f3f;
}

.site-footer {
  width: 100vw;
  margin: 2rem 0 -2rem calc((100% - 100vw) / 2);
  background-color: #1b2f52;
  color: white;
}

.admin-footer {
  background-color: #5f1e29;
}

.site-footer-inner {
  width: 80%;
  margin: 0 auto;
  padding: 20px 0;
  font-size: 0.9rem;
  text-align: center;
}

.site-footer p {
  margin: 0.25rem 0;
}

.site-footer a {
  color: #ffffff;
}

.site-footer .small {
  font-size: 0.9rem;
}

h2 {
  font-size: 1.5rem;
  margin: 0.8rem 0 0.4rem;
}

h3 {
  font-size: 1.3rem;
  margin: 0.5rem 0 0.5rem;
}

h4 {
  font-size: 1.1rem;
  margin: 0.35rem 0 0.35rem;
}

table {
  border-collapse: collapse;
  width: 100%;
  margin-top: 1rem;
}

th,
td {
  border: 1px solid #ccc;
  padding: 0.4rem 0.8rem;
  text-align: left;
}

th {
  background: #f0f0f0;
}

button {
  padding: 0.5rem 1.2rem;
  font-size: 1rem;
  cursor: pointer;
}

.sort-button {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: bold;
  text-align: inherit;
}

.sort-button::after {
  content: " \2195";
  color: #555;
  font-size: 0.85rem;
}

.sort-button[aria-sort="ascending"]::after {
  content: " \2191";
}

.sort-button[aria-sort="descending"]::after {
  content: " \2193";
}

.meta {
  color: #555;
  font-size: 0.9rem;
}

.success {
  color: #006600;
  background: #e6ffe6;
  padding: 0.5rem 1rem;
  border-radius: 4px;
}

.error {
  color: #a30000;
  background: #ffe6e6;
  padding: 0.5rem 1rem;
  border-radius: 4px;
}

.warning {
  color: #6f4c00;
  background: #fff3cd;
  padding: 0.5rem 1rem;
  border-radius: 4px;
}

.warning-panel {
  background: #fffaf0;
  border-color: #e0b94d;
}

.info-panel {
  margin-top: 0.5rem;
  padding: 0.6rem 0.8rem;
  border: 1px solid #ccc;
  background: #f8f8f8;
}

.admin-info-panel {
  margin-top: 0.8rem;
}

.admin-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.cache-list {
  margin-top: 0.5rem;
  padding-left: 1.2rem;
}

.cache-list ul {
  margin: 0.2rem 0 0.6rem;
  padding-left: 1.4rem;
}

.cache-list li {
  margin: 0.15rem 0;
}

.section-heading {
  margin-top: 1.2rem;
}

.compact-table {
  margin-top: 0.5rem;
  width: auto;
}

.totals-table th:first-child,
.totals-table td:first-child {
  min-width: 24rem;
  white-space: nowrap;
}

.accordion {
  margin-top: 0.5rem;
}

.accordion summary {
  cursor: pointer;
}

.map-panel {
  width: 70%;
  height: 460px;
  margin-top: 0.5rem;
  border: 1px solid #ccc;
}

.insights-table {
  table-layout: fixed;
  width: auto;
}

.insights-table th,
.insights-table td {
  vertical-align: top;
}

.insights-table th:nth-child(1),
.insights-table td:nth-child(1) {
  width: 32rem;
  white-space: normal;
  overflow-wrap: anywhere;
}

.insights-table th:nth-child(2),
.insights-table td:nth-child(2) {
  width: 12rem;
  overflow-wrap: anywhere;
}

.insights-table th:nth-child(3),
.insights-table td:nth-child(3),
.insights-table th:nth-child(4),
.insights-table td:nth-child(4),
.insights-table th:nth-child(5),
.insights-table td:nth-child(5),
.insights-table th:nth-child(6),
.insights-table td:nth-child(6) {
  width: 8rem;
}

.right {
  text-align: right;
}

.center {
  text-align: center;
}

.bold {
  font-weight: bold;
}

.col-main {
  width: 50%;
}

.col-meta {
  width: 25%;
}

.item-stats {
  table-layout: fixed;
}
.item-stats th:nth-child(1),
.item-stats td:nth-child(1) {
  width: 25%;
}

.item-stats th:nth-child(2),
.item-stats td:nth-child(2) {
  width: 12%;
}

.item-stats th:nth-child(3),
.item-stats td:nth-child(3),
.item-stats th:nth-child(4),
.item-stats td:nth-child(4),
.item-stats th:nth-child(5),
.item-stats td:nth-child(5),
.item-stats th:nth-child(6),
.item-stats td:nth-child(6),
.item-stats th:nth-child(7),
.item-stats td:nth-child(7)
{
  width: 5%;
  text-align: center;
  white-space: nowrap;
}

.item-stats th:nth-child(8),
.item-stats td:nth-child(8),
.item-stats th:nth-child(9),
.item-stats td:nth-child(9){
  width: 10%;
  white-space: nowrap;
}

.item-stats th:nth-child(10),
.item-stats td:nth-child(10) {
  width: 12%;
  white-space: nowrap;
}

.embedded-stats {
  margin-top: 0;
  width: auto;
  white-space: nowrap;
  line-height: 1.15;
}

.embedded-stats td {
  border: 0;
  padding: 0.1rem 0.4rem 0.1rem 0;
  white-space: nowrap;
}

.country-summary th,
.country-summary td,
.recent-activity th,
.recent-activity td {
  text-align: center;
}

.recent-activity th:first-child,
.recent-activity td:first-child {
  text-align: left;
}
