:root {
  --ink: #17222d;
  --muted: #667585;
  --line: #d7e0e7;
  --paper: #ffffff;
  --soft: #f4f7f9;
  --deep: #102f46;
  --teal: #0f766e;
  --gold: #a76f16;
  --danger: #a52822;
  --green: #24734e;
  --blue: #2e62a3;
  --shadow: 0 14px 34px rgba(16, 47, 70, 0.09);
}

* {
  box-sizing: border-box;
}

body {
  background: #f3f6f8;
  color: var(--ink);
  font-family: "Segoe UI", Arial, Helvetica, sans-serif;
  line-height: 1.45;
  margin: 0;
}

a {
  color: inherit;
}

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

input,
select,
textarea {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  min-height: 2.55rem;
  padding: 0.62rem 0.72rem;
  width: 100%;
}

textarea {
  min-height: 6rem;
  resize: vertical;
}

label {
  color: #334155;
  display: grid;
  font-size: 0.86rem;
  font-weight: 700;
  gap: 0.35rem;
}

table {
  border-collapse: collapse;
  min-width: 760px;
  width: 100%;
}

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

th {
  background: var(--soft);
  color: #475569;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.login-page,
.setup-page {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: 100vh;
  padding: 1.5rem;
}

.login-page {
  background:
    linear-gradient(120deg, rgba(7, 48, 138, 0.88), rgba(16, 47, 70, 0.94)),
    radial-gradient(circle at 16% 20%, rgba(255, 255, 255, 0.3), transparent 28%),
    #102f46;
  min-height: 100vh;
  overflow-x: hidden;
}

.login-page::before {
  background: url("church-logo.jpg") center / contain no-repeat;
  content: "";
  inset: 0;
  opacity: 0.045;
  position: fixed;
  transform: scale(1.18);
}

.login-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(22rem, 0.78fr);
  isolation: isolate;
  max-width: 72rem;
  min-height: min(42rem, calc(100vh - 3rem));
  position: relative;
  width: min(100%, 72rem);
}

.login-brand-panel,
.login-form-panel {
  align-items: center;
  display: flex;
  padding: clamp(1.25rem, 3vw, 3rem);
}

.login-brand-panel {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-right: 0;
  border-radius: 18px 0 0 18px;
  color: #fff;
  overflow: hidden;
  position: relative;
}

.login-brand-panel::after {
  background: linear-gradient(135deg, transparent 44%, rgba(255, 255, 255, 0.14) 45%, transparent 58%);
  content: "";
  inset: -30%;
  position: absolute;
  transform: rotate(-9deg);
}

.login-brand-content {
  max-width: 34rem;
  position: relative;
  z-index: 1;
}

.login-brand-content img {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
  height: 5.5rem;
  margin-bottom: 1.35rem;
  object-fit: contain;
  padding: 0.55rem;
  width: 5.5rem;
}

.login-brand-content h1 {
  font-size: clamp(2rem, 4vw, 3.8rem);
  line-height: 1.02;
  margin: 0 0 1rem;
}

.login-brand-content .eyebrow {
  color: #f6c65b;
}

.login-brand-content p:not(.eyebrow) {
  color: #d9e8f7;
  font-size: 1rem;
  max-width: 31rem;
}

.login-feature-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.15rem;
}

.login-feature-list span {
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  color: #f7fbff;
  font-size: 0.76rem;
  font-weight: 800;
  padding: 0.45rem 0.7rem;
}

.login-website-link {
  background: #fff;
  border-radius: 6px;
  color: var(--deep);
  display: inline-flex;
  font-weight: 800;
  margin-top: 1rem;
  padding: 0.8rem 1rem;
  text-decoration: none;
}

.login-form-panel {
  background: rgba(255, 255, 255, 0.96);
  border-radius: 0 18px 18px 0;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.24);
}

.login-card,
.setup-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 1rem;
  max-width: 28rem;
  padding: 1.5rem;
  width: 100%;
}

.login-page .login-card {
  background: transparent;
  border: 0;
  box-shadow: none;
  max-width: 28rem;
  padding: 0;
}

.login-card-header {
  align-items: center;
  display: flex;
  gap: 0.9rem;
}

.login-card-header img {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  height: 3.3rem;
  object-fit: contain;
  padding: 0.35rem;
  width: 3.3rem;
}

.login-card-header h2 {
  color: var(--deep);
  font-size: 1.75rem;
  line-height: 1.1;
  margin: 0;
}

.login-muted,
.login-footnote {
  color: var(--muted);
  margin: 0;
}

.login-footnote {
  border-top: 1px solid var(--line);
  display: grid;
  font-size: 0.78rem;
  gap: 0.45rem;
  padding-top: 0.9rem;
  text-align: center;
}

.login-footnote a {
  color: var(--teal);
  font-weight: 800;
  text-decoration: none;
}

.login-page {
  background:
    linear-gradient(120deg, rgba(9, 38, 58, 0.92), rgba(7, 48, 138, 0.86)),
    radial-gradient(circle at 74% 18%, rgba(246, 198, 91, 0.24), transparent 28%),
    radial-gradient(circle at 18% 82%, rgba(15, 118, 110, 0.28), transparent 26%),
    #102f46;
}

.login-shell {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 22px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

.login-brand-panel {
  border: 0;
  border-radius: 0;
}

.login-form-panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 251, 255, 0.98));
  border-radius: 0;
  box-shadow: none;
}

.login-page .login-card {
  background: #fff;
  border: 1px solid #dce6ee;
  border-radius: 12px;
  box-shadow: 0 18px 45px rgba(16, 47, 70, 0.12);
  padding: 1.35rem;
}

.login-page input {
  border-color: #cbd8e4;
  border-radius: 8px;
}

.login-page input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
  outline: 0;
}

.login-page .button {
  border-radius: 8px;
  min-height: 2.8rem;
}

.login-card h1,
.setup-card h1 {
  color: var(--deep);
  margin: 0;
}

.sidebar {
  background: var(--deep);
  color: #dbeafe;
  height: 100vh;
  left: 0;
  overflow-y: auto;
  padding: 1rem;
  position: fixed;
  top: 0;
  width: 17rem;
}

