:root {
  --bg: #f3efe7;
  --panel: #fffdf8;
  --panel-strong: #ffffff;
  --border: #d9cfbf;
  --text: #1f2933;
  --muted: #66727f;
  --accent: #1d6b57;
  --accent-dark: #154f41;
  --danger: #9e2b25;
  --shadow: 0 18px 45px rgba(31, 41, 51, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(29, 107, 87, 0.14), transparent 28%),
    linear-gradient(180deg, #f7f2ea 0%, #f1ecdf 100%);
  color: var(--text);
}

.admin-body {
  min-height: 100vh;
}

.admin-login-page {
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card,
.toolbar-card,
.table-card {
  background: rgba(255, 253, 248, 0.94);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(217, 207, 191, 0.9);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.login-card {
  width: min(100%, 420px);
  padding: 32px;
}

.login-card h1,
.topbar h1 {
  margin: 12px 0 8px;
  font-size: clamp(28px, 4vw, 40px);
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(29, 107, 87, 0.1);
  color: var(--accent-dark);
  font-weight: 700;
  letter-spacing: 0.08em;
}

.muted-text {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.login-form,
.filters-grid {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.field,
.login-form {
  width: 100%;
}

label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
}

input,
select,
button,
.secondary-link,
.ghost-button {
  font: inherit;
}

input,
select {
  width: 100%;
  padding: 13px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--panel-strong);
  color: var(--text);
}

button,
.secondary-link,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 12px 18px;
  border-radius: 12px;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    background-color 0.18s ease,
    border-color 0.18s ease;
}

button {
  background: var(--accent);
  color: #fff;
}

button:hover,
.secondary-link:hover,
.ghost-button:hover {
  transform: translateY(-1px);
}

.secondary-link,
.ghost-button {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.alert {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 12px;
}

.alert.error {
  background: rgba(158, 43, 37, 0.1);
  color: var(--danger);
}

.admin-shell {
  width: min(1280px, calc(100% - 24px));
  margin: 0 auto;
  padding: 24px 0 40px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.toolbar-card {
  padding: 20px;
  margin-bottom: 18px;
}

.filters-grid {
  grid-template-columns: minmax(0, 1.8fr) minmax(220px, 0.8fr) auto;
  align-items: end;
}

.toolbar-actions,
.export-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.export-actions {
  margin-top: 16px;
}

.table-card {
  padding: 16px;
}

.table-meta {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 14px;
}

.table-wrap {
  overflow: auto;
  border: 1px solid rgba(217, 207, 191, 0.7);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.65);
}

table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

thead th {
  position: sticky;
  top: 0;
  background: #f3eee4;
  z-index: 1;
}

th,
td {
  padding: 14px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(217, 207, 191, 0.75);
  vertical-align: top;
  font-size: 14px;
}

tbody tr:nth-child(even) {
  background: rgba(248, 245, 239, 0.7);
}

.empty-state {
  text-align: center;
  color: var(--muted);
  padding: 28px;
}

@media (max-width: 860px) {
  .topbar {
    flex-direction: column;
  }

  .filters-grid {
    grid-template-columns: 1fr;
  }

  .toolbar-actions,
  .export-actions {
    width: 100%;
  }

  button,
  .secondary-link,
  .ghost-button {
    width: 100%;
  }
}
