/**
 * ===================================================================
 * MESSAGE - Main Application Stylesheet (v15.1) - Splash Tidy (Safe, Softer)
 * ===================================================================
 */

/* --- Palette Tokens (browns + pale blue) --- */
:root {
  --bg-page: #f5f8fc;           /* softer near-white with a hint of blue */
  --ink: #2f2a26;               /* primary text (deep brown/charcoal) */
  --muted: #6b6056;             /* muted brown text */
  --card: #ffffff;              /* card surface */
  --card-beige: #eadbc8;        /* soft beige for accents */
  --beige-bar: #E6D7C4;         /* MATCHED to image color */
  --accent: #8f6b4a;            /* softened warm brown for buttons */
  --accent-strong: #7a5a3e;     /* hover/darker state */
  --accent-tint: #f3ece5;       /* very light warm tint for hovers */
  --shadow-1: 0 10px 25px -8px rgba(0,0,0,0.25);
  --shadow-2: 0 18px 45px -15px rgba(0,0,0,0.35);
}

/* Global reset helpers */
*, *::before, *::after { box-sizing: border-box; }
img, video { max-width: 100%; height: auto; }

/* Height of the name bar (adjust if you want more/less gap) */
:root { --name-bar-h: 108px; }

/* Bullet-proof header layout */
.card-header { position: relative; height: 50%; }
.hero-image{
  position: absolute;
  top: var(--name-bar-h); left: 0; right: 0; bottom: 0;
  background: url('../suijuris.jpg') center top / cover no-repeat;
}

/* 1. Register the font */
@font-face {
  font-family: 'MyTypewriter';
  src: url('../fonts/typewriter.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}
/* Name bar — revert to system font (inherit), bold, large */
.name{
  position: absolute; top: 0; left: 0; width: 100%;
  height: var(--name-bar-h);
  display: flex; align-items: center; /* balanced top/bottom */
  padding: 0 40px;
  background: var(--beige-bar);
  margin: 0;

 font-family: 'MyTypewriter', serif; /* Fallback to serif if font fails */
/*  font-family: 'Besley', serif;*/
  font-size: 3rem;        /* big and clear */
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: 0;      /* no tight tracking */
}

/* Proper superscript “by:” */
.name sup{
  position: relative;
  top: -0.55em;           /* lift it like a true superscript */
  font-size: 0.55em;
  font-weight: 400;
  margin-right: 10px;
  letter-spacing: 0.5px;
}

/* Prevent sideways scroll on narrow screens */
html, body { overflow-x: hidden; }

/* Mobile: scale cleanly, keep spacing comfy */
@media (max-width: 600px) {
  :root { --name-bar-h: 82px; }
  .business-card{
    width: 100%;
    max-width: 100%;
    aspect-ratio: auto;
    height: auto;
    margin: 0 auto;
    border-radius: 10px;
  }
  .card-header{ height: var(--mobile-header-h, 44vh); }
  .name{
    font-size: clamp(1.8rem, 7vw, 2.3rem);
    padding: 0 20px;
  }
  .name sup{
    top: -0.6em;
    font-size: 0.58em;
  }
}


/* --- Global & Typography (SAFE: no body flex/centering) --- */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-page);
  color: var(--ink);
  margin: 0;
  line-height: 1.6;
  padding: 20px;
}

/* --- Business Card (Splash) --- */
.business-card {
  width: min(100%, 900px);
  aspect-ratio: 210 / 148;              /* A5 vibe, responsive */
  background-color: var(--card);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: var(--shadow-2), var(--shadow-1);
  margin: 40px auto;                    /* SAFE: center horizontally only */
}


.card-body {
  padding: 22px 40px;
  flex-grow: 1;
  display: flex;
  justify-content: center;
  align-items: center; /* SAFE: only within the card */
}

/* Links / CTA on splash */
.links-container { width: auto; }

