:root {
    --navy: #0c1f56;
    --navy-dark: #081746;
    --navy-light: #132d70;
    --gold: #d4a017;
    --gold-light: #f0c14a;
    --gold-bg: #fdf6e3;
    --text: #1f2937;
    --muted: #6b7280;
    --bg: #f3f4f8;
    --white: #ffffff;
    --border: #e5e7eb;
    --shadow: 0 4px 18px rgba(15, 23, 42, 0.08);
    --radius: 14px;
    --header-h: 58px;
    --bottom-nav-h: 68px;
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left: env(safe-area-inset-left, 0px);
    --safe-right: env(safe-area-inset-right, 0px);
    --header-total: calc(var(--header-h) + var(--safe-top));
    --bottom-nav-total: calc(var(--bottom-nav-h) + var(--safe-bottom));
    --app-max-width: 430px;
}

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    height: 100%;
    height: -webkit-fill-available;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text);
    background: #dfe3ec;
}

body {
    min-height: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    min-height: -webkit-fill-available;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

button,
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
select,
textarea {
    font: inherit;
    color: inherit;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border-radius: 0;
}

button {
    cursor: pointer;
    background: transparent;
    border: none;
    -webkit-tap-highlight-color: transparent;
}

a,
button,
input,
select,
textarea {
    -webkit-tap-highlight-color: transparent;
}

input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button {
    -webkit-appearance: none;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

.app-shell {
    width: 100%;
    max-width: var(--app-max-width);
    min-height: 100vh;
    min-height: 100dvh;
    min-height: -webkit-fill-available;
    margin: 0 auto;
    background: var(--bg);
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.12);
}

/* Auth screens */
.auth-screen {
    min-height: 100vh;
    min-height: 100dvh;
    min-height: -webkit-fill-available;
    background: linear-gradient(180deg, var(--navy-dark) 0%, var(--navy) 100%);
    position: relative;
    padding: calc(48px + var(--safe-top)) max(28px, var(--safe-right)) calc(32px + var(--safe-bottom)) max(28px, var(--safe-left));
    display: flex;
    flex-direction: column;
}

.auth-screen::before,
.auth-screen::after {
    content: "";
    position: absolute;
    border: 2px solid rgba(212, 160, 23, 0.35);
    border-radius: 50%;
    pointer-events: none;
}

.auth-screen::before {
    width: 280px;
    height: 280px;
    right: -120px;
    bottom: 80px;
}

.auth-screen::after {
    width: 220px;
    height: 220px;
    left: -90px;
    bottom: 20px;
}

.auth-brand {
    text-align: center;
    margin-top: 20px;
    margin-bottom: 48px;
    position: relative;
    z-index: 1;
}

.auth-logo {
    width: 110px;
    height: 110px;
    margin: 0 auto 18px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.auth-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.auth-brand h1 {
    margin: 0;
    color: var(--gold-light);
    font-size: 28px;
    font-weight: 700;
}

.auth-brand p {
    margin: 6px 0 0;
    color: rgba(255, 255, 255, 0.92);
    font-size: 15px;
}

.auth-form-wrap {
    position: relative;
    z-index: 1;
}

.auth-form-wrap h2 {
    margin: 0 0 18px;
    color: #fff;
    font-size: 18px;
    font-weight: 600;
}

.input-group {
    position: relative;
    margin-bottom: 18px;
}

.input-group .icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: 18px;
}

.input-group input {
    width: 100%;
    border: none;
    border-radius: 12px;
    padding: 16px 16px 16px 48px;
    font-size: 16px;
    outline: none;
    background: var(--white);
    -webkit-appearance: none;
    appearance: none;
}

.btn-gold {
    width: 100%;
    border: none;
    border-radius: 12px;
    padding: 16px;
    background: linear-gradient(180deg, #f0c14a 0%, #d4a017 100%);
    color: var(--navy-dark);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.error-msg {
    background: rgba(239, 68, 68, 0.15);
    color: #fecaca;
    border: 1px solid rgba(239, 68, 68, 0.35);
    padding: 10px 12px;
    border-radius: 10px;
    margin-bottom: 14px;
    font-size: 14px;
}

.auth-info-msg {
    background: rgba(212, 160, 23, 0.18);
    color: #fff8e7;
    border: 1px solid rgba(212, 160, 23, 0.45);
    padding: 12px 14px;
    border-radius: 12px;
    margin-bottom: 14px;
    font-size: 14px;
    line-height: 1.5;
}

.auth-info-msg strong {
    display: block;
    margin-bottom: 6px;
    color: #fde68a;
    font-size: 15px;
}

.auth-info-msg p {
    margin: 0;
}

/* OTP screen */
.otp-screen {
    min-height: 100vh;
    min-height: 100dvh;
    min-height: -webkit-fill-available;
    background: var(--white);
    padding: calc(18px + var(--safe-top)) max(24px, var(--safe-right)) calc(110px + var(--safe-bottom)) max(24px, var(--safe-left));
    position: relative;
}

.otp-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    color: var(--navy);
    font-size: 22px;
    margin-bottom: 24px;
}

.otp-hero {
    text-align: center;
    margin: 10px 0 28px;
}

.otp-phone-icon {
    width: 88px;
    height: 88px;
    margin: 0 auto 20px;
    border-radius: 22px;
    background: #eef2ff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
}

.otp-screen h2 {
    margin: 0 0 10px;
    font-size: 24px;
    color: var(--navy);
}

.otp-screen p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}

.otp-inputs {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 28px 0 18px;
}

.otp-inputs input {
    width: 46px;
    height: 52px;
    border: 2px solid var(--border);
    border-radius: 12px;
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    color: var(--navy);
    outline: none;
    background: var(--white);
    -webkit-appearance: none;
    appearance: none;
}

.otp-inputs input:focus {
    border-color: var(--navy);
}

.otp-resend {
    text-align: center;
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 24px;
}

.otp-resend span {
    color: var(--gold);
    font-weight: 700;
}

.otp-resend a {
    color: var(--navy);
    font-weight: 700;
}

.otp-footer {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    width: 100%;
    max-width: var(--app-max-width);
    padding: 16px max(24px, var(--safe-right)) calc(24px + var(--safe-bottom)) max(24px, var(--safe-left));
    background: var(--white);
    z-index: 10;
}

.btn-navy {
    width: 100%;
    border: none;
    border-radius: 12px;
    padding: 16px;
    background: var(--navy);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

/* App header */
.app-header {
    height: var(--header-total);
    background: var(--navy);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--safe-top) max(16px, var(--safe-right)) 0 max(16px, var(--safe-left));
    position: sticky;
    top: 0;
    z-index: 20;
}

.app-header h1 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
}

.header-btn {
    width: 38px;
    height: 38px;
    border: none;
    background: transparent;
    color: #fff;
    font-size: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 10px;
}

.header-btn:active {
    background: rgba(255, 255, 255, 0.08);
}

.header-side {
    min-width: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-side-right {
    justify-content: flex-end;
}

.header-add-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 10px;
    background: linear-gradient(180deg, #f0c14a 0%, #d4a017 100%);
    color: var(--navy-dark);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    line-height: 1.2;
}

.header-add-btn:active {
    opacity: 0.9;
}

.app-content {
    padding: 16px max(16px, var(--safe-right)) calc(var(--bottom-nav-total) + 20px) max(16px, var(--safe-left));
    min-height: calc(100vh - var(--header-total));
    min-height: calc(100dvh - var(--header-total));
    position: relative;
}

.app-content.no-bottom-nav {
    padding-bottom: calc(24px + var(--safe-bottom));
}

/* Welcome card */
.welcome-card {
    background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy-light) 100%);
    border-radius: var(--radius);
    padding: 18px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
    border-top: 4px solid var(--gold);
    box-shadow: var(--shadow);
}

.welcome-card .mini-logo {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.welcome-card .mini-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.drawer-logo {
    width: 72px;
    height: 72px;
    margin: 0 auto 12px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.drawer-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.otp-logo {
    width: 88px;
    height: 88px;
    margin: 0 auto 16px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.otp-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.welcome-card h3 {
    margin: 0 0 4px;
    font-size: 17px;
    color: var(--gold-light);
}

.welcome-card p {
    margin: 0;
    font-size: 13px;
    opacity: 0.9;
}

/* Dashboard grid */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 14px;
}

.menu-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 18px 14px;
    box-shadow: var(--shadow);
    display: block;
    transition: transform 0.15s ease;
}

.menu-card:active {
    transform: scale(0.98);
}

.menu-card .icon-wrap {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 12px;
}

.menu-card.members .icon-wrap { background: #ede9fe; }
.menu-card.directors .icon-wrap { background: #ccfbf1; }

.director-intro {
    margin: -4px 0 18px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.45;
}

.director-manage-item {
    align-items: flex-start;
}

.director-manage-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
}

.director-manage-actions .btn-approve,
.director-manage-actions .btn-reject {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    text-align: center;
    min-width: 78px;
}

.director-remove-form {
    margin: 0;
}

.director-status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}

.director-status-badge.active {
    background: #dcfce7;
    color: #166534;
}

.director-status-badge.inactive {
    background: #fee2e2;
    color: #991b1b;
}

.director-selected-member {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0 4px;
}
.menu-card.notifications .icon-wrap { background: #ffedd5; }
.menu-card.suggestions .icon-wrap { background: #fef9c3; }
.menu-card.events .icon-wrap { background: #fce7f3; }

.menu-card h4 {
    margin: 0 0 4px;
    font-size: 16px;
    color: var(--navy);
}

.menu-card span {
    font-size: 12px;
    color: var(--muted);
}

.wide-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 14px;
}

.wide-card .icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #dcfce7;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.wide-card h4 {
    margin: 0 0 4px;
    font-size: 16px;
    color: var(--navy);
}

.wide-card span {
    font-size: 12px;
    color: var(--muted);
}

/* Search bar */
.search-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.search-field {
    flex: 1;
    position: relative;
}

.search-field input {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 14px 14px 42px;
    font-size: 16px;
    outline: none;
    background: var(--white);
    -webkit-appearance: none;
    appearance: none;
}

.search-field .icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
}

.filter-btn {
    width: 48px;
    height: 48px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--white);
    color: var(--navy);
    font-size: 18px;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.list-export-btn {
    min-height: 48px;
    padding: 0 13px;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.list-export-btn span {
    margin-right: 3px;
    font-size: 17px;
}

.list-export-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.member-list-selection-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    padding: 12px 14px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.member-list-select-all {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--navy);
}

.member-list-select-all input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--navy);
}

.member-list-selected-count {
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    white-space: nowrap;
}

.member-list-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    cursor: pointer;
    position: relative;
    z-index: 2;
    padding-top: 2px;
}

.member-list-check input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
}

.member-list-check-ui {
    width: 20px;
    height: 20px;
    border: 2px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
    display: inline-block;
}

.member-list-check input:checked + .member-list-check-ui {
    background: var(--navy);
    border-color: var(--navy);
    box-shadow: inset 0 0 0 3px #fff;
}

/* Member list */
.member-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.member-item {
    background: var(--white);
    border-radius: var(--radius);
    padding: 14px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 12px;
}

.member-item.hidden {
    display: none;
}

.member-avatars {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--white);
    background: #e5e7eb;
}

.avatar + .avatar {
    margin-left: -12px;
}

.member-info {
    flex: 1;
    min-width: 0;
}

.member-info h4 {
    margin: 0 0 4px;
    font-size: 16px;
    color: var(--navy);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.member-info p {
    margin: 0;
    font-size: 12px;
    color: var(--muted);
    line-height: 1.4;
}

.member-arrow {
    color: #cbd5e1;
    font-size: 22px;
}

.member-item-main {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
    color: inherit;
    text-decoration: none;
}

.member-arrow-link {
    color: #cbd5e1;
    font-size: 22px;
    text-decoration: none;
    flex-shrink: 0;
    padding-left: 4px;
}

.member-balance-link {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    flex-shrink: 0;
    min-width: 84px;
    padding: 8px 10px;
    border-radius: 10px;
    background: #f8fafc;
    text-decoration: none;
    color: var(--navy);
}

.member-balance-link.positive {
    background: #dcfce7;
    color: #166534;
}

.member-balance-link.negative {
    background: #fee2e2;
    color: #991b1b;
}

.member-balance-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 0.8;
    margin-bottom: 2px;
}

