@font-face {
    font-family: "Bricolage Grotesque";
    font-style: normal;
    font-weight: 200 800;
    font-display: swap;
    src: url("fonts/bricolage-grotesque-latin-var.woff2") format("woff2");
}
@font-face {
    font-family: "IBM Plex Sans";
    font-style: normal;
    font-weight: 400 600;
    font-display: swap;
    src: url("fonts/ibm-plex-sans-latin-var.woff2") format("woff2");
}
/* Korps Recruit workspace: shared tokens for native CRM and package views. */
:root {
    --k-canvas: #efebe3;
    --k-panel: #fff;
    --k-panel-soft: #f5f2ec;
    --k-ink: #15171b;
    --k-muted: #62615c;
    --k-line: #d9d2c4;
    --k-accent: #996c16;
    --k-accent-hover: #7e5610;
    --k-accent-soft: #f7ecd3;
    --k-positive: #247348;
    --k-danger: #b33141;
    --k-nav: #101217;
    --k-focus: #c48c27;
    --brand-color: #996c16;
    color-scheme: light;
}
html.dark {
    --k-canvas: #101217;
    --k-panel: #161920;
    --k-panel-soft: #1d2129;
    --k-ink: #f2efe8;
    --k-muted: #b8b4ab;
    --k-line: #262b35;
    --k-accent: #e2a93b;
    --k-accent-hover: #f0bc58;
    --k-accent-soft: #322818;
    --k-positive: #39c173;
    --k-danger: #ee9ca7;
    --k-nav: #0b0c0f;
    --k-focus: #e2a93b;
    color-scheme: dark;
}
body.korps-app,
body.korps-auth,
body.korps-chat {
    color: var(--k-ink);
    background: var(--k-canvas);
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        sans-serif;
    font-size: 13px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}
