/* Tokens and app shell follow the Claude Design prototype (desktop.html); Instrument Sans is the agreed deviation from its Helvetica stack. */
.crm {
    --ink:#1b1f1c;
    --ink-2:#3d443f;
    --ink-3:#6b716c;
    --ink-4:#8a908b;
    --muted:#6b716c;
    --line:#e1e5e0;
    --line-soft:#edefea;
    --line-input:#d5dad5;
    --green:#2f6b45;
    --green-700:#265838;
    --green-800:#1f4d30;
    --green-soft:#e6f1ea;
    --red:#b23a2a;
    --red-soft:#fbeeea;
    --hover:#eef1ee;
    --page:#f3f4f2;
    --panel:#fafbf9;
    margin:0;
    color:var(--ink);
    background:var(--page);
    font:13px/1.4 'Instrument Sans',system-ui,sans-serif;
    -webkit-font-smoothing:antialiased;
    display:flex;
    height:100vh;
    height:100dvh;
    overflow:hidden
}
.crm * {
    box-sizing:border-box
}
.crm [hidden] {
    display:none!important
}
.crm button,.crm input,.crm select,.crm textarea {
    font:inherit;
    color:inherit
}
.crm button,.crm a,.crm summary {
    cursor:pointer
}
.crm button:disabled {
    cursor:default;
    opacity:.6
}
.crm button:disabled[aria-busy="true"] {
    cursor:wait
}
.crm a {
    color:inherit;
    text-decoration:none
}
.crm button {
    border:0
}
.crm button:focus-visible,.crm a:focus-visible,.crm summary:focus-visible,.crm [tabindex]:focus-visible {
    outline:2px solid var(--green);
    outline-offset:3px
}
.crm input:focus-visible,.crm select:focus-visible,.crm textarea:focus-visible {
    outline:2px solid var(--green);
    outline-offset:0;
    border-color:var(--green)
}
.crm button,.crm a {
    transition:background .12s
}
.crm h1,.crm h2,.crm h3,.crm p {
    margin:0
}
.crm ::-webkit-scrollbar {
    height:10px;
    width:10px
}
.crm ::-webkit-scrollbar-thumb {
    background:#cfd4cf;
    border-radius:6px
}
.crm ::-webkit-scrollbar-track {
    background:transparent
}
@keyframes crm-pop {
    from {transform:translateY(8px);opacity:0}
    to {transform:none;opacity:1}
}
/* Sidebar: 216px, brand block 71px like the header, scrollable nav, user panel with popover menu. */
.crm-sidebar {
    width:216px;
    flex:0 0 216px;
    background:#fff;
    border-right:1px solid var(--line);
    display:flex;
    flex-direction:column;
    padding:16px 12px;
    gap:4px;
    min-height:0
}
.crm-brand {
    min-height:71px;
    flex:0 0 auto;
    display:flex;
    align-items:center;
    margin:-16px -12px 12px;
    border-bottom:1px solid var(--line);
    padding:8px 12px 8px 22px
}
.crm-brand a {
    display:block;
    width:100%;
    max-width:132px
}
.crm-brand img {
    width:100%;
    max-width:132px;
    height:auto;
    display:block
}
.crm-nav {
    flex:1;
    min-height:0;
    overflow-y:auto;
    display:flex;
    flex-direction:column;
    gap:4px;
    margin:0 -4px;
    padding:0 4px
}
.crm-nav-group {
    display:flex;
    flex-direction:column;
    gap:4px
}
.crm-nav-caption {
    margin-top:22px;
    padding:0 10px 6px;
    font-size:11px;
    font-weight:600;
    letter-spacing:.06em;
    text-transform:uppercase;
    color:var(--ink-4)
}
.crm-nav-link {
    display:flex;
    align-items:center;
    gap:10px;
    padding:9px 10px;
    border-radius:8px;
    font-size:14px;
    font-weight:500;
    color:var(--ink-2);
    background:transparent
}
.crm-nav-link.is-row {
    gap:8px;
    padding:7px 10px;
    font-size:13px
}
.crm-nav-link:hover,.crm-nav-link.active:hover {
    background:var(--hover)
}
.crm-nav-link.active {
    background:var(--green-soft);
    color:var(--green-800);
    font-weight:700
}
.crm-nav-label {
    flex:1;
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap
}
.crm-nav-dot {
    width:8px;
    height:8px;
    flex:0 0 8px;
    border-radius:50%;
    background:currentColor;
    opacity:.7
}
.crm-nav-dot[data-icon="today"] {
    background:transparent;
    border:2px solid currentColor
}
.crm-nav-dot[data-icon="pipeline"] {
    border-radius:2px
}
.crm-nav-dot[data-icon="customers"] {
    border-radius:50% 50% 2px 2px
}
.crm-nav-dot[data-icon="archive"] {
    height:3px;
    border-radius:1px;
    box-shadow:0 4px 0 currentColor;
    margin-bottom:4px
}
.crm-nav-dot[data-icon="ideas"] {
    border-radius:2px;
    transform:rotate(45deg)
}
.crm-nav-badge {
    min-width:18px;
    height:18px;
    padding:0 5px;
    border-radius:9px;
    background:var(--red);
    color:#fff;
    font-size:11px;
    font-weight:700;
    display:grid;
    place-items:center
}
.crm-nav-count {
    font-size:11px;
    color:var(--ink-4)
}
.crm-sidebar-foot {
    position:relative;
    flex:0 0 auto;
    margin-top:8px
}
.crm-sidebar-foot summary {
    list-style:none;
    width:100%;
    display:flex;
    align-items:center;
    gap:10px;
    padding:8px;
    border-radius:8px
}
.crm-sidebar-foot summary::-webkit-details-marker {
    display:none
}
.crm-sidebar-foot summary:hover {
    background:var(--hover)
}
.crm-avatar {
    display:inline-grid;
    place-items:center;
    width:24px;
    height:24px;
    flex:0 0 24px;
    border-radius:50%;
    background:var(--hover);
    color:var(--ink-2);
    font-size:10px;
    font-weight:700
}
.crm-avatar-user {
    width:30px;
    height:30px;
    flex-basis:30px;
    background:var(--ink);
    color:#fff;
    font-size:12px
}
.crm-user-text {
    min-width:0
}
.crm-user-text strong {
    display:block;
    font-size:13px;
    font-weight:600;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis
}
.crm-user-text small {
    display:block;
    font-size:11px;
    color:var(--ink-3)
}
.crm-user-menu {
    position:absolute;
    left:0;
    bottom:52px;
    width:200px;
    background:#fff;
    border:1px solid var(--line);
    border-radius:10px;
    box-shadow:0 8px 24px rgba(0,0,0,.1);
    padding:6px;
    display:flex;
    flex-direction:column;
    animation:crm-pop .15s ease-out;
    z-index:6
}
.crm-user-menu a,.crm-user-menu button {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:8px;
    width:100%;
    text-align:left;
    padding:8px 10px;
    border-radius:6px;
    font-size:13px;
    background:transparent;
    color:var(--ink)
}
.crm-user-menu a:hover,.crm-user-menu button:hover {
    background:var(--hover)
}
.crm-user-menu a[aria-current="page"] {
    font-weight:600
}
.crm-user-menu hr {
    height:1px;
    border:0;
    background:var(--line-soft);
    margin:4px 6px
}
.crm-menu-caption {
    padding:6px 10px 4px;
    font-size:10px;
    font-weight:600;
    letter-spacing:.06em;
    text-transform:uppercase;
    color:var(--ink-4)
}
.crm-user-menu form {
    margin:0
}
.crm-user-menu form button {
    color:var(--red)
}
.crm-user-menu form button:hover {
    background:var(--red-soft)
}
/* Main column: fixed header, scrolling content. */
.crm-main {
    flex:1;
    min-width:0;
    display:flex;
    flex-direction:column;
    overflow:hidden
}
.crm-header {
    min-height:71px;
    flex:0 0 auto;
    display:flex;
    align-items:center;
    gap:16px;
    padding:14px 24px;
    border-bottom:1px solid var(--line);
    background:#fff
}
.crm-header h1 {
    font-size:18px;
    font-weight:700
}
.crm-pipeline-header {
    flex-wrap:wrap;
    gap:10px 16px;
    padding:8px 24px
}
.crm-title-block {
    min-width:180px;
    flex:1;
    overflow:hidden
}
.crm-subtitle {
    font-size:12px;
    color:var(--ink-3);
    margin-top:2px;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis
}
.crm-subtitle strong {
    font-weight:400
}
.crm-breadcrumb {
    font-size:11px;
    color:var(--muted)
}
.crm-header-actions {
    display:flex;
    align-items:center;
    gap:16px;
    margin-left:auto
}
.crm-primary {
    background:var(--green);
    color:#fff!important;
    border-radius:8px;
    padding:9px 14px;
    font-size:13px;
    font-weight:600!important;
    white-space:nowrap
}
.crm-primary:hover {
    background:var(--green-700)
}
.crm-secondary {
    background:#fff;
    border:1px solid var(--line-input)!important;
    border-radius:8px;
    padding:9px 14px;
    font-size:13px;
    font-weight:600!important
}
.crm-secondary:hover {
    background:var(--hover)
}
.crm-text-link {
    background:transparent;
    color:var(--ink-2)!important;
    padding:6px 0;
    font-size:12px!important;
    text-decoration:underline!important;
    text-underline-offset:3px
}
.crm-icon {
    font-size:24px!important;
    line-height:1;
    background:#fff;
    border:1px solid var(--line-input)!important;
    width:40px;
    height:40px;
    padding:0;
    border-radius:10px;
    display:grid;
    place-items:center;
    flex:0 0 auto;
    color:var(--ink-2)!important
}
.crm-icon:hover {
    background:var(--hover)
}
/* Pipeline header controls: 260px search, owner select, primary action. */
.crm-pipeline-filters {
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    gap:10px 12px
}
.crm .crm-pipeline-filters input[type="search"] {
    width:260px;
    border:1px solid var(--line-input);
    border-radius:8px;
    padding:8px 12px;
    background:#f7f8f6;
    font-size:14px;
    line-height:1.3
}
.crm .crm-pipeline-filters select {
    width:auto;
    border:1px solid var(--line-input);
    border-radius:8px;
    padding:8px 10px;
    background:#fff;
    font-size:14px;
    line-height:1.3
}
.crm-pipeline-empty {
    margin:0 0 16px;
    padding:24px;
    background:#fff;
    border:1px dashed var(--line-input);
    border-radius:10px;
    line-height:1.5
}
.crm-pipeline-empty p {
    color:var(--muted);
    margin:4px 0 12px
}
/* Board: 272px columns on the #f3f4f2 ground, 14px apart. */
.crm-board-scroll {
    flex:1;
    min-height:0;
    overflow:auto;
    padding:20px 24px 24px
}
.crm-board {
    display:flex;
    gap:14px;
    align-items:flex-start;
    min-height:100%
}
.crm-column {
    width:272px;
    flex:0 0 272px;
    display:flex;
    flex-direction:column;
    gap:10px;
    min-height:320px;
    border-radius:12px;
    padding:2px
}
.crm-column h2 {
    display:flex;
    align-items:baseline;
    gap:8px;
    padding:6px 8px 2px;
    font-size:13px;
    font-weight:700
}
.crm-column-name {
    min-width:0;
    max-width:170px;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap
}
.crm-column-count {
    font-size:12px;
    font-weight:400;
    color:var(--ink-4)
}
.crm-spacer {
    flex:1
}
.crm-column-total {
    font-size:12px;
    font-weight:600;
    color:var(--ink-2);
    font-variant-numeric:tabular-nums;
    white-space:nowrap
}
.crm-empty-column {
    border:1px dashed var(--line-input);
    border-radius:10px;
    padding:18px;
    text-align:center;
    font-size:12px;
    color:var(--ink-4)
}
/* A column without visible cards is narrow, so the columns in use fit a 13" screen. It is the same column: it keeps
   its place in the flow, its horizontal heading and its empty box, and takes a dropped card along its full height.
   When nothing on the board is visible, no column is narrowed: the empty state explains itself in full width. */
