/* SetonLOS styles — navy/gold, clean typography, functional */
:root {
  --navy: #1e3a5f;
  --navy-dark: #142a47;
  --gold: #c9a961;
  --gold-dark: #a88a44;
  --cream: #faf8f3;
  --paper: #ffffff;
  --ink: #1a1a1a;
  --muted: #6b7280;
  --border: #e5e7eb;
  --danger: #b91c1c;
  --success: #166534;
  --warn: #92400e;
  --warn-bg: #fef3c7;
  --radius: 6px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-lg: 0 4px 20px rgba(0,0,0,0.08);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.55;
}

h1, h2, h3 { font-family: "Cormorant Garamond", Georgia, serif; font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: 2rem; margin: 0 0 0.25rem; color: var(--navy); }
h2 { font-size: 1.5rem; margin: 2rem 0 0.75rem; color: var(--navy); }
h3 { font-size: 1.15rem; margin: 1.5rem 0 0.5rem; }

.header {
  background: var(--navy);
  color: #fff;
  padding: 1.25rem 2rem;
  border-bottom: 3px solid var(--gold);
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.header-brand { flex: 1; min-width: 0; }
.header-link {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 0.85rem;
  padding: 0.45rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius);
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.header-link:hover {
  color: var(--gold);
  border-color: var(--gold);
  background: rgba(0, 0, 0, 0.15);
}
@media (max-width: 640px) {
  .header { flex-wrap: wrap; gap: 0.75rem; padding: 1rem; }
  .header-link { font-size: 0.8rem; padding: 0.35rem 0.7rem; }
}
.header .wordmark {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.header .wordmark span { color: var(--gold); }
.header .subtitle { font-size: 0.85rem; opacity: 0.85; margin-top: 0.15rem; }

.container {
  max-width: 780px;
  margin: 2.5rem auto;
  padding: 0 1.5rem;
}
.container.wide { max-width: 1100px; }

.card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
}

.lede { color: var(--muted); font-size: 1.05rem; margin: 0 0 1.5rem; }

form .row { display: flex; gap: 1rem; }
form .row > * { flex: 1; }
form .field { margin-bottom: 1.1rem; }
form label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
  font-size: 0.92rem;
  color: #333;
}
form .hint { font-size: 0.82rem; color: var(--muted); margin-top: 0.25rem; }
form input[type=text], form input[type=email], form input[type=date],
form input[type=tel], form select, form textarea {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}
form input:focus, form select:focus, form textarea:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.12);
}
form textarea { min-height: 90px; resize: vertical; }