.korps-app :is(a, button, input, select, textarea, summary):focus-visible,
.korps-auth :is(a, button, input):focus-visible,
.korps-chat :is(button, textarea):focus-visible {
    outline: 2px solid var(--k-focus);
    outline-offset: 3px;
}
.korps-app .primary-button,
.korps-auth .primary-button {
    background: var(--k-accent);
    border-color: var(--k-accent);
    color: #fff;
    border-radius: 7px;
    font-weight: 600;
    font-size: 13px;
    box-shadow: none;
}
.dark.korps-app .primary-button,
.dark .korps-app .primary-button {
    background: #e2a93b;
    border-color: #e2a93b;
}
.korps-app .secondary-button {
    border-color: var(--k-line);
    background: var(--k-panel);
    color: var(--k-ink);
    border-radius: 7px;
}
.korps-topbar {
    height: 68px;
    min-height: 68px;
    padding: 0 24px !important;
    background: var(--k-panel) !important;
    border-color: var(--k-line) !important;
    box-shadow: 0 1px 4px #172b4d04;
}
.korps-topbar > div:first-child {
    min-width: 200px;
}
.korps-topbar img.h-10 {
    height: 36px;
}
.korps-topbar input[type="text"] {
    border-radius: 8px !important;
    background: var(--k-panel-soft) !important;
    border-color: var(--k-line) !important;
    font-size: 13px;
    height: 38px;
}
.korps-topbar .korps-user-avatar {
    background: #f7ecd3 !important;
    color: #996c16 !important;
    font-size: 13px;
    border: 1px solid #decfaa;
}
.korps-topbar .icon-add {
    background: var(--k-accent) !important;
}
.korps-workspace {
    color: var(--k-muted);
    font-size: 12px;
    margin-left: 14px;
    padding-left: 16px;
    border-left: 1px solid var(--k-line);
}
.korps-main {
    background: var(--k-canvas) !important;
    min-width: 0;
    padding-top: 26px !important;
    min-height: calc(100vh - 68px) !important;
}
.korps-content {
    padding: 0 28px 32px !important;
    min-width: 0;
    width: 100%;
}
.korps-footer {
    position: static !important;
    color: var(--k-muted);
    background: transparent !important;
    padding: 0 28px 18px;
    font-size: 11px;
    text-align: right;
}
.korps-footer > div {
    background: transparent !important;
    border: 0 !important;
    padding: 0 !important;
    color: inherit !important;
    font-size: 11px;
}
#admin-sidebar.korps-sidebar {
    top: 68px;
    width: 224px;
    height: calc(100dvh - 68px);
    background: var(--k-nav) !important;
    border: 0 !important;
    padding: 0 !important;
    z-index: 10002;
}
.korps-sidebar .k-nav-scroll {
    height: calc(100% - 50px);
    overflow: auto;
    padding: 22px 12px 16px;
    scrollbar-width: thin;
    scrollbar-color: #262b35 transparent;
}
.k-nav-heading {
    font-size: 11px;
    color: #8b8981;
    margin: 0 12px 12px;
    font-weight: 500;
}
.k-nav-link,
.k-nav-summary {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 40px;
    padding: 9px 12px;
    color: #b8b4ab;
    border-radius: 7px;
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
}
.k-nav-link:hover,
.k-nav-summary:hover {
    background: #ffffff09;
    color: #fff;
}
.k-nav-link.is-active {
    background: #e2a93b1c;
    color: #f4f6ff;
    box-shadow: inset 3px 0 0 #e2a93b;
    font-weight: 600;
}
.k-nav-link > span[class^="icon-"],
.k-nav-summary > span[class^="icon-"] {
    font-size: 20px;
    color: #8b8981;
    width: 20px;
}
.k-nav-link.is-active > span {
    color: #f0bc58;
}
.k-nav-label {
    flex: 1;
}
.k-nav-summary {
    list-style: none;
    font-weight: 600;
}
.k-nav-summary::-webkit-details-marker {
    display: none;
}
.k-nav-caret {
    font-size: 15px;
    transition: transform 0.15s;
}
.k-nav-group[open] > .k-nav-summary > .k-nav-caret {
    transform: rotate(90deg);
}
.k-nav-children {
    margin: 3px 0 8px 22px;
    border-left: 1px solid #262b35;
    padding-left: 10px;
}
.k-nav-children .k-nav-link {
    padding: 8px 10px;
    min-height: 36px;
    font-size: 12px;
}
.k-nav-children .k-nav-link.is-active {
    box-shadow: none;
    background: #e2a93b14;
    color: #e2a93b;
}
.k-nav-group.has-active > .k-nav-summary {
    color: #fff;
}
.k-nav-separator {
    border-top: 1px solid #262b35;
    margin: 18px 12px 14px;
}
.korps-sidebar .k-nav-collapse {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50px;
    background: var(--k-nav);
    border-top: 1px solid #262b35;
}
.korps-sidebar .k-nav-collapse > div {
    position: static !important;
    background: transparent !important;
    border: 0 !important;
    color: #b8b4ab;
    max-width: none !important;
    padding: 10px 18px;
}
.korps-sidebar a[href$="/sales/services"] {
    margin-top: 0 !important;
    border: 0 !important;
    padding-top: 9px !important;
}
.korps-app [class*="bg-white"]:not(header) {
    border-color: var(--k-line);
}
.k-sales {
    --s-border: var(--k-line);
    --s-muted: var(--k-muted);
    --s-panel: var(--k-panel);
    --s-ink: var(--k-ink);
    max-width: 1600px;
    margin: auto;
    color: var(--k-ink);
    min-width: 0;
}
.k-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.k-page-heading {
    margin-bottom: 24px;
    align-items: center;
}
.k-eyebrow {
    font-size: 12px;
    color: var(--k-muted);
    margin-bottom: 6px;
}
.k-title {
    font-size: 27px;
    line-height: 1.25;
    font-weight: 650;
    letter-spacing: -0.7px;
    margin: 0;
}
.k-subtitle {
    font-size: 13px;
    color: var(--k-muted);
    margin-top: 8px;
}
.k-muted {
    color: var(--k-muted);
    font-size: 12px;
    line-height: 1.6;
}
.k-agent-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--k-muted);
}
.k-agent-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: var(--k-accent-soft);
    color: var(--k-accent);
    font-weight: 700;
    font-size: 12px;
}
.k-count {
    font-size: 12px;
    font-weight: 500;
    background: var(--k-panel);
    border: 1px solid var(--k-line);
    color: var(--k-muted);
    padding: 3px 9px;
    border-radius: 6px;
    vertical-align: middle;
    margin-left: 8px;
    letter-spacing: 0;
}
.k-panel,
.k-card {
    background: var(--k-panel);
    border: 1px solid var(--k-line);
    border-radius: 10px;
    padding: 20px;
    min-width: 0;
    box-shadow: 0 2px 3px #1e2d4503;
}
.k-panel h2,
.k-card h2 {
    font-size: 14px;
    font-weight: 650;
    letter-spacing: -0.15px;
    margin-bottom: 16px;
}
.k-panel-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}
.k-panel-title h2 {
    margin: 0;
}
.k-kpis {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}
.k-kpis > .k-panel {
    padding: 18px 20px;
}
.k-kpis > .k-panel:first-child {
    border-top: 2px solid var(--k-accent);
    padding-top: 17px;
}
.k-metric {
    font-size: 29px;
    line-height: 1.25;
    font-weight: 650;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.7px;
    margin: 10px 0 8px;
}
.k-change {
    font-size: 11px;
    color: var(--k-muted);
}
.k-change-positive {
    color: var(--k-positive);
}
.k-change-negative {
    color: #cf6674;
}
.k-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    align-items: start;
    margin-bottom: 20px;
}
.k-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
}
.k-grid-3 > .k-panel {
    min-height: 220px;
}
.k-pipeline-panel {
    margin-bottom: 20px;
}
.k-stage-grid {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(130px, 1fr);
    gap: 0;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: thin;
    scrollbar-color: var(--k-line) transparent;
}
.k-stage {
    position: relative;
    display: block;
    padding: 14px 12px;
    border-right: 1px solid var(--k-line);
    background: var(--k-panel-soft);
    min-width: 0;
    transition: background 0.15s;
}
.k-stage:first-child {
    border-radius: 6px 0 0 6px;
}
.k-stage:last-child {
    border-right: 0;
    border-radius: 0 6px 6px 0;
}
.k-stage:hover {
    background: var(--k-accent-soft);
}
.k-stage > .k-muted:first-child {
    font-size: 11px;
    font-weight: 600;
    color: var(--k-ink);
    min-height: 35px;
}
.k-stage strong {
    display: block;
    font-size: 19px;
    font-weight: 650;
    margin: 8px 0 4px;
    font-variant-numeric: tabular-nums;
}
.k-stage:last-child strong {
    color: var(--k-positive);
}
.k-bar {
    height: 3px;
    background: var(--k-line);
    border-radius: 2px;
    margin-top: 16px;
    overflow: hidden;
}
.k-bar span {
    display: block;
    height: 100%;
    background: var(--k-accent);
}
.k-table-wrap {
    overflow: auto;
    margin: 0 -20px;
}
.k-table {
    width: 100%;
    border-collapse: collapse;
    white-space: nowrap;
    font-size: 12px;
}
.k-table th {
    background: var(--k-panel-soft);
    font-size: 11px;
    color: var(--k-muted);
    font-weight: 600;
    text-align: left;
    padding: 12px 16px;
    border-top: 1px solid var(--k-line);
    border-bottom: 1px solid var(--k-line);
}
.k-table td {
    padding: 15px 16px;
    border-bottom: 1px solid var(--k-line);
    color: var(--k-ink);
    font-variant-numeric: tabular-nums;
}
.k-table th:first-child,
.k-table td:first-child {
    padding-left: 20px;
}
.k-table tr:last-child td {
    border-bottom: 0;
}
.k-table tbody tr:hover {
    background: var(--k-panel-soft);
}
.k-table td .k-link {
    font-weight: 550;
}
.k-link {
    color: var(--k-accent);
    text-decoration: none;
}
.k-link:hover {
    text-decoration: underline;
}
.k-badge {
    font-size: 11px;
    border: 1px solid var(--k-line);
    background: var(--k-panel-soft);
    border-radius: 5px;
    padding: 3px 8px;
    display: inline-block;
    color: var(--k-muted);
}
.k-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 13px;
    min-height: 36px;
    font-size: 12px;
    font-weight: 550;
    border: 1px solid var(--k-line);
    border-radius: 7px;
    background: var(--k-panel);
    color: var(--k-ink);
    cursor: pointer;
    white-space: nowrap;
    transition:
        background 0.15s,
        border-color 0.15s;
}
.k-btn:hover {
    background: var(--k-panel-soft);
    border-color: #b3a995;
}
.k-btn-primary {
    background: #996c16;
    color: #fff;
    border-color: #996c16;
    box-shadow: 0 2px 3px #996c1619;
}
.k-btn-primary:hover {
    background: #7e5610;
    border-color: #7e5610;
}
.k-btn-agent {
    color: var(--k-accent);
    border-color: var(--k-line);
    background: var(--k-panel);
}
.k-actions {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
}
.k-filterbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.k-filterbar form {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}
.k-filterbar .k-input {
    width: auto;
    min-height: 36px;
    font-size: 12px;
}
.k-data-note {
    margin: -7px 0 20px;
    color: var(--k-muted);
    font-size: 11px;
}
.k-data-note summary {
    cursor: pointer;
}
.k-data-note p {
    margin-top: 7px;
    max-width: 80ch;
}
.k-list > div,
.k-list > a {
    display: block;
    padding: 11px 0;
    border-bottom: 1px solid var(--k-line);
}
.k-list > :last-child {
    border-bottom: 0;
}
.k-list > a:hover {
    color: var(--k-accent);
}
.k-empty {
    padding: 26px 4px;
    font-size: 12px;
    line-height: 1.7;
    color: var(--k-muted);
}
.k-empty-state {
    text-align: center;
    padding: 34px 16px !important;
    white-space: normal;
    max-width: 620px;
    margin: auto;
}
.k-empty-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    width: 44px;
    height: 44px;
    background: var(--k-panel-soft);
    border: 1px solid var(--k-line);
    border-radius: 10px;
    color: var(--k-muted);
    font-size: 22px;
}
.k-empty-state strong {
    font-size: 14px;
    font-weight: 600;
    color: var(--k-ink);
    display: block;
    margin-bottom: 5px;
}
.k-empty-state p {
    max-width: 390px;
    margin: 0 auto 14px;
    color: var(--k-muted);
    font-size: 12px;
    line-height: 1.7;
}
.k-form-grid,
.k-detail-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}
.k-field label {
    display: block;
    font-size: 12px;
    font-weight: 550;
    color: var(--k-muted);
    margin-bottom: 8px;
}
.k-field input,
.k-field select,
.k-field textarea,
.k-input {
    width: 100%;
    background: var(--k-panel);
    color: var(--k-ink);
    border: 1px solid #d9d2c4;
    border-radius: 6px;
    padding: 9px 11px;
    font-size: 13px;
    min-height: 39px;
    transition:
        border-color 0.15s,
        box-shadow 0.15s;
}
.dark :is(.k-field input, .k-field select, .k-field textarea, .k-input) {
    border-color: var(--k-line);
}
.k-field :is(input, select, textarea):focus,
.k-input:focus {
    border-color: var(--k-accent);
    outline: 0;
    box-shadow: 0 0 0 3px var(--k-accent-soft);
}
.k-field textarea {
    min-height: 110px;
}
.k-value {
    font-size: 13px;
    margin-top: 7px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font-weight: 450;
}
.k-detail-grid .k-field {
    border-bottom: 1px solid var(--k-line);
    padding-bottom: 16px;
}
.k-form-intro {
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--k-line);
}
.k-form-intro h2 {
    margin-bottom: 5px;
}
.k-form-footer {
    border-top: 1px solid var(--k-line);
    padding-top: 20px;
    justify-content: flex-end;
}
.k-fee-preview {
    background: var(--k-panel-soft);
    border: 1px solid var(--k-line);
    border-left: 3px solid var(--k-accent);
    margin-top: 24px;
    padding: 16px 20px;
    border-radius: 7px;
}
.k-tabs {
    display: flex;
    gap: 0;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--k-line);
    margin-bottom: 20px;
}
.k-tabs .k-btn {
    border: 0;
    background: transparent;
    border-radius: 0;
    padding: 12px 16px;
    color: var(--k-muted);
}
.k-tabs .active {
    border-bottom: 2px solid var(--k-accent);
    color: var(--k-accent);
    font-weight: 600;
}
.k-global {
    position: fixed;
    bottom: 22px;
    right: 24px;
    z-index: 10005;
    display: flex;
    gap: 8px;
    align-items: flex-end;
}
.k-agent-stack {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.k-global .k-btn {
    box-shadow: 0 4px 20px #15234314;
    background: var(--k-panel);
    color: var(--k-muted);
    border-color: var(--k-line);
}
/* Agent identity cards open their own isolated chat drawers. */
.k-global .k-agent-roster {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 260px;
    padding: 12px 16px;
    min-height: 88px;
    background: #161920;
    color: #f2efe8;
    border: 1px solid #343942;
    border-radius: 14px;
    text-align: left;
    cursor: pointer;
    box-shadow: 0 8px 24px #00000030;
    transition:
        background-color 120ms ease,
        border-color 120ms ease;
}
.k-global .k-agent-roster:hover {
    background: #1d2129;
    border-color: #59616b;
}
.k-global .k-agent-roster:active {
    background: #101217;
    border-color: #80ca9a;
    box-shadow: inset 0 0 0 1px #80ca9a;
}
.k-global .k-agent-roster:focus-visible {
    outline: 2px solid #80ca9a;
    outline-offset: 4px;
}
.k-agent-portrait {
    flex: 0 0 52px;
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border: 1.5px solid #69717c;
    border-radius: 50%;
}
.k-agent-portrait img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
}
.k-agent-identity {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}
.k-agent-identity strong {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
}
.k-agent-title {
    color: #b8b4ab;
    font-size: 12px;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.k-agent-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #a5acae;
    font-size: 11px;
    line-height: 1.3;
}
.k-agent-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #69717c;
}
.k-agent-roster[data-state="ready"] .k-agent-portrait,
.k-agent-roster[data-state="working"] .k-agent-portrait {
    border-color: #80ca9a;
}
.k-agent-roster[data-state="ready"] .k-agent-status,
.k-agent-roster[data-state="working"] .k-agent-status {
    color: #80ca9a;
}
.k-agent-roster[data-state="ready"] .k-agent-status-dot,
.k-agent-roster[data-state="working"] .k-agent-status-dot {
    background: #80ca9a;
}
@media (prefers-reduced-motion: reduce) {
    .k-global .k-agent-roster {
        transition: none;
    }
}
.k-global #korps-search-open {
    font-size: 11px;
}
.k-search-panel {
    position: fixed;
    top: 88px;
    left: 50%;
    transform: translateX(-50%);
    width: min(680px, 90vw);
    z-index: 10012;
    background: var(--k-panel);
    color: var(--k-ink);
    border: 1px solid var(--k-line);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 20px 70px #101b3540;
}
.k-search-panel input {
    background: var(--k-panel-soft);
    color: var(--k-ink);
    border: 1px solid var(--k-line);
    width: 100%;
    padding: 12px;
    border-radius: 7px;
}
.k-search-panel a {
    display: block;
    padding: 12px;
    border-bottom: 1px solid var(--k-line);
}
[hidden] {
    display: none !important;
}
.k-juno-panel {
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    width: clamp(380px, 28vw, 520px);
    max-width: 100vw;
    height: 100dvh;
    z-index: 10011;
    background: var(--k-panel);
    border-left: 1px solid var(--k-line);
    border-radius: 16px 0 0 16px;
    box-shadow: -12px 0 48px #00000035;
    overflow: hidden;
}
.k-juno-panel:not([hidden]) {
    animation: k-drawer-open 180ms ease-out;
}
@keyframes k-drawer-open {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}
@media (prefers-reduced-motion: reduce) {
    .k-juno-panel:not([hidden]) {
        animation: none;
    }
}
.k-juno-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--k-line);
    height: 61px;
}
.k-juno-panel-head strong {
    font-size: 13px;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.k-juno-panel-head button {
    color: var(--k-muted);
    background: transparent;
    border: 0;
    cursor: pointer;
    font-size: 22px;
}
.k-juno-panel iframe {
    width: 100%;
    height: calc(100% - 61px);
    border: 0;
}
.korps-chat {
    margin: 0;
    padding: 16px;
    background: var(--k-panel) !important;
}
.korps-chat * {
    box-sizing: border-box;
}
.korps-chat h2 {
    margin: 7px 0;
    font-size: 14px;
    font-weight: 600;
}
.korps-chat p {
    margin: 8px 0;
}
.korps-chat #agent-messages {
    min-height: 140px !important;
    max-height: calc(100dvh - 230px) !important;
    overflow-wrap: anywhere;
}
.korps-chat #agent-form {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}
.korps-chat textarea {
    width: 100%;
    resize: vertical;
    background: var(--k-panel-soft);
    color: var(--k-ink);
    border: 1px solid var(--k-line);
    border-radius: 7px;
    padding: 10px;
    font: inherit;
}
.korps-chat button {
    cursor: pointer;
    background: #996c16;
    color: white;
    border: 0;
    border-radius: 7px;
    padding: 8px 14px;
}
.korps-chat button:disabled {
    opacity: 0.45;
    cursor: default;
}
.korps-chat .secondary-button {
    background: var(--k-panel-soft);
    color: var(--k-muted);
    border: 1px solid var(--k-line);
}
.korps-chat #agent-notice {
    color: var(--k-muted);
    font-size: 12px;
}
.korps-chat #agent-approval {
    padding: 12px;
    border: 1px solid var(--k-line);
    border-radius: 8px;
}
.korps-chat .flex {
    display: flex;
    gap: 8px;
}
.k-message {
    white-space: pre-wrap;
    margin: 12px 0;
    padding: 12px 14px;
    border: 1px solid var(--k-line);
    border-radius: 8px;
    font-size: 13px;
    background: var(--k-panel-soft);
}
.k-message-user {
    background: var(--k-accent-soft);
    border-color: transparent;
}
.k-message strong {
    font-size: 11px;
    color: var(--k-muted);
}
.korps-auth {
    min-height: 100vh;
}
.korps-auth-shell {
    display: grid;
    grid-template-columns: minmax(380px, 1fr) minmax(420px, 1fr);
    min-height: 100dvh;
}
.korps-auth-story {
    background: #101217;
    color: #f2efe8;
    padding: 64px clamp(40px, 7vw, 110px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}
.korps-auth-story img {
    width: 165px;
    margin-bottom: 64px;
}
.korps-auth-story h1 {
    font-size: clamp(32px, 3.4vw, 48px);
    line-height: 1.15;
    letter-spacing: -1.5px;
    font-weight: 600;
    max-width: 440px;
    margin-bottom: 20px;
}
.korps-auth-story p {
    color: #b8b4ab;
    line-height: 1.8;
    max-width: 390px;
    font-size: 14px;
}
.korps-auth-flow {
    margin-top: 42px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    color: #f2efe8;
    font-size: 12px;
}
.korps-auth-flow span {
    padding: 9px 12px;
    border: 1px solid #262b35;
    border-radius: 6px;
}
.korps-auth-form {
    min-height: 100dvh !important;
    gap: 26px !important;
    padding: 48px 30px;
}
.korps-auth-form > .flex > img {
    height: 44px !important;
    margin-bottom: 16px;
}
.korps-auth-form .box-shadow {
    width: 360px;
    max-width: calc(100vw - 48px);
    box-shadow: 0 8px 40px #1a29440a;
    border: 1px solid var(--k-line);
    border-radius: 12px;
    background: var(--k-panel);
}
.korps-auth-form .box-shadow > p,
.korps-auth-form .box-shadow > div:first-child {
    font-size: 22px;
}
.korps-auth input {
    background: var(--k-panel);
    border-color: var(--k-line);
    border-radius: 6px;
    min-height: 42px;
    font-size: 13px;
}
.korps-auth .text-sm.font-normal {
    color: var(--k-muted);
    font-size: 11px;
    text-align: center;
}
.korps-auth .box-shadow .p-4 {
    padding: 20px;
}
@media (min-width: 1024px) {
    .korps-content {
        padding-left: 252px !important;
    }
    [dir="rtl"] .korps-content {
        padding-left: 28px !important;
        padding-right: 252px !important;
    }
    .sidebar-collapsed #admin-sidebar.korps-sidebar {
        width: 72px;
    }
    .sidebar-collapsed .korps-content {
        padding-left: 100px !important;
    }
    [dir="rtl"] .sidebar-collapsed .korps-content {
        padding-left: 28px !important;
        padding-right: 100px !important;
    }
    .sidebar-collapsed .k-nav-heading,
    .sidebar-collapsed .k-nav-label,
    .sidebar-collapsed .k-nav-caret {
        display: none;
    }
    .sidebar-collapsed .k-nav-summary,
    .sidebar-collapsed .k-nav-link {
        justify-content: center;
        padding: 9px 10px;
    }
    .sidebar-collapsed .k-nav-group {
        position: relative;
    }
    .sidebar-collapsed .k-nav-children {
        display: none;
    }
    .sidebar-collapsed .k-nav-group:hover > .k-nav-children,
    .sidebar-collapsed .k-nav-group:focus-within > .k-nav-children {
        display: block;
        position: fixed;
        left: 72px;
        margin-top: -40px;
        min-width: 180px;
        background: var(--k-nav);
        border: 1px solid #262b35;
        border-radius: 7px;
        padding: 8px;
        box-shadow: 0 8px 30px #0003;
    }
    .sidebar-collapsed .k-nav-children .k-nav-label {
        display: block;
    }
    .sidebar-collapsed .k-nav-scroll {
        overflow: visible;
    }
    .sidebar-collapsed .k-nav-children .k-nav-link {
        justify-content: start;
    }
}
@media (max-width: 1200px) {
    .k-kpis {
        gap: 10px;
    }
    .k-kpis > .k-panel {
        padding: 16px;
    }
    .k-metric {
        font-size: 25px;
    }
    .k-grid-3 {
        grid-template-columns: 1fr 1fr;
    }
    .k-grid-3 > .k-panel:last-child {
        grid-column: 1/-1;
    }
    .korps-topbar > div:first-child {
        min-width: 130px;
    }
    .korps-workspace {
        display: none;
    }
}
@media (max-width: 1000px) {
    .k-grid {
        grid-template-columns: 1fr;
    }
    .k-grid-3 {
        grid-template-columns: 1fr 1fr;
    }
    .k-form-grid,
    .k-detail-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .korps-topbar {
        padding: 0 16px !important;
    }
    .korps-content {
        padding: 0 20px 32px !important;
    }
    .korps-main {
        padding-top: 22px !important;
    }
    .k-kpis {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .korps-auth-shell {
        grid-template-columns: 1fr;
    }
    .korps-auth-story {
        display: none;
    }
}
@media (max-width: 600px) {
    .korps-content {
        padding: 0 14px 76px !important;
    }
    .korps-topbar {
        height: 60px;
        min-height: 60px;
    }
    .korps-main {
        padding-top: 20px !important;
    }
    .k-title {
        font-size: 24px;
    }
    .k-page-heading {
        gap: 14px;
    }
    .k-head {
        margin-bottom: 20px;
    }
    .k-page-heading > .k-actions {
        width: 100%;
        justify-content: space-between;
    }
    .k-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .k-kpis > .k-panel:last-child {
        grid-column: 1/-1;
    }
    .k-kpis > .k-panel {
        padding: 16px;
    }
    .k-metric {
        font-size: 26px;
    }
    .k-grid,
    .k-grid-3 {
        grid-template-columns: 1fr;
    }
    .k-grid-3 > .k-panel:last-child {
        grid-column: auto;
    }
    .k-grid-3 > .k-panel {
        min-height: 0;
    }
    .k-panel {
        padding: 16px;
    }
    .k-table-wrap {
        margin: 0 -16px;
    }
    .k-form-grid,
    .k-detail-grid {
        grid-template-columns: 1fr;
    }
    .k-filterbar {
        gap: 12px;
    }
    .k-filterbar .k-actions,
    .k-filterbar form {
        width: 100%;
    }
    .k-filterbar input[name="q"] {
        width: 100% !important;
    }
    .k-filterbar select {
        width: 100% !important;
    }
    .k-global {
        right: 12px;
        bottom: 12px;
        gap: 6px;
    }
    .k-global #korps-search-open {
        font-size: 0;
        padding: 10px;
        min-width: 38px;
    }
    .k-global #korps-search-open::before {
        content: "⌕";
        font-size: 21px;
        line-height: 1;
    }
    .k-global .k-btn {
        font-size: 11px;
    }
    .k-juno-panel {
        right: 0;
        top: 0;
        bottom: 0;
        width: min(430px, 100vw);
        height: 100dvh;
    }
    .k-agent-chip {
        font-size: 11px;
    }
    .korps-footer {
        text-align: left;
        font-size: 10px;
        padding: 0 14px 78px;
    }
    .korps-auth-form {
        padding: 24px;
    }
    .k-stage-grid {
        grid-auto-columns: 142px;
    }
    .k-panel-title {
        align-items: start;
    }
    .k-form-footer {
        justify-content: stretch;
    }
    .k-form-footer > .k-btn {
        flex: 1;
    }
}
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition: none !important;
        animation: none !important;
    }
}
/* Native Activities, Mail, Settings and advanced CRM screens share the same surfaces. */
.korps-main [class~="bg-white"],
.dark .korps-main [class~="dark:bg-gray-900"] {
    background: var(--k-panel) !important;
}
.korps-main [class~="text-gray-800"],
.dark .korps-main [class~="dark:text-white"] {
    color: var(--k-ink) !important;
}
.korps-main [class~="text-gray-600"],
.korps-main [class~="text-gray-500"] {
    color: var(--k-muted) !important;
}
.korps-main
    input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.korps-main select,