.crm-column.is-empty {
    width:132px;
    flex:0 0 132px;
    align-self:stretch
}
.crm-column.is-empty .crm-spacer,.crm-column.is-empty .crm-column-total {
    display:none
}
.crm-column.is-empty .crm-empty-column {
    padding:14px 8px
}
/* Deal card: name row, need row, flags, date/value row, one status line, order steps. */
.crm-card {
    display:flex;
    flex-direction:column;
    gap:6px;
    background:#fff;
    border:1px solid var(--line);
    border-radius:10px;
    padding:12px 12px 10px;
    box-shadow:0 1px 2px rgba(0,0,0,.04);
    transition:border-color .12s,box-shadow .12s
}
.crm-card:hover {
    border-color:#b9c2ba;
    box-shadow:0 3px 10px rgba(0,0,0,.07)
}
.crm-card-name {
    display:flex;
    align-items:flex-start;
    gap:8px
}
.crm-card-customer {
    flex:1;
    min-width:0;
    font-size:14px;
    font-weight:700;
    line-height:1.25;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap
}
.crm-card-value-inline {
    display:none;
    flex:0 0 auto;
    font-size:12px;
    color:var(--ink-3);
    font-variant-numeric:tabular-nums;
    white-space:nowrap;
    padding-top:2px
}
.crm-card.is-collapsed .crm-card-value-inline {
    display:block
}
.crm-card.is-collapsed .crm-card-details {
    display:none
}
.crm-card-details {
    display:flex;
    flex-direction:column;
    gap:6px
}
.crm-card-needrow {
    display:flex;
    align-items:center;
    gap:6px;
    min-width:0
}
.crm-card-need {
    flex:1;
    min-width:0;
    font-size:13px;
    color:var(--ink-2);
    line-height:1.35;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap
}
.crm-card-icon {
    flex:0 0 auto;
    width:17px;
    height:17px;
    border-radius:5px;
    background:var(--hover);
    color:var(--ink-2);
    display:grid;
    place-items:center;
    font-size:12px;
    font-weight:700;
    line-height:1;
    padding-bottom:3px
}
.crm-card-files {
    width:auto;
    padding:0 5px;
    font-size:11px;
    white-space:nowrap
}
.crm-card-flag {
    display:flex;
    align-items:center;
    gap:6px;
    font-size:11.5px;
    font-weight:700;
    color:var(--red)
}
.crm-flag-dot {
    width:9px;
    height:9px;
    flex:0 0 9px;
    border-radius:50%;
    background:var(--ink)
}
.crm-card-daterow {
    display:flex;
    align-items:center;
    gap:8px;
    font-size:12px;
    color:var(--ink-3)
}
.crm-card-returning {
    font-weight:700;
    color:var(--ink-2)
}
.crm-card-date {
    white-space:nowrap
}
.crm-card-value {
    font-weight:600;
    color:var(--ink);
    font-variant-numeric:tabular-nums;
    white-space:nowrap
}
.crm-card-line {
    margin-top:6px;
    padding-top:8px;
    border-top:1px solid var(--line-soft);
    display:flex;
    align-items:center;
    gap:6px;
    font-size:11.5px;
    line-height:1
}
.crm-dot {
    width:9px;
    height:9px;
    flex:0 0 9px;
    border-radius:50%;
    border:1.5px solid var(--ink);
    background:transparent
}
.crm-dot.is-filled {
    background:var(--ink)
}
.crm-line-label {
    min-width:0;
    font-weight:650;
    color:var(--ink-2);
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap
}
.crm-line-status {
    font-weight:700;
    color:var(--ink-3);
    white-space:nowrap;
    font-variant-numeric:tabular-nums
}
.crm-line-status.is-urgent {
    color:var(--red)
}
.crm-check {
    width:14px;
    height:14px;
    flex:0 0 14px;
    border-radius:50%;
    background:var(--green);
    color:#fff;
    display:grid;
    place-items:center;
    font-size:9px;
    font-weight:700
}
.crm-card-sent .crm-line-label {
    color:var(--green-800)
}
.crm-line-dates {
    color:var(--ink-3);
    font-variant-numeric:tabular-nums;
    white-space:nowrap
}
.crm-card-expand {
    flex:0 0 18px;
    width:18px;
    height:18px;
    margin:-2px -3px -2px 2px;
    border-radius:5px;
    display:grid;
    place-items:center;
    color:var(--ink-4);
    font-size:9px;
    line-height:1;
    transition:transform .15s ease,background .12s
}
.crm-card-expand:hover {
    background:var(--hover);
    color:var(--ink-2)
}
.crm-card:not(.is-collapsed) .crm-card-expand {
    transform:rotate(180deg)
}
.crm-dashed-ring {
    width:14px;
    height:14px;
    flex:0 0 14px;
    border-radius:50%;
    border:1px dashed #c99a92
}
.crm-card-unsent .crm-line-label {
    color:#a8483a
}
.crm-card-steps {
    margin-top:8px;
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:5px
}
.crm-step {
    display:flex;
    flex-direction:column;
    gap:5px;
    min-width:0
}
.crm-step-bar {
    height:3px;
    border-radius:2px;
    background:#fff;
    border:1px solid #c9cfc9
}
.crm-step-text {
    font-size:10px;
    letter-spacing:.01em;
    line-height:1.1;
    color:var(--ink-3);
    font-weight:500;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis
}
.crm-step.is-done .crm-step-bar {
    background:var(--green);
    border-color:var(--green)
}
.crm-step.is-done .crm-step-text {
    color:var(--green-800);
    font-weight:700
}
.crm-notice {
    background:#fff9ee;
    color:#75461b;
    margin:18px 26px;
    padding:12px;
    border:1px solid #e7b96f;
    border-radius:8px
}
.crm fieldset {
    border:0;
    padding:0;
    margin:0 0 22px;
    min-width:0
}
.crm legend,.crm h3,.crm-eyebrow {
    font-size:11px;
    font-weight:600;
    letter-spacing:.06em;
    color:var(--muted);
    margin-bottom:10px
}
.crm label {
    display:block;
    font-size:12px;
    font-weight:600;
    color:#3d443f;
    margin-bottom:6px
}
.crm input:not([type=checkbox]),.crm select,.crm textarea {
    width:100%;
    min-width:0;
    border:1px solid #d5dad5;
    border-radius:8px;
    padding:9px 11px;
    background:#fff;
    line-height:1.4
}
.crm textarea {
    resize:vertical
}
.crm input[aria-invalid=true],.crm select[aria-invalid=true],.crm textarea[aria-invalid=true] {
    border-color:var(--red)
}
.crm-field-grid {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:12px
}
.crm-full {
    grid-column:1/-1
}
.crm-field-error {
    display:block;
    color:var(--red);
    font-size:12px;
    margin-top:4px
}
.crm-help,.crm small {
    font-size:12px;
    line-height:1.5;
    color:var(--muted)
}
.crm-error {
    background:#fbeeea;
    border:1px solid #f0cfc6;
    color:var(--red);
    padding:12px;
    border-radius:8px;
    font-size:13px;
    line-height:1.5;
    margin-bottom:14px
}
.crm [aria-disabled=true] {
    opacity:.6;
    cursor:default
}
.crm [readonly] {
    background:#fafbf9!important
}
@media(max-width:760px) {
    .crm-sidebar {
        width:170px;
        flex-basis:170px
    }
    .crm-header {
        padding:10px 16px
    }
    .crm-header-actions {
        gap:10px
    }
    .crm-board-scroll {
        padding:16px
    }
    .crm .crm-pipeline-filters input[type="search"] {
        width:100%
    }
    .crm-pipeline-filters {
        flex:1 1 100%
    }
    .crm-toast {
        left:20px;
        right:20px
    }
    .crm input,.crm select,.crm textarea {
        font-size:16px!important
    }
}
@media(max-width:500px) {
    .crm-sidebar {
        display:none
    }
    .crm-pipeline-header {
        padding:12px 16px
    }
    .crm-pipeline-filters {
        display:contents
    }
    .crm .crm-pipeline-filters input[type="search"] {
        flex:1 1 100%
    }
    .crm .crm-pipeline-filters select {
        flex:1 1 auto;
        min-width:0
    }
    .crm-pipeline-header .crm-primary {
        flex:0 0 auto
    }
    .crm-pipeline-header [data-pipeline-reset] {
        flex:1 1 100%;
        text-align:left
    }
    .crm-field-grid {
        grid-template-columns:1fr
    }
    .crm-modal {
        width:96vw
    }
    .crm .crm-modal#crm-modal {
        width:100vw;
        max-width:100vw;
        height:100dvh;
        max-height:100dvh;
        margin:0;
        border-radius:0
    }
    .crm .crm-modal#crm-modal form {
        display:flex;
        flex-direction:column;
        height:100%
    }
    .crm .crm-modal#crm-modal .crm-modal-body {
        flex:1;
        overflow:auto
    }
    .crm-modal-header {
        padding:18px
    }
    .crm-modal form {
        padding-left:18px;
        padding-right:18px
    }
    .crm .crm-drawer-head select {
        min-width:0;
        width:100%;
        text-overflow:ellipsis
    }
}
@media(prefers-reduced-motion:reduce) {
    .crm * {
        transition:none!important;
        scroll-behavior:auto!important
    }
}