.member-balance-link strong {
    font-size: 14px;
    line-height: 1.2;
}

.member-accounting-stats {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
    margin-left: auto;
}

.member-balance-stat {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    min-width: 84px;
    padding: 8px 10px;
    border-radius: 10px;
    background: #f8fafc;
    color: var(--navy);
}

.member-balance-stat.positive {
    background: #dcfce7;
    color: #166534;
}

.member-balance-stat.negative {
    background: #fee2e2;
    color: #991b1b;
}

.member-balance-stat strong {
    font-size: 14px;
    line-height: 1.2;
}

.accounting-ledger-summary {
    margin-bottom: 14px;
    box-shadow: none;
    padding: 0;
}

.accounting-ledger-summary .accounting-summary-item strong.positive {
    color: #166534;
}

.accounting-ledger-summary .accounting-summary-item strong.negative {
    color: #991b1b;
}

/* Member List / Member Ledger — UI colors only (Admin vs Member) */
.accounting-ledger.viewer-admin #summaryDueAmount,
.accounting-ledger.viewer-admin #summaryReceiptAmount {
    color: #15803d !important;
}

.accounting-ledger.viewer-admin #summaryGivenAmount {
    color: #b91c1c !important;
}

.accounting-ledger.viewer-admin .accounting-transaction-card.received {
    border-left-color: #22c55e;
}

.accounting-ledger.viewer-admin .accounting-transaction-card.given {
    border-left-color: #ef4444;
}

.accounting-ledger.viewer-admin .accounting-transaction-card.due {
    border-left-color: #22c55e;
}

.accounting-ledger.viewer-admin .accounting-transaction-card.received .accounting-transaction-type,
.accounting-ledger.viewer-admin .accounting-transaction-card.received .accounting-transaction-amount {
    color: #15803d;
}

.accounting-ledger.viewer-admin .accounting-transaction-card.given .accounting-transaction-type,
.accounting-ledger.viewer-admin .accounting-transaction-card.given .accounting-transaction-amount {
    color: #b91c1c;
}

.accounting-ledger.viewer-admin .accounting-transaction-card.due .accounting-transaction-type,
.accounting-ledger.viewer-admin .accounting-transaction-card.due .accounting-transaction-amount {
    color: #15803d;
}

.accounting-ledger.viewer-member #summaryDueAmount {
    color: #15803d !important;
}

.accounting-ledger.viewer-member #summaryReceiptAmount {
    color: #b91c1c !important;
}

.accounting-ledger.viewer-member .accounting-transaction-card.due {
    border-left-color: #22c55e;
}

.accounting-ledger.viewer-member .accounting-transaction-card.received {
    border-left-color: #ef4444;
}

.accounting-ledger.viewer-member .accounting-transaction-card.due .accounting-transaction-type,
.accounting-ledger.viewer-member .accounting-transaction-card.due .accounting-transaction-amount {
    color: #15803d;
}

.accounting-ledger.viewer-member .accounting-transaction-card.received .accounting-transaction-type,
.accounting-ledger.viewer-member .accounting-transaction-card.received .accounting-transaction-amount {
    color: #b91c1c;
}

/* Member Ledger entry sheet (Admin only): Receipt green, Payment red */
#accountingSheet .text-received {
    color: #15803d;
}

#accountingSheet .text-given {
    color: #b91c1c;
}

.accounting-summary-expandable .accounting-summary-toggle-btn,
.accounting-summary-expandable .accounting-summary-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    margin: 0;
    padding: 14px 14px 0;
    border: none;
    background: transparent;
    cursor: pointer;
    text-align: left;
    -webkit-tap-highlight-color: transparent;
}

.accounting-summary-clickable {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.accounting-summary-clickable:focus-visible {
    outline: 2px solid #93c5fd;
    outline-offset: 2px;
}

.accounting-summary-expandable .accounting-summary-toggle-title {
    flex: 1;
    min-width: 0;
    border-bottom: none;
    margin: 0;
}

.accounting-summary-toggle-meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    padding-right: 14px;
}

.accounting-summary-hint {
    font-size: 11px;
    font-weight: 600;
    color: var(--muted);
    white-space: nowrap;
}

.accounting-summary-chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: #f1f5f9;
    color: var(--muted);
    font-size: 16px;
    line-height: 1;
    font-weight: 700;
}

.accounting-summary-expandable.is-expanded .accounting-summary-chevron {
    transform: none;
}

.accounting-summary-dialog-sheet {
    max-height: 88vh;
    max-height: 88dvh;
}

.accounting-summary-dialog-body {
    padding: 0 16px 8px;
}

.accounting-summary-dialog-section + .accounting-summary-dialog-section {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.accounting-summary-dialog-details .accounting-summary-breakdown-scroll {
    max-height: 50vh;
}

.accounting-summary-details {
    padding-top: 2px;
}

.accounting-summary-details[hidden] {
    display: none !important;
}

.accounting-ledger-summary .accounting-summary-grid {
    padding: 0 14px 14px;
}

.accounting-balance-card .accounting-summary-details {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.accounting-dashboard-total-top.accounting-summary-expandable .accounting-summary-toggle-btn {
    border-bottom: 1px solid #e5e7eb;
}

.accounting-dashboard-total-top .accounting-summary-details {
    padding: 0 14px 14px;
}

.accounting-summary-detail-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}

.accounting-summary-detail-stat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: #f8fafc;
    border-radius: 10px;
    padding: 12px 14px;
    text-align: left;
}

.accounting-summary-detail-stat span {
    display: block;
    margin-bottom: 0;
    font-size: 12px;
    color: var(--muted);
    flex: 1;
    min-width: 0;
}

.accounting-summary-detail-stat strong {
    font-size: 15px;
    font-weight: 800;
    color: var(--navy);
    text-align: right;
    flex-shrink: 0;
    white-space: nowrap;
}

.accounting-summary-breakdown-title {
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--navy);
}

.accounting-summary-breakdown-scroll {
    max-height: 240px;
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
}

.accounting-summary-breakdown-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.accounting-summary-breakdown-table th,
.accounting-summary-breakdown-table td {
    padding: 10px 8px;
    text-align: right;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.accounting-summary-breakdown-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f8fafc;
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
}

.accounting-summary-breakdown-table tr:last-child td {
    border-bottom: none;
}

.accounting-summary-breakdown-table th:first-child,
.accounting-summary-breakdown-table td:first-child {
    text-align: left;
    white-space: normal;
    min-width: 88px;
}

.accounting-summary-breakdown-table a {
    color: var(--navy);
    text-decoration: none;
    font-weight: 700;
}

.accounting-summary-detail-actions {
    margin-top: 12px;
    text-align: center;
}

.accounting-summary-detail-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 16px;
    border-radius: 999px;
    background: #eff6ff;
    color: var(--navy);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--muted);
}

/* Member detail */
.detail-hero {
    background: linear-gradient(180deg, #f9edc7 0%, #f3f4f8 100%);
    margin: -16px -16px 16px;
    padding: 24px 16px 20px;
    text-align: center;
}

.detail-profiles {
    display: flex;
    justify-content: center;
    gap: 28px;
    margin-bottom: 8px;
}

.profile-block img {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 10px;
    border: 4px solid var(--white);
    box-shadow: var(--shadow);
    background: #e5e7eb;
}

.profile-block h3 {
    margin: 0;
    font-size: 15px;
    color: var(--navy);
}

.profile-block span {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: var(--muted);
}


.detail-card{
    background:#fff;
    border-radius:16px;
    overflow:hidden;
    margin-bottom:16px;
    box-shadow:var(--shadow);
}

.detail-section-title{
    display:flex;
    align-items:center;
    min-height:50px;
    padding:14px 18px;
    font-size:18px;
    font-weight:700;
    color:#0c1f56;
    background:#ffffff;
    border-bottom:1px solid #e5e7eb;
}


.detail-row {
    display: flex;
    gap: 10px;
    padding: 10px 14px 10px 18px;
    border-bottom: 1px solid var(--border);
}

.detail-row:last-child {
    border-bottom: none;
    padding-bottom: 12px;
}

.detail-row .row-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.detail-row label {
    display: block;
    font-size: 11px;
    color: var(--muted);
    margin-bottom: 2px;
}

.detail-row strong,
.detail-row p {
    margin: 0;
    font-size: 14px;
    color: var(--gold);
    font-weight: 700;
    line-height: 1.35;
}

.detail-row p {
    color: var(--text);
    font-weight: 500;
}

.call-bar {
    position: sticky;
    bottom: 0;
    margin: 0 -16px -16px;
    padding: 16px;
    background: linear-gradient(180deg, rgba(243, 244, 248, 0) 0%, var(--bg) 30%);
}

.call-bar a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--navy);
    color: #fff;
    padding: 16px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 16px;
}

/* Bottom nav */
.bottom-nav {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    width: 100%;
    max-width: var(--app-max-width);
    height: var(--bottom-nav-total);
    padding-bottom: var(--safe-bottom);
    background: var(--navy);
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 30;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.bottom-nav a {
    color: rgba(255, 255, 255, 0.65);
    text-align: center;
    font-size: 11px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 64px;
}

.bottom-nav a .nav-icon {
    font-size: 20px;
}

.bottom-nav a.active {
    color: var(--gold-light);
}

/* Drawer menu */
.drawer-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    visibility: hidden;
    transition: 0.25s ease;
    z-index: 40;
}

.drawer-overlay.open {
    opacity: 1;
    visibility: visible;
}

.drawer {
    position: absolute;
    top: 0;
    left: 0;
    transform: translateX(-100%);
    width: 280px;
    max-width: 82%;
    height: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--navy-dark);
    color: #fff;
    z-index: 50;
    transition: transform 0.25s ease;
    padding: calc(24px + var(--safe-top)) 18px calc(24px + var(--safe-bottom));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.drawer.open {
    transform: translateX(0);
}

.drawer h2 {
    margin: 0 0 24px;
    color: var(--gold-light);
    font-size: 20px;
    text-align: center;
}

.drawer a {
    display: block;
    padding: 14px 12px;
    border-radius: 10px;
    margin-bottom: 6px;
    color: #fff;
}

.drawer a.active,
.drawer a:hover {
    background: rgba(255, 255, 255, 0.08);
}

.drawer .logout-link {
    margin-top: 20px;
    color: #fca5a5;
}

/* Generic list pages */
.list-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
    margin-bottom: 12px;
}

.list-card h4 {
    margin: 0 0 6px;
    color: var(--navy);
}

.list-card p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}

.event-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 8px;
}

.event-list-row {
    display: flex;
    align-items: stretch;
    gap: 8px;
}

.event-list-row .event-item {
    flex: 1;
    min-width: 0;
}

.event-list-delete-btn {
    flex-shrink: 0;
    align-self: center;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: #fee2e2;
    color: #b91c1c;
    font-size: 18px;
    cursor: pointer;
}

.event-item {
    background: var(--white);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 12px;
    color: inherit;
    border-left: 4px solid var(--gold);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.event-item:active {
    transform: scale(0.99);
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.08);
}

