:root {
    --brand: #27bfd1;
    --brand-dark: #159fb0;
    --brand-soft: #eaf9fb;

    --text: #252d32;
    --text-soft: #64727b;
    --muted: #929da5;

    --bg: #f3f5f6;
    --card: #ffffff;

    --line: #dfe5e8;
    --line-strong: #c7d1d6;

    --sidebar-bg: #ffffff;
    --sidebar-text: #4f5d66;
    --sidebar-active: #eaf9fb;

    --radius: 12px;
    --shadow:
        0 1px 2px rgba(25, 40, 50, .04),
        0 8px 28px rgba(25, 40, 50, .045);
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
    margin: 0;
}

body {
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Arial,
        sans-serif;

    background: var(--bg);
    color: var(--text);
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

.hidden {
    display: none !important;
}

.app-shell {
    min-height: 100vh;
    display: flex;
}

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;

    width: 244px;

    padding: 22px 15px;

    background: var(--sidebar-bg);
    border-right: 1px solid var(--line);

    display: flex;
    flex-direction: column;

    z-index: 30;
}

.brand {
    display: flex;
    align-items: center;
    gap: 11px;

    padding: 3px 8px 28px;
}

.brand-sign {
    position: relative;

    width: 38px;
    height: 38px;

    flex: 0 0 auto;
}

.brand-sign span {
    position: absolute;

    width: 12px;
    height: 34px;

    border-radius: 4px;

    background: var(--brand);

    transform: skew(-17deg);
}

.brand-sign span:first-child {
    left: 6px;
    top: 1px;
}

.brand-sign span:last-child {
    right: 6px;
    bottom: 1px;

    height: 25px;
}

.brand-name {
    font-size: 14px;
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: .035em;

    color: var(--text);
}

