:root {
  color-scheme: light;
  --brand: #68596e;
  --brand-dark: #4f4354;
  --gold: #e0a93b;
  --ink: #1f1b22;
  --muted: #6f6a75;
  --line: #e6e3ea;
  --bg: #f6f5f8;
  --white: #fff;
  --red: #c62f2f;
  --red-bg: #fdecec;
  font-family: Tahoma, 'Segoe UI', Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
}

h1 {
  font-size: 20px;
  margin: 0 0 16px;
}

h2 {
  font-size: 17px;
  margin: 0;
}

h3 {
  font-size: 15px;
  margin: 18px 0 8px;
}

h4 {
  font-size: 13px;
  margin: 12px 0 6px;
}

button,
input,
select,
textarea {
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

input[type='checkbox'] {
  width: auto;
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 1px;
}

.login {
  max-width: 360px;
  margin: 10vh auto;
  padding: 28px;
  background: var(--white);
  border-radius: 14px;
  display: grid;
  gap: 14px;
  box-shadow: 0 2px 12px rgb(0 0 0 / 8%);
}

.login label {
  display: grid;
  gap: 6px;
  font-weight: 600;
}

.shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: 100vh;
}

aside {
  background: var(--brand-dark);
  color: var(--white);
  padding: 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.brand {
  font-weight: 700;
  font-size: 16px;
  padding: 0 8px;
}

nav {
  display: grid;
  gap: 4px;
  flex: 1;
  align-content: start;
}

nav button {
  text-align: start;
  background: none;
  border: 0;
  color: inherit;
  padding: 9px 10px;
  border-radius: 8px;
  cursor: pointer;
}

nav button:hover {
  background: rgb(255 255 255 / 10%);
}

nav button.active {
  background: var(--white);
  color: var(--brand-dark);
  font-weight: 700;
}

aside .link {
  color: var(--white);
}

main {
  padding: 22px;
  min-width: 0;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.toolbar input,
.toolbar select {
  width: auto;
  flex: 1 1 200px;
  max-width: 320px;
}

.mini-wrap {
  overflow-x: auto;
}

.table-wrap {
  overflow-x: auto;
  background: var(--white);
  border-radius: 12px;
  border: 1px solid var(--line);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 10px 12px;
  text-align: start;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

th {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.btn,
.primary,
.danger {
  border-radius: 8px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  background: var(--white);
  cursor: pointer;
  white-space: nowrap;
}

.btn:disabled,
.primary:disabled,
.danger:disabled {
  opacity: 0.5;
  cursor: default;
}

.btn-primary,
.primary {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--white);
}

.btn-danger {
  color: var(--red);
}

.danger {
  background: var(--red);
  border-color: var(--red);
  color: var(--white);
}

.link {
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--muted);
}

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 14px;
}

.thumb {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 8px;
  background: var(--bg);
}

.muted,
.empty {
  color: var(--muted);
}

.empty {
  padding: 40px;
  text-align: center;
  background: var(--white);
  border-radius: 12px;
}
