:root {
  --ink: #1f1a17;
  --ink-soft: #4a3f37;
  --paper: #f5efe6;
  --paper-warm: #ebe1d2;
  --paper-deep: #e0d3bd;
  --rust: #b85c3a;
  --rust-deep: #8a3f24;
  --sage: #6b7a5a;
  --sage-soft: #97a385;
  --gold: #c8923a;
  --line: #d4cabb;
  --shadow: 0 4px 24px rgba(31, 26, 23, 0.08);
  --shadow-strong: 0 12px 40px rgba(31, 26, 23, 0.12);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  min-height: 100%;
  font-family: 'Inter Tight', system-ui, sans-serif;
  background: var(--paper);
  color: var(--ink);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body { display: flex; flex-direction: column; }

a { color: var(--rust); }

.platform-header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding: 16px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: 'Fraunces', serif;
  font-size: 26px;
  font-weight: 400;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.logo .bank { color: var(--rust); font-style: italic; }

.logo-mark {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
}

/* Shared site footer (public pages — not admin) */
.site-footer {
  background: var(--paper-warm);
  border-top: 1px solid var(--line);
  padding: 32px 32px 40px;
  margin-top: auto;
}

.site-footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}

@media (max-width: 720px) {
  .site-footer-inner { grid-template-columns: 1fr; }
}

.site-footer .attribution {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.6;
}

.site-footer .attribution strong {
  color: var(--ink);
  font-weight: 500;
}

.site-footer .acknowledgment {
  font-family: 'Fraunces', serif;
  font-size: 14px;
  font-style: italic;
  color: var(--ink-soft);
  line-height: 1.6;
  font-weight: 300;
}

.nav-links { display: flex; gap: 24px; align-items: center; }

.nav-link {
  font-size: 13px;
  color: var(--ink-soft);
  text-decoration: none;
  border: 1px solid var(--line);
  padding: 8px 14px;
  border-radius: 24px;
  transition: all 0.2s;
}

.nav-link:hover { border-color: var(--rust); color: var(--rust); }

.screen-frame {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 32px 120px;
  width: 100%;
}

.step-indicator {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rust);
  font-weight: 600;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.step-indicator .step-divider {
  width: 24px;
  height: 1px;
  background: var(--rust);
}

.screen-title {
  font-family: 'Fraunces', serif;
  font-size: 48px;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.screen-title .em { color: var(--rust); font-style: italic; }

.screen-lead {
  font-family: 'Fraunces', serif;
  font-size: 20px;
  font-style: italic;
  color: var(--ink-soft);
  margin-bottom: 48px;
  max-width: 720px;
  line-height: 1.4;
  font-weight: 300;
}

.form-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 40px;
  box-shadow: var(--shadow);
}

.form-section { margin-bottom: 32px; }
.form-section:last-child { margin-bottom: 0; }

.form-section-title {
  font-family: 'Fraunces', serif;
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--rust);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

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

@media (max-width: 600px) {
  .form-row { grid-template-columns: 1fr; }
}

.form-field { display: flex; flex-direction: column; }

.form-field label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 8px;
}

.form-field input,
.form-field textarea,
.form-field select {
  font-family: 'Inter Tight', sans-serif;
  font-size: 15px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--paper);
  color: var(--ink);
  transition: all 0.2s;
  width: 100%;
}

.form-field textarea { resize: vertical; min-height: 100px; }

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  outline: none;
  border-color: var(--rust);
  background: white;
}

.form-field .helper {
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: 6px;
  font-style: italic;
}

.field-error {
  font-size: 12px;
  color: var(--rust-deep);
  margin-top: 6px;
  display: none;
}

.field-error.visible { display: block; }

.form-field.has-error input,
.form-field.has-error textarea,
.form-field.has-error select {
  border-color: var(--rust-deep);
}

.checkbox-group { display: flex; flex-direction: column; gap: 10px; }

