:root {
    color-scheme: light;
    --bg: #f5f7f8;
    --panel: #ffffff;
    --ink: #172026;
    --muted: #5d6b75;
    --accent: #0f766e;
    --line: #d9e1e5;
    --surface-soft: #f8fbfb;
    --accent-soft: #e7f3f1;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Arial, Helvetica, sans-serif;
    background: var(--bg);
    color: var(--ink);
}

.landing { background: #f7faf9; }
.landing-nav { min-height: 68px; display: flex; align-items: center; justify-content: space-between; padding: 0 5%; background: #fff; border-bottom: 1px solid var(--line); }
.landing-brand { color: var(--ink); text-decoration: none; font-size: 21px; margin: 0; }
.landing-nav nav { display: flex; align-items: center; gap: 16px; }
.landing-nav nav a { margin: 0; text-decoration: none; }
.landing-hero { position: relative; min-height: 610px; overflow: hidden; background: #dfe8e7; }
.landing-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.landing-copy { position: relative; z-index: 1; width: min(580px, 88%); padding: 110px 5%; }
.landing-copy h1 { font-size: 48px; line-height: 1.08; margin-bottom: 18px; }
.landing-copy p { max-width: 480px; font-size: 18px; color: #274149; }
.landing-kicker { color: var(--accent) !important; font-weight: 700; font-size: 14px !important; text-transform: uppercase; }
.landing-actions { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; margin-top: 28px; }
.landing-cta { display: inline-flex; background: var(--accent); color: #fff; padding: 13px 18px; text-decoration: none; border-radius: 6px; margin: 0; }
.landing-cta.small { padding: 9px 13px; }
.landing-link { margin: 0; }
.landing-modules { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border-top: 1px solid var(--line); }
.landing-modules div { background: #fff; padding: 28px 5%; }
.landing-modules strong, .landing-modules span { display: block; }
.landing-modules strong { margin-bottom: 8px; font-size: 18px; }
.landing-modules span { color: var(--muted); line-height: 1.5; }

code {
    background: #eef2f4;
    border-radius: 4px;
    padding: 2px 5px;
}

.shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.panel {
    width: min(720px, 100%);
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    padding: 28px;
}

h1 {
    margin: 0 0 12px;
    font-size: 28px;
}

p {
    color: var(--muted);
    line-height: 1.5;
}

a {
    color: var(--accent);
    font-weight: 700;
    margin-right: 12px;
}

.setup-form {
    display: grid;
    gap: 12px;
    margin-top: 20px;
}

.admin-form {
    display: grid;
    gap: 12px;
    max-width: 720px;
    margin-top: 20px;
}

.admin-form label {
    display: grid;
    gap: 6px;
}

label {
    font-weight: 700;
}

input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 12px;
    font: inherit;
}

textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 12px;
    font: inherit;
    resize: vertical;
}

select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 12px;
    font: inherit;
    background: #fff;
}

.admin-form input:disabled {
    background: #eef2f4;
    color: var(--muted);
}

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

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

.button-link {
    display: inline-flex;
    align-items: center;
    border-radius: 6px;
    background: var(--accent);
    color: #fff;
    padding: 10px 14px;
    text-decoration: none;
    white-space: nowrap;
}

.button-link:hover {
    color: #fff;
}

button {
    width: fit-content;
    border: 0;
    border-radius: 6px;
    background: var(--accent);
    color: #fff;
    padding: 12px 16px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.notice {
    border: 1px solid var(--line);
    border-left: 4px solid var(--accent);
    border-radius: 6px;
    padding: 12px;
    background: #eef7f5;
    color: var(--ink);
}

.meta {
    font-size: 14px;
}

.results {
    margin: 16px 0;
    padding-left: 22px;
    color: var(--muted);
}

.app-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 240px 1fr;
}

.sidebar {
    background: #12262b;
    color: #fff;
    padding: 20px;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
}

.brand {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 24px;
}

.sidebar nav {
    display: grid;
    gap: 8px;
    min-height: 0;
    overflow-y: auto;
    padding-right: 4px;
}

.sidebar-version {
    margin-top: auto;
    padding: 18px 12px 2px;
    color: #8fa8ad;
    font-size: 12px;
    font-family: Consolas, "Courier New", monospace;
}

.sidebar a {
    color: #dce8ea;
    margin: 0;
    padding: 10px 12px;
    border-radius: 6px;
    text-decoration: none;
}

.sidebar a.active,
.sidebar a:hover {
    background: #1d3b40;
    color: #fff;
}

.nav-label {
    margin-top: 14px;
    padding: 8px 12px 2px;
    color: #8fa8ad;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.nav-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    width: 100%;
}

.nav-group a {
    display: block;
}

.nav-group summary {
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
}

.nav-group summary::-webkit-details-marker {
    display: none;
}

.nav-group summary::after {
    content: '▾';
    font-size: 10px;
    transition: transform .15s ease;
}

.nav-group:not([open]) summary::after {
    transform: rotate(-90deg);
}

.workspace {
    min-width: 0;
}

.topbar {
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid var(--line);
    background: #fff;
    padding: 12px 32px;
}

.topbar span {
    display: block;
    color: var(--muted);
    font-size: 13px;
}

.content {
    padding: 32px;
}

.workspace-page { max-width: none; }
.workspace-page > h1 { font-size: 32px; margin: 0 0 8px; }
.workspace-page > h1 + p.meta { margin: 0 0 24px; color: var(--muted); }
.workspace-page > h2 { margin: 32px 0 12px; font-size: 19px; }
.workspace-page > .admin-form,
.workspace-page > .setup-form { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 20px; max-width: 720px; }
.workspace-page > .admin-form + .table-wrap,
.workspace-page > .setup-form + .table-wrap { margin-top: 14px; }
.workspace-page .notice { margin: 0 0 18px; }
.workspace-page .page-heading { background: transparent; margin-bottom: 20px; }
.workspace-page .page-heading h1 { font-size: 32px; margin-bottom: 6px; }
.workspace-page .page-heading .meta { margin: 0; }
.workspace-section { display: grid; grid-template-columns: minmax(280px, 360px) minmax(0, 1fr); gap: 18px 20px; align-items: start; margin: 24px 0; }
.workspace-section > h2 { grid-column: 1 / -1; margin: 0; font-size: 19px; }
.workspace-section > .admin-form,
.workspace-section > .setup-form { margin: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 18px; max-width: none; }
.workspace-section > .table-wrap { margin: 0; }
.workspace-section.table-only > .table-wrap { grid-column: 1 / -1; width: 100%; }
.workspace-section.table-only > .table-wrap table { min-width: 0; }
.workspace-section > p.meta { grid-column: 1 / -1; margin: -8px 0 0; }
.workspace-section > .admin-form:only-of-type { grid-column: 1 / -1; max-width: 720px; }
.standard-workspace-heading { margin: 0 0 24px; }
.standard-workspace-heading h1 { margin: 0 0 8px; font-size: 32px; }
.standard-workspace-heading .meta { margin: 0; }
.standard-workspace-stats { margin-bottom: 22px; }
.standard-workspace-tabs { margin-bottom: 0; }
.workspace-page .workspace-section { display: none; }
.workspace-page .workspace-section.active { display: grid; }

.context-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin: 20px 0;
}

.context-grid section {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    padding: 18px;
    box-shadow: 0 1px 2px rgba(23, 32, 38, .04);
}

.context-grid strong,
.context-grid span {
    display: block;
}

.context-grid strong {
    margin-bottom: 6px;
}

h2 {
    margin-top: 28px;
    font-size: 20px;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(23, 32, 38, .03);
}

.crm-workspace { max-width: 1320px; }
.crm-deals-workspace { max-width: none; }
.crm-heading { display:flex; justify-content:space-between; align-items:flex-end; gap:24px; margin-bottom:26px; }
.crm-heading-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:8px; }.secondary-link { background:#fff; color:var(--accent); border:1px solid var(--line); }
.crm-heading h1 { margin-bottom:8px; font-size:32px; }
.crm-heading p { margin:0; }
.crm-eyebrow { color:var(--accent)!important; font-size:12px!important; font-weight:700; text-transform:uppercase; }
.crm-stats { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin-bottom:22px; }
.crm-stat { border:1px solid var(--line); background:#fff; padding:16px; border-radius:8px; }
.crm-stat span,.crm-stat strong { display:block; }.crm-stat span{color:var(--muted);font-size:13px}.crm-stat strong{font-size:28px;margin-top:7px}
.crm-tabs { display:flex; gap:4px; border-bottom:1px solid var(--line); margin-bottom:20px; overflow-x:auto; }
.crm-tab { background:transparent; color:var(--muted); padding:11px 14px; border-radius:0; white-space:nowrap; }.crm-tab span{margin-left:8px;font-size:12px}.crm-tab.active{background:#e7f3f1;color:var(--accent)}
.crm-panel { display:none; grid-template-columns:minmax(280px,360px) minmax(0,1fr); gap:20px; align-items:start; }.crm-panel.active{display:grid}
.crm-create,.crm-records { border:1px solid var(--line); background:#fff; padding:18px; border-radius:8px; }.crm-create h2,.crm-records h2{margin:0 0 14px;font-size:18px}.crm-workspace .crm-create form{display:grid;gap:14px;align-items:stretch}.crm-workspace .crm-create label{display:grid;gap:7px;min-width:0}.crm-workspace .crm-create input,.crm-workspace .crm-create select{min-height:42px}.crm-workspace .crm-create button{justify-self:start;margin-top:2px}.crm-records-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}.crm-records-head span{color:var(--muted);font-size:13px}
.crm-contact-address { border-top:1px solid var(--line); padding-top:12px; }.crm-contact-address summary { color:var(--accent); cursor:pointer; font-weight:700; }.crm-contact-address[open] { display:grid; gap:12px; }.crm-contact-address p { margin:0; }
.crm-quick-filter { width:min(280px,100%); min-height:42px; margin-left:auto; }
.search-command { max-width: 760px; margin: 0 0 14px; }.search-command label { display:block; font-weight:700; margin-bottom:7px; }.search-command > div { display:flex; gap:10px; }.search-command input { min-height:46px; }.search-command button { white-space:nowrap; }.search-areas { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:24px; }.search-areas span,.search-type { background:var(--accent-soft); color:var(--accent); border-radius:999px; padding:4px 8px; font-size:12px; font-weight:700; }.search-group { margin:20px 0; }.search-empty { border:1px dashed var(--line); padding:28px; background:#fff; border-radius:8px; display:grid; gap:6px; color:var(--muted); }

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px;
}

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

th {
    background: var(--surface-soft);
    font-size: 13px;
}

tr:last-child td {
    border-bottom: 0;
}

.workspace-page form:not(.admin-form):not(.setup-form) { display: inline-flex; align-items: center; gap: 8px; }
.workspace-page form:not(.admin-form):not(.setup-form) input { min-width: 140px; padding: 9px 10px; }
.workspace-page form:not(.admin-form):not(.setup-form) button { padding: 9px 11px; }
.workspace-page .crm-workspace .crm-create form { display: grid; width: 100%; gap: 14px; align-items: stretch; }
.workspace-page .crm-workspace .crm-create label { display: grid; gap: 7px; min-width: 0; }
.workspace-page .crm-workspace .crm-create input,
.workspace-page .crm-workspace .crm-create select { width: 100%; min-width: 0; min-height: 42px; }
.workspace-page .crm-workspace .crm-create button { justify-self: start; padding: 12px 16px; }
.workspace-page .crm-workspace .crm-inline-form { display:flex; width:auto; align-items:center; gap:7px; margin:0; white-space:nowrap; }
.workspace-page .crm-workspace .crm-inline-form select { width:auto; min-width:124px; min-height:34px; padding:6px 8px; }
.workspace-page .crm-workspace .crm-inline-form button { padding:7px 10px; font-size:13px; }
.crm-status { color:var(--accent); font-size:13px; font-weight:700; }
.crm-cell-note { display:block; margin-top:4px; color:var(--muted); font-size:12px; font-weight:400; }
.crm-account-layout { display:grid; grid-template-columns:minmax(280px,360px) minmax(0,1fr); gap:20px; align-items:start; }
.crm-stack { display:grid; gap:16px; }
.crm-detail-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; margin-top:20px; }
.crm-detail-grid .search-group { margin:0; border:1px solid var(--line); background:#fff; border-radius:8px; padding:18px; }
.crm-detail-grid h2 { margin:0 0 12px; font-size:18px; }
.crm-feed { list-style:none; padding:0; margin:0; display:grid; gap:12px; }
.crm-feed li { display:grid; gap:3px; padding-bottom:12px; border-bottom:1px solid var(--line); }
.crm-feed li:last-child { border-bottom:0; padding-bottom:0; }
.crm-feed small { color:var(--muted); }
.crm-create textarea { min-height:96px; resize:vertical; }
.crm-panel[data-crm-panel="accounts"] { grid-template-columns:minmax(360px,440px) minmax(0,1fr); }.crm-form-section { display:grid; gap:12px; border-top:1px solid var(--line); padding-top:14px; }.crm-form-section:first-of-type { border-top:0; padding-top:0; }.crm-form-section h3 { margin:0; font-size:14px; color:var(--accent); }
.crm-custom-form { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }.crm-custom-form label { display:grid; gap:7px; }.crm-custom-form button { justify-self:start; }.crm-stage-list { display:grid; gap:10px; }.crm-stage-columns,.crm-stage-form { display:grid; grid-template-columns:minmax(140px,1fr) 112px 90px auto auto; gap:8px; align-items:center; }.crm-stage-columns { padding:0 10px; color:var(--muted); font-size:12px; font-weight:700; }.crm-stage-form { display:grid!important; padding:10px; border:1px solid var(--line); border-radius:6px; }.crm-stage-form input { min-width:0!important; }.crm-stage-form input[type="color"] { width:100%; min-width:56px!important; height:38px; padding:3px; cursor:pointer; }
.crm-deal-panel.active { display:block; }
.deals-toolbar { display:flex; align-items:flex-end; justify-content:space-between; gap:20px; margin-bottom:16px; }
.deals-toolbar h2 { margin:0 0 5px; font-size:20px; }.deals-toolbar p { margin:0; color:var(--muted); }
.deal-board { display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:12px; overflow-x:auto; padding-bottom:12px; }
.deal-stage { background:#edf2f5; border:1px solid var(--line); border-top:4px solid var(--stage-color,#5b6b7a); border-radius:8px; min-height:520px; }
.deal-stage[data-stage="qualification"] { border-top-color:#5d55ea; }.deal-stage[data-stage="discovery"] { border-top-color:#1687c5; }.deal-stage[data-stage="proposal"] { border-top-color:#b58e19; }.deal-stage[data-stage="negotiation"] { border-top-color:#a15a25; }.deal-stage[data-stage="won"] { border-top-color:#168447; }.deal-stage[data-stage="lost"] { border-top-color:#bc4350; }
.deal-stage > header { display:flex; justify-content:space-between; gap:10px; padding:12px; color:var(--ink); }.deal-stage > header strong,.deal-stage > header span,.deal-stage > header b,.deal-stage > header em { display:block; }.deal-stage > header strong { font-size:14px; }.deal-stage > header span { color:var(--muted); font-size:12px; margin-top:3px; }.deal-stage > header b { text-align:right; font-size:13px; }.deal-stage > header em { color:var(--muted); font-size:12px; font-style:normal; margin-top:3px; }
.deal-stack { display:grid; align-content:start; gap:10px; max-height:660px; overflow-y:auto; padding:0 10px 10px; }
.deal-card { background:#fff; border:1px solid var(--line); border-radius:6px; padding:13px; box-shadow:0 1px 2px rgba(18,38,58,.06); }.deal-card h3 { margin:0 0 5px; font-size:14px; line-height:1.35; }.deal-card p { margin:0; }.deal-account { color:var(--ink); font-size:13px; }.deal-contact { color:var(--muted); font-size:12px; margin-top:3px!important; }.deal-next { border-top:1px solid var(--line); color:var(--muted); font-size:12px; line-height:1.4; margin-top:10px!important; padding-top:9px; }.deal-metrics { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-top:12px; }.deal-metrics strong { font-size:15px; }.deal-metrics span { color:var(--accent); font-size:12px; font-weight:700; }.deal-footer { display:grid; gap:8px; margin-top:11px; padding-top:10px; border-top:1px solid var(--line); color:var(--muted); font-size:12px; }.deal-footer .crm-inline-form { justify-content:space-between; }.deal-footer .crm-inline-form select { min-width:0; flex:1; }
.deal-empty { margin:10px; color:var(--muted); font-size:13px; text-align:center; }
.deal-create { margin-top:20px; max-width:440px; }
.deal-path { display:flex; gap:4px; overflow-x:auto; margin:0 0 20px; padding-bottom:4px; }.deal-path span { background:#e8eef1; color:var(--muted); min-width:126px; padding:10px 12px; text-align:center; font-size:13px; white-space:nowrap; }.deal-path span.active { background:var(--stage-color); color:#fff; font-weight:700; }
.crm-detail-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0; margin:0; }.crm-detail-list div { border-top:1px solid var(--line); padding:11px 0; }.crm-detail-list dt { color:var(--muted); font-size:12px; }.crm-detail-list dd { margin:4px 0 0; font-weight:600; }.crm-activity-panel { border:1px solid var(--line); border-radius:8px; background:#fff; padding:18px; }.crm-activity-panel h2 { margin:0 0 12px; font-size:18px; }

@media (max-width: 760px) {
    .landing-hero { min-height: 650px; }
    .landing-hero img { opacity: .32; object-position: 70% center; }
    .landing-copy { padding-top: 90px; }
    .landing-copy h1 { font-size: 36px; }
    .landing-modules { grid-template-columns: 1fr; }
    .app-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        padding: 14px 16px;
        position: static;
        height: auto;
        overflow: visible;
    }

    .content { padding: 20px 16px; }
    .topbar { padding: 12px 16px; }
    .workspace-page > .admin-form,
    .workspace-page > .setup-form { padding: 16px; }
    .workspace-section { grid-template-columns: 1fr; }
    .workspace-section > h2,
    .workspace-section > p.meta { grid-column: auto; }

    .context-grid {
        grid-template-columns: 1fr;
    }
    .crm-heading,.crm-panel,.crm-panel[data-crm-panel="accounts"],.crm-account-layout,.crm-detail-grid { display:grid; grid-template-columns:1fr; }.crm-heading-actions{justify-content:stretch;}.crm-heading-actions .button-link{justify-content:center;}.crm-stats{grid-template-columns:repeat(2,minmax(0,1fr));}.deals-toolbar{align-items:stretch;flex-direction:column;}.deal-board{grid-template-columns:repeat(6,265px);}.crm-detail-list,.crm-custom-form,.crm-stage-form{grid-template-columns:1fr;}.crm-stage-columns{display:none;}
}

html[data-theme="dark"] {
    color-scheme: dark;
    --bg: #12191d;
    --panel: #1a252b;
    --ink: #f1f6f7;
    --muted: #b8c7cb;
    --accent: #39c6b8;
    --line: #3a4a51;
    --surface-soft: #223138;
    --accent-soft: #174c49;
}

input,
textarea,
select {
    background: var(--panel);
    color: var(--ink);
}

input[type="checkbox"] {
    width: 16px;
    min-width: 16px;
    height: 16px;
    min-height: 16px;
    margin: 0;
    padding: 0;
    accent-color: var(--accent);
}

.crm-create label:has(input[type="checkbox"]) {
    display: flex;
    align-items: center;
    gap: 8px;
}

.workspace-page .crm-workspace .crm-create input[type="checkbox"] {
    width: 16px !important;
    min-width: 16px !important;
    height: 16px !important;
    min-height: 16px !important;
    padding: 0 !important;
}

.workspace-page .crm-workspace .crm-create label:has(input[type="checkbox"]) {
    display: flex !important;
    align-items: center;
    gap: 8px;
}

.topbar { background: var(--panel); }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.topbar-actions form { margin: 0; }
.topbar-help { margin: 0; border: 1px solid var(--line); border-radius: 6px; color: var(--accent); padding: 9px 12px; text-decoration: none; }
.topbar-help:hover { background: var(--surface-soft); }
.theme-toggle { background: transparent; color: var(--ink); border: 1px solid var(--line); padding: 9px 12px; }
.theme-toggle:hover { background: var(--surface-soft); }

.subscription-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; align-items:stretch; }
.subscription-module { display:flex; flex-direction:column; justify-content:space-between; min-width:0; min-height:210px; padding:18px; border:1px solid var(--line); border-top:4px solid var(--line); border-radius:8px; background:#fff; }
.subscription-module.enabled { border-top-color:var(--accent); }
.subscription-module h2 { margin:8px 0; font-size:18px; }
.subscription-module p { margin:0 0 12px; color:var(--muted); line-height:1.5; }
.subscription-module.addon-choice { display:grid; grid-template-columns:20px minmax(0,1fr); align-items:start; min-height:150px; gap:12px; cursor:pointer; }
.subscription-module.addon-choice input[type="checkbox"] { width:18px; height:18px; margin:2px 0 0; padding:0; accent-color:var(--accent); }
.subscription-module.addon-choice span { display:grid; gap:8px; }
.subscription-module.addon-choice small { display:block; color:var(--muted); line-height:1.4; }
.subscription-module footer { display:flex; justify-content:space-between; align-items:flex-end; gap:12px; margin-top:18px; padding-top:12px; border-top:1px solid var(--line); color:var(--muted); }
.subscription-state { color:var(--accent); font-size:12px; font-weight:700; text-transform:uppercase; }
.subscription-actions { flex-wrap:wrap; align-items:center !important; }
.subscription-actions form { margin:0; }
.subscription-actions button { width:auto; }
.subscription-actions .secondary-button { background:transparent; color:var(--accent); border:1px solid var(--line); }
.subscription-lock { color:var(--accent); font-weight:700; }
.subscription-plan-name { font-size:20px !important; }
.subscription-plan-editor { max-width:none; margin-bottom:18px; }
.subscription-admin-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; align-items:start; }
.subscription-plan-editor form { display:grid; grid-template-columns:minmax(220px,1fr) minmax(160px,.55fr) auto; gap:12px; align-items:end; }
.subscription-plan-editor form label { margin:0; }
.subscription-lifecycle-editor { max-width:none; }
.subscription-lifecycle-editor form { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.subscription-lifecycle-editor form button { justify-self:start; }
.subscription-lifecycle-editor .checkbox-label { display:flex; align-items:center; gap:8px; }

.billing-plans { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; align-items:stretch; }
.billing-plan { display:flex; flex-direction:column; min-width:0; border:1px solid var(--line); border-top:4px solid var(--line); border-radius:8px; background:var(--panel); padding:20px; }
.billing-plan.current { border-top-color:var(--accent); }
.billing-plan header h2 { margin:8px 0; font-size:21px; }
.billing-plan header p { min-height:66px; margin:0; color:var(--muted); line-height:1.45; }
.billing-price { display:grid; grid-template-columns:auto 1fr; align-items:end; gap:0 6px; margin:18px 0 8px; }
.billing-price strong { font-size:34px; line-height:1; }
.billing-price span { color:var(--muted); }
.billing-price small { grid-column:1 / -1; margin-top:7px; color:var(--muted); }
.billing-seats { min-height:42px; color:var(--muted); font-size:13px; }
.billing-plan ul { flex:1; display:grid; align-content:start; gap:7px; margin:12px 0 20px; padding-left:20px; }
.billing-plan form { display:grid; grid-template-columns:1fr 1fr; gap:10px; border-top:1px solid var(--line); padding-top:16px; }
.billing-plan form label { margin:0; }
.billing-plan form button { grid-column:1 / -1; }
.subscription-actions form { display:flex; gap:7px; }
.subscription-actions input { min-width:150px; }
.billing-price-map { display:grid; grid-template-columns:minmax(180px,1fr) minmax(180px,1fr) auto; gap:10px; align-items:end; }
.billing-price-map label { margin:0; }
.billing-price-map button { white-space:nowrap; }
.billing-error { display:block; max-width:280px; overflow:hidden; color:#b42318; text-overflow:ellipsis; white-space:nowrap; }
html[data-theme="dark"] .billing-error { color:#ff9b91; }

.demo-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 0 0 18px;
    border: 1px solid #b98716;
    border-left: 4px solid #d89b14;
    border-radius: 6px;
    padding: 11px 14px;
    background: #fff7df;
    color: #4c3500;
}

.demo-banner span { font-size: 14px; }

.module-read-only-banner {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    margin:0 0 18px;
    border:1px solid #a66b13;
    border-left:4px solid #d18a1d;
    border-radius:6px;
    padding:12px 14px;
    background:#fff7e6;
    color:#4b3207;
}
.module-read-only-banner strong,
.module-read-only-banner span { display:block; }
.module-read-only-banner span { margin-top:3px; font-size:14px; }
.module-read-only-banner a { flex:0 0 auto; color:inherit; font-weight:700; }
[data-module-read-only="true"] form[method="post"]:not([data-read-only-exempt]) { opacity:.58; }

.custom-field-record-filter {
    grid-column: 1 / -1;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid var(--line);
    padding: 0 0 14px;
}

.custom-field-record-filter h2,
.custom-field-record-filter p { margin: 0; }
.custom-field-record-filter p { margin-top: 5px; }
.custom-field-record-filter select { width: min(240px, 100%); min-height: 42px; }

.custom-fields-workspace .custom-fields-definitions-view,
.custom-fields-workspace .custom-fields-records-view {
    display: none !important;
}

.custom-fields-workspace .custom-fields-view-active {
    display: grid !important;
}

html[data-theme="dark"] .landing,
html[data-theme="dark"] .landing-nav,
html[data-theme="dark"] .landing-modules div,
html[data-theme="dark"] .context-grid section,
html[data-theme="dark"] .table-wrap,
html[data-theme="dark"] .crm-stat,
html[data-theme="dark"] .subscription-module,
html[data-theme="dark"] .billing-plan,
html[data-theme="dark"] .crm-create,
html[data-theme="dark"] .crm-records,
html[data-theme="dark"] .crm-detail-grid .search-group,
html[data-theme="dark"] .crm-activity-panel,
html[data-theme="dark"] .deal-card,
html[data-theme="dark"] .search-empty {
    background: var(--panel);
}

html[data-theme="dark"] .landing-hero,
html[data-theme="dark"] .deal-stage,
html[data-theme="dark"] .deal-path span {
    background: var(--surface-soft);
}

html[data-theme="dark"] .landing-copy p { color: var(--ink); }
html[data-theme="dark"] .secondary-link { background: var(--panel); }
html[data-theme="dark"] .notice { background: #173a39; }
html[data-theme="dark"] code { background: var(--surface-soft); }
html[data-theme="dark"] .module-read-only-banner { background:#3a2c15; color:#ffe5ae; border-color:#8f682c; }

@media (max-width: 1100px) {
    .subscription-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .billing-plans { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .subscription-admin-grid { grid-template-columns:1fr; }
}

@media (max-width: 680px) {
    .subscription-grid,
    .billing-plans,
    .subscription-plan-editor form,
    .subscription-lifecycle-editor form { grid-template-columns:1fr; }
    .module-read-only-banner { align-items:flex-start; flex-direction:column; }
    .billing-price-map { grid-template-columns:1fr; }
}
html[data-theme="dark"] .demo-banner { background: #49370d; color: #fff0bd; border-color: #b98716; }

.guide-workspace { display: grid; gap: 24px; max-width: 1320px; }
.guide-heading { margin-bottom: 0; }
.guide-start { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.guide-start > div { display: grid; gap: 5px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); }
.guide-start span { color: var(--muted); line-height: 1.45; }
.guide-nav { display: flex; flex-wrap: wrap; gap: 8px; border-bottom: 1px solid var(--line); padding-bottom: 16px; }
.guide-nav a { margin: 0; border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; text-decoration: none; }
.guide-section { display: grid; grid-template-columns: minmax(0, .95fr) minmax(360px, 1.05fr); gap: 24px; scroll-margin-top: 22px; border-top: 1px solid var(--line); padding-top: 28px; }
.guide-section-wide { grid-template-columns: minmax(0, 1fr); }
.guide-section h2 { margin: 0 0 10px; font-size: 23px; }
.guide-section h3 { margin: 22px 0 9px; font-size: 17px; }
.guide-section p { margin: 0 0 14px; line-height: 1.55; }
.guide-section .guide-summary { max-width: 920px; color: var(--muted); font-size: 16px; }
.guide-section ol { display: grid; gap: 10px; margin: 0; padding-left: 22px; color: var(--muted); line-height: 1.5; }
.guide-section strong { color: var(--ink); }
.guide-callout { display: grid; gap: 5px; margin: 16px 0; padding: 14px 16px; border-left: 4px solid var(--accent); background: var(--surface-soft); }
.guide-callout span { color: var(--muted); line-height: 1.5; }
.guide-flow { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 16px 0 20px; }
.guide-flow span { padding: 7px 10px; border: 1px solid var(--line); border-radius: 4px; background: var(--panel); font-weight: 700; }
.guide-flow b { color: var(--muted); }
.guide-terms { display: grid; grid-template-columns: minmax(150px, .3fr) minmax(0, 1fr); margin: 16px 0; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.guide-terms dt,.guide-terms dd { margin: 0; padding: 11px 13px; border-bottom: 1px solid var(--line); line-height: 1.45; }
.guide-terms dt { font-weight: 700; background: var(--surface-soft); }
.guide-terms dd { color: var(--muted); }
.guide-terms dt:last-of-type,.guide-terms dd:last-of-type { border-bottom: 0; }
.guide-shot { margin: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--panel); }
.guide-shot img { display: block; width: 100%; height: auto; min-height: 180px; object-fit: cover; object-position: top left; background: var(--surface-soft); }
.guide-shot figcaption { color: var(--muted); font-size: 13px; padding: 10px 12px; }
.guide-shot-pending { display: grid; min-height: 240px; place-items: center; }
.guide-shot-pending > div { display: grid; gap: 8px; max-width: 320px; padding: 24px; text-align: center; color: var(--muted); }
.guide-shot-pending strong { color: var(--ink); }

.operations-toolbar { display:flex; align-items:flex-end; justify-content:space-between; gap:18px; border-top:1px solid var(--line); padding-top:22px; }
.operations-toolbar h2 { margin:0 0 5px; font-size:20px; }.operations-toolbar p { margin:0; }.operations-toolbar > span { color:var(--muted); font-size:13px; white-space:nowrap; }
.operations-board { display:grid; grid-template-columns:repeat(5,minmax(220px,1fr)); gap:12px; overflow-x:auto; padding-bottom:12px; }
.operations-column { min-height:460px; border:1px solid var(--line); border-radius:8px; background:var(--surface-soft); }.operations-column > header { display:flex; justify-content:space-between; gap:10px; padding:14px; border-top:4px solid var(--accent); }.operations-column:nth-child(2) > header { border-top-color:#1687c5; }.operations-column:nth-child(3) > header { border-top-color:#b58e19; }.operations-column:nth-child(4) > header { border-top-color:#a15a25; }.operations-column:nth-child(5) > header { border-top-color:#168447; }
.operations-column h2 { margin:0; font-size:15px; }.operations-column p { margin:4px 0 0; font-size:12px; }.operations-column > header > strong { font-size:16px; }
.operations-stack { display:grid; align-content:start; gap:10px; max-height:620px; overflow:auto; padding:0 10px 10px; }.operations-card { display:grid; gap:4px; margin:0; border:1px solid var(--line); border-radius:6px; background:var(--panel); color:var(--ink); padding:12px; text-decoration:none; }.operations-card:hover { border-color:var(--accent); }.operations-card > strong { font-size:13px; color:var(--accent); }.operations-card > span { font-size:14px; font-weight:700; }.operations-card small { color:var(--muted); }.operations-card footer { display:flex; justify-content:space-between; gap:8px; border-top:1px solid var(--line); color:var(--muted); font-size:11px; margin-top:6px; padding-top:8px; }.operations-overdue footer span:last-child { color:#b42318; font-weight:700; }.operations-empty { color:var(--muted); font-size:13px; margin:16px; text-align:center; }
.operations-schedule-nav { display:flex; align-items:center; justify-content:space-between; gap:16px; margin:24px 0 14px; }.operations-schedule-nav a { color:var(--accent); font-size:14px; font-weight:700; text-decoration:none; }.operations-schedule-nav strong { font-size:16px; }.operations-schedule { display:grid; grid-template-columns:repeat(7,minmax(178px,1fr)); gap:10px; overflow-x:auto; padding-bottom:12px; }.operations-schedule-day { min-height:390px; border:1px solid var(--line); border-radius:8px; background:var(--surface-soft); }.operations-schedule-day > header { display:grid; grid-template-columns:1fr auto; gap:2px 8px; align-items:center; padding:12px; border-top:4px solid var(--accent); }.operations-schedule-day > header strong { font-size:14px; }.operations-schedule-day > header span { color:var(--muted); font-size:12px; }.operations-schedule-day > header b { grid-column:2; grid-row:1 / span 2; font-size:15px; }.operations-schedule-day > div { display:grid; align-content:start; gap:9px; max-height:560px; overflow:auto; padding:0 9px 9px; }.operations-unscheduled { margin-top:18px; border:1px solid var(--line); border-radius:8px; background:var(--surface-soft); padding:16px; }.operations-unscheduled .crm-records-head { margin:0 0 14px; }.operations-unscheduled .crm-records-head h2 { margin:0 0 4px; }.operations-unscheduled-list { display:grid; grid-template-columns:repeat(auto-fill,minmax(230px,1fr)); gap:10px; }
.field-actions { display:flex; flex-wrap:wrap; gap:8px; }.field-actions .crm-inline-form { margin:0; }

@media (max-width: 760px) {
    .custom-field-record-filter { align-items: stretch; flex-direction: column; }
    .custom-field-record-filter select { width: 100%; }
    .demo-banner { align-items: flex-start; flex-direction: column; }
    .guide-section { grid-template-columns: 1fr; }
    .guide-start { grid-template-columns: 1fr; }
    .guide-terms { grid-template-columns: 1fr; }
    .operations-toolbar { align-items:stretch; flex-direction:column; }.operations-board { grid-template-columns:repeat(5,265px); }.operations-schedule { grid-template-columns:repeat(7,250px); }.operations-schedule-nav { align-items:flex-start; flex-direction:column; }
}
.security-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
    gap: 16px;
    align-items: start;
}

.security-secret {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    padding: 14px;
    margin: 16px 0;
    border: 1px solid var(--line);
    background: var(--surface-soft);
}

.security-secret span {
    font-weight: 700;
}

.security-secret code,
.security-uri code {
    overflow-wrap: anywhere;
}

.security-uri {
    margin: 0 0 16px;
}

.security-uri summary {
    cursor: pointer;
    font-weight: 700;
}

.security-recovery {
    border: 2px solid var(--accent);
    padding: 18px;
    background: var(--panel);
}

.security-recovery ul {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 8px 20px;
    padding: 0;
    list-style: none;
}

.security-danger {
    border-color: #b91c1c;
}

.security-row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.security-row-actions form {
    margin: 0;
}

.security-warning {
    color: #b45309;
    font-weight: 700;
}

.security-risk {
    display: inline-flex;
    padding: 3px 7px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
}

.security-risk-observed {
    background: var(--surface-soft);
    color: var(--muted);
}

.security-risk-review {
    background: #fef3c7;
    color: #92400e;
}

.security-risk-high {
    background: #fee2e2;
    color: #991b1b;
}

.security-agent {
    max-width: 360px;
    overflow-wrap: anywhere;
}

[data-theme="dark"] .security-risk-review {
    background: #4a3511;
    color: #fde68a;
}

[data-theme="dark"] .security-risk-high {
    background: #4c1d1d;
    color: #fecaca;
}

.platform-stats {
    grid-template-columns: repeat(4, minmax(180px, 1fr));
}

.platform-control-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.platform-control {
    margin: 0;
}

.platform-control dl {
    margin: 0;
}

.platform-control dl div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}

.platform-control dt {
    color: var(--muted);
}

.platform-control dd {
    margin: 0;
    font-weight: 700;
}

.platform-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-top: 16px;
}

.package-editor-list {
    display: grid;
    gap: 20px;
}

.package-comparison,
.package-details {
    margin-top: 20px;
}

.commercial-readiness {
    margin-top: 20px;
}

.commercial-readiness-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.commercial-check {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 3px 8px;
    border: 1px solid var(--line);
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
}

.commercial-check.ready {
    color: #0f6b48;
    border-color: #8ecab1;
    background: #eaf7f1;
}

.commercial-check.warning {
    color: #7a5200;
    border-color: #dfbd70;
    background: #fff7df;
}

.commercial-check.blocked {
    color: #a12632;
    border-color: #e1a4ab;
    background: #fff0f1;
}

.analytics-create {
    display: grid;
    grid-template-columns: minmax(220px, .7fr) minmax(0, 2fr);
    gap: 24px;
    align-items: start;
    margin-top: 20px;
}

.analytics-create form {
    display: grid;
    grid-template-columns: repeat(5, minmax(140px, 1fr));
    gap: 12px;
    align-items: end;
}

.analytics-create form button {
    min-height: 43px;
}

.analytics-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.analytics-actions form {
    margin: 0;
}

.analytics-run-detail summary {
    color: var(--accent);
    cursor: pointer;
    font-weight: 700;
}

.analytics-run-detail pre {
    max-width: 560px;
    max-height: 320px;
    overflow: auto;
    margin: 10px 0 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface-soft);
    color: var(--ink);
    white-space: pre-wrap;
}

.package-matrix-scroll {
    overflow-x: auto;
    padding-bottom: 6px;
}

.package-matrix {
    display: grid;
    grid-template-columns: minmax(280px, 1.4fr) repeat(3, minmax(180px, 1fr));
    min-width: 880px;
    border-top: 1px solid var(--line);
    border-left: 1px solid var(--line);
    background: var(--panel);
}

.package-matrix-cell {
    min-width: 0;
    padding: 14px 16px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: var(--panel);
}

.package-matrix-cell strong,
.package-matrix-cell span {
    display: block;
}

.package-matrix-corner,
.package-matrix-plan {
    min-height: 92px;
    background: var(--surface-soft);
}

.package-matrix-corner,
.package-matrix-plan {
    display: grid;
    align-content: center;
    gap: 4px;
}

.package-matrix-corner span,
.package-matrix-plan span,
.package-matrix-feature span {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
}

.package-matrix-plan {
    text-align: center;
}

.package-matrix-plan strong {
    font-size: 17px;
}

.package-matrix-plan .crm-status {
    font-size: 11px;
    text-transform: uppercase;
}

.package-matrix-feature {
    min-height: 80px;
}

.package-matrix-feature strong {
    margin-bottom: 4px;
}

.package-matrix-choice {
    display: grid;
    min-height: 80px;
    place-items: center;
    padding: 10px;
    transition: background .15s ease;
}

.package-matrix-choice:has(input:checked) {
    background: var(--accent-soft);
}

.package-matrix-choice label {
    display: grid;
    justify-items: center;
    gap: 6px;
    width: 100%;
    cursor: pointer;
}

.package-matrix-choice input[type="checkbox"] {
    width: 20px;
    min-width: 20px;
    height: 20px;
    min-height: 20px;
}

.package-matrix-choice span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

.package-matrix-choice:has(input:checked) span {
    color: var(--accent);
}

.package-editor-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
}

.package-grid-form {
    width: 100%;
    max-width: none;
    min-width: 0;
    margin: 0;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
}

.package-grid-form-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.package-grid-form-head h3 {
    margin: 0 0 3px;
    font-size: 18px;
}

.package-grid-form-head span {
    color: var(--muted);
    font-size: 12px;
}

.package-grid-pair {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    align-items: end;
}

.package-grid-form input,
.package-grid-form select,
.package-grid-form textarea {
    min-width: 0;
}

.package-grid-form .package-flags {
    min-height: 43px;
    align-items: center;
}

.package-grid-form .package-flags label {
    display: flex;
    align-items: center;
    gap: 7px;
}

.package-grid-form .package-flags input {
    width: 18px;
    min-width: 18px;
    height: 18px;
    min-height: 18px;
}

.package-grid-form > button {
    justify-self: start;
}

.package-editor {
    margin: 0;
}

.package-editor-form,
.platform-settings-form {
    width: 100%;
    max-width: none;
    margin: 0;
}

.package-editor-form {
    display: grid;
    gap: 18px;
}

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

.package-form-grid label,
.platform-settings-form > label {
    display: grid;
    align-content: start;
    gap: 6px;
    font-weight: 700;
}

.package-form-grid .span-2 {
    grid-column: 1 / -1;
}

.package-flags {
    display: flex;
    align-items: center;
    gap: 20px;
}

.package-editor-form .package-flags label,
.platform-settings-form .toggle-label,
.package-editor-form .package-feature-option {
    display: flex;
    align-items: flex-start;
    gap: 9px;
}

.package-editor-form .package-flags input,
.platform-settings-form .toggle-label input,
.package-editor-form .package-feature-option input {
    width: 18px;
    min-width: 18px;
    height: 18px;
    min-height: 18px;
    padding: 0;
    margin: 1px 0 0;
}

.package-features {
    margin: 20px 0;
    padding: 16px;
    border: 1px solid var(--line);
}

.package-features legend {
    padding: 0 8px;
    font-weight: 800;
}

.package-features > p {
    margin-top: 0;
    color: var(--muted);
}

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

.package-feature-option {
    padding: 10px;
    border: 1px solid var(--line);
    background: var(--surface-soft);
}

.package-feature-option strong,
.package-feature-option small {
    display: block;
}

.package-feature-option small {
    margin-top: 3px;
    color: var(--muted);
    line-height: 1.35;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.platform-settings-grid {
    align-items: start;
}

.platform-settings-form {
    display: grid;
    gap: 16px;
}

.platform-settings-form .package-form-grid input,
.platform-settings-form .package-form-grid select,
.package-editor-form .package-form-grid input,
.package-editor-form .package-form-grid select,
.package-editor-form .package-form-grid textarea {
    width: 100%;
    min-width: 0;
}

.platform-settings-form button,
.package-editor-form .form-actions {
    justify-self: start;
}

.platform-test-form {
    grid-template-columns: minmax(240px, 1fr) auto;
    align-items: end;
}

.platform-test-form button {
    margin-bottom: 0;
}

.configuration-checklist {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.configuration-checklist h3 {
    margin-top: 0;
}

.configuration-checklist li {
    margin: 8px 0;
    color: var(--muted);
}

.invitation-form {
    width: 100%;
    max-width: none;
    margin: 0;
}

.invitation-created {
    display: grid;
    gap: 12px;
    margin: 0 0 20px;
    padding: 16px;
    border: 1px solid var(--accent);
    border-left-width: 4px;
    border-radius: 6px;
    background: var(--accent-soft);
}

.invitation-created strong,
.invitation-created span {
    display: block;
}

.invitation-created span {
    margin-top: 3px;
    color: var(--muted);
}

.invitation-link {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
}

.invitation-link input {
    min-width: 0;
    background: var(--panel);
}

.signup-package-summary {
    display: grid;
    gap: 5px;
    padding: 14px;
    border: 1px solid var(--accent);
    border-radius: 6px;
    background: var(--accent-soft);
}

.signup-package-summary > span,
.signup-package-summary small {
    color: var(--muted);
}

.signup-package-summary strong {
    font-size: 20px;
}

.signup-package-summary p {
    margin: 2px 0;
    line-height: 1.45;
}

.landing-proof {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr);
    gap: 8%;
    align-items: end;
    padding: 72px 6%;
    background: #eef3f1;
}

.landing-proof h2,
.landing-section-heading h2,
.landing-final h2 {
    margin: 8px 0 0;
    font-size: 48px;
    line-height: 1.08;
    letter-spacing: 0;
}

.landing-proof > p {
    color: #405552;
    font-size: 18px;
    line-height: 1.65;
}

.landing-pricing {
    padding: 76px 5%;
    background: #fff;
}

.landing-section-heading {
    max-width: 760px;
    margin: 0 auto 36px;
    text-align: center;
}

.landing-section-heading > p:last-child {
    color: var(--muted);
    font-size: 17px;
    line-height: 1.55;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    max-width: 1380px;
    margin: 0 auto;
    align-items: stretch;
}

.pricing-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 28px;
    border: 1px solid #cfdad8;
    border-radius: 8px;
    background: #fff;
}

.pricing-card.featured {
    border: 2px solid #087f72;
    padding: 27px;
}

.pricing-badge {
    align-self: flex-start;
    margin-bottom: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    background: #d9f2ed;
    color: #075e55;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.pricing-card h3 {
    margin: 0;
    font-size: 25px;
}

.pricing-headline {
    min-height: 48px;
    color: #3e5552;
    line-height: 1.45;
}

.pricing-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: 8px;
}

.pricing-price strong {
    font-size: 44px;
    line-height: 1;
}

.pricing-price span,
.pricing-annual,
.pricing-description,
.pricing-users {
    color: #4d625f;
}

.pricing-annual {
    min-height: 40px;
    font-size: 13px;
}

.pricing-description {
    line-height: 1.5;
}

.pricing-card ul {
    flex: 1;
    margin: 16px 0 24px;
    padding: 16px 0 0;
    border-top: 1px solid #d8e2e0;
    list-style: none;
}

.pricing-card li {
    position: relative;
    margin: 9px 0;
    padding-left: 22px;
}

.pricing-card li::before {
    position: absolute;
    left: 0;
    content: "✓";
    color: #087f72;
    font-weight: 900;
}

.pricing-card .landing-cta {
    text-align: center;
}

.landing-final {
    padding: 70px 6%;
    text-align: center;
    background: #163d39;
    color: #fff;
}

.landing-final p {
    max-width: 660px;
    margin: 18px auto 26px;
    color: #d9e7e4;
    font-size: 18px;
    line-height: 1.55;
}

[data-theme="dark"] .landing-proof,
[data-theme="dark"] .landing-pricing,
[data-theme="dark"] .pricing-card {
    background: var(--panel);
    color: var(--text);
}

[data-theme="dark"] .landing-proof > p,
[data-theme="dark"] .pricing-headline,
[data-theme="dark"] .pricing-price span,
[data-theme="dark"] .pricing-annual,
[data-theme="dark"] .pricing-description,
[data-theme="dark"] .pricing-users {
    color: var(--muted);
}

@media (max-width: 1050px) {
    .platform-control-grid,
    .pricing-grid {
        grid-template-columns: 1fr;
    }

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

    .package-editor-grid {
        grid-template-columns: 1fr;
    }

    .analytics-create {
        grid-template-columns: 1fr;
    }

    .analytics-create form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .platform-stats,
    .package-form-grid,
    .package-feature-grid,
    .package-grid-pair,
    .landing-proof {
        grid-template-columns: 1fr;
    }

    .landing-proof,
    .landing-pricing,
    .landing-final {
        padding: 48px 20px;
    }

    .pricing-card {
        padding: 22px;
    }

    .platform-test-form {
        grid-template-columns: 1fr;
    }

    .invitation-link {
        grid-template-columns: 1fr;
    }

    .analytics-create form {
        grid-template-columns: 1fr;
    }

    .landing-proof h2,
    .landing-section-heading h2,
    .landing-final h2 {
        font-size: 34px;
    }
}
.company-switcher label{display:flex;align-items:center;gap:8px;margin:0}.company-switcher label span{font-size:12px;color:var(--muted)}.company-switcher select{min-width:160px;padding:8px 30px 8px 10px}.access-form{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.access-checks{display:flex;gap:8px;flex-wrap:wrap}.access-check{display:inline-flex;align-items:center;gap:5px;padding:6px 9px;border:1px solid var(--border);border-radius:4px;margin:0}.access-check input{width:16px;height:16px}.multi-company-workspace .crm-create form{grid-template-columns:repeat(4,minmax(0,1fr))}.multi-company-workspace .crm-create form .span-2{grid-column:span 2}.multi-company-workspace .checkbox-label{flex-direction:row;align-items:center}.multi-company-workspace .checkbox-label input{width:16px;height:16px}@media(max-width:900px){.company-switcher label span{display:none}.company-switcher select{min-width:110px;max-width:150px}.multi-company-workspace .crm-create form{grid-template-columns:1fr}.multi-company-workspace .crm-create form .span-2{grid-column:auto}}
.work-quick-actions{display:flex;align-items:center;flex-wrap:wrap;gap:8px}.work-quick-actions a{border:1px solid var(--line);border-radius:4px;background:var(--panel);color:var(--accent);font-weight:700;padding:9px 11px;text-decoration:none}.work-center-stats .work-stat-danger strong{color:#b42318}.work-center-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;align-items:start}.work-panel{min-width:0;border:1px solid var(--line);border-radius:7px;background:var(--panel);overflow:hidden}.work-panel>header{display:flex;justify-content:space-between;gap:14px;padding:16px;border-bottom:1px solid var(--line)}.work-panel>header h2{font-size:18px;margin:0 0 4px}.work-panel>header p{color:var(--muted);font-size:13px;line-height:1.4;margin:0}.work-panel>header>span{display:grid;place-items:center;min-width:30px;height:30px;border-radius:50%;background:var(--surface-soft);font-weight:800}.work-list{display:grid;max-height:620px;overflow:auto}.work-item{position:relative;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:3px 12px;padding:13px 15px 13px 18px;border-bottom:1px solid var(--line);color:var(--ink);text-decoration:none}.work-item:last-child{border-bottom:0}.work-item:before{content:"";position:absolute;inset:0 auto 0 0;width:4px;background:var(--line)}.work-item-warning:before{background:#b58e19}.work-item-danger:before{background:#b42318}.work-item:hover{background:var(--surface-soft)}.work-item-type{grid-column:1;color:var(--accent);font-size:11px;font-weight:800;text-transform:uppercase}.work-item strong{grid-column:1;overflow-wrap:anywhere}.work-item small{grid-column:1;color:var(--muted);line-height:1.35}.work-item time{grid-column:2;grid-row:1/span 3;align-self:center;color:var(--muted);font-size:11px;white-space:nowrap}.work-item-danger time{color:#b42318;font-weight:800}.work-empty{display:grid;gap:5px;padding:28px 18px;text-align:center}.work-empty span{color:var(--muted);font-size:13px}.work-center-help{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:18px;border:1px solid var(--line);border-radius:7px;background:var(--panel)}.work-center-help h2{font-size:18px;margin:0 0 4px}.work-center-help p{color:var(--muted);margin:0}
@media(max-width:1050px){.work-center-grid{grid-template-columns:1fr 1fr}.work-center-grid .work-panel:first-child{grid-column:1/-1}}@media(max-width:700px){.work-center-grid{grid-template-columns:1fr}.work-center-grid .work-panel:first-child{grid-column:auto}.work-quick-actions{align-items:stretch;flex-direction:column}.work-quick-actions a{text-align:center}.work-center-help{align-items:flex-start;flex-direction:column}.work-item{grid-template-columns:1fr}.work-item time{grid-column:1;grid-row:auto;margin-top:4px}}