.event-thumb-wrap {
    position: relative;
    width: 72px;
    height: 72px;
    border-radius: 14px;
    overflow: hidden;
    flex-shrink: 0;
    background: linear-gradient(180deg, #fce7f3 0%, #fdf2f8 100%);
    border: 2px solid var(--white);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.event-thumb {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.event-thumb-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: #be185d;
    background: linear-gradient(180deg, #fce7f3 0%, #fdf2f8 100%);
}

.event-info {
    flex: 1;
    min-width: 0;
}

.event-info h4 {
    margin: 0 0 6px;
    font-size: 16px;
    color: var(--navy);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.event-line {
    margin: 0;
    font-size: 12px;
    color: var(--muted);
    line-height: 1.45;
    display: flex;
    align-items: flex-start;
    gap: 6px;
}

.event-line + .event-line {
    margin-top: 4px;
}

.event-line-icon {
    flex-shrink: 0;
    width: 16px;
    text-align: center;
    line-height: 1.45;
}

.event-line-muted {
    color: #94a3b8;
    font-size: 11px;
    margin-top: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.event-detail-hero {
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
}

.event-detail-hero img {
    display: block;
    width: 100%;
    max-height: 240px;
    object-fit: cover;
}

.event-poster-carousel {
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
    background: #fff;
}

.event-poster-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.event-poster-track::-webkit-scrollbar {
    display: none;
}

.event-poster-slide {
    flex: 0 0 100%;
    scroll-snap-align: start;
}

.event-poster-slide img {
    display: block;
    width: 100%;
    max-height: 240px;
    object-fit: cover;
}

.event-poster-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 10px 0 12px;
}

.event-poster-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #cbd5e1;
    cursor: pointer;
}

.event-poster-dot.active {
    background: var(--navy);
}

.event-admin-bar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
}

.event-admin-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--navy);
    color: #fff;
    padding: 14px 12px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 15px;
    border: 0;
    cursor: pointer;
    text-align: center;
}

.event-admin-btn-danger {
    background: #ef4444;
}

.event-poster-existing {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    margin-bottom: 10px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.event-poster-existing::-webkit-scrollbar {
    display: none;
}

.event-poster-existing img {
    flex: 0 0 120px;
    width: 120px;
    height: 90px;
    object-fit: cover;
    border-radius: 10px;
}

.event-poster-existing-note {
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
}

.event-poster-preview-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    width: 100%;
    height: 100%;
    padding: 6px;
    box-sizing: border-box;
}

.event-poster-preview-grid img {
    width: 100%;
    height: 72px;
    object-fit: cover;
    border-radius: 8px;
}

.event-narr {
    margin: 0;
    color: var(--text);
    font-size: 14px;
    line-height: 1.6;
}

.event-photo-manage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.event-photo-manage-item {
    background: #f8fafc;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.event-photo-manage-item img {
    display: block;
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.event-photo-manage-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
}

.event-photo-manage-actions form {
    margin: 0;
}

.event-photo-replace-form label.btn-small,
.event-photo-manage-actions .btn-small {
    display: block;
    width: 100%;
    text-align: center;
    padding: 8px 10px;
    font-size: 13px;
}

.event-photo-empty-note {
    margin: 0 0 16px;
    color: var(--muted);
    font-size: 14px;
}

.event-photo-add-form {
    margin-top: 8px;
}

.event-review-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.event-review-admin-link {
    font-size: 13px;
    font-weight: 600;
    color: var(--navy);
    text-decoration: none;
}

.event-review-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
    padding: 14px 16px;
    border-radius: 12px;
    background: #f8fafc;
}

.event-review-summary-score {
    display: flex;
    align-items: center;
    gap: 10px;
}

.event-review-summary-score strong {
    font-size: 28px;
    line-height: 1;
    color: var(--navy);
}

.event-review-count {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
}

.event-review-stars {
    color: #f59e0b;
    letter-spacing: 1px;
    font-size: 16px;
    line-height: 1;
}

.event-review-form {
    margin-bottom: 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid #e2e8f0;
}

.event-review-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.event-review-item {
    padding: 14px 16px;
    border-radius: 12px;
    background: #f8fafc;
}

.event-review-item-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.event-review-item-head strong {
    color: var(--navy);
    font-size: 14px;
}

.event-review-item-head span {
    color: var(--muted);
    font-size: 12px;
    white-space: nowrap;
}

.event-review-item-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

.event-review-item p {
    margin: 0;
    color: var(--text);
    line-height: 1.6;
    font-size: 14px;
}

.event-review-empty {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.event-review-admin-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.event-review-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
}

.event-review-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.event-review-card h4 {
    margin: 0 0 6px;
    color: var(--navy);
    font-size: 16px;
}

.event-review-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.event-review-rating-badge {
    text-align: right;
    white-space: nowrap;
}

.event-review-rating-badge strong {
    display: block;
    margin-top: 4px;
    color: var(--navy);
    font-size: 13px;
}

.event-review-comment {
    margin: 0 0 12px;
    color: var(--text);
    line-height: 1.6;
    font-size: 14px;
}

.event-review-event-link {
    color: var(--navy);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.field textarea {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    padding: 12px 14px;
    font: inherit;
    resize: vertical;
    min-height: 96px;
    background: #fff;
    color: var(--text);
}

.field textarea:focus {
    outline: none;
    border-color: var(--navy);
    box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.12);
}

.profile-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 24px 18px;
    box-shadow: var(--shadow);
    text-align: center;
    margin-bottom: 16px;
}

.profile-card .avatar-lg {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    margin: 0 auto 12px;
    background: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
}

.profile-card h3 {
    margin: 0 0 6px;
    color: var(--navy);
}

.profile-card p {
    margin: 0;
    color: var(--muted);
}

.profile-hero {
    background: linear-gradient(180deg, #f9edc7 0%, #f3f4f8 100%);
    margin: -16px -16px 16px;
    padding: 28px 16px 22px;
    text-align: center;
}

.profile-hero-photo img {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 12px;
    border: 4px solid var(--white);
    box-shadow: var(--shadow);
    background: #e5e7eb;
}

.profile-hero h2 {
    margin: 0 0 4px;
    font-size: 20px;
    color: var(--navy);
}

.profile-role {
    display: inline-block;
    background: var(--navy);
    color: var(--gold-light);
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    margin-bottom: 8px;
}

.profile-mobile {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.profile-detail-card {
    margin-bottom: 16px;
}

.profile-detail-card:last-of-type {
    margin-bottom: 16px;
}

.profile-actions {
    display: grid;
    gap: 10px;
}

.profile-actions a {
    display: block;
    padding: 14px;
    border-radius: 12px;
    text-align: center;
    font-weight: 700;
}

.profile-actions .btn-logout {
    background: #fee2e2;
    color: #b91c1c;
}

.profile-actions .btn-secondary {
    background: var(--white);
    color: var(--navy);
    box-shadow: var(--shadow);
}

/* Member form */
.form-alert {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
    padding: 12px 14px;
    border-radius: 12px;
    margin-bottom: 16px;
    font-size: 14px;
}

.form-alert-success {
    background: #dcfce7;
    color: #166534;
    border-color: #bbf7d0;
}

.member-form {
    padding-bottom: 24px;
}

.form-section {
    background: var(--white);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow);
    margin-bottom: 16px;
}

.form-section h3 {
    margin: 0 0 16px;
    color: var(--navy);
    font-size: 17px;
}

.field {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.field span {
    flex: 0 0 38%;
    font-size: 13px;
    color: var(--navy);
    font-weight: 600;
    line-height: 1.3;
}

.field input[type="text"],
.field input[type="tel"],
.field input[type="date"],
.field input[type="time"],
.field input[type="email"] {
    flex: 1;
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 16px;
    outline: none;
    background: #fff;
    -webkit-appearance: none;
    appearance: none;
}

.field input[type="date"],
.field input[type="time"] {
    min-height: 46px;
}

.eventtime-display {
    cursor: pointer;
    caret-color: transparent;
}

.eventtime-display:focus {
    border-color: var(--navy);
    box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.12);
}

.eventtime-sheet h3 {
    margin: 0 0 16px;
    color: var(--navy);
    font-size: 18px;
    text-align: center;
}

.eventtime-picker-body {
    display: flex;
    justify-content: center;
    margin-bottom: 8px;
}

.eventtime-picker-columns {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    max-width: 320px;
}

.eventtime-picker-select {
    flex: 1;
    min-width: 0;
    min-height: 52px;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 10px;
    font-size: 20px;
    text-align: center;
    color: var(--navy);
    background: #fff;
    -webkit-appearance: none;
    appearance: none;
}

.eventtime-picker-ampm {
    flex: 0 0 88px;
}

.eventtime-picker-separator {
    font-size: 24px;
    font-weight: 700;
    color: var(--navy);
    line-height: 1;
}

.checkbox-field {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 15px;
    color: var(--text);
}

.checkbox-field input {
    width: 18px;
    height: 18px;
}

.photo-upload-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.photo-upload {
    border: 2px dashed #cbd5e1;
    border-radius: 14px;
    padding: 14px 10px;
    text-align: center;
    background: #f8fafc;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.photo-upload-wide {
    margin-bottom: 8px;
}

.photo-upload.dragover {
    border-color: var(--gold);
    background: #fffbeb;
}

.photo-preview {
    width: 88px;
    height: 88px;
    margin: 0 auto 10px;
    border-radius: 50%;
    overflow: hidden;
    background: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-preview-wide {
    width: 100%;
    height: 160px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.photo-placeholder {
    color: var(--muted);
    padding: 0 10px;
    font-size: 14px;
}

.photo-upload strong {
    display: block;
    color: var(--navy);
    font-size: 14px;
    margin-bottom: 4px;
}

.photo-upload span {
    display: block;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.4;
}

.form-actions {
    margin-top: 8px;
}

.detail-actions-top{
    margin:0 0 16px;
}

.detail-card{
    background:#fff;
    border-radius:16px;
    box-shadow:0 4px 16px rgba(0,0,0,.08);
    margin-bottom:16px;
    overflow:hidden;
}

.detail-card-body {
    padding: 0 18px 18px 18px;
}

.detail-row{
    display:flex;
    gap:14px;
    padding:14px 18px;
    border-bottom:1px solid var(--border);
}

.detail-actions-top a{
    display:flex;
    justify-content:center;
    align-items:center;
    gap:10px;
    background:var(--navy);
    color:#fff;
    padding:16px;
    border-radius:12px;
    font-weight:700;
    font-size:16px;
}
.btn-edit-member {
    display: block;
    text-align: center;
    background: var(--navy);
    color: #fff;
    padding: 14px;
    border-radius: 12px;
    font-weight: 700;
}

.detail-couple-photo {
    margin-bottom: 16px;
}

.couple-photo-img {
    width: 100%;
    max-height: 220px;
    object-fit: cover;
    border-radius: 12px;
    margin-top: 8px;
}

.notification-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.notification-item {
    position: relative;
    background: var(--white);
    border-radius: var(--radius);
    padding: 16px 40px 16px 16px;
    box-shadow: var(--shadow);
    color: inherit;
    border-left: 4px solid #fb923c;
}

.notification-item-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.notification-item h4 {
    margin: 0;
    color: var(--navy);
    font-size: 16px;
    line-height: 1.4;
}

.notification-meta {
    margin: 0 0 6px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.notification-meta span + span {
    margin-left: 8px;
}

.notification-time {
    margin: 0;
    color: var(--navy);
    font-size: 13px;
    font-weight: 600;
}

.notification-message {
    margin: 0;
    line-height: 1.6;
    color: var(--text);
}

.suggestion-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.suggestion-item {
    position: relative;
    display: block;
    background: var(--white);
    border-radius: var(--radius);
    padding: 16px 40px 16px 16px;
    box-shadow: var(--shadow);
    color: inherit;
    border-left: 4px solid #facc15;
}

.suggestion-item-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.suggestion-item h4 {
    margin: 0;
    color: var(--navy);
    font-size: 16px;
    line-height: 1.4;
}

.suggestion-meta {
    margin: 0 0 6px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.suggestion-remark {
    margin: 0 0 10px;
    color: var(--text);
    font-size: 14px;
    line-height: 1.6;
}

.suggestion-replies-preview {
    margin: 0 0 10px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #f8fafc;
}

.suggestion-replies-preview > strong {
    display: block;
    margin-bottom: 8px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
}

.suggestion-reply-preview + .suggestion-reply-preview {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #e2e8f0;
}

.suggestion-reply-author {
    display: block;
    margin-bottom: 4px;
    font-size: 12px;
    font-weight: 700;
    color: var(--navy);
}

.suggestion-reply-preview p {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text);
}

.suggestion-time {
    margin: 0;
    color: var(--navy);
    font-size: 13px;
    font-weight: 600;
}

.suggestion-message {
    margin: 0;
    line-height: 1.6;
    color: var(--text);
}

.suggestion-conversation {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.suggestion-reply {
    padding: 12px 14px;
    border-radius: 12px;
    background: #f8fafc;
}

.suggestion-reply-admin {
    background: #eef4ff;
    border-left: 3px solid var(--navy);
}

.suggestion-reply-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.suggestion-reply-head strong {
    color: var(--navy);
    font-size: 14px;
}

.suggestion-reply-head span {
    color: var(--muted);
    font-size: 12px;
    white-space: nowrap;
}

.suggestion-reply p {
    margin: 0;
    line-height: 1.6;
    color: var(--text);
}

.notification-recipient-preview {
    margin-bottom: 0;
}

.notification-member-trigger {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin-top: 8px;
    padding: 14px 16px;
    border: 1px solid #dbe3ef;
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: var(--shadow);
    text-align: left;
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.notification-member-trigger:hover,
.notification-member-trigger:focus-visible {
    border-color: #93b4f6;
    outline: none;
    box-shadow: 0 8px 24px rgba(12, 31, 86, 0.08);
}

.notification-member-trigger.has-selection {
    border-color: rgba(12, 31, 86, 0.22);
    background: linear-gradient(180deg, #f8fbff 0%, #eef4ff 100%);
}

.notification-member-trigger-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #e8eefb;
    color: var(--navy);
    font-size: 20px;
    flex-shrink: 0;
}

.notification-member-trigger-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.notification-member-trigger-copy strong {
    color: var(--navy);
    font-size: 15px;
    line-height: 1.3;
}

.notification-member-trigger-copy small {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.4;
}

.notification-member-trigger-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    border-radius: 999px;
    background: var(--navy);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

.notification-member-trigger-arrow {
    color: var(--muted);
    font-size: 22px;
    line-height: 1;
    flex-shrink: 0;
}

.notification-member-sheet-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.48);
    z-index: 80;
    opacity: 0;
    transition: opacity 0.22s ease;
}

.notification-member-sheet-overlay.open {
    opacity: 1;
}

.notification-member-sheet {
    position: fixed;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%) translateY(100%);
    width: min(var(--app-max-width), 100%);
    max-height: min(88vh, 88dvh);
    display: flex;
    flex-direction: column;
    background: var(--white);
    border-radius: 20px 20px 0 0;
    padding: 12px 16px calc(16px + var(--safe-bottom));
    z-index: 90;
    box-shadow: 0 -10px 40px rgba(15, 23, 42, 0.18);
    transition: transform 0.25s ease;
}

.notification-member-sheet.open {
    transform: translateX(-50%) translateY(0);
}

.notification-member-sheet-handle {
    width: 42px;
    height: 4px;
    background: #dbe3ef;
    border-radius: 999px;
    margin: 0 auto 14px;
    flex-shrink: 0;
}

.notification-member-sheet-header {
    margin-bottom: 14px;
    flex-shrink: 0;
}

.notification-member-sheet-header h3 {
    margin: 0 0 4px;
    color: var(--navy);
    font-size: 20px;
}

.notification-member-sheet-header p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.notification-member-search {
    margin-bottom: 12px;
    flex-shrink: 0;
}

.notification-member-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #f8fafc;
    flex-shrink: 0;
}

.notification-member-selected-count {
    font-size: 13px;
    font-weight: 700;
    color: var(--navy);
    white-space: nowrap;
}

.notification-member-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-right: 2px;
    margin-bottom: 14px;
}

.notification-member-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--white);
    border: 1px solid #e8eef5;
    border-radius: 14px;
    padding: 12px 14px;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.notification-member-item:hover {
    border-color: #c7d7f5;
    box-shadow: 0 4px 14px rgba(12, 31, 86, 0.06);
}

