:root {
    --background: #eef4f1;
    --surface: #ffffff;
    --surface-low: #f6f8f6;
    --surface-mid: #e8eee9;
    --border: #c7d3ca;
    --text: #14201c;
    --muted: #52635b;
    --outline: #74857c;
    --primary: #07533c;
    --primary-strong: #063e2f;
    --primary-soft: #dff1e8;
    --primary-soft-2: #a9d9c1;
    --orange: #c77722;
    --orange-dark: #8a4a0b;
    --orange-soft: #fde8cf;
    --danger: #ba1a1a;
    --danger-soft: #ffdad6;
    --danger-text: #93000a;
    --success: #166534;
    --success-soft: #dcfce7;
    --shadow: 0 8px 22px rgba(20, 32, 28, 0.07);
    --shadow-strong: 0 18px 48px rgba(20, 32, 28, 0.14);
}

.app-status-banner {
    margin: .75rem auto 0;
    width: min(1180px, calc(100% - 2rem));
    padding: .75rem 1rem;
    border: 1px solid #d9e4f0;
    border-radius: 14px;
    background: #f7fbff;
    color: #24425f;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.inner-card { background: #f8fafc; border: 1px solid #e3e9ef; box-shadow: none; }

@media (max-width: 640px) {
    .app-status-banner { align-items: stretch; flex-direction: column; }
}

/* Professional workspace refinements */
.web-kpi {
    width: 100%;
    text-align: left;
    font: inherit;
    color: inherit;
    cursor: pointer;
    border: 1px solid #e5e7eb;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.web-kpi:hover,
.web-kpi:focus-visible {
    transform: translateY(-2px);
    border-color: #86b7a2;
    box-shadow: 0 12px 28px rgba(16, 61, 46, .12);
    outline: none;
}

.web-society-picker,
.top-society-picker {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    min-width: 220px;
    padding: .5rem .7rem;
    border: 1px solid #d9e2de;
    border-radius: 10px;
    background: #fff;
}

.web-society-picker select,
.top-society-picker select {
    width: 100%;
    border: 0;
    background: transparent;
    color: #18352b;
    font-weight: 700;
    outline: none;
}

.scope-note {
    display: flex;
    align-items: center;
    gap: .45rem;
    padding: .65rem .8rem;
    border-radius: 10px;
    color: #315c4d;
    background: #edf7f2;
    font-size: .88rem;
}

.action-centre-panel .health-list button {
    display: flex;
    justify-content: space-between;
    width: 100%;
    padding: .8rem 0;
    border: 0;
    border-bottom: 1px solid #edf0ef;
    background: transparent;
    color: inherit;
    cursor: pointer;
    text-align: left;
}

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

.contact-list {
    display: grid;
    gap: .65rem;
}

.contact-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .9rem;
    border: 1px solid #e6ece9;
    border-radius: 12px;
    background: #fbfdfc;
}

.contact-card p { margin: .2rem 0 0; color: #66756f; }
.contact-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .45rem; }
.contact-actions a,
.call-link {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .45rem .65rem;
    border-radius: 999px;
    color: #075d43;
    background: #e2f5ed;
    text-decoration: none;
    font-weight: 700;
    font-size: .82rem;
}

.upi-payment-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    border-color: #a8d8c6;
    background: linear-gradient(135deg, #f4fbf8, #fff);
}

.upi-payment-card img { width: 180px; height: 180px; padding: .5rem; border-radius: 12px; background: #fff; }
.bulk-consent-list { display: grid; gap: .5rem; max-height: 360px; overflow: auto; padding-right: .25rem; }
.bulk-consent-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .75rem; padding: .75rem; border: 1px solid #e3ebe7; border-radius: 10px; }
.bulk-consent-row small { display: block; color: #68776f; }

.notice-grid {
    align-items: stretch;
}

.notice-card,
.featured-notice {
    display: flex;
    flex-direction: column;
    min-height: 230px;
    border-top: 4px solid #4e8f78;
}

.notice-actions { margin-top: auto; padding-top: 1rem; border-top: 1px solid #edf0ef; }

@media (max-width: 760px) {
    .directory-grid { grid-template-columns: 1fr; }
    .directory-grid .span-2 { grid-column: auto; }
    .contact-card { align-items: flex-start; flex-direction: column; }
    .contact-actions { justify-content: flex-start; }
    .upi-payment-card { flex-direction: column; text-align: center; }
    .web-society-picker,
    .top-society-picker { min-width: 0; max-width: 180px; }
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-width: 0;
    overflow-x: hidden;
    background:
        linear-gradient(135deg, rgba(7, 83, 60, 0.09), rgba(255, 255, 255, 0) 34%),
        linear-gradient(180deg, #f7fbf8 0%, var(--background) 48%, #e6edf0 100%);
    color: var(--text);
    font-family: Inter, system-ui, sans-serif;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    border: 0;
    cursor: pointer;
}

button:disabled {
    cursor: not-allowed;
    filter: saturate(0.7);
    opacity: 0.78;
}

.material-symbols-outlined {
    direction: ltr;
    display: inline-flex;
    font-family: 'Material Symbols Outlined';
    font-feature-settings: 'liga';
    font-size: 24px;
    font-style: normal;
    line-height: 1;
    max-width: 1em;
    overflow: hidden;
    text-transform: none;
    white-space: nowrap;
}

.app-shell {
    min-height: 100svh;
}

.topbar {
    align-items: center;
    backdrop-filter: blur(18px);
    background: rgba(255, 255, 255, 0.88);
    border-bottom: 1px solid rgba(199, 211, 202, 0.72);
    box-shadow: 0 10px 30px rgba(20, 32, 28, 0.06);
    display: flex;
    height: 64px;
    justify-content: space-between;
    padding: 8px 16px;
    position: sticky;
    top: 0;
    z-index: 20;
}

.brand-row,
.row-main {
    align-items: center;
    display: flex;
    gap: 12px;
    min-width: 0;
}

.avatar {
    align-items: center;
    background: var(--primary-soft);
    border: 2px solid var(--primary-soft-2);
    border-radius: 999px;
    color: var(--primary);
    display: inline-flex;
    font-size: 13px;
    font-weight: 900;
    height: 40px;
    justify-content: center;
    width: 40px;
}

.avatar.large {
    font-size: 18px;
    height: 56px;
    width: 56px;
}

.top-actions {
    align-items: center;
    display: flex;
    gap: 8px;
}

.role-chip {
    background: var(--primary-soft);
    border-radius: 999px;
    color: var(--primary);
    font-size: 12px;
    font-weight: 900;
    min-height: 36px;
    padding: 0 12px;
}

.login-screen {
    align-items: center;
    background: linear-gradient(180deg, var(--background), #eef2ff);
    display: flex;
    min-height: 100svh;
    padding: 24px 16px;
}

.login-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow-strong);
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin: 0 auto;
    max-width: 860px;
    padding: 24px;
    width: 100%;
}

.login-brand {
    align-items: center;
    display: flex;
    gap: 16px;
}

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

.login-roles button {
    align-items: flex-start;
    background: var(--surface-low);
    border: 1px solid var(--border);
    border-radius: 14px;
    color: var(--text);
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 148px;
    padding: 16px;
    text-align: left;
}

.login-roles button:hover {
    border-color: var(--primary);
}

.login-roles .material-symbols-outlined {
    color: var(--primary);
}

.login-roles small {
    color: var(--muted);
    font-size: 13px;
    line-height: 18px;
}

.brand-name {
    color: var(--primary);
    font-size: 22px;
    font-weight: 800;
    line-height: 26px;
}

.brand-subtitle,
.muted,
.small,
.notice-row p,
.page-intro p,
.line-item span,
.profile-hero p,
.hero-card p {
    color: var(--muted);
}

.brand-subtitle,
.small {
    font-size: 12px;
    line-height: 16px;
}

.icon-button,
.round-button {
    align-items: center;
    background: transparent;
    border-radius: 999px;
    color: var(--primary);
    display: inline-flex;
    height: 44px;
    justify-content: center;
    position: relative;
    width: 44px;
}

.notification-dot {
    align-items: center;
    background: var(--danger);
    border-radius: 999px;
    color: white;
    display: inline-flex;
    font-size: 10px;
    font-weight: 900;
    height: 18px;
    justify-content: center;
    line-height: 18px;
    min-width: 18px;
    padding: 0 5px;
    position: absolute;
    right: 2px;
    top: 2px;
}

.screen {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin: 0 auto;
    max-width: 1180px;
    padding: 26px 18px 112px;
}

.screen.narrow {
    max-width: 680px;
}

.screen.wide {
    max-width: 1280px;
}

.screen.with-fab {
    padding-bottom: 160px;
}

.summary-grid,
.quick-grid,
.mini-grid,
.meeting-grid,
.profile-grid,
.notice-grid,
.admin-metrics,
.admin-layout {
    display: grid;
    gap: 16px;
}

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

.meeting-grid,
.profile-grid,
.admin-metrics {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

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

.card {
    background: var(--surface);
    border: 1px solid rgba(199, 211, 202, 0.82);
    border-radius: 8px;
    box-shadow: var(--shadow);
    color: var(--text);
    min-width: 0;
    padding: 16px;
    text-align: left;
}

.tenant-panel {
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary);
    border-radius: 8px;
    box-shadow: var(--shadow);
    display: grid;
    gap: 16px;
    grid-template-columns: 1fr auto;
    padding: 16px;
}

.tenant-controls {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(150px, 1fr));
}

.tenant-controls label {
    color: var(--muted);
    display: flex;
    flex-direction: column;
    font-size: 12px;
    font-weight: 800;
    gap: 6px;
    text-transform: uppercase;
}

.tenant-controls select {
    background: var(--surface-low);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    min-height: 42px;
    padding: 8px 10px;
    text-transform: none;
}

.tenant-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.tenant-stats span {
    background: var(--primary-soft);
    border-radius: 999px;
    color: var(--primary);
    font-size: 12px;
    font-weight: 900;
    padding: 8px 10px;
}

.outstanding-card,
.span-2 {
    grid-column: 1 / -1;
}

.outstanding-card {
    background: var(--danger-soft);
    border-left: 4px solid var(--danger);
    color: var(--danger-text);
}

.accent-primary {
    border-top: 4px solid var(--primary);
}

.accent-orange {
    border-top: 4px solid var(--orange);
}

.tap-card {
    cursor: pointer;
}

.spread {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.spread.start {
    align-items: flex-start;
}

.spread.end {
    align-items: flex-end;
}

.label,
.overline {
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.05em;
    line-height: 16px;
    margin: 0;
    text-transform: uppercase;
}

.amount-row {
    align-items: baseline;
    display: flex;
    gap: 8px;
    margin: 16px 0 12px;
}

.amount-row strong,
.hero-card strong {
    font-size: 30px;
    line-height: 38px;
}

.danger-button,
.primary-button,
.orange-button,
.secondary-button,
.outline-danger,
.hero-card button,
.sos-card button {
    align-items: center;
    border-radius: 8px;
    display: inline-flex;
    font-size: 14px;
    font-weight: 800;
    gap: 8px;
    justify-content: center;
    min-height: 44px;
    padding: 10px 16px;
}

.danger-button {
    background: var(--danger);
    color: white;
    width: 100%;
}

.primary-button {
    background: var(--primary);
    color: white;
}

.orange-button {
    background: var(--orange);
    color: white;
}

.secondary-button {
    background: var(--surface);
    border: 1px solid var(--outline);
    color: var(--text);
}

.outline-danger {
    background: white;
    border: 2px solid var(--danger);
    color: var(--danger);
}

.full {
    width: 100%;
}

.quick-action,
.module-strip button {
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow);
    color: var(--text);
    display: flex;
    flex-direction: column;
    font-size: 13px;
    font-weight: 700;
    gap: 10px;
    justify-content: center;
    min-height: 118px;
    min-width: 0;
    padding: 16px;
    text-align: center;
}

.quick-icon,
.row-icon,
.visitor-icon,
.notice-icon {
    align-items: center;
    background: var(--primary-soft);
    border-radius: 8px;
    color: var(--primary);
    display: inline-flex;
    flex: 0 0 auto;
    height: 44px;
    justify-content: center;
    width: 44px;
}

.quick-icon {
    border-radius: 999px;
    height: 48px;
    width: 48px;
}

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

.section-title button,
.notice-row button,
.row-card button,
.ticket-foot button {
    background: transparent;
    color: var(--primary);
    font-size: 13px;
    font-weight: 800;
}

.module-strip {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.module-strip button {
    color: var(--primary);
    min-height: 76px;
    padding: 10px 6px;
}

.module-workspace-nav {
    background: linear-gradient(135deg, #ffffff 0%, #f4f8f5 100%);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    padding: 18px;
}

.module-workspace-heading {
    align-items: end;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin-bottom: 14px;
}

.module-workspace-heading h2 {
    margin-top: 3px;
}

.module-workspace-hint {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.module-workspace-options {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.module-workspace-option {
    align-items: center;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    display: grid;
    gap: 10px;
    grid-template-columns: auto 1fr auto;
    min-height: 72px;
    padding: 12px;
    text-align: left;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.module-workspace-option:hover {
    border-color: var(--primary);
    box-shadow: 0 8px 20px rgba(22, 77, 48, .10);
    transform: translateY(-1px);
}

.module-workspace-option.active {
    background: color-mix(in srgb, var(--primary) 9%, #fff);
    border-color: var(--primary);
    box-shadow: inset 4px 0 0 var(--primary);
}

.module-workspace-option > .material-symbols-outlined:first-child {
    align-items: center;
    background: color-mix(in srgb, var(--primary) 12%, #fff);
    border-radius: 9px;
    color: var(--primary);
    display: flex;
    height: 40px;
    justify-content: center;
    width: 40px;
}

.module-workspace-option strong,
.module-workspace-option small {
    display: block;
}

.module-workspace-option small {
    color: var(--muted);
    font-size: 11px;
    line-height: 15px;
    margin-top: 2px;
}

.module-workspace-option .option-arrow {
    color: var(--muted);
    font-size: 18px;
}

.module-workspace-option.active .option-arrow {
    color: var(--primary);
}

.workspace-panel {
    animation: workspace-reveal .2s ease-out;
}

@keyframes workspace-reveal {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 700px) {
    .module-workspace-nav {
        padding: 16px;
    }

    .module-workspace-heading {
        align-items: start;
        display: grid;
        gap: 6px;
    }

    .module-workspace-hint {
        display: block;
    }

    .module-workspace-options {
        grid-template-columns: 1fr;
    }

    .module-workspace-option {
        min-height: 68px;
    }
}

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

h1 {
    font-size: 30px;
    line-height: 38px;
}

h2,
h3 {
    font-size: 20px;
    line-height: 28px;
}

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

.notice-row,
.row-card {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.notice-row {
    justify-content: flex-start;
}

.notice-row p,
.muted {
    font-size: 14px;
    line-height: 20px;
}

.hero-card {
    background: var(--primary);
    border-radius: 12px;
    box-shadow: var(--shadow-strong);
    color: white;
    overflow: hidden;
    padding: 24px;
}

.hero-card p {
    color: var(--primary-soft-2);
}

.hero-card button {
    background: var(--orange);
    color: white;
}

.hero-card.compact {
    align-items: center;
    display: flex;
    gap: 16px;
    justify-content: space-between;
}

.segmented {
    background: var(--surface-mid);
    border-radius: 12px;
    display: flex;
    gap: 4px;
    padding: 4px;
}

.segmented button,
.chips button {
    background: transparent;
    border-radius: 10px;
    color: var(--muted);
    flex: 1;
    font-size: 13px;
    font-weight: 800;
    min-height: 40px;
    padding: 8px 12px;
}

.segmented .selected,
.chips .selected {
    background: white;
    box-shadow: var(--shadow);
    color: var(--primary);
}

.bill-card {
    overflow: hidden;
    padding: 0;
}

.bill-head,
.line-item {
    align-items: center;
    display: flex;
    gap: 16px;
    justify-content: space-between;
}

.bill-head {
    background: var(--surface-low);
    border-bottom: 1px solid var(--border);
    padding: 12px 16px;
}

.line-item {
    padding: 16px;
}

.line-item + .line-item {
    border-top: 1px solid rgba(196, 197, 213, 0.45);
}

.line-item.total {
    border-top-style: dashed;
}

.badge {
    border-radius: 999px;
    display: inline-flex;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.04em;
    max-width: 100%;
    padding: 5px 9px;
    text-transform: uppercase;
    overflow-wrap: anywhere;
    white-space: normal;
}

.badge.danger,
.ticket.danger .badge {
    background: var(--danger-soft);
    color: var(--danger-text);
}

.badge.warning,
.ticket.warning .badge {
    background: var(--orange-soft);
    color: var(--orange-dark);
}

.badge.primary {
    background: var(--primary-soft);
    color: var(--primary);
}

.badge.success {
    background: var(--success-soft);
    color: var(--success);
}

.badge.muted,
.ticket.muted .badge {
    background: var(--surface-mid);
    color: var(--muted);
}

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

.search-box input {
    background: transparent;
    border: 0;
    color: var(--text);
    min-height: 48px;
    outline: 0;
    width: 100%;
}

.chips {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
}

.chips button {
    background: white;
    border: 1px solid var(--border);
    flex: 0 0 auto;
    min-height: 36px;
    white-space: nowrap;
}

.chips .selected {
    background: var(--primary);
    color: white;
}

.ticket {
    border-left: 4px solid var(--outline);
}

.ticket.danger {
    border-left-color: var(--danger);
}

.ticket.warning {
    border-left-color: var(--orange);
}

.ticket-foot {
    align-items: center;
    border-top: 1px solid rgba(196, 197, 213, 0.42);
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: space-between;
    margin-top: 14px;
    padding-top: 12px;
}

.ticket-foot span,
.meeting-card p,
.profile-hero p {
    align-items: center;
    display: inline-flex;
    gap: 8px;
}

.fab {
    align-items: center;
    background: var(--orange);
    border-radius: 12px;
    bottom: 88px;
    box-shadow: var(--shadow-strong);
    color: white;
    display: flex;
    font-size: 14px;
    font-weight: 800;
    gap: 8px;
    min-height: 52px;
    padding: 0 18px;
    position: fixed;
    right: 16px;
    z-index: 15;
}

.page-intro {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.notice-grid {
    grid-template-columns: repeat(12, 1fr);
}

.featured-notice {
    grid-column: span 8;
}

.notice-card {
    grid-column: span 4;
}

.featured-notice,
.notice-card,
.visitor-card,
.meeting-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.notice-actions {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin-top: auto;
}

.notice-actions button {
    background: var(--orange);
    border-radius: 10px;
    color: white;
    font-weight: 800;
    padding: 10px 14px;
}

.visitor-icon {
    background: var(--orange-soft);
    color: var(--orange-dark);
}

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

.summary-strip {
    background: var(--surface-mid);
    border: 1px solid var(--border);
    border-radius: 10px;
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 10px;
}

.summary-strip span {
    color: var(--text);
    font-size: 12px;
    font-weight: 800;
}

.success-row {
    border-color: rgba(22, 163, 74, 0.35);
    background: rgba(22, 163, 74, 0.08);
}

.empty-card {
    color: var(--muted);
    text-align: center;
}

.danger-soft {
    background: var(--danger-soft);
    color: var(--danger);
}

.date-tile {
    align-items: center;
    background: var(--surface-mid);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    min-width: 64px;
    padding: 8px;
}

.date-tile span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.date-tile strong {
    color: var(--primary);
    font-size: 24px;
}

.profile-hero {
    align-items: flex-end;
    background: var(--primary-strong);
    border-radius: 12px;
    color: white;
    display: flex;
    justify-content: space-between;
    padding: 24px;
}

.profile-hero h1,
.profile-hero p,
.profile-hero .overline {
    color: white;
}

.profile-tags {
    display: flex;
    gap: 8px;
}

.profile-tags span {
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    padding: 7px 12px;
}

.profile-row {
    align-items: center;
    border-radius: 10px;
    display: flex;
    gap: 10px;
    padding: 10px 0;
}

.profile-row span:first-child {
    align-items: center;
    background: var(--primary-soft);
    border-radius: 999px;
    color: var(--primary);
    display: inline-flex;
    font-weight: 900;
    height: 32px;
    justify-content: center;
    width: 32px;
}

.profile-row .material-symbols-outlined {
    margin-left: auto;
}

.vehicle-plate,
.workflow-list div,
.report-row {
    background: var(--surface-low);
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-top: 14px;
    padding: 12px;
}

.vehicle-plate span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.vehicle-plate strong {
    color: var(--primary);
    display: block;
    font-size: 20px;
    margin: 4px 0;
}

.sos-card {
    background: var(--danger-soft);
    color: var(--danger-text);
}

.sos-card button {
    background: var(--danger);
    color: white;
    margin-top: 12px;
    width: 100%;
}

.switch-row {
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    padding: 12px;
}

.switch-row input {
    accent-color: var(--primary);
    height: 20px;
    width: 20px;
}

.modal-backdrop {
    align-items: flex-end;
    background: rgba(15, 23, 42, 0.36);
    display: flex;
    inset: 0;
    justify-content: center;
    padding: 16px;
    position: fixed;
    z-index: 50;
}

.modal-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow-strong);
    max-height: min(760px, calc(100svh - 32px));
    max-width: 560px;
    overflow-y: auto;
    padding: 18px;
    width: 100%;
}

.form-stack,
.agenda-list,
.workflow-list,
.progress-block {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.detail-strip {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.detail-strip div,
.history-row {
    background: var(--surface-low);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px;
}

.detail-strip span,
.history-row small {
    color: var(--muted);
    display: block;
    font-size: 12px;
    line-height: 18px;
}

.detail-strip strong,
.history-row strong {
    color: var(--text);
    display: block;
    font-size: 14px;
    line-height: 20px;
}

.mini-history {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.compact-title {
    margin-bottom: 0;
}

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

.notification-row {
    align-items: flex-start;
    background: var(--surface-low);
    border: 1px solid var(--border);
    border-radius: 12px;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    padding: 12px;
}

.notification-row.unread {
    background: var(--primary-soft);
    border-color: rgba(67, 97, 238, 0.28);
}

.notification-row p {
    color: var(--text);
    font-size: 13px;
    line-height: 19px;
    margin-top: 4px;
}

.notification-row small {
    color: var(--muted);
    display: block;
    font-size: 12px;
    line-height: 18px;
    margin-top: 4px;
}

.notification-row button {
    background: transparent;
    color: var(--primary);
    flex: 0 0 auto;
    font-size: 13px;
    font-weight: 800;
}

.history-row span {
    color: var(--text);
    display: block;
    font-size: 13px;
    line-height: 19px;
    margin-top: 4px;
}

.inner-stat {
    box-shadow: none;
    min-height: 112px;
}

.provider-table .table-row > span:first-child {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.provider-table small {
    color: var(--muted);
    font-size: 12px;
    line-height: 16px;
}

.field {
    color: var(--text);
    display: flex;
    flex-direction: column;
    font-size: 13px;
    font-weight: 800;
    gap: 7px;
}

.field input,
.field select,
.field textarea {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    min-height: 44px;
    outline: 0;
    padding: 10px 12px;
    width: 100%;
}

.field textarea {
    min-height: 96px;
    resize: vertical;
}

.payment-summary,
.agenda-item {
    align-items: center;
    background: var(--surface-low);
    border-radius: 12px;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    padding: 14px;
}

.payment-summary strong {
    color: var(--primary);
    font-size: 22px;
}

.agenda-item span {
    align-items: center;
    background: var(--primary-soft);
    border-radius: 999px;
    color: var(--primary);
    display: inline-flex;
    flex: 0 0 auto;
    font-weight: 900;
    height: 28px;
    justify-content: center;
    width: 28px;
}

.admin-metrics .card {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.admin-function-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

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

.admin-editor {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.admin-crud-grid .span-2 {
    grid-column: span 2;
}

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

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

.wide-field {
    grid-column: span 2;
}

.accounting-actions {
    margin: 4px 0 12px;
}

.accounting-forms {
    background: linear-gradient(180deg, #f8fbf8, #eef6f1);
    border: 1px solid rgba(199, 211, 202, 0.86);
    border-radius: 8px;
    padding: 12px;
}

.compact-list,
.data-table {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.admin-row,
.table-head,
.table-row {
    align-items: center;
    display: grid;
    gap: 10px;
}

.admin-row {
    background: var(--surface-low);
    border: 1px solid rgba(199, 211, 202, 0.56);
    border-radius: 8px;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 12px;
}

.admin-row > * {
    min-width: 0;
}

.admin-row p {
    color: var(--muted);
    font-size: 13px;
    margin: 2px 0 0;
}

.table-head,
.table-row {
    grid-template-columns: 1.2fr 0.8fr 0.8fr 1fr auto;
}

.ledger-table .table-head,
.ledger-table .table-row {
    grid-template-columns: 0.8fr 1.4fr 0.8fr 0.8fr 0.8fr;
}

.table-head {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    padding: 0 10px;
    text-transform: uppercase;
}

.table-row {
    background: var(--surface-low);
    border: 1px solid rgba(199, 211, 202, 0.48);
    border-radius: 8px;
    font-size: 14px;
    min-height: 48px;
    padding: 10px;
}

.admin-function {
    align-items: flex-start;
    display: flex;
    gap: 12px;
}

.admin-function > .material-symbols-outlined {
    align-items: center;
    background: var(--primary-soft);
    border-radius: 8px;
    color: var(--primary);
    display: inline-flex;
    flex: 0 0 auto;
    height: 44px;
    justify-content: center;
    width: 44px;
}

.workflow-list p {
    color: var(--muted);
    font-size: 14px;
    line-height: 20px;
    margin-top: 2px;
}

.progress {
    background: var(--surface-mid);
    border-radius: 999px;
    height: 12px;
    overflow: hidden;
}

.progress span {
    background: var(--orange);
    display: block;
    height: 100%;
}

.bottom-nav {
    align-items: center;
    background: var(--surface);
    border-top: 1px solid var(--border);
    bottom: 0;
    box-shadow: 0 -2px 4px rgba(15, 23, 42, 0.05);
    display: flex;
    gap: 4px;
    height: 72px;
    justify-content: center;
    left: 0;
    overflow: hidden;
    padding: 8px 12px;
    position: fixed;
    right: 0;
    z-index: 20;
}

.nav-item {
    align-items: center;
    background: transparent;
    border-radius: 12px;
    color: var(--muted);
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    font-size: 11px;
    font-weight: 700;
    gap: 2px;
    justify-content: center;
    min-height: 52px;
    min-width: 0;
    padding: 4px 8px;
}

.nav-item.active {
    background: var(--primary-soft);
    color: var(--primary);
    font-weight: 900;
}

#blazor-error-ui {
    background: #ffffe0;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

@media (max-width: 999px) {
    .web-dashboard {
        grid-template-columns: 1fr;
    }

    .web-sidebar {
        display: block;
        height: auto;
        min-height: 0;
        overflow: hidden;
        padding: 8px;
        position: sticky;
        top: 0;
        z-index: 40;
    }

    .web-sidebar .web-menu-button,
    .web-sidebar .web-brand,
    .web-sidebar .web-quick-actions {
        display: none;
    }

    .web-nav {
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        padding-bottom: 2px;
        scrollbar-width: thin;
    }

    .web-nav button {
        flex: 0 0 auto;
        min-height: 38px;
        padding: 8px 12px;
        white-space: nowrap;
    }

    .web-topbar {
        height: auto;
        padding: 14px;
    }

    .web-search {
        display: none;
    }

    .web-content {
        padding: 16px 12px 88px;
    }

    .web-page-title,
    .web-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .web-filters {
        flex-wrap: wrap;
        width: 100%;
    }

    .web-kpi-grid,
    .web-panel-grid,
    .web-bottom-grid,
    .accounting-overview {
        grid-template-columns: 1fr;
    }

    .ring-wrap {
        border-right: 0;
        border-bottom: 1px solid #e5e7eb;
        padding: 0 0 16px;
    }

    .web-table {
        min-width: 620px;
    }

    .web-panel {
        overflow-x: auto;
    }

    .notice-grid,
    .profile-hero {
        display: flex;
        flex-direction: column;
    }

    .featured-notice,
    .notice-card {
        grid-column: auto;
    }

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

    .admin-layout {
        grid-template-columns: 1fr;
    }

    .admin-crud-grid,
    .admin-crud-grid .span-2,
    .form-grid.two,
    .form-grid.four {
        grid-column: auto;
        grid-template-columns: 1fr;
    }

    .wide-field {
        grid-column: auto;
    }

    .table-head {
        display: none;
    }

    .table-row {
        align-items: flex-start;
        grid-template-columns: 1fr;
    }

    .table-row > span {
        min-width: 0;
        overflow-wrap: anywhere;
    }

    .table-row span:nth-child(2),
    .table-row span:nth-child(3),
    .table-row span:nth-child(4) {
        color: var(--muted);
        font-size: 13px;
    }

    .tenant-panel {
        align-items: stretch;
        grid-template-columns: 1fr;
    }

    .tenant-controls {
        grid-template-columns: 1fr;
    }

    .tenant-stats {
        justify-content: flex-start;
    }

    .login-brand {
        align-items: flex-start;
    }

    .login-roles {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 1000px) {
    .quick-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .summary-grid {
        grid-template-columns: 1.3fr 1fr 1fr;
    }

    .outstanding-card {
        grid-column: auto;
    }

    .nav-item {
        flex: 0 0 92px;
    }
}

/* Mobile-first SocietyConnect refresh: a compact operational shell, not a long landing page. */
.splash-screen {
    align-items: center;
    background:
        radial-gradient(circle at 50% 18%, rgba(125, 189, 79, 0.22), transparent 34rem),
        #064e3b;
    box-sizing: border-box;
    display: flex;
    height: 100svh;
    justify-content: center;
    min-height: 100svh;
    overflow: hidden;
    padding: clamp(8px, 1.5vmin, 20px);
    position: fixed;
    inset: 0;
    width: 100%;
}

.splash-art {
    border-radius: clamp(14px, 2.5vmin, 34px);
    box-shadow: 0 24px 70px rgba(0, 25, 18, 0.28);
    display: block;
    height: 100%;
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    object-position: center;
    width: auto;
}

.brand-monogram {
    align-items: center;
    background: #fff;
    color: #0b2386;
    display: inline-flex;
    font-size: 28px;
    font-weight: 900;
    height: 72px;
    justify-content: center;
    letter-spacing: 0;
    width: 72px;
}


.login-screen {
    align-items: flex-start;
    background: #f5f7fb;
    padding: 24px 16px 28px;
}

.login-card {
    border: 1px solid #dbe1ed;
    border-radius: 8px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, .08);
    gap: 20px;
    max-width: 720px;
    padding: 20px;
}

.login-brand-polished { gap: 12px; }
.brand-monogram { border-radius: 8px; font-size: 22px; height: 50px; width: 50px; }
.login-brand h1 { color: #111827; font-size: 24px; line-height: 28px; margin: 0; }
.login-brand p { font-size: 13px; margin: 3px 0 0; }

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

.role-choice {
    align-items: flex-start;
    background: #fff;
    border: 1px solid #d9dfeb;
    border-left: 3px solid #0b47c8;
    border-radius: 8px;
    color: #172033;
    display: flex;
    gap: 10px;
    min-height: 78px;
    padding: 12px;
    text-align: left;
}

.role-choice:hover,
.role-choice:focus-visible { border-color: #0b47c8; box-shadow: 0 4px 12px rgba(11, 71, 200, .14); outline: 0; }
.role-choice > .material-symbols-outlined { color: #0b47c8; font-size: 24px; }
.role-choice > span:last-child { display: grid; gap: 3px; min-width: 0; }
.role-choice strong { font-size: 14px; }
.role-choice small { color: #5c6679; font-size: 11px; line-height: 15px; }
.role-choice.security { border-left-color: #16834b; }
.role-choice.security > .material-symbols-outlined { color: #16834b; }
.role-choice.accountant { border-left-color: #bb5b00; }
.role-choice.accountant > .material-symbols-outlined { color: #bb5b00; }
.credential-panel { border-top: 1px solid #e4e7ef; padding-top: 14px; }
.credential-panel summary { color: #3554a5; cursor: pointer; font-size: 13px; font-weight: 800; }
.compact-login-form { gap: 10px; margin-top: 14px; }
.compact-login-form .field input { min-height: 42px; }
.login-status { color: #526071; font-size: 12px; margin: -8px 0 0; }

.login-form-panel {
    display: block;
    padding: 1.1rem;
    border: 1px solid #dfe7e3;
    border-radius: 14px;
    background: #fbfdfc;
}

.login-form-heading {
    margin-bottom: 1rem;
}

.login-form-heading h2 {
    margin: 0;
    color: #17392f;
    font-size: 1.2rem;
}

.login-form-heading p {
    margin: 0.25rem 0 0;
    color: #66756f;
    font-size: 0.8rem;
}

.login-society-choice {
    display: grid;
    gap: 0.65rem;
    padding: 0.85rem;
    border: 1px solid #cfe2da;
    border-radius: 12px;
    background: #f2f8f5;
}

.login-society-choice > div:first-child strong,
.login-society-choice > div:first-child small {
    display: block;
}

.login-society-choice > div:first-child small {
    margin-top: 0.15rem;
    color: #6a7873;
}

.login-society-option {
    display: grid;
    grid-template-columns: 38px 1fr auto;
    align-items: center;
    gap: 0.7rem;
    width: 100%;
    padding: 0.7rem;
    border: 1px solid #d5dfdb;
    border-radius: 10px;
    background: #fff;
    color: #23352f;
    text-align: left;
}

.login-society-option:hover,
.login-society-option.selected {
    border-color: var(--primary);
    background: color-mix(in srgb, var(--primary) 7%, #fff);
    box-shadow: inset 3px 0 0 var(--primary);
}

.login-society-option > .material-symbols-outlined:first-child {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 9px;
    background: color-mix(in srgb, var(--primary) 12%, #fff);
    color: var(--primary);
}

.login-society-option strong,
.login-society-option small {
    display: block;
}

.login-society-option small {
    margin-top: 0.1rem;
    color: #6d7a76;
    font-size: 0.72rem;
}

.dashboard-screen { gap: 16px; padding-top: 14px; }
.dashboard-screen .tenant-panel { gap: 10px; padding: 13px 14px; }
.dashboard-screen .tenant-panel h2 { font-size: 20px; margin: 2px 0; }
.dashboard-screen .tenant-panel > div:first-child .muted { font-size: 13px; line-height: 18px; margin: 4px 0; }
.dashboard-screen .tenant-controls select { min-height: 40px; }
.dashboard-screen .summary-grid { gap: 12px; }
.dashboard-screen .card { border-radius: 8px; padding: 14px; }
.dashboard-screen .outstanding-card { background: #fff4f2; border-left: 4px solid #e45244; }
.dashboard-screen .outstanding-card .amount-row { margin: 10px 0; }
.dashboard-screen .outstanding-card .amount-row strong { font-size: 32px; letter-spacing: 0; }
.dashboard-screen .danger-button { background: #c81e1e; border-radius: 7px; min-height: 42px; }
.dashboard-screen h2 { font-size: 19px; line-height: 24px; margin: 0 0 10px; }
.dashboard-screen .quick-grid { gap: 8px; }
.dashboard-screen .quick-action { border: 1px solid #d9dfeb; border-radius: 8px; min-height: 90px; padding: 10px 6px; }
.dashboard-screen .quick-action span:last-child { font-size: 11px; line-height: 14px; }
.dashboard-screen .quick-icon { font-size: 25px; }
.dashboard-screen .module-strip { gap: 8px; }

.web-dashboard {
    background: #ffffff;
    color: #111827;
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    min-height: 100svh;
}

.web-sidebar {
    background: #ffffff;
    border-right: 1px solid #e5e7eb;
    display: grid;
    grid-template-rows: auto auto 1fr auto;
    min-height: 100svh;
    padding: 18px 12px 22px;
    position: sticky;
    top: 0;
}

.web-menu-button,
.web-header-actions button,
.web-filters button,
.web-panel-head button,
.web-user button {
    align-items: center;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    color: #1f2937;
    display: inline-flex;
    gap: 8px;
    justify-content: center;
    min-height: 40px;
    padding: 8px 12px;
}

.web-menu-button {
    border: 0;
    justify-content: flex-start;
    width: 44px;
}

.web-brand {
    align-items: center;
    display: flex;
    gap: 14px;
    margin: 4px 0 28px;
    min-width: 0;
}

.web-brand strong {
    color: #064e3b;
    display: block;
    font-size: 18px;
    font-weight: 900;
    line-height: 22px;
}

.web-brand span {
    color: #6b7280;
    display: block;
    font-size: 13px;
    line-height: 18px;
    margin-top: 4px;
}

.web-logo {
    border: 2px solid #0b513d;
    border-radius: 999px;
    flex: 0 0 auto;
    height: 66px;
    overflow: hidden;
    position: relative;
    width: 66px;
}

.web-logo img {
    height: 118px;
    left: 50%;
    object-fit: cover;
    object-position: center 31%;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -49%);
    width: 118px;
}

.web-nav {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.web-nav button,
.web-quick-actions button {
    align-items: center;
    background: transparent;
    border-radius: 7px;
    color: #1f2937;
    display: flex;
    font-size: 14px;
    font-weight: 650;
    gap: 12px;
    min-height: 42px;
    padding: 10px 14px;
    text-align: left;
}

.web-nav button.active {
    background: linear-gradient(90deg, #064e3b, #08724e);
    box-shadow: 0 8px 18px rgba(6, 78, 59, 0.2);
    color: #ffffff;
}

.web-nav .material-symbols-outlined,
.web-quick-actions .material-symbols-outlined {
    font-size: 20px;
}

.web-quick-actions {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin: 20px 8px 0;
    padding: 14px 12px;
}

.web-quick-actions h3 {
    font-size: 14px;
    line-height: 18px;
    margin: 0 0 6px;
}

.web-quick-actions button {
    font-size: 13px;
    min-height: 34px;
    padding: 6px 4px;
}

.web-quick-actions .material-symbols-outlined {
    align-items: center;
    background: #dcfce7;
    border-radius: 8px;
    color: #13743d;
    display: inline-flex;
    height: 26px;
    justify-content: center;
    width: 26px;
}

.web-main {
    min-width: 0;
}

.web-topbar {
    align-items: center;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    gap: 24px;
    height: 92px;
    justify-content: space-between;
    padding: 18px 28px;
    position: sticky;
    top: 0;
    z-index: 12;
}

.web-search {
    align-items: center;
    border: 1px solid #e5e7eb;
    border-radius: 9px;
    display: flex;
    flex: 0 1 650px;
    gap: 10px;
    min-height: 48px;
    padding: 0 13px;
}

.web-search input {
    border: 0;
    color: #111827;
    flex: 1;
    font-size: 14px;
    min-width: 0;
    outline: 0;
}

.web-search kbd {
    border: 1px solid #d1d5db;
    border-radius: 6px;
    color: #6b7280;
    font-size: 11px;
    padding: 4px 7px;
}

.web-header-actions {
    align-items: center;
    display: flex;
    gap: 14px;
}

.web-header-actions button {
    border: 0;
    min-height: 38px;
    padding: 6px;
    position: relative;
    width: 38px;
}

.web-header-actions button small {
    align-items: center;
    background: #006b3f;
    border-radius: 999px;
    color: white;
    display: inline-flex;
    font-size: 10px;
    font-weight: 900;
    height: 17px;
    justify-content: center;
    min-width: 17px;
    position: absolute;
    right: 1px;
    top: 1px;
}

.web-user {
    align-items: center;
    border-left: 1px solid #e5e7eb;
    display: flex;
    gap: 10px;
    padding-left: 18px;
}

.web-user strong,
.web-user span {
    display: block;
}

.web-user strong {
    font-size: 14px;
}

.web-user span {
    color: #6b7280;
    font-size: 12px;
}

.web-user button {
    border: 0;
    min-height: 32px;
    padding: 0;
}

.web-content {
    background: #ffffff;
    padding: 24px 28px 30px;
}

.web-page-title {
    align-items: center;
    display: flex;
    gap: 18px;
    justify-content: space-between;
    margin-bottom: 18px;
}

.web-page-title h1 {
    color: #111827;
    font-size: 22px;
    font-weight: 900;
    line-height: 28px;
}

.web-page-title p {
    color: #6b7280;
    font-size: 14px;
    margin-top: 5px;
}

.web-filters {
    display: flex;
    gap: 10px;
}

.web-filters button {
    min-width: 118px;
}

.web-kpi-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    margin-bottom: 16px;
}

.web-kpi,
.web-panel {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}

.web-kpi {
    display: flex;
    gap: 14px;
    min-height: 108px;
    padding: 18px;
}

.web-kpi p,
.web-kpi small {
    color: #6b7280;
    font-size: 12px;
}

.web-kpi strong {
    display: block;
    font-size: 20px;
    line-height: 26px;
    margin: 3px 0 7px;
}

.kpi-icon {
    align-items: center;
    border-radius: 999px;
    display: inline-flex;
    flex: 0 0 auto;
    height: 44px;
    justify-content: center;
    width: 44px;
}

.kpi-icon.green { background: #e8f6eb; color: #17813c; }
.kpi-icon.orange { background: #fff0e7; color: #e85d04; }
.kpi-icon.purple { background: #f0edff; color: #6250b5; }

.mini-progress {
    background: #e5e7eb;
    border-radius: 999px;
    height: 4px;
    overflow: hidden;
    width: 100%;
}

.mini-progress span {
    background: #16803c;
    display: block;
    height: 100%;
}

.web-panel-grid,
.web-bottom-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: 1.15fr 1.05fr 1fr;
    margin-bottom: 18px;
}

.web-panel {
    min-width: 0;
    overflow: hidden;
}

.web-panel-head {
    align-items: center;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    min-height: 42px;
    padding: 10px 14px;
}

.web-panel-head h2 {
    font-size: 16px;
    font-weight: 900;
    line-height: 22px;
}

.web-panel-head button {
    font-size: 12px;
    font-weight: 800;
    min-height: 30px;
    padding: 5px 11px;
}

.accounting-overview {
    display: grid;
    gap: 16px;
    grid-template-columns: 0.95fr 1.05fr;
    padding: 18px 14px 12px;
}

.ring-wrap {
    align-items: center;
    border-right: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    gap: 11px;
    padding-right: 16px;
}

.progress-ring {
    align-items: center;
    background: conic-gradient(#07533c 0 82%, #e5e7eb 82% 100%);
    border-radius: 999px;
    display: flex;
    flex-direction: column;
    height: 128px;
    justify-content: center;
    position: relative;
    width: 128px;
}

.progress-ring::after {
    background: #ffffff;
    border-radius: 999px;
    content: "";
    inset: 17px;
    position: absolute;
}

.progress-ring strong,
.progress-ring span {
    position: relative;
    z-index: 1;
}

.progress-ring strong {
    font-size: 25px;
}

.progress-ring span {
    color: #6b7280;
    font-size: 12px;
}

.legend-row,
.income-list p,
.health-list p {
    align-items: center;
    display: flex;
    font-size: 13px;
    justify-content: space-between;
    width: 100%;
}

.legend-row span,
.income-list span,
.health-list span {
    color: #4b5563;
}

.dot {
    border-radius: 999px;
    display: inline-block;
    height: 9px;
    margin-right: 8px;
    width: 9px;
}

.dot.green { background: #167c3a; }
.dot.grey { background: #d1d5db; }
.dot.orange { background: #f26b21; }

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

.income-list h3 {
    font-size: 13px;
    line-height: 18px;
    margin: 2px 0 4px;
}

.dues-callout {
    align-items: center;
    background: #fff8ed;
    border: 1px solid #fed7aa;
    border-radius: 7px;
    display: flex;
    gap: 5px;
    justify-content: space-between;
    margin: 0 14px 16px;
    padding: 12px 14px;
}

.dues-callout strong {
    color: #067a3f;
}

.dues-callout button {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 7px;
    font-weight: 800;
    min-height: 32px;
    padding: 6px 12px;
}

.import-row {
    align-items: center;
    border-bottom: 1px solid #eef0f2;
    display: grid;
    gap: 12px;
    grid-template-columns: 1fr 0.95fr auto;
    padding: 12px 14px;
}

.import-row strong,
.import-row span,
.import-row small {
    display: block;
}

.import-row span,
.import-row small {
    color: #6b7280;
    font-size: 12px;
}

.import-row p {
    font-size: 13px;
    line-height: 16px;
}

.success-icon { color: #16803c; }
.warn-icon { color: #f26b21; }
.good { color: #087a37 !important; }
.warn { color: #e85d04 !important; }
.progress-text { color: #f26b21; }

.upload-drop {
    align-items: center;
    background: #ffffff;
    border: 1px dashed #9ca3af;
    border-radius: 8px;
    color: #111827;
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin: 12px 14px;
    min-height: 76px;
    padding: 14px;
}

.upload-drop small {
    color: #6b7280;
}

.health-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 18px 18px 12px;
}

.health-status {
    align-items: center;
    background: linear-gradient(90deg, #eef8ef, #f8fbf8);
    border: 1px solid #e0eee3;
    border-radius: 8px;
    display: flex;
    gap: 14px;
    margin: 12px 14px 14px;
    padding: 14px;
}

.health-status > .material-symbols-outlined {
    align-items: center;
    background: #d9f2df;
    border-radius: 999px;
    color: #16803c;
    display: inline-flex;
    height: 48px;
    justify-content: center;
    width: 48px;
}

.health-status small,
.health-status p {
    color: #4b5563;
    font-size: 12px;
}

.health-status strong {
    color: #087a37;
    display: block;
    font-size: 18px;
}

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

.web-table th,
.web-table td {
    border-bottom: 1px solid #eef0f2;
    padding: 10px 12px;
    text-align: left;
    white-space: nowrap;
}

.web-table th {
    color: #6b7280;
    font-size: 11px;
    font-weight: 800;
}

.status-chip {
    background: #e8f6eb;
    border-radius: 999px;
    color: #16803c;
    display: inline-flex;
    font-size: 11px;
    font-weight: 800;
    padding: 4px 8px;
}

.status-chip.danger { background: #fee2e2; color: #ef4444; }
.status-chip.warning { background: #fff7ed; color: #f97316; }
.status-chip.muted { background: #f3f4f6; color: #4b5563; }
.status-chip.success { background: #dcfce7; color: #16803c; }

.module-control {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
}

.section-title.compact {
    margin-bottom: 10px;
}

.section-title.compact h3 {
    font-size: 16px;
    margin: 0;
}

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

.module-toggle {
    align-items: center;
    background: var(--surface-low);
    border: 1px solid var(--border);
    border-radius: 8px;
    display: grid;
    gap: 8px;
    grid-template-columns: auto auto 1fr;
    min-height: 64px;
    padding: 9px;
}

.module-toggle input {
    height: 18px;
    width: 18px;
}

.module-toggle .material-symbols-outlined {
    color: var(--primary);
    font-size: 23px;
}

.module-toggle strong,
.module-toggle small {
    display: block;
}

.module-toggle small {
    color: var(--muted);
    font-size: 11px;
    line-height: 15px;
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 15px 16px;
}

.activity-list p {
    align-items: center;
    color: #374151;
    display: grid;
    font-size: 13px;
    gap: 10px;
    grid-template-columns: auto 1fr auto;
}

.activity-list p > span:last-child {
    color: #6b7280;
    font-size: 12px;
}

.green-dot,
.orange-dot,
.blue-dot {
    align-items: center;
    border-radius: 999px;
    display: inline-flex;
    font-size: 16px;
    height: 24px;
    justify-content: center;
    width: 24px;
}

.green-dot { background: #dcfce7; color: #16803c; }
.orange-dot { background: #ffedd5; color: #f97316; }
.blue-dot { background: #e0f2fe; color: #0284c7; }

.web-footer {
    color: #6b7280;
    display: flex;
    font-size: 12px;
    justify-content: space-between;
    padding: 12px 0 2px;
}

.web-footer span {
    align-items: center;
    display: inline-flex;
    gap: 8px;
}

@media (min-width: 1100px) {
    .screen.wide,
    .dashboard-screen {
        max-width: 1280px;
    }

    .dashboard-screen .summary-grid {
        grid-template-columns: 1.15fr repeat(3, minmax(0, 0.95fr));
    }

    .dashboard-screen .outstanding-card {
        grid-column: auto;
    }

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

    .dashboard-screen .module-strip {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .admin-metrics {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .admin-crud-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
    }

    .admin-editor.span-2,
    .admin-crud-grid .span-2 {
        grid-column: 1 / -1;
    }
}

@media (max-width: 600px) {
    .topbar {
        height: 86px;
        padding: 31px 12px 7px;
    }
    .topbar .avatar { height: 34px; width: 34px; }
    .brand-name { font-size: 17px; line-height: 20px; }
    .brand-subtitle { font-size: 10px; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .role-chip { font-size: 10px; min-height: 32px; padding: 0 8px; }
    .icon-button { height: 38px; width: 38px; }
    /* Keep the final content clear of Android gesture navigation and the fixed app bar. */
    .screen { padding: 14px 12px calc(108px + env(safe-area-inset-bottom)); scroll-padding-bottom: calc(108px + env(safe-area-inset-bottom)); }
    .dashboard-screen .tenant-panel > div:first-child .label,
    .dashboard-screen .tenant-panel > div:first-child .muted { display: none; }
    .dashboard-screen .tenant-panel { grid-template-columns: 1fr; }
    .dashboard-screen .tenant-panel h2 { font-size: 18px; }
    .dashboard-screen .tenant-controls { gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-screen .tenant-controls label { font-size: 10px; }
    .dashboard-screen .tenant-controls select { font-size: 12px; min-width: 0; padding: 7px; }
    .dashboard-screen .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-screen .outstanding-card { grid-column: 1 / -1; }
    .dashboard-screen .summary-grid > button { min-height: 112px; }
    .dashboard-screen .summary-grid h3 { font-size: 26px; margin: 5px 0; }
    .dashboard-screen .quick-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .dashboard-screen .quick-action { gap: 5px; min-height: 72px; padding: 7px 3px; }
    .dashboard-screen .quick-action span:last-child { font-size: 10px; line-height: 12px; }
    .dashboard-screen .quick-icon { font-size: 20px; height: 38px; width: 38px; }
    .dashboard-screen .module-strip { gap: 7px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-screen .module-strip button { gap: 5px; min-height: 70px; padding: 7px 5px; }
    .dashboard-screen .module-strip button .material-symbols-outlined { font-size: 23px; }
    .module-toggle-grid { grid-template-columns: 1fr; }
    .module-toggle { min-height: 58px; }
    .bottom-nav { height: calc(66px + env(safe-area-inset-bottom)); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
    .nav-item { border-radius: 7px; font-size: 9px; min-height: 48px; padding: 3px 2px; }
    .nav-item .material-symbols-outlined { font-size: 21px; }

    .login-screen {
        align-items: flex-start;
        padding: 18px 12px 28px;
    }

    .login-card {
        gap: 16px;
        margin-top: 8px;
        max-width: 100%;
        overflow: hidden;
        padding: 18px;
    }

    .login-brand h1 {
        font-size: 24px;
        line-height: 30px;
    }

    .role-picker {
        grid-template-columns: 1fr;
    }

    .role-choice {
        align-items: center;
        display: grid;
        grid-template-columns: 1fr;
        min-height: 76px;
        overflow: hidden;
        padding: 12px 14px;
    }

    .role-choice > .material-symbols-outlined {
        display: none;
    }

    .role-choice strong {
        font-size: 17px;
        line-height: 22px;
    }

    .role-choice small {
        font-size: 12px;
        line-height: 16px;
    }
}

/* Premium UI polish layer: keeps the existing app structure, upgrades the product finish. */
:root {
    --canvas: #f3f7f5;
    --canvas-wash: #eaf2ef;
    --ink: #0f1f1a;
    --ink-soft: #52625b;
    --line-soft: rgba(8, 58, 44, 0.1);
    --line-strong: rgba(8, 58, 44, 0.16);
    --emerald: #07533c;
    --emerald-2: #0c6b4c;
    --mint: #e8f5ee;
    --mint-2: #c9e8d7;
    --amber: #c77722;
    --rose: #c24136;
    --blue: #2563eb;
    --violet: #6d5bd0;
    --panel-shadow: 0 14px 34px rgba(15, 31, 26, 0.08);
    --panel-shadow-hover: 0 22px 48px rgba(15, 31, 26, 0.13);
}

body {
    background:
        radial-gradient(circle at 8% -10%, rgba(12, 107, 76, 0.13), transparent 32rem),
        radial-gradient(circle at 92% 2%, rgba(199, 119, 34, 0.1), transparent 28rem),
        linear-gradient(180deg, #fbfdfc 0%, var(--canvas) 54%, #ecf3f0 100%);
    color: var(--ink);
    letter-spacing: 0;
}

.app-shell {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.68), rgba(255, 255, 255, 0) 220px),
        var(--canvas);
}

.topbar {
    background: rgba(255, 255, 255, 0.9);
    border-bottom-color: rgba(8, 58, 44, 0.12);
    box-shadow: 0 12px 26px rgba(15, 31, 26, 0.07);
}

.brand-name {
    color: var(--emerald);
    font-weight: 900;
}

.avatar,
.quick-icon,
.row-icon,
.visitor-icon,
.notice-icon {
    background: linear-gradient(145deg, #effaf4, #d7efdf);
    border: 1px solid rgba(7, 83, 60, 0.12);
    color: var(--emerald);
}

.screen {
    max-width: 1220px;
    padding-top: 24px;
}

.card,
.tenant-panel,
.quick-action,
.module-strip button,
.hero-card,
.segmented,
.search-box,
.detail-strip,
.admin-editor,
.table-row {
    border-color: var(--line-soft);
    box-shadow: var(--panel-shadow);
}

.card,
.tenant-panel,
.quick-action,
.module-strip button {
    background: rgba(255, 255, 255, 0.94);
}

.card,
.tenant-panel,
.quick-action,
.module-strip button,
.primary-button,
.secondary-button,
.orange-button,
.danger-button,
.outline-danger,
.hero-card button,
.sos-card button,
.field input,
.field select,
.field textarea,
.tenant-controls select,
.segmented,
.modal-card {
    border-radius: 8px;
}

.tap-card,
.quick-action,
.module-strip button,
.web-kpi,
.web-panel,
.web-nav button,
.web-quick-actions button {
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
}

.tap-card:hover,
.quick-action:hover,
.module-strip button:hover,
.web-kpi:hover,
.web-panel:hover {
    border-color: var(--line-strong);
    box-shadow: var(--panel-shadow-hover);
    transform: translateY(-1px);
}

.tenant-panel {
    background:
        linear-gradient(90deg, rgba(232, 245, 238, 0.86), rgba(255, 255, 255, 0.96)),
        #fff;
    border-left: 0;
    overflow: hidden;
    position: relative;
}

.tenant-panel::before {
    background: linear-gradient(180deg, var(--emerald), #7dbd4f);
    content: "";
    inset: 0 auto 0 0;
    position: absolute;
    width: 5px;
}

.tenant-panel h2 {
    color: var(--ink);
    font-weight: 900;
}

.tenant-controls label {
    color: var(--emerald);
    letter-spacing: 0.04em;
}

.tenant-controls select,
.field input,
.field select,
.field textarea,
.search-box {
    background: #fbfdfc;
    border-color: rgba(8, 58, 44, 0.16);
}

.outstanding-card {
    background:
        linear-gradient(135deg, #fff8f4 0%, #ffffff 64%),
        #ffffff;
    border-left: 0;
    color: var(--ink);
    overflow: hidden;
    position: relative;
}

.outstanding-card::before {
    background: linear-gradient(180deg, var(--rose), #f59e0b);
    content: "";
    inset: 0 auto 0 0;
    position: absolute;
    width: 5px;
}

.outstanding-card .label,
.outstanding-card .material-symbols-outlined {
    color: var(--rose);
}

.outstanding-card .amount-row strong {
    color: #8f1f17;
}

.danger-button,
.primary-button,
.orange-button {
    box-shadow: 0 12px 22px rgba(7, 83, 60, 0.16);
}

.primary-button,
.danger-button {
    background: linear-gradient(135deg, var(--emerald), var(--emerald-2));
}

.danger-button {
    background: linear-gradient(135deg, #b22f26, #e06928);
}

.secondary-button {
    background: #ffffff;
    border-color: rgba(8, 58, 44, 0.2);
    color: var(--emerald);
}

.quick-grid {
    gap: 12px;
}

.quick-action {
    color: var(--ink);
    min-height: 112px;
}

.quick-action .quick-icon {
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}

.module-strip button {
    align-items: flex-start;
    background: linear-gradient(180deg, #ffffff, #f8fbf9);
    justify-content: flex-start;
    text-align: left;
}

.module-strip button .material-symbols-outlined {
    background: var(--mint);
    border-radius: 8px;
    color: var(--emerald);
    padding: 7px;
}

.section-title h2,
.dashboard-screen h2 {
    color: var(--ink);
    font-weight: 900;
}

.notice-row {
    align-items: flex-start;
}

.notice-row strong,
.row-card strong,
.ticket h3 {
    color: var(--ink);
}

.bottom-nav {
    background: rgba(255, 255, 255, 0.94);
    border-top-color: rgba(8, 58, 44, 0.12);
    box-shadow: 0 -14px 34px rgba(15, 31, 26, 0.1);
}

.nav-item.active {
    background: linear-gradient(180deg, var(--mint), #d9f0e2);
    color: var(--emerald);
}

.login-screen {
    background:
        radial-gradient(circle at top left, rgba(7, 83, 60, 0.15), transparent 30rem),
        linear-gradient(150deg, #f7fbf9 0%, #eef5f1 54%, #ffffff 100%);
}

.login-card {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(248, 252, 250, 0.96)),
        #fff;
    border-color: rgba(8, 58, 44, 0.12);
    box-shadow: 0 26px 70px rgba(15, 31, 26, 0.16);
}

.brand-monogram {
    background: linear-gradient(135deg, var(--emerald), #7dbd4f);
    color: #ffffff;
}

.role-choice {
    border-color: rgba(8, 58, 44, 0.13);
    border-left-color: var(--emerald);
    box-shadow: 0 8px 20px rgba(15, 31, 26, 0.05);
}

.role-choice:hover,
.role-choice:focus-visible {
    border-color: rgba(7, 83, 60, 0.45);
    box-shadow: 0 14px 34px rgba(7, 83, 60, 0.13);
    transform: translateY(-1px);
}

.role-choice > .material-symbols-outlined {
    color: var(--emerald);
}

.role-choice.accountant {
    border-left-color: var(--amber);
}

.role-choice.accountant > .material-symbols-outlined {
    color: var(--amber);
}

.web-dashboard {
    background:
        radial-gradient(circle at 0% 0%, rgba(12, 107, 76, 0.08), transparent 26rem),
        linear-gradient(180deg, #fbfdfc 0%, #f2f7f4 100%);
    color: var(--ink);
    grid-template-columns: 270px minmax(0, 1fr);
}

.web-sidebar {
    background: rgba(255, 255, 255, 0.92);
    border-right-color: rgba(8, 58, 44, 0.12);
    box-shadow: 18px 0 44px rgba(15, 31, 26, 0.05);
    height: 100svh;
    padding: 18px 14px 22px;
}

.web-brand {
    border-bottom: 1px solid rgba(8, 58, 44, 0.08);
    margin-bottom: 18px;
    padding-bottom: 18px;
}

.web-brand strong {
    color: var(--emerald);
    font-size: 17px;
    letter-spacing: 0;
}

.web-logo {
    border-color: rgba(7, 83, 60, 0.2);
    box-shadow: 0 10px 22px rgba(7, 83, 60, 0.16);
}

.web-nav {
    gap: 5px;
}

.web-nav button,
.web-quick-actions button {
    border: 1px solid transparent;
    color: #26342f;
}

.web-nav button:hover,
.web-quick-actions button:hover {
    background: #f2f8f5;
    border-color: rgba(8, 58, 44, 0.1);
    color: var(--emerald);
}

.web-nav button.active {
    background: linear-gradient(135deg, var(--emerald), #0c744f);
    box-shadow: 0 12px 24px rgba(7, 83, 60, 0.24);
}

.web-quick-actions {
    background: linear-gradient(180deg, #ffffff, #f8fbf9);
    border-color: rgba(8, 58, 44, 0.1);
    box-shadow: 0 12px 28px rgba(15, 31, 26, 0.06);
}

.web-quick-actions h3 {
    color: var(--ink);
    font-weight: 900;
}

.web-topbar {
    background: rgba(255, 255, 255, 0.9);
    border-bottom-color: rgba(8, 58, 44, 0.1);
    box-shadow: 0 12px 30px rgba(15, 31, 26, 0.05);
    height: 86px;
}

.web-content {
    background: transparent;
    padding: 24px 30px 34px;
}

.web-search {
    background: #ffffff;
    border-color: rgba(8, 58, 44, 0.12);
    box-shadow: 0 10px 26px rgba(15, 31, 26, 0.05);
}

.web-search .material-symbols-outlined {
    color: var(--emerald);
}

.web-search kbd {
    background: #f7faf8;
    border-color: rgba(8, 58, 44, 0.12);
}

.web-header-actions button,
.web-filters button,
.web-panel-head button,
.web-user button {
    background: #ffffff;
    border-color: rgba(8, 58, 44, 0.12);
}

.web-header-actions button:hover,
.web-filters button:hover,
.web-panel-head button:hover {
    background: #f2f8f5;
    color: var(--emerald);
}

.web-header-actions button small {
    background: var(--emerald);
}

.web-user {
    border-left-color: rgba(8, 58, 44, 0.12);
}

.web-page-title h1 {
    color: var(--ink);
    font-size: 24px;
    letter-spacing: 0;
}

.web-page-title p,
.web-kpi p,
.web-kpi small,
.web-table th,
.health-list span,
.activity-list p > span:last-child {
    color: var(--ink-soft);
}

.web-filters button {
    min-height: 44px;
    min-width: 140px;
}

.web-kpi-grid {
    grid-template-columns: repeat(6, minmax(156px, 1fr));
}

.web-kpi,
.web-panel {
    background: rgba(255, 255, 255, 0.96);
    border-color: rgba(8, 58, 44, 0.1);
    box-shadow: 0 12px 28px rgba(15, 31, 26, 0.06);
}

.web-kpi {
    align-items: flex-start;
    min-height: 118px;
    padding: 18px 16px;
}

.web-kpi strong {
    color: var(--ink);
    font-size: 22px;
    font-weight: 900;
}

.kpi-icon {
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.72);
}

.kpi-icon.green {
    background: linear-gradient(145deg, #edf9f1, #d8f0df);
    color: var(--emerald-2);
}

.kpi-icon.orange {
    background: linear-gradient(145deg, #fff6ed, #ffe5cb);
    color: #d95d11;
}

.kpi-icon.purple {
    background: linear-gradient(145deg, #f5f2ff, #e5defe);
    color: var(--violet);
}

.web-panel {
    overflow: hidden;
}

.web-panel-head {
    background: linear-gradient(180deg, #ffffff, #fbfdfc);
    border-bottom-color: rgba(8, 58, 44, 0.08);
}

.web-panel-head h2 {
    color: var(--ink);
    font-size: 16px;
    font-weight: 900;
}

.progress-ring {
    background:
        radial-gradient(circle at center, #ffffff 55%, transparent 56%),
        conic-gradient(var(--emerald) 0 82%, #dfe8e3 82% 100%);
}

.progress-ring strong {
    color: var(--ink);
}

.dues-callout {
    background: linear-gradient(90deg, #fff8ed, #ffffff);
    border-color: rgba(199, 119, 34, 0.22);
    color: var(--ink);
}

.upload-drop {
    background: linear-gradient(180deg, #ffffff, #f8fbf9);
    border-color: rgba(8, 58, 44, 0.18);
}

.upload-drop:hover {
    background: #f2f8f5;
    border-color: rgba(7, 83, 60, 0.36);
}

.health-status {
    background: linear-gradient(135deg, #edf9f1, #ffffff);
    border-color: rgba(8, 58, 44, 0.1);
}

.web-table {
    border-collapse: separate;
    border-spacing: 0;
}

.web-table th {
    background: #f7faf8;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.web-table td {
    color: #25332e;
}

.web-table tbody tr:hover {
    background: #f8fbf9;
}

.status-chip {
    border: 1px solid transparent;
    font-weight: 900;
}

.status-chip.success {
    background: #e4f7ea;
    color: #13743d;
}

.status-chip.warning,
.status-chip.warn {
    background: #fff1db;
    color: #9a4b00;
}

.status-chip.danger {
    background: #ffe5df;
    color: #a83024;
}

.activity-list p {
    border-bottom: 1px solid rgba(8, 58, 44, 0.08);
    margin: 0;
    padding-bottom: 12px;
}

.activity-list p:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.web-footer {
    color: var(--ink-soft);
}

@media (max-width: 1420px) {
    .web-kpi-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .web-kpi {
        min-height: 104px;
    }
}

@media (max-width: 1240px) {
    .web-panel-grid,
    .web-bottom-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 999px) {
    .web-dashboard {
        background: var(--canvas);
        display: block;
        grid-template-columns: 1fr;
    }

    .web-sidebar {
        display: block;
        height: auto;
        min-height: 0;
        overflow: hidden;
        padding: 8px 10px;
        position: sticky;
        top: 0;
        z-index: 40;
    }

    .web-sidebar .web-menu-button,
    .web-sidebar .web-brand,
    .web-sidebar .web-quick-actions {
        display: none;
    }

    .web-sidebar .web-nav {
        display: flex;
        flex-direction: row;
        gap: 6px;
        min-height: 0;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 0;
        scrollbar-width: thin;
    }

    .web-sidebar .web-nav button {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .web-topbar {
        border-radius: 0 0 8px 8px;
        height: auto;
    }

    .web-content {
        padding: 18px 14px 92px;
    }

    .web-search {
        display: none;
    }

    .web-header-actions {
        margin-left: auto;
    }

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

    .web-page-title h1 {
        font-size: 22px;
        line-height: 28px;
    }
}

@media (max-width: 600px) {
    body {
        background:
            radial-gradient(circle at 12% -6%, rgba(12, 107, 76, 0.14), transparent 20rem),
            linear-gradient(180deg, #f8fbf9 0%, #eef5f1 100%);
    }

    .topbar {
        height: 78px;
        padding-top: 24px;
    }

    .screen {
        padding-left: 14px;
        padding-right: 14px;
    }

    .dashboard-screen {
        gap: 18px;
        padding-top: 16px;
    }

    .dashboard-screen .tenant-panel {
        padding: 16px;
    }

    .dashboard-screen .tenant-panel > div:first-child .label {
        display: block;
        font-size: 10px;
    }

    .dashboard-screen .summary-grid {
        gap: 10px;
    }

    .dashboard-screen .card {
        padding: 15px;
    }

    .dashboard-screen .summary-grid > button {
        min-height: 104px;
    }

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

    .dashboard-screen .quick-action {
        align-items: flex-start;
        min-height: 96px;
        padding: 13px;
        text-align: left;
    }

    .dashboard-screen .quick-action span:last-child {
        font-size: 12px;
        line-height: 16px;
    }

    .module-strip button {
        min-height: 82px;
    }

    .web-kpi-grid {
        grid-template-columns: 1fr;
    }

    .web-header-actions {
        gap: 7px;
    }

    .web-topbar {
        display: none;
    }

    .web-user > div {
        display: none;
    }
}

/* Option A implementation pass: cleaner executive SaaS dashboard and mobile member polish. */
.web-dashboard {
    background:
        radial-gradient(circle at 7% -8%, rgba(7, 83, 60, 0.08), transparent 30rem),
        radial-gradient(circle at 98% 0%, rgba(125, 189, 79, 0.08), transparent 28rem),
        linear-gradient(180deg, #fbfdfc 0%, #f2f7f4 100%);
}

.web-sidebar {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 252, 250, 0.96));
    padding-left: 18px;
    padding-right: 18px;
}

.web-logo.web-logo-mark {
    align-items: center;
    background: linear-gradient(135deg, #07533c, #0c7a52);
    border: 0;
    border-radius: 8px;
    box-shadow: 0 14px 28px rgba(7, 83, 60, 0.2);
    color: #ffffff;
    display: inline-flex;
    font-size: 20px;
    font-weight: 900;
    height: 54px;
    justify-content: center;
    letter-spacing: 0;
    width: 54px;
}

.web-brand {
    gap: 12px;
}

.web-brand strong {
    font-size: 18px;
    line-height: 22px;
}

.web-brand span {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.web-nav button {
    min-height: 40px;
    padding: 9px 12px;
}

.web-nav button.active {
    background: #07533c;
    box-shadow: 0 16px 32px rgba(7, 83, 60, 0.2);
}

.web-content {
    padding: 24px 34px 34px;
}

.web-page-title {
    margin-bottom: 20px;
}

.web-page-title h1 {
    font-size: 25px;
    line-height: 32px;
}

.web-kpi {
    background: #ffffff;
    border-color: rgba(7, 83, 60, 0.12);
    min-height: 116px;
}

.web-kpi strong {
    font-size: 24px;
    line-height: 30px;
}

.web-panel {
    background: #ffffff;
}

.web-panel-head {
    padding: 16px 20px;
}

.accounting-overview {
    padding: 18px 20px;
}

.imports-panel .import-row,
.health-list,
.activity-list {
    padding-left: 20px;
    padding-right: 20px;
}

.dues-callout,
.upload-drop,
.health-status {
    margin-left: 20px;
    margin-right: 20px;
}

.web-table th,
.web-table td {
    padding-left: 20px;
    padding-right: 20px;
}

.dashboard-screen .tenant-panel {
    background:
        linear-gradient(135deg, rgba(232, 245, 238, 0.95), rgba(255, 255, 255, 0.98) 70%),
        #ffffff;
}

.dashboard-screen .quick-action,
.dashboard-screen .module-strip button {
    background: #ffffff;
}

@media (min-width: 1421px) {
    .web-kpi-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .screen {
        padding-bottom: calc(168px + env(safe-area-inset-bottom));
        scroll-padding-bottom: calc(168px + env(safe-area-inset-bottom));
    }

    .dashboard-screen .tenant-panel {
        min-height: 126px;
    }

    .dashboard-screen .tenant-controls {
        margin-top: 4px;
    }

    .dashboard-screen .summary-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-screen .outstanding-card,
    .dashboard-screen .summary-grid > button {
        min-height: 118px;
    }

    .dashboard-screen .outstanding-card .amount-row strong {
        font-size: 34px;
    }

    .dashboard-screen .quick-action {
        min-height: 104px;
    }

    .dashboard-screen h2,
    .dashboard-screen .quick-grid,
    .dashboard-screen .module-strip,
    .dashboard-screen .notice-card {
        scroll-margin-bottom: calc(132px + env(safe-area-inset-bottom));
    }
}
.bill-print-sheet {
    display: none;
}

.logo-configuration-preview {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    border: 1px dashed #b8c8c0;
    border-radius: 12px;
    background: #fff;
}

.logo-configuration-preview img {
    width: 76px;
    height: 76px;
    border-radius: 10px;
    object-fit: contain;
    background: #fff;
}

.report-viewer-card {
    min-width: 0;
}

.form-error {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    padding: 0.75rem 0.85rem;
    border: 1px solid #efb2b2;
    border-radius: 10px;
    background: #fff2f2;
    color: #a51d1d;
    font-size: 0.82rem;
    line-height: 1.25rem;
}

.form-error .material-symbols-outlined {
    font-size: 20px;
}

.report-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 1rem 0;
}

.report-actions button {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 48px;
    justify-content: center;
    padding-inline: 1.15rem;
}

.report-catalog-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.8rem;
    margin-top: 1.1rem;
}

.report-catalog-grid .workspace-option {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.75rem;
    min-height: 76px;
    padding: 0.85rem;
    border: 1px solid #d8e0e9;
    border-radius: 12px;
    background: #fff;
    color: #213044;
    text-align: left;
    box-shadow: 0 2px 5px rgba(27, 46, 70, 0.04);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.report-catalog-grid .workspace-option:hover {
    border-color: var(--primary);
    background: #f8fcfa;
    box-shadow: 0 8px 18px rgba(16, 91, 66, 0.11);
    transform: translateY(-1px);
}

.report-catalog-grid .workspace-option.selected {
    border-color: var(--primary);
    background: color-mix(in srgb, var(--primary) 8%, #fff);
    box-shadow: inset 4px 0 0 var(--primary), 0 6px 14px rgba(16, 91, 66, 0.08);
}

.report-catalog-grid .workspace-option > .material-symbols-outlined {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: color-mix(in srgb, var(--primary) 12%, #fff);
    color: var(--primary);
    font-size: 23px;
}

.report-catalog-grid .workspace-option > span:nth-child(2) {
    min-width: 0;
}

.report-catalog-grid .workspace-option strong,
.report-catalog-grid .workspace-option small {
    display: block;
}

.report-catalog-grid .workspace-option strong {
    overflow: hidden;
    font-size: 0.9rem;
    line-height: 1.25rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.report-catalog-grid .workspace-option small {
    margin-top: 0.18rem;
    color: #657387;
    font-size: 0.72rem;
    line-height: 1rem;
}

.report-catalog-grid .workspace-option::after {
    content: "chevron_right";
    font-family: "Material Symbols Outlined";
    color: #8290a3;
    font-size: 21px;
}

.report-catalog-grid .workspace-option.selected::after {
    color: var(--primary);
}

.report-download {
    display: inline-flex;
    margin: 1rem 0;
}

.report-preview {
    margin-top: 1.25rem;
    border: 1px solid #dbe2ec;
    border-radius: 16px;
    background: #fff;
    overflow: hidden;
}

.report-preview > header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #dbe2ec;
    background: #f7f9fc;
}

.report-preview > header h2,
.report-preview > header p {
    margin: 0;
}

.report-preview > header > div:last-child {
    display: grid;
    gap: 0.2rem;
    text-align: right;
}

.report-table-scroll {
    width: 100%;
    max-height: 65vh;
    overflow: auto;
}

.report-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.86rem;
}

.report-table th,
.report-table td {
    padding: 0.7rem 0.8rem;
    border-bottom: 1px solid #e7ebf1;
    text-align: left;
    white-space: nowrap;
}

.report-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #eaf0f8;
    color: #28354b;
    font-weight: 700;
}

.report-table tbody tr:nth-child(even) {
    background: #f9fbfd;
}

.report-table tbody tr:hover {
    background: #eef5ff;
}

@media (max-width: 640px) {
    .report-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .report-catalog-grid {
        grid-template-columns: 1fr;
    }

    .report-preview > header {
        align-items: flex-start;
        flex-direction: column;
    }

    .report-preview > header > div:last-child {
        text-align: left;
    }
}

@media (min-width: 641px) and (max-width: 1050px) {
    .report-catalog-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media print {
    @page { size: A4 portrait; margin: 8mm; }
    body { background: #fff !important; color: #111 !important; font-family: Arial, sans-serif; }
    body > * { visibility: hidden !important; }
    .bill-print-sheet, .bill-print-sheet * { visibility: visible !important; }
    .app-shell > :not(.screen), .screen > :not(.bill-print-sheet) { display: none !important; }
    .app-shell, .screen { display: block !important; min-height: 0 !important; height: auto !important; padding: 0 !important; margin: 0 !important; }
    .bill-print-sheet {
        display: block !important;
        position: static;
        width: 100%;
        padding: 4mm;
        border: 1px solid #222;
        background: #fff;
        font-size: 10pt;
        line-height: 1.3;
    }
    .print-society-header { text-align: center; border-bottom: 1px solid #222; padding: 2mm; }
    .print-society-logo { display: block; width: 20mm; height: 20mm; margin: 0 auto 1mm; object-fit: contain; }
    .print-society-header h1 { margin: 0; font-size: 16pt; text-transform: uppercase; }
    .print-society-header h2 { margin: 2mm 0 0; padding-top: 1mm; border-top: 1px solid #777; font-size: 11pt; letter-spacing: .04em; }
    .print-society-header p { margin: 1px 0; }
    .print-bill-meta { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid #222; }
    .print-bill-meta > div { display: grid; grid-template-columns: 32mm 1fr; gap: 1mm 2mm; padding: 3mm; }
    .print-bill-meta > div:first-child { border-right: 1px solid #222; }
    .print-charge-table { width: 100%; border-collapse: collapse; min-height: 95mm; }
    .print-charge-table th, .print-charge-table td { border: 1px solid #555; padding: 1.5mm 2mm; vertical-align: top; }
    .print-charge-table th:first-child, .print-charge-table td:first-child { width: 15mm; text-align: center; }
    .print-charge-table th:last-child, .print-charge-table td:last-child { width: 32mm; text-align: right; }
    .print-charge-table small { display: block; font-weight: normal; color: #333; }
    .print-total-row td, .print-grand-total td { font-weight: 700; }
    .print-grand-total td { border-top: 2px solid #111; border-bottom: 2px double #111; }
    .print-words { border: 1px solid #222; border-top: 0; margin: 0; padding: 2mm; }
    .print-signature { display: flex; justify-content: space-between; padding: 3mm 2mm; }
    .print-notes { border: 1px solid #222; padding: 2mm 3mm; }
    .print-notes h2 { font-size: 10pt; margin: 0 0 1mm; }
    .print-notes ol { margin: 0; padding-left: 6mm; }
    .print-footer-note { margin: 2mm 0 0; padding-top: 1.5mm; border-top: 1px solid #999; font-weight: 600; text-align: center; }
    .print-receipt { margin-top: 4mm; border: 1px solid #222; padding: 2mm 3mm; break-inside: avoid; }
    .print-receipt header { text-align: center; border-bottom: 1px solid #222; }
    .print-receipt h2 { margin: 0; font-size: 13pt; text-transform: uppercase; }
    .print-receipt-grid { display: grid; grid-template-columns: repeat(5, auto); gap: 1mm 3mm; border: 1px solid #555; padding: 2mm; }
    .bill-template-compact { font-size: 9pt; padding: 2.5mm; }
    .bill-template-compact .print-charge-table { min-height: 58mm; }
    .bill-template-compact .print-society-logo { width: 15mm; height: 15mm; }
    .bill-template-compact .print-signature { padding-block: 1.5mm; }
    .bill-template-compact .print-notes,
    .bill-template-compact .print-receipt { padding: 1.5mm 2mm; }
}
.member-record-modal { max-height: 72vh; overflow-y: auto; padding-right: .35rem; }
.record-section { border: 1px solid #e2e8f0; border-radius: 16px; padding: 1rem; background: #f8fafc; }
.record-section h3 { display: flex; align-items: center; gap: .45rem; margin: 0 0 .9rem; color: #16324f; }
.record-list { display: grid; gap: .55rem; margin-top: .8rem; }
.record-list .admin-row { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; }
