:root {
    color-scheme: light;
    --page: #ffffff;
    --panel: #ffffff;
    --line: #dfe5ea;
    --text: #333333;
    --muted: #6f7c87;
    --blue: #2fc6f6;
    --control-bg: #e1e6e7;
    --control-bg-active: #ced3d4;
    --control-border: #bec3c4;
    --control-text: #656767;
    --control-text-active: #2c2d2e;
    --shadow: 0 1px 2px rgba(0, 0, 0, .08);
}

html,
body {
    height: 100%;
    overflow: hidden;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--page);
    color: var(--text);
    font: 14px/1.45 "SF Pro Display", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

#app {
    display: flex;
    flex-direction: column;
    height: 100vh;
    min-height: 0;
    overflow: hidden;
}

button,
input,
select {
    font: inherit;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 22px 0;
    flex: 0 0 auto;
}

.nav-row,
.topbar-actions,
.tabs {
    display: flex;
    align-items: center;
}

.tabs,
.topbar-actions {
    gap: 8px;
}

.tab,
.btn {
    min-height: 34px;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 0 15px;
    cursor: pointer;
    font-weight: 400;
}

.tab {
    background: var(--control-bg);
    color: var(--control-text);
    font-size: 14px;
    line-height: 34px;
}

.tab.is-active,
.tab:hover {
    border-color: var(--control-border);
    background: var(--control-bg-active);
    color: var(--control-text-active);
}

.btn-secondary {
    background: var(--control-bg);
    color: var(--control-text);
}

.btn-primary {
    background: #00b263;
    color: #ffffff;
}

.btn-primary:hover,
.btn-primary:focus {
    background: #009b56;
}

.btn-secondary:hover,
.btn-secondary:focus {
    border-color: var(--control-border);
    background: var(--control-bg-active);
    color: var(--control-text-active);
}

.filter-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px 0;
    flex: 0 0 auto;
}

.filter-menu {
    position: relative;
    width: 100%;
}

.filter-search-wrap {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 5px;
    width: 100%;
    height: 34px;
    box-sizing: border-box;
    overflow: hidden;
    border: 1px solid #c9d1d8;
    border-radius: 8px;
    background: #ffffff;
    cursor: text;
    min-width: 0;
    padding: 0 8px;
}

.filter-search-chips {
    display: flex;
    flex-wrap: nowrap;
    flex: 0 1 auto;
    max-width: calc(100% - 12px);
    gap: 5px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
}

.filter-search-chips::-webkit-scrollbar {
    display: none;
}

.filter-search-chip {
    display: inline-flex;
    align-items: center;
    max-width: none;
    height: 24px;
    flex: 0 0 auto;
    border-radius: 6px;
    background: #e6f4ff;
    color: #2067b0;
    font-size: 13px;
    line-height: 1;
    padding: 0 8px;
    white-space: nowrap;
}

.filter-search-chip span {
    overflow: visible;
    text-overflow: clip;
}

.filter-search-main,
.filter-field input,
.filter-value-input,
.login-form input {
    width: 100%;
    min-height: 34px;
    border: 1px solid #c9d1d8;
    border-radius: 8px;
    background: #ffffff;
    color: #414b56;
    padding: 0 12px;
}

.filter-search-main {
    flex: 1 1 auto;
    width: auto;
    min-width: 12px;
    height: 30px;
    min-height: 30px;
    border: 0;
    padding-inline: 4px;
}

.filter-search-main.has-filter-chips {
    padding-left: 8px;
}

.filter-search-wrap:focus-within,
.filter-search-main:focus,
.filter-field input:focus,
.filter-value-input:focus,
.login-form input:focus {
    outline: none;
    border-color: #0077ff;
}

.filter-search-main:focus {
    border-color: transparent;
}

.filter-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 35;
    display: none;
    grid-template-columns: minmax(0, 1fr);
    gap: 13px;
    width: min(760px, 100%);
    max-height: min(72vh, 680px);
    overflow: visible;
    padding: 18px;
    border: 1px solid #e5ebf0;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(0, 0, 0, .18);
}

.filter-menu.is-open .filter-dropdown {
    display: grid;
}