.notification-member-item.hidden {
    display: none;
}

.notification-member-item input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.notification-member-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(180deg, #dbeafe 0%, #bfdbfe 100%);
    color: var(--navy);
    font-size: 16px;
    font-weight: 800;
    flex-shrink: 0;
}

.notification-member-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.notification-member-details strong {
    color: var(--navy);
    font-size: 15px;
    line-height: 1.3;
}

.notification-member-details span {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.3;
}

.notification-member-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    border: 2px solid #cbd5e1;
    color: transparent;
    font-size: 13px;
    font-weight: 800;
    flex-shrink: 0;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.notification-member-item:has(input:checked) {
    border-color: rgba(12, 31, 86, 0.28);
    background: linear-gradient(180deg, #f8fbff 0%, #eef4ff 100%);
}

.notification-member-item:has(input:checked) .notification-member-check {
    border-color: var(--navy);
    background: var(--navy);
    color: #fff;
}

.notification-member-sheet-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    flex-shrink: 0;
}

body.notification-sheet-open {
    overflow: hidden;
}

.status-pill {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.status-sent {
    background: #dcfce7;
    color: #166534;
}

.status-approved {
    background: #dcfce7;
    color: #166534;
}

.status-unapproved {
    background: #fee2e2;
    color: #991b1b;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    color: var(--text);
}

.radio-option input {
    width: 18px;
    height: 18px;
}

.member-search-select {
    position: relative;
}

.member-search-input-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f8fafc;
    border: 1px solid #dbe3ef;
    border-radius: 12px;
    padding: 0 12px;
}

.member-search-input-wrap .icon {
    color: var(--muted);
    font-size: 16px;
}

.member-search-input {
    width: 100%;
    border: 0;
    background: transparent;
    padding: 14px 0;
    font-size: 16px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.member-search-results {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    z-index: 30;
    background: var(--white);
    border: 1px solid #dbe3ef;
    border-radius: 12px;
    box-shadow: var(--shadow);
    max-height: 260px;
    overflow-y: auto;
}

.member-search-option {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    width: 100%;
    padding: 12px 14px;
    border: 0;
    background: transparent;
    text-align: left;
    cursor: pointer;
}

.member-search-option strong {
    color: var(--navy);
    font-size: 15px;
}

.member-search-option span {
    color: var(--muted);
    font-size: 13px;
}

.member-search-option:hover,
.member-search-option.active {
    background: #f8fafc;
}

.member-search-empty {
    padding: 14px;
    color: var(--muted);
    font-size: 14px;
}

/* Accounting module */
.menu-card.accounting .icon-wrap { background: #dcfce7; }
.menu-card.received .icon-wrap { background: #e0f2fe; }
.menu-card.given .icon-wrap { background: #ffe4e6; }
.menu-card.import .icon-wrap { background: #dbeafe; }
.menu-card.admin-report .icon-wrap { background: #fee2e2; }

.received-page .received-intro,
.given-page .given-intro {
    margin: -4px 0 18px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.45;
}

.received-page .accounting-entry-form select,
.given-page .accounting-entry-form select {
    width: 100%;
    border: 1px solid #dbe3ef;
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 16px;
    font-family: inherit;
    background: #fff;
    -webkit-appearance: none;
    appearance: none;
}

.received-page .received-actions,
.given-page .given-actions {
    margin-top: 8px;
}

.received-page .received-actions .btn-primary,
.given-page .given-actions .btn-primary {
    width: 100%;
}

.import-help {
    margin: 0 0 16px;
    color: #64748b;
    font-size: 14px;
    line-height: 1.5;
}

.import-columns {
    margin: 0 0 16px;
    padding-left: 20px;
    color: var(--navy);
    font-size: 14px;
    line-height: 1.7;
}

.import-submit {
    width: 100%;
    margin-top: 8px;
}

.text-received { color: #15803d; }
.text-given { color: #15803d; }
.text-due { color: #b91c1c; }

.accounting-intro {
    background: var(--white);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 14px;
    box-shadow: var(--shadow);
}

.accounting-intro p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}

.accounting-add-member-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    border: 0;
    border-radius: var(--radius);
    background: var(--navy);
    color: #fff;
    padding: 16px 18px;
    margin-bottom: 14px;
    box-shadow: var(--shadow);
    cursor: pointer;
    text-align: left;
    transition: transform 0.15s ease;
}

.accounting-add-member-btn:active {
    transform: scale(0.98);
}

.accounting-add-member-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.14);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    line-height: 1;
    flex-shrink: 0;
}

.accounting-add-member-btn strong {
    display: block;
    font-size: 16px;
    margin-bottom: 2px;
}

.accounting-add-member-btn small {
    display: block;
    color: rgba(255, 255, 255, 0.82);
    font-size: 13px;
    font-weight: 400;
}

.accounting-add-btn {
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
}

.accounting-member-list {
    margin-bottom: 16px;
}

.accounting-sort-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: -8px 0 16px;
}

.accounting-sort-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
}

.accounting-sort-btn {
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 6px 12px;
    background: var(--white);
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
}

.accounting-sort-btn.active {
    background: var(--navy);
    border-color: var(--navy);
    color: #fff;
}

.accounting-sort-btn.asc::after {
    content: ' \2191';
}

.accounting-sort-btn.desc::after {
    content: ' \2193';
}

.accounting-ledger-item {
    text-decoration: none;
    color: inherit;
}

.accounting-ledger-item-link {
    text-decoration: none;
    color: inherit;
    flex: 1;
    min-width: 0;
}

.accounting-list-export-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    padding: 12px 14px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.accounting-list-select-all {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 700;
    color: var(--navy);
    cursor: pointer;
    user-select: none;
}

.accounting-list-select-all input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--navy);
}

.accounting-list-export-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.accounting-list-export-btn {
    border: 1px solid #dbe3ef;
    background: #fff;
    color: var(--text);
    border-radius: 999px;
    padding: 9px 14px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-appearance: none;
    appearance: none;
}

.accounting-list-export-btn.primary {
    background: var(--navy);
    border-color: var(--navy);
    color: #fff;
}

.accounting-list-export-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.accounting-list-export-status {
    margin: 0 0 12px;
    font-size: 13px;
    color: var(--muted);
}

.accounting-list-export-status.is-error {
    color: #b91c1c;
}

.accounting-list-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    cursor: pointer;
    position: relative;
    z-index: 2;
}

.accounting-list-check input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
}

.accounting-list-check-ui {
    width: 20px;
    height: 20px;
    border: 2px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
    display: inline-block;
}

.accounting-list-check input:checked + .accounting-list-check-ui {
    background: var(--navy);
    border-color: var(--navy);
    box-shadow: inset 0 0 0 3px #fff;
}

.accounting-item-balance {
    flex-shrink: 0;
    align-self: center;
    text-align: right;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.2;
    white-space: nowrap;
    padding-left: 8px;
}

.accounting-item-balance.positive {
    color: #15803d !important;
}

.accounting-item-balance.negative {
    color: #b91c1c !important;
}

.accounting-dashboard-total {
    margin-bottom: 20px;
}

.accounting-summary-body {
    padding: 12px 14px 14px;
}

.accounting-summary-grid-dashboard {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.accounting-summary-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.accounting-summary-stat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: #f8fafc;
    border-radius: 12px;
    padding: 12px 14px;
    text-align: left;
}

.accounting-summary-stat span {
    display: block;
    margin-bottom: 0;
    font-size: 12px;
    color: var(--muted);
    line-height: 1.3;
    flex: 1;
    min-width: 0;
}

.accounting-summary-stat strong {
    display: block;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.2;
    text-align: right;
    flex-shrink: 0;
    white-space: nowrap;
}

.accounting-summary-stat strong.positive {
    color: #15803d;
}

.accounting-summary-stat strong.negative {
    color: #b91c1c;
}

.accounting-summary-net {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #eef2f7;
}

.accounting-summary-net span {
    font-size: 15px;
    font-weight: 700;
    color: var(--navy);
}

.accounting-summary-net strong {
    font-size: 20px;
    font-weight: 800;
    white-space: nowrap;
}

.accounting-summary-net strong.positive {
    color: #15803d;
}

.accounting-summary-net strong.negative {
    color: #b91c1c;
}

.accounting-section-title {
    margin: 0 0 12px;
    color: var(--navy);
    font-size: 16px;
    font-weight: 700;
}

.accounting-add-sheet {
    max-height: 88vh;
}

.accounting-add-results {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
    max-height: 240px;
    overflow-y: auto;
}

.accounting-search-selectable {
    width: 100%;
    border: 0;
    cursor: pointer;
    text-align: left;
}

.accounting-create-member {
    border-top: 1px solid #e5e7eb;
    padding-top: 14px;
    margin-top: 4px;
}

.accounting-create-hint {
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 14px;
}

