:root {
  --ink: #17221d;
  --muted: #66756e;
  --paper: #fff9ef;
  --panel: rgba(255, 255, 255, 0.82);
  --line: #e4dac7;
  --accent: #0d6f5c;
  --accent-dark: #09483d;
  --warn: #9b5b00;
  --error: #b3261e;
  --shadow: 0 24px 70px rgba(55, 43, 23, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: Avenir Next, Candara, Trebuchet MS, sans-serif;
  background:
    radial-gradient(circle at top right, rgba(240, 178, 87, 0.32), transparent 34rem),
    linear-gradient(135deg, #f8ead4 0%, #edf4e9 48%, #d9eee7 100%);
}

a {
  color: inherit;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 280px;
  padding: 28px;
  background: rgba(22, 39, 33, 0.92);
  color: #f7efe2;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.brand {
  display: flex;
  gap: 14px;
  align-items: center;
}

.brand-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: #e3aa4f;
  color: #17221d;
  font-weight: 900;
}

.brand small {
  display: block;
  max-width: 190px;
  overflow: hidden;
  color: #bacec6;
  text-overflow: ellipsis;
  white-space: nowrap;
}

nav {
  display: grid;
  gap: 8px;
}

nav a,
.ghost {
  padding: 12px 14px;
  border-radius: 14px;
  color: #dbe9e3;
  text-decoration: none;
  border: 1px solid transparent;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

nav a.active,
nav a:hover,
.ghost:hover {
  background: rgba(255, 255, 255, 0.11);
  border-color: rgba(255, 255, 255, 0.16);
}

.full {
  width: 100%;
}

.content {
  margin-left: 280px;
  padding: 36px;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(2rem, 4vw, 4rem);
  letter-spacing: -0.06em;
  margin-bottom: 0;
}

h2 {
  font-size: 1.15rem;
}

.eyebrow {
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

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

.login-panel,
.panel,
.table-card,
.stats-grid article,
.photo-card {
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 28px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.login-panel {
  max-width: 520px;
  margin: 8vh auto;
  padding: 42px;
}

.stack,
.filters,
.inline-form {
  display: flex;
  gap: 12px;
}

.stack {
  flex-direction: column;
}

label {
  display: grid;
  gap: 7px;
  font-weight: 700;
}

input,
select,
button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
}

button {
  background: var(--accent);
  color: white;
  border: 0;
  font-weight: 800;
  cursor: pointer;
}

button:hover {
  background: var(--accent-dark);
}

.btn-danger {
  background: #a84232;
}

.btn-danger:hover {
  background: #7e2d22;
}

.btn-neutral {
  background: #e8dfcf;
  color: var(--ink);
}

.btn-neutral:hover {
  background: #d8c7a9;
}

.filters {
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.filters input,
.filters select {
  min-width: 210px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.stats-grid article {
  padding: 24px;
}

.stats-grid span {
  color: var(--muted);
}

.stats-grid strong {
  display: block;
  font-size: 2.7rem;
  letter-spacing: -0.05em;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.summary-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.panel,
.table-card {
  padding: 22px;
  margin-bottom: 18px;
}

.summary-list {
  padding: 0;
  margin: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.summary-list li {
  display: grid;
  gap: 3px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.summary-list span {
  color: var(--muted);
}

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

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

th {
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.inline-form {
  align-items: center;
}

.inline-form input {
  min-width: 80px;
  max-width: 180px;
}

.table-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.complaint-actions {
  flex-wrap: wrap;
}

.link,
.pill {
  color: var(--accent-dark);
  font-weight: 800;
}

.pill {
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
}

.messages {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.message {
  padding: 13px 15px;
  border-radius: 16px;
  background: #e5f5ed;
  color: var(--accent-dark);
}

.message.error {
  background: #ffe7e3;
  color: var(--error);
}

.message.warning {
  background: #fff1d7;
  color: var(--warn);
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}

.photo-card {
  overflow: hidden;
  padding: 14px;
  display: grid;
  gap: 12px;
}

.photo-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 18px;
  background: #d7ded8;
}

.complaint-image {
  display: grid;
  gap: 8px;
  text-decoration: none;
}

.complaint-image img {
  width: 140px;
  max-width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 14px;
  background: #d7ded8;
}

.complaint-image span {
  color: var(--muted);
  font-size: 0.82rem;
  word-break: break-all;
}

.photo-card span {
  display: block;
  color: var(--muted);
}

code {
  padding: 2px 6px;
  border-radius: 7px;
  background: rgba(13, 111, 92, 0.1);
}

@media (max-width: 980px) {
  .sidebar {
    position: static;
    width: auto;
  }

  .content {
    margin-left: 0;
    padding: 22px;
  }

  .stats-grid,
  .summary-grid,
  .summary-grid.two {
    grid-template-columns: 1fr;
  }

  .table-card {
    overflow-x: auto;
  }

  .inline-form {
    min-width: 340px;
  }
}