.crm-work-content {flex:1;min-height:0;overflow:auto;padding:24px;background:var(--panel)}
.crm-work-toolbar {display:flex;gap:16px;flex-wrap:wrap;align-items:end;margin-bottom:18px}
.crm-work-toolbar label {display:grid;gap:6px;font-size:13px;font-weight:600}
.crm-work-list {display:grid;grid-template-columns:repeat(auto-fill,minmax(290px,1fr));gap:16px}
.crm-work-card {border:1px solid var(--line);border-radius:12px;background:#fff;padding:18px 20px;min-width:0;overflow-wrap:anywhere}
.crm-work-card h2 {font-size:15px;font-weight:700;margin:0 0 8px}
.crm-work-card p {margin:6px 0;font-size:13px;line-height:1.45}
.crm-work-actions {display:flex;flex-wrap:wrap;gap:8px;margin-top:16px}
.crm-work-instructions {white-space:pre-wrap}
.crm-overdue {color:#a33c25;font-weight:600}
@media(max-width:800px) {.crm-work-content {padding:20px 16px}}
@media(max-width:500px) {.crm-work-toolbar {display:grid;grid-template-columns:1fr 1fr}.crm-work-list:not(.crm-plan-view) {grid-template-columns:1fr}}
.crm-work-intro {margin-bottom:12px;max-width:760px}
.crm-user-pipelines {display:grid;gap:10px}
.crm-user-pipelines div {display:flex;gap:18px;flex-wrap:wrap;align-items:center}
.crm-user-pipelines label {display:flex;gap:6px;align-items:center;font-weight:500}
.crm-profile {max-width:520px;grid-column:1/-1;display:grid;gap:12px}
.crm-profile label {display:grid;gap:6px;font-weight:600;font-size:13px}
.crm-profile .crm-modal-footer {padding:0;border:0;justify-content:flex-start}
.crm-tag {display:inline-block;padding:2px 8px;border-radius:999px;background:#eef2ee;font-size:11px;font-weight:600;white-space:nowrap}
.crm-tag-warn {background:#f6e7e3;color:var(--red)}
.crm-tag-ok {background:#e5f0e8;color:var(--green)}
/* Kunder: the prototype's customer table with expandable rows (contact persons, locations, deals). */
.crm .crm-filter-toggle {border:1px solid var(--line-input);background:#fff;color:var(--ink-2);border-radius:8px;padding:8px 13px;font-size:13px;font-weight:600;white-space:nowrap;display:inline-flex;align-items:center;gap:8px}
.crm .crm-filter-toggle span {font-size:11px;opacity:.7}
.crm .crm-filter-toggle:hover {filter:brightness(.97)}
.crm .crm-filter-toggle.is-on {background:var(--green);border-color:var(--green);color:#fff}
.crm .crm-filter-toggle.is-on::before {content:"✓"}
.crm-customers {max-width:1000px;background:#fff;border:1px solid var(--line);border-radius:12px;overflow:hidden;grid-column:1/-1}
.crm-customers-head,.crm .crm-customer-row {display:grid;grid-template-columns:minmax(0,1.6fr) minmax(0,1.2fr) 70px minmax(0,1.2fr) 120px 28px;gap:12px;align-items:center;padding:12px 16px}
.crm-customers-head {padding:10px 16px;font-size:11px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--ink-4);border-bottom:1px solid var(--line)}
.crm-customers-empty {padding:24px;text-align:center;font-size:13px;color:var(--ink-3)}
.crm-customer {border-bottom:1px solid var(--line-soft)}
.crm-customer:last-child {border-bottom:0}
.crm .crm-customer-row {width:100%;border:0;border-radius:0;background:transparent;text-align:left;font-size:13px;font-weight:400;color:var(--ink);cursor:pointer}
.crm .crm-customer-row:hover {background:var(--panel)}
.crm-cust-cell {min-width:0}
.crm-cust-name {font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.crm-cust-contact {display:block;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.crm-cust-sub {display:block;font-size:12px;color:var(--ink-3);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.crm-cust-num,.crm-cust-won {font-variant-numeric:tabular-nums}
.crm-cust-won {color:var(--ink-2)}
.crm-cust-status {padding:3px 8px;border-radius:5px;font-size:12px;font-weight:600;background:var(--hover);color:var(--ink-3);white-space:nowrap}
.crm-cust-status.is-open {background:var(--green-soft);color:var(--green-800)}
.crm-cust-chevron {color:var(--ink-4);font-size:10px;text-align:center;transition:transform .15s}
.crm-customer-row[aria-expanded="true"] .crm-cust-chevron {transform:rotate(180deg)}
.crm-customer-panel {padding:12px 16px 14px;display:flex;flex-direction:column;gap:6px;background:var(--panel);border-top:1px solid var(--line-soft)}
.crm-customer-cols {display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px;margin-bottom:6px}
.crm-customer-col {display:flex;flex-direction:column;gap:5px;min-width:0}
.crm-customer-label {font-size:11px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--ink-4)}
.crm-customer-contact {font-size:13px;min-width:0}
.crm-customer-location {font-size:13px;color:var(--ink-2)}
.crm .crm-customer-deal {display:grid;grid-template-columns:44px auto minmax(0,1fr) auto;gap:12px;align-items:center;padding:9px 12px;border:1px solid var(--line);border-radius:8px;background:#fff;font-size:13px;color:var(--ink);text-decoration:none;font-weight:400}
.crm .crm-customer-deal:hover {border-color:#b9c2ba}
.crm-cust-year {font-weight:700;color:var(--ink-3);font-variant-numeric:tabular-nums}
.crm-cust-stage {padding:2px 8px;border-radius:5px;font-size:12px;font-weight:600;background:var(--hover);color:var(--ink-2);white-space:nowrap}
.crm-cust-stage.is-won {background:var(--green-soft);color:var(--green-800)}
.crm-cust-stage.is-lost {background:var(--red-soft);color:var(--red)}
.crm-cust-need {display:block;color:var(--ink-2);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.crm-cust-value {font-weight:600;font-variant-numeric:tabular-nums}
@media(max-width:800px) {
  .crm-customers-head,.crm .crm-customer-row {grid-template-columns:minmax(0,1fr) 44px 104px 20px;gap:8px;padding:12px}
  .crm-customers-head span:nth-child(2),.crm-customers-head span:nth-child(4),.crm .crm-customer-row > :nth-child(2),.crm .crm-customer-row > :nth-child(4) {display:none}
  .crm-customer-cols {grid-template-columns:1fr}
  .crm .crm-customer-deal {grid-template-columns:44px minmax(0,1fr) auto;gap:6px 8px}
  .crm .crm-customer-deal .crm-cust-year,.crm .crm-customer-deal .crm-cust-stage {grid-row:1}
  .crm .crm-customer-deal .crm-cust-stage {grid-column:2;justify-self:start}
  .crm .crm-customer-deal .crm-cust-value {grid-column:3;grid-row:1;white-space:nowrap}
  .crm .crm-customer-deal .crm-cust-cell {grid-column:2/4;grid-row:2}
}
.crm-work-card .crm-work-meta {color:var(--muted);font-size:12px}
.crm-work-link {font-weight:600;font-size:14px;text-decoration:underline;text-underline-offset:3px}
.crm-danger {color:var(--red)!important}
/* Idébank: welcome and composer on the left, the team's ideas on the right. */
.crm-ideas {max-width:1100px;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:40px;align-items:start}
.crm-ideas-intro {display:flex;flex-direction:column;gap:22px;min-width:0}
.crm-ideas-welcome {display:flex;flex-direction:column;gap:10px}
.crm-ideas-welcome h2 {margin:0;font-size:24px;font-weight:700;letter-spacing:-.01em}
.crm-ideas-welcome p {margin:0;font-size:14px;line-height:1.6;color:var(--ink-2);max-width:60ch}
.crm-idea-composer {background:#fff;border:1px solid var(--line-input);border-radius:10px;padding:12px 14px;display:flex;flex-direction:column;gap:10px}
.crm-idea-composer:focus-within {border-color:var(--green)}
.crm .crm-idea-composer textarea {border:0;resize:vertical;padding:0;min-height:120px;width:100%;line-height:1.55;font-size:14px;background:transparent;border-radius:0}
.crm .crm-idea-composer textarea:focus-visible {outline:none;box-shadow:none}
.crm-idea-composer-foot {display:flex;align-items:center;gap:8px}
.crm-idea-hint {font-size:12px;color:var(--ink-4)}
.crm .crm-idea-composer .crm-primary.is-idle {opacity:.45}
.crm-ideas-list {display:flex;flex-direction:column;gap:10px;min-width:0}
.crm-ideas-label {font-size:11px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--ink-4)}
.crm-ideas-items {display:flex;flex-direction:column;gap:10px}
.crm-idea {background:#fff;border:1px solid var(--line);border-radius:10px;padding:12px 14px;display:flex;flex-direction:column;gap:8px}
.crm-idea-head {display:flex;align-items:center;gap:8px;font-size:12px;color:var(--ink-3);flex-wrap:wrap}
.crm-idea-avatar {width:22px;height:22px;flex:0 0 22px;border-radius:50%;background:var(--ink);color:#fff;display:grid;place-items:center;font-size:10px;font-weight:700}
.crm-idea-author {font-weight:700;color:var(--ink)}
.crm .crm-idea-action {border:0;background:transparent;font-size:12px;color:var(--ink-3);padding:0;font-weight:500;border-radius:0}
.crm .crm-idea-action:hover {color:var(--ink)}
.crm .crm-idea-action.is-danger:hover {color:var(--red)}
.crm-idea-status {padding:2px 8px;border-radius:5px;font-size:11px;font-weight:600;background:var(--hover);color:var(--ink-2)}
.crm-idea-status.is-done {background:var(--green-soft);color:var(--green-800)}
.crm-idea-status.is-declined {background:var(--red-soft);color:var(--red)}
.crm .crm-idea-status-select {width:auto;padding:2px 6px;font-size:11px;font-weight:600;border-radius:5px;border:1px solid var(--line-input);background:#fff;line-height:1.3}
.crm-idea-text {font-size:14px;line-height:1.55;white-space:pre-wrap;overflow-wrap:anywhere}
@media(max-width:900px) {.crm-ideas {grid-template-columns:1fr;gap:28px}}
.crm-work-files {display:flex;flex-wrap:wrap;gap:10px;margin:10px 0}
.crm-work-files a {text-decoration:underline;text-underline-offset:3px;font-size:12px}
.crm-work-section-title {grid-column:1/-1;font-size:15px;margin:8px 0 0}
.crm-rights-all {margin:0}
.crm-rights-group {margin:0 0 16px}
.crm-rights-group:last-child {margin-bottom:0}
.crm-rights-group h4 {font-size:11px;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);margin:0 0 6px}
.crm-rights-group ul {list-style:none;margin:0;padding:0;border:1px solid var(--line);border-radius:10px;background:#fff}
.crm-rights-group li {border-top:1px solid var(--line)}
.crm-rights-group li:first-child {border-top:0}
.crm-toggle {display:flex;justify-content:space-between;align-items:center;gap:16px;padding:10px 14px;cursor:pointer;border:1px solid var(--line);border-radius:10px;background:#fff}
.crm-rights-group .crm-toggle {border:0;border-radius:0;background:transparent}
.crm-toggle span {display:grid;gap:2px}
.crm-toggle small {color:var(--muted)}
.crm-toggle input {appearance:none;width:38px;height:22px;border-radius:999px;background:#d8ddd8;position:relative;flex:0 0 38px;cursor:pointer;margin:0}
.crm-toggle input::after {content:"";position:absolute;top:3px;left:3px;width:16px;height:16px;border-radius:50%;background:#fff;transition:left .12s}
.crm-toggle input:checked {background:var(--green)}
.crm-toggle input:checked::after {left:19px}
.crm-toggle input:disabled {opacity:.5}
/* Produktionsplan: the prototype's timeline (sticky customer column, 26px day columns, event dots) plus our task cards. */
.crm-filters {display:flex;flex-wrap:wrap;align-items:center;gap:10px 12px;margin-bottom:18px}
.crm .crm-filters input[type="search"] {width:260px;border:1px solid var(--line-input);border-radius:8px;padding:8px 12px;background:#f7f8f6;font-size:14px;line-height:1.3}
.crm .crm-filters select {width:auto;border:1px solid var(--line-input);border-radius:8px;padding:8px 10px;background:#fff;font-size:14px;line-height:1.3}
.crm-work-content .crm-notice {margin:0 0 16px}
.crm-work-list .crm-notice {grid-column:1/-1;display:flex;flex-wrap:wrap;gap:6px 14px;align-items:baseline}
.crm-plan-view {display:block}
.crm-plan {--plan-col:300px;overflow:auto;background:#fff;border:1px solid var(--line);border-radius:12px;position:relative;max-height:calc(100vh - 230px);min-height:180px}
.crm-plan-grid {display:grid;min-width:max-content}
.crm-plan-corner {position:sticky;left:0;top:0;z-index:4;background:#fff;border-right:1px solid var(--line);border-bottom:1px solid var(--line);padding:10px 16px;display:flex;align-items:flex-end;font-size:11px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--ink-4);height:58px;box-sizing:border-box}
.crm-plan-head {position:sticky;top:0;z-index:3;background:#fff;border-bottom:1px solid var(--line);height:58px;box-sizing:border-box}
.crm-plan-months {position:relative;height:26px}
.crm-plan-month {position:absolute;top:6px;padding-left:8px;font-size:12px;font-weight:700;border-left:1px solid var(--line);white-space:nowrap;box-sizing:border-box}
.crm-plan-days {position:relative;height:32px}
.crm-plan-day {position:absolute;top:0;width:26px;height:32px;display:grid;place-items:center;font-size:11px;font-variant-numeric:tabular-nums;color:var(--ink-2)}
.crm-plan-day.is-weekend {color:#b0b6b0}
.crm-plan-day.is-first {font-weight:700}
.crm-plan-day.is-today {background:var(--green);color:#fff;border-radius:6px;font-weight:700}
.crm .crm-plan-cust {position:sticky;left:0;z-index:2;background:#fff;border:0;border-right:1px solid var(--line);border-bottom:1px solid var(--line-soft);border-radius:0;padding:10px 16px;display:flex;align-items:center;gap:10px;cursor:pointer;height:56px;box-sizing:border-box;text-align:left;color:var(--ink);min-width:0;width:100%;font-weight:400}
.crm-plan-cust:hover,.crm-plan-track:hover {background-color:#f7f8f6}
.crm-plan-avatars {display:flex;flex:0 0 auto}
.crm-plan-avatars .crm-avatar {width:26px;height:26px;flex-basis:26px}
.crm-plan-avatars {gap:4px}
.crm-plan-avatars .crm-avatar + .crm-avatar {box-shadow:0 0 0 2px #fff}
.crm-plan-avatars .crm-avatar.is-warn {box-shadow:0 0 0 2px var(--red)}
.crm-plan-text {min-width:0;flex:1;display:block}
.crm-plan-name {display:block;font-size:13px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.crm-plan-line {display:flex;align-items:center;gap:5px;min-width:0}
.crm-plan-chip {font-size:10px;font-weight:600;padding:1px 5px;border-radius:4px;white-space:nowrap}
.crm-plan-chip.is-red {background:var(--red-soft);color:var(--red)}
.crm-plan-chip.is-green {background:var(--green-soft);color:var(--green-800)}
.crm-plan-chip.is-amber {background:#fbf0dc;color:#8a4b00}
.crm-production-note {margin:10px 0 0;font-size:12px;line-height:1.45;color:#a8483a}
.crm-stage-hint {display:block;margin-top:4px;font-size:11px;color:var(--ink-3)}
.crm-plan-need {font-size:12px;color:var(--ink-3);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
.crm-plan-track {position:relative;height:56px;border-bottom:1px solid var(--line-soft);cursor:pointer;background-image:repeating-linear-gradient(90deg,rgba(0,0,0,.025) 0 52px,transparent 52px 182px)}
.crm-plan-span {position:absolute;top:27px;height:2px;background:#cfd9d1}
.crm-plan-event {position:absolute;top:0;height:56px;display:flex;align-items:center;gap:6px;transform:translateX(-7px)}
.crm-plan-dot {width:14px;height:14px;border-radius:50%;border:2px solid #fff;flex:0 0 14px;box-sizing:content-box}
.crm-plan-label {font-size:12px;white-space:nowrap;background:rgba(255,255,255,.9);padding:2px 6px;border-radius:4px;color:var(--ink)}
.crm-plan-label strong {font-weight:700}
.crm-plan-label span {color:var(--ink-3)}
.crm-plan-event.is-done {opacity:.55}
.crm-plan-event.is-cancelled {opacity:.4}
.crm-plan-event.is-cancelled .crm-plan-label {text-decoration:line-through}
.crm-plan-event.is-overdue .crm-plan-label span {color:var(--red);font-weight:600}
.crm-plan-empty {display:grid;justify-items:center;gap:10px;padding:40px 28px;max-width:520px;margin:0 auto}
.crm-plan-empty strong {font-size:16px;color:var(--ink)}
.crm-plan-empty p {margin:0}
.crm-job-head {display:flex;gap:8px;align-items:center;margin-bottom:8px;flex-wrap:wrap}
.crm-job-kind {font-size:11px;font-weight:700;padding:2px 7px;border-radius:4px;background:var(--green-soft);color:var(--green-800)}
.crm-job-kind.is-pickup {background:#f6efe2;color:#7a4f12}
.crm-job-status {font-size:11px;font-weight:600;color:var(--ink-3)}
.crm-job-status.is-done {color:var(--green)}
.crm-job-status.is-cancelled {color:var(--red)}
.crm-job-when {font-weight:600}
.crm .crm-job-invoice {display:flex;gap:8px;align-items:center;font-size:12px;font-weight:400;color:var(--ink-2);margin:10px 0 0;cursor:pointer}
.crm-job-invoice input {margin:0}
@media(max-width:800px) {
  .crm-plan {--plan-col:200px;max-height:none}
  .crm .crm-plan-cust {padding:8px 12px}
  .crm-plan-need {display:none}
  .crm .crm-filters input[type="search"] {width:100%}
}
.crm-work-actions {align-items:center}
.crm-work-actions .crm-work-link {font-size:12px}
.crm-work-mobile button {white-space:nowrap}
.crm-field-error:empty {display:none}
/* Login: the prototype's centred card — logo, “CRM & produktionsplan”, two fields and a full-width button. */
.crm-auth {display:flex;align-items:center;justify-content:center;min-height:100vh;padding:24px;background:var(--page)}
.crm-auth-box {width:100%;max-width:380px;background:#fff;border:1px solid var(--line);border-radius:12px;padding:32px;display:grid;gap:18px}
.crm-auth-brand {display:flex;flex-direction:column;align-items:center;gap:8px;text-align:center}
.crm-auth-brand small {font-size:12px;color:var(--ink-3)}
.crm-auth-logo {width:150px;height:auto;display:block;margin:0}
.crm-sr-only {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.crm-auth-box form {display:grid;gap:18px}
.crm-auth-box label {display:grid;gap:6px;font-size:13px;font-weight:600}
.crm-auth-box .crm-primary {justify-self:stretch;text-decoration:none;padding:12px;font-size:14px}
.crm-auth-link {justify-self:center;font-size:13px;color:var(--ink-3);text-decoration:underline;text-underline-offset:3px}
.crm-auth-link:hover {color:var(--ink)}
.crm-auth-note {margin:0;font-size:13px;line-height:1.5;color:var(--ink-2)}
/* Deal drawer: prototype anatomy — head with chips, summary row, action row, 2fr/3fr body, activity column. */
@keyframes crm-slide-in {
    from {transform:translateX(40px);opacity:0}
    to {transform:none;opacity:1}
}
@keyframes crm-fade-in {
    from {opacity:0}
    to {opacity:1}
}
.crm dialog {
    color:var(--ink);
    font:inherit;
    border:0;
    padding:0;
    background:#fff
}
.crm dialog::backdrop {
    background:rgba(20,24,21,.35);
    animation:crm-fade-in .15s
}
.crm dialog:focus,.crm dialog[tabindex]:focus-visible {
    outline:none
}
.crm-drawer {
    position:fixed;
    inset:0 0 0 216px;
    z-index:80;
    margin:0;
    width:auto;
    max-width:none;
    height:auto;
    max-height:none;
    display:none;
    flex-direction:column;
    box-shadow:-12px 0 40px rgba(0,0,0,.14);
    animation:crm-slide-in .2s ease-out;
    overflow:hidden
}
.crm-drawer[open] {
    display:flex
}
.crm-drawer-backdrop {
    position:fixed;
    inset:0 0 0 216px;
    z-index:79;
    background:rgba(20,24,21,.28)
}
.crm-drawer-head {
    flex:0 0 auto;
    padding:18px 24px 14px;
    border-bottom:1px solid var(--line);
    display:flex;
    flex-direction:column;
    gap:12px
}
.crm-drawer-titlerow {
    display:flex;
    align-items:flex-start;
    gap:12px
}
.crm-drawer-titles {
    min-width:0;
    flex:1
}
.crm-drawer-chips {
    display:flex;
    align-items:center;
    gap:8px;
    flex-wrap:wrap
}
.crm-drawer-chips h2 {
    font-size:20px;
    font-weight:700;
    overflow-wrap:anywhere
}
.crm-chip {
    padding:3px 8px;
    border-radius:5px;
    font-size:12px;
    font-weight:600;
    background:var(--hover);
    color:var(--ink-2);
    white-space:nowrap
}
.crm-chip.is-green {
    background:var(--green-soft);
    color:var(--green-800)
}
.crm-chip.is-red {
    background:var(--red-soft);
    color:var(--red)
}
.crm-chip.is-muted {
    background:var(--page);
    color:var(--ink-3)
}
.crm-chip.is-amber {
    background:#fff9ee;
    color:#8a4b00
}
.crm-unplanned {
    display:inline-flex;
    align-items:center;
    gap:6px;
    font-size:12px;
    font-weight:700;
    color:var(--red)
}
.crm-drawer-meta {
    font-size:13px;
    color:var(--ink-3);
    margin-top:4px
}
.crm-summary {
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:12px
}
.crm-summary-block {
    display:flex;
    flex-direction:column;
    gap:4px;
    min-width:0
}
.crm-eyebrow {
    font-size:11px;
    font-weight:600;
    letter-spacing:.06em;
    text-transform:uppercase;
    color:var(--ink-4);
    margin:0
}
.crm-summary-value {
    font-size:15px;
    font-weight:700;
    font-variant-numeric:tabular-nums;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap
}
.crm .crm-summary-block select {
    width:100%;
    border:1px solid var(--line-input);
    border-radius:7px;
    padding:6px 8px;
    background:#fff;
    font-weight:600;
    font-size:13px;
    line-height:1.3
}
.crm .crm-summary-block label {
    margin:0;
    display:block
}
.crm-next {
    text-align:left;
    border:0;
    border-radius:7px;
    padding:6px 10px;
    display:flex;
    flex-direction:column;
    gap:2px;
    min-width:0;
    background:var(--page);
    color:var(--ink-3)
}
.crm-next .crm-eyebrow {
    color:inherit;
    opacity:.8
}
.crm-next-text {
    font-size:13px;
    font-weight:700;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
    max-width:100%
}
.crm-next.is-plain {
    background:var(--hover);
    color:var(--ink-3)
}
.crm-next.is-overdue {
    background:var(--red-soft);
    color:var(--red)
}
.crm-next.is-today {
    background:#fff3e0;
    color:var(--red)
}
.crm-next:hover:not(:disabled) {
    filter:brightness(.97)
}
.crm-next:disabled {
    opacity:1;
    cursor:default
}
.crm-drawer-actions {
    display:flex;
    gap:8px;
    flex-wrap:wrap;
    align-items:center
}
.crm-drawer-actions .crm-secondary,.crm-drawer-actions .crm-primary,.crm-drawer-actions .crm-outline-green {
    display:inline-flex;
    align-items:center;
    line-height:1.3
}
.crm .crm-outline-green {
    background:#fff;
    color:var(--green-800);
    border:1px solid var(--green);
    border-radius:8px;
    padding:9px 14px;
    font-size:13px;
    font-weight:600
}
.crm-outline-green:hover {
    background:var(--green-soft)
}
.crm-secondary.is-positive:hover {
    background:var(--green-soft);
    border-color:var(--green)!important
}
.crm-secondary.is-lost,.crm-secondary.is-quiet {
    color:var(--ink-3)
}
.crm-secondary.is-lost:hover {
    background:var(--red-soft);
    color:var(--red)
}
.crm-secondary.is-quiet:hover {
    color:var(--ink)
}
.crm-secondary.is-danger {
    color:var(--red)
}
.crm-secondary.is-danger:hover {
    background:var(--red-soft);
    border-color:var(--red)!important
}
.crm-drawer-body {
    flex:1;
    min-height:0;
    overflow:auto;
    display:grid;
    grid-template-columns:minmax(0,2fr) minmax(0,3fr)
}
.crm-drawer-info {
    padding:20px 24px;
    border-right:1px solid var(--line);
    display:flex;
    flex-direction:column;
    gap:22px;
    min-width:0
}
.crm-drawer-info section {
    margin:0
}
.crm-drawer-info h3,.crm-drawer-activity h3 {
    margin:0 0 10px;
    font-size:11px;
    font-weight:600;
    letter-spacing:.06em;
    text-transform:uppercase;
    color:var(--ink-4)
}
.crm-dl {
    margin:0;
    display:grid;
    grid-template-columns:110px minmax(0,1fr);
    row-gap:8px;
    column-gap:12px;
    font-size:13px
}
.crm-dl-wide {
    grid-template-columns:150px minmax(0,1fr)
}
.crm-dl dt {
    color:var(--ink-3)
}
.crm-dl dd {
    margin:0;
    font-weight:600;
    min-width:0;
    overflow-wrap:break-word;
    white-space:pre-wrap
}
.crm-dl dd a {
    color:var(--green);
    font-weight:600
}
.crm-dl dd a:hover {
    color:var(--green-800)
}
.crm-muted {
    font-size:13px;
    color:var(--ink-4)
}
.crm-customer-card {
    width:100%;
    display:flex;
    align-items:center;
    gap:10px;
    border:1px solid var(--line);
    border-radius:9px;
    background:#fff;
    padding:10px 12px;
    text-align:left
}
.crm-customer-card:hover {
    border-color:#b9c2ba;
    background:var(--panel)
}
.crm-customer-text {
    flex:1;
    min-width:0
}
.crm-customer-name {
    display:block;
    font-size:13px;
    font-weight:700;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap
}
.crm-customer-line {
    display:block;
    font-size:12px;
    color:var(--ink-3);
    margin-top:2px;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap
}
.crm-customer-open {
    flex:0 0 auto;
    font-size:12px;
    font-weight:600;
    color:var(--green-800);
    white-space:nowrap
}
.crm-section-actions {
    margin-top:8px;
    display:flex;
    gap:12px
}
.crm-text-quiet {
    border:0;
    background:transparent;
    font-size:12px;
    color:var(--ink-3);
    padding:6px 2px;
    font-weight:600;
    text-decoration:underline
}
.crm-text-quiet:hover {
    color:var(--ink)
}
.crm-text-green {
    border:0;
    background:transparent;
    color:var(--green);
    font-size:12px;
    font-weight:600;
    padding:0
}
.crm-file-list {
    list-style:none;
    padding:0;
    margin:0 0 8px;
    display:flex;
    flex-direction:column;
    gap:6px
}
.crm-file-list:empty {
    margin:0
}
.crm-file-row {
    display:flex;
    align-items:center;
    flex-wrap:wrap;
    gap:6px 10px;
    border:1px solid var(--line);
    border-radius:8px;
    background:#fff;
    padding:8px 10px
}
.crm-file-open {
    display:flex;
    align-items:center;
    gap:10px;
    flex:1 1 140px;
    min-width:120px;
    color:inherit
}
.crm-file-open:hover {
    opacity:.75
}
.crm-file-thumb {
    width:34px;
    height:34px;
    flex:0 0 34px;
    border-radius:6px;
    background:var(--hover);
    color:var(--ink-2);
    display:grid;
    place-items:center;
    font-size:9px;
    font-weight:700;
    overflow:hidden
}
.crm-file-text {
    flex:1;
    min-width:0
}
.crm-file-name {
    display:block;
    font-size:13px;
    font-weight:600;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap
}
.crm-file-meta {
    display:block;
    font-size:11.5px;
    color:var(--ink-3);
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap
}
.crm-file-actions {
    display:flex;
    align-items:center;
    gap:4px;
    margin-left:auto
}
.crm-file-remove {
    border:0;
    background:transparent;
    color:var(--ink-4);
    font-size:12px;
    font-weight:600;
    padding:4px 6px;
    border-radius:6px;
    white-space:nowrap
}
.crm-file-remove:hover {
    background:var(--red-soft);
    color:var(--red)
}
.crm-dropzone {
    display:flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    border:1px dashed var(--line-input);
    background:#fff;
    border-radius:8px;
    padding:12px;
    font-size:12.5px;
    font-weight:400;
    color:var(--ink-3);
    cursor:pointer;
    text-align:center;
    margin:0
}
.crm-dropzone:hover {
    border-color:var(--ink-4);
    color:var(--ink-2)
}
.crm-dropzone.is-drag {
    border-color:var(--green);
    background:var(--green-soft)
}
.crm-dropzone b {
    font-weight:700;
    color:var(--green-800)
}
.crm .crm-dropzone input {
    display:none
}
.crm-pickup-missing {
    margin-top:12px;
    border:1px dashed #d9bdb7;
    border-radius:10px;
    padding:10px 12px;
    display:flex;
    flex-direction:column;
    gap:8px
}
.crm-pickup-title {
    display:flex;
    align-items:center;
    gap:6px;
    font-size:12.5px;
    font-weight:650;
    color:#a8483a
}
.crm-pickup-dot {
    width:6px;
    height:6px;
    border-radius:50%;
    border:1px solid currentColor
}
.crm .crm-pickup-missing label {
    display:flex;
    flex-direction:column;
    gap:5px;
    font-size:12px;
    font-weight:600;
    color:var(--ink-2);
    margin:0
}
.crm .crm-pickup-missing input {
    padding:8px 10px;
    font-size:13px;
    font-weight:400
}
.crm-steps {
    list-style:none;
    margin:0;
    padding:0;
    display:flex;
    flex-direction:column;
    border:1px solid var(--line);
    border-radius:10px;
    overflow:hidden
}
.crm-step-row {
    display:flex;
    align-items:center;
    gap:10px;
    padding:9px 12px;
    border-bottom:1px solid var(--hover);
    font-size:13px;
    background:#fff
}
.crm-step-row:last-child {
    border-bottom:0
}
.crm-step-check {
    width:16px;
    height:16px;
    border-radius:50%;
    flex:0 0 16px;
    display:grid;
    place-items:center;
    background:#fff;
    border:1.5px solid #c9cfc9;
    color:#fff;
    font-size:10px;
    font-weight:700
}
.crm-step-row.is-done .crm-step-check {
    background:var(--green);
    border-color:var(--green)
}
.crm-step-body {
    min-width:0;
    flex:1
}
.crm-step-label {
    display:block;
    font-weight:500;
    color:var(--ink-3)
}
.crm-step-row.is-done .crm-step-label {
    font-weight:700;
    color:var(--green-800)
}
.crm-step-sub {
    display:block;
    font-size:11px;
    color:var(--ink-4)
}
.crm-step-sub:empty {
    display:none
}
.crm .crm-step-button {
    border:1px solid var(--line-input);
    background:#fff;
    border-radius:7px;
    padding:5px 10px;
    font-size:12px;
    font-weight:600;
    white-space:nowrap
}
.crm-step-button:hover:not(:disabled) {
    background:var(--green-soft);
    border-color:var(--green)
}
.crm-step-undo {
    border:0;
    background:transparent;
    font-size:11px;
    color:var(--ink-4);
    padding:4px 6px
}
.crm-step-undo:hover:not(:disabled) {
    color:var(--red)
}
.crm-production-box {
    border:1px solid #cfe0d4;
    background:#f2f8f4;
    border-radius:10px;
    padding:12px 14px;
    display:flex;
    flex-direction:column;
    gap:10px
}
.crm-production-jobs {
    list-style:none;
    margin:0;
    padding:0;
    display:flex;
    flex-direction:column;
    gap:10px
}
.crm-production-row {
    display:flex;
    align-items:center;
    gap:10px;
    font-size:13px;
    flex-wrap:wrap
}
.crm-production-dot {
    width:10px;
    height:10px;
    flex:0 0 10px;
    border-radius:50%;
    background:var(--green)
}
.crm-production-row.is-pickup .crm-production-dot {
    background:#b0741e
}
.crm-production-date {
    font-weight:700;
    width:90px
}
.crm-production-label {
    font-weight:600
}
.crm-production-meta {
    color:var(--ink-3)
}
.crm-production-foot {
    display:flex;
    align-items:center;
    gap:10px;
    font-size:13px;
    padding-top:8px;
    border-top:1px solid #cfe0d4
}
.crm-production-foot:has(a[hidden]) {
    display:none
}
.crm-amber-dashed {
    border:1px dashed #e7b96f;
    background:#fff9ee;
    border-radius:10px;
    padding:12px 14px;
    font-size:13px;
    color:#8a4b00;
    line-height:1.45
}
.crm-drawer-activity {
    padding:20px 24px;
    display:flex;
    flex-direction:column;
    gap:14px;
    background:var(--panel);
    min-width:0
}
.crm-drawer-activity h3 {
    margin:0
}
.crm-composer {
    background:#fff;
    border:1px solid var(--line-input);
    border-radius:10px;
    padding:10px 12px;
    display:flex;
    flex-direction:column;
    gap:8px
}
.crm-composer:focus-within {
    border-color:var(--green)
}
.crm .crm-composer textarea {
    border:0;
    resize:vertical;
    padding:0;
    min-height:88px;
    width:100%;
    line-height:1.5;
    font-size:14px;
    border-radius:0
}
.crm .crm-composer textarea:focus-visible {
    outline:none
}
.crm-composer-foot {
    display:flex;
    align-items:center;
    gap:8px
}
.crm-composer-hint {
    font-size:12px;
    color:var(--ink-4)
}
.crm-composer .crm-text-quiet {
    text-decoration:none;
    font-weight:400;
    padding:6px 8px
}
.crm .crm-black {
    background:var(--ink);
    color:#fff;
    border:0;
    border-radius:7px;
    padding:7px 12px;
    font-size:12px;
    font-weight:600
}
.crm .crm-black.is-empty {
    opacity:.45
}
.crm-timeline {
    list-style:none;
    margin:0;
    padding:0;
    display:flex;
    flex-direction:column
}
.crm-timeline-item {
    display:grid;
    grid-template-columns:22px minmax(0,1fr);
    column-gap:10px;
    padding-bottom:16px;
    position:relative
}
.crm-timeline-rail {
    display:flex;
    flex-direction:column;
    align-items:center
}
.crm-timeline-dot {
    width:10px;
    height:10px;
    border-radius:50%;
    margin-top:5px;
    flex:0 0 10px;
    background:#fff;
    border:2px solid #b0b6b0
}
.crm-timeline-item.is-note .crm-timeline-dot,.crm-timeline-item.is-message .crm-timeline-dot {
    background:var(--green);
    border-color:var(--green)
}
.crm-timeline-line {
    flex:1;
    width:1px;
    background:var(--line);
    margin-top:4px
}
.crm-timeline-note {
    background:#fff;
    border:1px solid var(--line);
    border-radius:10px;
    padding:10px 12px;
    display:flex;
    flex-direction:column;
    gap:6px;
    min-width:0
}
.crm-timeline-meta {
    display:flex;
    align-items:center;
    gap:8px;
    font-size:12px;
    color:var(--ink-3);
    flex-wrap:wrap
}
.crm-timeline-author {
    font-weight:700;
    color:var(--ink)
}
.crm-timeline-action {
    border:0;
    background:transparent;
    font-size:12px;
    color:var(--ink-3);
    padding:0
}
.crm-timeline-action:hover:not(:disabled) {
    color:var(--ink)
}
.crm-timeline-action.is-danger:hover:not(:disabled) {
    color:var(--red)
}
.crm-timeline-text {
    font-size:13px;
    line-height:1.5;
    white-space:pre-wrap;
    overflow-wrap:anywhere
}
.crm-timeline-system {
    padding:4px 0 0;
    font-size:12px;
    color:var(--ink-3);
    line-height:1.5;
    overflow-wrap:anywhere
}
.crm-timeline-system b {
    color:var(--ink);
    font-weight:600
}
.crm-timeline-empty {
    font-size:13px;
    color:var(--ink-4)
}
.crm-draft-bar {
    flex:0 0 auto;
    background:#fff;
    border-top:1px solid var(--line);
    padding:12px 24px;
    display:flex;
    gap:16px;
    align-items:center;
    justify-content:space-between;
    z-index:2
}
.crm-draft-bar details {
    max-width:60%;
    overflow-wrap:anywhere;
    font-size:13px
}
.crm-draft-bar ul {
    max-height:140px;
    overflow:auto;
    padding-left:20px;
    margin:6px 0 0
}
.crm-draft-bar summary {
    cursor:pointer;
    font-weight:600
}
.crm-draft-bar>div {
    display:flex;
    align-items:center;
    gap:8px;
    flex-wrap:wrap
}
.crm-draft-bar button[aria-busy="true"] {
    cursor:wait
}
.crm-drawer-error {
    margin:0 24px 12px
}
/* Small dialogs and the toast follow the prototype's modal shell. */
.crm-modal {
    width:min(620px,94vw);
    max-height:90vh;
    border-radius:14px;
    box-shadow:0 24px 60px rgba(0,0,0,.2)
}
.crm-modal-sm {
    width:min(520px,94vw)
}
.crm-modal-header {
    padding:18px 22px 12px;
    display:flex;
    align-items:flex-start;
    gap:12px
}
.crm-modal-header>div {
    flex:1
}
.crm-modal h2 {
    font-size:17px;
    font-weight:700
}
.crm-modal-header p {
    font-size:13px;
    color:var(--ink-3);
    line-height:1.45;
    margin-top:4px
}
.crm-modal-body {
    padding:4px 22px 6px;
    display:flex;
    flex-direction:column;
    gap:18px
}
.crm .crm-modal-body label,.crm .crm-modal-body legend {
    display:flex;
    flex-direction:column;
    gap:5px;
    font-size:12px;
    font-weight:600;
    color:var(--ink-2);
    margin:0
}
.crm .crm-modal-body legend {
    display:block;
    margin-bottom:8px;
    font-size:11px;
    letter-spacing:.06em;
    text-transform:uppercase;
    color:var(--ink-4)
}
.crm .crm-modal-body .crm-fieldset {
    margin:0;
    display:flex;
    flex-direction:column;
    gap:10px
}
.crm .crm-modal-body input,.crm .crm-modal-body textarea {
    font-size:14px;
    font-weight:400
}
.crm-modal-body .crm-help {
    margin:0
}
.crm-modal-footer {
    display:flex;
    align-items:center;
    gap:8px;
    padding:6px 22px 20px;
    margin-top:12px;
    border-top:1px solid var(--hover);
    position:static;
    background:#fff
}
.crm-modal-footer>.crm-primary,.crm-modal-footer>.crm-secondary {
    padding:9px 16px
}
/* The Vundet dialog offers up to four choices: they wrap as whole buttons, never inside a label. */
#crm-won-dialog .crm-modal-footer {flex-wrap:wrap}
#crm-won-dialog .crm-modal-footer>button {white-space:nowrap}
.crm-primary.is-destructive {
    background:var(--red)
}
.crm-primary.is-destructive:hover {
    background:#9d3020
}
.crm-chips {
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    padding-top:2px
}
.crm .crm-chip-toggle {
    padding:7px 12px;
    border-radius:20px;
    font-size:13px;
    font-weight:500;
    border:1px solid var(--line-input);
    background:#fff;
    color:var(--ink-2)
}
.crm .crm-chip-toggle.is-on {
    border-color:var(--green);
    background:var(--green-soft);
    color:var(--green-800)
}
.crm .crm-chip-toggle.is-lost.is-on {
    border-color:var(--red);
    background:var(--red-soft);
    color:var(--red)
}
.crm-summary-box {
    border:1px solid var(--line);
    border-radius:10px;
    background:var(--panel);
    padding:14px 16px
}
.crm-summary-box dl {
    margin:0;
    display:grid;
    grid-template-columns:170px minmax(0,1fr);
    row-gap:8px;
    column-gap:12px;
    font-size:13px
}
.crm-summary-box dt {
    color:var(--ink-3)
}
.crm-summary-box dd {
    margin:0;
    font-weight:600;
    overflow-wrap:break-word
}
.crm-footnote {
    font-size:12px;
    color:var(--ink-3);
    line-height:1.5
}
.crm-toast {
    position:fixed;
    left:50%;
    bottom:24px;
    transform:translateX(-50%);
    z-index:100;
    background:var(--ink);
    color:#fff;
    padding:10px 16px;
    border-radius:10px;
    font-size:13px;
    font-weight:600;
    box-shadow:0 8px 24px rgba(0,0,0,.2);
    animation:crm-pop .2s ease-out;
    display:flex;
    gap:12px;
    align-items:center;
    max-width:min(92vw,560px)
}
.crm-toast button {
    border:0;
    background:transparent;
    color:#9fd3b1;
    font-weight:700;
    font-size:13px;
    padding:0;
    white-space:nowrap
}
@media(max-width:1100px) {
    .crm-drawer,.crm-drawer-backdrop {
        inset:0
    }
}
@media(max-width:900px) {
    .crm-drawer-body {
        grid-template-columns:minmax(0,1fr)
    }
    .crm-drawer-info {
        border-right:0;
        border-bottom:1px solid var(--line)
    }
    .crm-summary {
        grid-template-columns:repeat(2,minmax(0,1fr))
    }
}
@media(max-width:500px) {
    .crm-drawer-head {
        padding:14px 16px 12px
    }
    .crm-drawer-info,.crm-drawer-activity {
        padding:16px
    }
    .crm-draft-bar {
        padding:12px 16px;
        align-items:stretch;
        flex-direction:column
    }
    .crm-draft-bar details {
        max-width:100%
    }
    .crm-dl,.crm-dl-wide {
        grid-template-columns:110px minmax(0,1fr)
    }
    .crm-summary-box dl {
        grid-template-columns:120px minmax(0,1fr)
    }
    .crm-toast {
        left:16px;
        right:16px;
        transform:none;
        max-width:none
    }
}
/* Deal form: prototype field primitives, customer match box, linked box, section hints, chips. */
.crm .crm-field {
    display:flex;
    flex-direction:column;
    gap:5px;
    min-width:0
}
.crm .crm-field label,.crm-field-label {
    display:block;
    font-size:12px;
    font-weight:600;
    color:var(--ink-2);
    margin:0
}
.crm .crm-modal-body .crm-field-grid {
    gap:10px 12px
}
.crm .crm-modal-body .crm-field-grid+.crm-field-grid {
    margin-top:10px
}
.crm .crm-modal-body select {
    font-size:14px;
    font-weight:400
}
.crm-section-hint {
    font-size:12px;
    line-height:1.45;
    color:#a8483a;
    background:var(--red-soft);
    border-radius:8px;
    padding:8px 10px
}
.crm-dupes {
    border:1px solid var(--line-input);
    background:var(--panel);
    border-radius:10px;
    padding:10px 14px;
    display:flex;
    flex-direction:column;
    gap:8px;
    margin-top:10px
}
.crm-dupes-title {
    font-size:13px;
    font-weight:600;
    color:var(--ink-2)
}
.crm-dupes-hint {
    font-size:12px;
    line-height:1.45;
    color:var(--ink-3);
    margin-top:-4px
}
.crm-dupes-rows {
    display:flex;
    flex-direction:column;
    gap:8px
}
.crm-dupes-rows:empty {
    display:none
}
.crm-dupe-row {
    display:flex;
    align-items:center;
    gap:10px;
    font-size:13px
}
.crm-dupe-text {
    flex:1;
    min-width:0
}
.crm-dupe-name {
    font-weight:700
}
.crm-dupe-meta {
    font-size:12px;
    color:var(--ink-3);
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap
}
.crm .crm-dupe-use {
    border:1px solid var(--ink);
    background:#fff;
    color:var(--ink);
    border-radius:7px;
    padding:6px 10px;
    font-size:12px;
    font-weight:600;
    white-space:nowrap
}
.crm .crm-dupe-use:hover {
    background:var(--hover)
}
.crm-dupes .crm-text-quiet {
    align-self:flex-start;
    padding:0
}
.crm-linked-box {
    display:flex;
    align-items:center;
    gap:10px;
    border:1px solid #cfe1d5;
    background:var(--green-soft);
    border-radius:10px;
    padding:10px 14px;
    font-size:13px;
    color:var(--green-800);
    margin-top:10px
}
.crm-linked-box.is-new {
    border-color:var(--line-input);
    background:var(--panel);
    color:var(--ink-2)
}
.crm-linked-text {
    flex:1;
    min-width:0
}
.crm-linked-text strong {
    display:block;
    font-weight:700
}
.crm-linked-text small {
    display:block;
    font-size:12px;
    opacity:.85;
    color:inherit
}
.crm .crm-linked-action {
    border:0;
    background:transparent;
    color:inherit;
    font-size:12px;
    font-weight:600;
    text-decoration:underline;
    white-space:nowrap;
    padding:0
}
.crm .crm-modal-body label.crm-chip-toggle {
    display:inline-flex;
    flex-direction:row;
    align-items:center;
    position:relative;
    font-size:13px;
    font-weight:500;
    color:var(--ink-2);
    cursor:pointer
}
.crm .crm-chip-check input {
    position:absolute;
    opacity:0;
    width:1px;
    height:1px;
    margin:0;
    pointer-events:none
}
.crm .crm-chip-check:has(input:checked) {
    border-color:var(--green);
    background:var(--green-soft);
    color:var(--green-800)
}
.crm .crm-chip-check:has(input:focus-visible) {
    outline:2px solid var(--green);
    outline-offset:2px
}
.crm #crm-previous {
    margin-top:10px;
    align-self:flex-start
}
/* I dag: grouped action rows (prototype), header segment Mine/Alle. */
.crm-segment {
    display:inline-flex;
    border:1px solid var(--line-input);
    border-radius:8px;
    overflow:hidden
}
.crm .crm-segment button {
    border:0;
    border-left:1px solid var(--line-input);
    padding:7px 14px;
    font-size:12px;
    font-weight:500;
    background:#fff;
    color:var(--ink-2)
}
.crm .crm-segment button:first-child {
    border-left:0
}
.crm .crm-segment button:hover {
    background:var(--hover)
}
.crm .crm-segment button.is-on {
    background:var(--ink);
    color:#fff;
    font-weight:700
}
.crm-today {
    max-width:900px;
    display:flex;
    flex-direction:column;
    gap:26px
}
.crm-today-group {
    display:flex;
    flex-direction:column;
    gap:8px
}
.crm-today-head {
    display:flex;
    align-items:baseline;
    gap:8px;
    padding:0 2px
}
.crm-today-head h2 {
    margin:0;
    font-size:11px;
    font-weight:600;
    letter-spacing:.06em;
    text-transform:uppercase;
    color:var(--ink-2)
}
.crm-today-count {
    font-size:11px;
    color:var(--ink-4)
}
.crm-today-group.is-overdue h2,.crm-today-group.is-overdue .crm-today-due {
    color:var(--red)
}
.crm-today-group.is-today h2,.crm-today-group.is-today .crm-today-due {
    color:var(--green-800)
}
.crm-today-group.is-amber h2,.crm-today-group.is-amber .crm-today-due {
    color:#8a4b00
}
.crm-today-row {
    background:#fff;
    border:1px solid var(--line);
    border-radius:10px;
    padding:12px 14px;
    display:grid;
    grid-template-columns:70px minmax(0,1fr) auto auto;
    gap:14px;
    align-items:center
}
.crm-today-due {
    font-size:12px;
    font-weight:700;
    font-variant-numeric:tabular-nums;
    color:var(--ink-2)
}
.crm-today-body {
    min-width:0
}
.crm-today-action {
    font-size:14px;
    font-weight:700;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap
}
.crm-today-meta {
    font-size:12px;
    color:var(--ink-3);
    margin-top:2px;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap
}
.crm-today-meta b {
    font-weight:600;
    color:var(--ink-2)
}
.crm-today-actions {
    display:flex;
    gap:6px
}
.crm .crm-today-btn {
    display:inline-flex;
    align-items:center;
    background:#fff;
    border:1px solid var(--line-input);
    border-radius:8px;
    padding:7px 11px;
    font-size:12px;
    font-weight:600;
    color:var(--ink);
    white-space:nowrap;
    line-height:1.3
}
.crm .crm-today-btn:hover {
    background:var(--hover)
}
.crm .crm-today-btn.is-positive:hover {
    background:var(--green-soft);
    border-color:var(--green)
}
.crm-empty-box {
    border:1px dashed var(--line-input);
    border-radius:10px;
    padding:28px;
    text-align:center;
    font-size:13px;
    color:var(--ink-3);
    line-height:1.5;
    background:#fff
}
@media(max-width:700px) {
    .crm-today-row {
        grid-template-columns:70px minmax(0,1fr) auto
    }
    .crm-today-actions {
        grid-column:1/-1;
        justify-content:flex-end
    }
    /* Phones: the action and the deal line wrap instead of being cut (review round 2). */
    .crm-today-action,.crm-today-meta {
        white-space:normal
    }
}
/* Arkiv: the prototype's archive rows. */
.crm-archive-view {display:block}
.crm-archive {max-width:980px;display:flex;flex-direction:column;gap:12px}
.crm-archive-row {background:#fff;border:1px solid var(--line);border-radius:10px;padding:14px 16px;display:flex;align-items:center;gap:16px;flex-wrap:wrap}
.crm-archive-main {min-width:180px;flex:1}
.crm-archive-name {font-size:15px;font-weight:700}
.crm-archive-meta,.crm-archive-by {font-size:12px;color:var(--ink-3)}
.crm-archive-meta {margin-top:3px}
.crm-archive-by {min-width:170px}
.crm-archive-actions {display:flex;gap:8px}
.crm .crm-archive-actions .crm-secondary {padding:8px 12px}
.crm .crm-archive-actions .crm-secondary:hover {background:var(--green-soft);border-color:var(--green)!important}
.crm .crm-archive-actions .crm-danger:hover {background:var(--red-soft);border-color:var(--red)!important}
.crm-archive-hint {font-size:12px;color:var(--ink-4);padding:2px 2px 0}
/* Administration: tabs Brugere · Pipelines · Logs (prototype), user table, pipeline cards and the activity log. */
.crm .crm-segment a {border:0;border-left:1px solid var(--line-input);padding:7px 14px;font-size:12px;font-weight:500;background:#fff;color:var(--ink-2);text-decoration:none;display:inline-block;line-height:normal}
.crm .crm-segment a:first-child {border-left:0}
.crm .crm-segment a:hover {background:var(--hover)}
.crm .crm-segment a.is-on {background:var(--ink);color:#fff;font-weight:700}
.crm-admin-view {display:block}
.crm-admin {max-width:960px;display:flex;flex-direction:column;gap:14px}
.crm-admin-head {display:flex;align-items:center;gap:12px}
.crm-admin-count {font-size:14px;font-weight:700}
.crm-admin-hint {font-size:12px;color:var(--ink-3);line-height:1.5;max-width:640px}
.crm-admin-label {font-size:11px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--ink-4);margin-bottom:8px}
.crm-admin-chip {padding:3px 8px;border-radius:5px;font-size:12px;font-weight:600;white-space:nowrap;display:inline-flex;align-items:center}
.crm-admin-chip.is-soft {background:#f3f4f2;color:var(--ink-2)}
.crm-admin-chip.is-strong {border:1px solid var(--line)}
.crm-admin-chip.is-green {background:var(--green-soft);color:var(--green-800);border:1px solid #cfe0d4}
.crm-admin-chip.is-outline {background:#fff;border:1px solid var(--line);color:var(--ink-3);font-weight:500}
.crm-admin-chip.is-red {background:var(--red-soft);color:var(--red)}
.crm-users {background:#fff;border:1px solid var(--line);border-radius:12px;overflow:hidden}
.crm-users-head,.crm-user-row {display:grid;grid-template-columns:minmax(0,1.6fr) minmax(0,1fr) minmax(0,1.4fr) 100px;gap:12px;align-items:center;padding:12px 16px}
.crm-users-head {padding:10px 16px;font-size:11px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--ink-4);border-bottom:1px solid var(--line)}
.crm-user-row {border-bottom:1px solid var(--line-soft);font-size:13px}
.crm-user-row:last-child {border-bottom:0}
.crm-user-row.is-inactive .crm-user-who {opacity:.6}
.crm-user-who {display:flex;align-items:center;gap:10px;min-width:0}
.crm-user-avatar {width:30px;height:30px;border-radius:50%;flex:0 0 30px;display:grid;place-items:center;font-size:11px;font-weight:700;background:var(--hover);color:var(--ink-2)}
.crm-user-name {display:block;font-weight:600}
.crm-user-role,.crm-user-rights {display:flex;flex-wrap:wrap;gap:6px}
.crm .crm-small {padding:6px 10px;font-size:12px}
.crm-pipeline-card {background:#fff;border:1px solid var(--line);border-radius:12px;padding:18px 20px;display:flex;flex-direction:column;gap:14px}
.crm-pipeline-title {display:flex;align-items:center;gap:12px}
.crm-pipeline-title h2 {margin:0;font-size:15px;font-weight:700;flex:1;min-width:0}
.crm-pipeline-count {font-size:12px;color:var(--ink-3);white-space:nowrap}
.crm-stage-chips {display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.crm-stage-chip {display:inline-flex;align-items:center;gap:6px;padding:4px 6px 4px 10px;border-radius:7px;font-size:13px;border:1px solid var(--line-input);background:#fff}
.crm-stage-chip.is-locked {background:var(--hover)}
.crm .crm-stage-chip input {border:0;padding:2px 0;font-weight:600;font-size:13px;background:transparent;width:auto;min-width:3ch;border-radius:0}
.crm .crm-stage-chip input:disabled {color:var(--ink);opacity:1}
.crm .crm-stage-chip input:focus-visible {outline:none;box-shadow:none;border-bottom:1px solid var(--green)}
.crm-stage-tag {font-size:11px;color:var(--ink-3)}
.crm .crm-stage-save {border:0;background:var(--green);color:#fff;border-radius:5px;padding:3px 8px;font-size:11px;font-weight:700}
.crm-stage-note {font-size:12px;color:var(--ink-3);margin-top:8px}
.crm-members {display:flex;flex-wrap:wrap;gap:8px}
.crm .crm-member {display:inline-flex;align-items:center;gap:8px;padding:5px 12px 5px 5px;border-radius:20px;font-size:13px;border:1px solid var(--green);background:var(--green-soft);color:var(--green-800);font-weight:500}
.crm .crm-member:hover {background:#d9e9de}
.crm-member-avatar {width:22px;height:22px;border-radius:50%;display:grid;place-items:center;font-size:10px;font-weight:700;background:#fff;color:var(--ink-2)}
.crm-admin-section-head {display:flex;align-items:baseline;gap:12px;flex-wrap:wrap}
.crm-admin-section-head h2 {margin:0;font-size:14px;font-weight:700}
.crm-admin-section-head span {font-size:12px;color:var(--ink-3)}
.crm-log-table {background:#fff;border:1px solid var(--line);border-radius:12px;overflow:hidden}
.crm .crm-log-row {width:100%;display:grid;grid-template-columns:150px 130px minmax(0,1fr);gap:12px;align-items:center;padding:10px 16px;border-top:1px solid var(--line-soft);font-size:12.5px;color:var(--ink);text-decoration:none;font-weight:400}
.crm .crm-log-row:first-child {border-top:0}
.crm .crm-log-row:hover {background:var(--panel)}
.crm-log-when {color:var(--ink-4);font-variant-numeric:tabular-nums}
.crm-log-subject {font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.crm-log-text {color:var(--ink-2);min-width:0}
.crm-log-what {display:block;overflow-wrap:anywhere}  /* wraps: a rights change names every right (U11) */
.crm-log-who {font-size:11.5px;color:var(--ink-4)}
@media(max-width:800px) {
  .crm-users-head,.crm-user-row {grid-template-columns:minmax(0,1fr) 90px;gap:8px 12px}
  .crm-users-head span:nth-child(2),.crm-users-head span:nth-child(3) {display:none}
  .crm-user-row > :nth-child(1) {grid-column:1;grid-row:1}
  .crm-user-row > :nth-child(4) {grid-column:2;grid-row:1;justify-self:end}
  .crm-user-row > :nth-child(2),.crm-user-row > :nth-child(3) {grid-column:1/-1}
  .crm .crm-log-row {grid-template-columns:minmax(0,1fr);gap:2px}
}
@media(max-width:600px) {.crm-header {flex-wrap:wrap;row-gap:10px}.crm-header-actions {margin-left:0;max-width:100%;overflow-x:auto}}
/* Rights toggles and pipeline checklist inside the user dialog keep their row layout despite the modal's stacked labels. */
.crm .crm-modal-body .crm-toggle {display:flex;flex-direction:row;justify-content:space-between;align-items:center;gap:16px;font-size:13px;font-weight:400;color:var(--ink)}
.crm .crm-modal-body .crm-toggle span {display:grid;gap:2px;min-width:0}
.crm .crm-modal-body .crm-toggle strong {font-size:13px;font-weight:600}
.crm .crm-modal-body .crm-toggle small {font-size:12px;font-weight:400;color:var(--ink-3)}
.crm .crm-modal-body .crm-toggle input {width:38px;height:22px;flex:0 0 38px;align-self:center;padding:0}
.crm .crm-modal-body .crm-user-pipelines label {display:flex;flex-direction:row;align-items:center;gap:8px;font-size:13px;font-weight:500;color:var(--ink)}
.crm .crm-modal-body .crm-user-pipelines input {width:16px;height:16px;margin:0;accent-color:var(--green)}
.crm-pipeline-blocked {font-size:12px;color:var(--ink-3);white-space:nowrap}
/* Review round 3, item 4: the postcode's message keeps its line, so the form does not jump. */
.crm-field[data-field="postal_code"] .crm-field-error {display:block;min-height:16px}
/* Review round 3, item 7: version and commit, discreetly at the bottom of the sidebar and the phone menu. */
.crm-version {font-size:11px;color:var(--ink-4);padding:6px 8px 2px;font-variant-numeric:tabular-nums;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.crm-mmenu-body .crm-version {padding:14px 16px 0}
/* Rights templates above the switches in the user dialog (owner decision U9). */
.crm .crm-modal-body .crm-rights-templates {display:grid;gap:6px;margin:0}
.crm .crm-modal-body .crm-rights-templates[hidden] {display:none}
.crm .crm-modal-body .crm-rights-templates-label {font-size:11px;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);font-weight:600}
.crm .crm-modal-body .crm-rights-templates-buttons {display:flex;flex-wrap:wrap;gap:8px}
.crm .crm-modal-body .crm-rights-templates small {font-size:12px;color:var(--ink-3)}
.crm .crm-modal-body .crm-rights-all-note[hidden] {display:none}
/* Correcting a customer card's name in the expanded card on Kunder. */
.crm-customer-rename {display:flex;justify-content:flex-end;margin:0 0 10px}
.crm-customer-rename-form {display:flex;flex-wrap:wrap;align-items:center;gap:8px;width:100%}
.crm-customer-rename-form label {font-size:12px;font-weight:600;color:var(--ink-3);flex:0 0 100%}
.crm-customer-rename-form input {flex:1 1 220px;min-width:0;height:36px;padding:0 10px;border:1px solid var(--line-input);border-radius:8px;font:inherit;background:#fff;color:var(--ink)}
.crm-customer-rename-form .crm-field-error {flex:0 0 100%}
/* The pipeline choice sits under the Pipeline right (owner decision U1): every pipeline, or only the ticked ones. */
.crm .crm-modal-body .crm-pipeline-choice {display:grid;gap:8px;margin:0 14px 12px;padding:10px 12px;border-radius:8px;background:var(--panel);border:1px solid var(--line)}
.crm .crm-modal-body .crm-pipeline-choice[hidden],.crm .crm-modal-body .crm-user-pipelines[hidden] {display:none}
.crm .crm-modal-body .crm-pipeline-option {display:flex;flex-direction:row;align-items:flex-start;gap:8px;font-size:13px;font-weight:400;color:var(--ink);cursor:pointer}
.crm .crm-modal-body .crm-pipeline-option input {width:16px;height:16px;margin:2px 0 0;padding:0;flex:0 0 16px;accent-color:var(--green)}
.crm .crm-modal-body .crm-pipeline-option span {display:grid;gap:1px;min-width:0}
.crm .crm-modal-body .crm-pipeline-option strong {font-size:13px;font-weight:600}
.crm .crm-modal-body .crm-pipeline-option small {font-size:12px;color:var(--ink-3)}
.crm .crm-modal-body .crm-pipeline-choice .crm-user-pipelines {padding-left:24px}
.crm .crm-modal-body .crm-pipeline-choice .crm-help {margin:0}
.crm .crm-modal-body .crm-choice-actions {display:flex;gap:8px}
/* Mobile production plan: the prototype's phone view — I dag · Kommende · Søg, compact rows and a detail sheet. */
.crm-mobile-plan {display:flex;flex-direction:column;gap:14px}
.crm-mtabs {align-self:flex-start}
.crm .crm-mtabs button {padding:9px 16px;font-size:13px}
.crm-mgroup {display:flex;flex-direction:column;gap:8px}
.crm-mgroup-head {display:flex;align-items:baseline;gap:8px;padding:4px 4px 0}
.crm-mgroup-head h2 {margin:0;font-size:13px;font-weight:700}
.crm-mgroup.is-overdue h2 {color:var(--red)}
.crm-mgroup-head span {font-size:12px;color:var(--ink-3)}
.crm .crm-mrow {display:flex;gap:12px;align-items:stretch;width:100%;text-align:left;border:1px solid var(--line);border-left:5px solid var(--green);border-radius:14px;background:#fff;padding:14px 14px 14px 12px;font-weight:400;color:var(--ink)}
.crm .crm-mrow.is-pickup {border-left-color:#b0741e}
.crm .crm-mrow.is-done {border-left-color:var(--ink-4)}
.crm .crm-mrow:active {background:#f3f5f2}
.crm-mrow-left {flex:0 0 56px;display:flex;flex-direction:column;gap:2px}
.crm-mrow-time {font-size:15px;font-weight:700;font-variant-numeric:tabular-nums;line-height:1.1;white-space:nowrap}
.crm-mrow-kind {font-size:11px;font-weight:600;color:var(--green);text-transform:uppercase;letter-spacing:.04em}
.crm-mrow.is-pickup .crm-mrow-kind {color:#b0741e}
.crm-mrow.is-done .crm-mrow-kind,.crm-mrow.is-done .crm-mrow-time {color:var(--ink-4)}
.crm-mrow-body {flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}
.crm-mrow-name {font-size:16px;font-weight:700;line-height:1.25;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.crm-mrow-sub {font-size:13px;color:var(--ink-3);line-height:1.35;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.crm-mrow-spec {font-size:13px;color:var(--ink-2);line-height:1.35;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.crm-mrow-done {align-self:flex-start;margin-top:3px;font-size:11.5px;font-weight:700;color:var(--green-800);background:var(--green-soft);border-radius:5px;padding:2px 7px}
.crm-mrow-done.is-cancelled {color:var(--ink-3);background:var(--hover)}
.crm-mempty {padding:30px 20px;font-size:14px;border-radius:14px}
.crm .crm-msearch {width:100%;border:1px solid var(--line-input);border-radius:12px;padding:13px 14px;font-size:16px;background:#fff}
.crm-mresults {display:flex;flex-direction:column;gap:8px}
.crm-mhint {margin-top:16px;font-size:14px;color:var(--ink-3);line-height:1.5;text-align:center;padding:0 20px}
.crm .crm-sheet {border:0;padding:0;width:100%;max-width:560px;margin:0 auto;position:fixed;inset:auto 0 0 0;max-height:88vh;border-radius:22px 22px 0 0;background:var(--panel);display:none;flex-direction:column;overflow:hidden;box-shadow:0 -12px 40px rgba(0,0,0,.18)}
.crm .crm-sheet[open] {display:flex;animation:crm-sheet-up .22s ease-out}
.crm .crm-sheet::backdrop {background:rgba(20,24,21,.45)}
@keyframes crm-sheet-up {from {transform:translateY(24px);opacity:.6} to {transform:none;opacity:1}}
.crm-sheet-head {padding:10px 16px 12px;background:#fff;border-bottom:1px solid var(--line)}
.crm-sheet-grip {width:38px;height:4px;border-radius:2px;background:var(--line-input);margin:0 auto 12px}
.crm-sheet-titles {display:flex;align-items:flex-start;gap:10px}
.crm-sheet-titles > div {flex:1;min-width:0}
.crm-sheet-titles h2 {margin:0;font-size:19px;font-weight:700;line-height:1.2}
.crm-sheet-titles p {margin:3px 0 0;font-size:13px;color:var(--ink-3)}
.crm .crm-sheet-close {flex:0 0 34px;width:34px;height:34px;border:0;border-radius:17px;background:var(--hover);color:var(--ink-2);font-size:19px;line-height:1;padding:0}
.crm-sheet-body {flex:1;min-height:0;overflow-y:auto;padding:14px 16px 24px;display:flex;flex-direction:column;gap:12px}
.crm .crm-sheet-link {display:flex;align-items:center;gap:12px;border:1px solid var(--line);border-radius:14px;background:#fff;padding:14px;min-height:60px;text-decoration:none;color:var(--ink);font-weight:400}
.crm-sheet-icon {flex:0 0 34px;height:34px;border-radius:17px;background:var(--green-soft);color:var(--green-800);display:grid;place-items:center;font-size:15px}
.crm-sheet-tile {flex:1;min-width:0}
.crm-sheet-tile strong {display:block;font-size:15px;font-weight:600;line-height:1.3}
.crm-sheet-tile small {display:block;font-size:12.5px;color:var(--ink-3);margin-top:1px}
.crm-sheet-card {border:1px solid var(--line);border-radius:14px;background:#fff;padding:14px;display:flex;flex-direction:column;gap:10px}
.crm .crm-sheet-card h3 {margin:0;font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--ink-4)}
.crm-sheet-chips {display:flex;flex-wrap:wrap;gap:6px}
.crm-sheet-chip {font-size:13px;font-weight:600;padding:5px 10px;border-radius:8px;background:var(--hover);color:var(--ink-2)}
.crm-sheet-text {font-size:14px;line-height:1.5;color:var(--ink-2);border-top:1px solid var(--line-soft);padding-top:10px;white-space:pre-wrap}
.crm-sheet-meta {font-size:12.5px;color:var(--ink-3)}
.crm-sheet-actions {display:flex;flex-direction:column;gap:8px}
.crm .crm-sheet-actions button {min-height:46px;font-size:15px;border-radius:12px}
@media(max-width:760px) {body[data-view="production"] .crm-filters {display:none}}
.crm-mrow.is-deal {border-left-color:var(--ink-4)}
.crm-mrow.is-deal .crm-mrow-kind {color:var(--ink-4)}
.crm-mrow.is-deal.is-due {border-left-color:var(--green)}
.crm-mrow.is-deal.is-due .crm-mrow-kind {color:var(--green)}
.crm-mrow.is-deal.is-overdue {border-left-color:var(--red)}
.crm-mrow.is-deal.is-overdue .crm-mrow-kind {color:var(--red)}
/* Mobile navigation (≤760px): the prototype's tree burger with the full menu and a bottom tab bar. */
.crm-tree {display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;width:26px}
.crm-tree i {display:block;height:2px;border-radius:1px;background:var(--ink);transition:transform .24s cubic-bezier(.4,0,.2,1),width .24s,opacity .16s}
.crm-tree i:nth-child(1) {width:4px}
.crm-tree i:nth-child(2) {width:8px}
.crm-tree i:nth-child(3) {width:12px}
.crm-tree i:nth-child(4) {width:16px}
.crm-tree i:nth-child(5) {width:20px}
.crm-tree i:nth-child(6) {width:24px}
.crm-tree b {display:block;width:2px;height:4px;border-radius:1px;background:var(--ink);margin-top:1px;transition:opacity .15s}
.is-open .crm-tree i:nth-child(1),.crm-mmenu-close .crm-tree i:nth-child(1) {width:22px;transform:translateY(12.5px) rotate(45deg)}
.is-open .crm-tree i:nth-child(6),.crm-mmenu-close .crm-tree i:nth-child(6) {width:22px;transform:translateY(-12.5px) rotate(-45deg)}
.is-open .crm-tree i:nth-child(n+2):nth-child(-n+5),.crm-mmenu-close .crm-tree i:nth-child(n+2):nth-child(-n+5) {transform:scaleX(0);opacity:0}
.is-open .crm-tree b,.crm-mmenu-close .crm-tree b {opacity:0}
.crm .crm-burger {display:none;position:fixed;top:12px;right:8px;z-index:55;width:44px;height:44px;border:0;background:transparent;padding:0;align-items:center;justify-content:center;border-radius:12px}
.crm .crm-mmenu {position:fixed;inset:0;z-index:60;background:var(--panel);display:flex;flex-direction:column;overflow:hidden;animation:crm-pop .16s ease-out}
.crm .crm-mmenu[hidden] {display:none}
.crm-mmenu-head {display:flex;align-items:center;gap:12px;padding:14px 12px 14px 18px;background:#fff;border-bottom:1px solid var(--line)}
.crm-mmenu-avatar {flex:0 0 38px;height:38px;border-radius:19px;background:var(--ink);color:#fff;display:grid;place-items:center;font-size:13px;font-weight:700}
.crm-mmenu-user {flex:1;min-width:0}
.crm-mmenu-user strong {display:block;font-size:15px;font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.crm-mmenu-user small {display:block;font-size:12.5px;color:var(--ink-3)}
.crm .crm-mmenu-close {flex:0 0 44px;width:44px;height:44px;border:0;background:transparent;padding:0;display:flex;align-items:center;justify-content:center;border-radius:12px}
.crm-mmenu-body {flex:1;min-height:0;overflow-y:auto;padding:14px 14px 28px;display:flex;flex-direction:column;gap:18px}
.crm-mmenu-section {display:flex;flex-direction:column;gap:6px}
.crm-mmenu-section h2 {margin:0 0 2px 6px;font-size:11px;font-weight:700;letter-spacing:.07em;text-transform:uppercase;color:var(--ink-3)}
.crm .crm-mmenu-item {display:flex;align-items:center;gap:12px;width:100%;min-height:56px;text-align:left;border:1px solid var(--line);border-radius:14px;background:#fff;padding:12px 14px;color:var(--ink);text-decoration:none;font-weight:400}
.crm .crm-mmenu-item:active {background:#f3f5f2}
.crm .crm-mmenu-item[aria-current="page"] {border-color:var(--green);background:var(--green-soft)}
.crm-mmenu-text {flex:1;min-width:0}
.crm-mmenu-label {display:block;font-size:15.5px;font-weight:600;line-height:1.25}
.crm-mmenu-sub {display:block;font-size:12.5px;color:var(--ink-3);margin-top:1px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.crm-mmenu-badge {flex:0 0 auto;min-width:20px;height:20px;padding:0 6px;border-radius:10px;background:var(--red);color:#fff;font-size:11px;font-weight:700;display:grid;place-items:center}
.crm-mmenu-chevron {flex:0 0 auto;color:#b9c2ba;font-size:15px}
.crm-mmenu-logout {margin:0}
body.crm-menu-open {overflow:hidden}
.crm-tabbar {display:none;position:fixed;left:0;right:0;bottom:0;z-index:50;grid-template-columns:repeat(auto-fit,minmax(0,1fr));gap:2px;padding:8px 10px calc(10px + env(safe-area-inset-bottom));background:#fff;border-top:1px solid var(--line)}
.crm .crm-tab {display:flex;flex-direction:column;align-items:center;gap:4px;padding:6px 0;min-height:52px;color:var(--ink-3);font-size:11.5px;font-weight:500;text-decoration:none}
.crm .crm-tab.is-on {color:var(--ink);font-weight:700}
.crm-tab-icon {position:relative;display:grid;place-items:center;width:26px;height:26px;border-radius:9px;font-size:13px;color:var(--ink-3)}
.crm-tab.is-on .crm-tab-icon {background:var(--ink);color:#fff}
.crm-tab-badge {position:absolute;top:-3px;right:-5px;min-width:16px;height:16px;padding:0 4px;border-radius:8px;background:var(--red);color:#fff;font-size:10px;font-weight:700;display:grid;place-items:center}
@media(max-width:760px) {
  .crm-sidebar {display:none}
  .crm .crm-burger {display:flex}
  .crm-tabbar {display:grid}
  .crm-header {padding-right:60px}
  .crm-work-content {padding-bottom:96px}
  .crm-board-scroll {padding-bottom:96px}
  .crm-toast {bottom:96px}
}
/* Deal form: two columns on desktop (Kunde, Kontakt, Leveringsadresse · Kundens behov, Deal), stacked on phones. */
.crm-deal-col {display:flex;flex-direction:column;gap:18px;min-width:0}
.crm-edit-fields {display:flex;flex-direction:column;gap:18px}
@media(min-width:900px) {
  .crm .crm-modal#crm-modal {width:min(1000px,94vw)}
  .crm-deal-body {display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:18px 28px;align-items:start}
  .crm-deal-body > #crm-form-error {grid-column:1/-1}
}
/* Production plan opened from a deal: the order's row, cards and phone rows are marked. */
.crm .crm-plan-cust.is-highlighted,.crm-plan-track.is-highlighted {background-color:var(--green-soft)}
.crm .crm-mrow.is-highlighted {outline:2px solid var(--green);outline-offset:2px}
/* Drag-and-drop on the board. */
.crm-card.is-dragging {opacity:.45}
.crm-column.is-drop-target {background:var(--green-soft);box-shadow:inset 0 0 0 2px var(--green)}
/* Deal drawer in production mode (opened from the production plan). */
.crm-drawer-chipset {display:contents}
.crm-drawer-titlerow .crm-secondary {flex:0 0 auto;padding:8px 13px;font-size:13px;font-weight:600;text-decoration:none}
.crm-drawer-body.is-single {grid-template-columns:minmax(0,1fr)}
.crm-drawer-body.is-single .crm-drawer-info {border-right:0;max-width:760px}
.crm-production-row.is-cancelled {opacity:.55}
.crm-production-row.is-cancelled .crm-production-label {text-decoration:line-through}
#work-drawer .crm-production-row {flex-wrap:nowrap}
#work-drawer .crm-production-date {width:auto;min-width:62px}
#work-drawer .crm-production-meta {flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.crm-production-actions {margin-left:auto;display:flex;gap:12px;align-items:center;flex:0 0 auto}
.crm .crm-production-actions button,.crm .crm-production-foot button {padding:0}
.crm-instruction {margin:0 0 8px;font-size:13px;line-height:1.45;white-space:pre-wrap;overflow-wrap:anywhere}
.crm-instruction:last-child {margin-bottom:0}
/* Customer card without deals (Kunder): the prototype's amber notice with Slet kundekort. */
.crm-orphan-box {display:flex;align-items:center;gap:12px;border:1px solid #e7b96f;background:#fff9ee;border-radius:8px;padding:10px 12px;font-size:12.5px;color:#8a4b00;line-height:1.45;margin:4px 0}
.crm-orphan-box > span {flex:1;min-width:0}
.crm .crm-orphan-box .crm-secondary {white-space:nowrap;flex:0 0 auto}
/* Kolonner og pipelines (Administration): add, remove and rename. */
.crm .crm-stage-remove {border:0;background:transparent;color:var(--ink-4);padding:0 4px;font-size:15px;line-height:1;cursor:pointer}
.crm .crm-stage-remove:hover:not(:disabled) {color:var(--red)}
.crm .crm-stage-remove:disabled {opacity:.35;cursor:not-allowed}
.crm-stage-add input {border:1px dashed #c9cfc9;border-radius:7px;padding:6px 10px;width:150px;background:transparent;font-size:13px}
.crm .crm-pipeline-name {font-size:15px;font-weight:700;border:1px solid transparent;border-radius:6px;padding:4px 8px;margin-left:-8px;background:transparent;min-width:0;flex:1;font-family:inherit}
.crm .crm-pipeline-name:hover,.crm .crm-pipeline-name:focus {border-color:var(--line-input);background:#fff}
.crm-inline-form {display:flex;gap:8px;align-items:center;flex-wrap:wrap}
/* Review round 2: masked password with eye + copy; delete button for an empty pipeline; timeline avatars side by side. */
.crm-password-field {display:flex;gap:8px;align-items:center}
.crm-password-field input {flex:1;min-width:0}
.crm .crm-icon-sm {width:36px;height:36px;font-size:16px;flex:0 0 auto}
.crm .crm-icon-sm[aria-pressed="true"] {background:var(--green-soft);border-color:var(--green)}
.crm .crm-pipeline-delete {border:1px solid var(--line);background:#fff;color:var(--ink-3);border-radius:8px;padding:5px 10px;font-size:12px;font-weight:600;cursor:pointer}
.crm .crm-pipeline-delete:hover:not(:disabled) {color:var(--red);border-color:var(--red)}
.crm .crm-pipeline-delete:disabled {opacity:.4;cursor:not-allowed}
.crm .crm-inline-form input {flex:1;min-width:220px;border:1px solid var(--line-input);border-radius:8px;padding:9px 11px;font-size:14px}
/* Systemlog rows (prototype's Driftslog). */
.crm-sys-row {display:grid;grid-template-columns:76px minmax(0,1fr) auto;gap:12px;align-items:start;padding:11px 16px;border-top:1px solid var(--line-soft);font-size:12.5px;background:#fff}
.crm-sys-row:first-child {border-top:0}
.crm-sys-row.is-handled {background:var(--panel);color:var(--ink-4)}
.crm-sys-level {padding:2px 8px;border-radius:5px;font-size:11.5px;font-weight:700;text-align:center}
.crm-sys-level.is-error {background:var(--red-soft);color:var(--red)}
.crm-sys-level.is-warning {background:#fff9ee;color:#8a4b00}
.crm-sys-level.is-ok {background:var(--green-soft);color:var(--green-800)}
.crm-sys-level.is-handled {background:var(--hover);color:var(--ink-4)}
.crm-sys-text {min-width:0}
.crm-sys-message {display:block;line-height:1.45;overflow-wrap:anywhere}
.crm-sys-meta {display:block;font-size:11.5px;color:var(--ink-4);margin-top:2px}
.crm-sys-actions {display:flex;gap:6px;align-items:center}
@media(max-width:800px) {.crm-sys-row {grid-template-columns:minmax(0,1fr);gap:6px}}
/* Review round 2: in-app confirmation dialog, form alerts and a visible close control. */
.crm .crm-icon:hover {background:var(--hover);border-color:var(--ink-4)!important;color:var(--ink)!important}
.crm-confirm-list {margin:0;padding-left:20px;font-size:13px;line-height:1.5;color:var(--ink-2)}
.crm-confirm-list li {margin:4px 0}
.crm .crm-primary.is-danger {background:var(--red);border-color:var(--red)}
.crm .crm-primary.is-danger:hover {background:#9a2f22}
.crm-modal-alert {padding:0 24px}
.crm-modal-alert .crm-error:not([hidden]) {margin:0 0 12px}
@media(min-width:900px) {.crm .crm-deal-body {min-height:560px}}
.crm-toast {cursor:default}
.crm-dupes.is-strong {border-color:var(--red);background:var(--red-soft)}
.crm-dupes.is-strong .crm-dupes-title {color:var(--red)}