.accounting-create-submit {
    width: 100%;
    margin-top: 4px;
}

.accounting-search-bar {
    margin-bottom: 8px;
}

.accounting-search-field {
    width: 100%;
}

.accounting-search-results {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.accounting-search-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: var(--white);
    border-radius: 12px;
    padding: 14px 16px;
    box-shadow: var(--shadow);
    transition: transform 0.15s ease;
}

.accounting-search-item:active {
    transform: scale(0.98);
}

.accounting-search-item-main {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.accounting-search-item-main strong {
    color: var(--navy);
    font-size: 15px;
}

.accounting-search-item-main span,
.accounting-search-item-mobile {
    color: var(--muted);
    font-size: 13px;
}

.accounting-search-empty {
    padding: 16px;
    text-align: center;
    color: var(--muted);
    background: var(--white);
    border-radius: 12px;
}

.accounting-ledger {
    padding-bottom: 88px;
}

.accounting-balance-card {
    position: sticky;
    top: 0;
    z-index: 20;
    background: var(--white);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 14px;
    box-shadow: var(--shadow);
}

.accounting-member-info {
    margin-bottom: 0;
}

.accounting-member-info-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    position: relative;
    z-index: 2;
}

.accounting-member-info-text {
    min-width: 0;
    flex: 1;
}

.accounting-member-info-text h3 {
    margin: 0 0 4px;
    color: var(--navy);
    font-size: 18px;
}

.accounting-member-info-text p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.accounting-share-btn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: none;
    border-radius: 999px;
    padding: 10px 14px;
    background: var(--navy);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.18);
    position: relative;
    z-index: 3;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    -webkit-appearance: none;
    appearance: none;
}

.accounting-share-btn:active {
    transform: scale(0.98);
}

.accounting-share-btn:disabled {
    opacity: 0.7;
    cursor: wait;
}

.accounting-share-btn-icon {
    width: 18px;
    height: 18px;
    display: block;
}

.accounting-share-sheet h3 {
    margin: 0 0 8px;
}

.accounting-share-subtitle {
    margin: 0 0 16px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.4;
}

.accounting-share-options {
    display: grid;
    gap: 10px;
    margin-bottom: 12px;
}

.accounting-share-option {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    border: 1px solid #dbe3ef;
    background: #fff;
    border-radius: 14px;
    padding: 14px 16px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    -webkit-appearance: none;
    appearance: none;
}

.accounting-share-option:active {
    transform: scale(0.99);
}

.accounting-share-option:disabled {
    opacity: 0.6;
    cursor: wait;
}

.accounting-share-option-icon {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 16px;
    line-height: 1;
}

.accounting-share-option-icon-print {
    background: #e0f2fe;
    color: #0369a1;
}

.accounting-share-option-icon-share {
    background: #dcfce7;
    color: #15803d;
}

.accounting-share-option-icon-download {
    background: #ede9fe;
    color: #6d28d9;
}

.accounting-share-option-icon-whatsapp {
    background: #dcfce7;
    color: #15803d;
    font-size: 11px;
    font-weight: 800;
}

.accounting-share-option-icon-gmail {
    background: #fee2e2;
    color: #b91c1c;
    font-size: 13px;
    font-weight: 800;
}

.accounting-share-print-frame {
    position: fixed;
    right: 0;
    bottom: 0;
    width: 0;
    height: 0;
    border: 0;
    visibility: hidden;
}

.accounting-share-status {
    margin: 0 0 12px;
    font-size: 13px;
    color: var(--muted);
    line-height: 1.4;
}

.accounting-share-status.is-error {
    color: #b91c1c;
}

.accounting-balance-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 12px;
}

.accounting-balance-stat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: #f8fafc;
    border-radius: 12px;
    padding: 12px 14px;
}

.accounting-balance-stat span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 0;
    flex: 1;
    min-width: 0;
}

.accounting-balance-stat strong {
    font-size: 15px;
    text-align: right;
    flex-shrink: 0;
    white-space: nowrap;
}

.accounting-current-balance {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 12px;
    padding: 14px 16px;
    font-size: 14px;
}

.accounting-current-balance.positive {
    background: #dcfce7;
    color: #166534;
}

.accounting-current-balance.negative {
    background: #fee2e2;
    color: #991b1b;
}

.accounting-current-balance strong {
    font-size: 20px;
}

.accounting-filters {
    margin-bottom: 14px;
}

.accounting-filter-group {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    margin-bottom: 8px;
    scrollbar-width: none;
}

.accounting-filter-group::-webkit-scrollbar {
    display: none;
}

.accounting-filter-chip,
.accounting-type-chip {
    flex: 0 0 auto;
    border: 1px solid #dbe3ef;
    background: var(--white);
    color: var(--text);
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.accounting-filter-chip.active,
.accounting-type-chip.active {
    background: var(--navy);
    border-color: var(--navy);
    color: #fff;
}

.accounting-custom-dates {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.accounting-custom-dates input[type="date"] {
    flex: 1;
    min-width: 120px;
    border: 1px solid #dbe3ef;
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 13px;
}

.accounting-filter-apply {
    border: 0;
    background: var(--gold);
    color: var(--navy-dark);
    border-radius: 10px;
    padding: 8px 14px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
}

.accounting-pull-indicator {
    text-align: center;
    color: var(--muted);
    font-size: 13px;
    padding: 8px 0 12px;
}

.accounting-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 24px 0;
    color: var(--muted);
    font-size: 14px;
}

.accounting-loading[hidden] {
    display: none !important;
}

.accounting-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid #dbe3ef;
    border-top-color: var(--navy);
    border-radius: 50%;
    animation: accounting-spin 0.8s linear infinite;
}

@keyframes accounting-spin {
    to { transform: rotate(360deg); }
}

.accounting-transaction-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.accounting-transaction-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 14px 16px;
    box-shadow: var(--shadow);
    border-left: 4px solid transparent;
    animation: accounting-fade-in 0.25s ease;
}

@keyframes accounting-fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.accounting-transaction-card.received {
    border-left-color: #22c55e;
}

.accounting-transaction-card.given {
    border-left-color: #22c55e;
}

.accounting-transaction-card.due {
    border-left-color: #ef4444;
}

.accounting-transaction-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.accounting-transaction-date {
    margin: 0;
    color: var(--navy);
    font-size: 14px;
    font-weight: 700;
}

.accounting-transaction-time {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.accounting-transaction-actions {
    display: flex;
    gap: 6px;
}

.accounting-action-btn {
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 8px;
    background: #f1f5f9;
    color: var(--muted);
    font-size: 14px;
    cursor: pointer;
}

.accounting-action-btn.delete {
    color: #b91c1c;
}

.accounting-transaction-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.accounting-transaction-type {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.accounting-transaction-card.received .accounting-transaction-type,
.accounting-transaction-card.received .accounting-transaction-amount {
    color: #15803d;
}

.accounting-transaction-card.given .accounting-transaction-type,
.accounting-transaction-card.given .accounting-transaction-amount {
    color: #15803d;
}

.accounting-transaction-card.due .accounting-transaction-type,
.accounting-transaction-card.due .accounting-transaction-amount {
    color: #b91c1c;
}

.accounting-transaction-amount {
    font-size: 18px;
}

.accounting-transaction-note {
    margin: 0 0 8px;
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
}

.accounting-transaction-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--muted);
    font-size: 12px;
}

.accounting-running-balance.positive { color: #15803d; font-weight: 700; }
.accounting-running-balance.negative { color: #b91c1c; font-weight: 700; }

.accounting-empty {
    text-align: center;
    padding: 48px 20px;
    color: var(--muted);
}

.accounting-empty-icon {
    font-size: 42px;
    margin-bottom: 10px;
}

.accounting-empty p {
    margin: 0;
    font-size: 15px;
}

.accounting-error {
    background: #fee2e2;
    color: #991b1b;
    border-radius: 12px;
    padding: 14px;
    font-size: 14px;
}

.accounting-fab {
    position: fixed;
    right: max(20px, calc(50% - var(--app-max-width) / 2 + 20px));
    bottom: calc(24px + var(--safe-bottom));
    width: 56px;
    height: 56px;
    border: 0;
    border-radius: 50%;
    background: var(--navy);
    color: #fff;
    font-size: 30px;
    line-height: 1;
    box-shadow: 0 8px 24px rgba(12, 31, 86, 0.35);
    cursor: pointer;
    z-index: 70;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    -webkit-appearance: none;
    appearance: none;
}

.accounting-fab:active {
    transform: scale(0.94);
}

@media (max-width: 430px) {
    .accounting-fab {
        right: 20px;
    }
}

.accounting-sheet-overlay,
.accounting-dialog-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 50;
    opacity: 0;
    transition: opacity 0.22s ease;
    pointer-events: none;
}

.accounting-sheet-overlay[hidden],
.accounting-dialog-overlay[hidden],
.accounting-sheet[hidden] {
    display: none !important;
}

.accounting-sheet-overlay.open,
.accounting-dialog-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.accounting-sheet {
    position: fixed;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%) translateY(100%);
    width: min(var(--app-max-width), 100%);
    max-height: 90vh;
    max-height: 90dvh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: var(--white);
    border-radius: 18px 18px 0 0;
    padding: 12px 18px calc(24px + var(--safe-bottom));
    z-index: 60;
    transition: transform 0.25s ease;
    box-shadow: 0 -8px 30px rgba(15, 23, 42, 0.18);
}

.accounting-sheet.open {
    transform: translateX(-50%) translateY(0);
}

.accounting-sheet-handle {
    width: 42px;
    height: 4px;
    background: #dbe3ef;
    border-radius: 999px;
    margin: 0 auto 12px;
}

.accounting-sheet h3 {
    margin: 0 0 16px;
    color: var(--navy);
    font-size: 18px;
}

.accounting-entry-form .form-group {
    margin-bottom: 14px;
}

.accounting-entry-form label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--navy);
}

.accounting-entry-form label .optional {
    font-weight: 400;
    color: var(--muted);
}

.accounting-entry-form input[type="number"],
.accounting-entry-form input[type="date"],
.accounting-entry-form input[type="time"],
.accounting-entry-form textarea {
    width: 100%;
    border: 1px solid #dbe3ef;
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 16px;
    font-family: inherit;
    -webkit-appearance: none;
    appearance: none;
}

.accounting-entry-form textarea {
    resize: vertical;
    min-height: 64px;
}

.accounting-readonly-field {
    background: #f8fafc;
    border-radius: 12px;
    padding: 12px 14px;
    color: var(--navy);
    font-weight: 600;
}

.accounting-entry-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.accounting-sheet-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 8px;
}