.brand-product {
    margin-top: 5px;

    font-size: 11px;

    color: var(--muted);
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.menu-item {
    min-height: 44px;

    padding: 0 13px;

    border-radius: 8px;

    display: flex;
    align-items: center;
    gap: 11px;

    color: var(--sidebar-text);
    text-decoration: none;

    font-size: 13px;
    font-weight: 500;
}

.menu-item:hover {
    background: rgba(39, 191, 209, .07);
}

.menu-item.active {
    background: var(--sidebar-active);
    color: var(--brand-dark);
    font-weight: 650;
}

.menu-icon {
    width: 20px;

    text-align: center;

    font-size: 18px;
}

.sidebar-bottom {
    margin-top: auto;

    padding: 16px 9px 4px;

    border-top: 1px solid var(--line);

    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.connection-dot {
    width: 8px;
    height: 8px;

    margin-top: 5px;

    border-radius: 50%;

    background: #55c98b;
    box-shadow:
        0 0 0 4px rgba(85, 201, 139, .13);

    flex: 0 0 auto;
}

.connection-title {
    font-size: 11px;
    font-weight: 600;

    color: var(--text-soft);
}

.connection-value {
    margin-top: 3px;

    font-size: 10px;
    line-height: 1.35;

    color: var(--muted);
}

.workspace {
    width: calc(100% - 244px);
    min-height: 100vh;

    margin-left: 244px;
}

.topbar {
    min-height: 88px;

    padding: 17px 30px;

    position: sticky;
    top: 0;
    z-index: 20;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;

    background: rgba(255, 255, 255, .96);
    border-bottom: 1px solid var(--line);

    backdrop-filter: blur(10px);
}

.breadcrumbs {
    margin-bottom: 4px;

    font-size: 11px;

    color: var(--muted);
}

.topbar h1 {
    margin: 0;

    font-size: 22px;
    line-height: 1.2;
    font-weight: 650;

    color: var(--text);
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 9px;
}

.theme-switcher {
    height: 38px;

    padding: 3px;

    display: flex;
    align-items: center;
    gap: 2px;

    border: 1px solid var(--line);
    border-radius: 8px;

    background: #f6f8f9;
}

.theme-label {
    padding: 0 7px;

    color: var(--muted);

    font-size: 10px;
}

.theme-button {
    height: 30px;

    padding: 0 9px;

    border: 0;
    border-radius: 6px;

    background: transparent;

    color: var(--text-soft);

    font-size: 10px;
}

.theme-button.active {
    background: #fff;
    color: var(--text);

    box-shadow:
        0 1px 4px rgba(20, 35, 45, .09);
}

.air-nav {
    display: none;
}

.content {
    width: min(1180px, calc(100% - 42px));

    margin: 26px auto 64px;
}

.task-card,
.recurrence-card {
    background: var(--card);

    border: 1px solid rgba(215, 224, 229, .75);
    border-radius: var(--radius);

    box-shadow: var(--shadow);
}

.task-card {
    padding: 27px 29px;
}

.section-head {
    margin-bottom: 23px;
    padding-bottom: 18px;

    border-bottom: 1px solid var(--line);

    display: flex;
    align-items: center;
    justify-content: space-between;
}

.section-head h2,
.recurrence-header h2 {
    margin: 4px 0 0;

    font-size: 19px;
    font-weight: 650;

    color: var(--text);
}

.section-kicker {
    color: var(--brand-dark);

    font-size: 9px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.status-badge {
    padding: 6px 10px;

    border-radius: 20px;

    background: #f2f5f6;

    color: var(--muted);

    font-size: 10px;
}

.field-block {
    margin-bottom: 21px;
}

.field-label {
    display: block;

    margin-bottom: 7px;

    color: var(--text-soft);

    font-size: 11px;
    font-weight: 650;
}

.field-label.required::after,
.required-text::after {
    content: " *";
    color: #e85454;
}

.label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.crm-insert-button {
    border: 0;
    background: transparent;

    color: var(--brand-dark);

    font-size: 10px;
    font-weight: 600;
}

input[type="text"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="datetime-local"],
select,
textarea {
    width: 100%;

    border: 1px solid var(--line-strong);
    border-radius: 5px;

    background: #fff;

    color: var(--text);

    outline: none;

    transition:
        border-color .15s ease,
        box-shadow .15s ease;
}

input[type="text"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="datetime-local"],
select {
    height: 41px;

    padding: 0 11px;
}

textarea {
    padding: 11px 12px;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--brand);

    box-shadow:
        0 0 0 2px rgba(39, 191, 209, .11);
}

.task-title-input {
    height: 51px !important;

    font-size: 19px !important;
    font-weight: 500;
}

.description-input {
    min-height: 124px;

    resize: vertical;

    line-height: 1.5;
}

.crm-variable-palette {
    margin: -8px 0 24px;

    padding: 14px;

    border: 1px solid #d8ebef;
    border-radius: 8px;

    background: #f5fbfc;
}

.palette-title {
    margin-bottom: 9px;

    font-size: 11px;
    font-weight: 700;

    color: var(--text-soft);
}

.variable-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.variable-chip {
    min-height: 30px;

    padding: 0 10px;

    border: 1px solid #c8e6eb;
    border-radius: 16px;

    background: #fff;

    color: var(--brand-dark);

    font-size: 10px;
}

.variable-chip:hover {
    background: var(--brand-soft);
}

.palette-note {
    margin-top: 9px;

    color: var(--muted);

    font-size: 10px;
    line-height: 1.4;
}

.participants-section {
    margin: 5px 0 24px;

    padding-top: 3px;
}

.subsection-title {
    margin-bottom: 14px;

    font-size: 13px;
    font-weight: 700;

    color: var(--text);
}

.participant-grid {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 13px;
}

.participant-card {
    min-width: 0;

    padding: 15px;

    border: 1px solid var(--line);
    border-radius: 9px;

    background: #fafcfc;
}

.participant-title {
    margin-bottom: 10px;

    font-size: 11px;
    font-weight: 700;

    color: var(--text-soft);
}

.participant-mode {
    margin-bottom: 9px;
}

.participant-config {
    margin-top: 7px;
}

.user-selector {
    min-height: 55px;

    padding: 8px 10px;

    border: 1px solid var(--line);
    border-radius: 7px;

    background: #fff;

    display: flex;
    align-items: center;
    gap: 10px;
}

.avatar {
    width: 34px;
    height: 34px;

    border-radius: 50%;

    display: grid;
    place-items: center;

    background: var(--brand-soft);
    color: var(--brand-dark);

    font-size: 11px;
    font-weight: 800;

    flex: 0 0 auto;
}

.user-name {
    font-size: 12px;
    font-weight: 650;

    color: var(--text);
}

.user-role {
    margin-top: 3px;

    color: var(--muted);

    font-size: 9px;
}

.selector-button {
    width: 100%;
    min-height: 39px;

    padding: 0 11px;

    border: 1px dashed #bac9cf;
    border-radius: 5px;

    background: #fff;

    color: var(--brand-dark);

    text-align: left;

    font-size: 11px;
}

.selector-button:hover {
    border-color: var(--brand);
    background: var(--brand-soft);
}

.secondary-select {
    margin-top: 8px;
}

.field-hint {
    margin-top: 7px;

    color: var(--muted);

    font-size: 9px;
    line-height: 1.45;
}

.queue-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.queue-row {
    display: grid;
    grid-template-columns:
        25px 1fr 27px;

    gap: 7px;
    align-items: center;
}

.queue-number {
    width: 24px;
    height: 24px;

    border-radius: 50%;

    display: grid;
    place-items: center;

    background: var(--brand-soft);
    color: var(--brand-dark);

    font-size: 9px;
    font-weight: 800;
}

.queue-user {
    min-height: 34px;

    padding: 0 9px;

    border: 1px solid var(--line-strong);
    border-radius: 5px;

    background: #fff;

    color: var(--text-soft);

    text-align: left;

    font-size: 10px;
}

.queue-remove {
    width: 27px;
    height: 27px;

    border: 0;

    background: transparent;

    color: #99a4aa;

    font-size: 18px;
}

.link-button {
    margin-top: 8px;

    padding: 0;

    border: 0;

    background: transparent;

    color: var(--brand-dark);

    font-size: 10px;
    font-weight: 600;
}

.availability-strip {
    margin-top: 13px;

    padding: 13px 14px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;

    border: 1px solid #dceee5;
    border-radius: 8px;

    background: #f5faf7;
}

.switch-row {
    display: flex;
    align-items: center;
    gap: 9px;

    cursor: pointer;
}

.switch-row input {
    display: none;
}

.switch {
    width: 38px;
    height: 21px;

    position: relative;

    border-radius: 20px;

    background: #c8d1d5;

    transition: .2s ease;

    flex: 0 0 auto;
}

.switch::after {
    content: "";

    position: absolute;
    left: 2px;
    top: 2px;

    width: 17px;
    height: 17px;

    border-radius: 50%;

    background: #fff;

    box-shadow:
        0 1px 3px rgba(0, 0, 0, .17);

    transition: .2s ease;
}

.switch-row input:checked + .switch {
    background: var(--brand);
}

.switch-row input:checked + .switch::after {
    transform: translateX(17px);
}

.switch-copy {
    color: var(--text-soft);

    font-size: 11px;
}

.switch-copy strong {
    display: block;

    color: var(--text);

    font-size: 11px;
}

.switch-copy small {
    display: block;

    margin-top: 2px;

    color: var(--muted);

    font-size: 9px;
    line-height: 1.35;
}

.availability-policy {
    min-width: 340px;

    display: flex;
    align-items: center;
    gap: 8px;
}

.availability-policy > span {
    flex: 0 0 auto;

    color: var(--muted);

    font-size: 9px;
}

.two-columns,
.three-columns {
    display: grid;
    gap: 15px;
}

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

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

.accordion {
    margin-top: 8px;

    border-top: 1px solid var(--line);
}

.accordion-head {
    width: 100%;
    min-height: 53px;

    padding: 0;

    border: 0;

    display: flex;
    align-items: center;
    justify-content: space-between;

    background: transparent;

    color: var(--text);

    font-size: 12px;
    font-weight: 650;
}

.accordion-arrow {
    color: var(--muted);

    font-size: 19px;

    transition: .2s ease;
}

.accordion.open .accordion-arrow {
    transform: rotate(180deg);
}

.accordion-body {
    display: none;

    padding: 4px 0 18px;
}

.accordion.open .accordion-body {
    display: block;
}

.settings-grid {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 11px 18px;
}

.setting-check {
    display: flex;
    align-items: center;
    gap: 7px;

    color: var(--text-soft);

    font-size: 11px;
}

.setting-check input {
    width: 16px;
    height: 16px;
}

.recurrence-card {
    margin-top: 20px;

    overflow: hidden;
}

.recurrence-header {
    min-height: 127px;

    padding: 24px 28px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    background:
        linear-gradient(
            135deg,
            var(--brand-soft) 0%,
            #ffffff 70%
        );

    border-bottom: 1px solid var(--line);
}

.recurrence-header p {
    margin: 7px 0 0;

    color: var(--text-soft);

    font-size: 11px;
}

.master-switch input {
    display: none;
}

.master-slider {
    width: 57px;
    height: 31px;

    position: relative;

    display: block;

    border-radius: 30px;

    background: #bdc8cd;

    cursor: pointer;

    transition: .2s ease;
}

.master-slider::after {
    content: "";

    position: absolute;
    left: 3px;
    top: 3px;

    width: 25px;
    height: 25px;

    border-radius: 50%;

    background: #fff;

    box-shadow:
        0 2px 6px rgba(0, 0, 0, .15);

    transition: .2s ease;
}

.master-switch input:checked + .master-slider {
    background: var(--brand);
}

.master-switch input:checked + .master-slider::after {
    transform: translateX(26px);
}

.recurrence-settings.disabled {
    opacity: .43;
    pointer-events: none;
}

.recurrence-block {
    padding: 25px 28px;

    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 10px;

    border-bottom: 1px solid var(--line);
}

.recurrence-block:last-child {
    border-bottom: 0;
}

.block-number {
    width: 33px;
    height: 33px;

    display: grid;
    place-items: center;

    border-radius: 8px;

    background: var(--brand-soft);
    color: var(--brand-dark);

    font-size: 9px;
    font-weight: 800;
}

.block-content h3 {
    margin: 4px 0 18px;

    font-size: 14px;
    font-weight: 700;

    color: var(--text);
}

.block-description {
    margin: -9px 0 17px;

    color: var(--muted);

    font-size: 10px;
}

.interval-field {
    display: flex;
    align-items: center;
    gap: 8px;
}

.interval-field span {
    color: var(--text-soft);

    font-size: 10px;
}

.interval-field input {
    max-width: 100px;
}

.rule-panel {
    margin-bottom: 18px;

    padding: 16px;

    border: 1px solid var(--line);
    border-radius: 8px;

    background: #f9fbfb;
}

.rule-panel-title {
    margin-bottom: 13px;

    color: var(--text);

    font-size: 11px;
    font-weight: 700;
}

.weekday-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.weekday-picker input {
    display: none;
}

.weekday-picker span {
    width: 40px;
    height: 34px;

    border: 1px solid var(--line-strong);
    border-radius: 5px;

    display: grid;
    place-items: center;

    background: #fff;

    color: var(--text-soft);

    font-size: 10px;

    cursor: pointer;
}

.weekday-picker input:checked + span {
    border-color: var(--brand);

    background: var(--brand);
    color: #fff;
}

.monthly-builder {
    display: grid;
    grid-template-columns:
        1.5fr 1fr;

    gap: 13px;
}

.builder-column-wide {
    grid-column: 1 / -1;
}

.offset-builder {
    margin-top: 14px;

    padding-top: 14px;

    border-top: 1px solid var(--line);
}

.offset-title {
    margin-bottom: 8px;

    color: var(--text-soft);

    font-size: 10px;
    font-weight: 650;
}

.offset-row {
    display: grid;
    grid-template-columns:
        1fr 100px 1.35fr;

    gap: 8px;
}

.human-rule {
    margin-top: 9px;

    padding: 9px 11px;

    border-radius: 6px;

    background: var(--brand-soft);

    color: var(--brand-dark);

    font-size: 10px;
    line-height: 1.4;
}

.calendar-row {
    margin: 0 0 18px;

    padding: 14px;

    display: grid;
    grid-template-columns:
        minmax(250px, 370px) 1fr;

    gap: 16px;
    align-items: end;

    border: 1px solid var(--line);
    border-radius: 8px;

    background: #fafcfc;
}

.calendar-row .field-block {
    margin: 0;
}

.calendar-note {
    padding-bottom: 4px;
}

.calendar-note strong {
    display: block;

    color: var(--text-soft);

    font-size: 10px;
}

.calendar-note span {
    display: block;

    margin-top: 4px;

    color: var(--muted);

    font-size: 9px;
    line-height: 1.45;
}

.muted-control {
    height: 41px;

    padding: 0 11px;

    display: flex;
    align-items: center;

    border-radius: 5px;

    background: #f2f4f5;

    color: var(--muted);

    font-size: 10px;
}

.deadline-builder {
    display: grid;
    grid-template-columns:
        1.5fr .7fr .9fr .9fr;

    gap: 13px;
}

.crm-offset {
    grid-template-columns:
        1fr 80px 1.3fr;
}

.control-card {
    min-height: 64px;

    margin-bottom: 10px;
    padding: 13px 15px;

    border: 1px solid var(--line);
    border-radius: 8px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;

    background: #fafcfc;
}

.guard-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;

    cursor: pointer;
}

.guard-checkbox input {
    display: none;
}

.guard-box {
    width: 19px;
    height: 19px;

    position: relative;

    border: 1px solid var(--line-strong);
    border-radius: 4px;

    background: #fff;

    flex: 0 0 auto;
}

.guard-checkbox input:checked + .guard-box {
    border-color: var(--brand);

    background: var(--brand);
}

.guard-checkbox input:checked + .guard-box::after {
    content: "✓";

    position: absolute;
    inset: 0;

    display: grid;
    place-items: center;

    color: #fff;

    font-size: 12px;
    font-weight: 800;
}

.guard-checkbox strong,
.control-copy strong {
    display: block;

    color: var(--text);

    font-size: 11px;
    line-height: 1.35;
}

.guard-checkbox small,
.control-copy small {
    display: block;

    margin-top: 3px;

    color: var(--muted);

    font-size: 9px;
    line-height: 1.4;
}

.always-on {
    padding: 5px 8px;

    border-radius: 14px;

    background: #eef8f2;
    color: #4c956a;

    font-size: 9px;

    white-space: nowrap;
}

.preview-block {
    background: #fbfcfc;
}

.schedule-preview {
    display: grid;
    grid-template-columns:
        repeat(5, minmax(0, 1fr));

    gap: 8px;
}

.preview-item {
    min-height: 74px;

    padding: 10px;

    border: 1px solid var(--line);
    border-radius: 7px;

    background: #fff;
}

.preview-number {
    margin-bottom: 6px;

    color: var(--muted);

    font-size: 8px;
}

.preview-date {
    color: var(--text);

    font-size: 12px;
    font-weight: 700;
}

.preview-time {
    margin-top: 3px;

    color: var(--brand-dark);

    font-size: 10px;
}

.bottom-actions {
    margin-top: 20px;

    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.button {
    min-height: 39px;

    padding: 0 16px;

    border: 1px solid transparent;
    border-radius: 5px;

    font-size: 11px;
    font-weight: 650;
}

.button-primary {
    border-color: var(--brand);

    background: var(--brand);
    color: #fff;
}

.button-primary:hover {
    border-color: var(--brand-dark);

    background: var(--brand-dark);
}

.button-light {
    border-color: var(--line-strong);

    background: #fff;
    color: var(--text-soft);
}

.button-test {
    border-color: #c8e7ec;

    background: #eefafb;
    color: var(--brand-dark);
}

.button-large {
    min-width: 160px;
}

.toast {
    position: fixed;
    right: 24px;
    bottom: 24px;

    max-width: 370px;

    padding: 14px 16px;

    border-radius: 9px;

    display: flex;
    align-items: flex-start;
    gap: 11px;

    background: #263138;
    color: #fff;

    box-shadow:
        0 15px 45px rgba(0, 0, 0, .20);

    opacity: 0;

    transform: translateY(25px);

    pointer-events: none;

    transition: .22s ease;

    z-index: 100;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-icon {
    width: 25px;
    height: 25px;

    border-radius: 50%;

    display: grid;
    place-items: center;

    background: var(--brand);

    flex: 0 0 auto;
}

.toast strong {
    display: block;

    font-size: 11px;
}

.toast span {
    display: block;

    margin-top: 3px;

    color: #bdc7cc;

    font-size: 9px;
}


/* ==========================================================
   THEME 2 — DARK RAIL
   ========================================================== */

body.theme-dark {
    --sidebar-bg: #22292e;
    --sidebar-text: #c6d0d5;
    --sidebar-active: rgba(39, 191, 209, .14);

    --bg: #f1f4f5;
}

body.theme-dark .sidebar {
    border-right-color: #303a40;
}

body.theme-dark .brand-name {
    color: #fff;
}

body.theme-dark .brand-product,
body.theme-dark .connection-title,
body.theme-dark .connection-value {
    color: #89979e;
}

body.theme-dark .sidebar-bottom {
    border-top-color: #364148;
}

body.theme-dark .menu-item.active {
    color: #56d5e3;
}


/* ==========================================================
   THEME 3 — UP AIR
   ========================================================== */

body.theme-air {
    --bg: #f7f9f9;
    --radius: 15px;
    --shadow:
        0 10px 40px rgba(35, 55, 65, .035);
}

body.theme-air .sidebar {
    display: none;
}

body.theme-air .workspace {
    width: 100%;
    margin-left: 0;
}

body.theme-air .topbar {
    min-height: 96px;

    padding-left: max(
        28px,
        calc((100vw - 1180px) / 2)
    );

    padding-right: max(
        28px,
        calc((100vw - 1180px) / 2)
    );
}

body.theme-air .air-nav {
    display: flex;
    align-items: center;
    gap: 5px;

    margin-right: auto;
}

body.theme-air .air-nav a {
    padding: 8px 10px;

    border-radius: 7px;

    color: var(--text-soft);
    text-decoration: none;

    font-size: 10px;
    font-weight: 600;
}

body.theme-air .air-nav a.active {
    background: var(--brand-soft);
    color: var(--brand-dark);
}

body.theme-air .topbar-title {
    min-width: 280px;
}

body.theme-air .task-card,
body.theme-air .recurrence-card {
    border-color: #e8edef;
}


/* ==========================================================
   RESPONSIVE
   ========================================================== */

@media (max-width: 1180px) {

    .theme-switcher {
        display: none;
    }

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

    .schedule-preview {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }

    .availability-strip {
        align-items: flex-start;
        flex-direction: column;
    }

    .availability-policy {
        width: 100%;
        min-width: 0;
    }
}

@media (max-width: 900px) {

    .sidebar {
        width: 205px;
    }

    .workspace {
        width: calc(100% - 205px);
        margin-left: 205px;
    }

    .participant-grid,
    .two-columns,
    .three-columns,
    .calendar-row {
        grid-template-columns: 1fr;
    }

    .monthly-builder {
        grid-template-columns: 1fr;
    }

    .builder-column-wide {
        grid-column: auto;
    }

    .topbar {
        align-items: flex-start;
    }

    .topbar-actions .button-test {
        display: none;
    }
}

@media (max-width: 700px) {

    .sidebar {
        display: none;
    }

    .workspace {
        width: 100%;
        margin-left: 0;
    }

    .topbar {
        padding: 14px 16px;
    }

    .topbar h1 {
        font-size: 18px;
    }

    .content {
        width: calc(100% - 20px);
        margin-top: 10px;
    }

    .task-card {
        padding: 19px 15px;
    }

    .recurrence-header,
    .recurrence-block {
        padding-left: 16px;
        padding-right: 16px;
    }

    .recurrence-block {
        grid-template-columns: 1fr;
    }

    .deadline-builder,
    .offset-row,
    .crm-offset {
        grid-template-columns: 1fr;
    }

    .schedule-preview {
        grid-template-columns: 1fr;
    }

    .bottom-actions {
        flex-wrap: wrap;
    }

    .topbar-actions {
        flex-direction: column;
        align-items: flex-end;
    }

    body.theme-air .air-nav {
        display: none;
    }
}

.participant-user-button {
    width: 100%;
    cursor: pointer;
    text-align: left;
}

.participant-user-button:hover {
    border-color: var(--brand);
    background: var(--brand-soft);
}

.participant-user-copy {
    min-width: 0;
    flex: 1;
}

.participant-change {
    margin-left: auto;
    color: var(--brand-dark);
    font-size: 10px;
    font-weight: 650;
}


/* ==========================================================
   FINAL READABILITY
   ========================================================== */

.field-label {
    font-size: 12px;
    line-height: 1.35;
}

.section-kicker {
    font-size: 10px;
}

.status-badge {
    font-size: 11px;
}

.subsection-title {
    font-size: 14px;
}

.participant-title {
    font-size: 12px;
}

.user-name {
    font-size: 13px;
}

.user-role {
    margin-top: 4px;

    font-size: 11px;
    line-height: 1.4;
}

.selector-button {
    font-size: 12px;
}

.queue-user {
    font-size: 11px;
}

.link-button {
    font-size: 11px;
}

.field-hint {
    font-size: 11px;
    line-height: 1.45;
}

.switch-copy {
    font-size: 12px;
}

.switch-copy strong {
    font-size: 12px;
    line-height: 1.4;
}

.switch-copy small {
    margin-top: 3px;

    font-size: 11px;
    line-height: 1.4;
}

.availability-policy > span {
    font-size: 11px;
}

.crm-insert-button {
    font-size: 11px;
}

.palette-title {
    font-size: 12px;
}

.variable-chip {
    font-size: 11px;
}

.palette-note {
    font-size: 11px;
    line-height: 1.45;
}

.accordion-head {
    font-size: 13px;
}

.setting-check {
    font-size: 12px;
}

.recurrence-header p {
    font-size: 12px;
    line-height: 1.45;
}

.block-content h3 {
    font-size: 15px;
}

.block-description {
    font-size: 12px;
    line-height: 1.45;
}

.block-number {
    font-size: 10px;
}

.rule-panel-title {
    font-size: 12px;
}

.offset-title {
    font-size: 11px;
}

.human-rule {
    font-size: 11px;
    line-height: 1.5;
}

.calendar-note strong {
    font-size: 12px;
}

.calendar-note span {
    margin-top: 5px;

    font-size: 11px;
    line-height: 1.5;
}

.muted-control {
    font-size: 11px;
}

.guard-checkbox strong,
.control-copy strong {
    font-size: 12px;
    line-height: 1.45;
}

.guard-checkbox small,
.control-copy small {
    margin-top: 5px;

    font-size: 11px;
    line-height: 1.45;
}

.always-on {
    font-size: 10px;
}

.preview-number {
    font-size: 10px;
}

.preview-date {
    font-size: 13px;
}

.preview-time {
    margin-top: 5px;

    font-size: 12px;
}

.button {
    font-size: 12px;
}


/* ---------- интервал ---------- */

.interval-field {
    display: grid;

    grid-template-columns:
        auto
        minmax(75px, 100px)
        minmax(110px, 1fr);

    gap: 8px;

    align-items: center;
}

.interval-prefix,
.interval-unit {
    color: var(--text-soft);

    font-size: 11px;

    white-space: nowrap;
}

.interval-field input {
    max-width: none;
}


/* ---------- sidebar ---------- */

.brand-product {
    font-size: 12px;
}

.connection-value {
    font-size: 11px;
    line-height: 1.4;
}
