:root {
  --bg-0: #f2f6ed;
  --bg-1: #d7ecd4;
  --ink: #1e2a18;
  --accent: #e95f3b;
  --accent-2: #2d7c4a;
  --card: rgba(255, 255, 255, 0.82);
  --stroke: rgba(30, 42, 24, 0.18);
  --shadow: 0 16px 36px rgba(30, 42, 24, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at 10% 10%, var(--bg-1), transparent 40%),
    radial-gradient(circle at 90% 85%, #f8dbbf, transparent 34%),
    linear-gradient(145deg, var(--bg-0), #f7f4ee);
}

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

.shape-a {
  width: 240px;
  height: 240px;
  background: #f2ab4d;
  top: -70px;
  right: -60px;
}

.shape-b {
  width: 200px;
  height: 200px;
  background: #73b58a;
  bottom: -50px;
  left: -30px;
}

.container {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  padding: 20px 16px 40px;
}

.hero h1 {
  margin: 0;
  font-family: "Fraunces", serif;
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 1;
}

.hero-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.hero-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

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

.main-logo {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: white;
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--accent-2);
  font-size: 0.78rem;
}

.lang-select {
  min-width: 84px;
  background: rgba(255, 255, 255, 0.86);
}

.subtitle {
  margin-top: 0.7rem;
  max-width: 600px;
}

.card {
  margin-top: 18px;
  border: 1px solid var(--stroke);
  background: var(--card);
  backdrop-filter: blur(8px);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 18px;
  animation: rise 0.36s ease-out;
}

.auth-card {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.auth-header h2 {
  margin: 0;
}

.auth-stepper {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}

.step-chip {
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.84);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.8rem;
  font-weight: 600;
}

.step-chip.active {
  background: #e9f6ed;
  border-color: #9bc8a9;
}

#headerLoginBtn.active {
  background: var(--accent-2);
  border-color: transparent;
  color: #fff;
}

.auth-selection-hint {
  margin: 8px 0 0;
  font-size: 0.9rem;
}

.auth-forms {
  grid-template-columns: 1fr;
}

.auth-forms form {
  max-width: 520px;
}

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

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

.panel {
  border: 1px solid var(--stroke);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.75);
  padding: 12px;
}

.config-item-form {
  border-top: 1px dashed var(--stroke);
  padding-top: 10px;
  margin-top: 10px;
}

.config-item-form:first-of-type {
  border-top: 0;
  padding-top: 0;
  margin-top: 0;
}

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

input,
select,
button {
  border-radius: 10px;
  border: 1px solid var(--stroke);
  padding: 10px 12px;
  font: inherit;
  transition: all 0.18s ease;
}

button {
  cursor: pointer;
  background: var(--accent-2);
  color: white;
  border-color: transparent;
  font-weight: 700;
}

button.ghost {
  background: white;
  color: var(--ink);
  border-color: var(--stroke);
}

button:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid #2b7fff;
  outline-offset: 1px;
}

button[disabled] {
  cursor: not-allowed;
  opacity: 0.58;
  transform: none;
}

button.danger {
  background: #d84530;
}

button.warn {
  background: #df6d2f;
}

.session {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.dashboard-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tab-btn {
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  border-color: var(--stroke);
}

.tab-btn.active {
  background: var(--accent-2);
  color: white;
  border-color: transparent;
}

.dashboard-page {
  display: none;
  margin-top: 12px;
}

.dashboard-page.active {
  display: block;
}

.jobs-subtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.jobs-subpage {
  display: none;
}

.jobs-subpage.active {
  display: block;
}

.list {
  display: grid;
  gap: 8px;
}

.list-item {
  border: 1px solid var(--stroke);
  border-radius: 10px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.66);
}

.list-item-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

#inviteResult {
  max-height: 360px;
  overflow: auto;
}

.invite-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.invite-main code {
  font-size: 0.8rem;
  word-break: break-all;
}

.invite-remove-btn {
  padding: 6px 10px;
  font-size: 0.85rem;
}

.icon-btn {
  width: 34px;
  min-width: 34px;
  height: 34px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  line-height: 1;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  padding: 2px 8px;
  font-size: 0.72rem;
  font-weight: 700;
}

.status-pill.inactive {
  color: #8a3300;
  background: #ffe0cc;
  border-color: #f2b089;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}

.badge.pending {
  color: #7a4d00;
  background: #ffe3b5;
  border: 1px solid #f3c685;
}

.pagination {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 10px;
}

.list-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.hint {
  margin: 0;
  font-size: 0.84rem;
  opacity: 0.8;
}

pre {
  margin: 0;
  max-height: 320px;
  overflow: auto;
  background: #182113;
  color: #e8f5e7;
  border-radius: 12px;
  padding: 12px;
}

.form-error {
  margin: -2px 0 0;
  color: #b22819;
  font-size: 0.86rem;
}

.toast-container {
  position: fixed;
  top: 14px;
  right: 14px;
  display: grid;
  gap: 8px;
  z-index: 20;
}

.toast {
  border-radius: 12px;
  padding: 10px 12px;
  color: white;
  box-shadow: var(--shadow);
  min-width: 220px;
}

.toast.success {
  background: #2d7c4a;
}

.toast.error {
  background: #b22a1f;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 22, 10, 0.44);
  display: grid;
  place-items: center;
  z-index: 30;
  padding: 16px;
}

.modal-card {
  width: min(100%, 420px);
  background: white;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  padding: 16px;
  box-shadow: var(--shadow);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.hidden {
  display: none;
}

.show {
  display: grid;
}

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

  .auth-stepper {
    gap: 6px;
  }
}

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