:root {
    --bcp-navy: #1b2a41;
    --bcp-royal-blue: #033AA8;
    --bcp-blue: #1b3a63;
    --bcp-blue-dark: #12283f;
    --bcp-bg: #f4f6f9;
    --bcp-card: #ffffff;
    --bcp-border: #dde3ea;
    --bcp-text: #1b2430;
    --bcp-text-muted: #667085;
    --bcp-error: #c0362c;
    --bcp-error-bg: #fdecea;
    --bcp-success: #1b7a3d;
    --bcp-success-bg: #e9f7ee;
    --bcp-note-bg: #fdf3d9;
    --bcp-note-text: #7a5b12;
    --bcp-upgrades-bg: #5b3a73;
    --bcp-notes-bg: #0f6e6e;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bcp-bg);
    color: var(--bcp-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-text-size-adjust: 100%;
}

a { color: var(--bcp-blue); text-decoration: none; }
a:hover { text-decoration: underline; }

.bcp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    background: var(--bcp-navy);
    color: #fff;
    padding: 14px 16px;
}

.bcp-header__brand {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}
.bcp-header__brand:hover { text-decoration: none; opacity: 0.9; }

.bcp-header__user {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 0.9rem;
    color: #cbd5e1;
}

.bcp-header__name {
    text-transform: uppercase;
}

.bcp-impersonate-form {
    display: inline-flex;
    margin: 0;
}
.bcp-impersonate-select {
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    background: rgba(255,255,255,0.12);
    border: none;
    border-radius: 6px;
    padding: 6px 10px;
    cursor: pointer;
}
.bcp-impersonate-select option {
    color: var(--bcp-text);
    background: #fff;
}

.bcp-header__logout {
    color: #fff;
    background: rgba(255,255,255,0.12);
    padding: 6px 12px;
    border-radius: 6px;
}
.bcp-header__logout:hover { background: rgba(255,255,255,0.22); text-decoration: none; }

.bcp-main {
    max-width: 960px;
    margin: 0 auto;
    padding: 24px 16px 48px;
}

.bcp-footer {
    text-align: center;
    padding: 16px;
}
.bcp-footer a {
    color: var(--bcp-text-muted);
    font-size: 0.8rem;
    text-decoration: none;
}
.bcp-footer a:hover {
    text-decoration: underline;
}

/* Login */
.bcp-login-wrap {
    min-height: calc(100vh - 60px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}

.bcp-login-card {
    width: 100%;
    max-width: 380px;
    background: var(--bcp-card);
    border: 1px solid var(--bcp-border);
    border-radius: 12px;
    padding: 32px 28px;
    box-shadow: 0 2px 10px rgba(20, 30, 50, 0.06);
    text-align: center;
}

.bcp-login-card h1 {
    font-size: 1.5rem;
    margin: 0 0 24px;
    color: var(--bcp-navy);
}

.bcp-field {
    text-align: left;
    margin-bottom: 16px;
}

.bcp-field label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--bcp-text-muted);
    margin-bottom: 6px;
}

.bcp-field input {
    width: 100%;
    font-size: 1rem;
    padding: 12px 14px;
    border: 1px solid var(--bcp-border);
    border-radius: 8px;
    background: #fff;
    color: var(--bcp-text);
}
.bcp-field input:focus {
    outline: none;
    border-color: var(--bcp-blue);
    box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.15);
}
.bcp-field textarea {
    display: block;
    width: 100%;
    font-family: inherit;
    font-size: 1rem;
    padding: 12px 14px;
    border: 1px solid var(--bcp-border);
    border-radius: 8px;
    background: #fff;
    color: var(--bcp-text);
    resize: vertical;
}
.bcp-field textarea:focus {
    outline: none;
    border-color: var(--bcp-blue);
    box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.15);
}
.bcp-field--narrow input {
    max-width: 100px;
}
.bcp-message-fields--hidden {
    display: none;
}
.bcp-radio-group {
    display: flex;
    gap: 16px;
    padding: 10px 0;
}
.bcp-field label.bcp-radio-option {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 0;
    font-weight: 400;
    font-size: 1rem;
    color: var(--bcp-text);
    cursor: pointer;
}