.btn {
  display: inline-block;
  padding: 0.7rem 1.4rem;
  background: var(--navy);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
  font-family: inherit;
}
.btn:hover { background: var(--navy-dark); }
.btn.secondary { background: #fff; color: var(--navy); border: 1px solid var(--navy); }
.btn.secondary:hover { background: var(--cream); }
.btn.approve { background: var(--success); }
.btn.approve:hover { background: #124b26; }
.btn.deny { background: var(--danger); }
.btn.deny:hover { background: #8a1515; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Radio row — inline on desktop, stacked on mobile */
.radio-row {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.radio-row label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.radio-row label:hover { border-color: var(--navy); }
.radio-row input[type=radio] {
  appearance: none;
  -webkit-appearance: none;
  width: 1rem;
  height: 1rem;
  border: 1.5px solid #c7cbd1;
  border-radius: 50%;
  margin: 0;
  display: inline-block;
  position: relative;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.radio-row input[type=radio]:checked {
  border-color: var(--navy);
  background: var(--navy);
  box-shadow: inset 0 0 0 3px #fff;
}
.radio-row input[type=radio]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.18);
}
.radio-row label:has(input[type=radio]:checked) {
  border-color: var(--navy);
  background: rgba(30, 58, 95, 0.06);
  color: var(--navy);
}
@media (max-width: 640px) {
  .radio-row { flex-direction: column; align-items: stretch; }
  .radio-row label { justify-content: flex-start; }
}

/* ComboBox */
.cb-wrap { position: relative; margin-bottom: 1.1rem; }
.cb-label { display: block; font-weight: 600; margin-bottom: 0.35rem; font-size: 0.92rem; color: #333; }
.cb-trigger {
  display: flex; align-items: center; gap: 0.5rem;
  width: 100%; padding: 0.65rem 0.75rem;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: #fff; cursor: pointer; font-size: 1rem; font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.cb-trigger:hover, .cb-trigger:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(30,58,95,0.12); outline: none; }
.cb-trigger.disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }
.cb-value { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cb-value.placeholder { color: var(--muted); }
.cb-clear { color: var(--muted); font-size: 1.1rem; cursor: pointer; padding: 0 0.2rem; line-height: 1; }
.cb-clear:hover { color: var(--navy); }
.cb-chevron { color: var(--navy); font-size: 0.8rem; flex-shrink: 0; transition: transform 0.15s; }
.cb-wrap.open .cb-chevron { transform: rotate(180deg); }
.cb-hint { font-size: 0.82rem; color: var(--muted); margin-top: 0.25rem; }
.cb-dropdown {
  position: absolute; top: calc(100% - 1.1rem); left: 0; right: 0; z-index: 20;
  background: #fff; border: 1px solid var(--border); border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow-lg); overflow: hidden;
}
.cb-search-wrap { padding: 0.5rem; border-bottom: 1px solid var(--border); }
.cb-search {
  width: 100%; padding: 0.5rem 0.75rem; border: 1px solid var(--border);
  border-radius: var(--radius); font-size: 0.95rem; font-family: inherit;
}
.cb-search:focus { outline: none; border-color: var(--navy); }
.cb-list { max-height: 300px; overflow-y: auto; }
.cb-item {
  padding: 0.55rem 0.75rem; cursor: pointer;
  border-bottom: 1px solid #f3f4f6; transition: background 0.1s;
}
.cb-item:hover, .cb-item.highlighted { background: var(--cream); }
.cb-item.selected { background: rgba(30,58,95,0.06); }
.cb-item-primary { font-weight: 600; font-size: 0.95rem; }
.cb-item-secondary { font-size: 0.82rem; color: var(--muted); }
.cb-item mark { background: var(--gold); color: inherit; padding: 0; border-radius: 2px; }
.cb-no-results { padding: 1rem; text-align: center; color: var(--muted); font-size: 0.9rem; }
.cb-overflow { padding: 0.4rem 0.75rem; font-size: 0.82rem; color: var(--muted); border-bottom: 1px solid #f3f4f6; }
.cb-footer .cb-item { border-bottom: none; }
.cb-footer .cb-item-primary { color: var(--navy); }

/* Clergy info panel */
.clergy-preview {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  display: none;
}
.clergy-preview.visible { display: block; }
.clergy-preview dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 0.4rem 1rem; font-size: 0.92rem; }
.clergy-preview dt { font-weight: 600; color: #555; }
.clergy-preview dd { margin: 0; }

/* Status badges */
.badge {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
}
.badge.active { background: #dcfce7; color: var(--success); }
.badge.inactive { background: #fee2e2; color: var(--danger); }
.badge.pending { background: #fef3c7; color: var(--warn); }
.badge.submitted { background: #dbeafe; color: #1e40af; }
.badge.under_review { background: #fef3c7; color: var(--warn); }
.badge.approved { background: #dcfce7; color: var(--success); }
.badge.denied { background: #fee2e2; color: var(--danger); }
.badge.sent { background: #e0e7ff; color: #3730a3; }
.badge.needs_info { background: #fef3c7; color: var(--warn); }
.badge.cancelled { background: #f3f4f6; color: #6b7280; }
.badge.diaconate_review { background: #e0e7ff; color: #3730a3; }
.badge.demo {
  background: var(--warn-bg);
  color: var(--warn);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.1rem 0.45rem;
}

/* Notices */
.notice {
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  font-size: 0.93rem;
}
.notice.warn { background: var(--warn-bg); color: var(--warn); border-left: 3px solid var(--warn); }
.notice.success { background: #dcfce7; color: var(--success); border-left: 3px solid var(--success); }
.notice.error { background: #fee2e2; color: var(--danger); border-left: 3px solid var(--danger); }
.notice.info { background: #dbeafe; color: #1e40af; border-left: 3px solid #2563eb; }

/* Tables */
table { width: 100%; border-collapse: collapse; }
table th, table td { text-align: left; padding: 0.7rem 0.75rem; border-bottom: 1px solid var(--border); }
table th { background: var(--cream); font-size: 0.85rem; color: #555; font-weight: 600; }
table tr:hover td { background: #fafaf7; cursor: pointer; }

.footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  padding: 2rem 1rem;
}

@media (max-width: 640px) {
  form .row { flex-direction: column; gap: 0; }
  .container { margin: 1rem auto; }
  .card { padding: 1.25rem; }
  h1 { font-size: 1.5rem; }
}
