:root {
  --brand: hsl(198.1, 100%, 44.3%);
  --brand-2: hsl(198.1, 100%, 52%);
  --brand-3: hsl(198.1, 100%, 38%);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  background: #f3f4f6;
  color: #111827;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  background: #ffffff;
  color: #111827;
  padding: 20px 32px;
  width: 100%;
  box-shadow: 0 2px 8px rgba(0,0,0,.1);
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo {
  height: 54px;
  width: auto;
  border-radius: 8px;
  object-fit: contain;
  background: #ffffff;
  padding: 2px;
}

.topbar h1 {
  font-size: 22px;
  font-weight: 600;
  margin: 0;
}

.layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 16px;
  padding: 16px;
  flex: 1;
}

@media (max-width: 800px) {
  .layout {
    grid-template-columns: 1fr;
  }
}

.sidebar {
  background: #ffffff;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 10px 25px rgba(15,23,42,.08);
}

.sidebar h2 {
  font-size: 16px;
  margin-bottom: 12px;
  font-weight: 600;
  color: var(--brand);
}

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

.table-tile {
  padding: 12px 14px;
  border-radius: 12px;
  cursor: pointer;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  transition: all .12s ease;
}

.table-tile:hover {
  background: hsla(198,100%,96%,1);
  border-color: var(--brand);
  transform: translateY(-1px);
  box-shadow: 0 8px 18px hsla(198,100%,44%,.25);
}

.table-tile .name {
  font-weight: 600;
  font-size: 14px;
}

.table-tile .count {
  display: block;
  font-size: 12px;
  color: #6b7280;
  margin-top: 2px;
}

.content {
  background: #ffffff;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 10px 25px rgba(15,23,42,.08);
  min-height: 300px;
}

.content h2 {
  font-size: 18px;
  margin-bottom: 6px;
  color: #0f172a;
}

.table-meta {
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 10px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  align-items: center;
}

.toolbar input,
.toolbar select {
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  font-size: 13px;
  background: #ffffff;
}

.toolbar button {
  padding: 7px 14px;
  border-radius: 999px;
  border: none;
  font-size: 13px;
  cursor: pointer;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #f9fafb;
  transition: all .15s ease;
  box-shadow: 0 3px 8px hsla(198,100%,44%,.35);
}

.toolbar button:hover {
  background: linear-gradient(135deg, var(--brand-3), var(--brand));
  transform: translateY(-1px);
}

.toolbar-spacer {
  flex-grow: 1;
}

.table-wrapper {
  width: 100%;
  overflow: auto;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 400px;
}

.data-table th,
.data-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #e5e7eb;
  font-size: 13px;
  text-align: left;
  vertical-align: top;
}

.data-table th {
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  background: #f9fafb;
}

.data-table th .sort-indicator {
  font-size: 11px;
  margin-left: 4px;
  opacity: .7;
  color: var(--brand);
}

.data-table tr:nth-child(even) td {
  background: #f9fafb;
}

.data-table tbody tr:hover td {
  background: hsla(198,100%,96%,1);
}

.message {
  margin-top: 10px;
  font-size: 13px;
  color: #6b7280;
}

.message.error {
  color: #b91c1c;
}

.pagination-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  font-size: 12px;
}

.page-size label {
  margin-right: 4px;
}

.pagination-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.pagination-controls button {
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  background: #ffffff;
  cursor: pointer;
  font-size: 12px;
}

.pagination-controls button:hover:not(:disabled) {
  background: hsla(198,100%,96%,1);
}

.pagination-controls button:disabled {
  opacity: .4;
  cursor: default;
}

#page-info {
  min-width: 160px;
  text-align: center;
  display: inline-block;
}

.goto-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

#goto-page-input {
  width: 55px;
  padding: 2px 4px;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  font-size: 12px;
}

.warn {
  background: #fff7ed;
  border: 1px solid #fdba74;
  color: #9a3412;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 12px;
  margin: 8px 0;
}

.hidden {
  display: none !important;
}

.static-page h2 {
  color: var(--brand);
}

a {
  color: var(--brand);
}

/* footer */
.footer {
  background: #ffffff;
  border-top: 2px solid var(--brand);
  padding: 10px 16px;
  text-align: center;
  font-size: 13px;
  color: #4b5563;
}

.footer p {
  margin: 0;
}