.brand {
  align-items: center;
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.brand-logo {
  align-items: center;
  background: #fff;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  display: block;
  height: 3rem;
  object-fit: contain;
  padding: 0.25rem;
  width: 3rem;
}

.brand-mark {
  align-items: center;
  background: #fff;
  border-radius: 8px;
  color: var(--deep);
  display: inline-flex;
  font-weight: 800;
  height: 2.8rem;
  justify-content: center;
  width: 2.8rem;
}

.brand small {
  color: #a7bed6;
  display: block;
}

.sidebar nav {
  display: grid;
  gap: 0.35rem;
}

.sidebar a {
  border-radius: 6px;
  color: #eef6ff;
  padding: 0.72rem 0.85rem;
  text-decoration: none;
}

.sidebar a:hover {
  background: rgba(255, 255, 255, 0.12);
}

.app-main {
  margin-left: 17rem;
  padding: 1.25rem;
}

.topbar {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.topbar h1 {
  color: var(--deep);
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  line-height: 1;
  margin: 0.15rem 0 0;
}

.eyebrow {
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0;
  text-transform: uppercase;
}

.user-chip {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.5rem 0.75rem;
}

.user-chip a {
  color: var(--danger);
  font-weight: 700;
  margin-left: 0.6rem;
  text-decoration: none;
}

.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(18, 50, 74, 0.06);
  padding: 1rem;
}

.hero-panel {
  align-items: center;
  background:
    linear-gradient(135deg, rgba(18, 50, 74, 0.96), rgba(15, 118, 110, 0.88)),
    #12324a;
  border-radius: 8px;
  box-shadow: var(--shadow);
  color: #fff;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 1rem;
  overflow: hidden;
  padding: 1.2rem;
}

.hero-panel h2 {
  font-size: clamp(1.4rem, 2.5vw, 2.1rem);
  margin: 0.2rem 0;
}

.hero-panel p {
  color: #dbeafe;
  margin-bottom: 0;
}

.hero-panel .eyebrow {
  color: #d9f99d;
}

.hero-panel img {
  background: #fff;
  border-radius: 8px;
  height: 6rem;
  object-fit: contain;
  padding: 0.45rem;
  width: 6rem;
}

.finance-hero {
  background:
    linear-gradient(135deg, rgba(18, 50, 74, 0.96), rgba(183, 121, 31, 0.86)),
    #12324a;
}

.metric-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 1rem;
}

.metric-grid article {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(18, 50, 74, 0.06);
  padding: 1rem;
}

.metric-grid span {
  color: var(--deep);
  display: block;
  font-size: 1.65rem;
  font-weight: 800;
}

.metric-grid p {
  color: var(--muted);
  margin: 0.25rem 0 0;
}

.button {
  background: var(--deep);
  border: 0;
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font-weight: 700;
  justify-content: center;
  min-height: 2.45rem;
  padding: 0.65rem 0.95rem;
  text-decoration: none;
}

.button.secondary {
  background: #e7edf4;
  color: var(--deep);
}

.button.light {
  background: #fff;
  color: var(--deep);
}

.button.ghost {
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.36);
  color: #fff;
}

.button.danger {
  background: #fff0ee;
  color: var(--danger);
}

.button.tiny {
  font-size: 0.8rem;
  min-height: 2rem;
  padding: 0.4rem 0.6rem;
}

.alert {
  border-radius: 8px;
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
}

.alert.success {
  background: #ecfdf5;
  color: #047857;
}

.alert.danger,
.danger {
  background: #fff1f2;
  color: var(--danger);
}

.notice {
  background: #fff8e7;
  border: 1px solid #f6d58b;
  border-radius: 8px;
  padding: 0.8rem;
}

.form-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid h2 {
  border-top: 1px solid var(--line);
  color: var(--deep);
  margin: 0.5rem 0 0;
  padding-top: 1rem;
}

.span-2 {
  grid-column: 1 / -1;
}

.checkbox-grid {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 1rem;
}

.checkbox-grid label {
  align-items: center;
  display: flex;
  font-weight: 600;
}

.checkbox-grid input {
  margin-right: 0.45rem;
  min-height: auto;
  width: auto;
}

.form-actions,
.action-row,
.actions,
.toolbar {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.toolbar {
  border-bottom: 1px solid var(--line);
  margin: -1rem -1rem 1rem;
  padding: 1rem;
}

.toolbar input {
  max-width: 28rem;
}

.inline {
  display: inline;
}

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

.split {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(18rem, 24rem) minmax(0, 1fr);
}

.form-stack {
  display: grid;
  gap: 0.85rem;
}

.pill {
  background: #ecfdf5;
  border-radius: 999px;
  color: #047857;
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 0.28rem 0.55rem;
}

.profile h2 {
  color: var(--deep);
  margin-top: 0;
}

.detail-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 1rem;
}

.detail-grid span {
  color: var(--muted);
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.detail-grid strong {
  display: block;
  margin-top: 0.2rem;
}

.member-profile-hero {
  align-items: center;
  background:
    linear-gradient(135deg, rgba(16, 47, 70, 0.97), rgba(46, 98, 163, 0.9)),
    #102f46;
  border-radius: 8px;
  box-shadow: 0 18px 40px rgba(16, 47, 70, 0.16);
  color: #fff;
  display: grid;
  gap: 1rem;
  grid-template-columns: auto minmax(0, 1fr) auto;
  margin-bottom: 1rem;
  padding: 1.25rem;
}

.member-profile-hero.compact-hero {
  box-shadow: none;
  margin-bottom: 0.85rem;
}

.member-profile-hero .eyebrow {
  color: #f6c65b;
}

.member-profile-hero h2 {
  font-size: clamp(1.45rem, 2.8vw, 2.35rem);
  line-height: 1.08;
  margin: 0.15rem 0;
}

.member-profile-hero p:not(.eyebrow) {
  color: #dbeafe;
  margin: 0;
}

.member-avatar {
  align-items: center;
  background: #fff;
  border-radius: 8px;
  color: var(--deep);
  display: inline-flex;
  font-size: 1.6rem;
  font-weight: 900;
  height: 4.2rem;
  justify-content: center;
  width: 4.2rem;
}

.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: flex-end;
}

.member-record {
  display: grid;
  gap: 1rem;
}

.member-detail-section {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(18, 50, 74, 0.05);
  overflow: hidden;
}

.member-detail-section h3 {
  background: #f7f9fb;
  border-bottom: 1px solid var(--line);
  color: var(--deep);
  font-size: 0.98rem;
  margin: 0;
  padding: 0.9rem 1rem;
}