.filter-field {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.filter-section,
.filter-field-wide,
.filter-actions {
    grid-column: 1 / -1;
}

.filter-field span,
.filter-section-title {
    color: #8a949e;
    font-size: 12px;
    line-height: 1.2;
}

.filter-section {
    display: grid;
    gap: 7px;
    min-width: 0;
}

.preset-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.preset-button {
    min-height: 30px;
    border: 1px solid transparent;
    border-radius: 15px;
    background: var(--control-bg);
    color: var(--control-text);
    cursor: pointer;
    font-size: 13px;
    font-weight: 400;
    line-height: 30px;
    padding: 0 12px;
    white-space: nowrap;
}

.preset-button:hover,
.preset-button.is-active {
    border-color: var(--control-border);
    background: var(--control-bg-active);
    color: var(--control-text-active);
}

.filter-inline-fields {
    display: grid;
    grid-template-columns: 116px minmax(0, 1fr);
    gap: 10px;
    width: 100%;
}

.filter-inline-fields.is-any-amount {
    grid-template-columns: minmax(0, 1fr);
}

.filter-inline-fields .b24-select {
    width: 100%;
}

.filter-value-input {
    min-width: 0;
}

.project-filter,
.b24-select {
    position: relative;
    width: 100%;
}

.date-preset-select {
    width: 100%;
}

.filter-select-button {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 5.5px;
    width: 100%;
    min-height: 34px;
    border: 1px solid #c9d1d8;
    border-radius: 8px;
    background: #ffffff;
    color: #414b56;
    cursor: pointer;
    font-size: 14px;
    font-weight: 400;
    line-height: 1;
    padding: 0 12px 0 15px;
}

.filter-select-button:hover,
.project-filter.is-open .filter-select-button,
.b24-select.is-open .filter-select-button {
    border-color: #0077ff;
    background: #ffffff;
    color: #414b56;
}

.filter-select-button span:first-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.filter-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 9px;
    height: 5px;
    overflow: hidden;
    font-size: 0;
    line-height: 1;
    transform: translateY(1.5px);
}