.korps-main textarea {
    border-color: var(--k-line);
    border-radius: 6px;
    font-size: 13px;
}
.korps-main :is(h1, .text-xl, .text-2xl) {
    letter-spacing: -0.5px;
}
.korps-main [class~="border-gray-200"],
.korps-main [class~="border-gray-300"] {
    border-color: var(--k-line) !important;
}

/* Exact Korps.ai brand tokens; restrained for a working CRM. */
:root {
    --k-gold: #e2a93b;
    --k-gold-hover: #f0bc58;
    --brand-color: #e2a93b;
}
html.dark {
    --brand-color: #e2a93b;
}
.korps-app .primary-button,
.korps-auth .primary-button,
.k-btn-primary,
.korps-chat #agent-send,
.korps-topbar button:has(.icon-add) {
    background: var(--k-gold) !important;
    border-color: var(--k-gold) !important;
    color: #15171b !important;
    box-shadow: none;
}
.korps-app .primary-button:hover,
.korps-auth .primary-button:hover,
.k-btn-primary:hover,
.korps-chat #agent-send:hover {
    background: var(--k-gold-hover) !important;
}
.korps-chat .secondary-button {
    background: var(--k-panel-soft) !important;
    border-color: var(--k-line) !important;
    color: var(--k-muted) !important;
}
.korps-topbar .korps-user-avatar {
    background: var(--k-accent-soft) !important;
    color: var(--k-accent) !important;
    border-color: var(--k-line);
}
.k-title,
.k-metric,
.k-panel h2,
.k-card h2,
.korps-auth-story h1,
.korps-main h1 {
    font-family: "Bricolage Grotesque", sans-serif;
    font-optical-sizing: auto;
}
.korps-auth-story {
    background: #101217;
}
.korps-auth-story p {
    color: #b8b4ab;
}
.k-brand-logo {
    height: 36px;
    width: auto;
    display: block;
}
.k-brand-light {
    display: block;
}
.k-brand-dark {
    display: none;
}
.dark .k-brand-light {
    display: none;
}
.dark .k-brand-dark {
    display: block;
}
.korps-auth-story .k-brand-dark {
    display: block !important;
}
.korps-auth-story .k-brand-light {
    display: none !important;
}
.korps-auth-story .k-brand-logo {
    height: auto;
    width: 180px;
    margin-bottom: 64px;
}
.korps-auth-form > .flex > .k-brand-lockup {
    margin-bottom: 16px;
}
.korps-auth-form .k-brand-logo {
    height: 48px;
}
.korps-topbar .k-brand-logo {
    height: 37px;
}
.korps-app [class*="font-inter"],
.korps-app .font-inter {
    font-family: "IBM Plex Sans", system-ui, sans-serif;
}
.korps-auth input {
    text-align: left !important;
}
@media (max-width: 600px) {
    .k-kpis[style] {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
    .k-brand-logo {
        height: 30px;
    }
    .korps-topbar .k-brand-logo {
        height: 30px;
    }
}
body.korps-app,
body.korps-auth,
body.korps-chat {
    font-family:
        "IBM Plex Sans",
        system-ui,
        -apple-system,
        "Segoe UI",
        sans-serif !important;
    background: var(--k-canvas) !important;
}
.korps-app .korps-main .korps-footer > div {
    background: transparent !important;
    color: var(--k-muted) !important;
}

.k-juno-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 12px;
}
.k-juno-panel-head button {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 6px;
}
.k-juno-panel-head button:hover {
    color: var(--k-ink);
    background: var(--k-panel-soft);
}
.k-juno-profile-form {
    height: calc(100% - 61px);
    overflow-y: auto;
    padding: 20px;
    color: var(--k-ink);
}
.k-juno-profile-form h2 {
    font-size: 18px;
    margin-bottom: 6px;
}
.k-juno-profile-form p {
    font-size: 12px;
    line-height: 1.5;
    margin-bottom: 16px;
}
.k-juno-profile-form label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin: 18px 0 8px;
}
.k-juno-profile-form :is(input, select) {
    display: block;
    width: 100%;
    border: 1px solid var(--k-line);
    border-radius: 7px;
    background: var(--k-panel-soft);
    color: var(--k-ink);
    padding: 10px;
    font-size: 13px;
}
.k-juno-profile-form input[type="file"] {
    margin-bottom: 8px;
}
.k-juno-profile-form .k-actions {
    margin-top: 20px;
    justify-content: flex-end;
}
.k-agent-profile-error {
    color: var(--k-danger);
}
.k-juno-profile-form button:disabled {
    opacity: 0.6;
    cursor: wait;
}
.k-photo-selected {
    border-radius: 50%;
    border: 1px solid var(--k-line);
    object-fit: cover;
}
.k-photo-editor {
    margin: auto;
    width: min(420px, calc(100vw - 24px));
    max-height: calc(100dvh - 24px);
    overflow-y: auto;
    padding: 24px;
    border: 1px solid var(--k-line);
    border-radius: 16px;
    background: var(--k-panel);
    color: var(--k-ink);
    box-shadow: 0 24px 80px #0006;
}
.k-photo-editor::backdrop {
    background: #0009;
}
.k-photo-editor h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
}
.k-photo-editor p {
    color: var(--k-muted);
    font-size: 13px;
    line-height: 1.5;
}
.k-photo-editor canvas {
    display: block;
    width: min(256px, 100%);
    height: auto;
    margin: 20px auto;
    border: 1px solid var(--k-line);
    border-radius: 50%;
    background: var(--k-panel-soft);
    cursor: grab;
    touch-action: none;
}
.k-photo-editor canvas:active {
    cursor: grabbing;
}
.k-photo-editor label {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    margin: 12px 0 6px;
}
.k-photo-editor input[type="range"] {
    width: 100%;
    accent-color: var(--k-positive);
}
.k-photo-editor input:disabled {
    opacity: 0.4;
}
.k-photo-editor :is(button, input, canvas):focus-visible {
    outline: 2px solid var(--k-positive);
    outline-offset: 4px;
}
.k-photo-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 24px;
}
.k-photo-actions [data-crop-reset] {
    margin-right: auto;
}
.k-photo-editor .k-photo-error {
    color: var(--k-danger);
    margin-top: 12px;
}
@media (max-width: 640px) {
    .k-global .k-agent-roster {
        width: 226px;
        padding: 10px 12px;
        gap: 10px;
    }
    .k-global > .k-btn:not(#korps-search-open) {
        display: none;
    }
}