.bcp-btn {
    display: inline-block;
    width: 100%;
    font-family: inherit;
    line-height: normal;
    font-size: 1rem;
    font-weight: 600;
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    background: var(--bcp-blue);
    color: #fff;
    cursor: pointer;
    text-align: center;
}
.bcp-btn:hover { background: var(--bcp-blue-dark); text-decoration: none; }
.bcp-btn:active { transform: translateY(1px); }

.bcp-alert {
    background: var(--bcp-error-bg);
    color: var(--bcp-error);
    border: 1px solid rgba(192, 54, 44, 0.25);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.9rem;
    margin-bottom: 18px;
    text-align: left;
}

.bcp-alert--success {
    background: var(--bcp-success-bg);
    color: var(--bcp-success);
    border-color: rgba(27, 122, 61, 0.25);
}

/* Dashboard / community list */
.bcp-page-title {
    font-size: 1.4rem;
    color: var(--bcp-navy);
    margin: 0 0 20px;
}
.bcp-page-title--community {
    margin-bottom: 4px;
}

.bcp-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}
.bcp-title-row .bcp-page-title,
.bcp-title-row .bcp-section-title {
    margin: 0;
}
.bcp-home-nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.bcp-home-nav form {
    margin: 0;
}

.bcp-card-collapse-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: var(--bcp-text-muted);
}
.bcp-card-collapse-toggle:hover {
    color: var(--bcp-navy);
}
.bcp-card-collapse-toggle__icon {
    transition: transform 0.15s ease;
}
.bcp-card-collapse-toggle--open .bcp-card-collapse-toggle__icon {
    transform: rotate(90deg);
}
.bcp-today-content--collapsed {
    display: none;
}

.bcp-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    margin-bottom: 10px;
}

.bcp-breadcrumbs__sep {
    color: var(--bcp-text-muted);
}

.bcp-section-title {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--bcp-text-muted);
    margin: 28px 0 12px;
}
.bcp-section-title:first-of-type { margin-top: 0; }

.bcp-community-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}

.bcp-archived-communities {
    display: none;
    margin-top: 28px;
}
.bcp-archived-communities--open {
    display: block;
}

.bcp-community-card {
    display: block;
    background: var(--bcp-royal-blue);
    border: 1px solid var(--bcp-royal-blue);
    border-radius: 10px;
    padding: 20px 18px;
    color: #fff;
    font-weight: 600;
    font-size: 1.05rem;
    text-align: center;
    box-shadow: 0 1px 4px rgba(20,30,50,0.05);
}
.bcp-community-card:hover {
    background: var(--bcp-blue-dark);
    border-color: var(--bcp-blue-dark);
    text-decoration: none;
}

.bcp-community-card--archived {
    opacity: 0.65;
    background: var(--bcp-bg);
    color: var(--bcp-text);
    border-color: var(--bcp-border);
}
.bcp-community-card--archived:hover {
    background: var(--bcp-bg);
    border-color: var(--bcp-text-muted);
}

.bcp-home-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 10px;
    margin-bottom: 28px;
}

.bcp-home-buyer {
    color: var(--bcp-text);
    font-size: 1.15rem;
    font-weight: 700;
    margin: -18px 0 2px;
}

.bcp-home-meta {
    font-size: 0.85rem;
    color: var(--bcp-text-muted);
    margin: 0 0 2px;
}

.bcp-home-co-row {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 20px;
    margin: 0 0 20px;
}
.bcp-home-co-row .bcp-home-meta {
    margin: 0;
}
.bcp-permit-row form {
    margin: 0;
}

.bcp-tabs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--bcp-border);
}

.bcp-tabs__tab {
    flex: 0 0 auto;
    padding: 10px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--bcp-text-muted);
    border-bottom: 2px solid transparent;
    white-space: nowrap;
}
.bcp-tabs__tab:hover {
    color: var(--bcp-blue);
    text-decoration: none;
}

.bcp-tabs__tab--active {
    color: var(--bcp-blue);
    border-bottom-color: var(--bcp-blue);
}

.bcp-tab-panel {
    min-height: 120px;
}