.btn-secondary,
.btn-primary,
.btn-danger {
    border: 0;
    border-radius: 12px;
    padding: 14px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

.btn-secondary {
    background: #f1f5f9;
    color: var(--text);
}

.btn-primary {
    background: var(--navy);
    color: #fff;
}

.btn-danger {
    background: #ef4444;
    color: #fff;
}

.accounting-dialog {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    width: min(360px, calc(100% - 32px));
    background: var(--white);
    border-radius: 16px;
    padding: 20px;
    z-index: 70;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    box-shadow: var(--shadow);
}

.accounting-dialog.open {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.accounting-dialog h4 {
    margin: 0 0 8px;
    color: var(--navy);
}

.accounting-dialog p {
    margin: 0 0 16px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}

.accounting-dialog-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

/* Cross-browser mobile responsive */
@media (max-width: 390px) {
    .otp-inputs {
        gap: 8px;
    }

    .otp-inputs input {
        width: 42px;
        height: 48px;
        font-size: 20px;
    }

    .header-add-btn {
        padding: 7px 10px;
        font-size: 11px;
    }

    .menu-grid {
        gap: 12px;
    }

    .menu-card {
        padding: 16px 12px;
    }

    .welcome-card {
        padding: 16px;
        gap: 12px;
    }
}

@media (max-width: 360px) {
    .otp-inputs {
        gap: 6px;
    }

    .otp-inputs input {
        width: 38px;
        height: 46px;
        font-size: 18px;
    }

    .app-header h1 {
        font-size: 16px;
    }

    .bottom-nav a {
        font-size: 10px;
        min-width: 56px;
    }

    .photo-upload-grid,
    .accounting-entry-form .form-row,
    .accounting-sheet-actions,
    .accounting-dialog-actions {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 320px) {
    .auth-screen {
        padding-left: 20px;
        padding-right: 20px;
    }

    .otp-screen {
        padding-left: 16px;
        padding-right: 16px;
    }

    .otp-inputs input {
        width: 36px;
        height: 44px;
    }
}

@media (hover: none) and (pointer: coarse) {
    .menu-card:active,
    .member-item:active,
    .event-item:active {
        transform: scale(0.98);
    }

    .header-btn,
    .filter-btn,
    .btn-gold,
    .btn-navy,
    .btn-primary,
    .btn-secondary {
        min-height: 44px;
    }

    .ba-card:active {
        transform: scale(0.98);
    }
}

/* Birthday & Anniversary */
.ba-screen {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ba-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    padding: 4px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.ba-tab {
    border: 0;
    background: transparent;
    color: var(--muted);
    border-radius: 10px;
    padding: 12px 8px;
    font-size: 14px;
    font-weight: 700;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.ba-tab.active {
    background: var(--navy);
    color: #fff;
    box-shadow: 0 4px 12px rgba(12, 31, 86, 0.24);
}

.ba-filters {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
}

.ba-filters::-webkit-scrollbar {
    display: none;
}

.ba-filter-chip {
    flex: 0 0 auto;
    border: 1px solid #dbe3ef;
    background: var(--white);
    color: var(--text);
    border-radius: 999px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.ba-filter-chip.active {
    background: var(--gold-bg);
    border-color: var(--gold);
    color: var(--navy-dark);
}

.ba-pull-indicator {
    text-align: center;
    color: var(--muted);
    font-size: 13px;
    padding: 4px 0 8px;
}

.ba-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ba-card {
    display: flex;
    gap: 14px;
    background: var(--white);
    border-radius: var(--radius);
    padding: 14px;
    box-shadow: var(--shadow);
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.ba-card-avatar {
    position: relative;
    width: 52px;
    height: 52px;
    flex-shrink: 0;
}

.ba-card-avatar-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #eef2ff, #fdf2f8);
    font-size: 22px;
}

.ba-card-avatar img {
    position: relative;
    z-index: 1;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    background: #e5e7eb;
}

.ba-card-body {
    flex: 1;
    min-width: 0;
}

.ba-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 4px;
}

.ba-card-head h3 {
    margin: 0;
    font-size: 16px;
    line-height: 1.3;
    color: var(--navy);
}

.ba-badge {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.ba-badge.birthday {
    background: #fef3c7;
    color: #92400e;
}

.ba-badge.anniversary {
    background: #fce7f3;
    color: #9d174d;
}

.ba-card-mobile {
    margin: 0 0 8px;
    font-size: 14px;
    color: var(--muted);
}

.ba-card-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    font-size: 12px;
    color: var(--muted);
}

.ba-card-id {
    font-weight: 600;
    color: var(--navy-light);
}

.ba-card-date {
    font-weight: 600;
}

.ba-card-meta {
    font-weight: 700;
    color: var(--gold);
}

.ba-empty {
    text-align: center;
    padding: 48px 20px;
    color: var(--muted);
}

.ba-empty-icon {
    font-size: 42px;
    margin-bottom: 10px;
}

.ba-empty p {
    margin: 0;
    font-size: 15px;
}

.member-list-header {
    margin-bottom: 12px;
}

.member-total-count {
    display: inline-block;
    background: var(--white);
    border-radius: var(--radius);
    padding: 10px 14px;
    box-shadow: var(--shadow);
    font-size: 14px;
    color: var(--navy);
}

.member-srno {
    width: 28px;
    flex-shrink: 0;
    font-size: 13px;
    font-weight: 700;
    color: var(--muted);
    text-align: center;
}

.member-list-with-srno .member-item {
    align-items: center;
}

#memberList .member-item {
    display: grid;
    grid-template-columns: 22px 28px minmax(0, 1fr) 24px;
    align-items: start;
    gap: 8px 10px;
    padding: 14px;
}

#memberList .member-list-check {
    grid-column: 1;
    grid-row: 1;
}

#memberList .member-srno {
    grid-column: 2;
    grid-row: 1;
    padding-top: 4px;
}

#memberList .member-item-main {
    grid-column: 3;
    grid-row: 1;
    align-items: flex-start;
    width: 100%;
    min-width: 0;
}

#memberList .member-arrow-link {
    grid-column: 4;
    grid-row: 1;
    align-self: flex-start;
    justify-self: end;
    padding-top: 2px;
}

#memberList .member-balance-link,
#memberList .member-approval-actions {
    grid-row: 2;
    min-width: 0;
    box-sizing: border-box;
}

#memberList .member-balance-link {
    grid-column: 3 / -1;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-start;
    gap: 2px;
    justify-self: end;
    width: auto;
    min-width: 88px;
    max-width: 132px;
    margin-top: 6px;
    padding: 7px 10px;
    border-radius: 8px;
    text-align: right;
}

#memberList .member-balance-link .member-balance-label {
    margin-bottom: 0;
    font-size: 8px;
    letter-spacing: 0.05em;
    line-height: 1.2;
    opacity: 0.85;
}

#memberList .member-balance-link strong {
    font-size: 14px;
    line-height: 1.2;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

#memberList .member-approval-actions {
    grid-column: 1 / -1;
    flex-direction: row;
    gap: 8px;
    width: 100%;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #eef2f7;
    background: transparent;
}

#memberList .member-approval-actions form,
#memberList .member-approval-actions button {
    flex: 1;
    width: 100%;
}

#memberList .member-info h4 {
    white-space: normal;
    overflow: visible;
    overflow-wrap: anywhere;
    text-overflow: clip;
    line-height: 1.35;
}

#memberList .member-info p {
    overflow-wrap: anywhere;
}

#memberList .member-info p + p {
    margin-top: 3px;
}

#memberList .member-spouse,
#memberList .member-firm {
    width: 100%;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
}

#memberList .member-mobile,
#memberList .member-mobile .mobile-call,
#memberList .member-mobile .mobile-call-btn {
    white-space: nowrap;
}

#memberList .member-info .mobile-call {
    margin-top: 0;
}

@media (max-width: 640px) {
    .search-bar {
        align-items: stretch;
    }

    .search-field {
        min-width: 0;
    }

    .list-export-btn {
        padding-right: 10px;
        padding-left: 10px;
    }

    #directorList .director-manage-item {
        display: grid;
        grid-template-columns: 28px 42px minmax(0, 1fr);
        align-items: start;
        gap: 10px;
        padding: 14px 12px;
    }

    #directorList .member-srno {
        grid-column: 1;
        grid-row: 1;
        padding-top: 2px;
    }

    #directorList .member-avatars {
        grid-column: 2;
        grid-row: 1;
    }

    #directorList .member-info {
        grid-column: 3;
        grid-row: 1;
        width: 100%;
    }

    #directorList .member-info h4 {
        white-space: normal;
        overflow: visible;
        overflow-wrap: anywhere;
        text-overflow: clip;
    }

    #directorList .member-info p {
        overflow-wrap: anywhere;
    }

    #directorList .director-manage-actions {
        grid-column: 2 / 4;
        grid-row: 2;
        flex-direction: row;
        width: 100%;
    }

    #directorList .director-manage-actions > * {
        flex: 1;
    }

    #directorList .director-manage-actions .btn-approve,
    #directorList .director-manage-actions .btn-reject {
        width: 100%;
    }
}

.accounting-summary-card .accounting-summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 0 14px 14px;
}

.accounting-summary-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: #f8fafc;
    border-radius: 10px;
    padding: 12px 14px;
}

.accounting-summary-item.full-width {
    grid-column: 1 / -1;
}

.accounting-summary-item label {
    display: block;
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 0;
    flex: 1;
    min-width: 0;
}

.accounting-summary-item strong {
    font-size: 15px;
    color: var(--navy);
    text-align: right;
    flex-shrink: 0;
    white-space: nowrap;
}

.accounting-summary-item strong.positive,
.accounting-summary-item strong.text-received {
    color: #15803d;
}

.accounting-summary-item strong.negative,
.accounting-summary-item strong.text-given {
    color: #b91c1c;
}

.time-picker {
    display: flex;
    align-items: center;
    gap: 6px;
}

.time-picker-part {
    flex: 1;
    min-width: 0;
    height: 44px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--white);
    padding: 0 8px;
    font-size: 14px;
}

.accounting-transaction-history {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed var(--border);
}

.accounting-history-item {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.5;
}

.accounting-transaction-card.system-entry {
    border-left: 3px solid #94a3b8;
}

.accounting-transaction-event,
.accounting-transaction-attachment {
    margin: 6px 0 0;
    font-size: 13px;
}

.accounting-transaction-attachment a,
.accounting-attachment-existing a {
    color: var(--navy);
    font-weight: 600;
}

.accounting-attachment-existing {
    margin-top: 8px;
    font-size: 13px;
}

.dues-header {
    margin-bottom: 12px;
    color: var(--muted);
    font-size: 14px;
}

.dues-page {
    display: flex;
    flex-direction: column;
    min-height: calc(100dvh - var(--header-total) - 32px);
}

.dues-tabs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    padding: 4px;
    margin-bottom: 16px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.dues-tab {
    border: 0;
    background: transparent;
    color: var(--muted);
    border-radius: 10px;
    padding: 12px 8px;
    font-size: 14px;
    font-weight: 700;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.dues-tab.active {
    background: var(--navy);
    color: #fff;
    box-shadow: 0 4px 12px rgba(12, 31, 86, 0.24);
}

.dues-tab-panel {
    display: none;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.dues-tab-panel.active {
    display: flex;
}

.dues-add-layout {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.dues-add-scroll {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    min-height: 0;
    padding-bottom: 8px;
}

.dues-select-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.dues-select-toolbar .dues-submit-btn {
    width: auto;
    padding: 10px 20px;
    flex-shrink: 0;
}

.dues-member-item {
    cursor: default;
    text-decoration: none;
    color: inherit;
    align-items: stretch;
    gap: 0;
    flex-direction: column;
}

.dues-member-card-main {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
}

.dues-member-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
}

.dues-member-select {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    flex-shrink: 0;
}

.dues-member-select input[type="checkbox"] {
    margin-right: 0;
}

.dues-detail-btn {
    flex-shrink: 0;
    min-width: 72px;
    padding: 8px 12px;
    font-size: 13px;
}

.dues-detail-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.dues-detail-summary-item {
    background: var(--bg);
    border-radius: 12px;
    padding: 12px;
}

.dues-detail-summary-item label {
    display: block;
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 4px;
}

.dues-detail-summary-item strong {
    font-size: 16px;
    color: var(--navy);
}

.dues-payment-detail-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 50vh;
    overflow-y: auto;
    margin-bottom: 12px;
}

.dues-payment-detail-card {
    background: var(--bg);
    border-radius: 12px;
    padding: 12px 14px;
}

.dues-payment-detail-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 6px;
}

.dues-payment-detail-head strong {
    color: #15803d;
    font-size: 16px;
}

.dues-payment-detail-date {
    margin: 0;
    font-size: 13px;
    color: var(--navy);
    font-weight: 600;
}

.dues-payment-detail-time {
    margin: 2px 0 0;
    font-size: 12px;
    color: var(--muted);
}

.dues-payment-detail-note,
.dues-payment-detail-meta {
    margin: 6px 0 0;
    font-size: 13px;
    color: var(--text);
}

.dues-member-item .member-info {
    flex: 1;
    min-width: 0;
}

.dues-member-item .member-info h4 {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    word-break: break-word;
}

.dues-member-item .member-info p {
    word-break: break-word;
}

.dues-member-item .member-accounting-stats {
    margin-left: 0;
    flex: 1;
}

.dues-member-item .dues-amount-stat.negative strong {
    color: #b91c1c;
}

.dues-detail-summary-item strong.negative {
    color: #b91c1c;
}

.dues-member-item input[type="checkbox"] {
    margin-right: 8px;
}

.dues-history-title {
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 700;
    color: var(--navy);
}