.filter-arrow::before {
    content: "";
    display: block;
    width: 9px;
    height: 5px;
    background: currentColor;
    mask: url("data:image/svg+xml,%3Csvg width='9' height='5' viewBox='0 0 9 5' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l3.5 3L8 1' fill='none' stroke='black' stroke-width='1.1' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
    -webkit-mask: url("data:image/svg+xml,%3Csvg width='9' height='5' viewBox='0 0 9 5' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l3.5 3L8 1' fill='none' stroke='black' stroke-width='1.1' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

.project-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 760;
    display: none;
    width: max-content;
    min-width: 220px;
    max-width: calc(100vw - 72px);
    max-height: 260px;
    overflow: auto;
    padding: 12px 0;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(0, 0, 0, .18);
}

.project-filter > .project-dropdown {
    width: 100%;
}

.b24-select[hidden],
[data-b24-calendar][hidden] {
    display: none !important;
}

.project-filter.is-open .project-dropdown,
.b24-select.is-open .project-dropdown {
    display: block;
}

.project-option {
    display: block;
    width: 100%;
    min-width: 220px;
    min-height: 44px;
    border: 0;
    background: #ffffff;
    color: #686868;
    cursor: pointer;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.2;
    padding: 0 19px;
    text-align: left;
    white-space: nowrap;
}

.project-option:hover,
.project-option.is-active {
    background: #f7f7f7;
}

.date-preset-control {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    min-width: 0;
}

.date-preset-control:not(.is-date-month):not(.is-date-year):not(.is-date-range) {
    grid-template-columns: minmax(0, 1fr);
}

.date-preset-control.is-date-month,
.date-preset-control.is-date-range {
    grid-template-columns: 220px minmax(0, 1fr);
}

.date-preset-control.is-date-year {
    grid-template-columns: minmax(0, 1fr);
}

.date-preset-fields {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    min-width: 0;
}

.date-preset-control.is-date-month .date-preset-fields,
.date-preset-control.is-date-range .date-preset-fields {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.date-preset-menu {
    width: 260px;
    min-width: 260px;
    max-height: 360px;
}

.amount-preset-menu,
.date-param-menu {
    width: 160px;
    min-width: 160px;
    max-height: 280px;
}

.company-filter-wrap {
    position: relative;
}

.company-filter-control {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
    width: 100%;
    min-height: 34px;
    border: 1px solid #c9d1d8;
    border-radius: 8px;
    background: #ffffff;
    padding: 4px 8px;
}

.company-filter-control:focus-within {
    border-color: #0077ff;
}

.company-selected-list {
    display: contents;
}

.company-filter-input {
    flex: 1 1 180px;
    min-width: 160px;
    height: 24px;
    border: 0;
    outline: none;
    background: transparent;
    color: #414b56;
    font: inherit;
    padding: 0;
}

.company-filter-popover {
    position: absolute;
    z-index: 720;
    top: calc(100% + 8px);
    left: 0;
    width: min(680px, 100%);
    max-height: 214px;
    overflow: auto;
    padding: 10px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(0, 0, 0, .18);
}

.company-filter-popover[hidden] {
    display: none !important;
}

.company-filter-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 12px;
}

.company-filter-option {
    display: block;
    min-width: 0;
    min-height: 44px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #515c6b;
    cursor: pointer;
    font: inherit;
    padding: 5px 10px;
    text-align: left;
}

.company-filter-option:hover {
    background: #eef2f4;
}

.company-filter-title,
.company-filter-subtitle {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.company-filter-title {
    color: #333333;
    font-size: 14px;
    font-weight: 500;
}

.company-filter-subtitle,
.company-filter-empty {
    color: #8a949e;
    font-size: 12px;
    font-weight: 400;
}

.company-filter-empty {
    padding: 10px;
}

.company-selected-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    min-height: 25px;
    border-radius: 6px;
    background: #e6f4ff;
    color: #2067b0;
    font-size: 13px;
    line-height: 1;
    padding: 0 8px;
}

.company-selected-chip span {
    overflow: hidden;
    text-overflow: ellipsis;
}

.company-selected-chip button {
    border: 0;
    background: transparent;
    color: #9aa3ad;
    cursor: pointer;
    font: inherit;
    padding: 0;
}

.b24-date-control {
    position: relative;
    width: 100%;
    height: 34px;
}

.b24-date-input {
    width: 100%;
    height: 34px;
    min-height: 34px;
    border: 1px solid #c9d1d8;
    border-radius: 8px;
    outline: none;
    padding: 0 12px 0 35px;
    background: #ffffff;
    color: #404a54;
    font: 15px/1.2 "SF Pro Display", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    transition: border-color .12s ease;
}

.b24-date-input:focus,
.b24-date-control.is-open .b24-date-input {
    border-color: #0077ff;
    box-shadow: none;
}

.b24-calendar-trigger {
    position: absolute;
    z-index: 2;
    left: 9px;
    top: 50%;
    width: 18px;
    height: 18px;
    border: 0;
    padding: 0;
    background: transparent;
    color: #a4afb9;
    transform: translateY(-50%);
    cursor: pointer;
}

.b24-calendar-trigger svg {
    display: block;
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.35;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.b24-calendar-popover {
    position: absolute;
    z-index: 780;
    top: 47px;
    left: 0;
    width: 272px;
    height: 304px;
    padding: 14px 10px 10px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(0, 0, 0, .18);
    color: #333333;
    font-weight: 400;
    user-select: none;
}

.date-preset-fields .b24-date-control:last-child .b24-calendar-popover {
    left: auto;
    right: 0;
}

.b24-calendar-head {
    display: grid;
    grid-template-columns: 28px 1fr 28px;
    align-items: center;
    height: 30px;
    margin-bottom: 6px;
}

.b24-calendar-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: #323840;
    font-size: 15px;
    font-weight: 500;
    text-align: center;
}

.b24-title-button,
.b24-nav-button,
.b24-day-button,
.b24-picker-button {
    border: 0;
    padding: 0;
    background: transparent;
    font: inherit;
    cursor: pointer;
}

.b24-title-button {
    height: 28px;
    padding: 0 3px;
    border-radius: 4px;
    color: inherit;
    font-weight: 500;
}

.b24-title-button:hover {
    color: #007aa3;
}

.b24-title-text {
    line-height: 28px;
}

.b24-nav-button {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    color: #a7adb5;
}

.b24-nav-button:hover {
    color: #505c6a;
}

.b24-nav-button svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.b24-weekdays,
.b24-days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.b24-weekdays {
    margin-bottom: 2px;
}

.b24-weekdays span {
    display: grid;
    place-items: center;
    height: 24px;
    color: #b2bbc4;
    font-size: 12px;
    font-weight: 400;
}

.b24-day-button {
    justify-self: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: #47515b;
    font-size: 14px;
    font-weight: 400;
    line-height: 36px;
    text-align: center;
}

.b24-day-button:hover {
    background: #d5f5fe;
}

.b24-day-button.is-muted {
    color: #c8cfd6;
}

.b24-day-button.is-weekend {
    color: #d06a76;
}

.b24-day-button.is-muted.is-weekend {
    color: #d8b2b8;
}

.b24-day-button.is-today {
    color: #00c9fb;
}

.b24-day-button.is-selected,
.b24-day-button.is-selected:hover {
    color: #ffffff;
    background: #00c9fb;
}

.b24-picker-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    row-gap: 24px;
    padding: 14px 0 0;
}

.b24-picker-button {
    justify-self: center;
    width: 84px;
    height: 36px;
    border-radius: 18px;
    color: #343a40;
    font-size: 15px;
    font-weight: 400;
    line-height: 36px;
    text-align: center;
    white-space: nowrap;
}

.b24-picker-button:hover {
    background: #d9f1fa;
}

.b24-picker-button.is-selected,
.b24-picker-button.is-current {
    color: #2fc6f6;
}

.b24-picker-button.is-selected {
    background: transparent;
}

.b24-calendar-popover[hidden],
.b24-weekdays[hidden],
.b24-days-grid[hidden],
.b24-picker-grid[hidden] {
    display: none !important;
}

.filter-actions {
    display: flex;
    justify-content: flex-end;
}

.login-panel {
    width: min(380px, calc(100% - 44px));
    margin: 36px auto 0;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.login-panel h1 {
    margin: 0 0 14px;
    color: #303942;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 0;
}

.login-form {
    display: grid;
    gap: 10px;
}

.login-error {
    min-height: 20px;
    margin-top: 10px;
    color: #b42318;
    font-size: 13px;
}

.settings-modal {
    position: fixed;
    inset: 0;
    z-index: 1500;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(36, 45, 55, .28);
}

.settings-modal[hidden] {
    display: none !important;
}

.settings-panel {
    width: min(640px, 100%);
    max-height: min(720px, calc(100vh - 48px));
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 18px 42px rgba(0, 0, 0, .22);
}

.settings-head,
.settings-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 18px;
}

.settings-head {
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
}

.settings-head h2,
.settings-group h3 {
    margin: 0;
    color: #303942;
    font-weight: 600;
    letter-spacing: 0;
}

.settings-head h2 {
    font-size: 18px;
}

.settings-close {
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #8a949e;
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
}

.settings-close:hover {
    background: #eef2f4;
    color: #303942;
}

.settings-body {
    display: grid;
    gap: 18px;
    overflow: auto;
    padding: 18px;
}

.settings-group h3 {
    margin-bottom: 10px;
    font-size: 15px;
}

.settings-stage-list {
    display: grid;
    gap: 8px;
}

.settings-check {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 36px;
    color: #414b56;
    cursor: pointer;
    font-size: 14px;
}

.settings-check input {
    width: 18px;
    height: 18px;
    accent-color: #00a64c;
}

.settings-actions {
    justify-content: flex-end;
    border-top: 1px solid var(--line);
}

.settings-status {
    flex: 1 1 auto;
    min-width: 0;
    color: #6f7c87;
    font-size: 13px;
}

.notice,
.error-box,
.loader {
    margin: 12px 22px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.kanban > .loader,
.kanban > .error-box {
    grid-column: 1 / -1;
    margin: 0 0 0 12px;
}

.error-box {
    color: #b42318;
}

.empty-state {
    position: absolute;
    top: 210px;
    left: 50%;
    z-index: 5;
    width: min(760px, calc(100vw - 56px));
    padding: 0 16px;
    color: #4d555c;
    font-size: 24px;
    font-weight: 400;
    line-height: 1.25;
    text-align: center;
    transform: translateX(-50%);
    pointer-events: none;
}

.progress-loader {
    width: min(560px, 100%);
}

.loader-title {
    font-weight: 600;
    color: #303942;
}

.progress-track {
    height: 10px;
    overflow: hidden;
    margin-top: 12px;
    border-radius: 5px;
    background: #dfe7ed;
}

.progress-bar {
    width: 38%;
    min-width: 38%;
    height: 100%;
    border-radius: 5px;
    background: var(--blue);
    animation: progress-slide 1.15s ease-in-out infinite;
}

@keyframes progress-slide {
    0% {
        transform: translateX(-110%);
    }

    100% {
        transform: translateX(270%);
    }
}

.kanban-shell {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
}

.kanban {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 300px;
    gap: 0;
    align-items: stretch;
    flex: 1 1 auto;
    overflow-x: auto;
    overflow-y: hidden;
    height: 100%;
    min-height: 0;
    padding: 14px 10px 24px;
}

.column {
    display: flex;
    flex-direction: column;
    width: 300px;
    min-width: 300px;
    height: 100%;
    min-height: 0;
    max-height: 100%;
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0 12px;
}

.column-head {
    position: relative;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 32px;
    min-height: 32px;
    padding: 0 22px 0 14px;
    background: var(--stage-bg);
    color: var(--stage-text);
    border-radius: 8px 0 0 8px;
    font-weight: 400;
    font-size: 14px;
    line-height: 1.2;
    box-shadow: 0 1px 0 rgba(0, 0, 0, .04);
}

.column-head::after {
    content: "";
    position: absolute;
    right: -12.5px;
    top: 3.5px;
    z-index: 1;
    width: 25px;
    height: 25px;
    border-radius: 4px;
    background: var(--stage-bg);
    transform: rotate(45deg);
}

.column-head span {
    flex: 0 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.column-head b {
    flex: 0 0 auto;
    margin-left: .6em;
    font-size: 12px;
    font-weight: 400;
}

.stage-total {
    flex: 0 0 auto;
    min-height: 54px;
    padding: 18px 8px 8px;
    color: #2f3439;
    text-align: center;
    font-size: 22px;
    font-weight: 400;
    line-height: 1.15;
    letter-spacing: 0;
}

.dropzone {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 8px;
    max-width: 100%;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 14px 0 18px;
    scrollbar-gutter: stable;
}

.stage-empty-hint {
    display: none;
}

.crm-card {
    max-width: 100%;
    min-width: 0;
    background: var(--panel);
    border: 1px solid var(--card-accent, #ff5b61);
    border-left: 4px solid var(--card-accent, #ff5b61);
    border-radius: 0 12px 12px 0;
    box-shadow: none;
    padding: 14px 16px;
}

.card-title {
    display: block;
    width: 100%;
    color: #333333;
    text-align: left;
    font-size: 14px;
    font-weight: 400;
    overflow-wrap: anywhere;
}

.stage-badge {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    margin-top: 8px;
    padding: 2px 8px;
    border-radius: 11px;
    font-size: 12px;
    font-weight: 600;
}

.card-fields {
    display: grid;
    gap: 7px;
    margin-top: 10px;
}

.card-field span {
    display: block;
    color: #8a949e;
    font-size: 12px;
    line-height: 1.2;
}

.card-field strong {
    display: block;
    margin-top: 2px;
    color: #333333;
    font-size: 13px;
    font-weight: 600;
    overflow-wrap: anywhere;
}

@media (max-width: 720px) {
    html,
    body {
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }

    #app {
        width: 100%;
        max-width: 100vw;
        overflow: hidden;
    }

    #app[data-allowed="0"] {
        justify-content: center;
        padding: 18px 0;
    }

    .topbar {
        position: relative;
        z-index: 20;
        align-items: stretch;
        flex-direction: column;
        gap: 10px;
        padding: 10px 12px 0;
        background: #ffffff;
    }

    .nav-row,
    .tabs,
    .topbar-actions {
        width: 100%;
    }

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

    .tab,
    .btn {
        min-height: 38px;
        line-height: 38px;
        text-align: center;
    }

    .topbar-actions .btn {
        width: 100%;
    }

    .filter-bar {
        position: relative;
        z-index: 18;
        padding: 10px 12px 0;
        background: #ffffff;
    }

    .filter-search-wrap {
        height: 38px;
        border-radius: 9px;
    }

    .filter-search-chips {
        flex: 0 0 auto;
        min-width: 0;
        max-width: 118px;
        contain: paint;
    }

    .filter-search-main.has-filter-chips {
        flex: 1 1 auto;
        width: auto;
        min-width: 0;
        padding-left: 4px;
    }

    .filter-search-main {
        height: 34px;
        min-height: 34px;
        font-size: 16px;
    }

    .filter-value-input,
    .company-filter-input,
    .b24-date-input,
    .login-form input {
        font-size: 16px;
    }

    .filter-dropdown {
        position: absolute;
        top: calc(100% + 8px);
        left: 0;
        right: 0;
        grid-template-columns: minmax(0, 1fr);
        width: 100%;
        max-width: none;
        max-height: calc(100dvh - 154px);
        overflow-y: auto;
        overflow-x: hidden;
        border-radius: 16px;
        padding: 14px;
    }

    .filter-inline-fields,
    .date-preset-control.is-date-month,
    .date-preset-control.is-date-year,
    .date-preset-control.is-date-range,
    .date-preset-control.is-date-month .date-preset-fields,
    .date-preset-control.is-date-range .date-preset-fields {
        grid-template-columns: minmax(0, 1fr);
    }

    .date-preset-menu,
    .amount-preset-menu,
    .date-param-menu {
        width: 100%;
    }

    .project-dropdown,
    .project-filter > .project-dropdown,
    .company-filter-popover {
        position: fixed;
        top: var(--float-top, 112px);
        left: var(--float-left, 12px);
        z-index: 1200;
        width: var(--float-width, calc(100vw - 24px));
        min-width: 0;
        max-width: calc(100vw - 24px);
        max-height: min(310px, calc(100dvh - var(--float-top, 112px) - 14px));
        overflow: auto;
    }

    .project-option {
        min-width: 0;
    }

    .b24-calendar-popover {
        position: fixed;
        top: var(--float-top, 112px);
        left: var(--float-left, 12px);
        right: auto;
        z-index: 1220;
        width: var(--float-width, min(272px, calc(100vw - 24px)));
        max-width: calc(100vw - 24px);
        height: auto;
        min-height: 304px;
        max-height: calc(100dvh - var(--float-top, 112px) - 14px);
        overflow: auto;
    }

    .date-preset-fields .b24-date-control:last-child .b24-calendar-popover {
        left: var(--float-left, 12px);
        right: auto;
    }

    .b24-day-button {
        width: min(36px, 10vw);
        height: min(36px, 10vw);
        line-height: min(36px, 10vw);
    }

    .company-filter-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .login-panel {
        width: calc(100% - 28px);
        max-width: 380px;
        margin: 0 auto;
    }

    .kanban-shell {
        width: 100%;
        overflow: hidden;
    }

    .kanban {
        grid-auto-columns: 100%;
        width: 100%;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-padding-inline: 0;
        padding: 12px 0 18px;
        -webkit-overflow-scrolling: touch;
    }

    .column {
        width: 100%;
        min-width: 100%;
        padding: 0 14px;
        scroll-snap-align: start;
        scroll-snap-stop: always;
    }

    .column-head {
        height: 36px;
        min-height: 36px;
        border-radius: 9px 0 0 9px;
        font-size: 15px;
    }

    .column-head::after {
        top: 4px;
        right: -14px;
        width: 28px;
        height: 28px;
    }

    .stage-total {
        min-height: 52px;
        padding-top: 14px;
        font-size: 22px;
    }

    .dropzone {
        padding-top: 10px;
        scrollbar-gutter: auto;
    }

    .crm-card {
        border-radius: 0 10px 10px 0;
        padding: 14px;
    }

    .stage-empty-hint {
        display: block;
        margin: 48px auto 0;
        max-width: 280px;
        color: #6f7c87;
        font-size: 16px;
        line-height: 1.35;
        text-align: center;
    }

    .empty-state {
        top: 180px;
        width: calc(100vw - 32px);
        font-size: 20px;
    }

    .settings-modal {
        align-items: stretch;
        padding: 12px;
    }

    .settings-panel {
        width: 100%;
        max-height: calc(100dvh - 24px);
    }

    .settings-body {
        padding: 14px;
    }

    .settings-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .settings-status {
        grid-column: 1 / -1;
    }
}