.bcp-photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 8px;
    margin-bottom: 28px;
}
.bcp-photo-grid--large {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

body.bcp-gantt-open {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}
body.bcp-gantt-open .bcp-header {
    flex: 0 0 auto;
}
body.bcp-gantt-open .bcp-main {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    margin: 0;
    position: relative;
    padding: 0;
    max-width: none;
    overflow: hidden;
}
body.bcp-gantt-open .bcp-footer {
    display: none;
}
.bcp-gantt-modal {
    position: absolute;
    inset: 0;
    z-index: 900;
    background: var(--bcp-bg);
    overflow: auto;
}
.bcp-gantt-modal__close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: var(--bcp-card);
    color: var(--bcp-text);
    border: 1px solid var(--bcp-border);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    line-height: 1;
    z-index: 901;
    box-shadow: 0 1px 4px rgba(20,30,50,0.15);
}
.bcp-gantt-modal__close:hover {
    background: var(--bcp-bg);
    text-decoration: none;
}
.bcp-gantt-modal__body {
    max-width: 100%;
}

.bcp-gantt-wrap {
    display: flex;
    border: 1px solid var(--bcp-border);
    border-radius: 8px;
}
.bcp-gantt-labels {
    flex: 0 0 auto;
    width: 260px;
    border-right: 1px solid var(--bcp-border);
    background: var(--bcp-card);
}
.bcp-gantt-labels__header {
    display: flex;
    align-items: center;
    padding: 0 10px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--bcp-text-muted);
    border-bottom: 1px solid var(--bcp-border);
    border-radius: 8px 0 0 0;
    background: var(--bcp-bg);
    position: sticky;
    top: 0;
    z-index: 3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.bcp-gantt-labels__row {
    display: flex;
    align-items: center;
    padding: 0 10px;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--bcp-border);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: default;
}
.bcp-gantt-labels__row.bcp-gantt-highlight {
    background: var(--bcp-highlight, #fff3cd);
}
.bcp-gantt-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.bcp-gantt-ruler-scroll {
    position: sticky;
    top: 0;
    z-index: 2;
    overflow-x: auto;
    overflow-y: hidden;
    background: var(--bcp-bg);
    border-bottom: 1px solid var(--bcp-border);
    scrollbar-width: none;
}
.bcp-gantt-ruler-scroll::-webkit-scrollbar {
    display: none;
}
.bcp-gantt-ruler {
    position: relative;
}
.bcp-gantt-track-scroll {
    overflow-x: auto;
}
.bcp-gantt-track {
    position: relative;
}
.bcp-gantt-row-line {
    position: absolute;
    left: 0;
    height: 1px;
    background: var(--bcp-border);
}
.bcp-gantt-weekend {
    position: absolute;
    top: 0;
    bottom: 0;
    background: var(--bcp-bg);
}
.bcp-gantt-tick {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 1px;
    background: var(--bcp-border);
}
.bcp-gantt-tick-label {
    position: absolute;
    top: 0;
    display: flex;
    align-items: center;
    padding-left: 4px;
    font-size: 0.7rem;
    color: var(--bcp-text-muted);
    white-space: nowrap;
}
.bcp-gantt-today {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--bcp-error);
    z-index: 1;
}
.bcp-gantt-bar {
    position: absolute;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bcp-royal-blue);
    color: #fff;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    overflow: hidden;
    white-space: nowrap;
    cursor: default;
}
.bcp-gantt-bar--major {
    background: var(--bcp-royal-blue);
    font-weight: 700;
}
.bcp-gantt-bar--completed {
    background: var(--bcp-text-muted);
    font-weight: 600;
}
.bcp-gantt-bar.bcp-gantt-highlight {
    outline: 2px solid var(--bcp-error);
    outline-offset: 1px;
    z-index: 2;
}

.bcp-photo-thumb {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--bcp-border);
    background: var(--bcp-bg);
}

.bcp-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 20, 30, 0.9);
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 1000;
    touch-action: pan-y;
}

.bcp-lightbox--active {
    display: flex;
}

.bcp-lightbox__img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 6px;
    pointer-events: none;
}

.bcp-lightbox__close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: rgba(255,255,255,0.12);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
}
.bcp-lightbox__close:hover { background: rgba(255,255,255,0.22); }

.bcp-lightbox__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.12);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
}
.bcp-lightbox__nav:hover { background: rgba(255,255,255,0.22); }
.bcp-lightbox__nav--prev { left: 12px; }
.bcp-lightbox__nav--next { right: 12px; }

.bcp-lightbox__count {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255,255,255,0.12);
    color: #fff;
    border-radius: 20px;
    padding: 4px 14px;
    font-size: 0.85rem;
}

.bcp-lightbox__delete {
    display: none;
    position: absolute;
    top: 16px;
    left: 20px;
    background: rgba(192, 54, 44, 0.85);
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}
.bcp-lightbox__delete:hover {
    background: var(--bcp-error);
}
.bcp-lightbox__delete--visible {
    display: block;
}

@media (max-width: 600px) {
    .bcp-lightbox__nav { width: 40px; height: 40px; font-size: 1.5rem; }
}

.bcp-selection-sheet {
    display: block;
    width: 100%;
    max-width: 800px;
    height: auto;
    border: 1px solid var(--bcp-border);
    border-radius: 8px;
    margin: 0 auto;
}

.bcp-photos-more {
    text-align: center;
    margin-top: 12px;
}
.bcp-photos-more .bcp-btn {
    width: auto;
}

.bcp-upgrade-table {
    width: 100%;
    border-collapse: collapse;
    border-top: 1px solid var(--bcp-border);
}

.bcp-upgrade-table td {
    padding: 6px 8px;
    border-bottom: 1px solid var(--bcp-border);
    vertical-align: baseline;
}

.bcp-upgrade-table__desc {
    text-align: left;
    padding-right: 24px;
}

.bcp-upgrade-table__cost {
    text-align: right;
    white-space: nowrap;
    color: var(--bcp-navy);
    padding-left: 24px;
}

.bcp-upgrade-table__total-row td {
    border-bottom: none;
    border-top: 2px solid var(--bcp-border);
    font-weight: 700;
    font-size: 1.1rem;
}

.bcp-upgrade-table__subtotal-row td {
    border-top: 2px solid var(--bcp-border);
    font-weight: 700;
}

.bcp-upgrade-table__row--divider td {
    border-bottom: 1px solid var(--bcp-border);
}

.bcp-home-card {
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: var(--bcp-card);
    border: 1px solid var(--bcp-border);
    border-radius: 8px;
    padding: 12px 14px;
    color: var(--bcp-text);
}
.bcp-home-card:hover {
    border-color: var(--bcp-blue);
    text-decoration: none;
}

.bcp-home-card__lot {
    font-weight: 700;
    font-size: 0.98rem;
}

.bcp-home-card__addr {
    font-size: 0.82rem;
    color: var(--bcp-text-muted);
}

.bcp-home-card__buyer {
    font-size: 0.82rem;
    color: var(--bcp-text-muted);
    font-style: italic;
}

.bcp-home-card__co {
    font-size: 0.78rem;
    color: var(--bcp-text-muted);
}
.bcp-home-card__co:first-of-type {
    margin-top: 4px;
}

.bcp-search-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
}

.bcp-search-form label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--bcp-text-muted);
    margin-bottom: 6px;
}

.bcp-search-form__row {
    display: flex;
    gap: 8px;
}

.bcp-search-form__row input {
    flex: 1;
    min-width: 0;
    font-size: 1rem;
    padding: 10px 12px;
    border: 1px solid var(--bcp-border);
    border-radius: 8px;
}
.bcp-search-form__row input:focus {
    outline: none;
    border-color: var(--bcp-blue);
    box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.15);
}

.bcp-btn--compact {
    width: auto;
    padding: 10px 16px;
    white-space: nowrap;
}

.bcp-btn--small {
    width: auto;
    display: inline-block;
    padding: 6px 12px;
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
    background: #e4e7ec;
    color: var(--bcp-text-muted);
}
.bcp-btn--small:hover {
    background: #d5d9e0;
    color: var(--bcp-text);
}

.bcp-btn--tiny {
    width: auto;
    display: inline-block;
    padding: 3px 9px;
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
    background: #e4e7ec;
    color: var(--bcp-text-muted);
}
.bcp-btn--tiny:hover {
    background: #d5d9e0;
    color: var(--bcp-text);
}

.bcp-btn--tiny-danger {
    background: var(--bcp-error-bg);
    color: var(--bcp-error);
}
.bcp-btn--tiny-danger:hover {
    background: #f8d5d1;
    color: var(--bcp-error);
}

.bcp-upgrade-table__row--active td {
    background: var(--bcp-success-bg);
}

.bcp-edit-form {
    max-width: 420px;
}

.bcp-admin-panel {
    margin-top: 32px;
    background: var(--bcp-card);
    border: 1px solid var(--bcp-border);
    border-radius: 10px;
    padding: 18px;
}
.bcp-admin-panel__actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}
.bcp-admin-panel .bcp-section-title {
    margin-top: 0;
}

.bcp-card {
    background: var(--bcp-card);
    border: 1px solid var(--bcp-border);
    border-radius: 10px;
    padding: 18px;
    margin-bottom: 20px;
}
.bcp-card .bcp-section-title {
    margin-top: 0;
}
.bcp-card:last-child {
    margin-bottom: 0;
}

.bcp-admin-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.bcp-admin-form {
    display: none;
    max-width: 320px;
    margin-top: 16px;
}

.bcp-users-table-scroll {
    overflow-x: auto;
    margin-bottom: 12px;
}
.bcp-users-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.bcp-users-table th,
.bcp-users-table td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid var(--bcp-border);
    white-space: nowrap;
}
.bcp-users-table th {
    color: var(--bcp-text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.bcp-tasks-by-community-scroll {
    max-height: 70vh;
    overflow-y: auto;
}
.bcp-tasks-by-community-table {
    width: auto;
}
.bcp-users-table.bcp-tasks-by-community-table th,
.bcp-users-table.bcp-tasks-by-community-table td {
    padding: 3px 8px;
}
.bcp-tasks-by-community-table th:not(:first-child) {
    text-align: center;
}
.bcp-tasks-by-community-table th:nth-child(2) {
    text-align: left;
}
.bcp-tasks-by-community-table th:nth-child(n+2):nth-child(-n+5),
.bcp-tasks-by-community-table td:nth-child(n+2):nth-child(-n+5) {
    padding-left: 18px;
    padding-right: 18px;
}
.bcp-task-email-icon {
    display: inline-flex;
    color: var(--bcp-text-muted);
    cursor: help;
}
.bcp-drag-handle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    margin: 0 auto;
    color: var(--bcp-text-muted);
    cursor: grab;
}
.bcp-task-row {
    cursor: default;
}
.bcp-task-row.bcp-dragging {
    opacity: 0.4;
}
.bcp-tasks-by-community-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--bcp-card);
}
.bcp-users-table td.bcp-tasks-by-community-cell {
    text-align: center;
}
.bcp-tasks-by-community-cell form {
    display: inline-flex;
    margin: 0;
}

.bcp-admin-back,
.bcp-edit-user-back {
    display: block;
    margin-bottom: 16px;
}

.bcp-edit-user {
    margin-bottom: 12px;
}
.bcp-edit-user:last-child {
    margin-bottom: 0;
}

.bcp-edit-user .bcp-admin-form form,
#bcp-edit-task-list .bcp-admin-form form {
    margin-bottom: 12px;
}
.bcp-edit-user .bcp-admin-form form:last-child,
#bcp-edit-task-list .bcp-admin-form form:last-child {
    margin-bottom: 0;
}

.bcp-admin-form--open {
    display: block;
}

.bcp-configure-toggle {
    margin-bottom: 28px;
}

.bcp-configure-toggle--hidden {
    display: none;
}

.bcp-configure-add {
    display: none;
    margin-top: 16px;
}

.bcp-configure-add--open {
    display: block;
    margin-bottom: 28px;
}

.bcp-configure-add__category {
    font-size: 0.95rem;
    color: var(--bcp-navy);
    margin: 24px 0 4px;
}
.bcp-configure-add__category:first-child {
    margin-top: 0;
}

.bcp-today-building {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--bcp-text-muted);
    margin: 14px 0 4px;
}

.bcp-today-second-task {
    font-size: 0.85rem;
    color: var(--bcp-text-muted);
    margin-top: 4px;
    padding-left: 10px;
}

.bcp-today-task-notes {
    display: flex;
    align-items: center;
    gap: 8px;
}
.bcp-today-task-notes form {
    display: inline-flex;
    margin: 0;
}

button.bcp-configure-add__category {
    display: block;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 0;
    font-weight: 700;
    cursor: pointer;
}

.bcp-configure-category-toggle::before {
    content: '\25B8 ';
    display: inline-block;
}
.bcp-configure-category-toggle--open::before {
    content: '\25BE ';
}

.bcp-configure-category-table {
    display: none;
}
.bcp-configure-category-table--open {
    display: table;
}

.bcp-upgrade-table__action {
    text-align: right;
    padding-left: 12px;
}
.bcp-upgrade-table__action form {
    display: inline;
}
.bcp-upgrade-table__action .bcp-btn {
    width: auto;
}

.bcp-empty {
    color: var(--bcp-text-muted);
    padding: 30px 0;
    text-align: center;
}

.bcp-task-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.bcp-task-list__item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--bcp-border);
}
.bcp-task-list__item > form {
    flex: 0 0 auto;
    margin: 0;
}
.bcp-task-list__item:first-child {
    border-top: 1px solid var(--bcp-border);
}

.bcp-task-list__item--upgrades-summary {
    background: var(--bcp-upgrades-bg);
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    border-radius: 6px;
    border-bottom-color: transparent;
}

.bcp-task-list__item--notes-summary {
    background: var(--bcp-notes-bg);
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    border-radius: 6px;
    border-bottom-color: transparent;
}

.bcp-upgrades-toggle,
.bcp-notes-toggle {
    width: 100%;
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.bcp-upgrades-count-inline {
    display: inline-block;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    padding: 2px 10px;
    margin-left: 4px;
    vertical-align: middle;
}

.bcp-upgrades-caret {
    display: inline-flex;
    flex: 0 0 auto;
    color: rgba(255, 255, 255, 0.85);
    transition: transform 0.15s ease;
}
.bcp-upgrades-toggle--open .bcp-upgrades-caret {
    transform: rotate(90deg);
}

.bcp-upgrades-wrapper,
.bcp-notes-wrapper {
    margin-bottom: 16px;
}

.bcp-upgrades-wrapper--open {
    border: 2px solid var(--bcp-upgrades-bg);
    border-radius: 8px;
    margin-bottom: 28px;
    overflow: hidden;
}
.bcp-upgrades-wrapper--open .bcp-task-list:first-of-type .bcp-task-list__item:first-child {
    border-top: none;
}

.bcp-notes-wrapper--open {
    border: 2px solid var(--bcp-notes-bg);
    border-radius: 8px;
    margin-bottom: 28px;
    overflow: hidden;
}
.bcp-notes-wrapper--open .bcp-task-list:first-of-type .bcp-task-list__item:first-child {
    border-top: none;
}

.bcp-notes-wrapper--force-hidden {
    display: none;
}

.bcp-add-task-panel {
    padding: 12px;
    border-bottom: 1px solid var(--bcp-border);
}

.bcp-add-task-form {
    display: none;
    margin-top: 12px;
}
.bcp-add-task-form--open {
    display: block;
}
.bcp-add-task-form textarea {
    display: block;
    width: 100%;
    font-size: 0.9rem;
    font-family: inherit;
    padding: 8px 10px;
    border: 1px solid var(--bcp-border);
    border-radius: 8px;
    background: #fff;
    color: var(--bcp-text);
    resize: vertical;
}

.bcp-upgrades-detail {
    display: none;
}
.bcp-upgrades-detail .bcp-empty {
    padding: 20px 12px;
}
.bcp-upgrades-detail--open {
    display: block;
}
.bcp-upgrades-detail .bcp-task-list {
    border-top: none;
}
.bcp-upgrades-detail .bcp-task-list__item:first-child {
    border-top: none;
}

.bcp-task-list__item--major {
    background: var(--bcp-royal-blue);
    color: #fff;
    font-weight: 700;
    border-radius: 6px;
    border-bottom-color: transparent;
}

.bcp-task-list__item--scott-only {
    opacity: 0.5;
}

.bcp-task-list__content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: 4px 12px;
}

.bcp-task-list__main {
    flex: 1;
    min-width: 0;
}

.bcp-task-list__check {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--bcp-success);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1;
    border: none;
    padding: 0;
    font-family: inherit;
}
button.bcp-task-list__check {
    cursor: pointer;
}

.bcp-task-list__check--pending {
    background: none;
    border: 2px solid var(--bcp-border);
    color: var(--bcp-text-muted);
    cursor: pointer;
    padding: 0;
}
.bcp-task-list__check--pending:hover {
    border-color: var(--bcp-text-muted);
    color: var(--bcp-text);
}
.bcp-task-list__item--major .bcp-task-list__check--pending {
    border-color: rgba(255, 255, 255, 0.5);
    color: rgba(255, 255, 255, 0.7);
}
.bcp-task-list__item--major .bcp-task-list__check--pending:hover {
    border-color: #fff;
    color: #fff;
}

.bcp-level-icons {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
}
.bcp-level-icons form {
    display: inline-flex;
    margin: 0;
}