.dues-history-meta {
    margin: 8px 0 0;
    font-size: 14px;
    color: var(--text);
}

.dues-history-actions {
    margin-top: 12px;
}

.dues-members-btn {
    min-width: 120px;
}

.dues-members-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 55vh;
    overflow-y: auto;
    margin-bottom: 12px;
}

.dues-members-empty {
    color: var(--muted);
    text-align: center;
    padding: 16px 0;
}

.dues-member-row {
    background: var(--bg);
    border-radius: 12px;
    padding: 14px;
}

.dues-member-row-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: flex-start;
}

.dues-member-row-head h4 {
    margin: 0 0 4px;
    color: var(--navy);
    font-size: 15px;
}

.dues-member-row-head p {
    margin: 0;
    font-size: 13px;
    color: var(--muted);
}

.dues-member-row-meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    margin-top: 10px;
    font-size: 13px;
}

.dues-member-row-actions {
    display: flex;
    gap: 6px;
}

.dues-payment-status {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.04em;
}

.dues-payment-status.paid {
    color: #15803d;
}

.dues-payment-status.pending {
    color: #b45309;
}

.dues-edit-member {
    padding: 12px 14px;
    background: var(--bg);
    border-radius: 10px;
    font-weight: 600;
    color: var(--navy);
}

.audit-log-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.audit-log-filters .accounting-filter-chip {
    text-decoration: none;
}

.audit-log-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.audit-log-item {
    background: var(--white);
    border-radius: var(--radius);
    padding: 14px;
    box-shadow: var(--shadow);
}

.audit-log-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.audit-log-head strong {
    color: var(--navy);
}

.audit-log-head span {
    font-size: 12px;
    color: var(--muted);
}

.audit-log-body p {
    margin: 0 0 4px;
    font-size: 13px;
    color: var(--muted);
}

.audit-log-label {
    color: var(--muted);
    font-size: 12px;
    margin-right: 4px;
}

.audit-log-target strong,
.audit-log-actor strong {
    color: var(--navy);
}

.audit-log-details {
    margin: 6px 0 8px;
    padding-left: 18px;
    font-size: 12px;
    color: var(--muted);
}

.audit-log-details li {
    margin-bottom: 2px;
}

.audit-log-when {
    margin-top: 6px !important;
    font-size: 12px !important;
}

.accounting-event-filter {
    align-items: center;
    gap: 8px;
}

.accounting-event-filter label {
    font-size: 13px;
    color: var(--muted);
    white-space: nowrap;
}

.accounting-event-select {
    width: 100%;
    min-height: 40px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--white);
    padding: 0 10px;
    font-size: 14px;
}

.accounting-dashboard-filters {
    margin: 0 16px 12px;
}

.accounting-page {
    margin: 0 16px 16px;
}

.accounting-tabs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    padding: 4px;
    margin-bottom: 12px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}


.accounting-tab {
    border: 0;
    background: transparent;
    color: var(--muted);
    border-radius: 10px;
    padding: 12px 8px;
    font-size: 14px;
    font-weight: 700;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.accounting-tab.active {
    background: var(--navy);
    color: #fff;
    box-shadow: 0 4px 12px rgba(12, 31, 86, 0.24);
}

.accounting-tab-panel {
    display: none;
}

.accounting-tab-panel.active {
    display: block;
}

.accounting-tab-panel.accounting-wallet-card {
    margin: 0;
    padding: 14px 16px;
}

.accounting-history-search-bar {
    margin: 0 0 12px;
}

.accounting-item-due.due {
    color: #b45309 !important;
}

.accounting-item-due.paid {
    color: #15803d !important;
}

.accounting-wallet-host {
    display: block;
}

.accounting-wallet-empty-state {
    padding: 12px 0;
    text-align: center;
    font-size: 13px;
    color: var(--muted);
}


.accounting-wallet-card {
    margin: 0 16px 12px;
    padding: 14px 16px;
}

.accounting-wallet-card.accounting-summary-expandable .accounting-summary-toggle-btn {
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 10px;
    margin-bottom: 10px;
}

.accounting-wallet-summary-body {
    padding-bottom: 2px;
}

.accounting-wallet-details {
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.accounting-wallet-list-compact {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 0;
}

.accounting-wallet-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #f8fafc;
    font-size: 12px;
}

.accounting-wallet-chip-own {
    border-color: var(--primary, #2563eb);
    background: #eff6ff;
}

.accounting-wallet-chip-name {
    color: var(--navy);
    font-weight: 600;
}

.accounting-wallet-chip-amount {
    font-size: 12px;
}

.accounting-wallet-receive {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.accounting-wallet-receive-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 4px;
}

.accounting-wallet-receive-hint {
    margin: 0 0 10px;
    font-size: 12px;
    color: var(--muted);
}

.accounting-wallet-search-bar {
    margin: 0 0 10px;
}

.accounting-wallet-search-field {
    width: 100%;
}

.accounting-wallet-search-results {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
}

.accounting-wallet-search-empty {
    margin: 0;
    padding: 8px 10px;
    font-size: 12px;
    color: var(--muted);
    background: #f8fafc;
    border-radius: 8px;
}

.accounting-wallet-receive-form {
    margin-top: 4px;
}

.accounting-wallet-selected-member {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid var(--border);
}

.accounting-wallet-ledger-link {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary, #2563eb);
    text-decoration: none;
    white-space: nowrap;
}

.accounting-wallet-receive-submit {
    width: 100%;
    margin-top: 4px;
}

.accounting-wallet-receive-status {
    margin: 10px 0 0;
    font-size: 13px;
    text-align: center;
}

.accounting-wallet-receive-status.error {
    color: #b91c1c;
}

.accounting-wallet-receive-status.success {
    color: #15803d;
}

.accounting-quick-actions {
    display: flex;
    gap: 10px;
    margin: 0 16px 16px;
}

.accounting-quick-action {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 14px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--white);
    color: var(--navy);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    box-shadow: var(--shadow);
}

.accounting-quick-action span[aria-hidden="true"] {
    font-size: 16px;
    line-height: 1;
}

.accounting-wallet-card.is-expanded .accounting-wallet-summary-body {
    display: none;
}

.accounting-wallet-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.accounting-wallet-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--white);
    color: inherit;
    text-align: left;
    cursor: pointer;
    font: inherit;
    -webkit-tap-highlight-color: transparent;
}

.accounting-wallet-chevron {
    color: var(--muted);
    font-size: 20px;
    line-height: 1;
}

.accounting-wallet-dialog-summary {
    margin-bottom: 14px;
    padding: 12px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid var(--border);
}

.accounting-wallet-dialog-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.accounting-wallet-dialog-summary-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.accounting-wallet-dialog-summary-item span,
.accounting-wallet-dialog-summary-total span {
    font-size: 11px;
    color: var(--muted);
    font-weight: 600;
}

.accounting-wallet-dialog-summary-item strong,
.accounting-wallet-dialog-summary-total strong {
    font-size: 15px;
    line-height: 1.2;
}

.accounting-wallet-dialog-summary-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.accounting-wallet-detail-type-due {
    color: #b91c1c;
}

.accounting-wallet-detail-type-receipt,
.accounting-wallet-detail-type-payment {
    color: #15803d;
}

.accounting-wallet-detail-type-expense {
    color: #b91c1c;
}

