:root {
    color-scheme: light;
    --bg: #f2f5f7;
    --surface: #ffffff;
    --ink: #172033;
    --muted: #68768a;
    --line: #dce3ea;
    --primary: #126b59;
    --primary-strong: #0b5043;
    --primary-soft: #e8f4f0;
    --accent: #a97013;
    --accent-soft: #fbf3e2;
    --blue: #3267a8;
    --blue-soft: #eaf1f9;
    --rose: #a94848;
    --rose-soft: #f8ebeb;
    --danger: #b42318;
    --warning: #a15c07;
    --success: #166534;
    --shadow: 0 10px 28px rgba(23, 32, 51, 0.07);
    --shadow-soft: 0 3px 12px rgba(23, 32, 51, 0.05);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100%;
    background: var(--bg);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 15px;
    line-height: 1.5;
}

.lucide {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

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

h1 {
    margin-bottom: 4px;
    font-size: 30px;
    line-height: 1.2;
}

h2 {
    margin-bottom: 18px;
    font-size: 18px;
    line-height: 1.3;
}

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

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

th {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

tr:last-child td {
    border-bottom: 0;
}

input,
select,
textarea {
    width: 100%;
    margin-top: 6px;
    border: 1px solid #cbd5df;
    border-radius: 6px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    padding: 10px 11px;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

input:focus,
select:focus,
textarea:focus {
    outline: 0;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(18, 107, 89, 0.12);
}

textarea {
    resize: vertical;
}

label {
    display: block;
    color: #334155;
    font-size: 13px;
    font-weight: 700;
}

.shell {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 26px;
    border-right: 1px solid var(--line);
    background: #ffffff;
    padding: 24px 18px 18px;
    box-shadow: 8px 0 24px rgba(23, 32, 51, 0.025);
}

.brand {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    color: var(--ink);
}

.brand:hover {
    text-decoration: none;
}

.brand-mark {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border-radius: 8px;
    background: #e8f3f0;
    color: var(--primary);
    font-weight: 800;
}

.brand-logo {
    display: block;
    width: 54px;
    height: 54px;
    object-fit: contain;
}

.brand strong,
.brand small {
    display: block;
    overflow-wrap: anywhere;
}

.brand small {
    color: var(--muted);
    font-size: 12px;
}

.nav {
    display: grid;
    gap: 5px;
}

.nav a {
    display: flex;
    min-height: 44px;
    gap: 11px;
    align-items: center;
    border-radius: 6px;
    color: #435064;
    font-weight: 700;
    padding: 10px 13px;
    transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.nav a:hover,
.nav a.active {
    background: var(--primary-soft);
    color: var(--primary-strong);
    text-decoration: none;
}

.nav a:hover {
    transform: translateX(2px);
}

.nav a.active {
    box-shadow: inset 3px 0 0 var(--primary);
}

.sidebar-footer {
    display: grid;
    gap: 11px;
    margin-top: auto;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 13px;
    padding-top: 16px;
}

.sidebar-user {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
}

.sidebar-user > span:last-child,
.sidebar-user strong,
.sidebar-user small {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-user strong {
    color: var(--ink);
    font-weight: 700;
}

.sidebar-user small {
    color: var(--muted);
    font-size: 11px;
}

.user-avatar {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 1px solid #cce1da;
    border-radius: 50%;
    background: var(--primary-soft);
    color: var(--primary);
}

.sidebar-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.sidebar-links a {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    color: #58677a;
    font-size: 12px;
}

.sidebar-links .lucide {
    width: 14px;
    height: 14px;
}

.content {
    min-width: 0;
    padding: 32px;
}

.page-heading {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 24px;
}

.page-eyebrow {
    display: flex;
    gap: 7px;
    align-items: center;
    margin-bottom: 7px !important;
    color: var(--accent) !important;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.page-eyebrow .lucide {
    width: 15px;
    height: 15px;
}

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

.actions,
.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.button,
button {
    display: inline-flex;
    min-height: 41px;
    align-items: center;
    justify-content: center;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
    color: var(--ink);
    cursor: pointer;
    font: inherit;
    font-weight: 800;
    padding: 9px 14px;
    text-align: center;
    gap: 8px;
    transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.button:hover,
button:hover {
    text-decoration: none;
    border-color: #94a3b8;
    box-shadow: var(--shadow-soft);
    transform: translateY(-1px);
}

.button.primary,
button.primary {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
}

.button.primary:hover,
button.primary:hover {
    background: var(--primary-strong);
    border-color: var(--primary-strong);
}

.button.ghost {
    background: transparent;
}

.link-button {
    min-height: auto;
    border: 0;
    background: transparent;
    color: var(--primary);
    padding: 0;
}

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

.panel {
    padding: 20px;
    overflow: auto;
}

.panel-heading {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    margin-bottom: 12px;
}

.panel-heading h2 {
    margin-bottom: 0;
}

.panel-title {
    display: flex;
    gap: 11px;
    align-items: center;
}

.panel-title h2,
.panel-title p {
    margin-bottom: 0;
}

.panel-title p {
    margin-top: 2px;
    color: var(--muted);
    font-size: 12px;
}

.panel-icon {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 7px;
    background: var(--primary-soft);
    color: var(--primary);
}

.panel-icon.gold {
    background: var(--accent-soft);
    color: var(--accent);
}

.panel-link {
    display: inline-flex;
    gap: 3px;
    align-items: center;
    font-size: 13px;
    font-weight: 800;
}

.panel-link .lucide {
    width: 15px;
    height: 15px;
}

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

.grid.two {
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
}

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

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.stat {
    position: relative;
    overflow: hidden;
    padding: 18px;
}

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

.stat-gold::before {
    background: var(--accent);
}

.stat-blue::before {
    background: var(--blue);
}

.stat-red::before {
    background: var(--rose);
}

.stat-heading {
    display: flex;
    gap: 9px;
    align-items: center;
}

.stat-icon {
    display: grid !important;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 7px;
    background: var(--primary-soft);
    color: var(--primary) !important;
}

.stat-gold .stat-icon {
    background: var(--accent-soft);
    color: var(--accent) !important;
}

.stat-blue .stat-icon {
    background: var(--blue-soft);
    color: var(--blue) !important;
}

.stat-red .stat-icon {
    background: var(--rose-soft);
    color: var(--rose) !important;
}

.stat-icon .lucide {
    width: 17px;
    height: 17px;
}

.stat span {
    display: block;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.stat strong {
    display: block;
    margin-top: 8px;
    overflow-wrap: anywhere;
    font-size: 24px;
    line-height: 1.2;
}

.stat small {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 11px;
}

.filters {
    display: grid;
    grid-template-columns: minmax(220px, 1.5fr) repeat(3, minmax(140px, 1fr)) auto auto auto;
    gap: 10px;
    align-items: end;
    margin-bottom: 16px;
}

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

.form-grid h2,
.form-grid .full {
    grid-column: 1 / -1;
}

.stack {
    display: grid;
    gap: 16px;
}

.narrow {
    max-width: 520px;
}

.flash {
    margin-bottom: 16px;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    background: #eff6ff;
    color: #1e3a8a;
    padding: 12px 14px;
}

.flash.success {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: var(--success);
}

.flash.error {
    border-color: #fecaca;
    background: #fef2f2;
    color: var(--danger);
}

.flash.warning {
    border-color: #fed7aa;
    background: #fff7ed;
    color: var(--warning);
}

.flash ul {
    margin-bottom: 0;
}

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

.right {
    text-align: right;
}

.row-actions {
    white-space: nowrap;
    text-align: right;
}

.details dl {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 10px 16px;
    margin: 0;
}

.details dt {
    color: var(--muted);
    font-weight: 800;
}

.details dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.empty-state {
    max-width: 620px;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    background: #fff;
    padding: 34px;
    text-align: center;
}

.dashboard-heading {
    align-items: center;
}

.dashboard-panel {
    min-height: 100%;
}

.dashboard-empty {
    display: grid;
    min-height: 220px;
    place-items: center;
    align-content: center;
    gap: 10px;
    color: var(--muted);
    text-align: center;
}

.dashboard-empty .lucide {
    width: 34px;
    height: 34px;
    color: #9aa7b7;
}

.recent-donation-list {
    display: grid;
    margin-top: 2px;
}

.recent-donation-item {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) minmax(130px, auto) 18px;
    gap: 11px;
    align-items: center;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
    padding: 12px 0;
}

.recent-donation-item:last-child {
    border-bottom: 0;
}

.recent-donation-item:hover {
    color: var(--ink);
    text-decoration: none;
}

.recent-donation-icon {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 7px;
    background: #f0f3f6;
    color: #65748a;
}

.recent-donation-icon .lucide {
    width: 16px;
    height: 16px;
}

.recent-donation-person,
.recent-donation-amount,
.recent-donation-person strong,
.recent-donation-person small,
.recent-donation-amount strong,
.recent-donation-amount small {
    display: block;
    min-width: 0;
}

.recent-donation-person strong,
.recent-donation-amount strong {
    overflow: hidden;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recent-donation-person small,
.recent-donation-amount small {
    margin-top: 2px;
    overflow: hidden;
    color: var(--muted);
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recent-donation-amount {
    text-align: right;
}

.recent-donation-arrow {
    width: 16px;
    height: 16px;
    color: #91a0b1;
}

.fund-list {
    display: grid;
    gap: 18px;
    padding-top: 8px;
}

.fund-item {
    display: grid;
    gap: 7px;
}

.fund-item > div {
    display: flex;
    gap: 12px;
    justify-content: space-between;
    align-items: baseline;
}

.fund-item strong {
    overflow: hidden;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fund-item > div span {
    color: #3a485d;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.fund-track {
    overflow: hidden;
    height: 7px;
    border-radius: 3px;
    background: #edf1f5;
}

.fund-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--primary);
}

.login-body {
    display: grid;
    min-height: 100vh;
    place-items: center;
    background: #eef2f4;
    padding: 28px;
}

.login-shell {
    display: grid;
    grid-template-columns: minmax(360px, 0.92fr) minmax(420px, 1.08fr);
    width: min(980px, 100%);
    min-height: 620px;
    overflow: hidden;
    border: 1px solid #d7e0e5;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(23, 32, 51, 0.14);
}

.login-showcase {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: #123a36;
    color: #fff;
    padding: 46px 42px 36px;
}

.login-watermark {
    position: absolute;
    z-index: -1;
    right: -27%;
    bottom: -10%;
    width: 115%;
    opacity: 0.085;
    pointer-events: none;
}

.login-showcase-content {
    max-width: 380px;
}

.login-crest {
    width: 112px;
    height: 112px;
    margin-bottom: 34px;
    object-fit: contain;
    filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.18));
}

.login-kicker {
    margin-bottom: 9px;
    color: #eacb83;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.login-showcase h1 {
    max-width: 330px;
    margin-bottom: 15px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 44px;
    line-height: 1.08;
}

.login-mission {
    max-width: 340px;
    margin-bottom: 0;
    color: #d4e5e1;
    font-size: 16px;
    line-height: 1.6;
}

.login-assurance {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    color: #bfd7d2;
    font-size: 12px;
    font-weight: 700;
}

.login-assurance .lucide {
    width: 16px;
    height: 16px;
}

.login-panel {
    display: flex;
    min-width: 0;
    flex-direction: column;
    justify-content: center;
    padding: 60px 62px;
}

.login-panel-heading {
    display: flex;
    gap: 14px;
    align-items: center;
    margin-bottom: 32px;
}

.login-heading-icon {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 8px;
    background: var(--primary-soft);
    color: var(--primary);
}

.login-panel-heading p,
.login-panel-heading h2 {
    margin-bottom: 0;
}

.login-panel-heading p {
    color: var(--accent);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.login-panel-heading h2 {
    margin-top: 2px;
    font-size: 25px;
}

.login-form {
    gap: 19px;
}

.field-label {
    display: block;
    margin-bottom: 7px;
}

.input-shell {
    position: relative;
    display: block;
}

.input-shell .lucide {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 13px;
    width: 17px;
    height: 17px;
    transform: translateY(-50%);
    color: #8794a5;
    pointer-events: none;
}

.input-shell input {
    height: 47px;
    margin-top: 0;
    padding-left: 42px;
}

.login-submit {
    width: 100%;
    min-height: 47px;
    margin-top: 3px;
    justify-content: space-between;
    padding-right: 15px;
    padding-left: 17px;
}

.login-footnote {
    margin: 28px 0 0;
    color: #8a96a6;
    font-size: 11px;
    text-align: center;
}

.settings-form {
    gap: 18px 20px;
}

.settings-section-heading {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 9px;
    border-bottom: 1px solid var(--line);
    padding: 0 0 11px;
}

.settings-section-heading:first-of-type {
    margin-top: 0;
}

.settings-section-heading > span {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 7px;
    background: var(--primary-soft);
    color: var(--primary);
}

.settings-section-heading h2 {
    margin-bottom: 0;
    font-size: 16px;
}

.signature-upload small {
    display: block;
    margin-top: 7px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 500;
}

.file-input-shell {
    position: relative;
    display: flex;
    min-height: 44px;
    gap: 9px;
    align-items: center;
    margin-top: 6px;
    overflow: hidden;
    border: 1px dashed #aebbc9;
    border-radius: 6px;
    background: #f8fafc;
    color: #435064;
    padding: 10px 12px;
}

.file-input-shell:hover {
    border-color: var(--primary);
    background: var(--primary-soft);
}

.file-input-shell input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
    opacity: 0;
}

.signature-preview {
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #f8fafc;
    padding: 14px;
}

.signature-preview-heading {
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-bottom: 10px;
    color: #435064;
    font-size: 12px;
    font-weight: 800;
}

.signature-preview-heading strong {
    color: var(--success);
    font-size: 11px;
}

.signature-preview-canvas,
.signature-preview-empty {
    display: grid;
    min-height: 110px;
    place-items: center;
    border: 1px solid #e0e6ec;
    border-radius: 6px;
    background-color: #fff;
    background-image: linear-gradient(45deg, #f2f4f7 25%, transparent 25%), linear-gradient(-45deg, #f2f4f7 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #f2f4f7 75%), linear-gradient(-45deg, transparent 75%, #f2f4f7 75%);
    background-position: 0 0, 0 6px, 6px -6px, -6px 0;
    background-size: 12px 12px;
}

.signature-preview-canvas img {
    max-width: min(420px, 90%);
    max-height: 95px;
    object-fit: contain;
}

.signature-preview-empty {
    align-content: center;
    gap: 7px;
    color: #8794a5;
    font-size: 12px;
}

.signature-preview-empty .lucide {
    width: 28px;
    height: 28px;
}

.checkbox-row {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    margin-top: 11px;
    color: var(--danger);
}

.checkbox-row input {
    width: 16px;
    height: 16px;
    margin: 0;
}

.checkbox-row span {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    font-size: 12px;
}

.checkbox-row .lucide {
    width: 14px;
    height: 14px;
}

.inline-form {
    margin: 0;
}

.receipt {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    max-width: 900px;
    margin: 0 auto 40px;
    border: 1px solid #c8d1dc;
    border-radius: 8px;
    background: #fff;
    color: #111827;
    box-shadow: var(--shadow);
}

.receipt::before {
    position: absolute;
    z-index: 0;
    inset: 10px;
    border: 1px solid #d8b25c;
    content: "";
    pointer-events: none;
}

.receipt-watermark {
    position: absolute;
    z-index: 0;
    top: 50%;
    left: 50%;
    width: 58%;
    max-width: 500px;
    transform: translate(-50%, -45%);
    opacity: 0.045;
    pointer-events: none;
    user-select: none;
}

.receipt-content {
    position: relative;
    z-index: 1;
    padding: 36px 40px 32px;
}

.receipt-header {
    display: flex;
    justify-content: space-between;
    gap: 28px;
    align-items: flex-start;
    border-bottom: 2px solid #12243a;
    padding-bottom: 18px;
}

.receipt-identity {
    display: grid;
    grid-template-columns: 94px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    min-width: 0;
}

.receipt-logo {
    width: 94px;
    height: 94px;
    object-fit: contain;
}

.receipt-header h1 {
    margin-bottom: 5px;
    color: #12243a;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 30px;
    letter-spacing: 0;
}

.receipt-header p {
    margin-bottom: 2px;
    color: #4b5563;
    font-size: 12px;
}

.receipt-header .receipt-eyebrow {
    margin-bottom: 3px;
    color: #a56f10;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.receipt-meta {
    display: grid;
    align-content: start;
    gap: 3px;
    min-width: 220px;
    text-align: right;
}

.receipt-meta strong {
    color: #12243a;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 21px;
}

.receipt-meta > span {
    color: #a56f10;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.receipt-meta dl {
    display: grid;
    gap: 3px;
    margin: 6px 0 0;
}

.receipt-meta dl div {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.receipt-meta dt,
.receipt-meta dd {
    margin: 0;
    font-size: 12px;
}

.receipt-meta dt {
    color: #64748b;
}

.receipt-meta dd {
    font-weight: 800;
}

.receipt-tax-banner {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    margin-top: 18px;
    border-top: 1px solid #badbd0;
    border-bottom: 1px solid #badbd0;
    background: #edf8f4;
    padding: 11px 14px;
}

.receipt-tax-mark {
    border-right: 1px solid #9dcbbd;
    color: #0d5d4d;
    font-size: 23px;
    font-weight: 900;
    line-height: 1;
}

.receipt-tax-banner strong {
    color: #0b493e;
    font-size: 14px;
}

.receipt-tax-banner p {
    margin: 1px 0 0;
    color: #41635d;
    font-size: 10px;
    line-height: 1.35;
}

.receipt-box {
    margin-top: 20px;
    border-left: 3px solid #d8b25c;
    background: rgba(248, 250, 252, 0.84);
    padding: 15px 17px;
}

.receipt-box p {
    margin-bottom: 3px;
    color: #475569;
    font-size: 12px;
}

.receipt-box h2 {
    margin-bottom: 5px;
    color: #12243a;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 23px;
}

.receipt-box .receipt-section-label {
    color: #8b651e;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.receipt-donor-details {
    display: flex;
    flex-wrap: wrap;
    gap: 5px 20px;
    margin-top: 7px;
    color: #334155;
    font-size: 11px;
}

.receipt-donor-details span {
    display: inline-flex;
    gap: 6px;
}

.receipt-donor-details b {
    color: #64748b;
    font-size: 9px;
    text-transform: uppercase;
}

.receipt-amount {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2px 20px;
    align-items: end;
    margin: 18px 0 8px;
    border-top: 1px solid #cbd5e1;
    border-bottom: 1px solid #cbd5e1;
    background: rgba(255, 252, 245, 0.92);
    padding: 13px 16px;
}

.receipt-amount span {
    color: #8b651e;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.receipt-amount strong {
    grid-row: 1 / 3;
    grid-column: 2;
    color: #12243a;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 30px;
    line-height: 1.1;
}

.receipt-amount em {
    color: #475569;
    font-size: 11px;
    font-style: normal;
}

.receipt-table {
    font-size: 11px;
}

.receipt-table th,
.receipt-table td {
    padding: 7px 9px;
}

.receipt-table th {
    width: 180px;
    color: #374151;
    font-size: 9px;
    text-transform: none;
}

.receipt-compliance {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 17px;
    border: 1px solid #cbd5e1;
    background: rgba(248, 250, 252, 0.9);
}

.receipt-compliance div {
    min-width: 0;
    padding: 9px 11px;
}

.receipt-compliance div + div {
    border-left: 1px solid #cbd5e1;
}

.receipt-compliance span,
.receipt-compliance strong {
    display: block;
    overflow-wrap: anywhere;
}

.receipt-compliance span {
    color: #64748b;
    font-size: 8px;
    font-weight: 800;
    text-transform: uppercase;
}

.receipt-compliance strong {
    margin-top: 2px;
    color: #12243a;
    font-size: 10px;
}

.receipt-legal-note {
    margin-top: 13px;
    border-left: 2px solid #94a3b8;
    padding-left: 11px;
}

.receipt-legal-note strong {
    color: #334155;
    font-size: 9px;
    text-transform: uppercase;
}

.receipt-legal-note p {
    margin: 2px 0 0;
    color: #64748b;
    font-size: 8.5px;
    line-height: 1.45;
}

.receipt-footer {
    display: flex;
    justify-content: space-between;
    gap: 28px;
    align-items: end;
    margin-top: 22px;
    border-top: 1px solid #e2e8f0;
    padding-top: 15px;
}

.receipt-thanks {
    max-width: 470px;
}

.receipt-thanks strong {
    color: #8b651e;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 14px;
}

.receipt-thanks p {
    margin: 3px 0 0;
    color: #64748b;
    font-size: 10px;
}

.signature {
    position: relative;
    min-width: 220px;
    padding-top: 38px;
    text-align: center;
}

.receipt-signature-image {
    position: absolute;
    top: 0;
    left: 50%;
    display: block;
    max-width: 185px;
    height: 38px;
    transform: translateX(-50%);
    object-fit: contain;
}

.signature span {
    display: block;
    height: 0;
    border-bottom: 1px solid #111827;
    margin-bottom: 5px;
}

.signature small,
.signature strong {
    display: block;
}

.signature small {
    color: #64748b;
    font-size: 8px;
}

.signature strong {
    font-size: 10px;
}

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

    .sidebar {
        position: static;
        height: auto;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

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

    .sidebar-footer {
        grid-template-columns: minmax(180px, 1fr) auto;
        align-items: center;
        margin-top: 0;
    }

    .sidebar-links {
        display: flex;
        gap: 14px;
    }

    .grid.two,
    .grid.three,
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

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

@media (max-width: 840px) {
    .login-body {
        place-items: start center;
        padding: 18px;
    }

    .login-shell {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .login-showcase {
        min-height: 280px;
        padding: 28px;
    }

    .login-watermark {
        right: -10%;
        bottom: -45%;
        width: 62%;
    }

    .login-crest {
        width: 78px;
        height: 78px;
        margin-bottom: 18px;
    }

    .login-showcase h1 {
        max-width: none;
        font-size: 34px;
    }

    .login-mission {
        font-size: 14px;
    }

    .login-panel {
        padding: 36px;
    }
}

@media (max-width: 700px) {
    body {
        font-size: 14px;
    }

    .content {
        padding: 18px;
    }

    .sidebar {
        gap: 18px;
        padding: 18px;
    }

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

    .nav a {
        min-height: 58px;
        flex-direction: column;
        gap: 4px;
        justify-content: center;
        font-size: 11px;
        padding: 7px;
        text-align: center;
    }

    .nav a:hover {
        transform: none;
    }

    .sidebar-footer {
        grid-template-columns: 1fr;
    }

    .sidebar-links {
        justify-content: flex-start;
    }

    .page-heading,
    .receipt-header,
    .receipt-footer {
        display: grid;
    }

    .actions,
    .form-actions {
        width: 100%;
    }

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

    .grid.two,
    .grid.three,
    .stats-grid,
    .filters,
    .form-grid {
        grid-template-columns: 1fr;
    }

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

    .panel-heading {
        align-items: flex-start;
    }

    .panel-title p {
        display: none;
    }

    .recent-donation-item {
        grid-template-columns: 34px minmax(0, 1fr) 16px;
        gap: 9px;
    }

    .recent-donation-icon {
        grid-row: 1 / 3;
    }

    .recent-donation-person {
        grid-column: 2;
    }

    .recent-donation-amount {
        grid-row: 2;
        grid-column: 2;
        display: flex;
        gap: 8px;
        align-items: baseline;
        text-align: left;
    }

    .recent-donation-amount small {
        min-width: 0;
    }

    .recent-donation-arrow {
        grid-row: 1 / 3;
        grid-column: 3;
    }

    .login-body {
        padding: 0;
    }

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

    .login-showcase {
        min-height: 250px;
        padding: 24px;
    }

    .login-showcase h1 {
        font-size: 30px;
    }

    .login-assurance {
        margin-top: 20px;
    }

    .login-panel {
        padding: 30px 24px 36px;
    }

    .signature-preview-heading {
        display: grid;
        justify-content: start;
    }

    .panel {
        padding: 14px;
    }

    .details dl {
        grid-template-columns: 1fr;
    }

    .receipt {
        border-radius: 6px;
    }

    .receipt-content {
        padding: 24px;
    }

    .receipt-meta {
        text-align: left;
    }

    .receipt-identity {
        grid-template-columns: 72px minmax(0, 1fr);
    }

    .receipt-logo {
        width: 72px;
        height: 72px;
    }

    .receipt-meta dl div {
        justify-content: flex-start;
    }

    .receipt-amount {
        grid-template-columns: 1fr;
    }

    .receipt-amount strong {
        grid-row: auto;
        grid-column: auto;
    }

    .receipt-compliance {
        grid-template-columns: 1fr;
    }

    .receipt-compliance div + div {
        border-top: 1px solid #cbd5e1;
        border-left: 0;
    }
}

@media print {
    @page {
        size: A4 portrait;
        margin: 8mm;
    }

    body {
        background: #fff;
        font-size: 10pt;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .sidebar,
    .no-print,
    .flash {
        display: none !important;
    }

    .shell,
    .content {
        display: block;
        padding: 0;
    }

    .receipt {
        max-width: none;
        margin: 0;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .receipt::before {
        inset: 0;
    }

    .receipt-content {
        padding: 8mm 9mm 7mm;
    }

    .receipt-watermark {
        opacity: 0.04;
    }

    .receipt-header,
    .receipt-tax-banner,
    .receipt-box,
    .receipt-amount,
    .receipt-table,
    .receipt-compliance,
    .receipt-legal-note,
    .receipt-footer {
        break-inside: avoid;
    }
}