.checkbox-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--paper);
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}

.checkbox-item:hover { border-color: var(--rust); }

.checkbox-item.checked {
  border-color: var(--rust);
  background: rgba(184, 92, 58, 0.04);
}

.checkbox-box {
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--ink-soft);
  border-radius: 3px;
  flex-shrink: 0;
  position: relative;
  margin-top: 1px;
  background: white;
  transition: all 0.2s;
}

.checkbox-item.checked .checkbox-box {
  background: var(--rust);
  border-color: var(--rust);
}

.checkbox-item.checked .checkbox-box::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 6px;
  width: 4px;
  height: 9px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox-item .label-text {
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
}

.checkbox-item .sub-text {
  font-size: 12px;
  color: var(--ink-soft);
  display: block;
  margin-top: 4px;
}

.info-box {
  background: rgba(107, 122, 90, 0.06);
  border: 1px solid rgba(107, 122, 90, 0.2);
  border-radius: 3px;
  padding: 16px 20px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 16px 0;
}

.info-box .icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--sage);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 11px;
  flex-shrink: 0;
  margin-top: 1px;
  font-weight: 500;
}

.info-box .text {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.5;
}

.error-box {
  background: rgba(184, 92, 58, 0.06);
  border: 1px solid rgba(184, 92, 58, 0.3);
  border-radius: 3px;
  padding: 16px 20px;
  margin: 16px 0;
  font-size: 13px;
  color: var(--rust-deep);
  line-height: 1.5;
  display: none;
}

.error-box.visible { display: block; }

.action-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}

.btn {
  font-family: 'Inter Tight', sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 14px 28px;
  border-radius: 3px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary { background: var(--rust); color: white; }

.btn-primary:hover:not(:disabled) {
  background: var(--rust-deep);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(184, 92, 58, 0.3);
}

.btn-secondary {
  background: transparent;
  color: var(--ink-soft);
  padding: 14px 0;
}

.btn-secondary:hover { color: var(--ink); }

.btn-arrow { display: inline-block; transition: transform 0.2s; }
.btn-primary:hover:not(:disabled) .btn-arrow { transform: translateX(4px); }

.status-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 56px 48px;
  text-align: center;
  box-shadow: var(--shadow);
}

.status-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--sage);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  font-family: 'Fraunces', serif;
  font-size: 32px;
  font-style: italic;
}

.table-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.app-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.app-table thead {
  background: var(--paper-warm);
  border-bottom: 1px solid var(--line);
}

.app-table th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  font-weight: 600;
  padding: 14px 20px;
}

.app-table td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.app-table tbody tr { cursor: pointer; transition: background 0.15s; }
.app-table tbody tr:hover { background: var(--paper); }
.app-table tbody tr:last-child td { border-bottom: none; }

.status-pill {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 12px;
  font-weight: 500;
}

.status-pill.new { background: rgba(184, 92, 58, 0.12); color: var(--rust-deep); }
.status-pill.reviewing { background: rgba(200, 146, 58, 0.18); color: #7a5a18; }
.status-pill.invited { background: rgba(107, 122, 90, 0.18); color: #3f4a32; }
.status-pill.declined { background: rgba(74, 63, 55, 0.1); color: var(--ink-soft); }

.detail-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 40px;
  box-shadow: var(--shadow);
}

.detail-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.detail-row:last-child { border-bottom: none; }

.detail-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  font-weight: 600;
}

.detail-value { font-size: 15px; line-height: 1.5; }

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

.toolbar h2 {
  font-family: 'Fraunces', serif;
  font-size: 28px;
  font-weight: 400;
}

.empty-state {
  padding: 64px 24px;
  text-align: center;
  color: var(--ink-soft);
  font-style: italic;
  font-family: 'Fraunces', serif;
  font-size: 16px;
}

.login-frame {
  max-width: 440px;
  margin: 80px auto;
  padding: 0 32px;
}

.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }
