:root {
    --bmcp-bg: #f6f4ee;
    --bmcp-panel: #ffffff;
    --bmcp-ink: #171717;
    --bmcp-muted: #6f736d;
    --bmcp-line: #e5e1d7;
    --bmcp-sidebar: #111512;
    --bmcp-sidebar-muted: #aeb7ad;
    --bmcp-accent: #c7f36b;
    --bmcp-danger: #d85140;
    --bmcp-radius: 18px;
}


.bmcp-app,
.bmcp-app * {
    box-sizing: border-box;
}

.bmcp-app {
    width: 100%;
    max-width: none;
}

.bmcp-table code {
    display: inline-block;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.bmcp-app {
    min-height: calc(100vh - 32px);
    display: flex;
    background: var(--bmcp-bg);
    color: var(--bmcp-ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    border: 1px solid var(--bmcp-line);
    border-radius: 24px;
    overflow: hidden;
}

.bmcp-sidebar {
    width: 260px;
    background: var(--bmcp-sidebar);
    color: #fff;
    padding: 24px;
    flex-shrink: 0;
}

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

.bmcp-brand small {
    display: block;
    color: var(--bmcp-sidebar-muted);
    font-size: 12px;
    margin-top: 3px;
}

.bmcp-brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--bmcp-accent);
    color: #10130f;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.bmcp-nav {
    display: grid;
    gap: 8px;
}

.bmcp-nav a {
    color: var(--bmcp-sidebar-muted);
    text-decoration: none;
    padding: 11px 12px;
    border-radius: 12px;
    transition: 150ms ease;
}

.bmcp-nav a:hover,
.bmcp-nav a.is-active {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.bmcp-main {
    flex: 1;
    padding: 28px;
    overflow: auto;
}

.bmcp-header {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: center;
    margin-bottom: 24px;
}

.bmcp-header h1,
.bmcp-panel h2,
.bmcp-empty-state h3 {
    margin: 0;
    letter-spacing: -0.04em;
}

.bmcp-eyebrow {
    margin: 0 0 4px;
    color: var(--bmcp-muted);
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: .12em;
    font-weight: 700;
}

.bmcp-user {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--bmcp-muted);
}

.bmcp-user a,
.bmcp-button {
    color: #111512;
    background: var(--bmcp-accent);
    padding: 10px 14px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
}

.bmcp-grid {
    display: grid;
    gap: 16px;
    margin-bottom: 18px;
}

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

.bmcp-card,
.bmcp-panel,
.bmcp-login-card {
    background: var(--bmcp-panel);
    border: 1px solid var(--bmcp-line);
    border-radius: var(--bmcp-radius);
    box-shadow: 0 16px 50px rgba(20, 20, 20, 0.05);
}

.bmcp-card {
    padding: 20px;
}

.bmcp-card-label {
    display: block;
    color: var(--bmcp-muted);
    font-size: 13px;
    margin-bottom: 12px;
}

.bmcp-card strong {
    font-size: 38px;
    line-height: 1;
    letter-spacing: -0.06em;
}

.bmcp-panel {
    padding: 22px;
    margin-top: 16px;
}

.bmcp-panel-header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    margin-bottom: 18px;
}

.bmcp-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: #eef2e7;
    color: #324030;
    padding: 7px 10px;
    font-size: 12px;
    font-weight: 700;
}

.bmcp-empty-state {
    padding: 22px;
    border: 1px dashed var(--bmcp-line);
    border-radius: 16px;
    background: #fbfaf7;
}

.bmcp-empty-state p {
    color: var(--bmcp-muted);
    max-width: 720px;
}

.bmcp-table {
    width: 100%;
    border-collapse: collapse;
}

.bmcp-table th,
.bmcp-table td {
    border-top: 1px solid var(--bmcp-line);
    padding: 12px;
    text-align: left;
    vertical-align: top;
}

.bmcp-table th {
    width: 220px;
    color: var(--bmcp-muted);
}

.bmcp-table code {
    background: #f4f1e8;
    padding: 4px 6px;
    border-radius: 8px;
}

.bmcp-login-required {
    justify-content: center;
    align-items: center;
}

.bmcp-login-card {
    max-width: 420px;
    padding: 36px;
    text-align: center;
}

.bmcp-login-card .bmcp-brand-mark {
    margin-bottom: 18px;
}

@media (max-width: 900px) {
    .bmcp-app {
        display: block;
    }

    .bmcp-sidebar {
        width: auto;
    }

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

@media (max-width: 640px) {
    .bmcp-grid-4 {
        grid-template-columns: 1fr;
    }

    .bmcp-header,
    .bmcp-panel-header {
        display: block;
    }

    .bmcp-user {
        margin-top: 12px;
    }
}


.bmcp-status-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.bmcp-status-list div {
    border: 1px solid rgba(18, 26, 22, 0.1);
    background: rgba(255, 255, 255, 0.74);
    border-radius: 16px;
    padding: 14px 16px;
}

.bmcp-status-list span {
    display: block;
    color: rgba(18, 26, 22, 0.62);
    font-size: 12px;
    margin-bottom: 6px;
}

.bmcp-status-list strong {
    color: #101812;
    font-size: 14px;
    word-break: break-word;
}

@media (max-width: 780px) {
    .bmcp-status-list {
        grid-template-columns: 1fr;
    }
}


/* v0.1.6 navigation + demo sections */
.bmcp-section {
    display: none;
}

.bmcp-section.is-active {
    display: block;
}

.bmcp-toast {
    position: sticky;
    top: 0;
    z-index: 5;
    display: none;
    margin-bottom: 14px;
    border: 1px solid rgba(18, 26, 22, 0.12);
    background: #111512;
    color: #fff;
    padding: 12px 14px;
    border-radius: 14px;
    box-shadow: 0 14px 34px rgba(17, 21, 18, 0.18);
}

.bmcp-toast.is-visible {
    display: block;
}

.bmcp-toolbar {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.bmcp-toolbar label {
    display: grid;
    gap: 6px;
    color: var(--bmcp-muted);
    font-size: 12px;
    font-weight: 700;
}

.bmcp-toolbar input,
.bmcp-toolbar select {
    border: 1px solid var(--bmcp-line);
    background: #fbfaf7;
    border-radius: 12px;
    padding: 12px;
    color: var(--bmcp-muted);
}

.bmcp-button,
.bmcp-link-button {
    border: 0;
    cursor: pointer;
    font: inherit;
}

.bmcp-disabled-action {
    opacity: 0.72;
}

.bmcp-link-button {
    background: transparent;
    color: #111512;
    font-weight: 800;
    text-decoration: underline;
    padding: 0;
}

.bmcp-preview-table-wrap {
    overflow: auto;
    margin-top: 16px;
}

.bmcp-preview-table th {
    width: auto;
}

.bmcp-placeholder-row {
    opacity: 0.58;
}

.bmcp-kanban {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.bmcp-kanban > div,
.bmcp-asset-card {
    border: 1px solid var(--bmcp-line);
    border-radius: 16px;
    padding: 16px;
    background: #fbfaf7;
}

.bmcp-kanban h3,
.bmcp-asset-card strong {
    display: block;
    margin: 0 0 8px;
    letter-spacing: -0.03em;
}

.bmcp-kanban p,
.bmcp-asset-card span {
    margin: 0;
    color: var(--bmcp-muted);
}

.bmcp-asset-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

@media (max-width: 980px) {
    .bmcp-toolbar,
    .bmcp-kanban,
    .bmcp-asset-grid {
        grid-template-columns: 1fr;
    }
}


/* v0.1.6 demo data UI */
.bmcp-demo-note {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--bmcp-muted);
    font-size: 13px;
}

.bmcp-client-cards {
    display: grid;
    gap: 14px;
}

.bmcp-client-card {
    display: flex;
    gap: 16px;
    padding: 18px;
    border: 1px solid var(--bmcp-line);
    border-radius: 18px;
    background: #fbfaf7;
}

.bmcp-client-avatar {
    width: 46px;
    height: 46px;
    border-radius: 15px;
    background: #111512;
    color: var(--bmcp-accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    flex-shrink: 0;
}

.bmcp-client-avatar-large {
    width: 72px;
    height: 72px;
    border-radius: 22px;
    font-size: 26px;
}

.bmcp-client-main {
    min-width: 0;
    flex: 1;
}

.bmcp-client-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.bmcp-client-heading h3,
.bmcp-profile-header h2,
.bmcp-record h3,
.bmcp-task-row h3 {
    margin: 0;
    letter-spacing: -0.035em;
}

.bmcp-client-heading p,
.bmcp-profile-header p,
.bmcp-next-action,
.bmcp-record p,
.bmcp-task-row p,
.bmcp-detail-grid p {
    margin: 4px 0 0;
    color: var(--bmcp-muted);
}

.bmcp-client-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}

.bmcp-client-meta span,
.bmcp-record-meta span {
    display: block;
    border: 1px solid rgba(18, 26, 22, 0.08);
    background: rgba(255, 255, 255, 0.72);
    border-radius: 13px;
    padding: 10px 12px;
    color: var(--bmcp-muted);
    font-size: 13px;
}

.bmcp-client-meta strong,
.bmcp-record-meta strong,
.bmcp-detail-grid strong {
    display: block;
    color: #111512;
    font-size: 12px;
    margin-bottom: 3px;
}

.bmcp-risk-low {
    background: #edf6df;
    color: #314425;
}

.bmcp-risk-medium {
    background: #fff3d6;
    color: #6a4d0c;
}

.bmcp-risk-high,
.bmcp-risk-critical {
    background: #ffe3de;
    color: #8a2318;
}

.bmcp-profile-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 18px;
    align-items: center;
}

.bmcp-profile-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bmcp-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.bmcp-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: #eef2e7;
    color: #324030;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 800;
}

.bmcp-card-small {
    font-size: 22px !important;
    letter-spacing: -0.04em !important;
}

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

.bmcp-detail-grid > div {
    border: 1px solid var(--bmcp-line);
    border-radius: 16px;
    padding: 16px;
    background: #fbfaf7;
}

.bmcp-timeline {
    display: grid;
    gap: 14px;
}

.bmcp-record {
    position: relative;
    display: grid;
    grid-template-columns: 18px 1fr;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--bmcp-line);
    border-radius: 18px;
    background: #fbfaf7;
}

.bmcp-record-dot {
    width: 12px;
    height: 12px;
    margin-top: 6px;
    border-radius: 50%;
    background: var(--bmcp-accent);
    box-shadow: 0 0 0 5px rgba(199, 243, 107, 0.22);
}

.bmcp-record-top {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    color: var(--bmcp-muted);
    font-size: 13px;
    margin-bottom: 6px;
}

.bmcp-record-top strong {
    color: #111512;
}

.bmcp-record-meta {
    display: grid;
    grid-template-columns: 1.2fr 1fr auto;
    gap: 10px;
    margin-top: 12px;
    align-items: start;
}

.bmcp-task-list {
    display: grid;
    gap: 10px;
}

.bmcp-task-row {
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    gap: 14px;
    align-items: center;
    border: 1px solid var(--bmcp-line);
    border-radius: 16px;
    background: #fbfaf7;
    padding: 14px 16px;
}

.bmcp-asset-type {
    display: inline-flex;
    width: fit-content;
    margin-bottom: 12px;
    background: #111512;
    color: var(--bmcp-accent);
    border-radius: 999px;
    padding: 5px 8px;
    font-size: 11px;
    font-weight: 900;
}

.bmcp-asset-card small {
    display: block;
    margin-top: 10px;
    color: var(--bmcp-muted);
}

.bmcp-risk-card {
    margin-top: 16px;
}

@media (max-width: 980px) {
    .bmcp-client-meta,
    .bmcp-detail-grid,
    .bmcp-record-meta,
    .bmcp-task-row,
    .bmcp-profile-header {
        grid-template-columns: 1fr;
    }

    .bmcp-profile-actions {
        align-items: flex-start;
        flex-direction: column;
    }

    .bmcp-client-heading {
        display: block;
    }

    .bmcp-client-heading .bmcp-badge {
        margin-top: 10px;
    }
}


/* v0.1.6 demo record modal */
.bmcp-actions-inline {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
}

.bmcp-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.bmcp-modal.is-open {
    display: flex;
}

.bmcp-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(12, 15, 12, 0.58);
    backdrop-filter: blur(6px);
}

.bmcp-modal-card {
    position: relative;
    width: min(760px, 100%);
    max-height: min(86vh, 820px);
    overflow: auto;
    background: var(--bmcp-panel);
    border: 1px solid var(--bmcp-line);
    border-radius: 24px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.24);
    padding: 24px;
}

.bmcp-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.bmcp-icon-button {
    width: 38px;
    height: 38px;
    border: 1px solid var(--bmcp-line);
    border-radius: 999px;
    background: #fbfaf7;
    color: var(--bmcp-ink);
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
}

.bmcp-record-form label {
    display: grid;
    gap: 8px;
    color: var(--bmcp-muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
}

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

.bmcp-form-full {
    grid-column: 1 / -1;
}

.bmcp-record-form input,
.bmcp-record-form select,
.bmcp-record-form textarea {
    width: 100%;
    border: 1px solid var(--bmcp-line);
    border-radius: 14px;
    background: #fbfaf7;
    color: var(--bmcp-ink);
    padding: 12px 13px;
    font: inherit;
    text-transform: none;
    letter-spacing: normal;
    font-weight: 500;
}

.bmcp-record-form textarea {
    resize: vertical;
    min-height: 118px;
}

.bmcp-check {
    display: flex !important;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 10px !important;
    padding: 12px;
    border: 1px solid var(--bmcp-line);
    border-radius: 14px;
    background: #fbfaf7;
}

.bmcp-check input {
    width: auto;
}

.bmcp-check span {
    color: var(--bmcp-ink);
    text-transform: none;
    letter-spacing: normal;
    font-size: 14px;
}

.bmcp-modal-note {
    margin-top: 16px;
    padding: 12px 14px;
    border: 1px dashed var(--bmcp-line);
    border-radius: 14px;
    background: #fbfaf7;
    color: var(--bmcp-muted);
    font-size: 14px;
}

.bmcp-modal-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    margin-top: 18px;
}

.bmcp-demo-records {
    display: grid;
    gap: 14px;
    margin-bottom: 16px;
}

.bmcp-record-demo {
    border-color: rgba(199, 243, 107, 0.85);
    background: linear-gradient(180deg, #ffffff 0%, #fbfff2 100%);
}

.bmcp-record-demo .bmcp-record-dot {
    background: var(--bmcp-accent);
    box-shadow: 0 0 0 5px rgba(199, 243, 107, 0.22);
}

@media (max-width: 760px) {
    .bmcp-form-grid {
        grid-template-columns: 1fr;
    }

    .bmcp-modal {
        padding: 12px;
    }

    .bmcp-modal-card {
        border-radius: 18px;
        padding: 18px;
    }

    .bmcp-modal-actions {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .bmcp-modal-actions .bmcp-button,
    .bmcp-modal-actions .bmcp-link-button {
        width: 100%;
        justify-content: center;
        text-align: center;
    }
}


/* v0.1.6 demo polish */
.bmcp-demo-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
    padding: 14px 16px;
    border: 1px solid rgba(199, 243, 107, 0.55);
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(199, 243, 107, 0.22), rgba(255, 255, 255, 0.82));
}

.bmcp-demo-banner strong {
    display: block;
    color: #111512;
    letter-spacing: -0.02em;
}

.bmcp-demo-banner span:not(.bmcp-badge) {
    color: var(--bmcp-muted);
    font-size: 14px;
}

.bmcp-demo-clients,
.bmcp-demo-tasks,
.bmcp-demo-assets {
    display: contents;
}

.bmcp-demo-card {
    border-color: rgba(199, 243, 107, 0.88) !important;
    background: linear-gradient(180deg, #ffffff 0%, #fbfff2 100%) !important;
}

.bmcp-filter-hidden {
    display: none !important;
}

.bmcp-filter-empty {
    display: none;
}

.bmcp-filter-empty.is-visible {
    display: block;
}

.bmcp-profile-actions .bmcp-link-button,
.bmcp-actions-inline .bmcp-link-button {
    text-decoration: none;
    border: 1px solid var(--bmcp-line);
    border-radius: 999px;
    padding: 9px 12px;
    background: #fbfaf7;
}

.bmcp-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.bmcp-modal-card .bmcp-button {
    min-height: 42px;
}

.bmcp-client-cards .bmcp-empty-state {
    margin-top: 0;
}

.bmcp-task-row.bmcp-demo-card strong {
    white-space: nowrap;
}

@media (max-width: 760px) {
    .bmcp-demo-banner {
        display: block;
    }

    .bmcp-demo-banner .bmcp-badge {
        margin-top: 10px;
    }
}