/* Keep your global .link-item (below) for the app, but style the splash button via .link-button */
.link-button {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--card); /* text becomes light on accent bg */
  background-color: var(--accent);
  border: 1px solid rgba(0,0,0,0.04);
  padding: 12px 18px;
  border-radius: 10px;
  transition: transform 0.04s ease, background-color 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 6px 18px rgba(90, 59, 40, 0.18);
}
/* Envelope button text colour matches name bar */
.link-button {
  background-color: var(--beige-bar);
  color: var(--ink); /* dark text on beige background */
}

.link-button:hover {
  background-color: var(--accent-strong);
  color: var(--card); /* white text on hover */
}

.link-button:active { transform: translateY(0); }

.link-icon { width: 28px; height: 28px; display: grid; place-items: center; }
/* SVGs on the splash button inherit the link color via currentColor */
.business-card .link-icon svg { display: block; color: currentColor; }

.link-text {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.2px;
  font-family: 'MyTypewriter', serif; /* same as .name */
}

/* Footer */
.card-footer {
  padding: 16px 40px;
  background-color: #E6D7C4;          /* warm tint that pairs with browns */
  border-top: 1px solid rgba(0,0,0,0.06);
  font-size: 14px;
  color: var(--muted);
  text-align: center;
}

/* ===================================================================
   Rest of Application Styles (unchanged behavior)
   =================================================================== */

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background-color: #ffffff;
  border-bottom: 1px solid #e0e0e0;
  margin-bottom: 30px;
  border-radius: 8px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