.member-detail-grid {
  display: grid;
  gap: 0;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.member-detail-grid > div {
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  min-height: 5rem;
  padding: 0.85rem 1rem;
}

.member-detail-grid > div:nth-child(4n) {
  border-right: 0;
}

.member-detail-grid span {
  color: var(--muted);
  display: block;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
}

.member-detail-grid strong {
  color: var(--ink);
  display: block;
  font-size: 0.93rem;
  font-weight: 650;
  line-height: 1.35;
  margin-top: 0.3rem;
  overflow-wrap: anywhere;
}

.compact-table th,
.compact-table td {
  font-size: 0.86rem;
}

.empty-state.compact {
  padding: 1rem;
  text-align: left;
}

.renewal-hero {
  border-left-color: var(--green);
}

.renewal-workspace {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(20rem, 24rem) minmax(0, 1fr);
  margin-bottom: 1rem;
}

.renewal-sidebar {
  align-self: start;
  display: grid;
  gap: 1rem;
  position: sticky;
  top: 6.5rem;
}

.renewal-sidebar h2 {
  margin: 0;
}

.renewal-member-card {
  background:
    linear-gradient(135deg, rgba(16, 47, 70, 0.96), rgba(15, 118, 110, 0.86)),
    #102f46;
  border-radius: 8px;
  color: #fff;
  display: grid;
  gap: 0.25rem;
  justify-items: center;
  padding: 1rem;
  text-align: center;
}

.renewal-member-card .member-avatar {
  height: 3.6rem;
  margin-bottom: 0.4rem;
  width: 3.6rem;
}

.renewal-member-card span {
  color: #dbeafe;
  font-size: 0.82rem;
}

.renewal-submit-card {
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}

.renewal-submit-card textarea {
  min-height: 5rem;
}

.renewal-submit-card .span-2 {
  grid-column: auto;
}

.renewal-hint {
  background: #f8fafc;
  border: 1px dashed #b8c6d4;
  border-radius: 8px;
  color: var(--muted);
  display: grid;
  gap: 0.35rem;
  padding: 1rem;
}

.renewal-hint strong {
  color: var(--deep);
}

.renewal-review {
  min-width: 0;
}

.renewal-review .compact-record .member-detail-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.renewal-review .compact-record .member-detail-grid > div:nth-child(4n) {
  border-right: 1px solid var(--line);
}

.renewal-review .compact-record .member-detail-grid > div:nth-child(3n) {
  border-right: 0;
}

.renewal-empty {
  min-height: 22rem;
}

.renewal-empty h2 {
  color: var(--deep);
  font-size: 1.8rem;
  margin: 0.25rem 0;
}

.renewal-empty p:not(.eyebrow) {
  color: var(--muted);
  max-width: 35rem;
}

.renewal-history-table {
  margin-top: 1rem;
}

.users-hero {
  border-left-color: var(--blue);
}

.users-workspace {
  grid-template-columns: minmax(18rem, 25rem) minmax(0, 1fr);
}

.user-create-card {
  align-self: start;
}

.form-note {
  background: #f6f9fb;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.86rem;
  margin: 0;
  padding: 0.75rem;
}

.generated-credential-card {
  align-items: center;
  background:
    linear-gradient(135deg, rgba(16, 47, 70, 0.97), rgba(15, 118, 110, 0.9)),
    #102f46;
  border-radius: 10px;
  box-shadow: 0 18px 42px rgba(16, 47, 70, 0.18);
  color: #fff;
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 28rem);
  margin-bottom: 1rem;
  padding: 1.2rem;
}

.generated-credential-card .eyebrow {
  color: #f6c65b;
}

.generated-credential-card h2 {
  margin: 0.15rem 0;
}

.generated-credential-card p {
  color: #dbeafe;
  margin: 0;
}

.generated-credential-card dl {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  display: grid;
  gap: 0.7rem;
  margin: 0;
  padding: 0.9rem;
}

.generated-credential-card dt {
  color: #dbeafe;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.generated-credential-card dd {
  font-size: 1rem;
  font-weight: 800;
  margin: 0.15rem 0 0;
  overflow-wrap: anywhere;
}

.generated-password {
  background: #fff;
  border-radius: 6px;
  color: var(--deep);
  font-family: Consolas, "Courier New", monospace;
  letter-spacing: 0.04em;
  padding: 0.6rem;
}

.role-pill {
  background: #eef6ff;
  color: var(--blue);
}

.inactive-pill {
  background: #f1f5f9;
  color: #64748b;
}