.bcp-level-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid var(--bcp-border);
    background: none;
    color: var(--bcp-text-muted);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0;
    line-height: 1;
}
button.bcp-level-icon {
    cursor: pointer;
}
button.bcp-level-icon:hover {
    border-color: var(--bcp-text-muted);
    color: var(--bcp-text);
}

.bcp-level-icon--active {
    background: var(--bcp-notes-bg);
    border-color: var(--bcp-notes-bg);
    color: #fff;
}
button.bcp-level-icon--active:hover {
    background: var(--bcp-notes-bg);
    border-color: var(--bcp-notes-bg);
    color: #fff;
    opacity: 0.85;
}

.bcp-task-list__item--completed .bcp-task-list__content {
    opacity: 0.6;
}

.bcp-task-list__name {
    font-weight: 600;
}
.bcp-task-list__item--major .bcp-task-list__name {
    font-weight: 700;
}
.bcp-task-list__name a {
    color: inherit;
    text-decoration: none;
}
.bcp-task-list__name a:hover {
    text-decoration: underline;
}

.bcp-task-list__days {
    font-weight: 400;
    color: var(--bcp-text-muted);
    font-size: 0.85em;
}
.bcp-task-list__item--major .bcp-task-list__days {
    color: rgba(255, 255, 255, 0.6);
}

.bcp-task-list__notes {
    font-size: 0.85rem;
    color: var(--bcp-note-text);
    background: var(--bcp-note-bg);
    border-radius: 6px;
    padding: 6px 10px;
    margin-top: 6px;
}
.bcp-task-list__item--major .bcp-task-list__notes {
    color: var(--bcp-note-text);
    font-weight: 400;
}

.bcp-task-list__note-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    width: 22px;
    height: 22px;
    padding: 0;
    margin-left: 2px;
    border: none;
    border-radius: 4px;
    background: none;
    color: var(--bcp-text-muted);
    opacity: 0.5;
    cursor: pointer;
}
.bcp-task-list__note-icon:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.06);
}
.bcp-task-list__note-icon--filled {
    opacity: 0.85;
    color: var(--bcp-blue);
}
.bcp-task-list__note-icon--static {
    cursor: default;
    opacity: 0.85;
}
.bcp-task-list__note-icon--static:hover {
    background: none;
}
.bcp-task-list__item--major .bcp-task-list__note-icon {
    color: rgba(255, 255, 255, 0.7);
}
.bcp-task-list__item--major .bcp-task-list__note-icon:hover {
    background: rgba(255, 255, 255, 0.15);
    opacity: 1;
}
.bcp-task-list__item--major .bcp-task-list__note-icon--filled {
    color: #fff;
}

.bcp-note-form {
    display: none;
    margin-top: 8px;
    max-width: 420px;
}
.bcp-note-form--open {
    display: block;
}

.bcp-photo-upload-form {
    display: inline-block;
    margin: 0;
    vertical-align: middle;
}

.bcp-photo-upload-row {
    margin-bottom: 16px;
}
.bcp-photo-upload-row .bcp-btn {
    cursor: pointer;
}
.bcp-photo-grid__item {
    cursor: grab;
}
.bcp-photo-grid__item.bcp-dragging {
    opacity: 0.4;
}

.bcp-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.bcp-mobile-only {
    display: none;
}
@media (max-width: 600px) {
    .bcp-mobile-only {
        display: inline-block;
    }
}

.bcp-desktop-only {
    display: inline-block;
}
@media (max-width: 600px) {
    .bcp-desktop-only {
        display: none;
    }
}

.bcp-note-form__textarea {
    display: block;
    width: 100%;
    font-size: 0.9rem;
    font-family: inherit;
    padding: 8px 10px;
    border: 1px solid var(--bcp-border);
    border-radius: 8px;
    background: #fff;
    color: var(--bcp-text);
    resize: vertical;
    margin-bottom: 8px;
}

.bcp-task-list__date {
    flex: 0 0 auto;
    font-size: 0.8rem;
    color: var(--bcp-text-muted);
    text-align: right;
    white-space: nowrap;
}
.bcp-task-list__item--major .bcp-task-list__date {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 400;
}

@media (max-width: 480px) {
    .bcp-login-card { padding: 26px 20px; border-radius: 10px; }
    .bcp-header { padding: 12px; }
}
