/* Shared visual refresh for the household account and bookkeeping pages. */
:root {
    --pd-ink: #1d2939;
    --pd-muted: #667085;
    --pd-line: #e6eaf0;
    --pd-canvas: #f5f7fb;
    --pd-blue: #315be8;
    --pd-shadow: 0 8px 28px rgba(20, 35, 70, .055);
}
* { box-sizing: border-box; }
body { color: var(--pd-ink); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", "Microsoft JhengHei", sans-serif; }
a { transition: color .16s ease, background-color .16s ease, box-shadow .16s ease, transform .16s ease; }
button, input, select, textarea { font: inherit; }
input, select, textarea { border-radius: 10px !important; border-color: #d7deea !important; min-height: 40px; box-shadow: none !important; }
input:focus, select:focus, textarea:focus { border-color: #7290f2 !important; outline: 3px solid rgba(49, 91, 232, .11) !important; }
.btn, button, input[type="submit"] { border-radius: 9px !important; }
.btn-primary, .btn-danger, .btn-success, .btn-info, .btn-warning { border: 0 !important; box-shadow: 0 3px 8px rgba(30, 50, 90, .11); }
.content-wrapper, .right-side, .wrapper { background: var(--pd-canvas) !important; }
.content-header { padding: 22px 24px 10px !important; }
.content-header h1, .content-header h2 { color: var(--pd-ink); font-weight: 700; }
.content { padding: 12px 24px 28px !important; }
.box { border: 1px solid var(--pd-line) !important; border-top: 0 !important; border-radius: 15px !important; box-shadow: var(--pd-shadow) !important; overflow: hidden; }
.box-header { padding: 18px 20px !important; border-bottom: 1px solid var(--pd-line); }
.box-title { color: var(--pd-ink); font-size: 18px !important; font-weight: 700 !important; }
.box-body { padding: 18px 20px !important; }
.table-responsive { border: 1px solid var(--pd-line); border-radius: 12px; background: #fff; }
.table { margin-bottom: 0 !important; }
.table > thead > tr > th { position: sticky; top: 0; z-index: 1; color: #526079; background: #f6f8fc; font-size: 12px; font-weight: 700; white-space: nowrap; border-bottom: 1px solid var(--pd-line) !important; }
.table > tbody > tr > td { color: #344054; vertical-align: middle !important; border-top-color: #edf0f5 !important; }
.table-striped > tbody > tr:nth-of-type(odd) { background-color: #fbfcfe !important; }
.table > tbody > tr:hover { background-color: #f1f5ff !important; }
.dataTables_wrapper { color: var(--pd-muted); }
.dataTables_wrapper .dataTables_filter input { margin-left: 8px; padding: 7px 11px; }
.dataTables_wrapper .dataTables_length select { margin: 0 5px; padding: 4px 8px; }
.dataTables_wrapper .pagination > li > a { border-radius: 8px; margin: 0 2px; color: #475467; }
.dataTables_wrapper .pagination > .active > a { background: var(--pd-blue); border-color: var(--pd-blue); }
.btn-app { height: auto !important; min-width: 108px; padding: 12px 14px !important; margin: 0 8px 8px 0 !important; border: 1px solid var(--pd-line) !important; border-radius: 11px !important; background: #fff !important; color: var(--pd-ink) !important; box-shadow: none !important; font-size: 13px !important; }
.btn-app:hover { border-color: #b9c8fb !important; background: #f5f7ff !important; }
.form-group label { color: #475467; font-size: 13px; font-weight: 650; }
.callout, .alert { border-radius: 10px; }
.pd-dashboard { min-height: 100vh; margin: 0; background: var(--pd-canvas); }
.pd-topbar { height: 72px; display: flex; align-items: center; justify-content: space-between; padding: 0 30px; background: rgba(255,255,255,.94); border-bottom: 1px solid var(--pd-line); }
.pd-brand { display: inline-flex; align-items: center; gap: 12px; color: var(--pd-ink); text-decoration: none; }
.pd-brand:hover { color: var(--pd-ink); text-decoration: none; }
.pd-brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: #315be8; color: #fff; font-weight: 800; font-size: 17px; }
.pd-brand strong { display: block; font-size: 15px; letter-spacing: .01em; }
.pd-brand small { display: block; margin-top: 2px; color: #98a2b3; font-size: 9px; font-weight: 700; letter-spacing: .14em; }
.pd-topbar-actions { display: flex; align-items: center; gap: 15px; }
.pd-today { color: #667085; font-size: 13px; }
.pd-icon-button { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--pd-line); border-radius: 12px; background: #fff; color: #596780; font-size: 18px; text-decoration: none; }
.pd-layout { max-width: 1510px; min-height: calc(100vh - 72px); display: grid; grid-template-columns: 225px minmax(0, 1fr); margin: 0 auto; }
.pd-sidebar { display: flex; flex-direction: column; gap: 5px; padding: 26px 16px; border-right: 1px solid var(--pd-line); background: #fff; }
.pd-nav-label { margin: 14px 10px 6px; color: #98a2b3; font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.pd-nav-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 9px; color: #526079; font-size: 13px; text-decoration: none; }
.pd-nav-item:hover { background: #f4f6fb; color: var(--pd-blue); text-decoration: none; }
.pd-nav-item.is-active { background: #edf2ff; color: #294fdb; font-weight: 700; }
.pd-nav-icon { width: 19px; color: #8491a7; text-align: center; font-size: 17px; }
.pd-nav-item.is-active .pd-nav-icon { color: var(--pd-blue); }
.pd-sidebar-note { margin: auto 4px 0; padding: 14px; border: 1px solid #e6ebfb; border-radius: 12px; background: #f7f8ff; }
.pd-sidebar-note strong, .pd-sidebar-note span { display: block; }
.pd-sidebar-note strong { margin-bottom: 5px; font-size: 12px; }
.pd-sidebar-note span { color: #7e899d; font-size: 11px; }
.pd-main { width: 100%; max-width: 1220px; padding: 34px clamp(20px, 4vw, 58px) 20px; }
.pd-welcome { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin: 0 0 25px; }
.pd-eyebrow { margin: 0 0 7px; color: #73809a; font-size: 10px; font-weight: 800; letter-spacing: .13em; }
.pd-welcome h1 { margin: 0; color: var(--pd-ink); font-size: clamp(25px, 3vw, 34px); font-weight: 750; letter-spacing: -.035em; }
.pd-subtitle { margin: 8px 0 0; color: var(--pd-muted); font-size: 13px; }
.pd-primary-action { flex: 0 0 auto; padding: 12px 16px; border-radius: 10px; background: var(--pd-blue); color: #fff; font-size: 13px; font-weight: 700; text-decoration: none; box-shadow: 0 7px 15px rgba(49,91,232,.2); }
.pd-primary-action:hover { color: #fff; background: #264bd0; text-decoration: none; transform: translateY(-1px); }
.pd-stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 13px; }
.pd-stat-card { min-height: 104px; display: flex; align-items: center; gap: 12px; padding: 17px; border: 1px solid var(--pd-line); border-radius: 13px; background: #fff; color: var(--pd-ink); text-decoration: none; box-shadow: 0 3px 13px rgba(20,35,70,.025); }
.pd-stat-card:hover, .pd-action-card:hover { border-color: #c8d4fc; color: var(--pd-ink); text-decoration: none; box-shadow: var(--pd-shadow); transform: translateY(-2px); }
.pd-stat-icon, .pd-action-icon { flex: 0 0 auto; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; font-size: 18px; font-weight: 700; }
.tone-blue { color: #315be8; background: #edf2ff; }
.tone-purple { color: #7b52d4; background: #f4efff; }
.tone-amber { color: #b76d00; background: #fff5e5; }
.tone-green { color: #14865b; background: #e9f8f1; }
.pd-stat-copy { min-width: 0; flex: 1; }
.pd-stat-copy small { display: block; overflow: hidden; color: #758198; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.pd-stat-copy strong { display: block; margin-top: 4px; font-size: 24px; line-height: 1.1; }
.pd-stat-arrow { align-self: flex-start; color: #a6afbf; font-size: 15px; }
.pd-section { margin-top: 30px; }
.pd-section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 13px; }
.pd-section-heading .pd-eyebrow { margin-bottom: 3px; }
.pd-section-heading h2 { margin: 0; color: var(--pd-ink); font-size: 19px; font-weight: 750; }
.pd-action-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.pd-action-card { min-height: 83px; display: flex; align-items: center; gap: 13px; padding: 15px; border: 1px solid var(--pd-line); border-radius: 12px; background: #fff; color: var(--pd-ink); text-decoration: none; }
.pd-action-card > span:nth-child(2) { flex: 1; }
.pd-action-card strong, .pd-action-card small { display: block; }
.pd-action-card strong { margin-bottom: 4px; font-size: 13px; }
.pd-action-card small { color: #7d899d; font-size: 11px; }
.pd-action-icon { width: 36px; height: 36px; border-radius: 10px; font-size: 19px; }
.pd-card-arrow { color: #9ba5b5; font-size: 18px; }
.pd-text-link { color: var(--pd-blue); font-size: 12px; font-weight: 650; text-decoration: none; }
.pd-text-link:hover { text-decoration: underline; }
.pd-chip-list { display: flex; flex-wrap: wrap; gap: 9px; }
.pd-chip { display: inline-flex; align-items: center; gap: 9px; padding: 9px 12px; border: 1px solid var(--pd-line); border-radius: 9px; background: #fff; color: #344054; font-size: 12px; text-decoration: none; }
.pd-chip span { color: #9aa4b4; font-size: 10px; }
.pd-chip:hover { border-color: #bdcbfb; background: #f7f8ff; color: var(--pd-blue); text-decoration: none; }
.pd-empty-note { padding: 17px; border: 1px dashed #cfd7e4; border-radius: 11px; color: var(--pd-muted); font-size: 12px; }
.pd-empty-note a { color: var(--pd-blue); }
.pd-footer { margin-top: 38px; padding: 16px 0 4px; border-top: 1px solid var(--pd-line); color: #98a2b3; font-size: 10px; }
.pd-footer span { padding: 0 5px; }
.pd-command-dialog { width: min(540px, calc(100vw - 28px)); max-height: 80vh; padding: 0; border: 1px solid #e2e7f0; border-radius: 15px; background: #fff; box-shadow: 0 25px 80px rgba(10,20,40,.24); }
.pd-command-dialog::backdrop { background: rgba(20, 31, 52, .42); backdrop-filter: blur(2px); }
.pd-command-search { display: flex; align-items: center; gap: 10px; padding: 15px 17px; border-bottom: 1px solid var(--pd-line); color: #8792a6; }
.pd-command-search input { flex: 1; min-width: 0; height: 38px; border: 0 !important; outline: 0 !important; font-size: 14px; }
.pd-command-search button { padding: 4px 7px; border: 1px solid var(--pd-line); background: #f8f9fb; color: #778399; font-size: 10px; }
.pd-command-list { padding: 8px; }
.pd-command-list a { display: flex; align-items: center; gap: 12px; padding: 11px; border-radius: 9px; color: var(--pd-ink); text-decoration: none; }
.pd-command-list a:hover { background: #f4f6fb; }
.pd-command-list a[hidden] { display: none; }
.pd-command-list a > span:first-child { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; background: #eef2ff; color: var(--pd-blue); }
.pd-command-list a > span:nth-child(2) { flex: 1; }
.pd-command-list strong, .pd-command-list small { display: block; }
.pd-command-list strong { font-size: 12px; }
.pd-command-list small { margin-top: 3px; color: #8490a3; font-size: 10px; }
.pd-command-list kbd { padding: 3px 6px; border: 1px solid var(--pd-line); border-radius: 5px; color: #8792a6; font: 10px inherit; }
.pd-pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 14px 2px 2px; color: #667085; font-size: 12px; }
.pd-pagination-summary { flex: 1; }
.pd-pagination-controls { display: flex; align-items: center; gap: 5px; }
.pd-page-button { min-width: 34px; height: 34px; padding: 0 9px; border: 1px solid var(--pd-line); border-radius: 8px !important; background: #fff; color: #475467; cursor: pointer; }
.pd-page-button:hover:not(:disabled) { border-color: #bdcbfb; background: #f5f7ff; color: var(--pd-blue); }
.pd-page-button[aria-current="page"] { border-color: var(--pd-blue); background: var(--pd-blue); color: #fff; font-weight: 700; }
.pd-page-button:disabled { opacity: .45; cursor: default; }
.pd-page-ellipsis { padding: 0 3px; color: #98a2b3; }
.pd-page-nav { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 62px; padding: 8px clamp(14px, 3vw, 28px); border-bottom: 1px solid var(--pd-line); background: rgba(255,255,255,.97); box-shadow: 0 3px 12px rgba(20,35,70,.035); }
.pd-page-nav-brand { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 9px; color: var(--pd-ink); text-decoration: none; }
.pd-page-nav-brand:hover { color: var(--pd-ink); text-decoration: none; }
.pd-page-nav-brand .pd-brand-mark { width: 32px; height: 32px; border-radius: 10px; font-size: 14px; }
.pd-page-nav-brand strong { font-size: 12px; }
.pd-page-nav-links { display: flex; align-items: center; gap: 3px; overflow-x: auto; scrollbar-width: none; }
.pd-page-nav-links::-webkit-scrollbar { display: none; }
.pd-page-nav-links a { flex: 0 0 auto; padding: 8px 10px; border-radius: 8px; color: #596780; font-size: 12px; text-decoration: none; white-space: nowrap; }
.pd-page-nav-links a:hover { background: #f3f5fa; color: var(--pd-blue); text-decoration: none; }
.pd-page-nav-links a.is-active { background: #edf2ff; color: #294fdb; font-weight: 700; }
.pd-billcat-tabs { display: flex; align-items: center; gap: 4px; margin-top: 15px; overflow-x: auto; border-bottom: 1px solid var(--pd-line); scrollbar-width: thin; }
.pd-billcat-tab { flex: 0 0 auto; padding: 9px 13px 10px; border-bottom: 2px solid transparent; color: #667085; font-size: 12px; text-decoration: none; white-space: nowrap; }
.pd-billcat-tab:hover { border-bottom-color: #bdcbfb; color: var(--pd-blue); text-decoration: none; }
.pd-billcat-tab.is-active { border-bottom-color: var(--pd-blue); color: var(--pd-blue); font-weight: 700; }
.pd-table-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 14px 0 10px; }
.pd-table-search { flex: 0 1 340px; display: flex; align-items: center; gap: 8px; color: #758198; font-size: 12px; }
.pd-table-search input { width: 100%; min-width: 180px; padding: 8px 11px; background: #fff; }
.pd-table-toolbar .pd-pagination { flex: 1; justify-content: flex-end; margin: 0; }
.pd-table-toolbar .pd-pagination-summary { flex: 0 0 auto; }
@media (max-width: 980px) {
    .pd-layout { grid-template-columns: 195px minmax(0,1fr); }
    .pd-stat-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 700px) {
    .pd-topbar { height: 62px; padding: 0 15px; }
    .pd-today { display: none; }
    .pd-layout { display: block; min-height: calc(100vh - 62px); }
    .pd-sidebar { position: sticky; top: 0; z-index: 5; display: flex; flex-direction: row; gap: 3px; overflow-x: auto; padding: 8px 10px; border-right: 0; border-bottom: 1px solid var(--pd-line); scrollbar-width: none; }
    .pd-sidebar::-webkit-scrollbar { display: none; }
    .pd-nav-label, .pd-sidebar-note { display: none; }
    .pd-nav-item { flex: 0 0 auto; gap: 6px; padding: 8px 10px; font-size: 11px; white-space: nowrap; }
    .pd-nav-icon { font-size: 15px; }
    .pd-main { padding: 24px 15px 15px; }
    .pd-welcome { align-items: flex-start; flex-direction: column; gap: 15px; }
    .pd-primary-action { width: 100%; text-align: center; }
    .pd-stat-grid { gap: 9px; }
    .pd-stat-card { min-height: 86px; gap: 9px; padding: 12px 10px; }
    .pd-stat-icon { width: 34px; height: 34px; border-radius: 10px; }
    .pd-stat-copy strong { font-size: 21px; }
    .pd-action-grid { grid-template-columns: 1fr; gap: 9px; }
    .pd-section { margin-top: 25px; }
    .content-header { padding: 16px 14px 8px !important; }
    .content { padding: 8px 12px 22px !important; }
    .box-header { padding: 14px !important; }
    .box-body { padding: 12px !important; }
    .dataTables_wrapper .dataTables_filter { float: none !important; text-align: left !important; margin: 8px 0 12px; }
    .dataTables_wrapper .dataTables_filter input { width: min(62vw, 260px); }
    .dataTables_wrapper .dataTables_length { float: none !important; margin: 4px 0; }
    .pd-pagination { align-items: flex-start; flex-direction: column; }
    .pd-pagination-controls { flex-wrap: wrap; }
    .pd-page-nav { align-items: flex-start; flex-direction: column; gap: 3px; padding: 9px 12px 7px; }
    .pd-page-nav-brand { display: none; }
    .pd-page-nav-links { width: 100%; }
    .pd-page-nav-links a { padding: 8px 9px; font-size: 11px; }
    .pd-billcat-tabs { margin-top: 12px; }
    .pd-billcat-tab { padding: 8px 10px 9px; font-size: 11px; }
    .pd-table-toolbar { align-items: stretch; flex-direction: column; }
    .pd-table-search { flex: auto; }
    .pd-table-search input { min-width: 0; }
    .pd-table-toolbar .pd-pagination { align-items: flex-start; }
}