.mission-hero {
  background: linear-gradient(135deg, #092c74, #0f766e);
}

.mission-toolbar {
  align-items: end;
}

.compact-field {
  min-width: 10rem;
}

.table-meta {
  color: var(--muted);
  display: block;
  font-size: 0.78rem;
  margin-top: 0.2rem;
}

.empty-state {
  color: var(--muted);
  padding: 2.5rem 1rem;
  text-align: center;
}

.record-avatar {
  align-items: center;
  background: #e7edf4;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--deep);
  display: inline-flex;
  font-weight: 800;
  height: 3rem;
  justify-content: center;
  object-fit: cover;
  width: 2.45rem;
}

.pill.status-inactive,
.pill.status-expired {
  background: #fff1f2;
  color: var(--danger);
}

.form-intro,
.id-card-toolbar {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.form-intro h2,
.id-card-toolbar h2 {
  color: var(--deep);
  margin: 0.2rem 0;
}

.form-intro p,
.id-card-toolbar p {
  color: var(--muted);
  margin: 0;
}

.mission-form small {
  color: var(--muted);
  font-weight: 400;
}

.current-photo {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-size: 0.85rem;
  gap: 0.75rem;
}

.current-photo img {
  border: 1px solid var(--line);
  border-radius: 6px;
  height: 5rem;
  object-fit: cover;
  width: 4rem;
}

.id-card-sheet {
  align-items: flex-start;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
  padding: 1rem 0 3rem;
}

.mission-id {
  --card-blue: #07308a;
  --card-bright: #075bd8;
  background: #f8fbff;
  border: 1px solid #a9b8d4;
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(7, 48, 138, 0.2);
  color: #101828;
  flex: 0 0 auto;
  height: 540px;
  overflow: hidden;
  padding: 22px 30px;
  position: relative;
  width: 340px;
}

.mission-id::before,
.mission-id::after {
  border: 1px solid rgba(7, 48, 138, 0.12);
  border-radius: 50%;
  content: "";
  height: 170px;
  position: absolute;
  top: -92px;
  width: 410px;
}

.mission-id::before {
  left: -250px;
}

.mission-id::after {
  right: -250px;
}

.card-slot {
  background: linear-gradient(180deg, #0a43b7, #05256e);
  border-radius: 999px;
  height: 13px;
  margin: 0 auto 8px;
  position: relative;
  width: 78px;
  z-index: 2;
}

.card-logo {
  display: block;
  height: 62px;
  margin: 0 auto 3px;
  mix-blend-mode: multiply;
  object-fit: contain;
  position: relative;
  width: 62px;
  z-index: 2;
}

.card-logo.small {
  height: 45px;
  width: 45px;
}

.mission-id > h2 {
  color: var(--card-blue);
  font-size: 19px;
  line-height: 1.12;
  margin: 0 0 8px;
  position: relative;
  text-align: center;
  z-index: 2;
}

.mission-id-back > h2 {
  font-size: 14px;
  margin-bottom: 5px;
}

.card-program {
  background: linear-gradient(90deg, #082d7e, #0875e4, #082d7e);
  border-radius: 999px;
  box-shadow: 0 4px 10px rgba(7, 48, 138, 0.25);
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  margin: 0 auto 14px;
  padding: 6px 12px;
  position: relative;
  text-align: center;
  width: 92%;
  z-index: 2;
}

.card-program.compact {
  font-size: 13px;
  margin-bottom: 8px;
  padding: 4px 10px;
  width: 78%;
}

.card-watermark {
  opacity: 0.045;
  position: absolute;
  right: -30px;
  top: 185px;
}

.card-watermark img {
  height: 260px;
  object-fit: contain;
  width: 260px;
}

.card-person {
  align-items: center;
  display: grid;
  gap: 15px;
  grid-template-columns: 100px 1fr;
  margin-bottom: 12px;
  position: relative;
  z-index: 2;
}

.card-photo {
  align-items: center;
  background: #e5e7eb;
  border: 3px solid #fff;
  border-radius: 13px;
  box-shadow: 0 0 0 2px var(--card-blue), 0 6px 12px rgba(7, 48, 138, 0.2);
  color: #6b7280;
  display: flex;
  font-size: 12px;
  font-weight: 800;
  height: 126px;
  justify-content: center;
  overflow: hidden;
  width: 100px;
}

.card-photo img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.card-photo.logo-panel {
  background: #fff;
}

.card-photo.logo-panel img {
  object-fit: contain;
  padding: 13px;
}

.card-name {
  min-width: 0;
}

.card-name strong {
  color: var(--card-blue);
  display: block;
  font-size: 22px;
  line-height: 1.08;
  overflow-wrap: anywhere;
  text-transform: uppercase;
}

.card-name span {
  border-top: 1px solid var(--card-blue);
  display: block;
  font-size: 11px;
  margin-top: 10px;
  padding-top: 7px;
}

.card-details {
  margin: 0;
  position: relative;
  z-index: 2;
}

.card-details > div {
  border-bottom: 1px solid #9dafcc;
  display: grid;
  gap: 10px;
  grid-template-columns: 98px 1fr;
  padding: 5px 0;
}

.card-details dt,
.card-back-footer dt {
  color: var(--card-blue);
  font-size: 10px;
  font-weight: 800;
}

.card-details dd,
.card-back-footer dd {
  font-size: 10px;
  font-weight: 700;
  margin: 0;
  overflow-wrap: anywhere;
}

.card-signature {
  bottom: 64px;
  left: 50%;
  position: absolute;
  text-align: center;
  transform: translateX(-50%);
  width: 205px;
  z-index: 3;
}

.card-signature .signature-line {
  border-bottom: 1px solid var(--card-blue);
  display: block;
  height: 3px;
  margin: 1px 0 3px;
  width: 100%;
}

.card-signature strong {
  color: #111827;
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 10px;
  font-style: italic;
  font-weight: 600;
  line-height: 1.15;
  max-height: 23px;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.card-signature small {
  color: var(--card-blue);
  display: block;
  font-size: 8px;
  font-weight: 800;
  margin-top: 3px;
}

.card-wave-bottom {
  background: linear-gradient(165deg, transparent 24%, #0b61d6 25%, #052b7e 54%, #031d5c 55%);
  bottom: 0;
  height: 58px;
  left: 0;
  position: absolute;
  width: 100%;
  z-index: 1;
}

.card-copy {
  position: relative;
  text-align: center;
  z-index: 2;
}

.card-copy h3 {
  background: var(--card-blue);
  border-radius: 999px;
  color: #fff;
  font-size: 11px;
  margin: 8px auto 5px;
  padding: 4px 10px;
  width: 74%;
}

.card-copy p {
  font-size: 11px;
  line-height: 1.25;
  margin: 0 auto 7px;
  max-width: 250px;
}

.card-copy ul {
  display: inline-grid;
  font-size: 10px;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
  text-align: left;
}

.card-copy li::before {
  color: var(--card-blue);
  content: "\2022";
  font-weight: 900;
  margin-right: 7px;
}

.card-copy .verse {
  font-size: 9px;
}

.card-back-footer {
  align-items: center;
  bottom: 59px;
  display: grid;
  gap: 12px;
  grid-template-columns: 88px 1fr;
  left: 28px;
  position: absolute;
  right: 28px;
  z-index: 2;
}

.card-back-footer dl {
  margin: 0;
}

.card-back-footer dl > div {
  border-bottom: 1px dotted #9dafcc;
  display: grid;
  gap: 6px;
  grid-template-columns: 70px 1fr;
  padding: 5px 0;
}

.card-verify {
  align-items: center;
  border: 2px solid var(--card-blue);
  border-radius: 9px;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 96px;
  justify-content: center;
  padding: 4px;
  text-decoration: none;
}

.card-verify img {
  display: block;
  height: 62px;
  image-rendering: pixelated;
  margin-bottom: 1px;
  object-fit: contain;
  width: 62px;
}

.card-verify strong {
  color: var(--card-blue);
  font-size: 6px;
}

.card-verify small {
  font-size: 6px;
}

.mission-id-back footer {
  align-items: center;
  background: var(--card-blue);
  bottom: 0;
  color: #fff;
  display: flex;
  font-size: 12px;
  font-weight: 800;
  height: 48px;
  justify-content: center;
  left: 0;
  position: absolute;
  width: 100%;
  z-index: 3;
}

/* Professional application shell */
.sidebar {
  background: #102f46;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  padding: 1.15rem 1rem;
  width: 17.5rem;
  z-index: 40;
}

.brand {
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  margin-bottom: 0.8rem;
  padding: 0 0.35rem 1rem;
}

.brand strong {
  color: #fff;
  display: block;
  font-size: 0.96rem;
}

.brand small {
  color: #a9c0d2;
  font-size: 0.74rem;
}

.sidebar nav {
  display: block;
  flex: 1;
  overflow-y: auto;
  padding-right: 0.15rem;
}

.nav-group-label {
  color: #89a8bd;
  font-size: 0.65rem;
  font-weight: 800;
  margin: 1rem 0.75rem 0.35rem;
  text-transform: uppercase;
}

.sidebar nav a {
  border-left: 3px solid transparent;
  border-radius: 6px;
  display: block;
  font-size: 0.86rem;
  font-weight: 650;
  margin: 0.15rem 0;
  min-height: 2.45rem;
  padding: 0.62rem 0.75rem;
}

.sidebar nav a:hover {
  background: rgba(255, 255, 255, 0.09);
}

.sidebar nav a.active {
  background: #fff;
  border-left-color: #cf962d;
  color: var(--deep);
}

.sidebar nav a.website-link {
  background: linear-gradient(135deg, #ffffff, #dcecff);
  border-left-color: #cf962d;
  color: var(--deep);
  font-weight: 800;
  margin-bottom: 0.8rem;
}

.sidebar nav a.website-link:hover {
  background: #fff;
}

.sidebar-user {
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1rem;
  padding: 0.75rem;
}

.sidebar-user strong,
.sidebar-user small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user strong {
  color: #fff;
  font-size: 0.82rem;
  max-width: 10rem;
}

.sidebar-user small {
  color: #a9c0d2;
  font-size: 0.7rem;
  margin-top: 0.15rem;
}

.sidebar-user-actions {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  gap: 0.55rem;
  padding-top: 0.65rem;
  width: 100%;
}

.sidebar-user-actions a {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: #fff;
  flex: 1;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 0.5rem;
  text-align: center;
  text-decoration: none;
}

.user-avatar {
  align-items: center;
  background: #fff;
  border-radius: 7px;
  color: var(--deep);
  display: inline-flex;
  flex: 0 0 2.3rem;
  font-weight: 800;
  height: 2.3rem;
  justify-content: center;
}

.app-main {
  margin-left: 17.5rem;
  padding: 1.4rem 1.6rem 2.5rem;
}

.topbar {
  background: rgba(243, 246, 248, 0.96);
  border-bottom: 1px solid var(--line);
  margin: -1.4rem -1.6rem 1.25rem;
  min-height: 5.4rem;
  padding: 1rem 1.6rem;
  position: sticky;
  top: 0;
  z-index: 25;
}

.topbar h1 {
  font-size: 1.7rem;
  line-height: 1.15;
}

.user-chip {
  align-items: center;
  border-radius: 8px;
  display: flex;
  font-size: 0.82rem;
  font-weight: 700;
  gap: 0.8rem;
}

.user-chip a {
  border-left: 1px solid var(--line);
  margin-left: 0;
  padding-left: 0.8rem;
}

.menu-button {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--deep);
  cursor: pointer;
  display: none;
  font-weight: 800;
  min-height: 2.5rem;
  padding: 0 0.85rem;
}

.sidebar-scrim {
  display: none;
}

.panel {
  padding: 1.25rem;
}

.hero-panel,
.mission-hero,
.finance-hero {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 5px solid var(--teal);
  color: var(--ink);
  padding: 1.35rem;
}

.finance-hero {
  border-left-color: var(--gold);
}

.dashboard-command {
  background:
    linear-gradient(135deg, rgba(16, 47, 70, 0.97), rgba(7, 48, 138, 0.88)),
    radial-gradient(circle at 82% 20%, rgba(246, 198, 91, 0.24), transparent 28%),
    #102f46;
  border-radius: 8px;
  box-shadow: 0 22px 50px rgba(16, 47, 70, 0.18);
  color: #fff;
  display: grid;
  gap: 1.25rem;
  grid-template-columns: minmax(0, 1fr) 15rem;
  margin-bottom: 1.2rem;
  min-height: 18rem;
  overflow: hidden;
  padding: clamp(1.4rem, 3vw, 2.5rem);
  position: relative;
}

.dashboard-command::before {
  background: url("church-logo.jpg") center / contain no-repeat;
  content: "";
  inset: -10% 10% -20% 42%;
  opacity: 0.07;
  position: absolute;
}

.dashboard-copy,
.dashboard-identity {
  position: relative;
  z-index: 1;
}

.dashboard-copy {
  align-self: center;
  max-width: 48rem;
}

.dashboard-copy .eyebrow {
  color: #f6c65b;
}

.dashboard-copy h2 {
  font-size: clamp(2.1rem, 5vw, 4.4rem);
  line-height: 1.02;
  margin: 0.25rem 0 1rem;
}

.dashboard-copy p:not(.eyebrow) {
  color: #dbeafe;
  font-size: 1.02rem;
  margin: 0;
  max-width: 38rem;
}

.dashboard-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.35rem;
}

.dashboard-identity {
  align-self: stretch;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  display: grid;
  justify-items: center;
  padding: 1.2rem;
  text-align: center;
}

.dashboard-identity img {
  background: #fff;
  border-radius: 8px;
  height: 7.4rem;
  margin: auto 0 1rem;
  object-fit: contain;
  padding: 0.6rem;
  width: 7.4rem;
}

.dashboard-identity strong {
  display: block;
  font-size: 1.05rem;
}

.dashboard-identity span {
  color: #dbeafe;
  font-size: 0.82rem;
}

.dashboard-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dashboard-metrics .metric-card {
  background:
    linear-gradient(180deg, #fff, #f8fbff);
  border: 1px solid #d7e4ef;
  border-top: 0;
  min-height: 8.4rem;
  overflow: hidden;
  position: relative;
}

.dashboard-metrics .metric-card::before {
  background: var(--blue);
  content: "";
  height: 4px;
  inset: 0 0 auto;
  position: absolute;
}

.dashboard-metrics .metric-card-2::before,
.dashboard-metrics .metric-card-6::before {
  background: var(--teal);
}

.dashboard-metrics .metric-card-3::before,
.dashboard-metrics .metric-card-7::before {
  background: var(--gold);
}

.dashboard-metrics .metric-card-4::before {
  background: var(--green);
}

.dashboard-metrics small {
  color: #9aa9b7;
  display: block;
  font-size: 0.68rem;
  font-weight: 900;
  margin-bottom: 0.65rem;
}

.dashboard-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 1rem;
}

.dashboard-focus,
.dashboard-finance {
  grid-column: span 2;
}

.dashboard-focus {
  display: grid;
  gap: 1rem;
}

.progress-ring {
  align-items: center;
  background:
    radial-gradient(circle at center, #fff 58%, transparent 59%),
    conic-gradient(var(--teal) calc(var(--value) * 1%), #e7edf4 0);
  border-radius: 999px;
  display: grid;
  height: 9rem;
  justify-items: center;
  margin: 0 auto;
  place-content: center;
  width: 9rem;
}

.progress-ring strong {
  color: var(--deep);
  display: block;
  font-size: 1.55rem;
  line-height: 1;
}

.progress-ring span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
}

.dashboard-focus > p {
  color: var(--muted);
  margin: 0;
  text-align: center;
}

.finance-bars {
  display: grid;
  gap: 0.9rem;
}

.finance-bars > div {
  background: #f6f9fb;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  padding: 0.8rem;
  position: relative;
}

.finance-bars span {
  background: linear-gradient(90deg, rgba(15, 118, 110, 0.18), rgba(167, 111, 22, 0.18));
  bottom: 0;
  left: 0;
  position: absolute;
  top: 0;
  width: var(--bar);
}

.finance-bars strong,
.finance-bars em {
  position: relative;
  z-index: 1;
}

.finance-bars strong {
  color: var(--deep);
  display: block;
}

.finance-bars em {
  color: var(--muted);
  display: block;
  font-size: 0.82rem;
  font-style: normal;
  margin-top: 0.15rem;
}

.mini-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1rem;
}

.mini-actions a,
.recent-panel .section-heading a {
  color: var(--teal);
  font-size: 0.82rem;
  font-weight: 800;
  text-decoration: none;
}

.recent-panel {
  min-height: 17rem;
}

.record-list {
  display: grid;
  gap: 0.65rem;
}

.record-list a,
.record-list > div,
.empty-state {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: inherit;
  display: block;
  padding: 0.78rem;
  text-decoration: none;
}

.record-list a:hover {
  border-color: #a9c0d2;
  box-shadow: 0 8px 18px rgba(16, 47, 70, 0.08);
}

.record-list strong {
  color: var(--deep);
  display: block;
  font-size: 0.9rem;
}

.record-list span {
  color: var(--muted);
  display: block;
  font-size: 0.78rem;
  margin-top: 0.2rem;
}

.empty-state {
  color: var(--muted);
  margin: 0;
}

.elevated-actions {
  border-left: 5px solid var(--gold);
}

/* Upgraded collaborative dashboard and app shell */
.app-shell {
  background:
    linear-gradient(180deg, #eef4f8 0, #f8fafc 24rem),
    #f8fafc;
}

.app-shell .sidebar {
  background:
    linear-gradient(180deg, #0c263a 0%, #113b54 100%);
  border-right: 0;
  box-shadow: 10px 0 30px rgba(16, 47, 70, 0.12);
}

.app-shell .brand {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
  margin-bottom: 1rem;
  padding: 0.75rem;
}

.app-shell .brand-logo {
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
}

.app-shell .sidebar nav a {
  color: #dcebf6;
  font-weight: 700;
}

.app-shell .sidebar nav a.active {
  box-shadow: 0 12px 26px rgba(255, 255, 255, 0.09);
}

.app-shell .app-main {
  padding: 1.6rem 1.8rem 2.4rem;
}

.app-shell .topbar {
  background: rgba(248, 250, 252, 0.9);
  border: 1px solid rgba(215, 224, 231, 0.84);
  border-radius: 10px;
  box-shadow: 0 14px 32px rgba(16, 47, 70, 0.07);
  margin: 0 0 1.3rem;
  min-height: 4.8rem;
  padding: 0.85rem 1rem;
  top: 0.7rem;
}

.app-shell .page-heading h1 {
  color: #0d2638;
}

.app-shell .user-chip {
  background: #fff;
  box-shadow: 0 8px 20px rgba(16, 47, 70, 0.07);
}

.app-shell .panel,
.app-shell .metric-grid article {
  border-color: #dce6ee;
  box-shadow: 0 16px 38px rgba(16, 47, 70, 0.07);
}

.dashboard-command {
  background:
    linear-gradient(120deg, rgba(11, 44, 68, 0.98), rgba(8, 73, 137, 0.9)),
    radial-gradient(circle at 78% 12%, rgba(246, 198, 91, 0.23), transparent 30%),
    radial-gradient(circle at 12% 88%, rgba(15, 118, 110, 0.3), transparent 26%),
    #102f46;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  min-height: 19rem;
}

.dashboard-command::after {
  background: linear-gradient(90deg, rgba(246, 198, 91, 0.9), rgba(15, 118, 110, 0.9), rgba(46, 98, 163, 0.9));
  bottom: 0;
  content: "";
  height: 4px;
  left: 0;
  position: absolute;
  width: 100%;
}

.dashboard-copy h2 {
  max-width: 45rem;
}

.dashboard-identity {
  backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.dashboard-metrics .metric-card {
  border-radius: 10px;
  min-height: 8.8rem;
  padding: 1.15rem;
}

.dashboard-metrics .metric-card::after {
  background: #f0f6fb;
  border-radius: 999px;
  content: "";
  height: 4.5rem;
  position: absolute;
  right: -1.4rem;
  top: -1.8rem;
  width: 4.5rem;
}

.dashboard-metrics span {
  letter-spacing: 0;
  position: relative;
  z-index: 1;
}

.dashboard-metrics p,
.dashboard-metrics small {
  position: relative;
  z-index: 1;
}

.dashboard-grid {
  align-items: stretch;
}

.dashboard-grid .panel {
  border-radius: 10px;
}

.dashboard-focus,
.dashboard-finance {
  min-height: 20rem;
}

.dashboard-focus .button {
  justify-self: center;
}

.progress-ring {
  box-shadow: inset 0 0 0 1px #dce6ee, 0 16px 30px rgba(16, 47, 70, 0.08);
}

.finance-bars > div {
  background: #fff;
}

.mini-actions a {
  background: #eef6f6;
  border-radius: 999px;
  padding: 0.45rem 0.65rem;
}

.record-list a,
.record-list > div,
.empty-state {
  background: #fff;
  border-color: #dce6ee;
}

.elevated-actions {
  background:
    linear-gradient(180deg, #fff, #fbfdff);
  border-left: 0;
  border-top: 4px solid var(--gold);
  border-radius: 10px;
}

.hero-panel h2 {
  color: var(--deep);
  font-size: 1.45rem;
}

.hero-panel p,
.hero-panel .eyebrow {
  color: var(--muted);
}

.hero-panel .eyebrow {
  color: var(--teal);
}

.metric-grid article {
  border-top: 4px solid var(--blue);
  min-height: 7.25rem;
  padding: 1.1rem;
}

.metric-grid article:nth-child(2n) {
  border-top-color: var(--teal);
}

.metric-grid article:nth-child(3n) {
  border-top-color: var(--gold);
}

.metric-grid article:nth-child(4n) {
  border-top-color: var(--green);
}

.metric-grid span {
  font-size: 1.55rem;
}

.metric-grid p {
  font-size: 0.82rem;
  font-weight: 650;
}

.button {
  align-items: center;
  border-radius: 7px;
  min-height: 2.55rem;
}

.button:hover {
  filter: brightness(0.96);
}

.panel h2,
.form-grid h2 {
  color: var(--deep);
}

.section-heading {
  align-items: flex-start;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin: -0.2rem 0 1rem;
  padding-bottom: 0.9rem;
}

.section-heading h2 {
  margin: 0.15rem 0 0;
}

.section-heading > span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.quick-actions-panel .action-row {
  gap: 0.7rem;
}

.system-notice {
  border-left: 5px solid var(--danger);
  margin: 2rem auto;
  max-width: 48rem;
}

.system-notice h2 {
  margin: 0.2rem 0 1rem;
}

.form-grid h2 {
  background: #f7f9fb;
  border: 1px solid var(--line);
  border-radius: 7px;
  margin: 0.45rem 0 0;
  padding: 0.8rem 0.9rem;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(46, 98, 163, 0.11);
  outline: 0;
}

.table-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
}

th {
  background: #eef3f6;
  color: var(--deep);
  position: sticky;
  top: 0;
}

tbody tr:hover td {
  background: #f8fafb;
}

.id-card-page {
  display: contents;
}

@media (max-width: 980px) {
  .login-shell {
    grid-template-columns: 1fr;
  }

  .login-brand-panel,
  .login-form-panel {
    border-radius: 18px;
  }

  .login-brand-panel {
    border-right: 1px solid rgba(255, 255, 255, 0.2);
  }

  .sidebar {
    box-shadow: 12px 0 30px rgba(16, 47, 70, 0.2);
    height: 100vh;
    left: -18.5rem;
    position: fixed;
    transition: left 0.2s ease;
    width: 17.5rem;
  }

  .app-main {
    margin-left: 0;
  }

  .menu-button {
    display: inline-flex;
    align-items: center;
  }

  .nav-open .sidebar {
    left: 0;
  }

  .sidebar-scrim {
    background: rgba(16, 34, 48, 0.52);
    inset: 0;
    position: fixed;
    z-index: 35;
  }

  .nav-open .sidebar-scrim {
    display: block;
  }

  .metric-grid,
  .split,
  .detail-grid {
    grid-template-columns: 1fr 1fr;
  }

  .dashboard-command {
    grid-template-columns: 1fr;
  }

  .dashboard-identity {
    align-items: center;
    grid-template-columns: auto 1fr;
    justify-items: start;
    text-align: left;
  }

  .dashboard-identity img {
    height: 5rem;
    margin: 0;
    width: 5rem;
  }

  .dashboard-grid {
    grid-template-columns: 1fr 1fr;
  }

  .dashboard-focus,
  .dashboard-finance {
    grid-column: span 1;
  }

  .member-profile-hero {
    align-items: flex-start;
    grid-template-columns: auto minmax(0, 1fr);
  }

  .profile-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .member-detail-grid,
  .renewal-review .compact-record .member-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .member-detail-grid > div:nth-child(4n),
  .renewal-review .compact-record .member-detail-grid > div:nth-child(3n) {
    border-right: 1px solid var(--line);
  }

  .member-detail-grid > div:nth-child(2n),
  .renewal-review .compact-record .member-detail-grid > div:nth-child(2n) {
    border-right: 0;
  }

  .renewal-workspace {
    grid-template-columns: 1fr;
  }

  .renewal-sidebar {
    position: static;
  }

  .users-workspace,
  .generated-credential-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .login-page {
    align-items: stretch;
    padding: 0;
  }

  .login-shell {
    min-height: 100vh;
  }

  .login-brand-panel {
    border-radius: 0;
    min-height: 19rem;
  }

  .login-form-panel {
    border-radius: 0;
    box-shadow: none;
  }

  .topbar {
    align-items: center;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.7rem;
    padding: 0.85rem 1rem;
  }

  .topbar .user-chip {
    display: flex;
    grid-column: 1 / -1;
    justify-content: space-between;
    overflow-x: auto;
    width: 100%;
  }

  .topbar .user-chip span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .topbar h1 {
    font-size: 1.18rem;
  }

  .app-main {
    padding: 0.75rem;
  }

  .topbar {
    border-radius: 8px;
    margin: 0 0 0.9rem;
    position: static;
  }

  .metric-grid,
  .split,
  .detail-grid,
  .dashboard-grid,
  .form-grid,
  .checkbox-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-command {
    border-radius: 8px;
    min-height: auto;
    padding: 1.05rem;
  }

  .dashboard-copy h2 {
    font-size: 1.75rem;
    line-height: 1.08;
  }

  .dashboard-copy p:not(.eyebrow) {
    font-size: 0.92rem;
  }

  .dashboard-hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-hero-actions .button,
  .action-row .button,
  .form-actions .button {
    width: 100%;
  }

  .dashboard-identity {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .dashboard-metrics .metric-card,
  .metric-grid article {
    min-height: auto;
    padding: 0.95rem;
  }

  .dashboard-metrics span,
  .metric-grid span {
    font-size: 1.35rem;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.35rem;
  }

  .member-profile-hero {
    grid-template-columns: 1fr;
  }

  .member-profile-hero .member-avatar {
    height: 3.8rem;
    width: 3.8rem;
  }

  .profile-actions,
  .profile-actions .button {
    width: 100%;
  }

  .member-detail-grid,
  .renewal-review .compact-record .member-detail-grid {
    grid-template-columns: 1fr;
  }

  .member-detail-grid > div,
  .member-detail-grid > div:nth-child(2n),
  .member-detail-grid > div:nth-child(4n),
  .renewal-review .compact-record .member-detail-grid > div,
  .renewal-review .compact-record .member-detail-grid > div:nth-child(2n),
  .renewal-review .compact-record .member-detail-grid > div:nth-child(3n) {
    border-right: 0;
  }

  .span-2 {
    grid-column: auto;
  }

  .panel {
    padding: 0.95rem;
  }

  input,
  select,
  textarea {
    font-size: 16px;
  }

  .toolbar {
    align-items: stretch;
    flex-direction: column;
    margin: -0.95rem -0.95rem 0.95rem;
    padding: 0.95rem;
  }

  .toolbar input,
  .toolbar .button {
    max-width: none;
    width: 100%;
  }

  .table-wrap {
    border-radius: 8px;
    margin-left: -0.25rem;
    margin-right: -0.25rem;
    max-width: calc(100vw - 1rem);
  }

  table {
    min-width: 680px;
  }

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

  .form-intro,
  .id-card-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .mission-id {
    transform: scale(0.9);
    transform-origin: top center;
    margin-bottom: -54px;
  }
}

@media print {
  @page {
    margin: 0;
    size: 53.98mm 85.60mm;
  }

  html,
  body {
    background: #fff;
    margin: 0 !important;
    min-height: 0;
    padding: 0 !important;
    width: 53.98mm !important;
  }

  body {
    display: block;
  }

  .sidebar,
  .topbar,
  .alert,
  .sidebar-scrim,
  .no-print {
    display: none !important;
  }

  .app-main {
    margin: 0;
    padding: 0;
    width: 53.98mm !important;
  }

  .id-card-sheet {
    display: block;
    padding: 0;
    width: 53.98mm !important;
  }

  .id-card-page {
    break-after: page;
    display: block;
    height: 85.60mm;
    overflow: hidden;
    page-break-after: always;
    position: relative;
    width: 53.98mm;
  }

  .id-card-page:last-child {
    break-after: auto;
    page-break-after: auto;
  }

  .mission-id {
    border: 0;
    border-radius: 2.8mm;
    box-shadow: none;
    height: 85.60mm;
    left: 0;
    margin: 0;
    padding: 3.5mm 4.7mm;
    position: relative;
    print-color-adjust: exact;
    top: 0;
    transform: none !important;
    transform-origin: top left;
    width: 53.98mm;
    -webkit-print-color-adjust: exact;
  }

  .mission-id::before,
  .mission-id::after {
    height: 27mm;
    top: -14.6mm;
    width: 65mm;
  }

  .mission-id::before {
    left: -39.8mm;
  }

  .mission-id::after {
    right: -39.8mm;
  }

  .card-slot {
    height: 2.05mm;
    margin-bottom: 1.25mm;
    width: 12.4mm;
  }

  .card-logo {
    height: 9.85mm;
    margin-bottom: 0.5mm;
    width: 9.85mm;
  }

  .card-logo.small {
    height: 7.1mm;
    width: 7.1mm;
  }

  .mission-id > h2 {
    font-size: 11pt;
    margin-bottom: 1.25mm;
  }

  .mission-id-back > h2 {
    font-size: 8.3pt;
    margin-bottom: 0.8mm;
  }

  .card-program {
    font-size: 10.5pt;
    margin-bottom: 2.2mm;
    padding: 1mm 2mm;
  }

  .card-program.compact {
    font-size: 7.8pt;
    margin-bottom: 1.25mm;
    padding: 0.65mm 1.6mm;
  }

  .card-watermark {
    right: -4.8mm;
    top: 29.3mm;
  }

  .card-watermark img {
    height: 41.2mm;
    width: 41.2mm;
  }

  .card-person {
    gap: 2.4mm;
    grid-template-columns: 15.85mm 1fr;
    margin-bottom: 1.9mm;
  }

  .card-photo {
    border-width: 0.48mm;
    border-radius: 2mm;
    box-shadow: 0 0 0 0.32mm var(--card-blue), 0 1mm 2mm rgba(7, 48, 138, 0.2);
    height: 20mm;
    width: 15.85mm;
  }

  .card-photo.logo-panel img {
    padding: 2mm;
  }

  .card-name strong {
    font-size: 13pt;
  }

  .card-name span {
    font-size: 6.6pt;
    margin-top: 1.6mm;
    padding-top: 1.1mm;
  }

  .card-details > div {
    gap: 1.6mm;
    grid-template-columns: 15.5mm 1fr;
    padding: 0.8mm 0;
  }

  .card-details dt,
  .card-back-footer dt {
    font-size: 6pt;
  }

  .card-details dd,
  .card-back-footer dd {
    font-size: 6pt;
  }

  .card-signature {
    bottom: 10.1mm;
    width: 32.5mm;
  }

  .card-signature strong {
    font-size: 6pt;
    max-height: 3.65mm;
  }

  .card-signature .signature-line {
    height: 0.5mm;
    margin: 0.15mm 0 0.5mm;
  }

  .card-signature small {
    font-size: 4.8pt;
    margin-top: 0.5mm;
  }

  .card-wave-bottom {
    height: 9.2mm;
  }

  .card-copy h3 {
    font-size: 6.6pt;
    margin: 1.25mm auto 0.8mm;
    padding: 0.65mm 1.6mm;
  }

  .card-copy p {
    font-size: 6.6pt;
    line-height: 1.22;
    margin-bottom: 1.1mm;
    max-width: 39.6mm;
  }

  .card-copy ul {
    font-size: 5.9pt;
    gap: 0.65mm;
  }

  .card-copy li::before {
    margin-right: 1.1mm;
  }

  .card-copy .verse {
    font-size: 5.35pt;
  }

  .card-back-footer {
    bottom: 9.35mm;
    gap: 1.9mm;
    grid-template-columns: 14mm 1fr;
    left: 4.4mm;
    right: 4.4mm;
  }

  .card-back-footer dl > div {
    gap: 0.95mm;
    grid-template-columns: 11.1mm 1fr;
    padding: 0.78mm 0;
  }

  .card-verify {
    border-width: 0.32mm;
    border-radius: 1.4mm;
    height: 15.2mm;
    padding: 0.6mm;
  }

  .card-verify img {
    height: 9.8mm;
    margin-bottom: 0.15mm;
    width: 9.8mm;
  }

  .card-verify strong,
  .card-verify small {
    font-size: 3.6pt;
  }

  .mission-id-back footer {
    font-size: 7.2pt;
    height: 7.6mm;
  }
}
