.app-frame {
  width: 100%;
  max-width: none;
  margin: 0;
  box-shadow: none;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.app-frame .content { max-width: none; }

.app-frame .brand {
  color: inherit;
  text-decoration: none;
  display: grid;
  grid-template-columns: 42px max-content;
  grid-template-rows: 42px auto;
  align-content: center;
  align-items: center;
  justify-content: center;
  column-gap: 12px;
  row-gap: 8px;
  height: 120px;
  padding: 17px 24px 15px;
}

.app-frame .brand-mark { grid-column: 1; grid-row: 1; width: 42px; height: 42px; font-size: 14px; }
.app-frame .brand-title { grid-column: 2; grid-row: 1; margin: 0; font-size: 16px; line-height: 1.14; }
.app-frame .brand-title em { font-size: 20px; }
.app-frame .brand-subtitle { grid-column: 1 / -1; grid-row: 2; display: block; margin: 0; text-align: center; color: #728399; font-size: 12px; font-weight: 800; letter-spacing: .2em; line-height: 1.2; white-space: nowrap; }

.app-frame .brand:hover { background: #f8f9fd; }

.app-frame .brand:focus-visible {
  outline: 3px solid #2A5985;
  outline-offset: -4px;
}

.topbar .home-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 3px 13px 0;
  border: 1px solid #193B63;
  border-radius: 9px;
  background: #193B63;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  word-break: keep-all;
  transition: background-color .15s ease, border-color .15s ease;
}

.topbar .header-logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 3px 14px 0;
  border: 1px solid #b7c9d9;
  border-radius: 9px;
  background: #fff;
  color: #193B63;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}

.topbar .header-logout:hover { background: #edf3f8; }
.topbar .header-logout:focus-visible { outline: 3px solid #2A5985; outline-offset: 2px; }

.topbar .home-link::after {
  content: "";
  display: inline-block;
  width: 19px;
  height: 19px;
  flex: none;
  margin-left: 7px;
  background: currentColor;
  -webkit-mask: url('/erp/assets/baseball-bat.svg') center / contain no-repeat;
  mask: url('/erp/assets/baseball-bat.svg') center / contain no-repeat;
}

.topbar .home-link:hover {
  border-color: #122E4D;
  background: #122E4D;
}

.topbar .home-link:focus-visible {
  outline: 3px solid #2A5985;
  outline-offset: 2px;
}

@media (width <= 780px) {
  .topbar .header-right { gap: 10px; }
  .topbar .today-label { display: none; }
}

@media (width <= 480px) {
  .topbar .breadcrumb { display: none; }
  .topbar .home-link { min-height: 40px; }
  .topbar .header-right { gap: 8px; }
  .topbar .home-link, .topbar .header-logout { padding-inline: 10px; font-size: 12px; }
}

.sidebar nav .nav-item { text-decoration: none; }
.hero-grid .metrics .metric {
  border: 1px solid rgb(25 59 99 / 8%);
  background-image: linear-gradient(155deg, rgb(255 255 255 / 48%), rgb(255 255 255 / 0%) 58%);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 82%),
    0 2px 5px rgb(18 46 77 / 4%),
    0 11px 24px rgb(18 46 77 / 8%);
}
.hero-grid .metrics .metric-icon {
  box-shadow: 0 2px 6px rgb(18 46 77 / 8%);
}
.dashboard-metric-link,
.inquiry-dashboard-link { display: block; min-width: 0; color: inherit; border-radius: 17px; text-decoration: none; }
.inquiry-dashboard-link { grid-column: 1 / -1; }
.dashboard-metric-link .metric,
.inquiry-dashboard-link .metric { height: 100%; transition: transform .18s ease, box-shadow .18s ease; }
.inquiry-dashboard-link .metric { min-height: 118px; background-color: #eaf2fa; }
:is(.dashboard-metric-link, .inquiry-dashboard-link):hover .metric,
:is(.dashboard-metric-link, .inquiry-dashboard-link):focus-visible .metric {
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 82%),
    0 5px 11px rgb(18 46 77 / 7%),
    0 18px 32px rgb(18 46 77 / 13%);
}
:is(.dashboard-metric-link, .inquiry-dashboard-link):focus-visible { outline: 3px solid #193B63; outline-offset: 4px; }
@media (prefers-reduced-motion: reduce) {
  :is(.dashboard-metric-link, .inquiry-dashboard-link) .metric { transition: none; }
}

/* Stretch the dashboard month grid to the full height of its card. */
.dashboard-calendar-card { display: flex; flex-direction: column; }
.dashboard-calendar-head { flex: 0 0 auto; }
.dashboard-month-calendar { display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0; }
.dashboard-month-calendar .month-days { flex: 1 1 auto; grid-auto-rows: minmax(0, 1fr); }

/* Give every dashboard row the same column edge as the calendar above it. */
.dashboard-lower,
.dashboard-lower.bottom { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dashboard-lower .section-title h2 { font-size: 19px; }
.dashboard-lower .section-title p { color: #5b6b7f; font-size: 14px; line-height: 1.5; }
.dashboard-lower .today-panel .empty { color: #5b6b7f; font-size: 15px; }
.dashboard-lower .check-card { min-height: 80px; gap: 14px; padding: 15px 16px; }
.dashboard-lower .check-card strong { color: #202b3c; font-size: 15px; line-height: 1.45; }
.dashboard-lower .check-card p,
.dashboard-lower .check-note { color: #5b6b7f; font-size: 14px; line-height: 1.45; }
.dashboard-lower .activity-row { gap: 12px; padding: 14px 0; }
.dashboard-lower .activity-row strong { font-size: 15px; line-height: 1.45; }
.dashboard-lower .activity-row small { color: #5b6b7f; font-size: 14px; line-height: 1.45; margin-top: 4px; }
.dashboard-lower .activity-dot { flex: 0 0 9px; width: 9px; height: 9px; }
.dashboard-lower.bottom .table-wrap th { color: #5b6b7f; font-size: 13px; }
.dashboard-lower.bottom .table-wrap td { font-size: 15px; }

@media (max-width: 1120px) {
  .dashboard-lower,
  .dashboard-lower.bottom { grid-template-columns: minmax(0, 1fr); }
}

/* A compact, unboxed weather brief alongside the original-size greeting. */
.content .pj-dashboard-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(390px, .95fr);
  align-items: center;
  gap: 32px;
  min-height: 0;
  margin-bottom: 28px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #fff;
  color: #172040;
}
.pj-dashboard-heading-copy { min-width: 0; }
.pj-dashboard-heading h1 {
  margin: 0 0 6px;
  color: #172040;
  font-size: clamp(29px, 2.15vw, 32px);
  line-height: 1.35;
  letter-spacing: -.04em;
  word-break: keep-all;
}
.pj-dashboard-heading p { margin: 0; color: #60718a; font-size: 14px; line-height: 1.5; word-break: keep-all; }
.pj-dashboard-weather-slot { min-width: 0; }
.pj-weather { display: grid; gap: 5px; min-width: 0; padding: 0; background: transparent; color: #172040; word-break: keep-all; }
.pj-weather-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.pj-weather-kicker { color: #193b63; font-size: 12px; font-weight: 800; white-space: nowrap; }
.pj-weather-place { color: #68809a; font-size: 12px; white-space: nowrap; }
.pj-weather-refresh {
  width: 25px;
  height: 25px;
  flex: none;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: #edf3f8;
  color: #193b63;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}
.pj-weather-refresh:hover { background: #dce8f3; }
.pj-weather-refresh:focus-visible { outline: 3px solid #2a5985; outline-offset: 2px; }
.pj-weather-refresh:disabled { opacity: .55; cursor: wait; }
.pj-weather-main { display: flex; align-items: center; flex-wrap: wrap; gap: 5px 8px; min-height: 30px; }
.pj-weather-icon { width: 27px; color: #d89025; font-size: 23px; line-height: 1; }
.pj-weather-temp { font-size: 29px; letter-spacing: -.06em; line-height: 1; }
.pj-weather-condition { color: #254f77; font-size: 13px; font-weight: 700; white-space: nowrap; }
.pj-weather-details { display: inline-flex; flex-wrap: wrap; gap: 4px 12px; margin-left: auto; color: #60718a; font-size: 12px; }
.pj-weather-details strong { margin-left: 3px; color: #193b63; font-size: 12px; }
.pj-weather-air { display: flex; flex-wrap: wrap; gap: 4px 14px; color: #60718a; font-size: 12px; }
.pj-weather-air span { white-space: nowrap; }
.pj-weather-air strong { margin-left: 3px; color: #193b63; font-size: 12px; }
.pj-weather-credit { margin-left: auto; color: #68809a; font-size: 11px; text-decoration: none; white-space: nowrap; }
.pj-weather-credit:hover { color: #193b63; text-decoration: underline; }
.pj-dashboard-heading .pj-weather-message { margin: 0; color: #60718a; font-size: 12px; line-height: 1.4; }
.pj-weather-message:empty { display: none; }
.pj-dashboard-heading .pj-weather.is-error .pj-weather-message { color: #a3392a; }

@media (max-width: 1080px) {
  .content .pj-dashboard-heading { grid-template-columns: minmax(0, 1fr); gap: 14px; }
}
@media (max-width: 600px) {
  .pj-dashboard-heading h1 { font-size: 27px; }
  .pj-weather-main { gap: 5px 8px; }
  .pj-weather-details { width: 100%; margin-left: 0; }
}

/* Swap decorative arrows in action buttons for the public site's bat mark. */
.app-frame button > svg:is(.lucide-arrow-up-right, .lucide-arrow-left, .lucide-chevron-right, .lucide-chevron-left) { display: none; }
.app-frame button:has(> svg:is(.lucide-arrow-up-right, .lucide-chevron-right))::after,
.app-frame button:has(> svg:is(.lucide-arrow-left, .lucide-chevron-left))::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 18px;
  flex: none;
  vertical-align: middle;
  background: currentColor;
  -webkit-mask: url('/erp/assets/baseball-bat.svg') center / contain no-repeat;
  mask: url('/erp/assets/baseball-bat.svg') center / contain no-repeat;
}
.app-frame button:has(> svg:is(.lucide-arrow-up-right, .lucide-chevron-right))::after { margin-left: 5px; }
.app-frame button:has(> svg:is(.lucide-arrow-left, .lucide-chevron-left))::before { margin-right: 5px; transform: scaleX(-1); }
.app-frame .calendar-nav button:has(> svg:is(.lucide-chevron-left, .lucide-chevron-right))::before,
.app-frame .calendar-nav button:has(> svg:is(.lucide-chevron-left, .lucide-chevron-right))::after,
.app-frame .dashboard-calendar-head button:has(> svg:is(.lucide-chevron-left, .lucide-chevron-right))::before,
.app-frame .dashboard-calendar-head button:has(> svg:is(.lucide-chevron-left, .lucide-chevron-right))::after { margin: 0; }
.pj-weather-credit { display: inline-flex; align-items: center; gap: 4px; }
.pj-weather-credit::after {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  flex: none;
  background: currentColor;
  -webkit-mask: url('/erp/assets/baseball-bat.svg') center / contain no-repeat;
  mask: url('/erp/assets/baseball-bat.svg') center / contain no-repeat;
}

/* Give navigation actions the same clear button shape throughout the ERP. */
.app-frame :is(.text-button, .row-link, .inline-link, .member-name-link, .detail-back, .overview-journal button),
.pj-weather-credit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 7px 14px;
  border: 1px solid #cbdce9;
  border-radius: 999px;
  background: #fff;
  color: #193B63;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.app-frame :is(.text-button, .row-link, .inline-link, .member-name-link, .detail-back, .overview-journal button):hover,
.pj-weather-credit:hover { background: #e9f0f6; border-color: #9fc0dc; color: #193B63; text-decoration: none; }
.app-frame :is(.text-button, .row-link, .inline-link, .member-name-link, .detail-back, .overview-journal button):focus-visible,
.pj-weather-credit:focus-visible { outline: 3px solid #2A5985; outline-offset: 2px; }
.app-frame .staff-card-more { min-height: 32px; padding: 5px 11px; border: 1px solid #cbdce9; border-radius: 999px; background: #fff; }
.pj-weather-credit { min-height: 30px; padding: 5px 10px; font-size: 12px; }
.app-frame .member-registered-on { min-width: 112px; color: #52657a; font-variant-numeric: tabular-nums; }

/* Keep member status and its manager action visible in both member views. */
.app-frame .member-status-cell { min-width: 155px; }
.app-frame .member-status-cell .badge { margin-right: 8px; }
.app-frame .member-status-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; }
.app-frame .member-status-edit {
  min-height: 34px;
  padding: 5px 11px;
  border: 1px solid #bdd1e2;
  border-radius: 999px;
  background: #fff;
  color: #193b63;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
  cursor: pointer;
}
.app-frame .member-status-edit:hover { border-color: #8eb3d2; background: #e9f0f6; }
.app-frame .member-status-edit:focus-visible { outline: 3px solid #2a5985; outline-offset: 2px; }
.app-frame .member-delete-button {
  min-height: 34px;
  padding: 5px 11px;
  border: 1px solid #e9b7b2;
  border-radius: 999px;
  background: #fff;
  color: #a52c26;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  word-break: keep-all;
  cursor: pointer;
}
.app-frame .member-delete-button:hover { border-color: #c97870; background: #fff1ef; }
.app-frame .member-delete-button:focus-visible { outline: 3px solid #a52c26; outline-offset: 2px; }
@media (max-width: 600px) {
  .app-frame .detail-hero { align-items: flex-start; flex-direction: column; }
  .app-frame .member-status-actions { justify-content: flex-start; }
}

@media (max-width: 780px) {
  .app-frame .sidebar.open + .main-shell .mobile-menu {
    position: fixed;
    top: 15px;
    left: min(248px, calc(100vw - 46px));
    z-index: 21;
    margin: 0;
    background: #fff;
    color: #193b63;
    box-shadow: 0 4px 14px rgb(12 33 61 / 18%);
  }
  .app-frame .sidebar.open + .main-shell .mobile-menu:focus-visible {
    outline: 3px solid #2a5985;
    outline-offset: 2px;
  }
}

/* One accounting month controls every summary and list on the page. */
.account-month-bar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px 24px;
  margin: 0 0 18px;
  padding: 4px 0;
}
.account-month-intro { display: grid; gap: 3px; min-width: 0; word-break: keep-all; }
.account-month-intro strong { color: #172040; font-size: 18px; line-height: 1.35; }
.account-month-intro small { color: #60718a; font-size: 13px; line-height: 1.5; }
.account-month-controls { display: flex; align-items: end; flex-wrap: wrap; gap: 8px; }
.account-month-controls label { display: grid; gap: 5px; color: #315579; font-size: 13px; font-weight: 700; }
.account-month-controls input[type="month"] { min-height: 42px; padding: 8px 12px; color: #172040; background: #fff; border: 1px solid #cbdce9; border-radius: 9px; font: inherit; font-size: 14px; }
.account-month-controls button { min-height: 42px; padding: 8px 14px; color: #193b63; background: #e9f0f6; border: 1px solid #cbdce9; border-radius: 9px; font-size: 14px; font-weight: 700; cursor: pointer; }
.account-month-controls button:hover:not(:disabled) { background: #dce8f4; }
.account-month-controls button:disabled { opacity: .55; cursor: default; }
.account-month-controls input:focus-visible,
.account-month-controls button:focus-visible { outline: 3px solid #2a5985; outline-offset: 2px; }
@media (max-width: 600px) {
  .account-month-bar { align-items: stretch; }
  .account-month-controls { width: 100%; }
  .account-month-controls label { flex: 1 1 165px; }
  .account-month-controls input[type="month"] { width: 100%; }
}