/* Chat drawer: only the transcript scrolls; the composer stays in reach. */
.k-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;
}
.korps-chat {
    padding: 0;
    height: 100dvh;
    overflow: hidden;
}
.korps-chat .k-chat-workspace {
    height: 100%;
}
.korps-chat .k-chat-conversation {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    border: 0;
    background: var(--k-panel);
}
.korps-chat #agent-heading {
    font-size: 12px;
    margin: 0;
    padding: 0 18px 8px;
    color: var(--k-muted);
}
.korps-chat .k-chat-connection {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--k-muted);
    font-size: 11px;
    padding: 12px 18px 6px;
}
.korps-chat .k-chat-connection::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #69717c;
}
.korps-chat .k-chat-connection[data-online="true"] {
    color: #80ca9a;
}
.korps-chat .k-chat-connection[data-online="true"]::before {
    background: #80ca9a;
}
.korps-chat #agent-notice {
    margin: 0;
    padding: 0 18px;
    flex-shrink: 0;
}
.korps-chat #agent-notice:not(:empty) {
    padding-bottom: 10px;
}
.korps-chat #agent-messages {
    flex: 1;
    min-height: 0 !important;
    max-height: none !important;
    overflow-y: auto;
    padding: 8px 16px 16px;
    scrollbar-width: thin;
}
.k-chat-empty {
    display: flex;
    align-items: center;
    min-height: 180px;
    padding: 30px 16px;
    color: var(--k-muted);
    line-height: 1.8;
}
.k-message-row {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin: 18px 0;
}
.k-message-row-user {
    flex-direction: row-reverse;
}
.k-message-avatar {
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--k-line);
    margin-top: 3px;
}
.k-message-row .k-message {
    margin: 0;
    padding: 12px 14px;
    min-width: 0;
    max-width: calc(100% - 39px);
    border-radius: 12px;
    white-space: normal;
    border: 1px solid var(--k-line);
}
.k-message-row .k-message p {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    line-height: 1.65;
    margin: 6px 0 0;
}
.k-message-row .k-message-user {
    background: var(--k-accent-soft);
}
.korps-chat #agent-form {
    flex: 0 0 auto;
    margin: 0;
    padding: 14px 16px 10px;
    border-top: 1px solid var(--k-line);
    background: var(--k-panel);
    gap: 8px;
}
.korps-chat #agent-input {
    resize: none;
    border-radius: 12px;
    min-height: 76px;
    max-height: 130px;
    padding: 12px;
    line-height: 1.5;
}
.k-chat-composer-actions,
.k-chat-tools,
.k-chat-send-actions {
    display: flex;
    align-items: center;
    gap: 7px;
}
.k-chat-composer-actions {
    justify-content: space-between;
}
.korps-chat .k-chat-icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 7px;
}
.korps-chat #agent-stop {
    font-size: 11px;
    padding: 8px 10px;
}
.korps-chat #agent-voice[aria-pressed="true"] {
    color: #80ca9a !important;
    border-color: #80ca9a !important;
}
.korps-chat .k-composer-help {
    margin: 0;
    color: var(--k-muted);
    font-size: 10px;
}
.korps-chat #agent-approval {
    flex-shrink: 0;
    margin: 10px 16px;
}
.korps-chat #agent-approval-command {
    max-height: 100px;
    overflow: auto;
    font-size: 11px;
}
.k-chat-file {
    display: grid;
    gap: 8px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--k-line);
    font-size: 11px;
    overflow-wrap: anywhere;
}
.k-chat-image {
    max-height: 220px;
    width: 100%;
    object-fit: contain;
    border: 1px solid var(--k-line);
    border-radius: 8px;
}
.k-chat-file-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}
.k-chat-file a,
.korps-chat .k-file-share {
    color: var(--k-accent);
    text-decoration: underline;
    font-size: 11px;
}
.korps-chat .k-file-share {
    background: transparent;
    padding: 0;
    border: 0;
}
.k-upload-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-height: 100px;
    overflow-y: auto;
}
.k-upload-item {
    display: flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    border: 1px solid var(--k-line);
    border-radius: 7px;
    padding: 5px 6px;
    font-size: 11px;
}
.k-upload-item img {
    width: 28px;
    height: 28px;
    object-fit: cover;
    border-radius: 4px;
}
.k-upload-item span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.korps-chat .k-upload-item button {
    padding: 0 4px;
    background: transparent;
    color: var(--k-muted);
    font-size: 16px;
}
.korps-chat :is(a, button, textarea, input):focus-visible {
    outline: 2px solid #80ca9a;
    outline-offset: 3px;
}
.korps-app #agent-messages {
    min-height: 260px;
    max-height: 55vh;
    overflow-y: auto;
}
.k-api-section {
    margin-top: 28px;
}
.k-api-section > .k-muted {
    margin: 8px 0 18px;
}
.k-api-integration-card {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 390px;
    padding: 16px;
    background: var(--k-panel-soft);
    border: 1px solid var(--k-line);
    border-radius: 10px;
}
.k-api-integration-card:hover {
    border-color: var(--k-accent);
}
.k-api-integration-card > span:first-child {
    font-size: 24px;
    color: var(--k-accent);
}
.k-api-integration-card > span:last-child {
    margin-left: auto;
    font-size: 20px;
    color: var(--k-muted);
}
.k-api-integration-card strong,
.k-api-integration-card small {
    display: block;
}
.k-api-integration-card small {
    color: var(--k-muted);
    margin-top: 5px;
}
.k-api-settings {
    max-width: 840px;
}
.k-api-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
}
.k-api-heading p {
    margin-top: 8px;
}
.k-api-settings label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 8px;
}
.k-api-settings input[type="password"] {
    display: block;
    width: 100%;
    max-width: 520px;
    border: 1px solid var(--k-line);
    border-radius: 8px;
    padding: 12px;
    background: var(--k-panel-soft);
    color: var(--k-ink);
    font: inherit;
}
.k-api-settings p {
    font-size: 12px;
    line-height: 1.6;
}
#gpt-live-key-help {
    max-width: 520px;
    margin: 8px 0 22px;
}
.k-api-settings .k-api-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 22px 0;
}
.k-api-toggle input {
    width: 16px;
    height: 16px;
    accent-color: var(--k-accent);
}
.k-api-footer {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--k-line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.k-api-error,
#gpt-live-check-status[data-ok="false"] {
    color: var(--k-danger);
}
#gpt-live-check-status {
    margin-top: 12px;
}
#gpt-live-check-status[data-ok="true"] {
    color: var(--k-positive);
}
.k-api-settings button:disabled {
    opacity: 0.5;
    cursor: default;
}
@media (max-width: 640px) {
    .k-api-heading,
    .k-api-footer {
        flex-direction: column;
    }
}

@media (max-width: 390px) {
    .korps-chat #agent-stop,
    .korps-chat #agent-send,
    .korps-chat #agent-close {
        padding: 8px;
        font-size: 11px;
    }
    .k-chat-composer-actions,
    .k-chat-tools,
    .k-chat-send-actions {
        gap: 5px;
    }
}
