:root {
  color-scheme: light;
  --bg: #f3f6f8;
  --surface: #ffffff;
  --surface-2: #eef4f7;
  --surface-3: #f8fafb;
  --text: #172027;
  --muted: #61717b;
  --line: #d8e1e6;
  --primary: #14695f;
  --primary-ink: #ffffff;
  --accent: #315f9d;
  --danger: #b33a4b;
  --warning: #9c6119;
  --success: #24734d;
  --shadow: 0 14px 38px rgba(33, 48, 61, 0.10);
  --shadow-soft: 0 8px 24px rgba(33, 48, 61, 0.07);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(243, 246, 248, 0.96)),
    repeating-linear-gradient(90deg, rgba(20, 105, 95, 0.035) 0, rgba(20, 105, 95, 0.035) 1px, transparent 1px, transparent 72px);
}

[v-cloak] {
  display: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
  padding: 0 14px;
  cursor: pointer;
  font-weight: 620;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease, background 0.15s ease;
}

button:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(20, 105, 95, 0.12);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

button.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-ink);
}

button.primary:hover {
  background: #105b53;
}

button.danger {
  border-color: rgba(180, 59, 66, 0.35);
  color: var(--danger);
}

button.text-button {
  min-height: auto;
  border: 0;
  background: transparent;
  color: var(--accent);
  padding: 0;
  font-weight: 650;
}

button.text-button:hover {
  box-shadow: none;
  color: var(--primary);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  padding: 11px 12px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(20, 105, 95, 0.65);
  box-shadow: 0 0 0 4px rgba(20, 105, 95, 0.10);
  background: #fff;
}

textarea {
  resize: vertical;
  line-height: 1.55;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

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

th {
  color: var(--muted);
  font-weight: 650;
  background: var(--surface-3);
}

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

h1 {
  font-size: 26px;
  line-height: 1.2;
}

h2 {
  font-size: 20px;
  line-height: 1.25;
}

h3 {
  font-size: 15px;
  color: var(--muted);
  margin-bottom: 8px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 12px 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.90);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 28px rgba(33, 48, 61, 0.06);
}

.brand {
  border: 0;
  padding: 0;
  min-height: auto;
  color: var(--primary);
  background: transparent;
  font-size: 25px;
  font-weight: 850;
  letter-spacing: 0;
}

.nav,
.session,
.toolbar,
.actions,
.tabs,
.inline-form {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.nav button,
.tabs button {
  background: transparent;
  color: var(--muted);
}

.nav button.active,
.tabs button.active {
  background: #e7f1ef;
  border-color: var(--primary);
  color: var(--primary);
}

.layout {
  width: min(1180px, calc(100vw - 32px));
  margin: 28px auto 60px;
}

.page {
  width: 100%;
}

.two-col,
.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.9fr);
  gap: 18px;
}

.panel,
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  box-shadow: var(--shadow-soft);
}

.panel.narrow {
  max-width: 480px;
  margin: 0 auto;
}

.auth-panel {
  padding: 26px;
  box-shadow: var(--shadow);
}

.auth-heading {
  margin: 18px 0 20px;
}

.auth-heading h1 {
  margin-bottom: 6px;
}

.auth-heading p {
  color: var(--muted);
  margin-bottom: 0;
}

.auth-link {
  margin-top: 14px;
}

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

.card {
  min-height: 246px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
}

.card::before {
  content: "";
  position: absolute;
  left: 20px;
  right: 20px;
  top: 0;
  height: 3px;
  background: var(--primary);
  border-radius: 0 0 3px 3px;
}

.card .primary {
  margin-top: auto;
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.card-head h1,
.card-head h2 {
  margin-bottom: 0;
}

.form {
  display: grid;
  gap: 15px;
}

.form.compact {
  margin-top: 22px;
}

.form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}

.inline-form {
  margin-top: 16px;
}

.inline-form input {
  width: min(280px, 100%);
}

.toolbar {
  margin-bottom: 18px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  box-shadow: var(--shadow-soft);
}

.toolbar input {
  width: min(360px, 100%);
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

.check input {
  width: auto;
}

.alert {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 12px 14px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-soft);
}

.alert.error {
  border-color: rgba(180, 59, 66, 0.35);
  color: var(--danger);
  background: #fff5f5;
}

.alert.success {
  border-color: rgba(37, 114, 71, 0.35);
  color: var(--success);
  background: #f2fbf6;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  padding: 0 6px;
  font-size: 12px;
}

.status,
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 9px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  font-weight: 750;
}

.status.recruiting,
.status.active,
.status.accepted {
  background: #e7f6ef;
  color: var(--success);
}

.status.closed,
.status.pending,
.status.submitted,
.status.viewed,
.status.offered {
  background: #fff4df;
  color: var(--warning);
}

.status.full,
.status.revoked,
.status.rejected,
.status.cancelled,
.status.invalid,
.status.disabled,
.status.archived {
  background: #fdecee;
  color: var(--danger);
}

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

.excerpt {
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.preline {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

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

.list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}

.list li:last-child {
  border-bottom: 0;
}

.list.stacked li {
  display: block;
}

.list.stacked .actions {
  margin-top: 8px;
}

.note {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  margin-top: 14px;
  background: var(--surface-3);
}

.unread {
  background: #f7fbff;
}

.user-chip {
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 860px) {
  .topbar {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .session {
    justify-content: space-between;
  }

  .two-col,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}