.accounting-wallet-dialog-entry {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.accounting-wallet-dialog-entry-title,
.accounting-wallet-dialog-history-title {
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 700;
    color: var(--navy);
}

.accounting-wallet-type-chips {
    display: flex;
    gap: 8px;
}

.accounting-wallet-type-chips .accounting-type-chip {
    flex: 1;
    border: 1px solid var(--border);
    background: #f8fafc;
    color: var(--navy);
    border-radius: 999px;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.accounting-wallet-type-chips .accounting-type-chip.active {
    background: var(--navy);
    border-color: var(--navy);
    color: #fff;
}

.accounting-wallet-dialog-form {
    margin-top: 10px;
}

.accounting-wallet-received-only[hidden] {
    display: none !important;
}

.accounting-wallet-dialog-submit {
    width: 100%;
    margin-top: 4px;
}

.accounting-wallet-dialog-history {
    margin-top: 4px;
}

.accounting-wallet-block {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.accounting-wallet-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.accounting-wallet-detail-btn {
    border: 1px solid var(--border);
    background: #f8fafc;
    color: var(--navy);
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.accounting-wallet-sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.accounting-wallet-sheet-head h3 {
    margin: 0;
    flex: 1;
    min-width: 0;
}

.accounting-wallet-sheet-head .accounting-share-btn {
    flex-shrink: 0;
}

.accounting-wallet-sheet-head .accounting-share-btn[hidden] {
    display: none !important;
}

.accounting-wallet-sheet .accounting-wallet-sheet-body {
    max-height: min(72vh, 620px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 12px;
}

.accounting-wallet-detail-summary {
    margin-bottom: 8px;
    font-size: 13px;
    color: var(--muted);
}

.accounting-wallet-detail-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.accounting-wallet-detail-item {
    padding: 10px;
    border-radius: 8px;
    background: var(--white);
    border: 1px solid var(--border);
}

.accounting-wallet-detail-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}

.accounting-wallet-detail-title {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.accounting-wallet-detail-type {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
}

.accounting-wallet-detail-side {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.accounting-wallet-delete-btn {
    width: 30px;
    height: 30px;
    padding: 0;
}

.accounting-wallet-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    font-size: 12px;
    color: var(--muted);
}

.accounting-wallet-detail-note {
    margin-top: 6px;
    font-size: 12px;
    color: #374151;
}

.accounting-wallet-loading,
.accounting-wallet-empty {
    font-size: 13px;
    color: var(--muted);
    text-align: center;
    padding: 8px 0;
}

.accounting-wallet-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.accounting-wallet-info span {
    font-size: 12px;
    color: var(--muted);
}

.accounting-wallet-item-own {
    border-color: var(--primary, #2563eb);
    background: #eff6ff;
}

.accounting-expense-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.accounting-dashboard-total-top {
    margin-bottom: 16px;
}

.accounting-dashboard-total-top .accounting-summary-body {
    padding: 14px;
}

.accounting-dashboard-total-top .accounting-summary-split {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 8px;
}

.accounting-dashboard-total-top .accounting-summary-bottom {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 0;
}

.accounting-dashboard-total-top .accounting-summary-stat {
    padding: 10px 6px;
    min-width: 0;
}

.accounting-dashboard-total-top .accounting-summary-stat span {
    margin-bottom: 6px;
    font-size: 11px;
    line-height: 1.2;
}

.accounting-dashboard-total-top .accounting-summary-stat strong {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 480px) {
    .accounting-dashboard-total-top .accounting-summary-split {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .accounting-dashboard-total-top .accounting-summary-split:not(.accounting-summary-bottom) .accounting-summary-stat:first-child {
        grid-column: 1 / -1;
    }

    .accounting-dashboard-total-top .accounting-summary-stat strong {
        font-size: 12px;
    }
}

.mobile-call {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
}

.mobile-call-link,
.mobile-call-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: inherit;
    text-decoration: none;
    background: none;
    border: 0;
    padding: 0;
    margin: 0;
    font: inherit;
    cursor: pointer;
    max-width: 100%;
}

.mobile-call-link:hover,
.mobile-call-link:focus,
.mobile-call-btn:hover,
.mobile-call-btn:focus {
    color: var(--primary, #1d4ed8);
}

.mobile-call-number {
    min-width: 0;
}

.mobile-call-icon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: #dcfce7;
    color: #15803d;
    font-size: 12px;
    line-height: 1;
}

.mobile-call-disabled {
    color: inherit;
    cursor: default;
}

.mobile-call-disabled .mobile-call-icon {
    display: none;
}

.mobile-call-digits-only {
    display: inline;
}

.mobile-call-digits-only .mobile-call-number.mobile-call-link,
.mobile-call-digits-only .mobile-call-number.mobile-call-btn {
    display: inline;
    gap: 0;
    color: var(--primary, #1d4ed8);
    text-decoration: none;
}

.mobile-call-digits-only .mobile-call-number.mobile-call-link:hover,
.mobile-call-digits-only .mobile-call-number.mobile-call-link:focus,
.mobile-call-digits-only .mobile-call-number.mobile-call-btn:hover,
.mobile-call-digits-only .mobile-call-number.mobile-call-btn:focus {
    text-decoration: underline;
}

.member-info .mobile-call,
.notification-meta .mobile-call,
.notification-member-details .mobile-call,
.dues-member-item .mobile-call,
.ba-card-mobile .mobile-call {
    margin-top: 2px;
}

/* Member registration & approval */
.auth-choice-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 18px;
}

.auth-choice-card {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #fff;
    text-decoration: none;
    text-align: left;
    box-sizing: border-box;
}

a.auth-choice-card:hover,
a.auth-choice-card:focus {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(212, 160, 23, 0.55);
}

.auth-choice-card.is-active {
    background: var(--white);
    border-color: transparent;
    color: var(--navy);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.auth-choice-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.14);
    font-size: 20px;
    flex-shrink: 0;
}

.auth-choice-card.is-active .auth-choice-icon {
    background: #eff6ff;
}

.auth-choice-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.auth-choice-text strong {
    font-size: 15px;
    line-height: 1.3;
}

.auth-choice-text small {
    font-size: 12px;
    opacity: 0.82;
    line-height: 1.35;
}

.auth-choice-card.is-active .auth-choice-text small {
    color: var(--muted);
    opacity: 1;
}

.auth-choice-arrow {
    font-size: 22px;
    line-height: 1;
    opacity: 0.85;
    flex-shrink: 0;
}

.auth-login-panel {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    padding: 16px;
}

.auth-alt-link {
    margin-top: 18px;
    text-align: center;
    color: rgba(255, 255, 255, 0.92);
    font-size: 14px;
}

.auth-alt-link a,
.auth-link-btn {
    color: var(--gold-light);
    font-weight: 600;
    text-decoration: none;
}

.auth-link-btn {
    display: block;
    text-align: center;
    margin-top: 16px;
}

.member-register-screen .member-register-wrap {
    flex: 1;
}

.member-register-wrap .member-form {
    margin-top: 0;
}

.member-register-wrap .form-section {
    background: var(--white);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 14px;
    box-shadow: var(--shadow);
}

.member-register-wrap .form-section h3 {
    margin: 0 0 12px;
    color: var(--navy);
    font-size: 15px;
}

.pending-approval-note {
    color: rgba(255, 255, 255, 0.95);
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 8px;
}

.member-filter-wrap {
    position: relative;
}

.filter-btn.active {
    border-color: var(--gold);
    background: #fffbeb;
}

.member-filter-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 190px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
    z-index: 20;
    overflow: hidden;
}

.member-filter-option {
    display: block;
    padding: 12px 14px;
    color: var(--navy);
    text-decoration: none;
    font-size: 14px;
    border-bottom: 1px solid var(--border);
}

.member-filter-option:last-child {
    border-bottom: 0;
}

.member-filter-option.active {
    background: #eff6ff;
    font-weight: 600;
}

.member-status-badge {
    display: inline-block;
    margin-left: 8px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.member-status-badge.pending {
    background: #fef3c7;
    color: #92400e;
}

.member-status-badge.hidden {
    background: #f3f4f6;
    color: #4b5563;
}

.member-status-badge.inactive {
    background: #fee2e2;
    color: #991b1b;
}

.member-pending-label {
    color: #b45309 !important;
    font-weight: 600;
}

.member-hidden-label {
    color: #6b7280 !important;
    font-weight: 600;
}

.member-inactive-label {
    color: #b91c1c !important;
    font-weight: 600;
}

.member-hidden-banner {
    background: #f9fafb;
    border-color: #d1d5db;
    color: #374151;
}

.member-inactive-banner {
    background: #fef2f2;
    border-color: #fecaca;
    color: #7f1d1d;
}

.member-status-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.member-status-form {
    flex: 1;
}

.member-status-form button {
    width: 100%;
}

.field-hint {
    display: block;
    margin-top: 6px;
    color: #6b7280;
    font-size: 12px;
}

.member-pending-banner {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    color: #92400e;
}

.member-pending-banner p {
    margin: 6px 0 0;
}

.member-approval-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
}

.member-approval-form {
    margin: 0;
}

.btn-approve,
.btn-reject {
    border: none;
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.btn-approve {
    background: #dcfce7;
    color: #166534;
}

.btn-reject {
    background: #fee2e2;
    color: #991b1b;
}

.member-approval-bar {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    margin-bottom: 14px;
}

.member-approval-bar .btn-approve,
.member-approval-bar .btn-reject {
    width: 100%;
    padding: 14px 16px;
    font-size: 14px;
}

.member-list-pending .member-item {
    align-items: flex-start;
}

.member-list-pending .member-item-main {
    align-items: flex-start;
}

.admin-accounting-report {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding-bottom: 24px;
}

.admin-report-summary-card .accounting-summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 8px;
    padding: 0 14px 14px;
}

.admin-report-summary-card .accounting-summary-item:nth-child(1) {
    grid-column: 2;
    grid-row: 1;
    padding: 8px 12px;
}

.admin-report-summary-card .accounting-summary-item:nth-child(2) {
    grid-column: 2;
    grid-row: 2;
    padding: 8px 12px;
}

.admin-report-summary-card .accounting-summary-item.full-width {
    grid-column: 1;
    grid-row: 1 / span 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    height: 100%;
    padding: 12px;
}

.admin-report-summary-card {
    margin-bottom: 0;
}

.admin-report-summary-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0 14px 14px;
}

.admin-report-admin-card {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 10px 12px;
}

.admin-report-admin-card > div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.admin-report-admin-head {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    margin-bottom: 0;
    flex: 1;
    min-width: 0;
}

.admin-report-admin-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.admin-report-admin-info strong {
    font-size: 14px;
    color: var(--navy);
    line-height: 1.25;
    word-break: break-word;
}

.admin-report-admin-info span {
    font-size: 11px;
    color: var(--muted);
}

.admin-report-admin-balance {
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}

.admin-report-admin-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    flex-shrink: 0;
    width: 150px;
}

.admin-report-admin-stat {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 4px 6px;
    text-align: center;
    min-width: 0;
}

.admin-report-admin-stat label {
    display: block;
    font-size: 9px;
    color: var(--muted);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-report-admin-stat strong {
    font-size: 11px;
    line-height: 1.2;
    word-break: break-word;
}

.admin-report-filters {
    background: var(--white);
    border-radius: var(--radius);
    padding: 14px;
    box-shadow: var(--shadow);
}

.admin-report-filters .accounting-filter-group {
    margin-bottom: 8px;
}

.admin-report-filters .accounting-event-filter {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
}

.admin-report-filters .accounting-event-select {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.admin-report-member-filter {
    position: relative;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    min-width: 0;
}

.admin-report-member-results {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 20;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
    max-height: 220px;
    overflow-y: auto;
}

.admin-report-member-option {
    display: block;
    width: 100%;
    padding: 12px 14px;
    border: 0;
    background: transparent;
    text-align: left;
    font: inherit;
    color: var(--text);
    cursor: pointer;
}

.admin-report-member-option:hover:not(:disabled) {
    background: #f8fafc;
}

.admin-report-export-bar {
    margin-top: 0;
}

.admin-report-export-bar .accounting-list-export-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    gap: 8px;
}

.admin-report-export-bar .accounting-list-export-btn {
    width: 100%;
    justify-content: center;
    padding: 11px 10px;
    font-size: 12px;
}

.admin-report-detail-title {
    margin: 0;
    padding: 0 2px;
    font-size: 16px;
}

.admin-report-tx-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 14px;
    box-shadow: var(--shadow);
    border-left: 4px solid transparent;
}

.admin-report-tx-card.received {
    border-left-color: #22c55e;
}

.admin-report-tx-card.given {
    border-left-color: #ef4444;
}

.admin-report-tx-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.admin-report-tx-head-main {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.admin-report-tx-type {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.admin-report-tx-card.received .admin-report-tx-type,
.admin-report-tx-card.received .admin-report-tx-amount {
    color: #15803d;
}

.admin-report-tx-card.given .admin-report-tx-type,
.admin-report-tx-card.given .admin-report-tx-amount {
    color: #b91c1c;
}

.admin-report-tx-date {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.4;
}

.admin-report-tx-amount {
    font-size: 18px;
    white-space: nowrap;
    flex-shrink: 0;
}

.admin-report-tx-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid #eef2f7;
}

.admin-report-tx-row {
    display: grid;
    grid-template-columns: minmax(92px, 34%) minmax(0, 1fr);
    gap: 10px;
    align-items: start;
}

.admin-report-tx-row span {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.45;
}

.admin-report-tx-row strong {
    font-size: 13px;
    color: var(--text);
    line-height: 1.45;
    font-weight: 600;
    word-break: break-word;
}

.admin-report-tx-history {
    margin-top: 4px;
    padding-top: 10px;
    border-top: 1px dashed #e5e7eb;
    font-size: 12px;
    color: var(--muted);
}

.admin-report-tx-history ul {
    margin: 8px 0 0;
    padding-left: 18px;
}

.admin-report-tx-history li + li {
    margin-top: 6px;
}

.admin-report-empty {
    padding: 16px 4px;
    text-align: center;
    color: var(--muted);
    font-size: 14px;
}

.admin-report-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 4px 0 8px;
    flex-wrap: wrap;
}

.admin-report-pagination span {
    font-size: 12px;
    color: var(--muted);
    text-align: center;
    flex: 1 1 100%;
    order: -1;
}

.admin-report-pagination .accounting-filter-apply {
    flex: 1 1 auto;
    min-width: 110px;
}

#adminReportTransactionList {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

@media (min-width: 640px) {
    .admin-report-admin-stats {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .admin-report-export-bar .accounting-list-export-actions {
        display: flex;
        justify-content: flex-end;
    }

    .admin-report-export-bar .accounting-list-export-btn {
        width: auto;
        font-size: 13px;
    }

    .admin-report-pagination span {
        flex: 1 1 auto;
        order: 0;
        text-align: center;
    }
}

/* Event total given pill and details sheet styles */
.event-total-amount-btn {
    display: inline-block;
    color: var(--navy);
    background-color: var(--gold-bg);
    border: 1px solid var(--gold);
    border-radius: 6px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}

.event-total-amount-btn strong {
    color: var(--navy-dark);
}

.event-total-amount-btn:hover {
    background-color: var(--gold-light);
    transform: translateY(-1px);
}

.event-total-amount-btn:active {
    transform: translateY(0);
}

.event-transactions-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
    margin-bottom: 20px;
}

.event-tx-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px;
}

.event-tx-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.event-tx-member {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.event-tx-amount {
    font-size: 14px;
    font-weight: 700;
    color: #16a34a;
}

.event-tx-meta {
    font-size: 11px;
    color: var(--muted);
}

.event-tx-remarks {
    font-size: 12px;
    color: #475569;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px dashed #e2e8f0;
    font-style: italic;
}

.event-transactions-empty {
    text-align: center;
    padding: 30px 10px;
    color: var(--muted);
    font-size: 14px;
}

.event-transactions-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 8px;
}

.event-transactions-header h3 {
    margin: 0 !important;
}

.event-tx-actions {
    display: flex;
    gap: 8px;
}

.btn-primary-outline {
    background: transparent;
    border: 1px solid var(--navy);
    color: var(--navy);
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: background 0.2s, color 0.2s;
}

.btn-primary-outline:hover {
    background: var(--navy);
    color: var(--white);
}

.event-tx-total-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 14px;
    padding: 12px 14px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid var(--border);
}

.event-tx-total-bar span {
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
}

.event-tx-total-bar strong {
    font-size: 18px;
    font-weight: 800;
    color: #15803d;
}

.event-tx-filter-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    font-size: 13px;
    color: var(--text);
}

.event-tx-filter-row label {
    font-weight: 600;
    color: var(--navy);
    flex-shrink: 0;
}

.event-tx-filter-row select {
    flex: 1;
    border: 1px solid #dbe3ef;
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 13px;
    background: var(--white);
    color: var(--text);
    outline: none;
}

.event-tx-filter-row select:focus {
    border-color: var(--gold);
}


