:root {
  --bg: #f7f3ea;
  --panel: #ffffff;
  --ink: #12303a;
  --ink-soft: #4d6770;
  --line: #d4dedf;
  --brand: #0f8a88;
  --brand-strong: #0b6463;
  --accent: #e57a44;
  --accent-soft: #ffd8c2;
  --ok: #247f4b;
  --warn: #ad6a17;
  --danger: #af3d2f;
  --radius: 14px;
  --shadow: 0 14px 40px rgba(18, 48, 58, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Avenir Next", "Segoe UI", "Trebuchet MS", "Noto Sans", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 520px at 20% -10%, #b4ece6 0%, transparent 70%),
    radial-gradient(900px 420px at 92% 4%, #ffd9c7 0%, transparent 66%),
    var(--bg);
}

.bg-shape {
  position: fixed;
  z-index: 0;
  border-radius: 999px;
  filter: blur(30px);
  opacity: 0.4;
  pointer-events: none;
}

.bg-shape-a {
  width: 280px;
  height: 280px;
  left: -90px;
  top: 45%;
  background: #8de0d5;
}

.bg-shape-b {
  width: 320px;
  height: 320px;
  right: -110px;
  top: 26%;
  background: #ffc8ab;
}

.layout {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 20px 40px;
}

.fade-in {
  animation: enter 0.5s ease-out;
}

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

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

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.68rem;
  color: var(--ink-soft);
}

h1 {
  margin: 4px 0 0;
  font-size: clamp(1.6rem, 2.8vw, 2.35rem);
  line-height: 1.1;
  font-family: "Avenir Next Condensed", "Franklin Gothic Medium", "Trebuchet MS", sans-serif;
}

h2 {
  margin: 0 0 10px;
  font-size: 1.07rem;
}

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

.user-pill {
  border: 1px solid var(--line);
  background: #ffffffb8;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.content {
  display: block;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
}

.login-card {
  max-width: 560px;
}

.workspace {
  display: grid;
  gap: 14px;
}

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

.tab {
  border: 1px solid #b7cecf;
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 9px 13px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 160ms ease;
}

.tab:hover {
  transform: translateY(-1px);
  border-color: #9cc1c2;
}

.tab.is-active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.tabpane {
  display: none;
  gap: 12px;
}

.tabpane.is-active {
  display: grid;
}

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

label {
  display: grid;
  gap: 5px;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

input,
select,
button {
  font: inherit;
}

input,
select {
  border: 1px solid #b8cacc;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  min-height: 38px;
  padding: 8px 10px;
}

textarea {
  width: 100%;
  border: 1px solid #b8cacc;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  padding: 10px;
  resize: vertical;
  font-family: "SF Mono", "Menlo", "Monaco", "Consolas", monospace;
  font-size: 0.84rem;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid #89d5cb;
  outline-offset: 1px;
}

.checkline {
  grid-template-columns: 20px 1fr;
  align-items: center;
  margin: 0;
  gap: 8px;
  color: var(--ink);
}

.checkline input {
  min-height: auto;
}

.btn {
  border: 0;
  border-radius: 10px;
  min-height: 38px;
  padding: 8px 12px;
  cursor: pointer;
  font-weight: 600;
  transition: transform 140ms ease, filter 140ms ease;
}

.btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.02);
}

.btn:disabled {
  opacity: 0.65;
  cursor: default;
  transform: none;
}

.btn.primary {
  background: var(--brand);
  color: #fff;
}

.btn.light {
  background: #eef6f5;
  color: var(--ink);
  border: 1px solid #cce2df;
}

.btn.ghost {
  background: #fff;
  color: var(--brand-strong);
  border: 1px solid #9ecbc6;
}

.btn.warn {
  background: #fff3e8;
  color: var(--warn);
  border: 1px solid #f2cb9f;
}

.btn.ok {
  background: #edf8f0;
  color: var(--ok);
  border: 1px solid #b8dfc1;
}

.btn.tiny {
  min-height: 30px;
  padding: 5px 8px;
  font-size: 0.78rem;
}

.split {
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(360px, 1fr);
  gap: 12px;
}

.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

th,
td {
  text-align: left;
  padding: 9px 10px;
  border-bottom: 1px solid #ecf1f2;
  font-size: 0.88rem;
  vertical-align: top;
}

th {
  color: var(--ink-soft);
  font-weight: 600;
}

tr {
  animation: rowIn 260ms ease;
}

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

.controls-row {
  display: flex;
  gap: 10px;
  align-items: end;
}

.controls-row .wide {
  flex: 1;
}

.status-pill {
  display: inline-flex;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 0.75rem;
  border: 1px solid #d7e2e3;
  background: #f2f6f7;
  color: var(--ink-soft);
}

.status-pill[data-status="scheduled"],
.status-pill[data-status="confirmed"],
.status-pill[data-status="attended"] {
  background: #edf8f0;
  border-color: #b8dfc1;
  color: var(--ok);
}

.status-pill[data-status="draft"],
.status-pill[data-status="verification_pending"] {
  background: #f5f6f8;
  border-color: #d3d8de;
  color: #5f6671;
}

.status-pill[data-status="waitlist"],
.status-pill[data-status="offered"] {
  background: #fff5e9;
  border-color: #f0d3ae;
  color: var(--warn);
}

.status-pill[data-status="cancelled"],
.status-pill[data-status="expired"] {
  background: #feefec;
  border-color: #efc6bf;
  color: var(--danger);
}

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

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

.stat {
  border: 1px solid #d7e4e5;
  border-radius: 12px;
  padding: 11px 12px;
  background: linear-gradient(160deg, #fff, #f5fbfb);
}

.stat .label {
  color: var(--ink-soft);
  font-size: 0.78rem;
  margin-bottom: 6px;
}

.stat .value {
  font-size: 1.35rem;
  font-weight: 700;
}

.flash {
  border-radius: 12px;
  border: 1px solid #bfe2db;
  background: #ecfbf8;
  color: #0f5a57;
  padding: 10px 12px;
  font-size: 0.9rem;
}

.flash.error {
  border-color: #efc7c0;
  background: #fff1ef;
  color: #7f2e25;
}

.muted {
  color: var(--ink-soft);
}

.hint {
  min-height: 1.4em;
}

.placeholder p {
  margin: 6px 0;
}

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

@media (max-width: 720px) {
  .layout {
    padding: 16px 12px 30px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-actions {
    width: 100%;
    justify-content: space-between;
  }

  .controls-row {
    flex-direction: column;
    align-items: stretch;
  }
}
