:root {
  --bg: #f7f4ee;
  --card: #fffefa;
  --ink: #0f1721;
  --muted: #4f5965;
  --line: #ded4c5;
  --primary: #045f5f;
  --primary-strong: #003f40;
  --warn: #955300;
  --danger: #7c1021;
  --ok: #0f6d1f;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(15, 23, 33, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Space Grotesk", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 0% 0%, #efe6d8 0%, transparent 45%),
    radial-gradient(circle at 100% 0%, #d7ecec 0%, transparent 42%),
    linear-gradient(180deg, #f6f2ea 0%, #f1ece3 100%);
  padding: 22px;
}

.bg-orb {
  position: fixed;
  pointer-events: none;
  z-index: -1;
  border-radius: 999px;
  filter: blur(40px);
}

.orb-a {
  width: 260px;
  height: 260px;
  top: -90px;
  right: -100px;
  background: rgba(4, 95, 95, 0.2);
}

.orb-b {
  width: 320px;
  height: 320px;
  bottom: -120px;
  left: -140px;
  background: rgba(149, 83, 0, 0.14);
}

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

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

.brand h1 {
  margin: 0;
  font-size: clamp(1.1rem, 1.6vw + 0.5rem, 1.7rem);
  letter-spacing: 0.03em;
}

.brand__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(140deg, #0d7f7f, #003f40);
}

.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tab {
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.6);
  color: var(--ink);
  padding: 8px 14px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s ease;
}

.tab:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.tab--active {
  background: var(--primary);
  color: #f2fffe;
  border-color: transparent;
}

.tab--danger {
  background: #f7dde2;
  color: var(--danger);
  border-color: transparent;
}

.layout {
  display: grid;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: rgba(255, 254, 250, 0.82);
  backdrop-filter: blur(4px);
  padding: 18px;
  animation: enter 0.35s ease;
}

.panel__header h2 {
  margin: 0;
  font-size: clamp(1.2rem, 1vw + 1rem, 1.8rem);
}

.panel__header p {
  margin: 4px 0 14px;
  color: var(--muted);
}

.grid-two {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 14px;
}

.toolbar {
  margin-bottom: 10px;
}

.input,
select,
textarea {
  width: 100%;
  border: 1px solid #cfc5b6;
  border-radius: 12px;
  font-family: inherit;
  color: var(--ink);
  background: #fffefb;
  padding: 10px 12px;
}

.input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(4, 95, 95, 0.15);
}

.list {
  display: grid;
  gap: 8px;
  max-height: 68vh;
  overflow: auto;
  padding-right: 4px;
}

.card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  padding: 14px;
}

.list-item {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  padding: 12px;
}

.list-item__title {
  margin: 0;
  font-size: 1rem;
}

.list-item__meta {
  color: var(--muted);
  font-size: 0.9rem;
}

.data-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.field {
  border: 1px dashed #ccbea8;
  border-radius: 10px;
  padding: 10px;
}

.field b {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.stats-row {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(120px, 220px));
  margin-bottom: 10px;
}

.badge {
  display: inline-block;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.badge--ok {
  background: #dcf3e0;
  color: var(--ok);
}

.badge--warn {
  background: #ffeccf;
  color: var(--warn);
}

.badge--danger {
  background: #f8dde2;
  color: var(--danger);
}

.form {
  display: grid;
  gap: 10px;
  align-content: start;
}

.form__row {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
}

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

.btn {
  text-decoration: none;
  border: 0;
  border-radius: 12px;
  padding: 9px 12px;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
}

.btn--main {
  background: var(--primary);
  color: #effffe;
}

.btn--light {
  background: #ece6db;
  color: var(--ink);
}

.btn--danger {
  background: #f6d8df;
  color: var(--danger);
}

.table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--card);
}

.table th,
.table td {
  text-align: left;
  padding: 10px;
  border-bottom: 1px solid #eadfce;
  font-size: 0.92rem;
}

.table th {
  background: #f2ece2;
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 300px));
  gap: 10px;
  justify-content: start;
}

.shot {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.shot img {
  display: block;
  width: 100%;
  height: 300px;
  object-fit: cover;
}

.shot figcaption {
  padding: 8px;
}

.login-wrap {
  min-height: calc(100vh - 48px);
  display: grid;
  place-items: center;
}

.login-panel {
  width: min(420px, 100%);
  display: grid;
  gap: 10px;
}

.login-panel h2 {
  margin: 0;
}

.login-panel p {
  margin: 0;
  color: var(--muted);
}

.mono {
  font-family: "IBM Plex Mono", monospace;
}

.hidden {
  display: none;
}

.empty-state {
  display: grid;
  place-content: center;
  text-align: center;
  color: var(--muted);
}

@keyframes enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

  .stats-row {
    grid-template-columns: 1fr;
  }

  .list {
    max-height: 45vh;
  }

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

  .shot img {
    height: auto;
    aspect-ratio: 1 / 1;
  }
}