.app-logo a { font-size: 1.5em; font-weight: bold; color: #2c3e50; }
.app-nav a { margin: 0 15px; font-size: 1.1em; color: #555; }
.app-nav a.active { font-weight: bold; color: #3498db; }

.app-user-actions .logout-link {
  display: inline-block;
  padding: 5px 12px;
  background-color: #e74c3c;
  color: #fff;
  border-radius: 4px;
  font-size: 0.9em;
  margin-left: 15px;
}
.app-user-actions .logout-link:hover { background-color: #c0392b; text-decoration: none; }

.form-field { margin-bottom: 20px; }
.form-field label { display: block; font-weight: bold; margin-bottom: 8px; }
.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="number"],
.form-field input[type="password"],
.form-field textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
  font-size: 1em;
}
.form-field textarea { min-height: 150px; resize: vertical; }
.field-description { font-size: 0.9em; color: #666; margin-top: 5px; }

.button, button {
  display: inline-block;
  padding: 10px 20px;
  border: none;
  background-color: #95a5a6;
  color: white;
  font-size: 1em;
  cursor: pointer;
  border-radius: 4px;
  text-align: center;
}
.button-primary, button[type="submit"] { background-color: #3498db; }
.button-primary:hover, button[type="submit"]:hover { background-color: #2980b9; }

.button-secondary,
.button-tertiary,
[data-add-file],
[data-remove-file] {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: var(--beige-bar);
  color: var(--ink);
  border: 1px solid rgba(0,0,0,0.06);
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95em;
  cursor: pointer;
  transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.05s ease;
  box-shadow: 0 6px 18px rgba(90, 59, 40, 0.12);
}

.button-secondary:hover,
.button-tertiary:hover,
[data-add-file]:hover,
[data-remove-file]:hover {
  background-color: var(--accent-strong);
  color: #fff;
  text-decoration: none;
}

.button-secondary:active,
.button-tertiary:active,
[data-add-file]:active,
[data-remove-file]:active { transform: translateY(0); }

.notice {
  padding: 15px;
  margin-bottom: 20px;
  border-radius: 4px;
  border: 1px solid transparent;
}
.notice.error { background-color: #f2dede; color: #a94442; border-color: #ebccd1; }
.notice.success { background-color: #dff0d8; color: #3c763d; border-color: #d6e9c6; }

.login-container,
.security-gate-container,
.contact-form-container,
.compose-container,
.conversation-container,
.inbox-container {
  background-color: #fff;
  padding: 30px;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  width: 100%;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
  max-width: 1200px;             /* Expanded for wider tables */
  margin: 20px auto;             /* Center within page */
}

.login-box, .security-gate-box {
  width: 100%;
  max-width: 400px;
  text-align: center;
  margin: 0 auto;
}
.security-gate-box input[type="text"] {
  text-align: center;
  font-size: 1.5em;
  letter-spacing: 5px;
}

.conversation-container .message-item {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
}
.conversation-container .message-item.latest-message { border-left: 5px solid #3498db; }
.conversation-container .message-meta {
  display: flex;
  justify-content: space-between;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px dotted #ccc;
  font-size: 0.9em;
  color: #555;
}
.conversation-container .message-subject { font-weight: bold; margin-bottom: 15px; font-size: 1.1em; }
.conversation-container .message-body { white-space: pre-wrap; }
.conversation-container .attachment-link {
  margin-top: 15px;
  padding: 10px;
  background-color: #f8f9fa;
  border-radius: 4px;
  border: 1px solid #e0e0e0;
}

.inbox-nav {
  display: flex;
  background-color: #f8f9fa;
  border-bottom: 1px solid #e0e0e0;
}
.inbox-nav a {
  padding: 15px 20px;
  color: #555;
  font-weight: bold;
}
.inbox-nav a.active,
.inbox-nav a:hover {
  color: #3498db;
  background-color: #fff;
  text-decoration: none;
}

.empty-list-message {
  padding: 40px;
  text-align: center;
  color: #777;
  font-size: 1.2em;
}

.message-item-wrapper {
  display: flex;
  border-bottom: 1px solid #e0e0e0;
}
.message-item-wrapper:last-child { border-bottom: none; }

.message-status-bar { width: 5px; align-self: stretch; flex-shrink: 0; }
.status-sm .message-status-bar { background-color: #2ecc71; }
.status-sr .message-status-bar { background-color: #95a5a6; }
.status-sa .message-status-bar { background-color: #3498db; }
.status-sx .message-status-bar { background-color: #9b59b6; }
.status-sf .message-status-bar { background-color: #7f8c8d; }
.message-item-wrapper.urgent .message-status-bar { background-color: #e74c3c; }

.message-item {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  padding: 0;
  margin: 0;
}

.message-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 20px;
  cursor: pointer;
  transition: background-color 0.2s;
}
.message-item-header:hover { background-color: #f8f9fa; }

.message-item-content { flex-grow: 1; }

.message-header .sender-name { font-weight: bold; }

.message-count-badge,
.urgent-badge {
  display: inline-block;
  color: #fff;
  font-size: 0.8em;
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 10px;
  font-weight: bold;
}
.message-count-badge { background-color: #bdc3c7; }
.urgent-badge { background-color: #e74c3c; }

.message-meta {
  border: none;
  padding: 0;
  margin: 5px 0 0 0;
  font-size: 0.9em;
  color: #777;
}
.ip-address { margin-left: 15px; }

.message-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
  align-items: center;
}
.message-actions .action-btn {
  display: inline-block;
  padding: 5px 12px;
  font-size: 0.9em;
  font-weight: normal;
  line-height: 1.5;
  text-align: center;
  vertical-align: middle;
  cursor: pointer;
  border-radius: 4px;
  border: 1px solid transparent;
  text-decoration: none;
  color: white;
}
.btn-view { background-color: #1abc9c; }
.btn-urgent { background-color: #f39c12; }
.btn-archive { background-color: #7f8c8d; }
.btn-delete { background-color: #e74c3c; }

.message-item-body {
  background-color: #f8f9fa;
  padding: 20px;
  border-top: 1px solid #e0e0e0;
}

.inline-thread-message {
  padding: 15px;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  background-color: #fff;
  margin-bottom: 10px;
}
.inline-thread-message:last-child { margin-bottom: 0; }

#form-sending-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.7);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}
.spinner-message {
  padding: 20px 40px;
  background: #2c3e50;
  color: #fff;
  border-radius: 8px;
  font-size: 1.2em;
}

/* Popup Style - Centralized and auto-dismissing */
.popup-message {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #333;
  color: #fff;
  padding: 20px;
  border-radius: 8px;
  font-size: 16px;
  text-align: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none; /* Prevent interaction while it's hidden */
  transition: opacity 0.3s ease-out;
}

/* Generic link styling used across the app (kept from v14) */
.link-item {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: #333;
}
.link-icon { width: 32px; height: 32px; margin-right: 16px; }
/* .link-text (global) already defined above for the splash; keep as-is for consistency */

/* =========================================================
   Mobile refinements (fill viewport and tighten spacing)
   ========================================================= */

/* =========================================================
   MOBILE (<=900px) — smaller name, footer always visible
   ========================================================= */
@media (max-width: 900px) {
  /* No hero on mobile */
  .business-card .card-header .hero-image { display: none !important; }

  /* Card fits the viewport; footer stays in view */
  .business-card {
    width: 100% !important;
    max-width: 100% !important;
    margin: 8px auto !important;
    border-radius: 12px !important;

    display: grid !important;
    grid-template-rows: auto 1fr auto !important;  /* header | body | footer */
    max-height: 100svh !important;                 /* mobile-safe viewport */
    max-height: 100dvh !important;                 /* fallback */
    overflow: hidden !important;
  }

  /* Header spacing */
  .business-card .card-header {
    position: relative !important;
    padding: 0 !important;
    height: auto !important;
    border-radius: 12px 12px 0 0 !important;
    overflow: hidden !important;
  }

  /* Name: reduce ~1/3 from earlier */
  .business-card .card-header .name {
    position: static !important;
    margin: 0 !important;
    padding: 12px 18px !important;
    white-space: nowrap !important;
    line-height: 1.1 !important;
    font-size: clamp(22px, 5.2vw, 34px) !important; /* was ~8vw → ~5.2vw */
  }
  .business-card .card-header .name sup {
    top: -0.6em !important;
    font-size: 0.58em !important;
  }

  /* Body centered, tighter padding so footer fits */
  .business-card .card-body {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 16px 18px !important;
  }

  /* Keep button readable but compact */
  .business-card .link-button { padding: 12px 16px !important; }
  .business-card .link-button .link-text { font-size: 16px !important; white-space: nowrap !important; }
  .business-card .link-icon { width: 22px !important; height: 22px !important; }

  /* Footer always in view with comfy padding */
  .business-card .card-footer {
    padding: 12px 18px !important;
    text-align: center !important;
  }
}
/* =========================================================
   MOBILE (<=900px): allow taller card so footer fits
   ========================================================= */
@media (max-width: 900px) {
  :root { --mobile-header-h: clamp(260px, 62vw, 360px); }

  /* Keep hero visible on small screens to maintain consistent layout */
  .business-card .card-header .hero-image { display: block !important; }

  /* Let the card grow beyond the viewport (scroll instead of clipping) */
  .business-card {
    display: grid !important;
    grid-template-rows: var(--mobile-header-h) 1fr auto !important; /* header | body | footer */
    max-height: none !important;                   /* remove viewport cap */
    overflow: visible !important;                  /* no clipping */
    margin-bottom: 24px !important;                /* breathing room below */
  }

  .business-card .card-header {
    position: relative !important;
    min-height: var(--mobile-header-h) !important;
    overflow: hidden !important;
  }

  /* Footer stays readable and not jammed at the bottom */
  .business-card .card-footer {
    position: static !important;
    padding: 14px 20px !important;
    min-height: 48px;                              /* optional, a bit taller */
  }

  /* Optional: small bottom padding so iOS safe area doesn't crowd it */
  body { padding-bottom: 12px; }
}
/* Links: inherit site palette instead of browser blue */
.business-card a,
.law-content a {
  color: var(--ink);            /* same dark text as the rest */
  text-decoration: none;
}
.business-card a:visited,
.law-content a:visited { color: var(--ink); }
.business-card a:hover,
.law-content a:hover { opacity: .85; }

/* Law page: keep content top-aligned and add a leading line of space */
.law-body {
  align-items: flex-start;
  justify-content: flex-start;
}

.law-content { width: 100%; }

.law-content .law-lead {
  margin-top: 0.9em;
}

.law-section-heading {
  margin: 1.35rem 0 0.35rem;
  font-family: Besley, Georgia, serif;
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 700;
  line-height: 1.2;
}

.law-source {
  margin: 1.5rem 0 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(0, 0, 0, 0.16);
}

.law-source h3,
.law-source h4 {
  margin: 0;
  font-family: Besley, Georgia, serif;
  line-height: 1.18;
  color: var(--ink);
}

.law-source h3 {
  font-size: clamp(23px, 3.2vw, 31px);
  margin-bottom: 0.7rem;
}

.law-source h4 {
  font-size: clamp(18px, 2.2vw, 22px);
  margin-bottom: 0.35rem;
}

.law-framework {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.28rem 0.5rem;
  margin: 0 0 1.15rem;
  font-family: Besley, Georgia, serif;
  font-weight: 700;
  font-size: clamp(16px, 2.1vw, 20px);
  line-height: 1.25;
}

.law-framework span {
  display: inline-flex;
  align-items: baseline;
}

.law-framework .law-arrow {
  color: rgba(0, 0, 0, 0.55);
  font-weight: 400;
}

.law-source-block {
  margin-top: 1rem;
}

.law-source-block p {
  margin: 0;
}

.law-branches {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem 1.2rem;
  margin: 0.25rem 0 0;
}

.law-branches div {
  min-width: 0;
}

.law-branches dt {
  font-family: Besley, Georgia, serif;
  font-size: clamp(16px, 2vw, 19px);
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 0.2rem;
}

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

.law-branches dd + dd {
  margin-top: 0.25rem;
}

@media (max-width: 760px) {
  .law-branches {
    grid-template-columns: 1fr;
  }
}

/* Law page: allow full article height (no fixed aspect ratio clipping) */
.law-page .business-card {
  aspect-ratio: auto;
  height: auto;
  max-height: none;
  overflow: visible;
}

.law-page .card-body {
  align-items: flex-start;
  justify-content: flex-start;
}

@media (min-width: 901px) {
  .law-page .card-header {
    min-height: 320px; /* ensure hero has room on desktop */
  }

  .law-page .card-header .hero-image {
    display: block;
  }

  .law-page .card-header .name {
    padding-top: 6px;
    padding-bottom: 6px;
    line-height: 1.12;
  }
}

/* Phones/tablets in landscape: show hero like desktop */
@media (max-width: 900px) and (orientation: landscape) {
  :root { --name-bar-h: clamp(56px, 9vw, 72px); } /* reasonable bar height */

  .business-card .card-header {
    position: relative !important;
    padding: 0 18px !important;
    height: min(42vh, 360px) !important;   /* room for name + hero */
  }

  .business-card .card-header .name {
    position: absolute !important;
    top: 0; left: 0; right: 0;
    height: var(--name-bar-h) !important;
    margin: 0 !important;
    white-space: nowrap !important;
  }

  /* Override the mobile rule that hides it */
  .business-card .card-header .hero-image {
    display: block !important;
    position: absolute;
    top: var(--name-bar-h); left: 0; right: 0; bottom: 0;
    background: url('../suijuris.jpg') center top / cover no-repeat;
  }
}
/* === Contact form: Back (top-centre) + branded Send (bottom) === */
.contact-form-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-form-container .form-topbar {
  text-align: center;
  margin-top: -4px; /* tuck it close to the card edge */
}

.btn-brand,
.contact-form-container button[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-decoration: none;
  font-family: 'MyTypewriter', serif;     /* match site heading/button style */
  font-weight: 600;
  letter-spacing: 0.2px;
  padding: 12px 18px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.06);
  background-color: var(--beige-bar);     /* same beige as name bar */
  color: var(--ink);                      /* dark text */
  box-shadow: 0 6px 18px rgba(90, 59, 40, 0.18);
  transition: background-color .2s ease, color .2s ease, transform .04s ease;
  cursor: pointer;
}

.btn-brand:hover,
.contact-form-container button[type="submit"]:hover {
  background-color: var(--accent-strong);
  color: var(--card);                     /* white text on hover */
}

.btn-brand:active,
.contact-form-container button[type="submit"]:active {
  transform: translateY(0);
}

/* Keep the Send button clearly at the bottom of the form block */
.contact-form-container .form-actions {
  margin-top: 16px;
  display: flex;
  justify-content: center;                /* or space-between if you add more actions */
}

/* Make all links in the form match palette (no browser blue) */
.contact-form-container a {
  color: var(--ink);
  text-decoration: none;
}
.contact-form-container a:hover { opacity: .85; }

/* Mobile polish */
@media (max-width: 600px) {
  .btn-brand,
  .contact-form-container button[type="submit"] {
    padding: 12px 16px;
    border-radius: 10px;
  }
}

/* ===================================================================
   BACS Donations (SlimBACS-inspired dark/blue theme)
   =================================================================== */
.donation-shell {
  max-width: 820px;
  margin: 30px auto;
  padding: 0 14px;
}
.donation-card.slimbacs {
  border: 1px solid #1f2a3d;
  border-radius: 12px;
  background: radial-gradient(120% 120% at 20% 20%, #111827, #0b1320);
  color: #e5e7eb;
  box-shadow: 0 18px 45px -18px rgba(0,0,0,0.5);
}
.slimbacs h2 {
  margin-top: 0;
  color: #f9fafb;
  letter-spacing: 0.01em;
}
.slimbacs p { color: #d1d5db; }
.slimbacs form { display: grid; gap: 0.9em; }
.slimbacs label {
  font-weight: 700;
  display: block;
  margin-bottom: 0.35em;
  color: #e5e7eb;
  letter-spacing: 0.01em;
}
.slimbacs input[type="text"],
.slimbacs input[type="email"],
.slimbacs input[type="number"] {
  width: 100%;
  padding: 0.65em 0.75em;
  border: 1px solid #334155;
  border-radius: 9px;
  background: #0f172a;
  color: #e5e7eb;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.slimbacs input:focus {
  outline: 2px solid #2563eb;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}
.slimbacs .slimbacs-btn {
  display: inline-block;
  padding: 0.7em 1.25em;
  border: none;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  border-radius: 9px;
  cursor: pointer;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 10px 28px rgba(37, 99, 235, 0.35);
  transition: transform 0.08s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.slimbacs .slimbacs-btn:hover {
  background: linear-gradient(135deg, #2f6df0, #2563eb);
  transform: translateY(-1px);
}
.slimbacs .slimbacs-note {
  padding: 0.8em 0.95em;
  background: #0c2746;
  border: 1px solid #1f3b63;
  border-radius: 9px;
  color: #e7f0ff;
  line-height: 1.45;
}
.slimbacs .slimbacs-error {
  padding: 0.8em 0.95em;
  background: #2a1313;
  border: 1px solid #7f1d1d;
  border-radius: 9px;
  color: #fca5a5;
  margin-bottom: 0.6em;
}
.slimbacs .slimbacs-reference {
  font-size: 1.15em;
  font-weight: 800;
  color: #fef3c7;
}
.slimbacs .slimbacs-bank {
  margin: 1em 0;
  padding: 0.95em;
  background: #111827;
  border: 1px solid #1f2937;
  border-radius: 10px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}
.slimbacs .slimbacs-fields { display: grid; gap: 0.4em; }
.slimbacs .slimbacs-field-label { font-weight: 700; color: #e5e7eb; }
.slimbacs .slimbacs-field-value { font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; color: #c7d2fe; }
.slimbacs .slimbacs-muted { color: #9ca3af; font-size: 0.95em; }
.donation-confirm-form { margin-top: 1em; }

/* Donations admin table */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  font-size: 0.95rem;
  table-layout: auto;
}
.admin-table th,
.admin-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e0e0e0;
  text-align: left;
}
.admin-table th {
  background: #f7f7f9;
  font-weight: 700;
}
.admin-table code {
  background: #f1f3f7;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
}
.admin-table td.actions-cell {
  width: 1%;
  max-width: 120px;
  white-space: nowrap;
  text-align: right;
}
.admin-table td.actions-cell form {
  display: inline-block;
  margin: 0;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}
.btn-danger {
  display: inline-block;
  padding: 6px 10px;
  background: #b9312d;
  color: #fff;
  border: 1px solid #9f2623;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.2s ease, transform 0.05s ease;
  white-space: nowrap;
  text-decoration: none;
  min-width: 68px;
}
.btn-danger:hover { background: #a12a27; }
.btn-danger:active { transform: translateY(0); }

/* ===================================================================
   Property Donations
   =================================================================== */
.property-donation-shell {
  width: min(100%, 980px);
  margin: 28px auto;
  padding: 0 14px;
}

.property-donation-card {
  background: #fff;
  border: 1px solid #d9ded7;
  border-radius: 8px;
  padding: clamp(20px, 3vw, 34px);
  box-shadow: 0 12px 28px -18px rgba(31, 41, 55, 0.45);
}

.property-donation-card h1,
.property-donation-card h2,
.property-donation-card h3 {
  margin-top: 0;
  color: #243126;
}

.property-donation-panel {
  margin: 18px 0 26px;
  padding: 18px;
  border: 1px solid #d9ded7;
  border-radius: 8px;
  background: #fbfcfa;
}

.property-donation-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.property-donation-summary div {
  min-width: 0;
  padding: 12px;
  border: 1px solid #e2e6df;
  border-radius: 6px;
  background: #fff;
}

.property-donation-summary dt {
  margin: 0 0 4px;
  color: #667064;
  font-size: 0.9rem;
  font-weight: 700;
}

.property-donation-summary dd {
  margin: 0;
  color: #243126;
  overflow-wrap: anywhere;
}

.property-donation-form {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.property-coin-selector {
  display: grid;
  gap: 10px;
}

.property-coin-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px minmax(160px, auto);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid #e2e6df;
  border-radius: 6px;
  background: #fff;
}

.property-coin-row label {
  margin: 0;
}

.property-coin-name {
  display: block;
  font-weight: 800;
  color: #243126;
}

.property-coin-unit {
  display: block;
  color: #667064;
  font-size: 0.9rem;
  line-height: 1.35;
}

.property-coin-qty {
  width: 92px;
  text-align: center;
}

.property-coin-total {
  color: #243126;
  font-weight: 700;
  text-align: right;
}

.property-running-total {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 6px;
  background: #243126;
  color: #fff;
}

.property-running-total strong {
  white-space: nowrap;
}

.property-coin-lines {
  display: grid;
  gap: 6px;
  margin: 12px 0 0;
  padding-left: 1.2rem;
}

.property-donation-address {
  margin: 18px 0;
  padding: 16px;
  border-left: 4px solid #52715b;
  background: #eef4ef;
  border-radius: 6px;
}

.property-donation-address p {
  margin: 0 0 10px;
}

.property-donation-address-name {
  font-weight: 800;
}

.property-donation-note {
  color: #4c5d50;
}

.property-donation-chart {
  margin-top: 24px;
}

.notice.warning {
  background-color: #fff3cd;
  color: #856404;
  border-color: #ffeeba;
}

.property-admin-form {
  max-width: 780px;
}

.property-admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 22px;
}

.property-admin-tabs a {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border: 1px solid #d7ddd6;
  border-radius: 6px;
  background: #f7faf7;
  color: #243126;
  text-decoration: none;
  font-weight: 700;
}

.property-admin-tabs a:hover,
.property-admin-tabs a.active {
  background: #243126;
  border-color: #243126;
  color: #fff;
}

.property-admin-form textarea {
  min-height: 110px;
}

.property-admin-table {
  min-width: 980px;
}

.status-inline-form {
  margin: 0;
}

.status-inline-form select {
  min-width: 116px;
  padding: 6px 8px;
  border: 1px solid #cfd6ce;
  border-radius: 6px;
  background: #fff;
}

.muted {
  color: #6f7670;
  font-size: 0.9em;
}

@media (max-width: 720px) {
  .property-donation-summary {
    grid-template-columns: 1fr;
  }

  .property-donation-card {
    padding: 18px;
  }

  .property-coin-row {
    grid-template-columns: 1fr;
  }

  .property-coin-qty {
    width: 100%;
    text-align: left;
  }

  .property-coin-total {
    text-align: left;
  }

  .property-running-total {
    display: grid;
  }
}
