html,
body {
    min-height: 100%;
}

[hidden] {
    display: none !important;
}

:root {
    --news-readable-width: 84ch;
    --news-editor-shell-width: calc(var(--news-readable-width) + 30px);
    --news-related-width: 320px;
}

.news-page .box,
.news-editor-page .box,
.news-view-page .box,
.news-stats-page .box {
    border-top: 3px solid var(--med-accent);
}

.news-toolbar,
.dashboard-news-panel {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    padding: 14px 16px;
    margin-bottom: 14px;
    background: var(--med-surface);
    border: 1px solid var(--med-border);
}

.news-toolbar strong,
.dashboard-news-panel__header h3 {
    display: block;
    margin: 0;
    font-weight: 600;
    color: var(--med-text);
}

.news-toolbar span,
.dashboard-news-panel__header p {
    margin: 3px 0 0;
    color: var(--med-muted);
}

.news-toolbar__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.news-automation-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: start;
    margin: 0 0 18px;
    padding: 14px;
    color: var(--med-ink);
    background: linear-gradient(180deg, rgba(11, 77, 205, .045), rgba(255, 255, 255, .92));
    border: 1px solid var(--med-border);
}

.news-automation-panel__body {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.news-automation-panel__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 14px;
}

.news-automation-panel__eyebrow {
    display: block;
    margin: 0 0 2px;
    color: var(--med-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.news-automation-panel__head strong {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--med-ink);
    font-weight: 700;
}

.news-automation-panel__state {
    display: inline-flex;
    justify-self: end;
    padding: 2px 7px;
    color: var(--med-primary-dark);
    background: rgba(11, 77, 205, .07);
    border-radius: 3px;
    font-size: 12px;
    font-weight: 700;
}

.news-automation-panel__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    color: var(--med-muted);
    font-size: 12px;
}

.news-automation-panel p {
    margin: 0;
    color: var(--med-muted);
    font-size: 13px;
}

.news-automation-panel__actions {
    display: grid;
    justify-items: end;
    gap: 10px;
}

.news-automation-panel__buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.news-automation-panel__buttons form {
    margin: 0;
}

.news-automation-details {
    margin-top: 4px;
}

.news-automation-details summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    width: fit-content;
    max-width: 100%;
    color: var(--med-primary-dark);
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    list-style: none;
}

.news-automation-details summary::-webkit-details-marker {
    display: none;
}

.news-automation-details summary::before {
    content: "";
    width: 13px;
    height: 13px;
    flex: 0 0 13px;
    color: var(--med-muted);
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 18 6-6-6-6'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 18 6-6-6-6'/%3E%3C/svg%3E") center / contain no-repeat;
    transition: transform .16s ease;
}

.news-automation-details[open] summary::before {
    transform: rotate(90deg);
}

.news-automation-details summary span {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 2px 8px;
    background: rgba(11, 77, 205, .06);
    border: 1px solid rgba(11, 77, 205, .12);
    border-radius: 3px;
}

.news-automation-details__list {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

.news-automation-detail {
    display: grid;
    gap: 5px;
    padding: 10px 12px;
    background: var(--med-surface);
    border: 1px solid rgba(119, 146, 181, .26);
    border-left: 3px solid rgba(119, 146, 181, .55);
}

.news-automation-detail--added {
    border-left-color: #00a65a;
}

.news-automation-detail--duplicate {
    border-left-color: #7792B5;
}

.news-automation-detail--old {
    border-left-color: #f0ad4e;
}

.news-automation-detail--ai_skipped {
    border-left-color: #605ca8;
}

.news-automation-detail--low_importance {
    border-left-color: #f0ad4e;
}

.news-automation-detail--error,
.news-automation-detail--unsupported {
    border-left-color: #dd4b39;
}

.news-automation-detail__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    min-width: 0;
}

.news-automation-detail__head a,
.news-automation-detail__head strong {
    color: var(--med-ink);
    font-weight: 700;
}

.news-automation-detail__status {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 2px 7px;
    color: var(--med-primary-dark);
    background: rgba(11, 77, 205, .07);
    border-radius: 3px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.news-automation-detail__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    color: var(--med-muted);
    font-size: 12px;
}

.news-automation-detail p {
    margin: 0;
    color: var(--med-muted);
    font-size: 12px;
    line-height: 1.45;
}

.news-automation-details__empty {
    margin-top: 10px;
    padding: 9px 10px;
    color: var(--med-muted);
    background: rgba(119, 146, 181, .10);
    border: 1px solid rgba(119, 146, 181, .22);
    font-size: 12px;
}

.news-list,
.dashboard-news-list {
    display: grid;
    gap: 10px;
}

.news-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: stretch;
    border: 1px solid var(--med-border);
    border-left: 4px solid var(--med-primary);
    background: var(--med-surface);
}

.news-card--important {
    border-left-color: #f0ad4e;
}

.news-card--urgent {
    border-left-color: #dd4b39;
}

.news-card.is-read {
    opacity: .82;
}

.news-card.is-ai-suggested {
    border-left-style: dotted;
}

.news-card__main {
    display: grid;
    gap: 7px;
    padding: 14px 16px;
    color: var(--med-text);
}

.news-card__main:hover,
.news-card__main:focus {
    color: var(--med-text);
    text-decoration: none;
}

.news-card__flag {
    display: inline-flex;
    width: max-content;
    padding: 3px 8px;
    border-radius: 3px;
    background: var(--med-soft);
    color: var(--med-muted);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.news-card--important .news-card__flag {
    background: rgba(240, 173, 78, .14);
    color: #a56710;
}

.news-card--urgent .news-card__flag {
    background: rgba(221, 75, 57, .14);
    color: #b13a2b;
}

.news-card__title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.25;
}

.news-card__excerpt,
.news-card__meta {
    color: var(--med-muted);
}

.news-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    align-items: center;
}

.news-card__unread {
    color: var(--med-primary);
    font-weight: 600;
}

.news-card__ai-mark,
.news-view__ai-mark {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--med-muted);
    font-size: 12px;
}

.news-origin-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 34px;
    padding: 7px 10px;
    border: 1px solid rgba(11, 77, 205, .18);
    background: var(--med-blue-soft);
    color: var(--med-primary-dark);
    font-weight: 700;
}

.news-card__attachments,
.dashboard-news-item__attachments {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--med-primary-dark);
    font-weight: 600;
}

.news-card__attachments {
    padding: 1px 6px;
    border-radius: 3px;
    background: rgba(11, 77, 205, .07);
}

.news-card__source {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--med-primary-dark);
    font-weight: 600;
}

.dashboard-news-item__attachments {
    margin-left: 6px;
}

.news-card__tools {
    display: flex;
    gap: 6px;
    align-items: center;
    padding: 14px;
}

.news-empty {
    padding: 16px;
    color: var(--med-muted);
    border: 1px dashed var(--med-border);
    background: var(--med-soft);
}

.news-empty-action {
    margin-top: 12px;
}

.news-audience__modes,
.news-audience__groups {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
}

.news-audience__groups {
    margin-top: 10px;
    padding: 12px;
    border: 1px solid var(--med-border);
    background: var(--med-soft);
}

.news-view__heading {
    display: grid;
    gap: 8px;
}

.news-view__heading h2 {
    margin: 0;
    color: var(--med-text);
    font-size: 28px;
    line-height: 1.2;
}

.news-view__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    color: var(--med-muted);
}

.news-view .box-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.news-view .box-tools .inline-form {
    display: inline-flex;
}

.news-view-page .news-view {
    width: min(100%, 1320px);
    margin-right: auto;
    margin-left: auto;
}

.news-editor-page .box {
    width: min(100%, 1320px);
    margin-right: auto;
    margin-left: auto;
}

.news-view-page .box-body {
    padding: 20px 24px 24px;
}

.news-editor-page .box-body {
    padding: 20px 24px 24px;
}

.news-view__body {
    display: grid;
    grid-template-columns: minmax(0, var(--news-readable-width)) minmax(280px, var(--news-related-width));
    gap: 32px;
    align-items: start;
    justify-content: center;
}

.news-editor-layout {
    display: grid;
    grid-template-columns: minmax(0, var(--news-editor-shell-width)) minmax(280px, var(--news-related-width));
    gap: 32px;
    align-items: start;
    justify-content: center;
}

.news-view__article {
    width: 100%;
    margin-right: auto;
    margin-left: auto;
}

.news-editor-field {
    width: 100%;
    margin-right: auto;
    margin-left: auto;
}

.news-editor-main,
.news-editor-sidebar,
.news-editor-panel {
    min-width: 0;
}

.news-editor-main {
    display: grid;
    gap: 16px;
}

.news-editor-sidebar {
    position: sticky;
    top: 16px;
    display: grid;
    gap: 18px;
}

.news-editor-panel + .news-editor-panel {
    padding-top: 18px;
    border-top: 1px solid var(--med-border);
}

.news-editor-panel h3 {
    margin: 0 0 12px;
    color: var(--med-text);
    font-size: 16px;
    line-height: 1.3;
}

.news-ai-panel .settings-note {
    margin: 0 0 10px;
}

.news-voice-actions {
    display: grid;
    gap: 8px;
}

.news-voice-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 32px;
    width: 100%;
}

.news-voice-actions .btn.is-recording {
    color: #8A2D2B;
    border-color: rgba(217, 99, 80, .45);
    background: #FFF5F5;
}

.news-voice-status {
    min-height: 18px;
    color: var(--med-muted);
    font-size: 12px;
    line-height: 1.35;
}

.news-voice-status.is-error {
    color: #8A2D2B;
}

.news-voice-status.is-success {
    color: #1f7a4d;
}

.voice-recording-visualizer {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 7px 9px;
    color: #12345f;
    background: var(--med-surface-soft);
    border: 1px solid rgba(11, 77, 205, .18);
    border-radius: 8px;
}

.voice-recording-visualizer[hidden] {
    display: none !important;
}

.voice-recording-visualizer__dot {
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
    background: #d84c3f;
    border-radius: 999px;
    box-shadow: 0 0 0 0 rgba(216, 76, 63, .35);
    animation: voiceRecordingDot 1.35s ease-out infinite;
}

.voice-recording-visualizer__bars {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-width: 0;
    height: 22px;
    flex: 1 1 auto;
    overflow: hidden;
}

.voice-recording-visualizer__bar {
    width: 3px;
    height: 100%;
    flex: 1 1 0;
    max-width: 5px;
    background: linear-gradient(180deg, #2e86ff 0%, #0b4dcd 100%);
    border-radius: 999px;
    opacity: .84;
    transform: scaleY(.16);
    transform-origin: center;
    transition: transform 70ms linear;
}

.voice-recording-visualizer__time {
    min-width: 42px;
    color: var(--med-muted);
    font-size: 12px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    text-align: right;
}

.voice-recording-visualizer.is-fallback .voice-recording-visualizer__bar {
    animation: voiceRecordingFallback .9s ease-in-out infinite;
    animation-delay: var(--voice-bar-delay, 0ms);
}

.news-voice-wave {
    width: 100%;
}

@keyframes voiceRecordingDot {
    0% {
        box-shadow: 0 0 0 0 rgba(216, 76, 63, .35);
    }

    70% {
        box-shadow: 0 0 0 8px rgba(216, 76, 63, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(216, 76, 63, 0);
    }
}

@keyframes voiceRecordingFallback {
    0%,
    100% {
        transform: scaleY(.22);
    }

    50% {
        transform: scaleY(.95);
    }
}

.news-ai-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.news-ai-actions .btn {
    min-width: 0;
    overflow-wrap: anywhere;
    white-space: normal;
}

.news-ai-result {
    margin-top: 10px;
    padding: 10px;
    color: var(--med-ink);
    background: var(--med-surface-soft);
    border: 1px solid var(--med-border);
    font-size: 13px;
    line-height: 1.45;
    white-space: pre-wrap;
}

.news-ai-result.is-error {
    color: #8A2D2B;
    background: #FFF5F5;
    border-color: rgba(217, 99, 80, .30);
}

.news-source-settings-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.news-source-settings-card {
    display: grid;
    gap: 10px;
    min-height: 216px;
    padding: 13px;
    background: var(--med-surface-soft);
    border: 1px solid var(--med-border);
    border-radius: 6px;
}

.news-source-settings-card__check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
}

.news-source-settings-card__check input {
    margin-top: 3px;
}

.news-source-settings-card__check span {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.news-source-settings-card__check strong {
    color: var(--med-ink);
    font-weight: 700;
    line-height: 1.25;
}

.news-source-settings-card__check em {
    color: var(--med-muted);
    font-size: 12px;
    font-style: normal;
    line-height: 1.35;
}

.news-source-settings-card__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid rgba(119, 146, 181, .24);
    font-size: 12px;
}

.news-source-settings-card__meta span {
    color: var(--med-muted);
}

.news-source-settings-card__meta a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.news-source-settings-card__schedule {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    padding: 9px 10px;
    color: var(--med-muted);
    background: rgba(11, 77, 205, .045);
    border: 1px solid rgba(11, 77, 205, .10);
    border-radius: 4px;
}

.news-source-settings-card__schedule span,
.news-source-settings-card__schedule label {
    display: grid;
    gap: 2px;
    min-width: 0;
    margin: 0;
    color: var(--med-ink);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.25;
}

.news-source-settings-card__schedule strong {
    color: var(--med-primary-dark);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.news-source-settings-card__schedule .form-control {
    height: 30px;
    min-width: 0;
    padding: 4px 7px;
    font-size: 12px;
    font-weight: 600;
}

.news-editor-panel .form-group:last-child,
.news-editor-main .form-group:last-child,
.news-editor-sidebar .form-group:last-child {
    margin-bottom: 0;
}

.news-editor-upload {
    min-height: 156px;
    padding: 18px 14px;
}

.news-editor-attachments .learning-attachment {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
}

.news-editor-attachments .learning-attachment a {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.news-editor-attachments .learning-attachment span {
    grid-column: 1;
}

.news-editor-attachments .learning-attachment button {
    grid-column: 2;
    grid-row: 1 / span 2;
}

.news-editor-field .learning-rich-editor__surface,
.news-editor-field .learning-rich-editor__source {
    box-sizing: border-box;
}

.news-view-page .news-content {
    font-size: 16px;
    line-height: 1.75;
}

.news-view-page .news-content p {
    margin: 0 0 14px;
}

.news-content {
    color: var(--med-text);
    font-size: 15px;
    line-height: 1.65;
}

.news-content img,
.news-content video,
.news-content iframe {
    max-width: 100%;
}

.news-content img {
    height: auto;
}

.news-content table {
    width: 100%;
    max-width: 100%;
}

.news-view__attachments {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid var(--med-border);
}

.news-view__attachments h3 {
    margin: 0 0 12px;
    font-size: 18px;
}

.news-related {
    position: sticky;
    top: 16px;
    display: grid;
    gap: 10px;
}

.news-related h3 {
    margin: 0;
    color: var(--med-text);
    font-size: 16px;
    line-height: 1.3;
}

.news-related__list {
    display: grid;
    gap: 10px;
}

.news-related__item {
    display: grid;
    gap: 6px;
    padding: 12px 13px;
    border: 1px solid var(--med-border);
    border-left: 3px solid var(--med-primary);
    background: var(--med-soft);
    color: var(--med-text);
}

.news-related__item:hover,
.news-related__item:focus {
    color: var(--med-text);
    text-decoration: none;
    background: var(--med-surface);
}

.news-related__item--important {
    border-left-color: #f0ad4e;
}

.news-related__item--urgent {
    border-left-color: #dd4b39;
}

.news-related__item strong {
    font-size: 14px;
    line-height: 1.35;
}

.news-related__item span {
    color: var(--med-muted);
    font-size: 12px;
    line-height: 1.45;
}

.news-related__date {
    font-weight: 600;
}

.news-stats-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.news-stats-summary__item {
    padding: 14px 16px;
    background: var(--med-surface);
    border: 1px solid var(--med-border);
    border-left: 4px solid var(--med-primary);
}

.news-stats-summary__item.is-read {
    border-left-color: #00a65a;
}

.news-stats-summary__item.is-unread {
    border-left-color: #f0ad4e;
}

.news-stats-summary__item span,
.news-stats-table small {
    display: block;
    color: var(--med-muted);
    font-size: 12px;
}

.news-stats-summary__item strong {
    display: block;
    margin-top: 4px;
    color: var(--med-text);
    font-size: 24px;
    line-height: 1.1;
}

.dashboard-news-panel {
    display: grid;
    align-items: stretch;
}

.dashboard-news-panel__header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

.dashboard-news-panel__title {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 12px;
}

.dashboard-news-panel__title a {
    font-size: 13px;
    font-weight: 600;
}

.dashboard-news-list {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 2px;
}

.dashboard-news-item {
    display: grid;
    grid-template-columns: 4px minmax(0, 1fr) auto;
    flex: 0 0 min(360px, calc((100% - 20px) / 3));
    min-width: 260px;
    gap: 12px;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid var(--med-border);
    background: var(--med-soft);
    color: var(--med-text);
}

.dashboard-news-item:hover,
.dashboard-news-item:focus {
    color: var(--med-text);
    text-decoration: none;
    background: var(--med-surface);
}

.dashboard-news-item__marker {
    width: 4px;
    align-self: stretch;
    border-radius: 2px;
    background: var(--med-primary);
}

.dashboard-news-item--important .dashboard-news-item__marker {
    background: #f0ad4e;
}

.dashboard-news-item--urgent .dashboard-news-item__marker {
    background: #dd4b39;
}

.dashboard-news-item__body {
    display: grid;
    min-width: 0;
}

.dashboard-news-item__body strong,
.dashboard-news-item__body small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-news-item__body small,
.dashboard-news-empty {
    color: var(--med-muted);
}

.dashboard-news-item__badge {
    padding: 2px 7px;
    border-radius: 3px;
    background: var(--med-primary);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
}

@media (max-width: 1199px) {
    .news-view__body,
    .news-editor-layout {
        grid-template-columns: minmax(0, var(--news-readable-width));
    }

    .news-related,
    .news-editor-sidebar {
        position: static;
    }

    .news-related__list {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }

    .news-source-settings-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .news-toolbar,
    .dashboard-news-panel__header {
        align-items: stretch;
        flex-direction: column;
    }

    .news-toolbar__actions {
        justify-content: flex-start;
    }

    .news-automation-panel {
        grid-template-columns: minmax(0, 1fr);
    }

    .news-automation-panel__actions {
        justify-items: start;
    }

    .news-automation-panel__state {
        justify-self: start;
    }

    .news-automation-panel__buttons {
        justify-content: flex-start;
    }

    .news-card {
        grid-template-columns: minmax(0, 1fr);
    }

    .news-card__tools {
        justify-content: flex-start;
        padding-top: 0;
    }

    .dashboard-news-item {
        grid-template-columns: 4px minmax(0, 1fr);
        flex: 1 1 auto;
        min-width: 0;
    }

    .dashboard-news-list {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        overflow-x: visible;
    }

    .dashboard-news-item__badge {
        grid-column: 2;
        width: max-content;
    }

    .news-stats-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .news-view-page .box-body {
        padding: 14px;
    }

    .news-editor-page .box-body {
        padding: 14px;
    }

    .news-view-page .news-content {
        font-size: 15px;
        line-height: 1.65;
    }

    .news-view__body,
    .news-editor-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .news-editor-field {
        width: 100%;
    }

    .news-source-settings-grid {
        grid-template-columns: 1fr;
    }

    .news-source-settings-card__schedule {
        grid-template-columns: 1fr;
    }
}

.crm-date-with-distance,
.crm-date-distance-group {
    display: inline-flex;
    align-items: baseline;
    white-space: nowrap;
}

.crm-date-with-distance {
    gap: 4px;
    max-width: 100%;
    vertical-align: baseline;
}

.crm-date-with-distance__suffix {
    white-space: nowrap;
}

.crm-date-distance-group {
    gap: 3px;
    vertical-align: baseline;
}

.crm-date-distance-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 1.1em;
    width: 1.1em;
    min-width: 1.1em;
    color: inherit;
    cursor: help;
    font-size: 1em;
    font-weight: inherit;
    line-height: 1;
    text-transform: none;
    vertical-align: -1px;
    white-space: nowrap;
}

.crm-date-distance-value {
    white-space: nowrap;
}

.learning-page .box,
.learning-editor-page .box,
.learning-material-view .box,
.learning-test-page .box,
.learning-reports .box {
    border-top: 3px solid var(--med-accent);
}

.learning-toolbar {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    padding: 14px 16px;
    margin-bottom: 14px;
    background: var(--med-surface);
    border: 1px solid var(--med-border);
}

.learning-toolbar strong {
    display: block;
    font-weight: 600;
    color: var(--med-text);
}

.learning-toolbar span {
    color: var(--med-muted);
}

.learning-toolbar__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.learning-section-box--disabled {
    opacity: .72;
}

.learning-section-description {
    padding: 12px 16px 0;
    color: var(--med-muted);
}

.learning-material-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.learning-material-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 160px;
    padding: 14px;
    border: 1px solid var(--med-border);
    border-left: 3px solid var(--med-primary);
    background: var(--med-surface);
}

.learning-material-card__head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: flex-start;
}

.learning-material-card__head a {
    font-size: 16px;
    font-weight: 600;
    color: var(--med-text);
}

.learning-material-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    color: var(--med-muted);
}

.learning-material-card__progress {
    display: grid;
    gap: 4px;
    color: var(--med-muted);
}

.learning-material-card__retry {
    color: var(--med-text);
}

.learning-material-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
}

.learning-empty {
    padding: 16px;
    color: var(--med-muted);
    border: 1px dashed var(--med-border);
    background: var(--med-soft);
}

.learning-empty-action {
    margin-top: 12px;
}

.learning-form-grid {
    display: grid;
    gap: 12px;
}

.learning-form-grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.learning-form-grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.learning-form-grid--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.learning-form-grid__wide {
    grid-column: span 2;
}

.learning-flags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    margin: 6px 0 16px;
}

.crm-check {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    margin: 0;
    font-weight: 600;
}

.learning-rich-editor {
    border: 1px solid var(--med-border);
    background: var(--med-surface);
}

.learning-rich-editor__toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 8px;
    border-bottom: 1px solid var(--med-border);
    background: var(--med-soft);
}

.learning-rich-editor__toolbar button {
    min-width: 32px;
    height: 30px;
    padding: 0 8px;
    border: 1px solid var(--med-border);
    background: var(--med-surface);
    color: var(--med-text);
    font-weight: 600;
}

.learning-rich-editor__surface,
.learning-rich-editor__source {
    min-height: 320px;
    padding: 14px;
    border: 0;
    outline: none;
    background: var(--med-surface);
    color: var(--med-text);
}

.learning-rich-editor__surface img,
.learning-content img {
    max-width: 100%;
    height: auto;
}

.learning-rich-editor__surface video,
.learning-content video,
.learning-content iframe {
    max-width: 100%;
}

.learning-upload {
    display: grid;
    place-items: center;
    gap: 6px;
    min-height: 132px;
    padding: 20px;
    border: 1px dashed var(--med-primary);
    background: var(--med-soft);
    color: var(--med-text);
    text-align: center;
    cursor: pointer;
}

.learning-upload.is-dragover {
    border-color: var(--med-accent);
    background: rgba(0, 188, 212, .08);
}

.learning-upload input {
    display: none;
}

.learning-upload i {
    color: var(--med-primary);
    font-size: 24px;
}

.learning-upload-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.learning-upload-list span {
    padding: 4px 8px;
    border: 1px solid var(--med-border);
    background: var(--med-surface);
}

.learning-attachments {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

.learning-attachments--view {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.learning-attachment {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
    padding: 9px 10px;
    border: 1px solid var(--med-border);
    background: var(--med-surface);
}

.learning-attachment--link {
    justify-content: flex-start;
    color: var(--med-text);
}

.learning-attachment--link small {
    margin-left: auto;
    color: var(--med-muted);
}

.learning-view-head,
.learning-test-panel {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

.learning-view-head > div,
.learning-test-panel > div {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.learning-content {
    padding: 16px;
    border-left: 3px solid var(--med-primary);
    background: var(--med-soft);
    color: var(--med-text);
}

.learning-content table {
    width: 100%;
    max-width: 100%;
}

.learning-subtitle {
    margin-top: 20px;
    font-weight: 600;
}

.learning-test-panel {
    margin-top: 18px;
    padding: 14px;
    border: 1px solid var(--med-border);
    background: var(--med-surface);
}

.learning-test-panel strong {
    font-weight: 600;
}

.learning-test-panel__message {
    color: var(--med-muted);
}

.learning-options-editor {
    display: grid;
    gap: 8px;
}

.learning-option-row {
    display: grid;
    grid-template-columns: 36px minmax(180px, 1fr) minmax(180px, 260px) 28px;
    gap: 8px;
    align-items: center;
}

.learning-current-media {
    margin-bottom: 8px;
}

.learning-test-question {
    padding: 14px;
    margin-bottom: 14px;
    border: 1px solid var(--med-border);
    background: var(--med-surface);
}

.learning-test-question legend {
    width: auto;
    padding: 0 6px;
    margin-bottom: 10px;
    border: 0;
    font-size: 16px;
    font-weight: 600;
}

.learning-question-media img {
    max-width: 360px;
    width: 100%;
    height: auto;
    margin-bottom: 10px;
}

.learning-test-options {
    display: grid;
    gap: 8px;
}

.learning-test-option {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 10px;
    border: 1px solid var(--med-border);
    background: var(--med-soft);
    font-weight: 500;
}

.learning-attempt-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}

.learning-attempt-summary > div {
    padding: 10px 12px;
    border: 1px solid var(--med-border);
    background: var(--med-soft);
}

.learning-attempt-summary span {
    display: block;
    color: var(--med-muted);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.learning-attempt-summary strong {
    display: block;
    margin-top: 4px;
    color: var(--med-text);
    font-weight: 600;
}

.learning-attempt-list {
    display: grid;
    gap: 12px;
}

.learning-attempt-answer {
    border: 1px solid var(--med-border);
    border-left: 4px solid var(--med-muted);
    background: var(--med-surface);
}

.learning-attempt-answer--correct {
    border-left-color: #229954;
}

.learning-attempt-answer--wrong {
    border-left-color: #d9534f;
}

.learning-attempt-answer--text {
    border-left-color: var(--med-primary);
}

.learning-attempt-answer__head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    padding: 12px;
    border-bottom: 1px solid var(--med-border);
    background: var(--med-soft);
}

.learning-attempt-answer__head > div {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.learning-attempt-answer__head strong {
    color: var(--med-text);
    font-weight: 600;
}

.learning-attempt-answer__number {
    display: inline-grid;
    flex: 0 0 28px;
    place-items: center;
    width: 28px;
    height: 28px;
    color: var(--med-primary);
    border: 1px solid var(--med-border);
    background: var(--med-surface);
    font-weight: 600;
}

.learning-attempt-media,
.learning-attempt-options,
.learning-attempt-text-answer,
.learning-attempt-note {
    margin: 12px;
}

.learning-attempt-media video {
    max-width: 100%;
}

.learning-attempt-options {
    display: grid;
    gap: 8px;
}

.learning-attempt-option {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 9px 10px;
    border: 1px solid var(--med-border);
    background: var(--med-soft);
}

.learning-attempt-option i {
    color: var(--med-muted);
}

.learning-attempt-option.is-correct {
    border-color: rgba(34, 153, 84, .32);
    background: rgba(34, 153, 84, .08);
}

.learning-attempt-option.is-correct i {
    color: #229954;
}

.learning-attempt-option.is-wrong {
    border-color: rgba(217, 83, 79, .36);
    background: rgba(217, 83, 79, .08);
}

.learning-attempt-option.is-wrong i {
    color: #d9534f;
}

.learning-attempt-option span {
    color: var(--med-text);
}

.learning-attempt-option small {
    display: block;
    margin-top: 4px;
}

.learning-attempt-option__badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 4px;
}

.learning-attempt-option__badges span {
    padding: 2px 6px;
    color: var(--med-primary);
    border: 1px solid var(--med-border);
    background: var(--med-surface);
    font-size: 11px;
    font-weight: 600;
}

.learning-attempt-text-answer {
    padding: 10px 12px;
    border: 1px solid var(--med-border);
    background: var(--med-soft);
}

.learning-attempt-text-answer span {
    color: var(--med-muted);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.learning-attempt-text-answer p {
    margin: 6px 0 0;
    color: var(--med-text);
}

.learning-attempt-note {
    padding: 8px 10px;
    border: 1px solid var(--med-border);
    color: var(--med-muted);
    background: var(--med-soft);
}

.learning-attempt-note--wrong {
    color: #a94442;
    border-color: rgba(217, 83, 79, .36);
    background: rgba(217, 83, 79, .08);
}

.learning-settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.inline-form {
    display: inline;
}

@media (max-width: 767px) {
    .learning-toolbar,
    .learning-view-head,
    .learning-test-panel {
        align-items: stretch;
        flex-direction: column;
    }

    .learning-form-grid--2,
    .learning-form-grid--3,
    .learning-form-grid--4,
    .learning-settings-grid {
        grid-template-columns: 1fr;
    }

    .learning-form-grid__wide {
        grid-column: span 1;
    }

    .learning-option-row {
        grid-template-columns: 32px 1fr;
    }

    .learning-option-row input[type="file"],
    .learning-option-row a {
        grid-column: 2;
    }

    .learning-attempt-answer__head {
        align-items: stretch;
        flex-direction: column;
    }

    .learning-attempt-option {
        grid-template-columns: 22px minmax(0, 1fr);
    }

    .learning-attempt-option__badges {
        grid-column: 2;
        justify-content: flex-start;
    }
}

.user-invite-layout {
    display: grid;
    gap: 14px;
}

.user-invite-hint {
    margin: 8px 0 0;
    color: #66758d;
    font-size: 13px;
}

.user-pending-invitations {
    margin: 0 0 18px;
    border: 1px solid #d7e3f1;
    background: #f8fbff;
}

.user-pending-invitations__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-bottom: 1px solid #d7e3f1;
    color: #162840;
    font-weight: 600;
}

.user-pending-invitations__header span {
    display: inline-flex;
    min-width: 24px;
    height: 22px;
    align-items: center;
    justify-content: center;
    border: 1px solid #bcd2ee;
    background: #eef6ff;
    color: #0b4b8f;
    font-size: 12px;
    font-weight: 600;
}

.user-invitation-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 230px;
    gap: 20px;
    align-items: start;
}

.user-invitation-card__main {
    min-width: 0;
}

.user-invitation-card__qr {
    border: 1px solid #d7e3f1;
    background: #f8fbff;
    padding: 14px;
    text-align: center;
}

.registration-qr {
    display: flex;
    justify-content: center;
    min-height: 190px;
}

.registration-qr svg,
.registration-qr canvas,
.registration-qr img {
    max-width: 190px;
    max-height: 190px;
}

.user-invitation-card__qr-label {
    margin-top: 10px;
    color: #5d6d84;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.user-invitation-link {
    margin-top: 16px;
}

.user-invitation-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.user-invitation-actions form {
    display: inline-block;
    margin: 0;
}

.registration-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 16px;
}

.registration-summary > div {
    border: 1px solid #d7e3f1;
    background: #f8fbff;
    padding: 10px 12px;
}

.registration-summary strong {
    display: block;
    margin-bottom: 3px;
    color: #66758d;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.registration-summary span {
    color: #13243a;
    font-weight: 600;
}

body.medem-theme-dark .user-pending-invitations,
body.medem-theme-dark .user-invitation-card__qr,
body.medem-theme-dark .registration-summary > div {
    border-color: #33445f;
    background: #172235;
}

body.medem-theme-dark .user-pending-invitations__header {
    border-color: #33445f;
    color: #e8eef8;
}

body.medem-theme-dark .user-invite-hint,
body.medem-theme-dark .user-invitation-card__qr-label,
body.medem-theme-dark .registration-summary strong {
    color: #95a4ba;
}

body.medem-theme-dark .registration-summary span {
    color: #e8eef8;
}

@media (max-width: 767px) {
    .user-invitation-card {
        grid-template-columns: 1fr;
    }

    .registration-summary {
        grid-template-columns: 1fr;
    }
}

:root {
    --med-primary: #0B4DCD;
    --med-primary-dark: #06306F;
    --med-teal: #05B8B6;
    --med-teal-soft: #E7FAF8;
    --med-blue-soft: #EDF5FF;
    --med-bg: #F3F7FB;
    --med-surface: #FFFFFF;
    --med-surface-soft: #F8FBFD;
    --med-border: #DDE7F1;
    --med-ink: #16233A;
    --med-muted: #62748A;
    --med-coral: #D85A45;
    --med-coral-hover: #C94D3B;
    --med-shadow: 0 10px 28px rgba(6, 48, 111, .07);
}

body:not(.medem-login-page) {
    font-family: "Helvetica Neue", Arial, sans-serif;
    background: #ecf0f5;
    color: #333;
    border-top: 0 !important;
}

.medem-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    width: 180px;
    min-height: 64px;
    padding: 8px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 14px 28px rgba(15, 23, 42, .18);
    line-height: 1;
}

.medem-brand__image {
    display: block;
    width: 100%;
    height: auto;
    max-height: 100%;
    filter: drop-shadow(0 1px 1px rgba(15, 23, 42, .22));
    object-fit: contain;
}

.fa {
    display: inline-flex;
    width: 1em;
    height: 1em;
    align-items: center;
    justify-content: center;
    font-style: normal;
    line-height: 1;
    vertical-align: -.125em;
}

.fa-fw {
    width: 1.28571429em;
}

.fa > .nbm-lucide-icon {
    display: block;
    width: 1em;
    height: 1em;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.fa-spin > .nbm-lucide-icon {
    animation: nbm-lucide-spin 1s linear infinite;
}

@keyframes nbm-lucide-spin {
    to {
        transform: rotate(360deg);
    }
}

.medem-brand__name {
    color: #ff5636;
    font-size: 23px;
    font-weight: 900;
    letter-spacing: .04em;
}

.medem-brand__sub {
    margin-top: 5px;
    color: #cbd5e1;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .22em;
}

.main-header .logo .medem-brand {
    min-width: 0;
    min-height: 0;
    width: 184px;
    height: 42px;
    padding: 4px 10px;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.main-header .logo .logo-mini.medem-brand {
    width: 50px;
    padding: 4px;
}

.main-header .logo .logo-lg.medem-brand {
    flex-direction: row;
    justify-content: flex-start;
    gap: 8px;
}

.main-header .logo .medem-brand__image {
    height: 34px;
}

.main-header .logo .nbm-header-brand__icon {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
}

.nbm-header-brand__wordmark {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1;
}

.nbm-header-brand__wordmark strong {
    color: #123a77;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: .045em;
}

.nbm-header-brand__wordmark small {
    margin-top: 3px;
    color: #64748b;
    font-size: 7px;
    font-weight: 700;
    letter-spacing: .14em;
}

.main-header .logo .logo-mini.medem-brand .medem-brand__image {
    width: 34px;
    height: 34px;
}

.main-header .logo .logo-mini.medem-brand .medem-brand__name {
    font-size: 22px;
}

.main-header .logo .medem-brand__name {
    color: #fff;
    font-size: 20px;
    letter-spacing: .06em;
}

.main-header .logo .medem-brand__sub {
    color: rgba(255, 255, 255, .55);
    font-size: 8px;
    margin-top: 3px;
}

.medem-login-page {
    min-height: 100vh;
    margin: 0;
    font-family: "Helvetica Neue", Arial, sans-serif;
    background:
        radial-gradient(circle at 85% 20%, rgba(255, 116, 74, .18), transparent 7%),
        radial-gradient(circle at 12% 83%, rgba(55, 126, 172, .22), transparent 8%),
        radial-gradient(circle at 88% 90%, rgba(175, 205, 240, .28), transparent 22%),
        linear-gradient(135deg, #453344 0%, #243654 36%, #263d60 100%);
    color: #fff;
    overflow: hidden;
}

.crm-auth-page {
    width: 100%;
    min-height: 100vh;
    padding: 42px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.crm-auth {
    width: min(1040px, 100%);
}

.crm-auth__panel {
    display: grid;
    grid-template-columns: minmax(360px, 1.05fr) minmax(380px, .9fr);
    min-height: 286px;
    overflow: hidden;
    border-radius: 18px;
    background: rgba(20, 31, 51, .72);
    box-shadow: 0 30px 72px rgba(12, 21, 36, .32);
    backdrop-filter: blur(18px);
}

.crm-auth__intro {
    position: relative;
    padding: 46px 52px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, 0)),
        rgba(18, 30, 50, .58);
}

.crm-auth__intro::after {
    content: "";
    position: absolute;
    top: 28px;
    right: 28px;
    width: 105px;
    height: 82px;
    border-radius: 18px;
    background: rgba(255, 255, 255, .08);
    transform: rotate(14deg);
}

.crm-auth__brand.medem-brand {
    width: 260px;
    min-height: 0;
    padding: 0;
    margin-bottom: 24px;
    align-items: flex-start;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
}

.crm-auth__brand .medem-brand__image {
    width: 250px;
    max-height: 96px;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, .2));
}

.crm-auth__eyebrow {
    margin-bottom: 10px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .76);
}

.crm-auth__title {
    margin: 0 0 14px;
    font-size: 38px;
    line-height: 1.05;
    color: #fff;
    font-weight: 800;
}

.crm-auth__text {
    max-width: 390px;
    margin: 0;
    color: rgba(255, 255, 255, .84);
    font-size: 15px;
    line-height: 1.55;
    font-weight: 600;
}

.crm-auth__form {
    padding: 48px 48px 42px;
    background: #f7f9fc;
    color: #0f172a;
}

.crm-auth__field + .crm-auth__field {
    margin-top: 22px;
}

.crm-auth__label {
    display: block;
    margin: 0 0 12px;
    color: #60738a;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.crm-auth__control {
    display: flex;
    align-items: center;
    border-bottom: 1px solid #d4deeb;
    background: #f3f6fa;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .78);
}

.crm-auth__control .form-control {
    height: 40px;
    padding: 4px 14px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: #243244;
    font-size: 14px;
}

.crm-auth__control .form-control::placeholder {
    color: #9a9a9a;
}

.crm-auth__control .form-control:focus {
    box-shadow: none;
}

.crm-auth__control .fa {
    width: 34px;
    text-align: right;
    color: #53657d;
}

.crm-auth__submit {
    height: 52px;
    margin-top: 30px;
    border: 0;
    border-radius: 11px;
    background: #e84d3a;
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    box-shadow: none;
}

.crm-auth__submit:hover,
.crm-auth__submit:focus {
    background: #d94332;
    color: #fff;
}

.medem-error-page {
    min-height: 100vh;
    margin: 0;
    font-family: "Helvetica Neue", Arial, sans-serif;
    background: var(--med-bg);
    color: var(--med-ink);
}

.crm-error-shell {
    width: min(1160px, calc(100% - 32px));
    margin: 0 auto;
    padding: 28px 0 38px;
}

.crm-error-header {
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
    padding: 10px 14px;
    background: var(--med-surface);
    border: 1px solid var(--med-border);
    box-shadow: var(--med-shadow);
}

.crm-error-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--med-primary-dark);
    font-weight: 600;
    text-decoration: none;
}

.crm-error-brand:hover,
.crm-error-brand:focus {
    color: var(--med-primary-dark);
    text-decoration: none;
}

.crm-error-brand img {
    width: 174px;
    height: auto;
    padding: 6px 10px;
    display: block;
    background: #123a77;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, .14);
}

.crm-error-brand span {
    padding-left: 12px;
    border-left: 1px solid var(--med-border);
    color: var(--med-muted);
    font-size: 12px;
    letter-spacing: .08em;
}

.crm-error-header__meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}

.crm-error-header__meta span {
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    color: var(--med-primary-dark);
    background: var(--med-blue-soft);
    border: 1px solid rgba(11, 77, 205, .13);
    font-size: 12px;
    font-weight: 500;
}

.crm-error-summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 210px;
    gap: 16px;
    margin-bottom: 14px;
    padding: 22px;
    background: var(--med-surface);
    border-top: 3px solid var(--med-coral);
    border-right: 1px solid var(--med-border);
    border-bottom: 1px solid var(--med-border);
    border-left: 1px solid var(--med-border);
    box-shadow: var(--med-shadow);
}

.crm-error-summary__label {
    margin-bottom: 8px;
    color: var(--med-muted);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.crm-error-summary h1 {
    margin: 0 0 10px;
    color: var(--med-ink);
    font-size: 28px;
    line-height: 1.18;
    font-weight: 600;
}

.crm-error-summary p {
    margin: 0;
    color: #394961;
    font-size: 14px;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.crm-error-summary__status {
    display: grid;
    align-content: center;
    justify-items: end;
    gap: 6px;
    text-align: right;
}

.crm-error-summary__status strong {
    color: var(--med-coral);
    font-size: 46px;
    line-height: 1;
    font-weight: 600;
}

.crm-error-summary__status span {
    color: var(--med-muted);
    font-size: 12px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.crm-error-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 14px;
}

.crm-error-fact {
    min-width: 0;
    padding: 10px 12px;
    background: var(--med-surface);
    border: 1px solid var(--med-border);
}

.crm-error-fact span {
    display: block;
    margin-bottom: 6px;
    color: var(--med-muted);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.crm-error-fact strong {
    display: block;
    color: var(--med-ink);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.crm-error-panel {
    margin-bottom: 14px;
    background: var(--med-surface);
    border: 1px solid var(--med-border);
    box-shadow: var(--med-shadow);
}

.crm-error-panel__head {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--med-border);
}

.crm-error-panel__head h2 {
    margin: 0;
    color: var(--med-ink);
    font-size: 15px;
    font-weight: 600;
}

.crm-error-panel__head span {
    min-width: 0;
    color: var(--med-muted);
    font-size: 12px;
    overflow-wrap: anywhere;
    text-align: right;
}

.crm-error-code {
    padding: 8px 0;
    overflow-x: auto;
    background: #fbfdff;
}

.crm-error-code__line {
    display: grid;
    grid-template-columns: 62px minmax(720px, 1fr);
    min-height: 28px;
    align-items: start;
    font-family: Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 12px;
    line-height: 1.5;
}

.crm-error-code__line span {
    padding: 5px 12px;
    color: #7d8da0;
    text-align: right;
    user-select: none;
}

.crm-error-code__line code {
    display: block;
    padding: 5px 12px;
    color: #243244;
    background: transparent;
    white-space: pre;
}

.crm-error-code__line.is-active {
    background: #FDEDE9;
}

.crm-error-code__line.is-active span {
    color: #8E2E1F;
    font-weight: 600;
}

.crm-error-list {
    display: grid;
}

.crm-error-list__item {
    min-width: 0;
    padding: 11px 12px;
    border-bottom: 1px solid var(--med-border);
}

.crm-error-list__item:last-child {
    border-bottom: 0;
}

.crm-error-list__item strong,
.crm-error-list__item span,
.crm-error-list__item small {
    display: block;
    overflow-wrap: anywhere;
}

.crm-error-list__item strong {
    color: var(--med-ink);
    font-size: 13px;
    font-weight: 600;
}

.crm-error-list__item span {
    margin-top: 4px;
    color: #394961;
    font-size: 13px;
}

.crm-error-list__item small {
    margin-top: 5px;
    color: var(--med-muted);
}

.crm-error-trace {
    display: grid;
}

.crm-error-trace__item {
    border-bottom: 1px solid var(--med-border);
}

.crm-error-trace__item:last-child {
    border-bottom: 0;
}

.crm-error-trace__item summary {
    display: grid;
    grid-template-columns: 34px minmax(180px, .7fr) minmax(220px, 1fr);
    gap: 8px;
    align-items: center;
    min-height: 42px;
    padding: 8px 12px;
    cursor: pointer;
    list-style: none;
}

.crm-error-trace__item summary::-webkit-details-marker {
    display: none;
}

.crm-error-trace__item summary span {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--med-primary-dark);
    background: var(--med-blue-soft);
    border: 1px solid rgba(11, 77, 205, .14);
    font-size: 11px;
    font-weight: 600;
}

.crm-error-trace__item summary strong,
.crm-error-trace__item summary em {
    min-width: 0;
    font-style: normal;
    overflow-wrap: anywhere;
}

.crm-error-trace__item summary strong {
    color: var(--med-ink);
    font-size: 13px;
    font-weight: 500;
}

.crm-error-trace__item summary em {
    color: var(--med-muted);
    font-size: 12px;
}

.crm-error-trace__item pre,
.crm-error-plain {
    margin: 0;
    padding: 10px 12px 12px 54px;
    color: #2b3748;
    background: #fbfdff;
    border: 0;
    border-top: 1px solid var(--med-border);
    border-radius: 0;
    font-family: Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 12px;
    line-height: 1.45;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.crm-error-plain {
    max-height: 420px;
    overflow: auto;
    padding: 12px;
}

.crm-error-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: flex-start;
}

.wrapper {
    min-height: 100vh;
    background: #ecf0f5;
}

.main-header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1030;
    height: 42px;
}

.main-header .logo {
    background: #222d32;
    color: #fff;
    border-bottom: 0 solid transparent;
    height: 42px;
    line-height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.main-header .navbar {
    background: #dd4b39;
    min-height: 42px;
    height: 42px;
}

.navbar-nav > li > a {
    color: #fff;
    padding-top: 11px;
    padding-bottom: 11px;
}

.main-header .sidebar-toggle {
    width: 44px;
    height: 42px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff !important;
    background: transparent !important;
    border-right: 0 !important;
    transition: background-color .15s ease;
}

.main-header .sidebar-toggle:before {
    content: none !important;
}

.skin-black .main-header .navbar .sidebar-toggle:hover,
.skin-black .main-header .navbar .sidebar-toggle:focus,
.skin-black .main-header .navbar .sidebar-toggle:active,
.skin-black .main-header > .navbar > .sidebar-toggle:hover,
.skin-black .main-header > .navbar > .sidebar-toggle:focus,
.skin-black .main-header > .navbar > .sidebar-toggle:active,
.main-header .sidebar-toggle:hover,
.main-header .sidebar-toggle:focus,
.main-header .sidebar-toggle:active {
    color: #fff !important;
    background-color: rgba(15, 23, 42, .28) !important;
    background-image: none !important;
}

.medem-menu-icon {
    width: 18px;
    height: 14px;
    display: inline-flex;
    flex-direction: column;
    justify-content: space-between;
}

.medem-menu-icon span {
    display: block;
    height: 2px;
    border-radius: 2px;
    background: #fff;
    box-shadow: 0 1px 1px rgba(15, 23, 42, .22);
}

.main-sidebar {
    position: fixed !important;
    top: 0;
    bottom: 0;
    left: 0;
    width: 230px;
    min-height: 100vh;
    height: 100vh;
    box-sizing: border-box;
    overflow: visible;
    background: #222d32;
    padding-top: 52px;
}

.main-sidebar .sidebar {
    min-height: calc(100vh - 52px);
    height: calc(100vh - 52px);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    padding-bottom: 12px;
}

.sidebar-menu-main,
.sidebar-menu-bottom {
    flex: 0 0 auto;
}

.sidebar-menu-bottom {
    margin-top: auto;
}

.content-wrapper {
    min-height: 100vh !important;
    box-sizing: border-box;
    padding-top: 42px;
    background: #ecf0f5;
}

.content-header {
    padding: 18px 16px 0;
}

.content-header > .breadcrumb {
    max-width: min(56vw, 760px);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 4px 0;
    padding: 4px 0;
    line-height: 1.2;
}

.content-header > .breadcrumb > li {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    text-transform: none;
}

.content-header > .breadcrumb > li > a,
.content-header > .breadcrumb > li.active {
    min-width: 0;
    overflow: hidden;
    color: var(--med-muted);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.content-header > .breadcrumb .fa,
.content-header > .breadcrumb .glyphicon,
.content-header > .breadcrumb .ion {
    flex: 0 0 auto;
    margin-right: 5px;
}

.content-header > .breadcrumb > li > a:hover,
.content-header > .breadcrumb > li > a:focus {
    color: var(--med-primary-dark);
    text-decoration: none;
}

.content-header > .breadcrumb > li + li:before {
    content: "/";
    padding: 0 8px;
    color: #9aabc0;
}

.content-header > .breadcrumb > li.active {
    max-width: 420px;
    color: var(--med-muted);
}

.content {
    padding: 15px;
}

.sidebar-menu > li > a {
    color: #b8c7ce;
}

.sidebar-menu > li.active > a,
.sidebar-menu > li > a:hover {
    color: #fff;
    background: #1e282c;
    border-left-color: #dd4b39;
}

@media (min-width: 768px) {
    .sidebar-mini.sidebar-collapse .main-header .logo,
    .sidebar-mini.sidebar-collapse .main-header .logo .logo-mini.medem-brand,
    .sidebar-mini.sidebar-collapse .main-header .navbar .sidebar-toggle {
        width: 50px !important;
    }

    .sidebar-mini.sidebar-collapse .main-header .logo > .logo-mini {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .sidebar-mini.sidebar-collapse .main-header .logo .logo-mini.medem-brand,
    .sidebar-mini.sidebar-collapse .main-header .navbar .sidebar-toggle {
        height: 42px;
        padding: 0 !important;
        display: flex !important;
        align-items: center;
        justify-content: center;
    }

    .skin-black.sidebar-mini.sidebar-collapse .main-sidebar,
    .skin-black.sidebar-mini.sidebar-collapse .sidebar,
    .skin-black.sidebar-mini.sidebar-collapse .sidebar-menu,
    .skin-black.sidebar-mini.sidebar-collapse .sidebar-menu > li {
        overflow: visible !important;
    }

    .skin-black.sidebar-mini.sidebar-collapse .main-sidebar {
        height: 100vh;
        min-height: 100vh;
    }

    .skin-black.sidebar-mini.sidebar-collapse .sidebar-menu > li > a {
        width: 50px;
        min-height: 44px;
        margin: 0;
        padding: 0 !important;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0;
        border-radius: 0;
    }

    .skin-black.sidebar-mini.sidebar-collapse .sidebar-menu > li > a > i {
        flex: 0 0 50px;
        width: 50px;
        margin: 0;
        text-align: center;
        line-height: 44px;
    }

    .skin-black.sidebar-mini.sidebar-collapse .sidebar-menu > li:hover > a > span:not(.pull-right-container) {
        display: block !important;
        position: absolute !important;
        top: 0 !important;
        left: 50px !important;
        width: auto !important;
        min-width: 190px;
        min-height: 44px;
        margin-left: 0 !important;
        padding: 0 16px !important;
        transform: none !important;
        background: #1e293b !important;
        color: #fff !important;
        line-height: 44px;
        white-space: nowrap;
        box-shadow: 0 10px 22px rgba(15, 23, 42, .22);
        z-index: 1100;
    }
}

.content-header > .breadcrumb {
    top: 12px;
}

.box {
    border-top: 3px solid #dd4b39;
    border-radius: 3px;
    box-shadow: 0 2px 7px rgba(15, 23, 42, .08);
}

.box-header.with-border.bg-fa {
    background: #fbfbfc;
    border-bottom: 1px solid #e8edf3;
}

.form-control {
    border-color: #d9e0e8;
    box-shadow: inset 0 1px 1px rgba(15, 23, 42, .03);
}

label,
.control-label {
    font-weight: 600;
}

.form-control:focus {
    border-color: rgba(221, 75, 57, .48);
    box-shadow: 0 0 0 3px rgba(221, 75, 57, .08);
}

.medem-native-select {
    display: none !important;
}

.medem-combobox {
    position: relative;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.medem-combobox__trigger {
    width: 100%;
    min-width: 0;
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 12px;
    overflow: hidden;
    color: var(--med-ink);
    background: #fff;
    border: 1px solid var(--med-border);
    border-radius: 4px;
    font-weight: 400;
    text-align: left;
}

.medem-combobox__trigger:hover,
.medem-combobox__trigger:focus {
    border-color: rgba(11, 77, 205, .42);
    box-shadow: 0 0 0 3px rgba(11, 77, 205, .10);
    outline: 0;
}

.medem-combobox__value {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.medem-combobox__value.is-placeholder {
    color: #8a97a8;
}

.medem-combobox__icon {
    flex: 0 0 auto;
    color: var(--med-primary-dark);
    font-size: 18px;
}

.medem-combobox__dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    left: 0;
    z-index: 1050;
    padding: 8px;
    background: #fff;
    border: 1px solid var(--med-border);
    box-shadow: 0 16px 34px rgba(6, 48, 111, .14);
}

.medem-combobox.is-open .medem-combobox__dropdown {
    display: block;
}

.medem-combobox__search {
    width: 100%;
    height: 36px;
    padding: 6px 10px;
    color: var(--med-ink);
    background: var(--med-surface-soft);
    border: 1px solid var(--med-border);
    border-radius: 4px;
    font-weight: 400;
    outline: 0;
}

.medem-combobox__search:focus {
    border-color: rgba(11, 77, 205, .42);
    box-shadow: 0 0 0 3px rgba(11, 77, 205, .10);
}

.medem-combobox__list {
    max-height: 220px;
    margin-top: 8px;
    overflow-y: auto;
}

.medem-combobox__group {
    border: 1px solid var(--med-border);
    border-radius: 5px;
    overflow: hidden;
}

.medem-combobox__group + .medem-combobox__group,
.medem-combobox__option + .medem-combobox__group {
    margin-top: 6px;
}

.medem-combobox__group-title {
    width: 100%;
    min-height: 34px;
    display: grid;
    grid-template-columns: 14px minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    padding: 7px 9px;
    color: var(--med-primary-dark);
    background: var(--med-surface-soft);
    border: 0;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    text-align: left;
    text-transform: uppercase;
}

.medem-combobox__group-title i {
    transition: transform .16s ease;
}

.medem-combobox__group.is-open .medem-combobox__group-title i {
    transform: rotate(90deg);
}

.medem-combobox__group-title span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.medem-combobox__group-title b {
    min-width: 24px;
    padding: 2px 6px;
    color: var(--med-muted);
    background: #fff;
    border: 1px solid var(--med-border);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
}

.medem-combobox__group-title:hover,
.medem-combobox__group-title:focus {
    color: var(--med-primary-dark);
    background: var(--med-blue-soft);
    outline: 0;
}

.medem-combobox__group-body {
    display: grid;
    gap: 1px;
    padding: 4px;
}

.medem-combobox__option {
    width: 100%;
    display: block;
    padding: 8px 10px;
    color: var(--med-ink);
    background: transparent;
    border: 0;
    font-weight: 400;
    text-align: left;
}

.medem-combobox__option--nested {
    padding-left: 10px;
}

.medem-combobox__option:hover,
.medem-combobox__option:focus,
.medem-combobox__option.is-selected {
    color: var(--med-primary-dark);
    background: var(--med-blue-soft);
    outline: 0;
}

.medem-combobox__multi-footer {
    margin-top: 8px;
    padding: 7px 10px;
    color: var(--med-muted);
    background: var(--med-surface-soft);
    border: 1px dashed var(--med-border);
    font-size: 12px;
    font-weight: 600;
}

.medem-combobox__empty {
    margin-top: 8px;
    padding: 8px 10px;
    color: var(--med-muted);
}

.task-employee-picker {
    position: relative;
    width: 100%;
    min-width: 0;
}

.task-employee-picker__trigger {
    width: 100%;
    min-width: 0;
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 11px;
    overflow: hidden;
    color: var(--med-ink);
    background: #fff;
    border: 1px solid var(--med-border);
    border-radius: 4px;
    text-align: left;
}

.task-employee-picker__trigger:hover,
.task-employee-picker__trigger:focus {
    border-color: rgba(11, 77, 205, .42);
    box-shadow: 0 0 0 3px rgba(11, 77, 205, .10);
    outline: 0;
}

.task-employee-picker__value {
    min-width: 0;
    display: grid;
    gap: 1px;
}

.task-employee-picker__value strong {
    min-width: 0;
    overflow: hidden;
    color: inherit;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.task-employee-picker__value small {
    min-width: 0;
    overflow: hidden;
    color: var(--med-muted);
    font-size: 11px;
    font-weight: 500;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.task-employee-picker__value.is-placeholder strong {
    color: #8a97a8;
}

.task-employee-picker__icon {
    flex: 0 0 auto;
    color: var(--med-primary-dark);
    font-size: 18px;
}

.task-employee-picker__dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    left: 0;
    z-index: 1060;
    min-width: min(520px, calc(100vw - 32px));
    padding: 8px;
    background: #fff;
    border: 1px solid var(--med-border);
    box-shadow: 0 18px 38px rgba(6, 48, 111, .16);
}

.task-employee-picker.is-open .task-employee-picker__dropdown {
    display: block;
}

.task-detail-sidebar .task-employee-picker__dropdown {
    right: 0;
    left: 0;
    min-width: 0;
}

.task-employee-picker__search {
    width: 100%;
    height: 36px;
    padding: 6px 10px;
    color: var(--med-ink);
    background: var(--med-surface-soft);
    border: 1px solid var(--med-border);
    border-radius: 4px;
    font-weight: 500;
    outline: 0;
}

.task-employee-picker__search:focus {
    border-color: rgba(11, 77, 205, .42);
    box-shadow: 0 0 0 3px rgba(11, 77, 205, .10);
}

.task-employee-picker__list {
    max-height: 310px;
    margin-top: 8px;
    overflow-y: auto;
}

.task-employee-picker__group {
    border: 1px solid var(--med-border);
    border-radius: 5px;
    overflow: hidden;
}

.task-employee-picker__group + .task-employee-picker__group,
.task-employee-picker__option--empty + .task-employee-picker__group {
    margin-top: 6px;
}

.task-employee-picker__group-toggle {
    width: 100%;
    min-height: 34px;
    display: grid;
    grid-template-columns: 14px minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    padding: 7px 9px;
    color: var(--med-primary-dark);
    background: var(--med-surface-soft);
    border: 0;
    font-size: 12px;
    font-weight: 600;
    text-align: left;
}

.task-employee-picker__group-toggle i {
    transition: transform .16s ease;
}

.task-employee-picker__group.is-open .task-employee-picker__group-toggle i {
    transform: rotate(90deg);
}

.task-employee-picker__group-toggle span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.task-employee-picker__group-toggle b {
    min-width: 24px;
    padding: 2px 6px;
    color: var(--med-muted);
    background: #fff;
    border: 1px solid var(--med-border);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
}

.task-employee-picker__group-body {
    display: grid;
    gap: 1px;
    padding: 4px;
}

.task-employee-picker__option {
    width: 100%;
    min-height: 42px;
    display: grid;
    gap: 2px;
    padding: 7px 9px;
    color: var(--med-ink);
    background: transparent;
    border: 0;
    border-radius: 4px;
    text-align: left;
}

.task-employee-picker__option strong {
    min-width: 0;
    overflow: hidden;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.task-employee-picker__option small {
    min-width: 0;
    overflow: hidden;
    color: var(--med-muted);
    font-size: 11.5px;
    font-weight: 500;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.task-employee-picker__option:hover,
.task-employee-picker__option:focus,
.task-employee-picker__option.is-selected {
    color: var(--med-primary-dark);
    background: var(--med-blue-soft);
    outline: 0;
}

.task-employee-picker__option--empty {
    min-height: 34px;
    margin-bottom: 6px;
    display: block;
    color: var(--med-muted);
    border: 1px dashed var(--med-border);
}

.task-employee-picker__empty {
    margin-top: 8px;
    padding: 8px 10px;
    color: var(--med-muted);
    background: var(--med-surface-soft);
    border: 1px dashed var(--med-border);
    border-radius: 4px;
}

.settings-tile {
    min-height: 92px;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px;
    color: var(--med-ink);
    background: var(--med-surface);
    border: 1px solid rgba(6, 48, 111, .08);
    box-shadow: var(--med-shadow);
    text-decoration: none;
}

.settings-tile:hover,
.settings-tile:focus {
    color: var(--med-primary-dark);
    background: #F7FBFF;
    border-color: rgba(11, 77, 205, .18);
    text-decoration: none;
}

.settings-tile__icon {
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--med-primary);
    background: var(--med-blue-soft);
    font-size: 25px;
}

.settings-tile__body {
    min-width: 0;
    flex: 1 1 auto;
}

.settings-tile__title,
.settings-tile__text {
    display: block;
}

.settings-tile__title {
    font-size: 16px;
    font-weight: 700;
}

.settings-tile__text {
    margin-top: 4px;
    color: var(--med-muted);
    font-size: 13px;
    line-height: 1.35;
}

.settings-tile__arrow {
    flex: 0 0 auto;
    color: var(--med-muted);
    font-size: 22px;
}

.gamification-settings {
    display: grid;
    gap: 16px;
}

.gamification-settings__note {
    display: grid;
    gap: 6px;
}

.gamification-settings__note strong {
    color: var(--med-primary-dark);
    font-weight: 600;
}

.gamification-settings__note .fa {
    color: #D99516;
}

.gamification-settings__grid {
    display: grid;
    grid-template-columns: minmax(260px, .9fr) minmax(220px, .7fr) minmax(220px, .6fr);
    gap: 14px;
    align-items: stretch;
}

.gamification-toggle,
.gamification-period-preview {
    min-height: 92px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    padding: 14px;
    background: var(--med-surface-soft);
    border: 1px solid var(--med-border);
    border-radius: 6px;
}

.gamification-toggle input {
    margin: 0;
}

.gamification-toggle span {
    display: grid;
    gap: 4px;
}

.gamification-toggle strong,
.gamification-period-preview strong {
    color: var(--med-ink);
    font-weight: 600;
}

.gamification-toggle em,
.gamification-period-preview span {
    color: var(--med-muted);
    font-style: normal;
    font-size: 12px;
    line-height: 1.35;
}

.gamification-period-preview {
    display: grid;
    align-content: center;
}

.gamification-rules {
    display: grid;
    grid-template-columns: repeat(6, minmax(120px, 1fr));
    gap: 8px;
}

.gamification-rules div,
.gamification-rule-card {
    position: relative;
    display: grid;
    gap: 6px;
    margin: 0;
    padding: 10px 12px;
    background: var(--med-surface-soft);
    border: 1px solid var(--med-border);
    border-radius: 6px;
}

.gamification-rules span {
    color: var(--med-muted);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.gamification-rules strong {
    color: var(--med-primary-dark);
    font-size: 16px;
    font-weight: 600;
}

.gamification-rule-card .form-control {
    height: 34px;
    padding-right: 28px;
    color: var(--med-primary-dark);
    font-size: 16px;
    font-weight: 600;
}

.gamification-rule-card em {
    position: absolute;
    right: 22px;
    bottom: 18px;
    color: var(--med-muted);
    font-size: 13px;
    font-style: normal;
    font-weight: 600;
    line-height: 1;
    pointer-events: none;
}

.settings-task-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 15px;
}

.settings-task-note {
    margin: 0;
}

.settings-task-note p {
    margin: 7px 0 5px;
    color: var(--med-ink);
    line-height: 1.45;
}

.settings-task-note span,
.settings-mode-help {
    color: var(--med-muted);
    font-size: 13px;
    line-height: 1.35;
}

.settings-task-archive {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 14px;
    align-items: end;
    margin-bottom: 14px;
    padding: 12px;
    background: var(--med-surface-soft);
    border: 1px solid var(--med-border);
}

.settings-task-archive strong {
    color: var(--med-ink);
    font-weight: 600;
}

.settings-task-archive p {
    margin: 6px 0 0;
    color: var(--med-muted);
    font-size: 13px;
    line-height: 1.4;
}

.settings-task-archive label {
    margin: 0;
}

.settings-task-archive label span {
    display: block;
    margin-bottom: 5px;
    color: var(--med-muted);
    font-size: 12px;
    font-weight: 600;
}

.settings-mode-select {
    min-width: 150px;
    max-width: 220px;
}

.btn {
    border-radius: 4px;
}

.info-box {
    min-height: 90px;
    background: #fff;
    width: 100%;
    box-shadow: 0 1px 1px rgba(0, 0, 0, .1);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 15px;
}

.info-box-icon {
    display: block;
    float: left;
    height: 90px;
    width: 90px;
    text-align: center;
    font-size: 45px;
    line-height: 90px;
    background: rgba(0, 0, 0, .08);
    color: #dd4b39;
    border-radius: 8px 0 0 8px;
}

.info-box-icon .fa {
    color: transparent;
    -webkit-text-fill-color: transparent;
    -webkit-text-stroke: 1.5px #dd4b39;
    text-shadow: none;
}

.info-box-content {
    padding: 14px 10px;
    margin-left: 90px;
}

.info-box-text {
    display: block;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-transform: uppercase;
}

.info-box-number {
    display: block;
    font-weight: bold;
    font-size: 22px;
}

#workplace_blocks .info-box-icon {
    width: 78px;
}

#workplace_blocks .info-box-content {
    margin-left: 78px;
}

#workplace_blocks .info-box-text {
    white-space: normal;
    line-height: 1.25;
}

.dashboard-analytics {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 14px;
    margin: 2px 0 16px;
}

.dashboard-analytics--no-gamification .dashboard-card--tasks,
.dashboard-analytics--no-gamification .dashboard-card--vacation {
    grid-column: span 6;
}

.dashboard-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: 220px;
    padding: 16px;
    background: var(--med-surface);
    border: 1px solid var(--med-border);
    border-left: 3px solid var(--med-primary);
    box-shadow: var(--med-shadow);
}

.dashboard-card--tasks {
    grid-column: span 5;
}

.dashboard-card--vacation {
    grid-column: span 4;
    border-left-color: #F4B642;
}

.dashboard-card--stars {
    grid-column: span 3;
    border-left-color: #E5A100;
}

.dashboard-card__header {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.dashboard-card__header h3 {
    margin: 0;
    color: var(--med-ink);
    font-size: 18px;
    font-weight: 600;
}

.dashboard-card__header p,
.dashboard-card__empty {
    margin: 3px 0 0;
    color: var(--med-muted);
    font-size: 13px;
    line-height: 1.35;
}

.dashboard-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    color: var(--med-primary);
    background: var(--med-blue-soft);
    border: 1px solid #C9DDF7;
}

.dashboard-card__icon .fa {
    color: inherit;
    font-size: 20px;
}

.dashboard-card__icon--vacation {
    color: #A65F00;
    background: #FFF7E5;
    border-color: #F4D28E;
}

.dashboard-card__icon--vacation svg {
    width: 31px;
    height: 31px;
}

.dashboard-card__icon--vacation circle {
    fill: #F9C445;
}

.dashboard-card__icon--vacation path {
    fill: #0D8B7E;
    stroke: #0D8B7E;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.dashboard-card__icon--vacation path:first-of-type,
.dashboard-card__icon--vacation path:last-of-type {
    fill: none;
    stroke: #A66A24;
}

.dashboard-card__icon--stars {
    color: #B27700;
    background: #FFF8E8;
    border-color: #F0D391;
}

.dashboard-task-graph {
    display: grid;
    grid-template-columns: 128px minmax(0, 1fr);
    align-items: center;
    gap: 16px;
}

.dashboard-progress-ring {
    --value: 0;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 124px;
    height: 124px;
    border-radius: 50%;
    background: conic-gradient(var(--med-primary) calc(var(--value) * 1%), #E7EEF7 0);
}

.dashboard-progress-ring::after {
    content: "";
    position: absolute;
    inset: 10px;
    border-radius: 50%;
    background: var(--med-surface);
    box-shadow: inset 0 0 0 1px rgba(221, 231, 241, .85);
}

.dashboard-progress-ring strong,
.dashboard-progress-ring span {
    position: relative;
    z-index: 1;
}

.dashboard-progress-ring strong {
    color: var(--med-ink);
    font-size: 27px;
    font-weight: 600;
    line-height: 1;
}

.dashboard-progress-ring span {
    margin-top: 4px;
    color: var(--med-muted);
    font-size: 12px;
}

.dashboard-task-graph__details {
    min-width: 0;
}

.dashboard-task-graph__details > strong {
    display: block;
    color: var(--med-ink);
    font-size: 20px;
    font-weight: 600;
}

.dashboard-task-graph__details > span {
    display: block;
    margin-top: 3px;
    color: var(--med-muted);
    font-size: 13px;
}

.dashboard-task-bar,
.dashboard-stars-progress,
.dashboard-vacation-progress {
    height: 10px;
    margin-top: 12px;
    overflow: hidden;
    background: #E7EEF7;
    border-radius: 999px;
}

.dashboard-task-bar {
    display: flex;
}

.dashboard-task-bar__segment {
    min-width: 3px;
    height: 100%;
}

.dashboard-task-bar__segment--done {
    background: #209B63;
}

.dashboard-task-bar__segment--working {
    background: var(--med-primary);
}

.dashboard-task-bar__segment--waiting {
    background: #7D91A8;
}

.dashboard-task-bar__segment--review {
    background: #D28A1C;
}

.dashboard-stat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.dashboard-stat-grid div {
    padding: 9px 10px;
    background: var(--med-surface-soft);
    border: 1px solid var(--med-border);
}

.dashboard-stat-grid span {
    display: block;
    color: var(--med-muted);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.dashboard-stat-grid strong {
    display: block;
    margin-top: 4px;
    color: var(--med-ink);
    font-size: 18px;
    font-weight: 600;
}

.dashboard-stat-grid .is-danger strong {
    color: var(--med-coral);
}

.dashboard-next-task {
    display: block;
    margin-top: auto;
    padding: 10px 12px;
    color: var(--med-ink);
    text-decoration: none;
    background: var(--med-surface-soft);
    border: 1px solid var(--med-border);
    border-left: 3px solid var(--med-primary);
}

.dashboard-next-task:hover,
.dashboard-next-task:focus {
    color: var(--med-primary);
    text-decoration: none;
    border-color: #BFD3EE;
}

.dashboard-next-task span {
    display: block;
    color: var(--med-muted);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.dashboard-next-task strong {
    display: block;
    margin-top: 4px;
    overflow: hidden;
    color: inherit;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-next-task--empty {
    color: var(--med-muted);
    cursor: default;
}

.dashboard-vacation-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 132px;
    padding: 14px;
    background: #FFF9EC;
    border: 1px solid #F0D391;
    border-left: 3px solid #F4B642;
}

.dashboard-vacation-body strong {
    color: #754A00;
    font-size: 22px;
    font-weight: 600;
}

.dashboard-vacation-body span {
    color: #7D5B22;
    font-size: 13px;
    line-height: 1.4;
}

.dashboard-vacation-body a {
    margin-top: auto;
    color: #0B4DCD;
    font-weight: 600;
}

.dashboard-vacation-body--active {
    background: #EDF9F6;
    border-color: #B7E5DC;
    border-left-color: var(--med-teal);
}

.dashboard-vacation-body--active strong {
    color: #087166;
}

.dashboard-vacation-body--active span {
    color: #416B67;
}

.dashboard-vacation-progress span,
.dashboard-stars-progress span {
    display: block;
    height: 100%;
    min-width: 4px;
    border-radius: inherit;
}

.dashboard-vacation-progress span {
    background: #F4B642;
}

.dashboard-vacation-body--active .dashboard-vacation-progress span {
    background: var(--med-teal);
}

.dashboard-stars-total {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.dashboard-stars-total strong {
    color: #A66A00;
    font-size: 42px;
    font-weight: 600;
    line-height: 1;
}

.dashboard-stars-total span {
    color: var(--med-muted);
    font-size: 13px;
}

.dashboard-stars-progress span {
    background: #F0A500;
}

.dashboard-stars-events {
    display: grid;
    gap: 7px;
    margin-top: 2px;
}

.dashboard-stars-events a {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding: 8px;
    color: var(--med-ink);
    background: var(--med-surface-soft);
    border: 1px solid var(--med-border);
    text-decoration: none;
}

.dashboard-stars-events a:hover,
.dashboard-stars-events a:focus {
    color: var(--med-primary);
    text-decoration: none;
    border-color: #BFD3EE;
}

.dashboard-stars-events span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    color: #8A5A00;
    background: #FFF4D7;
    border: 1px solid #EEC879;
    font-weight: 600;
}

.dashboard-stars-events strong {
    overflow: hidden;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 1199px) {
    .dashboard-card--tasks,
    .dashboard-analytics--no-gamification .dashboard-card--tasks {
        grid-column: span 12;
    }

    .dashboard-card--vacation,
    .dashboard-card--stars,
    .dashboard-analytics--no-gamification .dashboard-card--vacation {
        grid-column: span 6;
    }

    .dashboard-analytics--no-gamification .dashboard-card--vacation {
        grid-column: span 12;
    }
}

.table-top {
    margin-bottom: 12px;
}

.table-board {
    width: 100%;
    overflow-x: auto;
}

.table-sort {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--med-ink);
    text-decoration: none;
}

.table-sort:hover,
.table-sort:focus,
.table-sort.is-active {
    color: var(--med-primary);
    text-decoration: none;
}

.table-sort .fa {
    color: var(--med-muted);
    font-size: 12px;
}

.table-sort.is-active .fa {
    color: var(--med-primary);
}

.id-hash {
    display: inline-block;
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: bottom;
    position: relative;
    cursor: pointer;
    user-select: none;
    transition: background-color .15s ease, box-shadow .15s ease;
}

.id-hash:hover,
.id-hash:focus {
    outline: 0;
    box-shadow: 0 0 0 2px rgba(11, 77, 205, .14);
}

.id-hash.is-copied {
    background: var(--med-teal-soft);
    color: var(--med-primary-dark);
}

.id-hash.is-copied::after {
    content: "ID скопирован";
    position: absolute;
    left: 0;
    bottom: calc(100% + 4px);
    z-index: 20;
    padding: 3px 7px;
    color: #fff;
    background: var(--med-primary-dark);
    font-size: 11px;
    line-height: 1.2;
    white-space: nowrap;
    box-shadow: 0 8px 18px rgba(6, 48, 111, .18);
}

.medem-copy-toast {
    position: fixed;
    top: 58px;
    right: 18px;
    z-index: 2000;
    padding: 10px 14px;
    color: #fff;
    background: var(--med-primary-dark);
    box-shadow: 0 14px 28px rgba(6, 48, 111, .22);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.25;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity .18s ease, transform .18s ease;
}

.medem-copy-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.medem-task-event-toast {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 2300;
    width: min(380px, calc(100vw - 28px));
    padding: 14px 42px 14px 16px;
    color: var(--med-ink);
    background: var(--med-surface);
    border: 1px solid var(--med-border);
    border-left: 4px solid var(--med-primary);
    box-shadow: 0 20px 42px rgba(6, 48, 111, .18);
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
    transition: opacity .18s ease, transform .18s ease;
}

.medem-task-event-toast.is-attention {
    border-left-color: var(--med-coral);
    box-shadow: 0 20px 42px rgba(217, 99, 80, .18);
}

.medem-task-event-toast.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.medem-task-event-toast__close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--med-muted);
    background: transparent;
    border: 0;
}

.medem-task-event-toast__close:hover,
.medem-task-event-toast__close:focus {
    color: var(--med-primary-dark);
    outline: 0;
}

.medem-task-event-toast__title {
    display: block;
    margin-bottom: 4px;
    color: var(--med-primary-dark);
    font-size: 14px;
    font-weight: 600;
}

.medem-task-event-toast__task {
    margin-bottom: 4px;
    font-size: 13px;
    font-weight: 600;
}

.medem-task-event-toast__message {
    color: var(--med-muted);
    font-size: 12px;
    line-height: 1.35;
}

.medem-task-event-toast__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.user-profile-menu {
    width: 280px;
}

#user-profile > .dropdown-toggle {
    height: 42px;
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px !important;
    line-height: 1;
    box-sizing: border-box;
}

#user-profile > .dropdown-toggle > span {
    line-height: 1.2;
}

.skin-black .main-header > .navbar .nav > #user-profile > .dropdown-toggle:hover,
.skin-black .main-header > .navbar .nav > #user-profile > .dropdown-toggle:focus,
.skin-black .main-header > .navbar .nav > #user-profile.open > .dropdown-toggle,
.skin-black .main-header > .navbar .nav > #user-profile.open > .dropdown-toggle:hover,
.skin-black .main-header > .navbar .nav > #user-profile.open > .dropdown-toggle:focus {
    background: var(--med-blue-soft) !important;
    color: var(--med-primary-dark) !important;
}

.medem-voice-briefing-nav {
    position: relative;
    height: 42px;
    display: flex !important;
    align-items: center;
}

.medem-voice-briefing-nav[hidden] {
    display: none !important;
}

.medem-voice-briefing-button {
    height: 32px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 0 3px;
    padding: 0 11px !important;
    color: var(--med-primary-dark) !important;
    background: var(--med-blue-soft);
    border: 1px solid #C8DDF5;
    border-radius: 999px;
    outline: 0;
    font-size: 12px;
    font-family: inherit;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease, color .18s ease;
}

.medem-voice-briefing-button:hover,
.medem-voice-briefing-button:focus,
.medem-voice-briefing-nav.is-playing .medem-voice-briefing-button {
    color: #fff !important;
    background: var(--med-primary);
    border-color: var(--med-primary);
    box-shadow: 0 8px 18px rgba(11, 77, 205, .20);
}

.medem-voice-briefing-button:disabled {
    opacity: .72;
    cursor: wait;
}

.medem-voice-briefing-nav.is-completed .medem-voice-briefing-button,
.medem-voice-briefing-nav.is-completed .medem-voice-briefing-button:disabled {
    color: #2F6B3F !important;
    background: #EAF7EE;
    border-color: #BEE4C8;
    box-shadow: none;
    cursor: pointer;
    opacity: 1;
}

.medem-voice-briefing-nav.is-loading .medem-voice-briefing-button .fa {
    animation: medemPulse 1s ease-in-out infinite;
}

.medem-voice-briefing-popover {
    position: absolute;
    top: 42px;
    right: 0;
    z-index: 1045;
    width: 360px;
    max-width: calc(100vw - 24px);
    padding: 10px 12px;
    color: var(--med-ink);
    background: #fff;
    border: 1px solid var(--med-border);
    border-radius: 8px;
    box-shadow: 0 14px 34px rgba(15, 35, 65, .16);
}

.medem-voice-briefing-popover[hidden] {
    display: none !important;
}

.medem-voice-briefing-popover::before {
    content: "";
    position: absolute;
    top: -6px;
    right: 24px;
    width: 10px;
    height: 10px;
    background: inherit;
    border-top: 1px solid var(--med-border);
    border-left: 1px solid var(--med-border);
    transform: rotate(45deg);
}

.medem-voice-briefing-popover__title {
    margin-bottom: 5px;
    color: var(--med-muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .02em;
}

.medem-voice-briefing-popover__text {
    max-height: 150px;
    overflow: auto;
    color: var(--med-muted);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.45;
}

.medem-voice-briefing-word {
    color: var(--med-muted);
    transition: color .16s ease, opacity .16s ease, background-color .16s ease;
    opacity: .48;
}

.medem-voice-briefing-word.is-bright {
    color: var(--med-ink);
    opacity: 1;
}

.medem-voice-briefing-word.is-current {
    color: var(--med-primary-dark);
    background: var(--med-blue-soft);
    border-radius: 3px;
    opacity: 1;
}

@keyframes medemPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(.88);
        opacity: .62;
    }
}

.medem-theme-nav {
    height: 42px;
    display: flex !important;
    align-items: center;
}

.medem-gamification-nav {
    position: relative;
    height: 42px;
    display: flex !important;
    align-items: center;
}

.medem-gamification-stars {
    position: relative;
    height: 32px;
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    margin: 0 3px;
    padding: 0 11px !important;
    color: #7A520C !important;
    background: rgba(255, 191, 64, .16);
    border: 1px solid rgba(224, 149, 22, .34);
    border-radius: 999px;
    outline: 0;
    font-size: 12px;
    font-family: inherit;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease, color .18s ease;
}

.medem-gamification-stars:hover,
.medem-gamification-stars:focus,
.medem-gamification-nav.open > .medem-gamification-stars {
    color: #6A4508 !important;
    background: rgba(255, 191, 64, .24) !important;
    border-color: rgba(224, 149, 22, .48);
    box-shadow: 0 0 0 3px rgba(224, 149, 22, .12);
}

.medem-gamification-stars .fa {
    color: #D99516;
    font-size: 14px;
}

.medem-gamification-menu {
    right: 0;
    left: auto;
    width: 390px;
    max-width: calc(100vw - 24px);
    margin-top: 4px;
    padding: 0;
    overflow: visible;
    color: var(--med-ink);
    background: var(--med-surface);
    border: 1px solid var(--med-border);
    border-radius: 0;
    box-shadow: 0 22px 54px rgba(6, 48, 111, .16);
}

.medem-gamification-nav.open > .medem-gamification-menu {
    display: block;
}

.medem-gamification-menu:before {
    content: "";
    position: absolute;
    top: -7px;
    right: 22px;
    width: 14px;
    height: 14px;
    background: var(--med-surface);
    border-top: 1px solid var(--med-border);
    border-left: 1px solid var(--med-border);
    transform: rotate(45deg);
}

.medem-gamification-menu__header {
    position: relative;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 16px;
    background: linear-gradient(90deg, rgba(255, 191, 64, .14), rgba(11, 77, 205, .04));
    border-bottom: 1px solid var(--med-border);
}

.medem-gamification-menu__icon {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #B97714;
    background: rgba(255, 191, 64, .18);
    border: 1px solid rgba(224, 149, 22, .28);
    font-size: 17px;
}

.medem-gamification-menu__summary {
    min-width: 0;
}

.medem-gamification-menu__summary strong {
    display: block;
    color: var(--med-ink);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
}

.medem-gamification-menu__summary span {
    display: block;
    margin-top: 4px;
    color: var(--med-muted);
    font-size: 12px;
    line-height: 1.3;
}

.medem-gamification-menu__stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 12px 16px 0;
}

.medem-gamification-menu__stats > div {
    padding: 10px;
    background: var(--med-surface-soft);
    border: 1px solid var(--med-border);
}

.medem-gamification-menu__stats span {
    display: block;
    color: var(--med-muted);
    font-size: 11px;
    line-height: 1.2;
    text-transform: uppercase;
}

.medem-gamification-menu__stats strong {
    display: block;
    margin-top: 4px;
    color: var(--med-ink);
    font-size: 18px;
    font-weight: 600;
    line-height: 1;
}

.medem-gamification-menu__content {
    padding: 14px 16px 16px;
}

.medem-gamification-menu__section-title {
    margin-bottom: 9px;
    color: var(--med-ink);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.medem-gamification-events {
    display: grid;
    gap: 7px;
    max-height: 310px;
    overflow-y: auto;
    padding-right: 2px;
}

.medem-gamification-event {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 9px 10px;
    color: var(--med-ink);
    background: var(--med-surface-soft);
    border: 1px solid var(--med-border);
    text-decoration: none !important;
    transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.medem-gamification-event:hover,
.medem-gamification-event:focus {
    color: var(--med-ink);
    background: rgba(255, 191, 64, .08);
    border-color: rgba(224, 149, 22, .32);
    box-shadow: 0 0 0 3px rgba(224, 149, 22, .08);
    text-decoration: none !important;
}

.medem-gamification-event__main {
    min-width: 0;
}

.medem-gamification-event__title {
    display: block;
    overflow: hidden;
    color: var(--med-ink);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.medem-gamification-event__meta {
    display: block;
    margin-top: 4px;
    overflow: hidden;
    color: var(--med-muted);
    font-size: 11px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.medem-gamification-event__points {
    min-width: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 5px 8px;
    color: #7A520C;
    background: rgba(255, 191, 64, .16);
    border: 1px solid rgba(224, 149, 22, .32);
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
}

.medem-gamification-event__points .fa {
    color: #D99516;
}

.medem-gamification-menu__empty {
    padding: 10px;
    color: var(--med-muted);
    background: var(--med-surface-soft);
    border: 1px solid var(--med-border);
    font-size: 13px;
}

.medem-gamification-menu__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    color: var(--med-primary-dark);
    font-size: 13px;
    font-weight: 600;
}

.medem-gamification-menu__link:hover,
.medem-gamification-menu__link:focus {
    color: var(--med-primary);
}

.medem-gamification-stars.is-award-target {
    animation: medem-gamification-target-pulse 1.05s ease;
}

.medem-gamification-stars.is-award-incoming {
    box-shadow: 0 0 0 4px rgba(224, 149, 22, .10);
}

.medem-gamification-fly-star,
.medem-gamification-award-bubble,
.medem-gamification-award-start {
    position: fixed;
    z-index: 30000;
    pointer-events: none;
    transform: translate3d(0, 0, 0);
    will-change: transform, opacity;
}

.medem-gamification-fly-star {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #E0A21B;
    font-size: 23px;
    filter: drop-shadow(0 10px 16px rgba(122, 82, 12, .22));
    animation: medem-gamification-star-fly 1.48s cubic-bezier(.22, .82, .24, 1) forwards;
}

.medem-gamification-award-bubble,
.medem-gamification-award-start,
.medem-gamification-landing-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-width: 34px;
    height: 24px;
    padding: 0 9px;
    color: #7A520C;
    background: #FFF3C4;
    border: 1px solid rgba(224, 149, 22, .42);
    border-radius: 999px;
    box-shadow: 0 12px 24px rgba(122, 82, 12, .16);
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

.medem-gamification-award-bubble {
    animation: medem-gamification-bubble-fly 1.45s cubic-bezier(.22, .82, .24, 1) forwards;
}

.medem-gamification-award-start {
    min-width: 48px;
    height: 28px;
    color: #7A520C;
    background: #FFF7D8;
    animation: medem-gamification-start-pop .82s ease forwards;
}

.medem-gamification-award-start .fa {
    color: #D99516;
}

.medem-gamification-landing-badge {
    position: absolute;
    right: -9px;
    top: -11px;
    min-width: 28px;
    height: 19px;
    padding: 0 6px;
    color: #fff;
    background: #D99516;
    border-color: #D99516;
    box-shadow: 0 8px 18px rgba(122, 82, 12, .18);
    animation: medem-gamification-landing-pop 1.16s ease forwards;
}

@keyframes medem-gamification-star-fly {
    0% {
        opacity: 0;
        transform: translate3d(0, 12px, 0) scale(.5) rotate(-18deg);
    }
    14% {
        opacity: 1;
        transform: translate3d(0, -18px, 0) scale(1.16) rotate(8deg);
    }
    58% {
        opacity: 1;
        transform: translate3d(calc(var(--gamification-fly-x) * .58), var(--gamification-fly-arc-y), 0) scale(1.02) rotate(24deg);
    }
    82% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translate3d(var(--gamification-fly-x), var(--gamification-fly-y), 0) scale(.28) rotate(36deg);
    }
}

@keyframes medem-gamification-bubble-fly {
    0% {
        opacity: 0;
        transform: translate3d(0, 8px, 0) scale(.86);
    }
    16% {
        opacity: 1;
        transform: translate3d(0, -10px, 0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate3d(var(--gamification-fly-x), var(--gamification-fly-y), 0) scale(.5);
    }
}

@keyframes medem-gamification-start-pop {
    0% {
        opacity: 0;
        transform: translate3d(-50%, 8px, 0) scale(.88);
    }
    18%, 72% {
        opacity: 1;
        transform: translate3d(-50%, -8px, 0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate3d(-50%, -22px, 0) scale(.92);
    }
}

@keyframes medem-gamification-landing-pop {
    0% {
        opacity: 0;
        transform: translate3d(0, 8px, 0) scale(.65);
    }
    20%, 68% {
        opacity: 1;
        transform: translate3d(0, -2px, 0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate3d(0, -14px, 0) scale(.9);
    }
}

@keyframes medem-gamification-target-pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(224, 149, 22, 0);
    }
    42%, 68% {
        background: rgba(255, 191, 64, .34);
        border-color: rgba(224, 149, 22, .7);
        box-shadow: 0 0 0 9px rgba(224, 149, 22, .18);
    }
}

.medem-weather-nav {
    height: 42px;
    display: flex !important;
    align-items: center;
}

.medem-weather-widget {
    height: 32px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0 3px;
    padding: 0 11px;
    overflow: visible;
    color: var(--med-primary-dark);
    background: var(--med-surface-soft);
    border: 1px solid var(--med-border);
    border-radius: 999px;
    outline: 0;
    line-height: 1;
    white-space: nowrap;
    transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease, color .18s ease;
}

.medem-weather-widget:hover,
.medem-weather-widget:focus {
    color: var(--med-primary-dark);
    background: var(--med-blue-soft);
    border-color: rgba(11, 77, 205, .32);
    box-shadow: 0 0 0 3px rgba(11, 77, 205, .10);
}

.medem-weather-widget__icon {
    width: 18px;
    min-width: 18px;
    display: inline-flex;
    justify-content: center;
    color: var(--med-primary);
    font-size: 14px;
}

.medem-weather-widget__city {
    color: inherit;
    font-size: 12px;
    font-weight: 700;
}

.medem-weather-widget__temp,
.medem-weather-widget__time {
    color: var(--med-muted);
    font-size: 12px;
    font-weight: 700;
}

.medem-weather-widget__time {
    width: 42px;
    min-width: 42px;
    flex: 0 0 42px;
    display: inline-grid;
    grid-template-columns: 18px 4px 18px;
    align-items: center;
    justify-items: center;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.medem-weather-widget__time-part,
.medem-weather-widget__time-colon {
    display: block;
    line-height: 1;
    text-align: center;
}

.medem-weather-widget__time-colon {
    width: 4px;
    opacity: 1;
}

.medem-weather-widget__time-colon.is-time-colon-muted {
    opacity: 0;
    visibility: hidden;
}

.medem-weather-widget__temp {
    color: var(--med-primary-dark);
}

.medem-weather-widget.is-loading .medem-weather-widget__icon .fa {
    animation: medemWeatherSpin .9s linear infinite;
}

@keyframes medemWeatherSpin {
    to {
        transform: rotate(360deg);
    }
}

.medem-weather-menu {
    right: 0;
    left: auto;
    width: 430px;
    max-width: calc(100vw - 24px);
    margin-top: 4px;
    padding: 0;
    overflow: visible;
    color: var(--med-ink);
    background: var(--med-surface);
    border: 1px solid var(--med-border);
    border-radius: 0;
    box-shadow: 0 22px 54px rgba(6, 48, 111, .16);
}

.medem-weather-nav.open > .medem-weather-menu {
    display: block;
}

.medem-weather-menu:before {
    content: "";
    position: absolute;
    top: -7px;
    right: 24px;
    width: 14px;
    height: 14px;
    background: var(--med-surface);
    border-top: 1px solid var(--med-border);
    border-left: 1px solid var(--med-border);
    transform: rotate(45deg);
}

.medem-weather-menu__header {
    position: relative;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 16px;
    background: var(--med-surface-soft);
    border-bottom: 1px solid var(--med-border);
}

.medem-weather-menu__icon {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--med-primary);
    background: var(--med-blue-soft);
    border: 1px solid rgba(11, 77, 205, .16);
    font-size: 17px;
}

.medem-weather-menu__summary {
    min-width: 0;
}

.medem-weather-menu__summary strong {
    display: inline-block;
    max-width: calc(100% - 20px);
    vertical-align: middle;
    color: var(--med-ink);
    font-size: 14px;
    line-height: 1.2;
}

.medem-weather-menu__edit {
    margin-left: 6px;
    color: var(--med-muted);
    font-size: 12px;
    vertical-align: middle;
    transition: color .18s ease;
}

.medem-weather-menu__summary strong:hover + .medem-weather-menu__edit,
.medem-weather-menu__edit:hover,
.medem-weather-menu__edit:focus {
    color: var(--med-primary);
}

.medem-weather-menu__summary span {
    display: block;
    margin-top: 4px;
    color: var(--med-muted);
    font-size: 12px;
    line-height: 1.3;
}

.medem-weather-menu__temp {
    color: var(--med-primary-dark);
    font-size: 24px;
    font-weight: 800;
    line-height: 1;
}

.medem-weather-menu__summary strong[role="button"],
.medem-weather-menu__edit {
    cursor: pointer;
}

.medem-weather-menu__summary strong[role="button"]:focus {
    outline: 2px solid rgba(11, 77, 205, .34);
    outline-offset: 2px;
}

.medem-weather-city-search {
    padding: 12px 16px;
    background: var(--med-surface);
    border-bottom: 1px solid var(--med-border);
}

.medem-weather-city-search__bar {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr) 30px;
    gap: 8px;
    align-items: center;
    padding: 5px 7px 5px 10px;
    background: var(--med-surface-soft);
    border: 1px solid var(--med-border);
}

.medem-weather-city-search__bar .fa-search {
    color: var(--med-muted);
    font-size: 13px;
    text-align: center;
}

.medem-weather-city-search__input {
    min-width: 0;
    height: 30px;
    padding: 0;
    color: var(--med-ink);
    background: transparent;
    border: 0;
    outline: 0;
    font-size: 13px;
}

.medem-weather-city-search__close {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--med-muted);
    background: transparent;
    border: 0;
}

.medem-weather-city-search__close:hover,
.medem-weather-city-search__close:focus {
    color: var(--med-primary);
    background: var(--med-blue-soft);
    outline: 0;
}

.medem-weather-city-search__results {
    display: grid;
    gap: 6px;
    max-height: 238px;
    margin-top: 8px;
    overflow: auto;
}

.medem-weather-city-search__option {
    display: grid;
    gap: 2px;
    width: 100%;
    padding: 8px 10px;
    color: var(--med-ink);
    background: var(--med-surface-soft);
    border: 1px solid var(--med-border);
    text-align: left;
}

.medem-weather-city-search__option:hover,
.medem-weather-city-search__option:focus {
    background: var(--med-blue-soft);
    border-color: rgba(11, 77, 205, .30);
    outline: 0;
}

.medem-weather-city-search__option strong {
    font-size: 13px;
    line-height: 1.25;
}

.medem-weather-city-search__option span,
.medem-weather-city-search__empty {
    color: var(--med-muted);
    font-size: 12px;
    line-height: 1.35;
}

.medem-weather-city-search__empty {
    padding: 9px 10px;
    background: var(--med-surface-soft);
    border: 1px solid var(--med-border);
}

.medem-weather-menu__status {
    padding: 16px;
    color: var(--med-muted);
    font-size: 13px;
    line-height: 1.45;
}

.medem-weather-menu__content {
    padding: 14px 16px 16px;
}

.medem-weather-menu__section + .medem-weather-menu__section {
    margin-top: 16px;
}

.medem-weather-menu__section-title {
    margin-bottom: 9px;
    color: var(--med-ink);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.medem-weather-hourly {
    display: grid;
    gap: 6px;
}

.medem-weather-hour {
    min-height: 36px;
    display: grid;
    grid-template-columns: 42px 24px 44px minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    padding: 7px 9px;
    background: var(--med-surface-soft);
    border: 1px solid var(--med-border);
}

.medem-weather-hour__time,
.medem-weather-day__name {
    color: var(--med-muted);
    font-size: 12px;
    font-weight: 700;
}

.medem-weather-hour__icon,
.medem-weather-day__icon {
    color: var(--med-primary);
    text-align: center;
}

.medem-weather-hour__temp,
.medem-weather-day__temp {
    color: var(--med-ink);
    font-size: 13px;
}

.medem-weather-hour__meta,
.medem-weather-day__meta {
    min-width: 0;
    overflow: hidden;
    color: var(--med-muted);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.medem-weather-week {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.medem-weather-day {
    min-height: 76px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 5px 8px;
    align-content: center;
    padding: 9px;
    background: var(--med-surface-soft);
    border: 1px solid var(--med-border);
}

.medem-weather-day__temp,
.medem-weather-day__meta {
    grid-column: 1 / -1;
}

.medem-weather-menu__empty {
    padding: 10px;
    color: var(--med-muted);
    background: var(--med-surface-soft);
    border: 1px solid var(--med-border);
    font-size: 13px;
}

.medem-weather-source {
    margin-top: 12px;
    padding-top: 10px;
    color: var(--med-muted);
    border-top: 1px solid var(--med-border);
    font-size: 11px;
    line-height: 1.2;
    opacity: .68;
    text-align: right;
}

.medem-workday-nav {
    height: 42px;
    display: flex !important;
    align-items: center;
}

.medem-workday-widget {
    min-width: 84px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 0 3px;
    padding: 0 10px;
    overflow: visible;
    color: var(--med-primary-dark);
    background: var(--med-surface-soft);
    border: 1px solid var(--med-border);
    border-radius: 999px;
    outline: 0;
    line-height: 1;
    white-space: nowrap;
    transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease, color .18s ease;
}

.medem-workday-widget:hover,
.medem-workday-widget:focus,
.medem-workday-nav.open .medem-workday-widget {
    color: var(--med-primary-dark);
    background: var(--med-blue-soft);
    border-color: rgba(11, 77, 205, .32);
    box-shadow: 0 0 0 3px rgba(11, 77, 205, .10);
}

.medem-workday-widget__icon {
    width: 18px;
    min-width: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--med-primary);
    font-size: 14px;
}

.medem-workday-widget__icon .fa {
    width: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    text-align: center;
}

.medem-workday-widget__icon .fa-cutlery {
    transform: translateY(-1px);
}

.medem-workday-widget__label {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.medem-workday-widget__label,
.medem-workday-widget__value {
    color: inherit;
    font-size: 12px;
    font-weight: 700;
}

.medem-workday-widget__value {
    color: var(--med-muted);
    text-align: center;
}

.medem-workday-widget.has-countdown .medem-workday-widget__value {
    width: 42px;
    min-width: 42px;
    flex: 0 0 42px;
    display: inline-grid;
    grid-template-columns: 18px 4px 18px;
    align-items: center;
    justify-items: center;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.medem-workday-widget__time-part,
.medem-workday-widget__time-colon {
    display: block;
    line-height: 1;
    text-align: center;
}

.medem-workday-widget__time-colon {
    width: 4px;
    opacity: 1;
}

.medem-workday-widget__time-colon.is-time-colon-muted {
    opacity: 0;
    visibility: hidden;
}

.medem-workday-widget.is-loading .medem-workday-widget__icon .fa {
    animation: medemWeatherSpin .9s linear infinite;
}

.medem-workday-widget--vacation {
    color: #7A520C;
    background: #FFF8DE;
    border-color: rgba(224, 149, 22, .32);
}

.medem-workday-widget--vacation .medem-workday-widget__icon,
.medem-workday-widget--vacation .medem-workday-widget__value {
    color: #B97714;
}

.medem-workday-widget--off {
    color: #117065;
    background: rgba(55, 210, 200, .10);
    border-color: rgba(55, 210, 200, .28);
}

.medem-workday-widget--danger {
    color: #A33B2D;
    background: rgba(217, 99, 80, .10);
    border-color: rgba(217, 99, 80, .28);
}

.medem-workday-widget--duty,
.medem-workday-widget--trip,
.medem-workday-widget--training,
.medem-workday-widget--short,
.medem-workday-widget--special {
    background: rgba(11, 77, 205, .07);
    border-color: rgba(11, 77, 205, .18);
}

.medem-workday-menu {
    right: 0;
    left: auto;
    width: 430px;
    max-width: calc(100vw - 24px);
    margin-top: 4px;
    padding: 0;
    overflow: visible;
    color: var(--med-ink);
    background: var(--med-surface);
    border: 1px solid var(--med-border);
    border-radius: 0;
    box-shadow: 0 22px 54px rgba(6, 48, 111, .16);
}

.medem-workday-nav.open > .medem-workday-menu {
    display: block;
}

.medem-workday-menu:before {
    content: "";
    position: absolute;
    top: -7px;
    right: 24px;
    width: 14px;
    height: 14px;
    background: var(--med-surface);
    border-top: 1px solid var(--med-border);
    border-left: 1px solid var(--med-border);
    transform: rotate(45deg);
}

.medem-workday-menu__header {
    position: relative;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) 32px;
    gap: 12px;
    align-items: center;
    padding: 16px;
    background: var(--med-surface-soft);
    border-bottom: 1px solid var(--med-border);
}

.medem-workday-menu__icon,
.medem-workday-menu__link,
.medem-workday-day__icon,
.medem-workday-event__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.medem-workday-menu__icon {
    width: 38px;
    height: 38px;
    color: var(--med-primary);
    background: var(--med-blue-soft);
    border: 1px solid rgba(11, 77, 205, .16);
    font-size: 17px;
}

.medem-workday-menu__link {
    width: 32px;
    height: 32px;
    color: var(--med-primary-dark);
    background: #fff;
    border: 1px solid var(--med-border);
    text-decoration: none;
}

.medem-workday-menu__link:hover,
.medem-workday-menu__link:focus {
    color: #fff;
    background: var(--med-primary);
    border-color: var(--med-primary);
}

.medem-workday-menu__summary {
    min-width: 0;
}

.medem-workday-menu__summary strong {
    display: block;
    color: var(--med-ink);
    font-size: 14px;
    line-height: 1.2;
}

.medem-workday-menu__summary span {
    display: block;
    margin-top: 4px;
    color: var(--med-muted);
    font-size: 12px;
    line-height: 1.3;
}

.medem-workday-menu__progress {
    height: 4px;
    overflow: hidden;
    background: rgba(11, 77, 205, .08);
}

.medem-workday-menu__progress span {
    height: 100%;
    display: block;
    width: 0;
    background: linear-gradient(90deg, var(--med-primary), var(--med-teal));
    transition: width .25s ease;
}

.medem-workday-menu__content {
    padding: 14px 16px 16px;
}

.medem-workday-break {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 11px 16px;
    color: var(--med-ink);
    background: #F8FBFF;
    border-bottom: 1px solid var(--med-border);
}

.medem-workday-break[hidden] {
    display: none !important;
}

.medem-workday-break__icon {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #98620F;
    background: #FFF7E6;
    border: 1px solid rgba(224, 149, 22, .24);
    border-radius: 50%;
    font-size: 14px;
    line-height: 1;
    text-align: center;
}

.medem-workday-break__icon .fa {
    width: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    text-align: center;
}

.medem-workday-break__icon .fa-cutlery {
    transform: translateY(6px);
}

.medem-workday-break strong,
.medem-workday-break span {
    display: block;
}

.medem-workday-break strong {
    color: var(--med-ink);
    font-size: 13px;
    line-height: 1.2;
}

.medem-workday-break span {
    margin-top: 3px;
    color: var(--med-muted);
    font-size: 12px;
    line-height: 1.35;
}

.medem-workday-menu__section + .medem-workday-menu__section,
.medem-workday-requests {
    margin-top: 14px;
}

.medem-workday-menu__section-title {
    margin-bottom: 9px;
    color: var(--med-ink);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.medem-workday-vacation {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    margin-bottom: 14px;
    padding: 12px;
    color: #7A520C;
    background: #FFF8DE;
    border: 1px solid rgba(224, 149, 22, .30);
    box-shadow: inset 3px 0 0 #F6B454;
}

.medem-workday-vacation[hidden] {
    display: none !important;
}

.medem-workday-vacation__icon {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #B97714;
    background: #fff;
    border: 1px solid rgba(224, 149, 22, .22);
    border-radius: 50%;
    font-size: 20px;
}

.medem-workday-vacation__svg {
    width: 32px;
    height: 32px;
    display: block;
    overflow: visible;
}

.medem-workday-vacation__sun {
    fill: #F6B454;
    stroke: #D99516;
    stroke-width: 1.4;
}

.medem-workday-vacation__trunk,
.medem-workday-vacation__sand {
    fill: none;
    stroke: #B97714;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.medem-workday-vacation__leaf {
    fill: #4FAD7C;
    stroke: #237655;
    stroke-width: 1.3;
    stroke-linejoin: round;
}

.medem-workday-vacation strong {
    display: block;
    font-weight: 600;
}

.medem-workday-vacation > div > span {
    display: block;
    margin-top: 3px;
    color: #8A5700;
    font-size: 12px;
    line-height: 1.35;
}

.medem-workday-week {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
}

.medem-workday-day {
    position: relative;
    min-width: 0;
    display: grid;
    gap: 6px;
    align-content: start;
    justify-items: stretch;
    min-height: 58px;
    padding: 8px 7px;
    overflow: hidden;
    color: var(--med-ink);
    background: var(--med-surface-soft);
    border: 1px solid var(--med-border);
    border-left: 3px solid var(--med-primary);
    text-align: left;
}

.medem-workday-day::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.medem-workday-day__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 6px;
}

.medem-workday-day strong,
.medem-workday-day span,
.medem-workday-day em,
.medem-workday-day small {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.medem-workday-day strong {
    color: var(--med-ink);
    font-size: 11px;
    font-weight: 700;
}

.medem-workday-day span,
.medem-workday-day small {
    color: var(--med-muted);
    font-size: 11px;
}

.medem-workday-day em {
    display: block;
    justify-self: start;
    padding: 3px 6px;
    color: var(--med-primary-dark);
    background: var(--med-blue-soft);
    border: 1px solid rgba(11, 77, 205, .14);
    font-size: 10px;
    font-style: normal;
    font-weight: 600;
    line-height: 1.15;
}

.medem-workday-day--work {
    border-left-color: var(--med-primary);
}

.medem-workday-day--vacation {
    color: #7A520C;
    background: #FFF8DE;
    border-color: rgba(224, 149, 22, .28);
    border-left-color: #F6B454;
}

.medem-workday-day--vacation em {
    color: #7A520C;
    background: #fff;
    border-color: rgba(224, 149, 22, .24);
}

.medem-workday-day--off {
    background: rgba(55, 210, 200, .08);
    border-left-color: var(--med-teal);
}

.medem-workday-day--off em {
    color: #117065;
    background: rgba(55, 210, 200, .12);
    border-color: rgba(55, 210, 200, .24);
}

.medem-workday-day--danger,
.medem-workday-day--holiday {
    background: rgba(217, 99, 80, .10);
    border-color: rgba(217, 99, 80, .22);
    border-left-color: #D96350;
}

.medem-workday-day--danger em,
.medem-workday-day--holiday em {
    color: #A33B2D;
    background: rgba(217, 99, 80, .12);
    border-color: rgba(217, 99, 80, .24);
}

.medem-workday-day--short {
    background: rgba(246, 180, 84, .12);
    border-left-color: #F6B454;
}

.medem-workday-day--special {
    background: rgba(122, 91, 199, .10);
    border-left-color: #7A5BC7;
}

.medem-workday-day.is-past {
    color: #71839A;
    background: #EEF3F8;
    border-color: #D7E2EE;
    border-left-color: #9FB0C2;
}

.medem-workday-day.is-past em {
    color: #68798F;
    background: #E4ECF5;
    border-color: #D1DEEB;
}

.medem-workday-day.is-past::after {
    background: repeating-linear-gradient(
        -45deg,
        rgba(120, 142, 166, .10) 0,
        rgba(120, 142, 166, .10) 6px,
        transparent 6px,
        transparent 12px
    );
}

.medem-workday-day.is-today {
    background: #F3F8FF;
    border-color: rgba(11, 77, 205, .32);
    border-left-color: var(--med-primary);
    box-shadow: 0 0 0 1px rgba(11, 77, 205, .12), 0 8px 18px rgba(6, 48, 111, .10);
}

.medem-workday-day.is-today em {
    color: var(--med-primary-dark);
    background: #EAF3FF;
    border-color: rgba(11, 77, 205, .22);
}

.medem-workday-day.is-today::after {
    background: linear-gradient(
        110deg,
        transparent 0,
        transparent 34%,
        rgba(11, 77, 205, .12) 44%,
        transparent 56%,
        transparent 100%
    );
    animation: medemWorkdayTodaySweep 1.5s ease-in-out infinite;
}

@keyframes medemWorkdayTodaySweep {
    0% {
        transform: translateX(-120%);
    }

    84%,
    100% {
        transform: translateX(120%);
    }
}

.medem-workday-event {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 9px;
    background: var(--med-surface-soft);
    border: 1px solid var(--med-border);
}

.medem-workday-event__icon {
    width: 32px;
    height: 32px;
    color: var(--med-primary);
    background: var(--med-blue-soft);
    border: 1px solid rgba(11, 77, 205, .16);
}

.medem-workday-event strong,
.medem-workday-event span,
.medem-workday-event small {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.medem-workday-event strong {
    font-size: 13px;
    font-weight: 600;
}

.medem-workday-event span,
.medem-workday-event small {
    color: var(--med-muted);
    font-size: 12px;
}

.medem-workday-requests,
.medem-workday-menu__empty {
    padding: 10px;
    color: var(--med-muted);
    background: var(--med-surface-soft);
    border: 1px solid var(--med-border);
    font-size: 13px;
}

.medem-workday-requests .fa {
    margin-right: 5px;
    color: var(--med-primary);
}

.medem-theme-toggle {
    width: 84px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
    background: transparent;
    border: 0;
    outline: 0;
}

.medem-theme-toggle__track {
    position: relative;
    width: 68px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: var(--med-muted);
    background: var(--med-surface-soft);
    border: 1px solid var(--med-border);
    border-radius: 999px;
    box-shadow: inset 0 1px 2px rgba(6, 48, 111, .08);
    transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.medem-theme-toggle__icon {
    position: absolute;
    top: 50%;
    z-index: 1;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    line-height: 1;
    transform: translateY(-50%);
    transition: color .18s ease;
}

.medem-theme-toggle__icon--sun {
    left: 3px;
}

.medem-theme-toggle__icon--moon {
    right: 3px;
}

.medem-theme-toggle__thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    background: #fff;
    border: 1px solid rgba(6, 48, 111, .12);
    border-radius: 50%;
    box-shadow: 0 3px 8px rgba(6, 48, 111, .18);
    transition: transform .2s ease, background-color .18s ease, border-color .18s ease;
}

.medem-theme-toggle:hover .medem-theme-toggle__track,
.medem-theme-toggle:focus .medem-theme-toggle__track {
    border-color: rgba(11, 77, 205, .32);
    box-shadow: 0 0 0 3px rgba(11, 77, 205, .10);
}

body.medem-theme-dark .medem-theme-toggle__track {
    color: #9fb1c6;
    background: #111b26;
    border-color: #34475a;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, .28);
}

body.medem-theme-dark .medem-theme-toggle__thumb {
    transform: translateX(36px);
    background: #dbeafe;
    border-color: rgba(100, 168, 255, .36);
}

body.medem-theme-dark .medem-theme-toggle__icon--moon,
body:not(.medem-theme-dark) .medem-theme-toggle__icon--sun {
    color: var(--med-primary);
}

@media (max-width: 991px) {
    .medem-weather-widget {
        padding: 0 8px;
    }
}

@media (max-width: 767px) {
    .medem-weather-nav,
    .medem-workday-nav {
        display: flex !important;
    }

    .main-header .navbar-custom-menu {
        position: absolute;
        top: 0;
        right: 0;
        height: 42px;
    }

    .main-header .navbar-custom-menu > .navbar-nav {
        display: flex;
        flex-direction: row;
        align-items: center;
        margin: 0;
    }

    .main-header .navbar-custom-menu > .navbar-nav > li {
        float: none;
    }

    .medem-weather-widget {
        max-width: 112px;
        height: 30px;
        gap: 5px;
        margin: 0 1px;
        padding: 0 7px;
    }

    .medem-weather-widget__city {
        display: none;
    }

    .medem-weather-widget__icon {
        width: 15px;
        min-width: 15px;
        font-size: 13px;
    }

    .medem-weather-widget__temp {
        font-size: 11px;
    }

    .medem-weather-widget__time {
        width: 40px;
        min-width: 40px;
        flex-basis: 40px;
        grid-template-columns: 17px 4px 17px;
        font-size: 11px;
    }

    .medem-workday-widget {
        min-width: 70px;
        max-width: 78px;
        height: 30px;
        gap: 5px;
        margin: 0 1px;
        padding: 0 7px;
    }

    .medem-workday-widget__label {
        position: absolute;
    }

    .medem-workday-widget__icon {
        width: 15px;
        min-width: 15px;
        font-size: 13px;
    }

    .medem-workday-widget__value {
        min-width: 0;
        max-width: 42px;
        overflow: hidden;
        font-size: 11px;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .medem-workday-widget.has-countdown .medem-workday-widget__value {
        width: 40px;
        min-width: 40px;
        flex-basis: 40px;
        grid-template-columns: 17px 4px 17px;
    }

    .medem-weather-menu,
    .medem-workday-menu,
    .medem-gamification-menu,
    .skin-black .navbar-nav > #user-profile.user-menu > .dropdown-menu {
        position: fixed !important;
        top: 42px !important;
        right: 8px !important;
        left: 8px !important;
        width: calc(100vw - 16px) !important;
        min-width: 0 !important;
        max-width: calc(100vw - 16px) !important;
        max-height: calc(100vh - 54px);
        margin-top: 0;
        overflow-x: hidden !important;
        overflow-y: auto !important;
    }

    .medem-weather-menu:before,
    .medem-workday-menu:before,
    .medem-gamification-menu:before,
    .skin-black .navbar-nav > #user-profile.user-menu > .dropdown-menu:before {
        content: none;
    }

    .medem-weather-menu__header,
    .medem-workday-menu__header,
    .medem-gamification-menu__header {
        grid-template-columns: 34px minmax(0, 1fr) auto;
        gap: 10px;
        padding: 12px;
    }

    .medem-weather-menu__content,
    .medem-workday-menu__content,
    .medem-gamification-menu__content {
        padding: 12px;
    }

    .medem-weather-hourly {
        grid-template-columns: 1fr;
        grid-auto-columns: auto;
        gap: 7px;
        overflow-x: hidden;
    }

    .medem-weather-hour {
        width: 100%;
        grid-template-columns: 48px 22px 44px minmax(0, 1fr);
        gap: 5px 8px;
    }

    .medem-weather-hour__meta {
        display: block;
        grid-column: 1 / -1;
        min-width: 0;
        overflow: visible;
        font-size: 11.5px;
        line-height: 1.25;
        text-overflow: clip;
        white-space: normal;
    }

    .medem-weather-week {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .medem-workday-week {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .medem-workday-day {
        min-height: 58px;
        padding: 8px;
    }

    .medem-workday-vacation {
        grid-template-columns: 36px minmax(0, 1fr);
        gap: 10px;
        padding: 10px;
    }

    .medem-workday-vacation__icon {
        width: 36px;
        height: 36px;
        font-size: 17px;
    }

    .medem-theme-toggle {
        width: 64px;
        padding: 0 4px;
    }

    .medem-theme-toggle__track {
        width: 54px;
        height: 30px;
    }

    .medem-theme-toggle__thumb {
        width: 22px;
        height: 22px;
    }

    .medem-theme-toggle__icon {
        width: 22px;
        height: 22px;
    }

    body.medem-theme-dark .medem-theme-toggle__thumb {
        transform: translateX(24px);
    }

    #user-profile {
        position: static;
    }

    #user-profile > .dropdown-toggle {
        width: 42px;
        padding: 0 7px !important;
        justify-content: center;
    }

    .skin-black .navbar-nav > #user-profile.user-menu > .dropdown-menu > .user-header {
        min-height: 0;
        padding: 14px 12px 12px;
    }

    .skin-black .navbar-nav > #user-profile.user-menu > .dropdown-menu > .user-header > img {
        width: 76px !important;
        height: 76px !important;
        min-width: 76px;
        max-width: 76px;
        min-height: 76px;
        max-height: 76px;
    }

    .user-menu-name {
        font-size: 17px;
        line-height: 1.25;
    }

    .user-menu-details {
        gap: 5px;
    }

    .user-menu-detail {
        grid-template-columns: 82px minmax(0, 1fr);
        gap: 8px;
    }

    .skin-black .navbar-nav > #user-profile.user-menu > .dropdown-menu > .user-footer {
        display: grid;
        gap: 8px;
        padding: 8px 12px 12px;
        background: var(--med-surface);
    }

    .skin-black .navbar-nav > #user-profile.user-menu > .dropdown-menu > .user-footer .pull-left,
    .skin-black .navbar-nav > #user-profile.user-menu > .dropdown-menu > .user-footer .pull-right {
        float: none !important;
    }

    .skin-black .navbar-nav > #user-profile.user-menu > .dropdown-menu > .user-footer .btn {
        width: 100%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 7px;
    }
}

@media (max-width: 360px) {
    .medem-weather-widget {
        max-width: 96px;
        padding: 0 6px;
    }

    .medem-weather-widget__temp {
        display: none;
    }
}

.top-user-avatar {
    width: 26px;
    height: 26px;
    min-width: 26px;
    max-width: 26px;
    min-height: 26px;
    max-height: 26px;
    flex: 0 0 26px;
    display: inline-block;
    aspect-ratio: 1 / 1;
    box-sizing: border-box;
    object-fit: cover;
    padding: 0;
    background: #fff;
    border: 1px solid rgba(11, 77, 205, .34);
    border-radius: 50%;
    clip-path: circle(50% at 50% 50%);
    box-shadow: 0 2px 7px rgba(6, 48, 111, .14);
}

.top-user-avatar[src*="no-user-image.gif"] {
    padding: 4px;
    object-fit: contain;
}

.skin-black .navbar-nav > #user-profile.user-menu > .dropdown-menu,
.skin-black .navbar-nav > #user-profile.user-menu > .dropdown-menu > .user-header,
.skin-black .navbar-nav > #user-profile.user-menu > .dropdown-menu > .user-footer .btn,
.skin-black .navbar-nav > #user-profile.user-menu > .dropdown-menu > .user-header .user-menu-card-link,
.skin-black .navbar-nav > #user-profile.user-menu > .dropdown-menu > .user-header .user-menu-card-copy {
    border-radius: 0 !important;
}

.user-menu-name {
    margin: 0;
    font-weight: 600;
}

.user-menu-email {
    display: block;
    margin-top: 6px;
    color: var(--med-ink);
    font-size: 13px;
    font-weight: 500;
    opacity: .82;
}

.form-section {
    padding-top: 10px;
    margin-top: 10px;
    border-top: 1px solid #eee;
}

.settings-note {
    margin: 0 0 16px;
    padding: 12px 14px;
    color: var(--med-muted);
    background: var(--med-surface-soft);
    border: 1px solid var(--med-border);
    font-size: 13px;
    line-height: 1.45;
}

.settings-note strong {
    color: var(--med-ink);
}

.gigachat-shell {
    display: flex;
    flex-direction: column;
    min-height: 620px;
    background: var(--med-surface);
    border: 1px solid var(--med-border);
    box-shadow: var(--med-shadow);
}

.gigachat-thread {
    flex: 1 1 auto;
    min-height: 420px;
    max-height: calc(100vh - 300px);
    overflow-y: auto;
    padding: 18px;
    background: linear-gradient(180deg, rgba(11, 77, 205, .035), rgba(255, 255, 255, 0));
}

.gigachat-message {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 14px;
}

.gigachat-message--user {
    flex-direction: row-reverse;
}

.gigachat-message__avatar {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--med-primary);
    background: var(--med-blue-soft);
    border: 1px solid rgba(11, 77, 205, .12);
    border-radius: 50%;
}

.gigachat-message__avatar img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    border-radius: 50%;
}

.gigachat-message--user .gigachat-message__avatar {
    color: #0F6B4F;
    background: #E8F8F1;
    border-color: rgba(15, 107, 79, .14);
}

.gigachat-message--error .gigachat-message__avatar {
    color: #A94442;
    background: #FCEAEA;
    border-color: rgba(169, 68, 66, .16);
}

.gigachat-message__bubble {
    width: fit-content;
    max-width: min(760px, 82%);
    min-width: 0;
    padding: 12px 14px;
    color: var(--med-ink);
    background: var(--med-surface);
    border: 1px solid var(--med-border);
    border-radius: 8px;
    box-shadow: 0 8px 22px rgba(6, 48, 111, .07);
}

.gigachat-message--assistant .gigachat-message__bubble {
    flex: 1 1 auto;
    width: auto;
    max-width: none;
}

.gigachat-message--user .gigachat-message__bubble {
    color: #083B2D;
    background: #F3FCF8;
    border-color: rgba(15, 107, 79, .16);
}

.gigachat-message--error .gigachat-message__bubble {
    color: #8A2D2B;
    background: #FFF5F5;
    border-color: rgba(169, 68, 66, .18);
}

.gigachat-message__bubble strong,
.gigachat-message__bubble p,
.gigachat-message__bubble small {
    display: block;
}

.gigachat-message__bubble p {
    margin: 6px 0 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    line-height: 1.48;
}

.gigachat-message__bubble small {
    margin-top: 8px;
    color: var(--med-muted);
}

.gigachat-composer {
    flex: 0 0 auto;
    padding: 14px;
    border-top: 1px solid var(--med-border);
    background: var(--med-surface);
}

.gigachat-composer textarea {
    resize: vertical;
}

.gigachat-composer__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 10px;
}

.gigachat-composer__actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.gigachat-composer__bar span {
    min-width: 0;
    color: var(--med-muted);
    font-size: 13px;
}

.gigachat-settings-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
}

.gigachat-settings-stack {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.gigachat-settings-section {
    border-top: 1px solid var(--med-border);
    padding-top: 18px;
}

.gigachat-settings-section:first-child {
    border-top: 0;
    padding-top: 0;
}

.gigachat-settings-section__head {
    margin-bottom: 14px;
}

.gigachat-settings-section__head h3 {
    margin: 0 0 4px;
    color: var(--med-ink);
    font-size: 17px;
    font-weight: 700;
}

.gigachat-settings-section__head p {
    margin: 0;
    color: var(--med-muted);
    font-size: 13px;
}

.gigachat-settings-grid__wide {
    grid-column: 1 / -1;
}

.gigachat-settings-toggle {
    min-height: 74px;
}

.gigachat-settings-toggle > span > strong {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    max-width: 100%;
    line-height: 1.25;
}

.gigachat-clear-key {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0 0;
    color: var(--med-muted);
    font-weight: 400;
}

.gigachat-help {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    margin-left: 2px;
    color: var(--med-muted);
    cursor: help;
    font-size: 12px;
    line-height: 1;
    vertical-align: middle;
}

.gigachat-help:hover,
.gigachat-help:focus {
    color: var(--med-primary);
}

.gigachat-statistics {
    margin: 0 0 22px;
    padding: 16px;
    color: var(--med-ink);
    background: #F8FAFD;
    border: 1px solid var(--med-border);
    border-radius: 8px;
}

.gigachat-statistics__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding-bottom: 14px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--med-border);
}

.gigachat-statistics__head h3 {
    margin: 0 0 5px;
    color: var(--med-ink);
    font-size: 18px;
    font-weight: 700;
}

.gigachat-statistics__head p {
    margin: 0;
    color: var(--med-muted);
    font-size: 13px;
    line-height: 1.45;
}

.gigachat-statistics__status,
.gigachat-statistics__hint {
    padding: 11px 12px;
    color: var(--med-muted);
    background: var(--med-surface);
    border: 1px dashed var(--med-border);
    border-radius: 8px;
    font-size: 13px;
}

.gigachat-statistics__content {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.gigachat-statistics__group {
    min-width: 0;
}

.gigachat-statistics__title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.gigachat-statistics__title strong {
    color: var(--med-ink);
    font-size: 15px;
}

.gigachat-statistics__title span {
    color: var(--med-muted);
    font-size: 12px;
}

.gigachat-statistics__cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.gigachat-statistics__cards--grouped {
    display: flex;
    flex-direction: column;
}

.gigachat-statistics-row {
    display: grid;
    gap: 12px;
}

.gigachat-statistics-row--totals,
.gigachat-statistics-row--scenarios {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.gigachat-statistics-row--models {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.gigachat-statistics-card {
    min-height: 96px;
    padding: 13px 14px;
    background: var(--med-surface);
    border: 1px solid rgba(201, 214, 229, .86);
    border-radius: 8px;
}

.gigachat-statistics-card strong,
.gigachat-statistics-card span,
.gigachat-statistics-card small {
    display: block;
}

.gigachat-statistics-card strong {
    margin-bottom: 9px;
    color: var(--med-ink);
    font-size: 14px;
}

.gigachat-statistics-card span {
    color: var(--med-primary);
    font-size: 21px;
    font-weight: 800;
    line-height: 1.15;
}

.gigachat-statistics-card small {
    margin-top: 5px;
    color: var(--med-muted);
    font-size: 12px;
}

.gigachat-statistics__hint {
    margin-top: 10px;
    color: #8A5D1D;
    background: #FFF8E7;
    border-color: #F1D9A9;
}

@media (max-width: 991px) {
    .gigachat-settings-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .gigachat-statistics__cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .gigachat-statistics-row--models {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .gigachat-shell {
        min-height: calc(100vh - 180px);
    }

    .gigachat-thread {
        min-height: 340px;
        max-height: none;
        padding: 12px;
    }

    .gigachat-message__bubble {
        max-width: calc(100% - 46px);
    }

    .gigachat-message--assistant .gigachat-message__bubble {
        max-width: none;
    }

    .gigachat-composer__bar {
        align-items: stretch;
        flex-direction: column;
    }

    .gigachat-composer__actions {
        justify-content: stretch;
    }

    .gigachat-composer__actions .btn {
        flex: 1 1 auto;
    }

    .gigachat-settings-grid {
        grid-template-columns: 1fr;
    }

    .gigachat-statistics__head,
    .gigachat-statistics__title {
        align-items: stretch;
        flex-direction: column;
    }

    .gigachat-statistics__cards {
        grid-template-columns: 1fr;
    }

    .gigachat-statistics-row--totals,
    .gigachat-statistics-row--scenarios,
    .gigachat-statistics-row--models {
        grid-template-columns: 1fr;
    }
}

.task-viewbar {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    flex-wrap: wrap;
    min-height: 58px;
}

.task-viewbar__left {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    flex-wrap: wrap;
    margin-right: auto;
}

.task-viewbar > .btn,
.task-viewbar .task-calendar-nav {
    margin-left: auto;
}

.task-viewbar .btn,
.task-calendar-nav .btn {
    min-height: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding-top: 0;
    padding-bottom: 0;
    line-height: 1;
    vertical-align: middle;
}

.task-viewbar .btn.active,
.task-viewbar .btn:active,
.task-calendar-nav .btn:active {
    box-shadow: none;
    transform: none;
}

.task-ai-card {
    display: grid;
    gap: 14px;
    margin-bottom: 16px;
    padding: 16px;
    color: var(--med-text);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(247, 251, 255, 0.98));
    border: 1px solid var(--med-border);
    border-left: 4px solid var(--med-primary);
    border-radius: 8px;
}

.task-ai-card__head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.task-ai-card__icon {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    color: var(--med-primary);
    background: rgba(11, 77, 205, 0.08);
    border: 1px solid rgba(11, 77, 205, 0.16);
    border-radius: 8px;
}

.task-ai-card__head h3 {
    margin: 0 0 4px;
    color: var(--med-text);
    font-size: 17px;
    font-weight: 700;
}

.task-ai-card__head p {
    margin: 0;
    color: var(--med-muted);
    font-size: 13px;
    line-height: 1.45;
}

.task-ai-card__composer {
    display: grid;
    gap: 10px;
}

.task-ai-card__composer textarea {
    min-height: 86px;
    resize: vertical;
}

.task-ai-card__actions,
.task-ai-card__preview-actions,
.task-ai-card__empty {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.task-ai-card__actions .btn,
.task-ai-card__preview-actions .btn,
.task-ai-card__empty .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.task-ai-card__status {
    min-width: 0;
    color: var(--med-muted);
    font-size: 13px;
}

.task-ai-card__status.is-error {
    color: #c0392b;
}

.task-ai-card__status.is-success {
    color: #1f7a4d;
}

.task-ai-card__voice-wave {
    width: min(520px, 100%);
}

.task-ai-card__preview {
    display: grid;
    gap: 12px;
    padding: 14px;
    background: var(--med-surface);
    border: 1px solid var(--med-border);
    border-radius: 8px;
}

.task-ai-card__preview-main {
    display: grid;
    gap: 4px;
}

.task-ai-card__preview-main strong {
    color: var(--med-text);
    font-size: 16px;
}

.task-ai-card__preview-main span,
.task-ai-card__preview-note {
    color: var(--med-muted);
    font-size: 13px;
    line-height: 1.45;
}

.task-ai-card__editor {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    padding: 12px;
    background: var(--med-surface-soft);
    border: 1px solid var(--med-border);
    border-radius: 8px;
}

.task-ai-card__editor .form-group {
    min-width: 0;
    margin-bottom: 0;
}

.task-ai-card__editor-wide {
    grid-column: 1 / -1;
}

.task-ai-card__editor-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.task-ai-card__editor-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.task-ai-card__preview-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.task-ai-card__preview-grid > div {
    min-width: 0;
    padding: 10px;
    background: var(--med-surface-soft);
    border: 1px solid var(--med-border);
    border-radius: 6px;
}

.task-ai-card__preview-grid span {
    display: block;
    margin-bottom: 3px;
    color: var(--med-muted);
    font-size: 11px;
    text-transform: uppercase;
}

.task-ai-card__preview-grid strong {
    display: block;
    overflow-wrap: anywhere;
    color: var(--med-text);
    font-size: 13px;
}

.task-ai-card__empty {
    justify-content: space-between;
    padding: 12px;
    color: var(--med-muted);
    background: var(--med-surface-soft);
    border: 1px dashed var(--med-border);
    border-radius: 8px;
}

.task-ai-card__empty span {
    min-width: 0;
}

.task-ai-card .btn.is-recording,
.task-ai-card .btn.is-recording:hover,
.task-ai-card .btn.is-recording:focus,
.task-ai-card .btn.is-recording:active {
    min-width: 104px;
    color: #fff !important;
    background: #c0392b !important;
    border-color: #a93226 !important;
    box-shadow: none;
}

.task-ai-card .btn.is-recording .fa {
    color: #fff !important;
}

.task-filter-panel {
    margin-bottom: 16px;
    padding: 14px;
    background: var(--med-surface-soft);
    border: 1px solid var(--med-border);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 460px);
    gap: 12px 16px;
    align-items: end;
    justify-content: start;
}

.task-filter-panel__grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
    align-items: end;
}

.task-filter-field {
    min-width: 0;
    display: grid;
    gap: 6px;
    margin: 0;
}

.task-filter-field > span {
    color: var(--med-muted);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .04em;
    line-height: 1;
    text-transform: uppercase;
}

.task-filter-field .form-control,
.task-filter-panel__search .form-control {
    height: 36px;
    font-weight: 400;
}

.task-filter-field .form-control option {
    font-weight: 400;
}

.task-filter-panel__search {
    min-width: 0;
}

.task-filter-panel__search .input-group {
    width: 100%;
}

.task-page-size {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: var(--med-muted);
}

.task-page-size .form-control {
    width: 80px;
}

.task-table td {
    vertical-align: middle !important;
}

.task-title-link {
    font-weight: 700;
}

.task-public-id {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 22px;
    padding: 3px 8px;
    color: var(--med-primary-dark);
    background: var(--med-blue-soft);
    border: 1px solid rgba(11, 77, 205, .16);
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
}

a.task-public-id:hover,
a.task-public-id:focus {
    color: var(--med-primary-dark);
    border-color: rgba(11, 77, 205, .34);
    text-decoration: none;
    outline: 0;
}

.task-public-id--inline {
    margin-right: 7px;
    vertical-align: middle;
}

.task-public-id--heading {
    transform: translateY(-2px);
}

.task-public-id--card {
    margin-right: 6px;
}

.task-public-id--calendar {
    min-height: 18px;
    margin-right: 4px;
    padding: 1px 5px;
    font-size: 11px;
}

.task-badge,
.task-priority,
.task-overdue-label,
.task-archive-label {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 3px 8px;
    border: 1px solid transparent;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
}

.task-priority {
    gap: 6px;
}

.task-priority .task-priority-mark {
    margin-right: 1px;
}

.task-badge--default,
.task-priority--primary {
    color: var(--med-primary-dark);
    background: var(--med-blue-soft);
    border-color: rgba(11, 77, 205, .12);
}

.task-badge--primary {
    color: var(--med-primary-dark);
    background: rgba(11, 77, 205, .10);
    border-color: rgba(11, 77, 205, .22);
}

.task-badge--success {
    color: #126341;
    background: #E7F8F0;
    border-color: rgba(18, 99, 65, .16);
}

.task-badge--warning,
.task-priority--warning {
    color: #7A4A00;
    background: #FFF4D9;
    border-color: rgba(185, 126, 0, .18);
}

.task-badge--danger,
.task-priority--danger,
.task-overdue-label {
    color: #8E2E1F;
    background: #FDEDE9;
    border-color: rgba(216, 90, 69, .24);
}

.task-badge--muted,
.task-priority--muted {
    color: var(--med-muted);
    background: var(--med-surface-soft);
    border-color: var(--med-border);
}

.task-archive-label {
    gap: 5px;
    margin-left: 6px;
    color: #56677D;
    background: rgba(142, 160, 182, .10);
    border-color: rgba(142, 160, 182, .26);
}

.task-priority-mark {
    --task-priority-color: var(--med-primary);
    width: 10px;
    height: 12px;
    display: inline-block;
    flex: 0 0 auto;
    color: var(--task-priority-color);
    fill: currentColor;
    overflow: visible;
    vertical-align: -1px;
}

.task-priority-mark rect {
    fill: currentColor;
}

.task-priority-mark--low {
    --task-priority-color: #2F7D62;
}

.task-priority-mark--normal {
    --task-priority-color: var(--med-primary);
}

.task-priority-mark--high {
    --task-priority-color: #B97714;
}

.task-priority-mark--urgent {
    --task-priority-color: #D85A45;
}

.task-overdue-label {
    margin-left: 6px;
}

.task-row--overdue {
    background: rgba(216, 90, 69, .035);
}

.task-row--archived {
    opacity: .82;
}

.task-status-accent {
    --task-status-color: var(--med-primary);
    --task-status-soft: rgba(11, 77, 205, .07);
}

.task-status-accent__bar {
    position: absolute;
    top: 0;
    bottom: 0;
    left: -4px;
    z-index: 2;
    width: 10px;
    cursor: help;
}

.task-status-accent--new {
    --task-status-color: #6B7A8C;
    --task-status-soft: rgba(107, 122, 140, .09);
}

.task-status-accent--waiting_distribution {
    --task-status-color: #B97714;
    --task-status-soft: rgba(185, 119, 20, .11);
}

.task-status-accent--assigned {
    --task-status-color: #0B4DCD;
    --task-status-soft: rgba(11, 77, 205, .09);
}

.task-status-accent--accepted {
    --task-status-color: #2F6FE4;
    --task-status-soft: rgba(47, 111, 228, .1);
}

.task-status-accent--in_progress {
    --task-status-color: #0E8F8F;
    --task-status-soft: rgba(14, 143, 143, .1);
}

.task-status-accent--waiting_info {
    --task-status-color: #D85A45;
    --task-status-soft: rgba(216, 90, 69, .11);
}

.task-status-accent--deadline_requested {
    --task-status-color: #C48A1A;
    --task-status-soft: rgba(196, 138, 26, .12);
}

.task-status-accent--review {
    --task-status-color: #6B63C7;
    --task-status-soft: rgba(107, 99, 199, .1);
}

.task-status-accent--done {
    --task-status-color: #2F7D62;
    --task-status-soft: rgba(47, 125, 98, .11);
}

.task-status-accent--returned {
    --task-status-color: #B9442F;
    --task-status-soft: rgba(185, 68, 47, .12);
}

.task-status-accent--canceled {
    --task-status-color: #7D8792;
    --task-status-soft: rgba(125, 135, 146, .1);
}

.task-table tr.task-status-accent > td:first-child {
    box-shadow: inset 4px 0 0 var(--task-status-color);
}

.task-form-layout {
    display: grid;
    gap: 18px;
}

.task-form-layout--composer {
    gap: 22px;
}

.task-form-lock-frame {
    position: relative;
    min-height: 360px;
}

.task-form-box--locked .task-form-lock-content {
    filter: blur(2px);
    opacity: .34;
    pointer-events: none;
    user-select: none;
}

.task-form-lock-overlay {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(247, 250, 253, .58);
    backdrop-filter: blur(5px);
}

.task-form-lock-card {
    width: min(430px, 100%);
    display: grid;
    gap: 10px;
    justify-items: center;
    padding: 24px 26px;
    color: var(--med-ink);
    background: rgba(255, 255, 255, .9);
    border: 1px solid var(--med-border);
    border-radius: 8px;
    box-shadow: 0 18px 46px rgba(11, 25, 46, .12);
    text-align: center;
}

.task-form-lock-card > i {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: var(--med-primary);
    border-radius: 50%;
    font-size: 18px;
}

.task-form-lock-card strong {
    font-size: 18px;
    font-weight: 600;
}

.task-form-lock-card span {
    color: var(--med-muted);
    font-size: 14px;
    line-height: 1.45;
}

.task-form-box--locked .task-form-footer .btn-primary {
    display: none;
}

.task-form-layout--composer label,
.task-form-layout--composer .btn,
.task-form-layout--composer .form-control,
.task-form-layout--composer .medem-combobox__trigger,
.task-form-layout--composer .task-employee-picker__trigger {
    font-weight: 600;
}

.task-form-composer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 336px;
    gap: 22px;
    align-items: start;
}

.task-form-composer__main {
    display: grid;
    gap: 18px;
    align-content: start;
}

.task-form-row,
.task-form-bottom {
    display: grid;
    gap: 18px;
}

.task-form-row--top {
    grid-template-columns: minmax(0, .68fr) minmax(460px, .32fr);
}

.task-form-row--assignment {
    grid-template-columns: minmax(230px, .62fr) minmax(300px, 1fr);
}

.task-extra-participants {
    grid-column: 2 / -1;
}

.task-extra-participants__list {
    display: grid;
    gap: 8px;
    margin-bottom: 8px;
}

.task-extra-participants__row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 36px;
    gap: 8px;
    align-items: center;
}

.task-extra-participants__remove {
    width: 36px;
    height: 34px;
    padding: 0;
}

.task-extra-participants__add {
    font-weight: 600;
}

.task-participants-help {
    margin: 6px 0 0;
    color: var(--med-muted);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.35;
}

.task-form-row .form-group,
.task-form-bottom .form-group {
    margin-bottom: 0;
}

.task-priority-picker {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.task-priority-picker__input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.task-priority-picker__option {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 8px 10px;
    color: var(--med-ink);
    background: #fff;
    border: 1px solid var(--med-border);
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.15;
    text-align: center;
    transition: background .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease;
}

.task-priority-picker__option .task-priority-mark {
    align-self: center;
    transform: none;
    vertical-align: middle;
}

.task-priority-picker__option--low {
    color: #2F7D62;
    background: rgba(47, 125, 98, .06);
    border-color: rgba(47, 125, 98, .22);
}

.task-priority-picker__option--normal {
    color: var(--med-primary-dark);
    background: rgba(11, 77, 205, .06);
    border-color: rgba(11, 77, 205, .22);
}

.task-priority-picker__option--high {
    color: #8A5B12;
    background: rgba(224, 149, 22, .09);
    border-color: rgba(224, 149, 22, .28);
}

.task-priority-picker__option--urgent {
    color: #B9442F;
    background: rgba(216, 90, 69, .08);
    border-color: rgba(216, 90, 69, .28);
}

.task-priority-picker__input:checked + .task-priority-picker__option--low {
    color: #fff;
    background: #2F7D62;
    border-color: #2F7D62;
}

.task-priority-picker__input:checked + .task-priority-picker__option--normal {
    color: #fff;
    background: var(--med-primary);
    border-color: var(--med-primary);
}

.task-priority-picker__input:checked + .task-priority-picker__option--high {
    color: #fff;
    background: #B97714;
    border-color: #B97714;
}

.task-priority-picker__input:checked + .task-priority-picker__option--urgent {
    color: #fff;
    background: #D85A45;
    border-color: #D85A45;
}

.task-priority-picker__input:checked + .task-priority-picker__option .task-priority-mark {
    --task-priority-color: #fff;
}

.task-priority-picker__option .task-priority-mark {
    min-width: 10px;
    width: 10px;
    height: 12px;
    margin-right: 2px;
}

.task-priority-picker__input:focus + .task-priority-picker__option,
.task-priority-picker__option:hover {
    box-shadow: 0 0 0 2px rgba(11, 77, 205, .12);
}

.task-score-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 22px;
    padding: 3px 7px;
    color: #7A520C;
    background: rgba(255, 191, 64, .14);
    border: 1px solid rgba(224, 149, 22, .28);
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    vertical-align: middle;
}

.task-score-label .fa,
.task-score-icon {
    color: #D99516;
}

.task-score-label--small {
    min-height: 20px;
    padding: 2px 6px;
    font-size: 11px;
}

.task-score-label--tiny {
    min-height: 18px;
    padding: 1px 5px;
    font-size: 10px;
}

.task-deadline-panel {
    display: grid;
    align-content: start;
    gap: 10px;
    padding: 12px;
    background: var(--med-surface-soft);
    border: 1px solid var(--med-border);
    border-radius: 8px;
}

.task-deadline-panel__label {
    margin: 0;
}

.task-deadline-empty {
    display: grid;
    justify-items: center;
    gap: 8px;
    min-height: 214px;
    padding: 26px 16px;
    color: var(--med-muted);
    background: #fff;
    border: 1px dashed rgba(11, 77, 205, .28);
    border-radius: 8px;
    text-align: center;
}

.task-deadline-empty > i {
    color: var(--med-primary);
    font-size: 24px;
}

.task-deadline-empty strong {
    color: var(--med-ink);
    font-weight: 600;
}

.task-deadline-empty span {
    max-width: 260px;
    font-size: 12px;
    line-height: 1.45;
}

.task-deadline-empty[hidden] {
    display: none;
}

.task-deadline-panel.is-empty .task-calendar-picker,
.task-deadline-panel.is-empty .task-time-picker {
    display: none;
}

.task-calendar-picker {
    display: grid;
    gap: 8px;
}

.task-calendar-picker__nav {
    display: grid;
    grid-template-columns: 30px 30px minmax(0, 1fr) 30px 30px;
    gap: 6px;
    align-items: center;
}

.task-calendar-picker__nav button {
    width: 30px;
    height: 30px;
    padding: 0;
    color: var(--med-primary-dark);
    background: #fff;
    border: 1px solid var(--med-border);
    border-radius: 6px;
}

.task-calendar-picker__nav button:hover,
.task-calendar-picker__nav button:focus {
    color: #fff;
    background: var(--med-primary);
    border-color: var(--med-primary);
}

.task-calendar-picker__nav strong {
    min-width: 0;
    color: var(--med-ink);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
}

.task-calendar-picker__weekdays,
.task-calendar-picker__days {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 4px;
}

.task-calendar-picker__weekdays span {
    color: var(--med-muted);
    font-size: 11px;
    font-weight: 600;
    text-align: center;
}

.task-calendar-picker__day,
.task-calendar-picker__blank {
    min-width: 0;
    height: 32px;
}

.task-calendar-picker__day {
    padding: 0;
    color: var(--med-ink);
    background: #fff;
    border: 1px solid var(--med-border);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.task-calendar-picker__day:hover,
.task-calendar-picker__day:focus {
    color: var(--med-primary-dark);
    border-color: rgba(11, 77, 205, .38);
    box-shadow: 0 0 0 2px rgba(11, 77, 205, .1);
}

.task-calendar-picker__day.is-today {
    color: var(--med-primary-dark);
    background: rgba(11, 77, 205, .07);
    border-color: rgba(11, 77, 205, .22);
}

.task-calendar-picker__day.is-selected {
    color: #fff;
    background: var(--med-primary);
    border-color: var(--med-primary);
}

.task-calendar-picker__day.is-weekend:not(.is-selected) {
    color: #8A5B12;
}

.task-calendar-picker__day.is-before-min:not(.is-selected) {
    color: #9DAEC1;
    background: rgba(221, 70, 54, .04);
    border-color: rgba(221, 70, 54, .18);
}

.task-calendar-picker__day.is-before-min:hover,
.task-calendar-picker__day.is-before-min:focus {
    color: #B9442F;
    border-color: rgba(221, 70, 54, .36);
    box-shadow: 0 0 0 2px rgba(221, 70, 54, .12);
}

.task-time-picker {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: end;
}

.task-time-picker label {
    grid-column: 1 / -1;
    margin: 0;
}

.task-time-picker .form-control {
    height: 34px;
}

.task-deadline-warning {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px;
    align-items: start;
    padding: 9px 10px;
    color: #9C2F24;
    background: rgba(221, 70, 54, .09);
    border: 1px solid rgba(221, 70, 54, .24);
    border-radius: 6px;
    font-size: 12px;
    line-height: 1.35;
}

.task-deadline-warning i {
    color: #D85A45;
    margin-top: 1px;
}

.task-deadline-warning span {
    color: #8F2F24;
    font-weight: 600;
}

.task-deadline-warning[hidden] {
    display: none;
}

.task-deadline-panel.has-deadline-warning {
    border-color: rgba(221, 70, 54, .34);
    box-shadow: 0 0 0 2px rgba(221, 70, 54, .08);
}

.task-deadline-mode-picker {
    display: grid;
    gap: 8px;
    padding-top: 2px;
}

.task-deadline-mode-picker__label {
    margin: 0;
    color: var(--med-muted);
    font-size: 12px;
    font-weight: 600;
}

.task-deadline-mode-picker__options,
.task-deadline-mode-picker--sidebar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.task-deadline-mode-picker__input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.task-deadline-mode-picker__option {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 10px;
    color: var(--med-primary-dark);
    background: #fff;
    border: 1px solid var(--med-border);
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.15;
    text-align: center;
    transition: background .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease;
}

.task-deadline-mode-picker__option--soft {
    color: #2F7D62;
    border-color: rgba(47, 125, 98, .22);
    background: rgba(47, 125, 98, .06);
}

.task-deadline-mode-picker__option--strict {
    color: #8A5B12;
    border-color: rgba(224, 149, 22, .28);
    background: rgba(224, 149, 22, .09);
}

.task-deadline-mode-picker__input:checked + .task-deadline-mode-picker__option--soft {
    color: #fff;
    background: #2F7D62;
    border-color: #2F7D62;
}

.task-deadline-mode-picker__input:checked + .task-deadline-mode-picker__option--strict {
    color: #fff;
    background: #B97714;
    border-color: #B97714;
}

.task-deadline-mode-picker__input:focus + .task-deadline-mode-picker__option,
.task-deadline-mode-picker__option:hover {
    box-shadow: 0 0 0 2px rgba(11, 77, 205, .12);
}

.task-deadline-mode-summary {
    display: grid;
    gap: 8px;
    margin-bottom: 12px;
}

.task-deadline-mode-summary p {
    margin: 0;
    color: var(--med-muted);
    font-size: 12px;
    line-height: 1.45;
}

.task-deadline-mode-form {
    display: grid;
    gap: 10px;
}

.task-deadline-mode-form .btn {
    justify-self: start;
}

.task-form-bottom {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 430px);
    align-items: stretch;
    padding-top: 22px;
    border-top: 1px solid var(--med-border);
}

.task-rich-editor {
    display: grid;
    background: #fff;
    border: 1px solid var(--med-border);
    border-radius: 6px;
    overflow: hidden;
}

.task-rich-editor__input {
    display: none;
}

.task-rich-editor__toolbar {
    display: flex;
    gap: 4px;
    align-items: center;
    flex-wrap: wrap;
    padding: 7px;
    background: var(--med-surface-soft);
    border-bottom: 1px solid var(--med-border);
}

.task-rich-editor__toolbar button,
.task-rich-editor__toolbar select {
    min-height: 30px;
    color: var(--med-ink);
    background: #fff;
    border: 1px solid var(--med-border);
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.task-rich-editor__toolbar button {
    width: 32px;
    padding: 0;
}

.task-rich-editor__toolbar select {
    max-width: 150px;
    padding: 0 8px;
}

.task-rich-editor__toolbar button:hover,
.task-rich-editor__toolbar button:focus,
.task-rich-editor__toolbar select:focus {
    color: var(--med-primary-dark);
    border-color: rgba(11, 77, 205, .36);
    outline: 0;
    box-shadow: 0 0 0 2px rgba(11, 77, 205, .1);
}

.task-rich-editor__divider {
    width: 1px;
    height: 22px;
    margin: 0 3px;
    background: var(--med-border);
}

.task-rich-editor__area {
    min-height: 230px;
    padding: 10px 12px;
    color: var(--med-ink);
    background: #fff;
    line-height: 1.55;
    outline: 0;
    overflow: auto;
}

.task-rich-editor__area:focus {
    box-shadow: inset 0 0 0 2px rgba(11, 77, 205, .1);
}

.task-rich-editor__area p,
.task-description p {
    margin: 0 0 8px;
}

.task-rich-editor__area ul,
.task-rich-editor__area ol,
.task-description ul,
.task-description ol {
    margin: 0 0 8px 20px;
    padding: 0;
}

.task-rich-editor__area table,
.task-description table {
    width: 100%;
    margin: 8px 0;
    border-collapse: collapse;
    table-layout: fixed;
}

.task-rich-editor__area th,
.task-rich-editor__area td,
.task-description th,
.task-description td {
    min-width: 42px;
    padding: 7px 8px;
    border: 1px solid var(--med-border);
    vertical-align: top;
}

.task-rich-editor__area th,
.task-description th {
    background: var(--med-surface-soft);
    font-weight: 600;
}

.task-form-attachments {
    display: flex;
    flex-direction: column;
}

.task-form-section__note {
    margin: 8px 0 0;
    color: var(--med-muted);
    font-size: 12px;
    line-height: 1.4;
}

.task-card__header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.task-card__meta {
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    margin-right: auto;
}

.task-card__id {
    flex: 0 1 180px;
    margin-left: auto;
    max-width: 180px;
    text-align: right;
}

.task-lifecycle {
    --task-lifecycle-accent: var(--med-primary);
    padding: 14px 16px 16px;
    border-bottom: 1px solid var(--med-border);
    background: linear-gradient(180deg, rgba(248, 251, 253, .82), rgba(255, 255, 255, .96));
}

.task-lifecycle--working {
    --task-lifecycle-accent: var(--med-teal);
}

.task-lifecycle--paused {
    --task-lifecycle-accent: #c9820b;
}

.task-lifecycle--returned,
.task-lifecycle--canceled {
    --task-lifecycle-accent: var(--med-coral);
}

.task-lifecycle--done {
    --task-lifecycle-accent: #208a55;
}

.task-lifecycle__top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.task-lifecycle__top span {
    grid-column: 1;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--med-muted);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    text-transform: uppercase;
}

.task-lifecycle__top em {
    grid-column: 2;
    min-width: 0;
    color: var(--med-ink);
    font-size: 12px;
    font-style: normal;
    font-weight: 600;
    line-height: 1.25;
    text-align: center;
}

.task-lifecycle__top strong {
    grid-column: 3;
    display: inline-flex;
    min-height: 24px;
    align-items: center;
    justify-self: end;
    padding: 3px 9px;
    border: 1px solid color-mix(in srgb, var(--task-lifecycle-accent), #fff 70%);
    background: color-mix(in srgb, var(--task-lifecycle-accent), #fff 90%);
    color: var(--task-lifecycle-accent);
    font-size: 12px;
    font-weight: 600;
}

.task-lifecycle__scroll {
    overflow-x: auto;
    overflow-y: visible;
    padding: 3px 0 2px;
}

.task-lifecycle__rail {
    position: relative;
    min-width: 600px;
    padding-top: 4px;
}

.task-lifecycle__track {
    position: absolute;
    top: 15px;
    right: var(--task-edge-offset, 8.3333%);
    left: var(--task-edge-offset, 8.3333%);
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: #e5edf6;
}

.task-lifecycle__track span {
    display: block;
    width: var(--task-progress);
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--med-primary), var(--task-lifecycle-accent));
    transition: width .25s ease;
}

.task-lifecycle--working .task-lifecycle__track span {
    background-image: repeating-linear-gradient(
        135deg,
        var(--med-primary) 0,
        var(--med-primary) 8px,
        var(--med-teal) 8px,
        var(--med-teal) 16px
    );
    background-size: 24px 24px;
    animation: taskLifecycleFlow 1.1s linear infinite;
}

.task-lifecycle--paused .task-lifecycle__track span {
    background: repeating-linear-gradient(
        135deg,
        #c9820b 0,
        #c9820b 8px,
        #e7b24b 8px,
        #e7b24b 16px
    );
}

.task-lifecycle__steps {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(6, minmax(86px, 1fr));
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.task-lifecycle__step {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 4px;
    min-width: 0;
    text-align: center;
}

.task-lifecycle__step::before {
    position: absolute;
    top: 8px;
    left: 50%;
    z-index: 1;
    width: 40px;
    height: 20px;
    content: "";
    transform: translateX(-50%);
}

.task-lifecycle__dot {
    position: relative;
    z-index: 2;
    display: inline-flex;
    width: 28px;
    height: 28px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--med-border);
    border-radius: 999px;
    background: var(--med-surface);
    color: var(--med-muted);
    font-size: 12px;
}

.task-lifecycle__step--complete .task-lifecycle__dot {
    border-color: var(--med-primary);
    background: var(--med-primary);
    color: #fff;
}

.task-lifecycle__step--active .task-lifecycle__dot {
    border-color: var(--task-lifecycle-accent);
    background: var(--task-lifecycle-accent);
    color: #fff;
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--task-lifecycle-accent), transparent 82%);
}

.task-lifecycle__label {
    color: var(--med-ink);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.25;
}

.task-lifecycle__step--future .task-lifecycle__label,
.task-lifecycle__step--future small {
    color: var(--med-muted);
}

.task-lifecycle__step small {
    max-width: 112px;
    min-height: 15px;
    overflow: hidden;
    color: var(--med-muted);
    font-size: 10px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.task-lifecycle__future-toggle {
    display: none;
}

@keyframes taskLifecycleFlow {
    from {
        background-position: 0 0;
    }

    to {
        background-position: 24px 0;
    }
}

body.medem-theme-dark .task-lifecycle {
    background: linear-gradient(180deg, rgba(31, 43, 56, .92), rgba(23, 33, 44, .98));
}

body.medem-theme-dark .task-lifecycle__track {
    background: #263648;
}

body.medem-theme-dark .task-lifecycle__top strong {
    background: color-mix(in srgb, var(--task-lifecycle-accent), var(--med-surface) 82%);
    border-color: color-mix(in srgb, var(--task-lifecycle-accent), var(--med-border) 58%);
    color: color-mix(in srgb, var(--task-lifecycle-accent), #fff 24%);
}

@media (max-width: 767px) {
    .task-lifecycle {
        padding: 12px;
    }

    .task-lifecycle__top {
        align-items: flex-start;
        gap: 7px;
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .task-lifecycle__top span {
        grid-column: 1 / -1;
        justify-self: start;
    }

    .task-lifecycle__top em {
        grid-column: 1;
        justify-self: start;
        text-align: left;
    }

    .task-lifecycle__top strong {
        grid-column: auto;
        justify-self: end;
        white-space: nowrap;
    }

    .task-lifecycle__scroll {
        overflow: visible;
    }

    .task-lifecycle__rail {
        min-width: 0;
        padding-top: 0;
    }

    .task-lifecycle__track {
        display: none;
    }

    .task-lifecycle__steps {
        display: grid;
        grid-template-columns: 1fr;
        gap: 7px;
    }

    .task-lifecycle__step {
        grid-template-columns: 32px minmax(0, 1fr);
        justify-items: start;
        gap: 1px 9px;
        min-height: 46px;
        padding: 8px 10px;
        border: 1px solid rgba(213, 224, 237, .82);
        background: rgba(255, 255, 255, .68);
        text-align: left;
    }

    .task-lifecycle:not(.is-expanded) .task-lifecycle__step--future {
        display: none;
    }

    .task-lifecycle__step::before {
        content: none;
    }

    .task-lifecycle__step::after {
        position: absolute;
        top: 41px;
        bottom: -9px;
        left: 25px;
        width: 2px;
        content: "";
        background: #dfe8f3;
    }

    .task-lifecycle__step:last-child::after {
        content: none;
    }

    .task-lifecycle__step--complete::after {
        background: linear-gradient(180deg, var(--med-primary), var(--task-lifecycle-accent));
    }

    .task-lifecycle__step--active {
        border-color: color-mix(in srgb, var(--task-lifecycle-accent), #fff 54%);
        background: color-mix(in srgb, var(--task-lifecycle-accent), #fff 92%);
        box-shadow: inset 3px 0 0 var(--task-lifecycle-accent);
    }

    .task-lifecycle__step--active::after {
        background: var(--task-lifecycle-accent);
    }

    .task-lifecycle__dot {
        grid-row: 1 / 3;
        align-self: center;
        width: 28px;
        height: 28px;
    }

    .task-lifecycle__label {
        align-self: end;
        font-size: 13px;
    }

    .task-lifecycle__step small {
        max-width: 100%;
        min-height: 0;
        white-space: normal;
    }

    .task-lifecycle__future-toggle {
        position: relative;
        width: 100%;
        min-height: 44px;
        display: grid;
        grid-template-columns: 32px minmax(0, 1fr) auto;
        align-items: center;
        gap: 8px;
        margin-top: 7px;
        padding: 7px 10px;
        color: var(--med-muted);
        background: rgba(248, 251, 253, .72);
        border: 1px dashed rgba(149, 164, 186, .62);
        text-align: left;
        font-weight: 600;
    }

    .task-lifecycle__future-toggle:hover,
    .task-lifecycle__future-toggle:focus {
        color: var(--med-primary-dark);
        border-color: rgba(11, 77, 205, .34);
        outline: 0;
    }

    .task-lifecycle__future-toggle::before {
        position: absolute;
        top: -10px;
        left: 24px;
        width: 2px;
        height: 10px;
        content: "";
        background: #dfe8f3;
    }

    .task-lifecycle__future-dot {
        display: inline-flex;
        width: 28px;
        height: 28px;
        align-items: center;
        justify-content: center;
        color: var(--med-muted);
        background: var(--med-surface);
        border: 1px dashed rgba(149, 164, 186, .74);
        border-radius: 999px;
        font-size: 12px;
    }

    .task-lifecycle__future-toggle > .fa {
        transition: transform .18s ease;
    }

    .task-lifecycle__future-toggle [data-lifecycle-expanded] {
        display: none;
    }

    .task-lifecycle.is-expanded .task-lifecycle__future-toggle [data-lifecycle-collapsed] {
        display: none;
    }

    .task-lifecycle.is-expanded .task-lifecycle__future-toggle [data-lifecycle-expanded] {
        display: inline;
    }

    .task-lifecycle.is-expanded .task-lifecycle__future-toggle > .fa {
        transform: rotate(180deg);
    }

    body.medem-theme-dark .task-lifecycle__step {
        border-color: #33445f;
        background: rgba(21, 32, 45, .72);
    }

    body.medem-theme-dark .task-lifecycle__step--active {
        border-color: color-mix(in srgb, var(--task-lifecycle-accent), #33445f 50%);
        background: color-mix(in srgb, var(--task-lifecycle-accent), #15202d 86%);
    }

    body.medem-theme-dark .task-lifecycle__future-toggle {
        color: var(--med-muted);
        background: rgba(21, 32, 45, .58);
        border-color: #33445f;
    }

    body.medem-theme-dark .task-lifecycle__future-toggle:hover,
    body.medem-theme-dark .task-lifecycle__future-toggle:focus {
        color: var(--med-ink);
        border-color: rgba(79, 143, 247, .42);
    }

    body.medem-theme-dark .task-lifecycle__future-dot {
        color: var(--med-muted);
        background: var(--med-surface);
        border-color: #33445f;
    }
}

.task-description {
    margin-bottom: 14px;
    padding: 3px 0 3px 12px;
    border-left: 3px solid rgba(11, 77, 205, .65);
    color: var(--med-ink);
    font-size: 15px;
    font-weight: 500;
    line-height: 1.6;
}

.task-facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
}

.task-facts > div {
    min-height: 44px;
    padding: 6px 9px;
    background: var(--med-surface-soft);
    border: 1px solid rgba(213, 224, 237, .72);
}

.task-facts > div > span {
    display: block;
    color: #718196;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.2;
    text-transform: uppercase;
}

.task-facts > div > strong {
    display: block;
    margin-top: 3px;
    min-width: 0;
    overflow: visible;
    color: #223044;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.25;
    text-overflow: clip;
    white-space: normal;
}

.task-fact--execution {
    grid-column: auto;
}

.task-facts .task-execution-fact {
    display: grid;
    gap: 5px;
}

.task-facts .task-execution-fact__row {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 8px;
    align-items: baseline;
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
    text-transform: none;
}

.task-facts .task-execution-fact__label {
    color: #718196;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.2;
    text-transform: uppercase;
}

.task-facts .task-execution-fact__value,
.task-facts .task-execution-fact__value .task-user-list,
.task-facts .task-execution-fact__value .task-user-list__item {
    min-width: 0;
    color: #223044;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.25;
    text-transform: none;
}

.task-facts .task-execution-fact__value .task-user-list {
    display: flex;
}

.task-user-link,
.task-user-link:visited,
.task-user-link:hover,
.task-user-link:focus {
    color: inherit;
}

.task-user-link {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

.task-user-list {
    display: flex;
    flex-wrap: wrap;
    gap: 3px 8px;
}

.task-user-list__item:not(:last-child)::after {
    content: ",";
    color: var(--med-muted);
}

.task-participants-note {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    margin-top: 10px;
    padding: 9px 11px;
    color: #385574;
    background: rgba(11, 77, 205, .06);
    border: 1px solid rgba(11, 77, 205, .16);
    border-radius: 6px;
    font-size: 12px;
    line-height: 1.4;
}

.task-participants-note i {
    margin-top: 2px;
    color: var(--med-primary);
}

.task-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.task-actions form,
.task-page-size {
    display: inline-block;
}

.task-detail-sidebar .box-body > form {
    display: block;
    width: 100%;
}

.task-detail-sidebar .form-group,
.task-detail-sidebar .form-control,
.task-detail-sidebar .medem-combobox,
.task-detail-sidebar .medem-combobox__trigger,
.task-detail-sidebar .settings-note {
    width: 100%;
    max-width: none;
}

.task-priority-update-form {
    display: grid;
    gap: 12px;
}

.task-priority-picker--sidebar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.task-clarification-box {
    border-top-color: var(--med-aqua);
}

.task-clarification-question {
    margin-bottom: 14px;
    padding: 10px 12px;
    background: var(--med-surface-soft);
    border: 1px solid var(--med-border);
    border-left: 3px solid var(--med-aqua);
}

.task-clarification-question span,
.task-clarification-question small {
    display: block;
    color: var(--med-muted);
    font-size: 12px;
}

.task-clarification-question span {
    font-weight: 600;
    text-transform: uppercase;
}

.task-clarification-question p {
    margin: 5px 0;
    color: var(--med-ink);
    line-height: 1.45;
}

.task-comment {
    padding: 12px 0;
    border-bottom: 1px solid var(--med-border);
}

.task-comment--clarification-request,
.task-comment--clarification-response {
    margin: 10px 0;
    padding: 12px;
    background: var(--med-surface-soft);
    border: 1px solid var(--med-border);
    border-left: 3px solid var(--med-aqua);
}

.task-comment--clarification-response {
    border-left-color: var(--med-primary);
}

.task-comment--attention {
    padding-left: 12px;
    background: color-mix(in srgb, var(--med-aqua) 8%, var(--med-surface));
    border-left: 3px solid var(--med-coral);
}

.task-comment:first-child {
    padding-top: 0;
}

.task-comment__meta {
    display: flex;
    gap: 8px;
    align-items: baseline;
    flex-wrap: wrap;
    color: var(--med-muted);
    font-size: 12px;
}

.task-comment__meta strong {
    color: var(--med-ink);
    font-size: 13px;
}

.task-comment__meta small {
    padding: 2px 6px;
    background: var(--med-surface-soft);
    border: 1px solid var(--med-border);
}

.task-comment__meta .task-comment__attention-label {
    color: var(--med-coral);
    background: color-mix(in srgb, var(--med-coral) 10%, var(--med-surface));
    border-color: color-mix(in srgb, var(--med-coral) 30%, var(--med-border));
}

.task-comment__body {
    margin-top: 6px;
    color: var(--med-ink);
    line-height: 1.5;
}

.task-comment-mentions {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    align-items: center;
    margin-top: 8px;
    color: var(--med-muted);
    font-size: 12px;
}

.task-comment-mentions i {
    color: var(--med-primary);
}

.task-comment-mentions strong {
    color: var(--med-primary-dark);
    font-weight: 600;
}

.task-comment__quote {
    margin-top: 8px;
    padding: 8px 10px;
    background: #fff;
    border: 1px solid var(--med-border);
    border-left: 2px solid var(--med-aqua);
}

.task-comment__quote span {
    display: block;
    color: var(--med-muted);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.task-comment__quote p {
    margin: 4px 0 0;
    color: var(--med-ink);
    line-height: 1.45;
}

.task-attachments--comment {
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    margin-top: 10px;
}

.task-comment-form,
.task-upload-form {
    display: block !important;
    margin-top: 16px;
}

.task-inline-form {
    display: flex;
    gap: 10px;
    align-items: center;
}

.task-inline-form .form-control {
    max-width: 320px;
}

.task-mention-field {
    position: relative;
}

.task-mention-picker {
    display: grid;
    gap: 4px;
    margin-top: 6px;
    padding: 6px;
    background: var(--med-surface);
    border: 1px solid var(--med-border);
    box-shadow: 0 14px 28px rgba(6, 48, 111, .12);
}

.task-mention-picker[hidden],
.task-mention-selected[hidden] {
    display: none !important;
}

.task-mention-option {
    display: grid;
    gap: 2px;
    width: 100%;
    padding: 7px 9px;
    text-align: left;
    color: var(--med-ink);
    background: transparent;
    border: 0;
}

.task-mention-option:hover,
.task-mention-option:focus {
    color: var(--med-primary-dark);
    background: var(--med-surface-soft);
    outline: 0;
}

.task-mention-option strong {
    font-size: 13px;
    font-weight: 600;
}

.task-mention-option small {
    color: var(--med-muted);
    font-size: 11px;
}

.task-mention-selected {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.task-mention-chip {
    display: inline-flex;
    gap: 5px;
    align-items: center;
    min-height: 24px;
    padding: 3px 7px;
    color: var(--med-primary-dark);
    background: rgba(11, 77, 205, .08);
    border: 1px solid rgba(11, 77, 205, .18);
    font-size: 12px;
    font-weight: 600;
}

.task-mention-chip b {
    color: var(--med-muted);
    font-weight: 600;
}

.task-assignee-calendar-warning {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 8px;
    padding: 8px 10px;
    color: #21405F;
    background: rgba(11, 77, 205, .06);
    border: 1px solid rgba(11, 77, 205, .16);
    border-left: 3px solid var(--med-primary);
    font-size: 12px;
    line-height: 1.35;
}

.task-assignee-calendar-warning[hidden] {
    display: none !important;
}

.task-assignee-calendar-warning strong {
    font-weight: 600;
}

.task-assignee-calendar-warning--vacation,
.task-assignee-calendar-warning--day-off,
.task-assignee-calendar-warning--weekend {
    border-left-color: var(--med-teal);
}

.task-assignee-calendar-warning--sick,
.task-assignee-calendar-warning--holiday {
    border-left-color: var(--med-coral);
}

.task-assignee-calendar-warning--duty {
    border-left-color: var(--med-primary);
    background: rgba(55, 210, 200, .08);
}

.user-work-calendar-panel {
    display: flex;
    gap: 14px;
    align-items: center;
    justify-content: space-between;
    margin-top: 14px;
    padding: 12px 14px;
    background: var(--med-surface-soft);
    border: 1px solid var(--med-border);
}

.user-work-calendar-panel__label {
    display: block;
    margin-bottom: 4px;
    color: var(--med-muted);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.user-work-calendar-panel strong {
    color: var(--med-ink);
    font-size: 13px;
    font-weight: 500;
}

.production-calendar__top,
.production-calendar-user-header {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    justify-content: space-between;
}

.production-calendar__top {
    margin-bottom: 12px;
    padding: 16px;
    background: var(--med-surface);
    border-top: 3px solid var(--med-teal);
    box-shadow: var(--med-shadow);
}

.production-calendar__top h2 {
    margin: 0 0 4px;
    color: var(--med-ink);
    font-size: 28px;
    font-weight: 600;
}

.production-calendar__top p,
.production-calendar-user-header__status {
    margin: 0;
    color: var(--med-muted);
    font-size: 13px;
}

.production-calendar__years {
    display: flex;
    gap: 8px;
    align-items: center;
}

.production-calendar-stats {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}

.production-calendar-stats > div {
    position: relative;
    padding: 12px 14px;
    background: var(--med-surface);
    border: 1px solid var(--med-border);
    cursor: default;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease, background-color .18s ease;
}

.production-calendar-stat:hover,
.production-calendar-stat:focus {
    transform: translateY(-1px);
    border-color: rgba(11, 77, 205, .28);
    box-shadow: 0 12px 24px rgba(6, 48, 111, .10);
    outline: 0;
}

.production-calendar-stat::after {
    content: "";
    position: absolute;
    right: 12px;
    bottom: 10px;
    left: 12px;
    height: 2px;
    opacity: 0;
    background: var(--med-primary);
    transition: opacity .18s ease;
}

.production-calendar-stat:hover::after,
.production-calendar-stat:focus::after {
    opacity: 1;
}

.production-calendar-stat[data-production-day-highlight="weekend"]::after {
    background: #8EA0B6;
}

.production-calendar-stat[data-production-day-highlight="holiday"]::after {
    background: var(--med-coral);
}

.production-calendar-stat[data-production-day-highlight="short"]::after {
    background: #D79220;
}

.production-calendar-stat[data-production-day-highlight="special"]::after {
    background: #7A5BC7;
}

.production-calendar-stats span,
.production-calendar-stats strong {
    display: block;
}

.production-calendar-stats span {
    color: var(--med-muted);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.production-calendar-stats strong {
    margin-top: 4px;
    color: var(--med-ink);
    font-size: 22px;
    font-weight: 600;
}

.production-calendar-tabs {
    margin-bottom: 12px;
    border-bottom-color: var(--med-border);
}

.production-calendar-tabs > li > a {
    color: var(--med-primary-dark) !important;
    background: transparent;
    border-color: transparent;
    border-radius: 4px 4px 0 0;
    font-weight: 600;
    transition: color .16s ease, background-color .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.production-calendar-tabs > li > a .fa {
    color: inherit;
}

.production-calendar-tabs > li > a:hover,
.production-calendar-tabs > li > a:focus {
    color: var(--med-primary-dark) !important;
    background: var(--med-blue-soft);
    border-color: var(--med-border);
    border-bottom-color: transparent;
    box-shadow: inset 0 -2px 0 var(--med-teal);
}

.production-calendar-tabs > li.active > a,
.production-calendar-tabs > li.active > a:hover,
.production-calendar-tabs > li.active > a:focus {
    color: var(--med-ink) !important;
    background: var(--med-surface);
    border-color: var(--med-border);
    border-bottom-color: var(--med-surface);
    box-shadow: inset 0 3px 0 var(--med-teal);
}

.production-calendar-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 12px;
    align-items: start;
}

.production-year {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.production-month {
    padding: 10px;
    background: var(--med-surface);
    border: 1px solid var(--med-border);
}

.production-month h3 {
    margin: 0 0 8px;
    color: var(--med-ink);
    font-size: 15px;
    font-weight: 600;
}

.production-month__weekdays,
.production-month__days {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 4px;
}

.production-month__weekdays {
    margin-bottom: 4px;
    color: var(--med-muted);
    font-size: 10px;
    font-weight: 600;
    text-align: center;
}

.production-day {
    min-height: 34px;
    display: grid;
    place-items: center;
    padding: 3px;
    color: var(--med-ink);
    background: var(--med-surface-soft);
    border: 1px solid var(--med-border);
    font-size: 12px;
    font-weight: 600;
    transition: opacity .18s ease, transform .18s ease, border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.production-calendar.is-highlighting-days .production-day:not(.production-day--blank) {
    opacity: .32;
}

.production-calendar.is-highlighting-days[data-highlight-day-type="work"] .production-day--work,
.production-calendar.is-highlighting-days[data-highlight-day-type="work"] .production-day--short,
.production-calendar.is-highlighting-days[data-highlight-day-type="work"] .production-day--special,
.production-calendar.is-highlighting-days[data-highlight-day-type="weekend"] .production-day--weekend,
.production-calendar.is-highlighting-days[data-highlight-day-type="holiday"] .production-day--holiday,
.production-calendar.is-highlighting-days[data-highlight-day-type="short"] .production-day--short,
.production-calendar.is-highlighting-days[data-highlight-day-type="special"] .production-day--special {
    opacity: 1;
    transform: translateY(-1px);
    border-color: rgba(11, 77, 205, .42);
    box-shadow: 0 0 0 2px rgba(11, 77, 205, .10), 0 10px 22px rgba(6, 48, 111, .12);
}

.production-calendar.is-highlighting-days[data-highlight-day-type="weekend"] .production-day--weekend {
    border-color: rgba(142, 160, 182, .55);
    box-shadow: 0 0 0 2px rgba(142, 160, 182, .16), 0 10px 22px rgba(6, 48, 111, .10);
}

.production-calendar.is-highlighting-days[data-highlight-day-type="holiday"] .production-day--holiday {
    border-color: rgba(217, 99, 80, .55);
    box-shadow: 0 0 0 2px rgba(217, 99, 80, .14), 0 10px 22px rgba(130, 41, 28, .12);
}

.production-calendar.is-highlighting-days[data-highlight-day-type="short"] .production-day--short {
    border-color: rgba(246, 180, 84, .62);
    box-shadow: 0 0 0 2px rgba(246, 180, 84, .16), 0 10px 22px rgba(136, 88, 10, .12);
}

.production-calendar.is-highlighting-days[data-highlight-day-type="special"] .production-day--special {
    border-color: rgba(122, 91, 199, .55);
    box-shadow: 0 0 0 2px rgba(122, 91, 199, .14), 0 10px 22px rgba(73, 50, 142, .12);
}

.production-day.is-selected {
    border-color: rgba(11, 77, 205, .72);
    box-shadow: inset 3px 0 0 var(--med-primary), 0 0 0 2px rgba(11, 77, 205, .13);
}

.production-day small {
    max-width: 100%;
    overflow: hidden;
    color: var(--med-muted);
    font-size: 9px;
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.production-day em {
    max-width: 100%;
    padding: 1px 4px;
    overflow: hidden;
    color: #553C9A;
    background: rgba(122, 91, 199, .10);
    border: 1px solid rgba(122, 91, 199, .18);
    font-size: 8px;
    font-style: normal;
    font-weight: 600;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.production-day--blank {
    background: transparent;
    border-color: transparent;
}

.production-day--weekend {
    color: #65758A;
    background: rgba(213, 224, 237, .35);
}

.production-day--holiday {
    color: #9E3828;
    background: rgba(217, 99, 80, .12);
    border-color: rgba(217, 99, 80, .28);
}

.production-day--short {
    color: #8A5700;
    background: rgba(246, 180, 84, .16);
    border-color: rgba(246, 180, 84, .36);
}

.production-day--special {
    color: #553C9A;
    background: rgba(122, 91, 199, .12);
    border-color: rgba(122, 91, 199, .28);
}

.production-form-pair {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.production-form-pair.is-enhanced input[type="date"] {
    display: none;
}

.production-form-pair.is-enhanced[data-date-range-date-only="1"] {
    display: none;
}

.production-form-pair--schedule-range {
    grid-column: 1 / -1;
}

.medem-date-range-picker {
    display: grid;
    gap: 10px;
    margin: 10px 0 14px;
    padding: 12px;
    background: var(--med-surface-soft);
    border: 1px solid var(--med-border);
}

.production-form-pair[data-date-range-date-only="1"] + .medem-date-range-picker {
    grid-column: 1 / -1;
}

.medem-date-range-picker__top {
    display: grid;
    grid-template-columns: 34px 34px minmax(0, 1fr) 34px 34px;
    gap: 6px;
    align-items: center;
}

.medem-date-range-picker__top strong {
    color: var(--med-ink);
    font-size: 14px;
    font-weight: 600;
    text-align: center;
}

.medem-date-range-picker__nav {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--med-primary-dark);
    background: var(--med-surface);
    border: 1px solid var(--med-border);
    border-radius: 4px;
}

.medem-date-range-picker__nav:hover,
.medem-date-range-picker__nav:focus {
    color: var(--med-primary);
    background: var(--med-blue-soft);
    border-color: rgba(11, 77, 205, .28);
    outline: 0;
}

.medem-date-range-picker__summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
    gap: 8px;
    align-items: center;
}

.medem-date-range-picker__summary span {
    min-width: 0;
    display: flex;
    gap: 6px;
    align-items: center;
    padding: 7px 9px;
    background: var(--med-surface);
    border: 1px solid var(--med-border);
}

.medem-date-range-picker__summary b {
    color: var(--med-muted);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.medem-date-range-picker__summary strong {
    min-width: 0;
    overflow: hidden;
    color: var(--med-primary-dark);
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.medem-date-range-picker__summary small {
    color: var(--med-muted);
    font-size: 12px;
}

.medem-date-range-picker__months {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
}

.medem-date-range-picker__month {
    min-width: 0;
    display: grid;
    gap: 7px;
    padding: 10px;
    background: var(--med-surface);
    border: 1px solid var(--med-border);
}

.medem-date-range-picker__month h4 {
    margin: 0;
    color: var(--med-ink);
    font-size: 13px;
    font-weight: 600;
    text-align: center;
}

.medem-date-range-picker__weekdays,
.medem-date-range-picker__days {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 3px;
}

.medem-date-range-picker__weekdays span {
    color: var(--med-muted);
    font-size: 10px;
    font-weight: 600;
    text-align: center;
}

.medem-date-range-picker__day,
.medem-date-range-picker__blank {
    min-height: 30px;
}

.medem-date-range-picker__day {
    color: var(--med-ink);
    background: var(--med-surface);
    border: 1px solid var(--med-border);
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    transition: background-color .16s ease, border-color .16s ease, box-shadow .16s ease, color .16s ease;
}

.medem-date-range-picker__day:hover,
.medem-date-range-picker__day:focus {
    color: var(--med-primary-dark);
    background: var(--med-blue-soft);
    border-color: rgba(11, 77, 205, .32);
    outline: 0;
}

.medem-date-range-picker__day.is-weekend:not(.is-in-range):not(.is-range-start):not(.is-range-end) {
    color: #8A5700;
    background: rgba(246, 180, 84, .08);
}

.medem-date-range-picker__day.is-today {
    box-shadow: inset 0 0 0 2px rgba(11, 77, 205, .16);
}

.medem-date-range-picker__day.is-in-range {
    color: var(--med-primary-dark);
    background: rgba(11, 77, 205, .10);
    border-color: rgba(11, 77, 205, .20);
}

.medem-date-range-picker__day.is-range-start,
.medem-date-range-picker__day.is-range-end {
    color: #fff;
    background: var(--med-primary);
    border-color: var(--med-primary);
    box-shadow: 0 5px 14px rgba(11, 77, 205, .20);
}

.medem-native-datetime,
.medem-native-date {
    display: none;
}

.medem-datetime-picker {
    display: grid;
    gap: 8px;
    padding: 10px;
    background: var(--med-surface-soft);
    border: 1px solid var(--med-border);
}

.medem-datetime-picker[hidden] {
    display: none !important;
}

.medem-datetime-popover {
    position: relative;
    min-width: 0;
}

.medem-datetime-trigger {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: var(--med-ink);
    background: var(--med-surface);
    text-align: left;
    cursor: pointer;
}

.medem-datetime-trigger.is-empty {
    color: var(--med-muted);
}

.medem-datetime-trigger.has-error {
    border-color: rgba(221, 70, 54, .42);
    box-shadow: 0 0 0 2px rgba(221, 70, 54, .10);
}

.medem-datetime-trigger .fa {
    flex: 0 0 auto;
    color: var(--med-primary-dark);
}

.medem-datetime-popover.is-open .medem-datetime-trigger {
    border-color: rgba(11, 77, 205, .42);
    box-shadow: 0 0 0 2px rgba(11, 77, 205, .10);
}

.medem-datetime-picker--popover {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 60;
    width: min(320px, calc(100vw - 32px));
    box-shadow: 0 16px 34px rgba(14, 38, 73, .18);
}

.medem-datetime-picker.has-error {
    border-color: var(--med-coral);
    box-shadow: 0 0 0 2px rgba(217, 99, 80, .12);
}

.medem-datetime-picker__nav {
    display: grid;
    grid-template-columns: 32px 32px minmax(0, 1fr) 32px 32px;
    gap: 5px;
    align-items: center;
}

.medem-datetime-picker__nav button {
    width: 32px;
    height: 32px;
    color: var(--med-primary-dark);
    background: var(--med-surface);
    border: 1px solid var(--med-border);
    border-radius: 4px;
}

.medem-datetime-picker__nav button:hover,
.medem-datetime-picker__nav button:focus {
    color: var(--med-primary);
    background: var(--med-blue-soft);
    border-color: rgba(11, 77, 205, .28);
    outline: 0;
}

.medem-datetime-picker__nav strong {
    color: var(--med-ink);
    font-size: 13px;
    font-weight: 600;
    text-align: center;
}

.medem-datetime-picker__weekdays,
.medem-datetime-picker__days {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 3px;
}

.medem-datetime-picker__weekdays span {
    color: var(--med-muted);
    font-size: 10px;
    font-weight: 600;
    text-align: center;
}

.medem-datetime-picker__day,
.medem-datetime-picker__blank {
    min-height: 30px;
}

.medem-datetime-picker__day {
    position: relative;
    color: var(--med-ink);
    background: var(--med-surface);
    border: 1px solid var(--med-border);
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.medem-datetime-picker__day:hover,
.medem-datetime-picker__day:focus {
    color: var(--med-primary-dark);
    background: var(--med-blue-soft);
    border-color: rgba(11, 77, 205, .32);
    outline: 0;
}

.medem-datetime-picker__day.is-selected {
    color: #fff;
    background: var(--med-primary);
    border-color: var(--med-primary);
}

.medem-datetime-picker__day.is-weekend:not(.is-selected) {
    color: #60718A;
    background: rgba(142, 160, 182, .08);
}

.medem-datetime-picker__day.is-before-min:not(.is-selected) {
    color: #9DAEC1;
    background: rgba(221, 70, 54, .04);
    border-color: rgba(221, 70, 54, .18);
    cursor: not-allowed;
}

.medem-datetime-picker__day.is-before-min:hover,
.medem-datetime-picker__day.is-before-min:focus {
    color: #9DAEC1;
    background: rgba(221, 70, 54, .04);
    border-color: rgba(221, 70, 54, .18);
    box-shadow: none;
}

.medem-datetime-picker__time {
    display: grid;
    grid-template-columns: auto minmax(120px, 1fr) auto;
    gap: 8px;
    align-items: center;
}

.medem-datetime-picker__time label {
    margin: 0;
    color: var(--med-muted);
    font-size: 12px;
    font-weight: 600;
}

.medem-datetime-picker__warning {
    display: flex;
    gap: 7px;
    align-items: flex-start;
    padding: 7px 8px;
    color: #9A3F30;
    background: rgba(221, 70, 54, .08);
    border: 1px solid rgba(221, 70, 54, .20);
    font-size: 11px;
    line-height: 1.35;
}

.medem-datetime-picker__warning[hidden] {
    display: none !important;
}

.medem-datetime-picker__warning i {
    margin-top: 2px;
    color: #D24A35;
}

.task-calendar-picker__day,
.medem-date-range-picker__day,
.medem-datetime-picker__day {
    position: relative;
}

.task-calendar-picker__day.is-production-weekend:not(.is-selected),
.medem-date-range-picker__day.is-production-weekend:not(.is-range-start):not(.is-range-end),
.medem-datetime-picker__day.is-production-weekend:not(.is-selected) {
    color: #60718A;
    background: rgba(142, 160, 182, .10);
}

.task-calendar-picker__day.is-production-holiday:not(.is-selected),
.medem-date-range-picker__day.is-production-holiday:not(.is-range-start):not(.is-range-end),
.medem-datetime-picker__day.is-production-holiday:not(.is-selected) {
    color: #A33B2D;
    background: rgba(217, 99, 80, .12);
    border-color: rgba(217, 99, 80, .28);
}

.task-calendar-picker__day.is-production-short:not(.is-selected),
.medem-date-range-picker__day.is-production-short:not(.is-range-start):not(.is-range-end),
.medem-datetime-picker__day.is-production-short:not(.is-selected) {
    color: #8A5700;
    background: rgba(246, 180, 84, .14);
    border-color: rgba(246, 180, 84, .30);
}

.task-calendar-picker__day.is-production-special:not(.is-selected),
.medem-date-range-picker__day.is-production-special:not(.is-range-start):not(.is-range-end),
.medem-datetime-picker__day.is-production-special:not(.is-selected) {
    color: #553C9A;
    background: rgba(122, 91, 199, .12);
    border-color: rgba(122, 91, 199, .30);
}

.production-check {
    display: flex;
    gap: 8px;
    align-items: center;
    margin: 0 0 12px;
    font-weight: 500;
}

.production-employee-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 10px;
}

.production-employee-card {
    display: grid;
    gap: 4px;
    padding: 12px;
    color: var(--med-ink);
    background: var(--med-surface-soft);
    border: 1px solid var(--med-border);
    border-left: 3px solid var(--med-primary);
}

.production-employee-card:hover,
.production-employee-card:focus {
    color: var(--med-ink);
    border-left-color: var(--med-teal);
    text-decoration: none;
}

.production-employee-card strong {
    font-weight: 600;
}

.production-employee-card span,
.production-employee-card small {
    color: var(--med-muted);
    font-size: 12px;
}

.production-status {
    width: fit-content;
    padding: 3px 8px;
    color: var(--med-primary-dark);
    background: rgba(11, 77, 205, .08);
    border: 1px solid rgba(11, 77, 205, .18);
    font-style: normal;
    font-size: 11px;
    font-weight: 600;
}

.production-status--vacation,
.production-status--day-off,
.production-status--weekend {
    color: #117065;
    background: rgba(55, 210, 200, .10);
    border-color: rgba(55, 210, 200, .28);
}

.production-status--sick,
.production-status--holiday {
    color: #A33B2D;
    background: rgba(217, 99, 80, .12);
    border-color: rgba(217, 99, 80, .3);
}

.production-status--short {
    color: #8A5700;
    background: rgba(246, 180, 84, .16);
    border-color: rgba(246, 180, 84, .34);
}

.production-status--special {
    color: #553C9A;
    background: rgba(122, 91, 199, .12);
    border-color: rgba(122, 91, 199, .3);
}

.production-status--duty {
    color: var(--med-primary-dark);
    background: rgba(11, 77, 205, .10);
}

.production-list {
    display: grid;
    gap: 8px;
}

.production-list-row,
.production-duty-card {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 10px;
    background: var(--med-surface-soft);
    border: 1px solid var(--med-border);
}

.production-list-row > div,
.production-duty-card {
    min-width: 0;
}

.production-list-row > div {
    flex: 1 1 auto;
}

.production-event-card {
    flex-wrap: wrap;
}

.production-event-card__content {
    min-width: 0;
}

.production-event-card > form {
    margin-left: auto;
}

.production-event-attachments {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.production-event-attachment {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    max-width: 100%;
}

.production-event-attachment a {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 8px;
    color: var(--med-primary-dark);
    background: #fff;
    border: 1px solid var(--med-border);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}

.production-event-attachment span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.production-event-attachment small {
    white-space: nowrap;
}

.production-event-history,
.production-event-editor {
    margin-top: 10px;
}

.production-event-history summary,
.production-event-editor summary {
    width: fit-content;
    padding: 5px 8px;
    color: var(--med-primary-dark);
    background: rgba(11, 77, 205, .06);
    border: 1px solid rgba(11, 77, 205, .16);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.production-event-history div,
.production-event-editor form {
    margin-top: 8px;
    padding: 10px;
    background: #fff;
    border: 1px solid var(--med-border);
}

.production-event-history p {
    margin: 0;
    padding: 7px 0;
    border-bottom: 1px solid var(--med-border);
}

.production-event-history p:last-child {
    border-bottom: 0;
}

.production-event-history span,
.production-event-history em,
.production-event-history small {
    display: block;
    color: var(--med-muted);
    font-style: normal;
    font-size: 12px;
}

.production-event-editor__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.production-list-row--disabled {
    opacity: .72;
}

.production-template-actions {
    flex: 0 0 auto;
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
    margin-left: auto;
}

.production-template-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.production-lunch-breaks {
    margin: 2px 0 14px;
    padding: 12px;
    background: var(--med-surface-soft);
    border: 1px solid var(--med-border);
}

.production-lunch-breaks__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.production-lunch-breaks__head label,
.production-lunch-breaks__head small {
    display: block;
}

.production-lunch-breaks__head label {
    margin: 0;
    color: var(--med-ink);
    font-weight: 700;
}

.production-lunch-breaks__head small {
    margin-top: 2px;
    color: var(--med-muted);
    font-size: 12px;
}

.production-lunch-breaks__list {
    display: grid;
    gap: 8px;
}

.production-lunch-break {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 38px;
    gap: 8px;
    align-items: end;
}

.production-lunch-break .form-group {
    margin-bottom: 0;
}

.production-lunch-break > .btn {
    height: 34px;
}

.production-side-panel .btn-block {
    white-space: normal;
}

.production-side-panel .btn-block .fa {
    margin-right: 5px;
}

.production-side-panel [data-russian-calendar-button-label] {
    overflow-wrap: anywhere;
}

.production-list-row strong,
.production-duty-card strong,
.production-list-row small,
.production-duty-card span,
.production-duty-card small {
    display: block;
}

.production-list-row strong,
.production-duty-card strong {
    color: var(--med-ink);
    font-weight: 600;
}

.production-list-row small,
.production-duty-card span,
.production-duty-card small {
    color: var(--med-muted);
    font-size: 12px;
}

.production-color,
.production-event-dot {
    flex: 0 0 12px;
    width: 12px;
    height: 12px;
    margin-top: 4px;
    border-radius: 2px;
}

.production-event-dot {
    background: var(--med-primary);
}

.production-inline-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 150px auto;
    gap: 8px;
    align-items: start;
    margin-bottom: 14px;
}

.production-inline-form--schedule {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 140px 140px;
}

.production-inline-form--schedule .btn {
    grid-column: 1 / -1;
    justify-self: start;
}

.production-schedule-box,
.production-schedule-box .box-body {
    overflow: visible;
}

.production-schedule-box .production-inline-form {
    position: relative;
    z-index: 3;
}

.production-schedule-box .table-board {
    position: relative;
    z-index: 1;
}

.production-schedule-box .medem-combobox.is-open {
    z-index: 30;
}

.production-schedule-box .medem-combobox__dropdown {
    min-width: min(320px, calc(100vw - 32px));
}

.production-cycle-days {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.production-cycle-days label {
    min-width: 38px;
    padding: 5px 8px;
    background: var(--med-surface-soft);
    border: 1px solid var(--med-border);
    font-weight: 500;
}

.production-status--draft {
    color: #7A520C;
    background: rgba(246, 180, 84, .16);
    border-color: rgba(246, 180, 84, .34);
}

.production-status--published {
    color: #117065;
    background: rgba(55, 210, 200, .10);
    border-color: rgba(55, 210, 200, .28);
}

.production-status--archived {
    color: #5D6B7C;
    background: rgba(142, 160, 182, .12);
    border-color: rgba(142, 160, 182, .28);
}

.duty-roster-create-form {
    display: grid;
    grid-template-columns: minmax(210px, .7fr) minmax(320px, 1fr) minmax(260px, .78fr);
    gap: 18px;
    align-items: start;
    max-width: 100%;
    margin: 0 auto 18px;
}

.duty-roster-create-card {
    display: grid;
    gap: 14px;
    min-width: 0;
    padding: 16px;
    background: var(--med-surface-soft);
    border: 1px solid var(--med-border);
}

.duty-roster-create-card h4 {
    margin: 0;
    color: var(--med-ink);
    font-size: 15px;
    font-weight: 700;
}

.duty-roster-create-card__heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.duty-roster-create-card__heading span {
    flex: none;
    padding: 3px 7px;
    color: var(--med-muted);
    background: var(--med-surface);
    border: 1px solid var(--med-border);
    font-size: 12px;
    font-weight: 600;
}

.duty-roster-create-card--staff {
    max-height: 720px;
    overflow: auto;
}

.duty-roster-staff-preview {
    display: grid;
    gap: 10px;
}

.duty-roster-staff-preview__user {
    display: grid;
    gap: 8px;
    min-width: 0;
    padding: 10px;
    background: var(--med-surface);
    border: 1px solid var(--med-border);
}

.duty-roster-staff-preview__user-head {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.duty-roster-staff-preview__user-head strong,
.duty-roster-staff-preview__user-head span,
.duty-roster-staff-preview__item strong,
.duty-roster-staff-preview__item span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.duty-roster-staff-preview__user-head strong,
.duty-roster-staff-preview__item strong {
    color: var(--med-ink);
    font-weight: 600;
}

.duty-roster-staff-preview__user-head span,
.duty-roster-staff-preview__item span,
.duty-roster-staff-preview__item--empty,
.duty-roster-staff-preview__empty {
    color: var(--med-muted);
    font-size: 12px;
    line-height: 1.4;
}

.duty-roster-staff-preview__items {
    display: grid;
    gap: 6px;
}

.duty-roster-staff-preview__item {
    display: grid;
    gap: 2px;
    padding: 7px 8px;
    background: var(--med-surface-soft);
    border-left: 4px solid rgba(11, 77, 205, .32);
}

.duty-roster-staff-preview__item--danger {
    border-left-color: #D96350;
}

.duty-roster-staff-preview__item--warning {
    border-left-color: #F6B454;
}

.duty-roster-staff-preview__item--success {
    border-left-color: #37A99F;
}

.duty-roster-staff-preview__item--empty {
    border-left-color: rgba(142, 160, 182, .36);
}

.duty-roster-create-form__main {
    display: grid;
    gap: 12px;
}

.duty-roster-create-form__main .form-group,
.duty-roster-create-card .form-group {
    margin-bottom: 0;
}

.duty-roster-create-form__actions {
    display: flex;
    justify-content: flex-end;
    padding-top: 4px;
}

.duty-roster-create-form__actions .btn {
    min-height: 38px;
    white-space: normal;
}

.duty-roster-create-card .medem-date-range-picker {
    margin: 0;
    background: var(--med-surface);
}

.duty-roster-create-card .medem-date-range-picker__summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.duty-roster-create-card .medem-date-range-picker__summary small {
    grid-column: 1 / -1;
}

.duty-roster-requirements {
    display: grid;
    gap: 6px;
}

.duty-roster-requirements__head,
.duty-roster-requirements__row {
    display: grid;
    grid-template-columns: minmax(86px, 1fr) minmax(48px, 62px) minmax(68px, 86px);
    gap: 8px;
    align-items: center;
}

.duty-roster-requirements__head {
    color: var(--med-muted);
    font-size: 12px;
    font-weight: 600;
}

.duty-roster-requirements__row strong {
    color: var(--med-ink);
    font-size: 13px;
}

.duty-roster-plan-list {
    margin-top: 14px;
}

.duty-roster-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
    padding: 16px;
    background: var(--med-surface);
    border: 1px solid var(--med-border);
    box-shadow: var(--med-shadow);
}

.duty-roster-header h2 {
    margin: 8px 0 4px;
    color: var(--med-ink);
    font-size: 24px;
    font-weight: 600;
}

.duty-roster-header p {
    margin: 0;
    color: var(--med-muted);
}

.duty-roster-header__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.duty-roster-header__actions form {
    margin: 0;
}

.duty-roster-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
    gap: 16px;
    align-items: start;
}

.duty-roster-main,
.duty-roster-sidebar {
    min-width: 0;
}

.duty-roster-sidebar {
    display: grid;
    gap: 14px;
}

.duty-roster-table-wrap {
    overflow: visible;
}

.duty-roster-table th,
.duty-roster-table td {
    vertical-align: top !important;
}

.duty-roster-table td:first-child small,
.duty-roster-table td:nth-child(2) small {
    display: block;
    color: var(--med-muted);
    font-size: 12px;
}

.duty-roster-row--error {
    background: rgba(217, 99, 80, .08);
}

.duty-roster-row--warning {
    background: rgba(246, 180, 84, .10);
}

.duty-roster-type {
    display: inline-flex;
    width: fit-content;
    padding: 4px 7px;
    color: var(--med-primary-dark);
    background: rgba(11, 77, 205, .08);
    border: 1px solid rgba(11, 77, 205, .16);
    font-size: 12px;
    font-weight: 600;
}

.duty-roster-assignment-list {
    display: grid;
    gap: 8px;
    min-width: 260px;
}

.duty-roster-assignment-control {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) auto;
    gap: 8px;
    align-items: center;
}

.duty-roster-fixed,
.duty-roster-lock {
    margin: 0;
    color: var(--med-muted);
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.duty-roster-score {
    display: grid;
    gap: 2px;
    max-width: 360px;
    margin-bottom: 7px;
}

.duty-roster-score strong {
    font-size: 13px;
}

.duty-roster-score small {
    color: var(--med-muted);
    line-height: 1.35;
}

.duty-roster-form-actions {
    margin-top: 12px;
}

.duty-roster-violations,
.duty-roster-staff,
.duty-roster-rules,
.duty-roster-restrictions,
.duty-roster-restriction__items {
    display: grid;
    gap: 8px;
}

.duty-roster-violation,
.duty-roster-staff-row,
.duty-roster-rule,
.duty-roster-restriction,
.duty-roster-restriction-item {
    padding: 10px;
    background: var(--med-surface-soft);
    border: 1px solid var(--med-border);
}

.duty-roster-violation--error {
    border-left: 4px solid #D96350;
}

.duty-roster-violation--warning {
    border-left: 4px solid #F6B454;
}

.duty-roster-restriction {
    padding: 0;
}

.duty-roster-restriction summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px;
    cursor: pointer;
}

.duty-roster-restriction summary span {
    color: var(--med-muted);
    font-size: 12px;
    font-weight: 600;
}

.duty-roster-restriction__items {
    padding: 0 10px 10px;
}

.duty-roster-restriction-item {
    padding: 8px 9px;
    border-left: 4px solid rgba(11, 77, 205, .32);
}

.duty-roster-restriction-item--danger {
    border-left-color: #D96350;
}

.duty-roster-restriction-item--warning {
    border-left-color: #F6B454;
}

.duty-roster-restriction-item--success {
    border-left-color: #37A99F;
}

.duty-roster-violation strong,
.duty-roster-violation span,
.duty-roster-staff-row strong,
.duty-roster-staff-row span,
.duty-roster-staff-row small,
.duty-roster-rule strong,
.duty-roster-rule span,
.duty-roster-rule small,
.duty-roster-restriction-item strong,
.duty-roster-restriction-item span {
    display: block;
}

.duty-roster-violation strong,
.duty-roster-staff-row strong,
.duty-roster-rule strong,
.duty-roster-restriction summary strong,
.duty-roster-restriction-item strong {
    color: var(--med-ink);
    font-weight: 600;
}

.duty-roster-violation span,
.duty-roster-staff-row span,
.duty-roster-staff-row small,
.duty-roster-rule span,
.duty-roster-rule small,
.duty-roster-restriction-item span {
    color: var(--med-muted);
    font-size: 12px;
    line-height: 1.4;
}

.duty-roster-rule {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    justify-content: space-between;
}

.duty-roster-rule form {
    margin: 0;
}

.duty-roster-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
}

.duty-roster-checkbox-grid--weekdays {
    grid-template-columns: repeat(7, minmax(34px, 1fr));
}

.duty-roster-checkbox-grid label {
    margin: 0;
    padding: 6px 8px;
    background: var(--med-surface-soft);
    border: 1px solid var(--med-border);
    font-size: 12px;
    font-weight: 500;
}

@media (max-width: 1380px) {
    .duty-roster-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .duty-roster-sidebar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1120px) {
    .duty-roster-create-form {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 900px) {
    .duty-roster-create-form__main,
    .duty-roster-sidebar,
    .duty-roster-header {
        display: block;
    }

    .duty-roster-header__actions {
        justify-content: flex-start;
        margin-top: 12px;
    }

    .duty-roster-requirements__head,
    .duty-roster-requirements__row {
        grid-template-columns: minmax(150px, 1fr) 90px 110px;
    }

    .duty-roster-assignment-control {
        grid-template-columns: minmax(0, 1fr);
    }
}

.production-actions {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
}

.production-employee-filters {
    display: grid;
    grid-template-columns: minmax(190px, .9fr) minmax(190px, .9fr) minmax(240px, 1.1fr) auto auto;
    gap: 10px;
    align-items: end;
    margin-bottom: 14px;
    padding: 12px;
    background: var(--med-surface-soft);
    border: 1px solid var(--med-border);
}

.production-employee-filters label {
    min-width: 0;
    margin: 0;
}

.production-employee-filters label > span {
    display: block;
    margin-bottom: 5px;
    color: var(--med-muted);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.production-employee-filters__actions {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
}

.production-employee-filters__count {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    color: var(--med-muted);
    white-space: nowrap;
}

.production-employee-filters__count strong {
    margin-left: 4px;
    color: var(--med-ink);
    font-weight: 600;
}

.production-request-filters {
    display: grid;
    grid-template-columns: minmax(150px, .7fr) minmax(180px, .9fr) minmax(220px, 1.2fr) auto;
    gap: 8px;
    align-items: start;
    margin-bottom: 12px;
}

.production-review-form {
    min-width: 220px;
    display: grid;
    gap: 6px;
}

.production-review-form textarea {
    min-height: 54px;
    resize: vertical;
}

.production-request-filters .medem-combobox {
    width: 100%;
}

.production-request-filters + .table-board td small {
    display: block;
    color: var(--med-muted);
    font-size: 12px;
}

.production-user-month {
    display: grid;
    gap: 6px;
}

.production-user-month__weekdays,
.production-user-month__week {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 6px;
}

.production-user-month__weekdays {
    color: var(--med-muted);
    font-size: 11px;
    font-weight: 600;
    text-align: center;
}

.production-user-day {
    min-height: 106px;
    display: grid;
    align-content: start;
    gap: 4px;
    padding: 8px;
    background: var(--med-surface-soft);
    border: 1px solid var(--med-border);
    border-left: 3px solid var(--med-primary);
}

.production-user-day--blank {
    background: transparent;
    border-color: transparent;
}

.production-user-day--weekend {
    background: rgba(213, 224, 237, .22);
    border-left-color: #9AA8B9;
}

.production-user-day--holiday {
    color: #9E3828;
    background: rgba(217, 99, 80, .10);
    border-color: rgba(217, 99, 80, .22);
    border-left-color: var(--med-coral);
}

.production-user-day--short {
    color: #8A5700;
    background: rgba(246, 180, 84, .12);
    border-color: rgba(246, 180, 84, .28);
    border-left-color: #D79220;
}

.production-user-day--special {
    color: #553C9A;
    background: rgba(122, 91, 199, .10);
    border-color: rgba(122, 91, 199, .24);
    border-left-color: #7A5BC7;
}

.production-user-day--vacation,
.production-user-day--day-off {
    border-left-color: var(--med-teal);
}

.production-user-day--sick {
    border-left-color: var(--med-coral);
}

.production-user-day--duty {
    border-left-color: var(--med-primary);
}

.production-user-day strong {
    color: var(--med-ink);
    font-weight: 600;
}

.production-user-day small {
    color: var(--med-muted);
    font-size: 11px;
}

.production-event {
    padding: 3px 5px;
    color: var(--med-primary-dark);
    background: rgba(11, 77, 205, .08);
    border: 1px solid rgba(11, 77, 205, .14);
    font-size: 11px;
    font-weight: 600;
}

.task-attachments {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.task-attachment {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 10px;
    background: var(--med-surface-soft);
    border: 1px solid var(--med-border);
}

.task-attachment--comment {
    grid-template-columns: 56px minmax(0, 1fr) auto;
    padding: 8px;
}

.task-attachment img,
.task-attachment__video,
.task-attachment__document {
    width: 74px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    object-fit: cover;
    background: #fff;
    border: 1px solid var(--med-border);
}

.task-attachment--comment img,
.task-attachment--comment .task-attachment__video,
.task-attachment--comment .task-attachment__document {
    width: 56px;
    height: 46px;
}

.task-attachment__video {
    color: var(--med-primary);
    font-size: 26px;
}

.task-attachment__document {
    color: #2F7D62;
    font-size: 24px;
}

.task-attachment__info {
    min-width: 0;
}

.task-attachment__info strong,
.task-attachment__info span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.task-attachment__info span {
    color: var(--med-muted);
    font-size: 12px;
}

.task-upload-control {
    width: 100%;
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 4px 10px;
    align-items: center;
    margin: 0 0 8px;
    padding: 16px;
    color: var(--med-primary-dark);
    background: var(--med-surface-soft);
    border: 1px dashed rgba(11, 77, 205, .28);
    border-radius: 8px;
    cursor: pointer;
    transition: background .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.task-upload-control i {
    grid-row: 1 / 3;
    color: var(--med-primary);
    font-size: 22px;
    text-align: center;
}

.task-upload-control small {
    color: var(--med-muted);
    font-weight: 500;
}

.task-upload-control input {
    display: none;
}

.task-upload-control--form {
    min-height: 132px;
    align-content: center;
}

.task-upload-control--comment {
    min-height: 94px;
    padding: 13px 14px;
}

.task-upload-control.is-dragover {
    background: rgba(11, 77, 205, .08);
    border-color: rgba(11, 77, 205, .5);
    box-shadow: inset 0 0 0 1px rgba(11, 77, 205, .12);
}

.task-upload-list {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin: 0 0 8px;
}

.task-upload-file {
    max-width: 100%;
    display: inline-flex;
    gap: 6px;
    align-items: center;
    padding: 5px 8px;
    color: var(--med-ink);
    background: #fff;
    border: 1px solid var(--med-border);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
}

.task-upload-file span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.task-upload-hints {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.task-upload-hints span {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    padding: 5px 8px;
    color: var(--med-muted);
    background: var(--med-surface-soft);
    border: 1px solid var(--med-border);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.2;
}

.task-upload-hints i {
    color: var(--med-primary);
}

.task-form-footer {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.task-history__item {
    padding: 10px 0;
    border-bottom: 1px solid var(--med-border);
}

.task-history__item:first-child {
    padding-top: 0;
}

.task-history__item strong,
.task-history__item span {
    display: inline-block;
    margin-right: 6px;
}

.task-history__item span {
    color: var(--med-muted);
    font-size: 12px;
}

.task-history__item p {
    margin: 4px 0 0;
    color: var(--med-ink);
}

.task-review-comment {
    margin-top: 10px;
}

.task-kanban {
    display: grid;
    grid-template-columns: repeat(5, minmax(180px, 1fr));
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.task-kanban__column {
    min-height: 420px;
    background: var(--med-surface-soft);
    border: 1px solid var(--med-border);
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.task-kanban__column.is-dragover {
    background: rgba(11, 77, 205, .05);
    border-color: rgba(11, 77, 205, .34);
    box-shadow: inset 0 0 0 1px rgba(11, 77, 205, .12);
}

.task-kanban__column header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    color: var(--med-ink);
    background: var(--med-surface);
    border-bottom: 1px solid var(--med-border);
    font-weight: 600;
}

.task-kanban__substatuses {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 8px 10px 0;
}

.task-kanban__substatus {
    min-height: 20px;
    gap: 5px;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: 500;
}

.task-kanban__substatus[hidden] {
    display: none !important;
}

.task-kanban__substatus b {
    min-width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    color: inherit;
    background: rgba(255, 255, 255, .58);
    border: 1px solid rgba(255, 255, 255, .72);
    font-size: 10px;
    font-weight: 600;
}

.task-kanban__cards {
    display: grid;
    gap: 8px;
    padding: 10px;
}

.task-kanban-card {
    --task-priority-color: var(--med-primary);
    --task-priority-soft: rgba(11, 77, 205, .08);
    --task-priority-focus: rgba(11, 77, 205, .18);
    --task-priority-shadow: rgba(11, 77, 205, .18);
    display: grid;
    gap: 7px;
    padding: 11px;
    color: var(--med-ink);
    background: var(--med-surface);
    border: 1px solid var(--med-border);
    border-left: 4px solid var(--task-status-color);
    text-decoration: none;
    box-shadow: inset 0 0 0 1px var(--task-status-soft), 0 8px 18px rgba(6, 48, 111, .05);
    cursor: grab;
    transition: opacity .16s ease, transform .16s ease, border-color .16s ease, box-shadow .16s ease;
    position: relative;
}

.task-kanban-card--priority-low {
    --task-priority-color: #2F7D62;
    --task-priority-soft: rgba(47, 125, 98, .08);
    --task-priority-focus: rgba(47, 125, 98, .18);
    --task-priority-shadow: rgba(47, 125, 98, .18);
}

.task-kanban-card--priority-normal {
    --task-priority-color: var(--med-primary);
    --task-priority-soft: rgba(11, 77, 205, .08);
    --task-priority-focus: rgba(11, 77, 205, .18);
    --task-priority-shadow: rgba(11, 77, 205, .18);
}

.task-kanban-card--priority-high {
    --task-priority-color: #B97714;
    --task-priority-soft: rgba(185, 119, 20, .12);
    --task-priority-focus: rgba(185, 119, 20, .2);
    --task-priority-shadow: rgba(185, 119, 20, .22);
}

.task-kanban-card--priority-urgent {
    --task-priority-color: #D85A45;
    --task-priority-soft: rgba(216, 90, 69, .12);
    --task-priority-focus: rgba(216, 90, 69, .22);
    --task-priority-shadow: rgba(216, 90, 69, .24);
}

.task-kanban-card:hover,
.task-kanban-card:focus {
    color: var(--med-ink);
    border-color: rgba(11, 77, 205, .32);
    border-left-color: var(--task-status-color);
    text-decoration: none;
}

.task-kanban-card.is-dragging {
    opacity: .56;
    transform: rotate(.4deg);
}

.task-kanban-card.is-updating {
    opacity: .72;
    pointer-events: none;
}

.task-kanban-card.is-closed {
    cursor: default;
}

.task-kanban-card__title {
    min-width: 0;
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    color: var(--med-ink);
    text-decoration: none;
}

.task-kanban-card__title strong {
    min-width: 0;
}

.task-kanban-card__title:hover,
.task-kanban-card__title:focus {
    color: var(--med-primary-dark);
    text-decoration: none;
}

.task-kanban-card__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    align-items: center;
}

.task-kanban-card .task-badge {
    min-height: 20px;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: 600;
}

.task-kanban-card .task-priority-mark {
    margin-left: 1px;
}

.task-kanban-card small {
    color: var(--med-muted);
}

.task-kanban-card__mobile-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 34px;
    gap: 6px;
    align-items: center;
    margin-top: 2px;
}

.task-kanban-card__mobile-actions .form-control {
    height: 31px;
    min-width: 0;
    padding: 4px 8px;
    font-size: 12px;
}

.task-kanban-card__mobile-actions .btn {
    width: 34px;
    height: 31px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.task-kanban-card__mobile-actions--single {
    grid-template-columns: 34px;
    justify-content: start;
}

.task-kanban-card.is-overdue {
    border-color: rgba(216, 90, 69, .34);
    border-left-color: var(--med-coral);
}

.task-kanban__empty {
    padding: 12px;
    color: var(--med-muted);
    background: var(--med-surface);
    border: 1px dashed var(--med-border);
}

.task-kanban-modal[hidden] {
    display: none;
}

.task-kanban-modal {
    position: fixed;
    inset: 0;
    z-index: 1300;
    display: grid;
    place-items: center;
    padding: 18px;
}

.task-kanban-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(20, 32, 48, .42);
}

.task-kanban-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(520px, 100%);
    margin: 0;
    background: #fff;
    border: 1px solid var(--med-border);
    border-top: 3px solid var(--med-aqua);
    box-shadow: 0 22px 70px rgba(12, 33, 58, .22);
}

.task-kanban-modal__header,
.task-kanban-modal__footer {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 13px 16px;
}

.task-kanban-modal__header {
    justify-content: space-between;
    border-bottom: 1px solid var(--med-border);
}

.task-kanban-modal__header h3 {
    margin: 0;
    color: var(--med-ink);
    font-size: 17px;
    font-weight: 600;
}

.task-kanban-modal__close {
    width: 30px;
    height: 30px;
    padding: 0;
    color: var(--med-muted);
    background: var(--med-surface-soft);
    border: 1px solid var(--med-border);
    border-radius: 4px;
}

.task-kanban-modal__body {
    padding: 16px;
}

.task-kanban-modal__text {
    margin: 0 0 12px;
    color: var(--med-muted);
    line-height: 1.45;
}

.task-kanban-modal__error {
    margin-bottom: 12px;
}

.task-kanban-modal__footer {
    justify-content: flex-end;
    background: var(--med-surface-soft);
    border-top: 1px solid var(--med-border);
}

body.task-kanban-modal-open {
    overflow: hidden;
}

.task-calendar-nav {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.task-calendar-nav strong {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

.task-calendar {
    display: grid;
    grid-template-columns: repeat(7, minmax(120px, 1fr));
    border: 1px solid var(--med-border);
    overflow-x: auto;
}

.task-calendar-unscheduled {
    margin-bottom: 14px;
    border: 1px solid var(--med-border);
    background: var(--med-surface);
}

.task-calendar-unscheduled__header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--med-border);
    background: var(--med-surface-soft);
}

.task-calendar-unscheduled__header > div {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.task-calendar-unscheduled__header strong {
    font-weight: 600;
    color: var(--med-ink);
}

.task-calendar-unscheduled__header span,
.task-calendar-unscheduled__header small {
    color: var(--med-muted);
}

.task-calendar-unscheduled__list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 8px;
    padding: 10px;
}

.task-calendar-unscheduled__item {
    --task-priority-color: var(--med-primary);
    --task-priority-soft: rgba(11, 77, 205, .08);
    --task-priority-focus: rgba(11, 77, 205, .18);
    --task-priority-shadow: rgba(11, 77, 205, .18);
    display: grid;
    gap: 6px;
    min-width: 0;
    padding: 8px 10px;
    color: var(--med-ink);
    background: var(--task-status-soft);
    border: 1px solid rgba(11, 77, 205, .1);
    border-left: 4px solid var(--task-status-color);
    border-right: 3px solid var(--task-priority-color);
    border-radius: 4px;
    text-decoration: none;
    position: relative;
}

.task-calendar-unscheduled__item:hover,
.task-calendar-unscheduled__item:focus {
    color: var(--med-ink);
    text-decoration: none;
    box-shadow: 0 8px 18px rgba(6, 48, 111, .08);
}

.task-calendar-unscheduled__item[draggable="true"] {
    cursor: grab;
}

.task-calendar-unscheduled__item.is-dragging {
    opacity: .58;
}

.task-calendar-unscheduled__link {
    display: grid;
    gap: 6px;
    min-width: 0;
    color: inherit;
    text-decoration: none;
}

.task-calendar-unscheduled__link:hover,
.task-calendar-unscheduled__link:focus {
    color: inherit;
    text-decoration: none;
}

.task-calendar-unscheduled__title {
    display: flex;
    align-items: baseline;
    gap: 6px;
    min-width: 0;
}

.task-calendar-unscheduled__title strong {
    min-width: 0;
    overflow: hidden;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.task-calendar-unscheduled__title .task-priority-mark {
    flex: 0 0 auto;
}

.task-calendar-unscheduled__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    align-items: center;
    color: var(--med-muted);
    font-size: 12px;
}

.task-calendar-schedule {
    display: grid;
    gap: 6px;
    padding-top: 8px;
    border-top: 1px solid var(--med-border);
}

.task-calendar-schedule label {
    margin: 0;
    color: var(--med-muted);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.task-calendar-schedule__controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px;
    align-items: center;
}

.task-calendar__cell.is-calendar-drop-target {
    background: color-mix(in srgb, var(--med-primary) 8%, var(--med-surface));
    box-shadow: inset 0 0 0 2px rgba(11, 77, 205, .18);
}

.task-calendar__weekday {
    padding: 9px;
    color: var(--med-muted);
    background: var(--med-surface-soft);
    border-right: 1px solid var(--med-border);
    border-bottom: 1px solid var(--med-border);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.task-calendar__cell {
    min-height: 132px;
    padding: 8px;
    background: var(--med-surface);
    border-right: 1px solid var(--med-border);
    border-bottom: 1px solid var(--med-border);
}

.task-calendar__cell--empty {
    background: var(--med-surface-soft);
}

.task-calendar__date {
    margin-bottom: 6px;
    color: var(--med-muted);
    font-weight: 800;
}

.task-calendar__day-info {
    display: block;
    max-width: 100%;
    margin-top: 2px;
    overflow: hidden;
    color: var(--med-muted);
    font-size: 10px;
    font-weight: 600;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.task-calendar__cell--production-weekend {
    background: rgba(142, 160, 182, .08);
}

.task-calendar__cell--production-holiday {
    background: rgba(217, 99, 80, .08);
    border-color: rgba(217, 99, 80, .22);
}

.task-calendar__cell--production-short {
    background: rgba(246, 180, 84, .10);
    border-color: rgba(246, 180, 84, .26);
}

.task-calendar__cell--production-special {
    background: rgba(122, 91, 199, .09);
    border-color: rgba(122, 91, 199, .24);
}

.task-calendar__cell--production-holiday .task-calendar__day-info {
    color: #A33B2D;
}

.task-calendar__cell--production-short .task-calendar__day-info {
    color: #8A5700;
}

.task-calendar__cell--production-special .task-calendar__day-info {
    color: #553C9A;
}

.task-calendar-task {
    --task-priority-color: var(--med-primary);
    --task-priority-soft: rgba(11, 77, 205, .08);
    --task-priority-focus: rgba(11, 77, 205, .18);
    --task-priority-shadow: rgba(11, 77, 205, .18);
    display: block;
    margin-bottom: 5px;
    padding: 6px;
    color: var(--med-ink);
    background: var(--task-status-soft);
    border: 1px solid rgba(11, 77, 205, .1);
    border-left: 4px solid var(--task-status-color);
    border-right: 3px solid var(--task-priority-color);
    border-radius: 4px;
    font-size: 12px;
    text-decoration: none;
    position: relative;
}

.task-calendar-task--priority-low {
    --task-priority-color: #2F7D62;
    --task-priority-soft: rgba(47, 125, 98, .08);
    --task-priority-focus: rgba(47, 125, 98, .18);
    --task-priority-shadow: rgba(47, 125, 98, .18);
}

.task-calendar-task--priority-normal {
    --task-priority-color: var(--med-primary);
    --task-priority-soft: rgba(11, 77, 205, .08);
    --task-priority-focus: rgba(11, 77, 205, .18);
    --task-priority-shadow: rgba(11, 77, 205, .18);
}

.task-calendar-task--priority-high {
    --task-priority-color: #B97714;
    --task-priority-soft: rgba(185, 119, 20, .12);
    --task-priority-focus: rgba(185, 119, 20, .2);
    --task-priority-shadow: rgba(185, 119, 20, .22);
}

.task-calendar-task--priority-urgent {
    --task-priority-color: #D85A45;
    --task-priority-soft: rgba(216, 90, 69, .12);
    --task-priority-focus: rgba(216, 90, 69, .22);
    --task-priority-shadow: rgba(216, 90, 69, .24);
}

.task-calendar-task__meta {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 4px;
}

.task-calendar-task__time {
    display: inline-block;
    margin-right: 0;
    color: var(--med-muted);
}

.task-calendar-task strong {
    font-weight: 700;
}

.task-calendar-task__title {
    display: inline;
}

.task-calendar-task__title .task-priority-mark {
    margin-left: 3px;
}

.task-calendar-priority {
    display: inline-flex;
    align-items: center;
    min-height: 17px;
    margin-left: auto;
    padding: 1px 5px;
    color: var(--task-priority-color);
    background: var(--task-priority-soft);
    border: 1px solid color-mix(in srgb, var(--task-priority-color) 28%, transparent);
    border-radius: 999px;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.1;
    white-space: nowrap;
}

.task-calendar-task.is-overdue {
    background: #FDEDE9;
    border-color: rgba(216, 90, 69, .24);
    border-left-color: var(--med-coral);
    border-right-color: var(--task-priority-color);
}

.task-focus-highlight {
    animation: taskFocusPulse 2.4s ease;
}

.task-kanban-card.task-focus-highlight,
.task-calendar-task.task-focus-highlight {
    box-shadow: 0 0 0 3px var(--task-priority-focus), 0 12px 28px var(--task-priority-shadow);
}

.task-kanban-card.task-focus-highlight {
    box-shadow: inset 0 0 0 1px var(--task-status-soft), 0 0 0 3px var(--task-priority-focus), 0 12px 28px var(--task-priority-shadow);
}

@keyframes taskFocusPulse {
    0% {
        box-shadow: 0 0 0 0 var(--task-priority-focus), 0 12px 28px rgba(6, 48, 111, .08);
    }

    70% {
        box-shadow: 0 0 0 8px transparent, 0 12px 28px var(--task-priority-shadow);
    }

    100% {
        box-shadow: 0 0 0 3px var(--task-priority-focus), 0 12px 28px var(--task-priority-shadow);
    }
}

.user-form-layout {
    max-width: 1360px;
    min-width: 0;
}

.user-form-layout .form-group {
    margin-bottom: 0;
}

.user-invite-layout,
.user-form-section {
    min-width: 0;
    max-width: 100%;
}

.user-form-section {
    width: 100%;
    padding: 20px 0 22px;
    border-top: 1px solid var(--med-border);
}

.user-form-section:first-child {
    padding-top: 0;
    border-top: 0;
}

.user-form-section__header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.user-form-section__title {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin: 0;
    color: var(--med-ink);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0;
}

.user-form-section__title .fa {
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--med-primary);
    background: var(--med-blue-soft);
    border: 1px solid rgba(11, 77, 205, .16);
}

.user-form-grid {
    display: grid;
    gap: 16px 22px;
}

.user-form-grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.user-form-grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.user-form-grid--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.user-form-field {
    min-width: 0;
}

.user-voice-toggle {
    max-width: 640px;
    min-height: 78px;
    margin: 0;
}

.user-form-grid--notes textarea {
    min-height: 104px;
}

.user-form-flags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    margin-bottom: 14px;
}

.user-form-flags .form-group,
.user-form-roles .form-group {
    margin-bottom: 0;
}

.user-form-flags .checkbox,
.user-form-roles .checkbox {
    margin: 0;
}

.user-form-flags .checkbox label,
.user-form-roles .checkbox label {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    padding: 4px 8px 4px 22px;
    color: var(--med-ink);
    background: transparent;
    border: 0;
    font-weight: 600;
    line-height: 1.25;
}

.user-form-flags .checkbox label:hover,
.user-form-roles .checkbox label:hover {
    color: var(--med-primary-dark);
    background: transparent;
}

.user-form-flags .checkbox input[type="checkbox"],
.user-form-roles .checkbox input[type="checkbox"] {
    margin-top: 1px;
}

.user-form-roles .form-group > label {
    margin-bottom: 8px;
}

.user-form-roles div[id$="_roles"],
.user-form-roles div[id$="_accessPreset"] {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 8px;
    max-width: 920px;
}

.user-form-roles .radio {
    margin: 0;
}

.user-form-roles .radio label {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    padding: 4px 8px 4px 22px;
    color: var(--med-ink);
    font-weight: 600;
    line-height: 1.25;
}

.user-access-matrix {
    margin-top: 14px;
}

.access-permission-scroll {
    max-width: 100%;
    overflow-x: auto;
}

@media (min-width: 1700px) {
    .user-form-layout {
        max-width: none;
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 0 32px;
        align-items: start;
    }

    .user-form-section--photo {
        grid-column: 1;
        grid-row: 1;
    }

    .user-form-section--access {
        grid-column: 2;
        grid-row: 1;
        padding-top: 0;
        border-top: 0;
    }

    .user-form-section--personal {
        grid-column: 1;
        grid-row: 2;
    }

    .user-form-section--work {
        grid-column: 2;
        grid-row: 2;
    }

    .user-form-section--contacts {
        grid-column: 1;
        grid-row: 3;
    }

    .user-form-section--permissions {
        grid-column: 2;
        grid-row: 3;
    }

    .user-form-section--notes {
        grid-column: 1 / -1;
        grid-row: 4;
    }

    .user-form-section--notes .user-form-grid--notes {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .user-form-section--notes textarea {
        min-height: 128px;
    }
}

.crm-autofill-trap {
    position: fixed;
    top: -1000px;
    left: -1000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

.user-photo-form {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-top: 0;
    padding-top: 0;
    padding-bottom: 14px;
    border-top: 0;
}

.user-photo-form__field {
    flex: 1 1 auto;
    min-width: 0;
}

.user-photo-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.user-photo-upload {
    min-height: 46px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    max-width: 920px;
    padding: 8px;
    background: var(--med-surface-soft);
    border: 1px solid var(--med-border);
}

.user-photo-upload:focus-within {
    border-color: rgba(11, 77, 205, .42);
    box-shadow: 0 0 0 3px rgba(11, 77, 205, .10);
}

.user-photo-upload__button {
    height: 34px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 14px;
    color: #fff;
    background: var(--med-primary);
    border: 1px solid var(--med-primary);
    font-weight: 700;
}

.user-photo-upload__button:hover,
.user-photo-upload__button:focus {
    background: var(--med-primary-dark);
    border-color: var(--med-primary-dark);
    outline: 0;
}

.user-photo-upload__button--gallery {
    color: var(--med-primary-dark);
    background: #fff;
    border-color: var(--med-border);
}

.user-photo-upload__button--gallery:hover,
.user-photo-upload__button--gallery:focus {
    color: var(--med-primary-dark);
    background: var(--med-blue-soft);
    border-color: rgba(11, 77, 205, .28);
}

.user-photo-upload__button--delete {
    color: #fff;
    background: var(--med-coral);
    border-color: var(--med-coral);
}

.user-photo-upload__button--delete:hover,
.user-photo-upload__button--delete:focus {
    background: var(--med-coral-hover);
    border-color: var(--med-coral-hover);
}

.is-hidden {
    display: none !important;
}

.user-photo-upload__name {
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
    color: var(--med-muted);
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-photo-upload.has-file .user-photo-upload__name {
    color: var(--med-ink);
    font-weight: 600;
}

.user-photo-upload__hint {
    margin: 8px 0 0;
    color: var(--med-muted);
    font-size: 13px;
    line-height: 1.35;
}

.default-avatar-picker {
    margin: 0;
}

.default-avatar-gallery {
    padding-top: 14px;
    overflow: hidden;
    opacity: 1;
    transform: translateY(0);
    transition: max-height .28s ease, opacity .18s ease, transform .28s ease, padding-top .28s ease;
    will-change: max-height, opacity, transform;
}

.default-avatar-gallery.is-collapsed {
    max-height: 0 !important;
    padding-top: 0;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px);
}

.default-avatar-gallery.is-animating {
    overflow: hidden;
}

.default-avatar-picker__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.default-avatar-types {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.default-avatar-type {
    min-height: 34px;
    padding: 7px 11px;
    color: var(--med-primary-dark);
    background: #fff;
    border: 1px solid var(--med-border);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
}

.default-avatar-type:hover,
.default-avatar-type:focus,
.default-avatar-type.is-active {
    color: var(--med-primary-dark);
    background: var(--med-blue-soft);
    border-color: rgba(11, 77, 205, .3);
    outline: 0;
}

.default-avatar-grid {
    display: none;
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
    gap: 10px;
}

.default-avatar-grid.is-active {
    display: grid;
}

.default-avatar-option {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    padding: 4px;
    background: #fff;
    border: 1px solid var(--med-border);
    box-shadow: 0 5px 14px rgba(6, 48, 111, .06);
}

.default-avatar-option:hover,
.default-avatar-option:focus {
    border-color: rgba(11, 77, 205, .35);
    outline: 0;
}

.default-avatar-option.is-selected {
    border-color: var(--med-primary);
    box-shadow: 0 0 0 2px rgba(11, 77, 205, .16);
}

.default-avatar-option.is-selected::after {
    content: "";
    position: absolute;
    right: 4px;
    bottom: 4px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background-color: var(--med-primary);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 4 4L19 6'/%3E%3C/svg%3E");
    background-position: center;
    background-repeat: no-repeat;
    background-size: 12px 12px;
    border-radius: 50%;
}

.default-avatar-option img {
    width: 100%;
    height: 100%;
    display: block;
    aspect-ratio: 1 / 1;
    box-sizing: border-box;
    object-fit: cover;
    border-radius: 50%;
    clip-path: circle(50% at 50% 50%);
}

.default-avatar-empty {
    padding: 10px 12px;
    color: var(--med-muted);
    background: var(--med-surface-soft);
    border: 1px solid var(--med-border);
}

.user-profile-photo {
    margin: 0 0 18px;
}

.user-photo-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    flex: 0 0 auto;
    line-height: 0;
}

.datatable .user-photo-cell {
    width: 68px;
    text-align: center;
    vertical-align: middle !important;
}

.datatable .user-photo-cell .user-photo-link {
    margin-right: auto;
    margin-left: auto;
}

a.user-photo-link:hover .user-avatar,
a.user-photo-link:focus .user-avatar {
    box-shadow: 0 0 0 3px rgba(11, 77, 205, .16);
}

.user-profile-contact {
    color: inherit;
    text-decoration: underline;
    text-decoration-color: rgba(11, 77, 205, .28);
    text-underline-offset: 3px;
}

.user-profile-contact:hover,
.user-profile-contact:focus {
    color: var(--med-primary-dark);
    text-decoration-color: currentColor;
}

.user-avatar {
    display: block;
    aspect-ratio: 1 / 1;
    flex: 0 0 auto;
    box-sizing: border-box;
    object-fit: cover;
    max-width: none;
    max-height: none;
    overflow: hidden;
    border-radius: 50%;
    clip-path: circle(50% at 50% 50%);
    background: var(--med-surface-soft);
    border: 1px solid var(--med-border);
}

.user-avatar--sm {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px;
    max-width: 38px;
    min-height: 38px;
    max-height: 38px;
}

.user-avatar--large {
    width: 104px !important;
    height: 104px !important;
    min-width: 104px;
    max-width: 104px;
    min-height: 104px;
    max-height: 104px;
}

@media (min-width: 768px) {
    .box-body:has(> .user-profile-photo + .user-profile-facts) {
        display: grid;
        grid-template-columns: 132px minmax(0, 1fr);
        gap: 18px 24px;
        align-items: start;
    }

    .box-body > .user-profile-photo + .user-profile-facts {
        display: grid;
        grid-template-columns: 110px minmax(160px, 1fr) 110px minmax(160px, 1fr);
        grid-auto-rows: minmax(50px, auto);
        grid-column: 2;
        gap: 9px 0;
        min-width: 0;
        margin: 0;
    }

    .box-body:has(> .user-profile-photo + .user-profile-facts) > .user-profile-photo {
        grid-column: 1;
        margin: 0;
        padding: 14px;
        background: var(--med-surface-soft);
        border: 1px solid var(--med-border);
    }

    .box-body:has(> .user-profile-photo + .user-profile-facts) > .user-profile-photo .user-photo-link {
        margin: 0 auto;
    }

    .box-body > .user-profile-photo + .user-profile-facts dt,
    .box-body > .user-profile-photo + .user-profile-facts dd {
        float: none;
        width: auto;
        min-height: 50px;
        margin: 0;
        padding: 9px 12px;
        display: flex;
        align-items: center;
        background: var(--med-surface-soft);
        border-top: 1px solid var(--med-border);
        border-bottom: 1px solid var(--med-border);
        line-height: 1.25;
    }

    .box-body > .user-profile-photo + .user-profile-facts dt {
        justify-content: flex-start;
        color: var(--med-muted);
        font-size: 10.5px;
        font-weight: 600;
        letter-spacing: .03em;
        text-align: left;
        text-transform: uppercase;
        border-left: 1px solid var(--med-border);
        border-radius: 3px 0 0 3px;
    }

    .box-body > .user-profile-photo + .user-profile-facts dd {
        min-width: 0;
        color: var(--med-ink);
        font-size: 13px;
        font-weight: 500;
        border-right: 1px solid var(--med-border);
        border-radius: 0 3px 3px 0;
        overflow-wrap: anywhere;
    }

    .box-body > .user-profile-photo + .user-profile-facts .id-hash {
        max-width: 100%;
    }
}

@media (min-width: 1280px) {
    .box-body > .user-profile-photo + .user-profile-facts {
        grid-template-columns: 110px minmax(150px, 1fr) 110px minmax(150px, 1fr) 110px minmax(150px, 1fr);
    }
}

@media (max-width: 767px) {
    .box:has(> .box-body > .user-profile-photo + .dl-horizontal) {
        overflow: hidden;
    }

    .box:has(> .box-body > .user-profile-photo + .dl-horizontal) > .box-header.with-border {
        display: none;
    }

    .box-body > .user-profile-photo {
        display: flex;
        justify-content: center;
        margin: 0 0 14px;
        padding: 3px 0 14px;
        border-bottom: 1px solid var(--med-border);
    }

    .box-body > .user-profile-photo .user-avatar--large {
        width: 86px !important;
        height: 86px !important;
        min-width: 86px;
        max-width: 86px;
        min-height: 86px;
        max-height: 86px;
        box-shadow: 0 0 0 4px var(--med-surface), 0 10px 26px rgba(6, 48, 111, .16);
    }

    .box-body > .user-profile-photo + .dl-horizontal {
        display: grid;
        grid-template-columns: minmax(92px, 108px) minmax(0, 1fr);
        gap: 0 10px;
        margin: 0;
    }

    .box-body > .user-profile-photo + .dl-horizontal dt,
    .box-body > .user-profile-photo + .dl-horizontal dd {
        float: none;
        width: auto;
        min-height: 35px;
        margin: 0;
        padding: 9px 0;
        border-bottom: 1px solid var(--med-border);
        line-height: 1.3;
    }

    .box-body > .user-profile-photo + .dl-horizontal dt {
        grid-column: 1;
        color: var(--med-muted);
        font-size: 10.5px;
        font-weight: 600;
        letter-spacing: .03em;
        text-align: left;
        text-transform: uppercase;
    }

    .box-body > .user-profile-photo + .dl-horizontal dd {
        min-width: 0;
        grid-column: 2;
        display: flex;
        align-items: center;
        color: var(--med-ink);
        font-size: 13px;
        font-weight: 500;
        overflow-wrap: anywhere;
    }

    .box-body > .user-profile-photo + .dl-horizontal dt:last-of-type,
    .box-body > .user-profile-photo + .dl-horizontal dd:last-child {
        border-bottom: 0;
    }

    .box-body > .user-profile-photo + .dl-horizontal .id-hash {
        max-width: 100%;
        padding: 4px 7px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .box-body > .user-profile-photo + .dl-horizontal dd:last-child .fa {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        min-height: 24px;
        padding: 3px 8px;
        border-radius: 4px;
        font-size: 12px;
        font-weight: 600;
        line-height: 1;
    }

    .box-body > .user-profile-photo + .dl-horizontal dd:last-child .fa-check {
        color: #0F8F55;
        background: rgba(25, 135, 84, .10);
        border: 1px solid rgba(25, 135, 84, .22);
    }

    .box-body > .user-profile-photo + .dl-horizontal dd:last-child .fa-check::after {
        content: "Активен";
        font-family: Arial, sans-serif;
    }

    .box-body > .user-profile-photo + .dl-horizontal dd:last-child .fa-ban {
        color: #B42318;
        background: rgba(220, 53, 69, .10);
        border: 1px solid rgba(220, 53, 69, .22);
    }

    .box-body > .user-profile-photo + .dl-horizontal dd:last-child .fa-ban::after {
        content: "Не активен";
        font-family: Arial, sans-serif;
    }

    .box:has(> .box-body > .user-profile-photo + .dl-horizontal) > .box-footer {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 12px 14px;
    }

    .box:has(> .box-body > .user-profile-photo + .dl-horizontal) > .box-footer .btn,
    .box:has(> .box-body > .user-profile-photo + .dl-horizontal) > .box-footer form,
    .box:has(> .box-body > .user-profile-photo + .dl-horizontal) > .box-footer button {
        width: 100%;
    }

    .box:has(> .box-body > .user-profile-photo + .dl-horizontal) > .box-footer .btn,
    .box:has(> .box-body > .user-profile-photo + .dl-horizontal) > .box-footer button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 7px;
    }
}

@media (max-width: 360px) {
    .box-body > .user-profile-photo + .dl-horizontal {
        grid-template-columns: 94px minmax(0, 1fr);
        gap: 0 8px;
    }

    .box-body > .user-profile-photo + .dl-horizontal dt {
        font-size: 10px;
    }

    .box-body > .user-profile-photo + .dl-horizontal dd {
        font-size: 12.5px;
    }
}

.user-profile-summary {
    display: grid;
    gap: 14px;
    margin-bottom: 20px;
}

.user-profile-summary > .user-profile-photo {
    margin: 0;
}

.user-profile-facts {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    min-width: 0;
}

.user-profile-fact {
    min-width: 0;
    min-height: 42px;
    display: grid;
    grid-template-columns: minmax(96px, 112px) minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 9px 11px;
    background: var(--med-surface-soft);
    border: 1px solid var(--med-border);
    border-radius: 3px;
}

.user-profile-fact__label {
    min-width: 0;
    color: var(--med-muted);
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .03em;
    line-height: 1.2;
    text-transform: uppercase;
}

.user-profile-fact__value {
    min-width: 0;
    display: flex;
    align-items: center;
    color: var(--med-ink);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.user-profile-fact .id-hash {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-profile-fact--status .fa {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 24px;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
}

.user-profile-fact--status .fa-check {
    color: #0F8F55;
    background: rgba(25, 135, 84, .10);
    border: 1px solid rgba(25, 135, 84, .22);
}

.user-profile-fact--status .fa-check::after {
    content: "Активен";
    font-family: Arial, sans-serif;
}

.user-profile-fact--status .fa-ban {
    color: #B42318;
    background: rgba(220, 53, 69, .10);
    border: 1px solid rgba(220, 53, 69, .22);
}

.user-profile-fact--status .fa-ban::after {
    content: "Не активен";
    font-family: Arial, sans-serif;
}

@media (min-width: 768px) {
    .user-profile-summary {
        grid-template-columns: 132px minmax(0, 1fr);
        gap: 18px 24px;
        align-items: start;
    }

    .user-profile-summary > .user-profile-photo {
        padding: 14px;
        background: var(--med-surface-soft);
        border: 1px solid var(--med-border);
        border-radius: 3px;
    }

    .user-profile-summary > .user-profile-photo .user-photo-link {
        margin: 0 auto;
    }

    .user-profile-facts {
        grid-template-columns: repeat(2, minmax(220px, 1fr));
        gap: 10px;
    }
}

@media (min-width: 1280px) {
    .user-profile-facts {
        grid-template-columns: repeat(3, minmax(220px, 1fr));
    }
}

@media (max-width: 767px) {
    .box:has(> .box-body > .user-profile-summary) {
        overflow: hidden;
    }

    .box:has(> .box-body > .user-profile-summary) > .box-header.with-border {
        display: none;
    }

    .user-profile-summary > .user-profile-photo {
        display: flex;
        justify-content: center;
        padding: 3px 0 14px;
        border-bottom: 1px solid var(--med-border);
    }

    .user-profile-summary > .user-profile-photo .user-avatar--large {
        width: 86px !important;
        height: 86px !important;
        min-width: 86px;
        max-width: 86px;
        min-height: 86px;
        max-height: 86px;
        box-shadow: 0 0 0 4px var(--med-surface), 0 10px 26px rgba(6, 48, 111, .16);
    }

    .user-profile-facts {
        gap: 7px;
    }

    .user-profile-fact {
        grid-template-columns: minmax(92px, 108px) minmax(0, 1fr);
        min-height: 36px;
        padding: 9px 10px;
    }
}

@media (max-width: 360px) {
    .user-profile-fact {
        grid-template-columns: 94px minmax(0, 1fr);
        gap: 8px;
    }

    .user-profile-fact__label {
        font-size: 10px;
    }

    .user-profile-fact__value {
        font-size: 12.5px;
    }
}

.user-history-table th:first-child,
.user-history-table td:first-child {
    width: 140px;
}

.user-history-table th:nth-child(2),
.user-history-table td:nth-child(2) {
    width: 220px;
}

.user-history-table td {
    vertical-align: top !important;
}

.user-history-table__message {
    margin-top: 3px;
    color: var(--med-muted);
    font-size: 12px;
}

.permission-table td,
.permission-table th {
    vertical-align: middle !important;
}

.access-permission-table th,
.access-permission-table td {
    text-align: center;
}

.access-permission-table th:first-child,
.access-permission-table td:first-child {
    text-align: left;
    width: 32%;
}

.access-checkbox {
    margin: 0;
}

.access-checkbox input[type="checkbox"] {
    margin: 0;
}

.access-permission-table__empty {
    color: var(--med-muted);
}

.access-preset-form-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 320px);
    gap: 16px;
}

.access-mini-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 0 4px 4px 0;
    padding: 2px 6px;
    border: 1px solid var(--med-border);
    border-radius: 3px;
    color: var(--med-primary-dark);
    background: var(--med-soft);
    font-size: 12px;
    font-weight: 600;
}

.access-mini-badge .fa {
    width: 12px;
    text-align: center;
    color: var(--med-primary);
}

.access-preset-table > thead > tr > th:nth-child(1) {
    width: 220px;
}

.access-preset-table > thead > tr > th:nth-child(2) {
    width: 190px;
}

.access-preset-table > thead > tr > th:last-child {
    width: 110px;
}

.access-preset-rights {
    display: grid;
    gap: 6px;
}

.access-preset-rights__group {
    display: grid;
    grid-template-columns: minmax(190px, 260px) minmax(0, 1fr);
    gap: 8px 12px;
    align-items: start;
    padding: 5px 0;
    border-bottom: 1px solid var(--med-border);
}

.access-preset-rights__group:last-child {
    border-bottom: 0;
}

.access-preset-rights__group.is-empty {
    opacity: .7;
}

.access-preset-rights__module {
    color: var(--med-muted);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.access-preset-rights__actions {
    min-width: 0;
}

.access-preset-rights__empty {
    color: var(--med-muted);
    font-size: 12px;
}

@media (max-width: 767px) {
    .access-preset-form-head {
        grid-template-columns: 1fr;
    }

    .access-permission-table {
        min-width: 620px;
    }

    .access-preset-rights__group {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}

/* NBM-CRM light palette override. Kept as a single block to make rollback simple. */
body:not(.medem-login-page),
.wrapper,
.content-wrapper {
    background: var(--med-bg);
    color: var(--med-ink);
}

.main-header {
    box-shadow: 0 1px 0 rgba(6, 48, 111, .08);
}

.main-header .logo,
.skin-black .main-header > .logo,
.skin-black .main-header > .logo:hover,
.main-header .navbar,
.skin-black .main-header > .navbar {
    background: rgba(255, 255, 255, .96) !important;
    border-color: rgba(6, 48, 111, .08) !important;
    box-shadow: none;
}

.main-header .logo {
    border-right: 1px solid var(--med-border);
}

.navbar-nav > li > a,
.skin-black .main-header > .navbar .nav > li > a,
.skin-black .main-header > .navbar .nav > li > a > i {
    color: var(--med-primary-dark) !important;
}

.skin-black .main-header > .navbar .nav > li > a:hover,
.skin-black .main-header > .navbar .nav > li > a:focus,
.skin-black .main-header > .navbar .nav .open > a,
.skin-black .main-header > .navbar .nav .open > a:hover,
.skin-black .main-header > .navbar .nav .open > a:focus,
.skin-black .main-header > .navbar .nav > .active > a {
    background: var(--med-blue-soft) !important;
    color: var(--med-primary-dark) !important;
}

.main-header .sidebar-toggle,
.skin-black .main-header .sidebar-toggle,
.skin-black .main-header > .navbar .sidebar-toggle {
    color: var(--med-primary-dark) !important;
}

.skin-black .main-header .navbar .sidebar-toggle:hover,
.skin-black .main-header .navbar .sidebar-toggle:focus,
.skin-black .main-header .navbar .sidebar-toggle:active,
.skin-black .main-header > .navbar > .sidebar-toggle:hover,
.skin-black .main-header > .navbar > .sidebar-toggle:focus,
.skin-black .main-header > .navbar > .sidebar-toggle:active,
.main-header .sidebar-toggle:hover,
.main-header .sidebar-toggle:focus,
.main-header .sidebar-toggle:active {
    background-color: var(--med-blue-soft) !important;
    color: var(--med-primary-dark) !important;
}

.medem-menu-icon span {
    background: var(--med-primary-dark);
    box-shadow: none;
}

.main-sidebar,
.skin-black .main-sidebar,
.skin-black .left-side {
    background: linear-gradient(180deg, #ffffff 0%, #F7FBFF 100%) !important;
    border-right: 1px solid var(--med-border);
    box-shadow: 8px 0 24px rgba(6, 48, 111, .04);
}

.sidebar-menu > li > a,
.skin-black .sidebar-menu > li > a {
    color: var(--med-muted);
}

.skin-black .sidebar-menu > li > a > i,
.skin-black .treeview-menu > li > a > i {
    color: var(--med-primary);
}

.sidebar-menu > li.active > a,
.sidebar-menu > li > a:hover,
.skin-black .sidebar-menu > li:hover > a,
.skin-black .sidebar-menu > li.active > a {
    color: var(--med-primary-dark);
    background: var(--med-blue-soft);
    box-shadow: inset 3px 0 0 var(--med-teal);
}

.skin-black .sidebar-menu > li:hover > a > i,
.skin-black .sidebar-menu > li.active > a > i {
    color: var(--med-primary-dark);
}

.skin-black.sidebar-mini.sidebar-collapse .sidebar-menu > li:hover > a > span:not(.pull-right-container) {
    background: var(--med-primary-dark) !important;
    color: #fff !important;
    box-shadow: 0 14px 26px rgba(6, 48, 111, .24);
}

.content-header > h1,
.content-header > h1 > small,
.content-header > .breadcrumb,
.content-header > .breadcrumb a {
    color: var(--med-ink);
}

.box,
.info-box,
.small-box,
.well,
.table-responsive,
.table-board {
    border-color: rgba(6, 48, 111, .08);
    background: var(--med-surface);
    box-shadow: var(--med-shadow);
}

.box {
    border-top-color: var(--med-teal);
}

.box-header.with-border.bg-fa,
.box-footer {
    background: var(--med-surface-soft);
    border-color: var(--med-border);
}

.box-title,
.box-title-main,
.info-box-number,
.table > thead > tr > th {
    color: var(--med-ink);
}

.text-muted,
.well small.text-muted,
.info-box-text {
    color: var(--med-muted);
}

.info-box-icon {
    background: #F5FAFF;
    color: var(--med-primary);
}

.info-box-icon .fa {
    color: var(--med-primary);
    -webkit-text-fill-color: transparent;
    -webkit-text-stroke-color: var(--med-primary);
}

.form-control,
.bootstrap-select .btn.dropdown-toggle,
.input-group .form-control {
    border-color: var(--med-border);
    background-color: #fff;
    color: var(--med-ink);
}

.form-control:focus,
.bootstrap-select .btn.dropdown-toggle:focus,
.bootstrap-select .btn.dropdown-toggle:active {
    border-color: rgba(11, 77, 205, .42);
    box-shadow: 0 0 0 3px rgba(11, 77, 205, .10);
}

.btn-default,
button.btn-default,
.bootstrap-select .btn.dropdown-toggle {
    background: #fff;
    color: var(--med-primary-dark);
    border-color: var(--med-border);
}

.btn-default:hover,
button.btn-default:hover,
.bootstrap-select .btn.dropdown-toggle:hover {
    background: var(--med-blue-soft);
    border-color: rgba(11, 77, 205, .24);
    color: var(--med-primary-dark);
}

.btn-success,
.btn-primary {
    background: var(--med-primary) !important;
    border-color: var(--med-primary) !important;
    color: #fff !important;
}

.btn-success:hover,
.btn-primary:hover,
.btn-success:focus,
.btn-primary:focus {
    background: var(--med-primary-dark) !important;
    border-color: var(--med-primary-dark) !important;
}

.btn-danger {
    background: var(--med-coral) !important;
    border-color: var(--med-coral) !important;
}

.btn-danger:hover,
.btn-danger:focus {
    background: var(--med-coral-hover) !important;
    border-color: var(--med-coral-hover) !important;
}

.btn-warning {
    background: #f0ad4e !important;
    border-color: #eea236 !important;
    color: #fff !important;
}

.btn-warning:hover,
.btn-warning:focus {
    background: #d9902f !important;
    border-color: #d58512 !important;
    color: #fff !important;
}

.label-default {
    background: var(--med-blue-soft);
    color: var(--med-primary-dark);
}

.content .label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 18px;
    padding: 3px 7px;
    line-height: 1;
    font-weight: 600;
    vertical-align: middle;
}

.id-hash,
code {
    background: var(--med-blue-soft);
    color: var(--med-primary-dark);
}

.table-hover > tbody > tr:hover {
    background: #F7FBFF;
}

.medem-login-page {
    background:
        radial-gradient(circle at 82% 18%, rgba(5, 184, 182, .16), transparent 18%),
        radial-gradient(circle at 14% 82%, rgba(11, 77, 205, .14), transparent 20%),
        linear-gradient(135deg, #F8FBFF 0%, #EEF6FF 42%, #F6FBFA 100%);
}

.crm-auth__panel {
    background: rgba(255, 255, 255, .78);
    box-shadow: 0 28px 70px rgba(6, 48, 111, .16);
}

.crm-auth__intro {
    background:
        radial-gradient(circle at 82% 18%, rgba(5, 184, 182, .18), transparent 24%),
        linear-gradient(135deg, var(--med-primary-dark) 0%, #0A408E 54%, #087D91 100%);
}

.crm-auth__intro::after {
    background: rgba(255, 255, 255, .08);
}

.crm-auth__form {
    background: rgba(255, 255, 255, .92);
}

.crm-auth__label {
    color: var(--med-muted);
}

.crm-auth__control {
    background: var(--med-surface-soft);
    border-bottom-color: var(--med-border);
}

.crm-auth__control .form-control {
    color: var(--med-ink);
}

.crm-auth__submit {
    background: var(--med-primary);
}

.crm-auth__submit:hover,
.crm-auth__submit:focus {
    background: var(--med-primary-dark);
}

.skin-black .navbar-nav > #user-profile.user-menu > .dropdown-menu {
    background: rgba(255, 255, 255, .98);
    border-color: var(--med-border);
    box-shadow: 0 26px 64px rgba(6, 48, 111, .18);
    overflow: visible;
}

.skin-black .navbar-nav > #user-profile.user-menu > .dropdown-menu:before {
    content: "";
    position: absolute;
    top: -7px;
    right: 24px;
    width: 14px;
    height: 14px;
    background: rgba(255, 255, 255, .98);
    border-top: 1px solid var(--med-border);
    border-left: 1px solid var(--med-border);
    transform: rotate(45deg);
}

.skin-black .navbar-nav > #user-profile.user-menu > .dropdown-menu > .user-header {
    height: auto;
    min-height: 276px;
    padding: 18px 16px 16px;
    overflow: visible;
    background: linear-gradient(180deg, #ffffff 0%, var(--med-blue-soft) 100%);
    color: var(--med-ink);
}

.skin-black .navbar-nav > #user-profile.user-menu > .dropdown-menu > .user-header > img {
    width: 90px !important;
    height: 90px !important;
    min-width: 90px;
    max-width: 90px;
    min-height: 90px;
    max-height: 90px;
    aspect-ratio: 1 / 1;
    box-sizing: border-box;
    padding: 0 !important;
    object-fit: cover !important;
    background: #fff;
    border-radius: 50% !important;
    clip-path: circle(50% at 50% 50%);
}

.skin-black .navbar-nav > #user-profile.user-menu > .dropdown-menu > .user-header > img[src*="no-user-image.gif"] {
    padding: 18px !important;
    object-fit: contain !important;
}

.user-menu-details {
    margin-top: 12px;
    display: grid;
    gap: 6px;
    text-align: left;
}

.user-menu-detail {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 8px;
    align-items: baseline;
    color: var(--med-muted);
    font-size: 12px;
    line-height: 1.25;
}

.user-menu-detail span {
    font-weight: 700;
}

.user-menu-detail strong {
    min-width: 0;
    overflow: hidden;
    color: var(--med-ink);
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.id-hash.user-menu-id {
    width: 100%;
    max-width: none;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    margin-top: 3px;
    padding: 5px 7px;
    color: rgba(6, 48, 111, .64);
    background: rgba(255, 255, 255, .58);
    border: 1px solid rgba(11, 77, 205, .10);
    box-shadow: none;
}

.id-hash.user-menu-id:hover,
.id-hash.user-menu-id:focus {
    color: var(--med-primary-dark);
    background: rgba(255, 255, 255, .86);
    border-color: rgba(11, 77, 205, .28);
    box-shadow: 0 0 0 2px rgba(11, 77, 205, .10);
}

.user-menu-id__label {
    color: var(--med-muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.user-menu-id__value {
    min-width: 0;
    overflow: hidden;
    font-family: Consolas, Monaco, monospace;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.skin-black .navbar-nav > #user-profile.user-menu > .dropdown-menu > .user-footer .btn {
    background: #fff;
    color: var(--med-primary-dark);
    border-color: var(--med-border);
}

.knowledge-base {
    color: var(--med-ink);
}

.knowledge-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
    gap: 18px;
    align-items: stretch;
    margin-bottom: 16px;
    padding: 18px;
    background: var(--med-surface);
    border: 1px solid var(--med-border);
    border-top: 3px solid var(--med-teal);
    border-radius: 8px;
    box-shadow: var(--med-shadow);
}

.knowledge-hero h2 {
    margin: 0 0 8px;
    color: var(--med-primary-dark);
    font-size: 24px;
    font-weight: 600;
}

.knowledge-hero p {
    max-width: 900px;
    margin: 0;
    color: var(--med-muted);
    line-height: 1.55;
}

.knowledge-shortcuts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.knowledge-shortcuts .knowledge-link {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 10px;
    color: var(--med-primary-dark);
    background: var(--med-blue-soft);
    border: 1px solid rgba(11, 77, 205, .16);
    border-radius: 6px;
    font-weight: 600;
}

.knowledge-shortcuts .knowledge-link:hover,
.knowledge-shortcuts .knowledge-link:focus {
    color: #fff;
    background: var(--med-primary);
    text-decoration: none;
}

.knowledge-search label {
    display: block;
    margin-bottom: 7px;
    color: var(--med-ink);
    font-weight: 600;
}

.knowledge-search__control {
    position: relative;
}

.knowledge-search__control .fa {
    position: absolute;
    top: 50%;
    left: 12px;
    color: var(--med-muted);
    transform: translateY(-50%);
}

.knowledge-search__control .form-control {
    height: 42px;
    padding-left: 36px;
}

.knowledge-search__hint {
    margin-top: 7px;
    color: var(--med-muted);
    font-size: 12px;
    line-height: 1.35;
}

.knowledge-search-results {
    margin-bottom: 16px;
    background: var(--med-surface);
    border: 1px solid var(--med-border);
    border-left: 3px solid var(--med-primary);
    border-radius: 8px;
    box-shadow: var(--med-shadow);
}

.knowledge-search-results__head {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-bottom: 1px solid var(--med-border);
}

.knowledge-result {
    display: block;
    width: 100%;
    padding: 12px 14px;
    color: var(--med-ink);
    text-align: left;
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--med-border);
}

.knowledge-result:last-child {
    border-bottom: 0;
}

.knowledge-result:hover,
.knowledge-result:focus {
    background: var(--med-blue-soft);
    outline: none;
}

.knowledge-result strong,
.knowledge-result span {
    display: block;
}

.knowledge-result strong {
    margin: 2px 0 4px;
    color: var(--med-primary-dark);
    font-weight: 600;
}

.knowledge-result__module {
    color: var(--med-muted);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.knowledge-empty {
    padding: 14px;
    color: var(--med-muted);
}

.knowledge-box .box-body {
    padding: 0;
}

.knowledge-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-start;
    padding: 12px 12px 0;
    border-bottom-color: var(--med-border);
}

.knowledge-tabs:before,
.knowledge-tabs:after {
    display: none;
    content: none;
}

.knowledge-tabs > li {
    float: none;
    margin: 0;
    min-width: 0;
}

.knowledge-tabs > li > a {
    margin: 0;
    color: var(--med-primary-dark);
    background: var(--med-surface-soft);
    border: 1px solid var(--med-border);
    border-radius: 6px 6px 0 0;
    font-weight: 600;
}

.knowledge-tabs > li.active > a,
.knowledge-tabs > li.active > a:hover,
.knowledge-tabs > li.active > a:focus {
    color: var(--med-primary-dark);
    background: var(--med-surface);
    border-color: var(--med-border);
    border-bottom-color: var(--med-surface);
}

.knowledge-content {
    padding: 18px;
}

.knowledge-section {
    margin-bottom: 18px;
    padding: 0 0 0 16px;
    border-left: 3px solid var(--med-teal);
}

.knowledge-section:last-child {
    margin-bottom: 0;
}

.knowledge-section h3 {
    margin: 0 0 8px;
    color: var(--med-primary-dark);
    font-size: 18px;
    font-weight: 600;
}

.knowledge-section p,
.knowledge-section li {
    color: var(--med-ink);
    font-size: 14px;
    line-height: 1.55;
}

.knowledge-section p {
    margin: 0 0 10px;
}

.knowledge-section ul,
.knowledge-section ol {
    margin-bottom: 10px;
    padding-left: 21px;
}

.knowledge-section strong {
    color: var(--med-primary-dark);
    font-weight: 600;
}

.knowledge-link {
    color: var(--med-primary);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: rgba(11, 77, 205, .28);
    text-underline-offset: 2px;
}

.knowledge-link:hover,
.knowledge-link:focus {
    color: var(--med-primary-dark);
    text-decoration-color: currentColor;
}

.knowledge-section.is-highlighted {
    animation: knowledge-highlight 1.6s ease;
}

@keyframes knowledge-highlight {
    0% { background: rgba(55, 210, 200, .18); }
    100% { background: transparent; }
}

@media (max-width: 991px) {
    .knowledge-hero {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .knowledge-hero {
        padding: 14px;
    }

    .knowledge-hero h2 {
        font-size: 21px;
    }

    .knowledge-tabs {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .knowledge-tabs > li {
        width: 100%;
    }

    .knowledge-tabs > li > a {
        display: block;
        padding: 9px 8px;
        text-align: center;
        border-radius: 6px;
    }

    .knowledge-content {
        padding: 14px;
    }

    .knowledge-section {
        padding-left: 12px;
    }
}

body.medem-theme-dark {
    --med-primary: #4F8FF7;
    --med-primary-dark: #CFE1FF;
    --med-teal: #37D2C8;
    --med-teal-soft: rgba(55, 210, 200, .14);
    --med-blue-soft: rgba(79, 143, 247, .14);
    --med-bg: #0F151D;
    --med-surface: #17212C;
    --med-surface-soft: #1F2B38;
    --med-border: #304153;
    --med-ink: #E7EEF7;
    --med-muted: #9EADBD;
    --med-coral: #D96350;
    --med-coral-hover: #E97967;
    --med-shadow: 0 12px 30px rgba(0, 0, 0, .24);
    background: var(--med-bg);
    color: var(--med-ink);
}

body.medem-theme-dark .medem-task-event-toast {
    color: var(--med-ink);
    background: var(--med-surface);
    border-color: var(--med-border);
    border-left-color: var(--med-teal);
    box-shadow: 0 20px 42px rgba(0, 0, 0, .36);
}

body.medem-theme-dark .medem-task-event-toast.is-attention {
    border-left-color: var(--med-coral-hover);
    box-shadow: 0 20px 42px rgba(0, 0, 0, .42);
}

body.medem-theme-dark .medem-task-event-toast__title {
    color: var(--med-primary-dark);
}

body.medem-theme-dark .medem-task-event-toast__close {
    color: var(--med-muted);
}

body.medem-theme-dark .medem-task-event-toast__close:hover,
body.medem-theme-dark .medem-task-event-toast__close:focus {
    color: var(--med-ink);
}

body.medem-theme-dark .wrapper,
body.medem-theme-dark .content-wrapper {
    background:
        radial-gradient(circle at 88% 8%, rgba(55, 210, 200, .08), transparent 18%),
        linear-gradient(180deg, #101722 0%, #0F151D 100%);
    color: var(--med-ink);
}

body.medem-theme-dark .main-header .logo,
body.medem-theme-dark.skin-black .main-header > .logo,
body.medem-theme-dark.skin-black .main-header > .logo:hover,
body.medem-theme-dark .main-header .navbar,
body.medem-theme-dark.skin-black .main-header > .navbar {
    background: rgba(23, 33, 44, .96) !important;
    border-color: rgba(48, 65, 83, .9) !important;
}

body.medem-theme-dark .main-header .logo {
    border-right-color: var(--med-border);
}

body.medem-theme-dark .main-header .logo .medem-brand__image {
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .35));
    opacity: .96;
}

body.medem-theme-dark .nbm-header-brand__wordmark strong {
    color: #f8fbff;
}

body.medem-theme-dark .nbm-header-brand__wordmark small {
    color: #9fb5ca;
}

body.medem-theme-dark .navbar-nav > li > a,
body.medem-theme-dark.skin-black .main-header > .navbar .nav > li > a,
body.medem-theme-dark.skin-black .main-header > .navbar .nav > li > a > i {
    color: var(--med-ink) !important;
}

body.medem-theme-dark.skin-black .main-header > .navbar .nav > li > a:hover,
body.medem-theme-dark.skin-black .main-header > .navbar .nav > li > a:focus,
body.medem-theme-dark.skin-black .main-header > .navbar .nav .open > a,
body.medem-theme-dark.skin-black .main-header > .navbar .nav .open > a:hover,
body.medem-theme-dark.skin-black .main-header > .navbar .nav .open > a:focus,
body.medem-theme-dark.skin-black .main-header > .navbar .nav > .active > a,
body.medem-theme-dark.skin-black .main-header > .navbar .nav > #user-profile > .dropdown-toggle:hover,
body.medem-theme-dark.skin-black .main-header > .navbar .nav > #user-profile > .dropdown-toggle:focus,
body.medem-theme-dark.skin-black .main-header > .navbar .nav > #user-profile.open > .dropdown-toggle {
    background: rgba(79, 143, 247, .14) !important;
    color: #fff !important;
}

body.medem-theme-dark .main-header .sidebar-toggle,
body.medem-theme-dark.skin-black .main-header .sidebar-toggle,
body.medem-theme-dark.skin-black .main-header > .navbar .sidebar-toggle {
    color: var(--med-ink) !important;
}

body.medem-theme-dark .medem-menu-icon span {
    background: var(--med-ink);
}

body.medem-theme-dark .medem-weather-widget {
    color: var(--med-ink);
    background: #111b26;
    border-color: #34475a;
}

body.medem-theme-dark .medem-weather-widget:hover,
body.medem-theme-dark .medem-weather-widget:focus {
    color: #fff;
    background: rgba(79, 143, 247, .14);
    border-color: rgba(79, 143, 247, .42);
    box-shadow: 0 0 0 3px rgba(79, 143, 247, .12);
}

body.medem-theme-dark .medem-weather-widget__icon {
    color: var(--med-teal);
}

body.medem-theme-dark .medem-weather-widget__temp {
    color: #DCEAFF;
}

body.medem-theme-dark .medem-weather-widget__time {
    color: var(--med-muted);
}

body.medem-theme-dark .medem-voice-briefing-button {
    color: #DCEAFF !important;
    background: rgba(79, 143, 247, .12);
    border-color: rgba(79, 143, 247, .30);
}

body.medem-theme-dark .medem-voice-briefing-button:hover,
body.medem-theme-dark .medem-voice-briefing-button:focus,
body.medem-theme-dark .medem-voice-briefing-nav.is-playing .medem-voice-briefing-button {
    color: #fff !important;
    background: #2F6FE4;
    border-color: #2F6FE4;
}

body.medem-theme-dark .medem-voice-briefing-nav.is-completed .medem-voice-briefing-button,
body.medem-theme-dark .medem-voice-briefing-nav.is-completed .medem-voice-briefing-button:disabled {
    color: #BDF3CC !important;
    background: rgba(46, 160, 80, .14);
    border-color: rgba(90, 190, 120, .35);
    box-shadow: none;
}

body.medem-theme-dark .medem-voice-briefing-popover {
    color: var(--med-ink);
    background: #101B2D;
    border-color: rgba(122, 157, 205, .28);
    box-shadow: 0 16px 38px rgba(0, 0, 0, .34);
}

body.medem-theme-dark .medem-voice-briefing-popover::before {
    border-color: rgba(122, 157, 205, .28);
}

body.medem-theme-dark .medem-voice-briefing-word {
    color: #90A4C2;
}

body.medem-theme-dark .medem-voice-briefing-word.is-bright {
    color: #F2F7FF;
}

body.medem-theme-dark .medem-voice-briefing-word.is-current {
    color: #fff;
    background: rgba(79, 143, 247, .28);
}

body.medem-theme-dark .medem-gamification-stars {
    color: #FFE0A3 !important;
    background: rgba(217, 149, 22, .13);
    border-color: rgba(255, 191, 64, .30);
}

body.medem-theme-dark .medem-gamification-stars:hover,
body.medem-theme-dark .medem-gamification-stars:focus {
    color: #FFF0CC !important;
    background: rgba(217, 149, 22, .20) !important;
    border-color: rgba(255, 191, 64, .42);
}

body.medem-theme-dark .medem-gamification-nav.open > .medem-gamification-stars {
    color: #FFF0CC !important;
    background: rgba(217, 149, 22, .20) !important;
    border-color: rgba(255, 191, 64, .42);
}

body.medem-theme-dark .medem-gamification-menu {
    color: var(--med-ink);
    background: #17212C;
    border-color: var(--med-border);
    box-shadow: 0 26px 64px rgba(0, 0, 0, .38);
}

body.medem-theme-dark .medem-gamification-menu:before {
    background: #17212C;
    border-color: var(--med-border);
}

body.medem-theme-dark .medem-gamification-menu__header {
    background: linear-gradient(90deg, rgba(217, 149, 22, .16), rgba(55, 210, 200, .05));
}

body.medem-theme-dark .medem-gamification-menu__icon,
body.medem-theme-dark .medem-gamification-event__points {
    color: #FFE0A3;
    background: rgba(217, 149, 22, .14);
    border-color: rgba(255, 191, 64, .30);
}

body.medem-theme-dark .medem-gamification-menu__stats > div,
body.medem-theme-dark .medem-gamification-event,
body.medem-theme-dark .medem-gamification-menu__empty {
    background: #121C27;
    border-color: var(--med-border);
}

body.medem-theme-dark .medem-gamification-event:hover,
body.medem-theme-dark .medem-gamification-event:focus {
    background: rgba(217, 149, 22, .11);
    border-color: rgba(255, 191, 64, .32);
}

body.medem-theme-dark .medem-gamification-award-bubble {
    color: #FFF0CC;
    background: #312815;
    border-color: rgba(255, 191, 64, .38);
    box-shadow: 0 16px 30px rgba(0, 0, 0, .32);
}

body.medem-theme-dark .medem-gamification-award-start {
    color: #FFF0CC;
    background: #312815;
    border-color: rgba(255, 191, 64, .38);
}

body.medem-theme-dark .medem-gamification-landing-badge {
    color: #121923;
    background: #FFD36B;
    border-color: #FFD36B;
}

body.medem-theme-dark .medem-weather-menu {
    color: var(--med-ink);
    background: #17212C;
    border-color: var(--med-border);
    box-shadow: 0 26px 64px rgba(0, 0, 0, .38);
}

body.medem-theme-dark .medem-weather-menu:before {
    background: #17212C;
    border-color: var(--med-border);
}

body.medem-theme-dark .medem-weather-menu__header,
body.medem-theme-dark .medem-weather-city-search,
body.medem-theme-dark .medem-weather-hour,
body.medem-theme-dark .medem-weather-day,
body.medem-theme-dark .medem-weather-menu__empty {
    background: #111B26;
    border-color: var(--med-border);
}

body.medem-theme-dark .medem-weather-city-search__bar,
body.medem-theme-dark .medem-weather-city-search__option,
body.medem-theme-dark .medem-weather-city-search__empty {
    background: #17212C;
    border-color: var(--med-border);
}

body.medem-theme-dark .medem-weather-city-search__input,
body.medem-theme-dark .medem-weather-city-search__option {
    color: var(--med-ink);
}

body.medem-theme-dark .medem-weather-city-search__option:hover,
body.medem-theme-dark .medem-weather-city-search__option:focus,
body.medem-theme-dark .medem-weather-city-search__close:hover,
body.medem-theme-dark .medem-weather-city-search__close:focus {
    background: rgba(79, 143, 247, .14);
    border-color: rgba(79, 143, 247, .36);
}

body.medem-theme-dark .medem-weather-menu__icon {
    color: var(--med-teal);
    background: rgba(55, 210, 200, .12);
    border-color: rgba(55, 210, 200, .26);
}

body.medem-theme-dark .medem-weather-menu__summary strong,
body.medem-theme-dark .medem-weather-menu__section-title,
body.medem-theme-dark .medem-weather-hour__temp,
body.medem-theme-dark .medem-weather-day__temp {
    color: var(--med-ink);
}

body.medem-theme-dark .medem-weather-menu__summary span,
body.medem-theme-dark .medem-weather-city-search__bar .fa-search,
body.medem-theme-dark .medem-weather-city-search__close,
body.medem-theme-dark .medem-weather-city-search__option span,
body.medem-theme-dark .medem-weather-city-search__empty,
body.medem-theme-dark .medem-weather-menu__status,
body.medem-theme-dark .medem-weather-hour__time,
body.medem-theme-dark .medem-weather-hour__meta,
body.medem-theme-dark .medem-weather-day__name,
body.medem-theme-dark .medem-weather-day__meta,
body.medem-theme-dark .medem-weather-menu__empty,
body.medem-theme-dark .medem-weather-source {
    color: var(--med-muted);
}

body.medem-theme-dark .medem-weather-menu__temp {
    color: #DCEAFF;
}

body.medem-theme-dark .medem-weather-hour__icon,
body.medem-theme-dark .medem-weather-day__icon {
    color: var(--med-teal);
}

body.medem-theme-dark .medem-workday-widget {
    color: var(--med-ink);
    background: #111b26;
    border-color: #34475a;
}

body.medem-theme-dark .medem-workday-widget:hover,
body.medem-theme-dark .medem-workday-widget:focus,
body.medem-theme-dark .medem-workday-nav.open .medem-workday-widget {
    color: #fff;
    background: rgba(79, 143, 247, .14);
    border-color: rgba(79, 143, 247, .42);
    box-shadow: 0 0 0 3px rgba(79, 143, 247, .12);
}

body.medem-theme-dark .medem-workday-widget__icon {
    color: var(--med-teal);
}

body.medem-theme-dark .medem-workday-widget__value {
    color: var(--med-muted);
}

body.medem-theme-dark .medem-workday-widget.has-countdown .medem-workday-widget__value {
    color: #DCEAFF;
}

body.medem-theme-dark .medem-workday-widget--vacation {
    color: #FFF0CC;
    background: rgba(217, 149, 22, .14);
    border-color: rgba(255, 191, 64, .30);
}

body.medem-theme-dark .medem-workday-widget--vacation .medem-workday-widget__icon,
body.medem-theme-dark .medem-workday-widget--vacation .medem-workday-widget__value {
    color: #FFD36B;
}

body.medem-theme-dark .medem-workday-widget--off {
    color: #C9FBF5;
    background: rgba(55, 210, 200, .10);
    border-color: rgba(55, 210, 200, .28);
}

body.medem-theme-dark .medem-workday-widget--danger {
    color: #FFE4DF;
    background: rgba(217, 99, 80, .14);
    border-color: rgba(217, 99, 80, .30);
}

body.medem-theme-dark .medem-workday-menu {
    color: var(--med-ink);
    background: #17212C;
    border-color: var(--med-border);
    box-shadow: 0 26px 64px rgba(0, 0, 0, .38);
}

body.medem-theme-dark .medem-workday-menu:before {
    background: #17212C;
    border-color: var(--med-border);
}

body.medem-theme-dark .medem-workday-menu__header,
body.medem-theme-dark .medem-workday-break,
body.medem-theme-dark .medem-workday-day,
body.medem-theme-dark .medem-workday-event,
body.medem-theme-dark .medem-workday-requests,
body.medem-theme-dark .medem-workday-menu__empty {
    background: #111B26;
    border-color: var(--med-border);
}

body.medem-theme-dark .medem-workday-menu__icon,
body.medem-theme-dark .medem-workday-day__icon,
body.medem-theme-dark .medem-workday-event__icon {
    color: var(--med-teal);
    background: rgba(55, 210, 200, .12);
    border-color: rgba(55, 210, 200, .26);
}

body.medem-theme-dark .medem-workday-menu__link {
    color: #DCEAFF;
    background: #17212C;
    border-color: var(--med-border);
}

body.medem-theme-dark .medem-workday-menu__summary strong,
body.medem-theme-dark .medem-workday-break strong,
body.medem-theme-dark .medem-workday-menu__section-title,
body.medem-theme-dark .medem-workday-day strong,
body.medem-theme-dark .medem-workday-event strong {
    color: var(--med-ink);
}

body.medem-theme-dark .medem-workday-menu__summary span,
body.medem-theme-dark .medem-workday-break span,
body.medem-theme-dark .medem-workday-day span,
body.medem-theme-dark .medem-workday-day small,
body.medem-theme-dark .medem-workday-event span,
body.medem-theme-dark .medem-workday-event small,
body.medem-theme-dark .medem-workday-requests,
body.medem-theme-dark .medem-workday-menu__empty {
    color: var(--med-muted);
}

body.medem-theme-dark .medem-workday-vacation,
body.medem-theme-dark .medem-workday-day--vacation {
    color: #FFF0CC;
    background: rgba(217, 149, 22, .14);
    border-color: rgba(255, 191, 64, .30);
}

body.medem-theme-dark .medem-workday-vacation {
    box-shadow: inset 3px 0 0 #FFD36B;
}

body.medem-theme-dark .medem-workday-vacation__icon,
body.medem-theme-dark .medem-workday-day--vacation .medem-workday-day__icon {
    color: #FFD36B;
    background: rgba(255, 211, 107, .12);
    border-color: rgba(255, 211, 107, .28);
}

body.medem-theme-dark .medem-workday-vacation__sun {
    fill: #FFD36B;
    stroke: #F6B454;
}

body.medem-theme-dark .medem-workday-vacation__trunk,
body.medem-theme-dark .medem-workday-vacation__sand {
    stroke: #FFE0A3;
}

body.medem-theme-dark .medem-workday-vacation__leaf {
    fill: #49C996;
    stroke: #C9FBF5;
}

body.medem-theme-dark .medem-workday-vacation > div > span {
    color: #FFE0A3;
}

body.medem-theme-dark .medem-workday-break__icon {
    color: #FFD36B;
    background: rgba(255, 211, 107, .12);
    border-color: rgba(255, 211, 107, .28);
}

body.medem-theme-dark .medem-workday-day {
    border-left-color: #4F8FF7;
}

body.medem-theme-dark .medem-workday-day em {
    color: #CFE0F5;
    background: rgba(79, 143, 247, .12);
    border-color: rgba(79, 143, 247, .24);
}

body.medem-theme-dark .medem-workday-day--vacation {
    border-left-color: #FFD36B;
}

body.medem-theme-dark .medem-workday-day--vacation em {
    color: #FFE0A3;
    background: rgba(255, 211, 107, .12);
    border-color: rgba(255, 211, 107, .26);
}

body.medem-theme-dark .medem-workday-day--off {
    border-left-color: var(--med-teal);
}

body.medem-theme-dark .medem-workday-day--off em {
    color: #C9FBF5;
    background: rgba(55, 210, 200, .12);
    border-color: rgba(55, 210, 200, .24);
}

body.medem-theme-dark .medem-workday-day--danger,
body.medem-theme-dark .medem-workday-day--holiday {
    border-left-color: #FF8E7C;
}

body.medem-theme-dark .medem-workday-day--danger em,
body.medem-theme-dark .medem-workday-day--holiday em {
    color: #FFE4DF;
    background: rgba(217, 99, 80, .14);
    border-color: rgba(217, 99, 80, .28);
}

body.medem-theme-dark .medem-workday-day--short {
    border-left-color: #FFD36B;
}

body.medem-theme-dark .medem-workday-day--special {
    border-left-color: #B5A6FF;
}

body.medem-theme-dark .medem-workday-day.is-past {
    color: #7F91A6;
    background: #121E2A;
    border-color: #2D3E50;
    border-left-color: #516377;
}

body.medem-theme-dark .medem-workday-day.is-past em {
    color: #91A3B7;
    background: rgba(127, 145, 166, .10);
    border-color: rgba(127, 145, 166, .22);
}

body.medem-theme-dark .medem-workday-day.is-past::after {
    background: repeating-linear-gradient(
        -45deg,
        rgba(127, 145, 166, .08) 0,
        rgba(127, 145, 166, .08) 6px,
        transparent 6px,
        transparent 12px
    );
}

body.medem-theme-dark .medem-workday-day.is-today {
    background: rgba(79, 143, 247, .10);
    border-color: rgba(79, 143, 247, .42);
    border-left-color: #4F8FF7;
    box-shadow: 0 0 0 1px rgba(79, 143, 247, .14), 0 10px 24px rgba(0, 0, 0, .18);
}

body.medem-theme-dark .medem-workday-day.is-today em {
    color: #DCEAFF;
    background: rgba(79, 143, 247, .16);
    border-color: rgba(79, 143, 247, .30);
}

body.medem-theme-dark .medem-workday-day.is-today::after {
    background: linear-gradient(
        110deg,
        transparent 0,
        transparent 34%,
        rgba(79, 143, 247, .16) 44%,
        transparent 56%,
        transparent 100%
    );
}

@media (max-width: 767px) {
    body.medem-theme-dark .medem-weather-menu,
    body.medem-theme-dark .medem-workday-menu {
        color: #E7EEF7 !important;
        background: #17212C !important;
        border-color: #304153 !important;
    }

    body.medem-theme-dark .medem-weather-menu__content,
    body.medem-theme-dark .medem-workday-menu__content {
        background: #17212C;
    }

    body.medem-theme-dark .medem-weather-menu__header,
    body.medem-theme-dark .medem-weather-hour,
    body.medem-theme-dark .medem-weather-day,
    body.medem-theme-dark .medem-weather-menu__empty,
    body.medem-theme-dark .medem-workday-menu__header,
    body.medem-theme-dark .medem-workday-day,
    body.medem-theme-dark .medem-workday-event,
    body.medem-theme-dark .medem-workday-requests,
    body.medem-theme-dark .medem-workday-menu__empty {
        background: #111B26 !important;
        border-color: #304153 !important;
    }

    body.medem-theme-dark .medem-weather-menu__section-title,
    body.medem-theme-dark .medem-weather-hour__temp,
    body.medem-theme-dark .medem-weather-day__temp,
    body.medem-theme-dark .medem-weather-menu__summary strong,
    body.medem-theme-dark .medem-workday-menu__section-title,
    body.medem-theme-dark .medem-workday-menu__summary strong,
    body.medem-theme-dark .medem-workday-day strong,
    body.medem-theme-dark .medem-workday-event strong {
        color: #E7EEF7 !important;
    }

    body.medem-theme-dark .medem-weather-menu__summary span,
    body.medem-theme-dark .medem-weather-hour__time,
    body.medem-theme-dark .medem-weather-hour__meta,
    body.medem-theme-dark .medem-weather-day__name,
    body.medem-theme-dark .medem-weather-day__meta,
    body.medem-theme-dark .medem-weather-source,
    body.medem-theme-dark .medem-workday-menu__summary span,
    body.medem-theme-dark .medem-workday-day span,
    body.medem-theme-dark .medem-workday-day small,
    body.medem-theme-dark .medem-workday-event span,
    body.medem-theme-dark .medem-workday-event small {
        color: #AEBFD3 !important;
    }

    body.medem-theme-dark .medem-weather-hour__icon,
    body.medem-theme-dark .medem-weather-day__icon,
    body.medem-theme-dark .medem-weather-menu__icon,
    body.medem-theme-dark .medem-workday-menu__icon,
    body.medem-theme-dark .medem-workday-day__icon,
    body.medem-theme-dark .medem-workday-event__icon {
        color: #37D2C8 !important;
    }
}

body.medem-theme-dark .main-sidebar,
body.medem-theme-dark.skin-black .main-sidebar,
body.medem-theme-dark.skin-black .left-side {
    background: linear-gradient(180deg, #16202B 0%, #111922 100%) !important;
    border-right-color: var(--med-border);
    box-shadow: 8px 0 24px rgba(0, 0, 0, .22);
}

body.medem-theme-dark .sidebar-menu > li > a,
body.medem-theme-dark.skin-black .sidebar-menu > li > a {
    color: var(--med-muted);
}

body.medem-theme-dark.skin-black .sidebar-menu > li > a > i,
body.medem-theme-dark.skin-black .treeview-menu > li > a > i {
    color: var(--med-primary);
}

body.medem-theme-dark .sidebar-menu > li.active > a,
body.medem-theme-dark .sidebar-menu > li > a:hover,
body.medem-theme-dark.skin-black .sidebar-menu > li:hover > a,
body.medem-theme-dark.skin-black .sidebar-menu > li.active > a {
    color: #fff;
    background: rgba(79, 143, 247, .13);
    box-shadow: inset 3px 0 0 var(--med-teal);
}

body.medem-theme-dark.skin-black .sidebar-menu > li:hover > a > i,
body.medem-theme-dark.skin-black .sidebar-menu > li.active > a > i {
    color: #fff;
}

body.medem-theme-dark.skin-black.sidebar-mini.sidebar-collapse .sidebar-menu > li:hover > a > span:not(.pull-right-container) {
    color: #fff !important;
    background: #101722 !important;
    border: 1px solid var(--med-border);
    box-shadow: 0 14px 26px rgba(0, 0, 0, .34);
}

body.medem-theme-dark .content-header > h1,
body.medem-theme-dark .content-header > h1 > small,
body.medem-theme-dark .content-header > .breadcrumb,
body.medem-theme-dark .content-header > .breadcrumb a {
    color: var(--med-ink);
}

body.medem-theme-dark .content-header > .breadcrumb > li > a,
body.medem-theme-dark .content-header > .breadcrumb > li.active {
    border: 0;
    background: transparent;
    color: var(--med-muted);
}

body.medem-theme-dark .content-header > .breadcrumb > li.active {
    color: var(--med-ink);
}

body.medem-theme-dark .content-wrapper a:not(.btn):not(.settings-tile) {
    color: #A9CCFF;
}

body.medem-theme-dark .content-wrapper a:not(.btn):not(.settings-tile):hover,
body.medem-theme-dark .content-wrapper a:not(.btn):not(.settings-tile):focus {
    color: #fff;
}

body.medem-theme-dark .box,
body.medem-theme-dark .info-box,
body.medem-theme-dark .small-box,
body.medem-theme-dark .well,
body.medem-theme-dark .table-responsive,
body.medem-theme-dark .table-board,
body.medem-theme-dark .settings-tile,
body.medem-theme-dark .news-automation-panel,
body.medem-theme-dark .news-automation-detail {
    background: var(--med-surface);
    border-color: rgba(48, 65, 83, .86);
    color: var(--med-ink);
    box-shadow: var(--med-shadow);
}

body.medem-theme-dark .news-origin-badge {
    border-color: rgba(79, 143, 247, .28);
    background: rgba(79, 143, 247, .14);
    color: var(--med-primary-dark);
}

body.medem-theme-dark .box {
    border-top-color: var(--med-teal);
}

body.medem-theme-dark .news-automation-detail--added {
    border-left-color: #00a65a;
}

body.medem-theme-dark .news-automation-detail--duplicate {
    border-left-color: #7792B5;
}

body.medem-theme-dark .news-automation-detail--old {
    border-left-color: #f0ad4e;
}

body.medem-theme-dark .news-automation-detail--ai_skipped {
    border-left-color: #8e86df;
}

body.medem-theme-dark .news-automation-detail--low_importance {
    border-left-color: #f0ad4e;
}

body.medem-theme-dark .news-automation-detail--error,
body.medem-theme-dark .news-automation-detail--unsupported {
    border-left-color: #dd4b39;
}

body.medem-theme-dark .box-header,
body.medem-theme-dark .box-body,
body.medem-theme-dark .box-footer {
    color: var(--med-ink);
}

body.medem-theme-dark .box-header.with-border,
body.medem-theme-dark .box-header.with-border.bg-fa,
body.medem-theme-dark .box-footer,
body.medem-theme-dark .form-section,
body.medem-theme-dark .user-form-section {
    background: var(--med-surface);
    border-color: var(--med-border);
}

body.medem-theme-dark .box-header.with-border.bg-fa,
body.medem-theme-dark .box-footer {
    background: var(--med-surface-soft);
}

body.medem-theme-dark .box-title,
body.medem-theme-dark .box-title-main,
body.medem-theme-dark .info-box-number,
body.medem-theme-dark .table > thead > tr > th,
body.medem-theme-dark label,
body.medem-theme-dark .control-label,
body.medem-theme-dark .dl-horizontal dt {
    color: var(--med-ink);
}

body.medem-theme-dark .text-muted,
body.medem-theme-dark .well small.text-muted,
body.medem-theme-dark .info-box-text,
body.medem-theme-dark .settings-tile__text,
body.medem-theme-dark .settings-tile__arrow,
body.medem-theme-dark .user-photo-upload__name {
    color: var(--med-muted);
}

body.medem-theme-dark .info-box-icon,
body.medem-theme-dark .settings-tile__icon,
body.medem-theme-dark .user-form-section__title .fa {
    background: rgba(79, 143, 247, .12);
    color: var(--med-primary);
    border-color: rgba(79, 143, 247, .2);
}

body.medem-theme-dark .dashboard-card {
    background: var(--med-surface);
    border-color: var(--med-border);
    box-shadow: 0 16px 30px rgba(0, 0, 0, .28);
}

body.medem-theme-dark .dashboard-card__header h3,
body.medem-theme-dark .dashboard-progress-ring strong,
body.medem-theme-dark .dashboard-task-graph__details > strong,
body.medem-theme-dark .dashboard-stat-grid strong,
body.medem-theme-dark .dashboard-next-task,
body.medem-theme-dark .dashboard-stars-events a {
    color: var(--med-ink);
}

body.medem-theme-dark .dashboard-card__header p,
body.medem-theme-dark .dashboard-card__empty,
body.medem-theme-dark .dashboard-progress-ring span,
body.medem-theme-dark .dashboard-task-graph__details > span,
body.medem-theme-dark .dashboard-stat-grid span,
body.medem-theme-dark .dashboard-next-task span,
body.medem-theme-dark .dashboard-stars-total span {
    color: var(--med-muted);
}

body.medem-theme-dark .dashboard-card__icon--tasks {
    color: #A9CCFF;
    background: rgba(79, 143, 247, .12);
    border-color: rgba(79, 143, 247, .3);
}

body.medem-theme-dark .dashboard-card__icon--vacation,
body.medem-theme-dark .dashboard-card__icon--stars {
    background: rgba(240, 165, 0, .12);
    border-color: rgba(240, 165, 0, .34);
}

body.medem-theme-dark .dashboard-progress-ring {
    background: conic-gradient(#4F8FF7 calc(var(--value) * 1%), #243346 0);
}

body.medem-theme-dark .dashboard-progress-ring::after {
    background: var(--med-surface);
    box-shadow: inset 0 0 0 1px rgba(64, 84, 109, .75);
}

body.medem-theme-dark .dashboard-task-bar,
body.medem-theme-dark .dashboard-stars-progress,
body.medem-theme-dark .dashboard-vacation-progress {
    background: #243346;
}

body.medem-theme-dark .dashboard-stat-grid div,
body.medem-theme-dark .dashboard-next-task,
body.medem-theme-dark .dashboard-stars-events a {
    background: #111B26;
    border-color: var(--med-border);
}

body.medem-theme-dark .dashboard-next-task:hover,
body.medem-theme-dark .dashboard-next-task:focus,
body.medem-theme-dark .dashboard-stars-events a:hover,
body.medem-theme-dark .dashboard-stars-events a:focus {
    color: #fff;
    border-color: rgba(79, 143, 247, .5);
}

body.medem-theme-dark .dashboard-vacation-body {
    background: rgba(240, 165, 0, .1);
    border-color: rgba(240, 165, 0, .34);
}

body.medem-theme-dark .dashboard-vacation-body strong,
body.medem-theme-dark .dashboard-stars-total strong {
    color: #FFD37A;
}

body.medem-theme-dark .dashboard-vacation-body span {
    color: #D8C196;
}

body.medem-theme-dark .dashboard-vacation-body--active {
    background: rgba(5, 184, 182, .1);
    border-color: rgba(5, 184, 182, .34);
}

body.medem-theme-dark .dashboard-vacation-body--active strong {
    color: #64E5DB;
}

body.medem-theme-dark .dashboard-vacation-body--active span {
    color: #A8CFCC;
}

body.medem-theme-dark .dashboard-stars-events span {
    color: #FFD37A;
    background: rgba(240, 165, 0, .14);
    border-color: rgba(240, 165, 0, .4);
}

body.medem-theme-dark .settings-tile {
    color: var(--med-ink);
}

body.medem-theme-dark .settings-tile:hover,
body.medem-theme-dark .settings-tile:focus {
    color: #fff;
    background: #1B2835;
    border-color: rgba(79, 143, 247, .28);
}

body.medem-theme-dark .form-control,
body.medem-theme-dark .bootstrap-select .btn.dropdown-toggle,
body.medem-theme-dark .input-group .form-control,
body.medem-theme-dark .medem-combobox__trigger,
body.medem-theme-dark .medem-combobox__search,
body.medem-theme-dark .task-employee-picker__trigger,
body.medem-theme-dark .task-employee-picker__search,
body.medem-theme-dark .user-photo-upload,
body.medem-theme-dark .default-avatar-type,
body.medem-theme-dark .default-avatar-option {
    color: var(--med-ink);
    background: #111B26;
    border-color: var(--med-border);
}

body.medem-theme-dark .form-control::placeholder,
body.medem-theme-dark .medem-combobox__value.is-placeholder,
body.medem-theme-dark .medem-combobox__search::placeholder,
body.medem-theme-dark .task-employee-picker__value.is-placeholder strong,
body.medem-theme-dark .task-employee-picker__search::placeholder {
    color: #7F90A2;
}

body.medem-theme-dark .form-control:focus,
body.medem-theme-dark .medem-combobox__trigger:hover,
body.medem-theme-dark .medem-combobox__trigger:focus,
body.medem-theme-dark .medem-combobox__search:focus,
body.medem-theme-dark .task-employee-picker__trigger:hover,
body.medem-theme-dark .task-employee-picker__trigger:focus,
body.medem-theme-dark .task-employee-picker__search:focus {
    border-color: rgba(79, 143, 247, .54);
    box-shadow: 0 0 0 3px rgba(79, 143, 247, .14);
}

body.medem-theme-dark .medem-combobox__dropdown,
body.medem-theme-dark .task-employee-picker__dropdown,
body.medem-theme-dark .dropdown-menu {
    background: #17212C;
    border-color: var(--med-border);
    box-shadow: 0 20px 44px rgba(0, 0, 0, .34);
}

body.medem-theme-dark .medem-combobox__option,
body.medem-theme-dark .task-employee-picker__option {
    color: var(--med-ink);
}

body.medem-theme-dark .medem-combobox__option:hover,
body.medem-theme-dark .medem-combobox__option:focus,
body.medem-theme-dark .medem-combobox__option.is-selected,
body.medem-theme-dark .medem-combobox__group-title:hover,
body.medem-theme-dark .medem-combobox__group-title:focus,
body.medem-theme-dark .task-employee-picker__option:hover,
body.medem-theme-dark .task-employee-picker__option:focus,
body.medem-theme-dark .task-employee-picker__option.is-selected,
body.medem-theme-dark .default-avatar-type:hover,
body.medem-theme-dark .default-avatar-type:focus,
body.medem-theme-dark .default-avatar-type.is-active {
    color: #fff;
    background: rgba(79, 143, 247, .16);
    border-color: rgba(79, 143, 247, .36);
}

body.medem-theme-dark .medem-combobox__group-title,
body.medem-theme-dark .task-employee-picker__value small,
body.medem-theme-dark .task-employee-picker__option small {
    color: #A9B8C9;
}

body.medem-theme-dark .medem-combobox__group,
body.medem-theme-dark .task-employee-picker__group {
    border-color: var(--med-border);
}

body.medem-theme-dark .medem-combobox__group-title,
body.medem-theme-dark .task-employee-picker__group-toggle,
body.medem-theme-dark .medem-combobox__multi-footer,
body.medem-theme-dark .task-employee-picker__empty {
    color: #DCEAFF;
    background: #111B26;
    border-color: var(--med-border);
}

body.medem-theme-dark .medem-combobox__group-title b,
body.medem-theme-dark .task-employee-picker__group-toggle b,
body.medem-theme-dark .task-employee-picker__option--empty {
    color: #A9B8C9;
    background: #17212C;
    border-color: var(--med-border);
}

body.medem-theme-dark .table > thead > tr > th {
    background: #1B2734;
    border-color: var(--med-border);
    color: #DCEAFF;
    text-shadow: none;
    background-image: none;
    box-shadow: none;
}

body.medem-theme-dark .table > thead > tr > th:hover {
    background: #223245;
    background-image: none;
}

body.medem-theme-dark .table-sort,
body.medem-theme-dark .table-sort:hover,
body.medem-theme-dark .table-sort:focus,
body.medem-theme-dark .table-sort.is-active,
body.medem-theme-dark .table-sort .fa {
    text-shadow: none;
}

body.medem-theme-dark .table > tbody > tr > td,
body.medem-theme-dark .table > tbody > tr > th,
body.medem-theme-dark .table > tfoot > tr > td,
body.medem-theme-dark .table > tfoot > tr > th {
    background: #17212C !important;
    border-color: var(--med-border);
    color: var(--med-ink);
}

body.medem-theme-dark .table-striped > tbody > tr:nth-of-type(odd) > td,
body.medem-theme-dark .table-striped > tbody > tr:nth-of-type(odd) > th {
    background: #1A2633 !important;
}

body.medem-theme-dark .table-hover > tbody > tr:hover > td,
body.medem-theme-dark .table-hover > tbody > tr:hover > th {
    background: #1F3142 !important;
}

body.medem-theme-dark .btn-default,
body.medem-theme-dark button.btn-default,
body.medem-theme-dark .bootstrap-select .btn.dropdown-toggle,
body.medem-theme-dark .bg-grey-gradient,
body.medem-theme-dark .user-photo-upload__button--gallery {
    background: #111B26 !important;
    color: #DCEAFF !important;
    border-color: var(--med-border) !important;
    box-shadow: none !important;
}

body.medem-theme-dark .btn-default:hover,
body.medem-theme-dark button.btn-default:hover,
body.medem-theme-dark .btn-default:focus,
body.medem-theme-dark button.btn-default:focus,
body.medem-theme-dark .bootstrap-select .btn.dropdown-toggle:hover,
body.medem-theme-dark .bg-grey-gradient:hover,
body.medem-theme-dark .bg-grey-gradient:focus,
body.medem-theme-dark .user-photo-upload__button--gallery:hover,
body.medem-theme-dark .user-photo-upload__button--gallery:focus {
    background: rgba(79, 143, 247, .18) !important;
    border-color: rgba(79, 143, 247, .42) !important;
    color: #fff !important;
    box-shadow: 0 0 0 3px rgba(79, 143, 247, .12) !important;
}

body.medem-theme-dark .btn-success,
body.medem-theme-dark .btn-primary {
    background: #2F6FE4 !important;
    border-color: #2F6FE4 !important;
    color: #fff !important;
}

body.medem-theme-dark .btn-success:hover,
body.medem-theme-dark .btn-primary:hover,
body.medem-theme-dark .btn-success:focus,
body.medem-theme-dark .btn-primary:focus {
    background: #245EC6 !important;
    border-color: #245EC6 !important;
    color: #fff !important;
}

body.medem-theme-dark .label-default,
body.medem-theme-dark .id-hash,
body.medem-theme-dark code {
    background: rgba(79, 143, 247, .16);
    color: #DCEAFF;
}

body.medem-theme-dark .medem-copy-toast {
    background: #DCEAFF;
    color: #0F151D;
    box-shadow: 0 14px 28px rgba(0, 0, 0, .34);
}

body.medem-theme-dark .top-user-avatar,
body.medem-theme-dark .user-avatar {
    background: #111B26;
    border-color: var(--med-border);
}

body.medem-theme-dark.skin-black .navbar-nav > #user-profile.user-menu > .dropdown-menu {
    background: rgba(23, 33, 44, .98);
    border-color: var(--med-border);
    box-shadow: 0 26px 64px rgba(0, 0, 0, .38);
}

body.medem-theme-dark.skin-black .navbar-nav > #user-profile.user-menu > .dropdown-menu:before {
    background: rgba(23, 33, 44, .98);
    border-color: var(--med-border);
}

body.medem-theme-dark.skin-black .navbar-nav > #user-profile.user-menu > .dropdown-menu > .user-header {
    background: linear-gradient(180deg, #17212C 0%, #1E2B39 100%);
    border-color: var(--med-border);
    color: var(--med-ink);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .03);
}

body.medem-theme-dark.skin-black .navbar-nav > #user-profile.user-menu > .dropdown-menu > .user-header > .user-menu-name {
    color: var(--med-ink);
}

body.medem-theme-dark .user-menu-email {
    color: var(--med-muted);
}

body.medem-theme-dark .user-menu-detail {
    color: var(--med-muted);
}

body.medem-theme-dark .user-menu-detail strong {
    color: var(--med-ink);
}

body.medem-theme-dark .settings-note,
body.medem-theme-dark .settings-task-archive,
body.medem-theme-dark .task-ai-card__editor,
body.medem-theme-dark .task-ai-card__preview,
body.medem-theme-dark .task-ai-card__preview-grid > div,
body.medem-theme-dark .task-ai-card__empty,
body.medem-theme-dark .task-filter-panel,
body.medem-theme-dark .task-facts > div,
body.medem-theme-dark .task-clarification-question,
body.medem-theme-dark .task-comment--clarification-request,
body.medem-theme-dark .task-comment--clarification-response,
body.medem-theme-dark .task-comment__meta small,
body.medem-theme-dark .task-attachment,
body.medem-theme-dark .task-deadline-panel,
body.medem-theme-dark .task-deadline-empty,
body.medem-theme-dark .task-upload-control,
body.medem-theme-dark .task-upload-file,
body.medem-theme-dark .task-upload-hints span,
body.medem-theme-dark .task-deadline-warning,
body.medem-theme-dark .task-participants-note,
body.medem-theme-dark .task-deadline-mode-picker__option,
body.medem-theme-dark .task-rich-editor,
body.medem-theme-dark .task-rich-editor__toolbar,
body.medem-theme-dark .task-rich-editor__area,
body.medem-theme-dark .task-kanban__column,
body.medem-theme-dark .task-kanban__empty,
body.medem-theme-dark .task-calendar-unscheduled__header,
body.medem-theme-dark .task-calendar__weekday,
body.medem-theme-dark .task-calendar__cell--empty {
    background: #111B26;
    border-color: var(--med-border);
    color: var(--med-muted);
}

body.medem-theme-dark .news-source-settings-card {
    background: #111B26;
    border-color: var(--med-border);
}

body.medem-theme-dark .news-source-settings-card__meta {
    border-color: var(--med-border);
}

body.medem-theme-dark .news-source-settings-card__schedule {
    background: rgba(79, 143, 247, .10);
    border-color: rgba(79, 143, 247, .20);
}

body.medem-theme-dark .gigachat-shell,
body.medem-theme-dark .gigachat-composer,
body.medem-theme-dark .gigachat-message__bubble,
body.medem-theme-dark .gigachat-statistics,
body.medem-theme-dark .gigachat-statistics-card,
body.medem-theme-dark .gigachat-statistics__status {
    background: #111B26;
    border-color: var(--med-border);
    color: var(--med-ink);
}

body.medem-theme-dark .gigachat-statistics {
    background: #17212C;
}

body.medem-theme-dark .gigachat-statistics__head {
    border-color: var(--med-border);
}

body.medem-theme-dark .gigachat-statistics-card span {
    color: #DCEAFF;
}

body.medem-theme-dark .gigachat-statistics__hint {
    color: #FFE0A3;
    background: rgba(217, 149, 22, .14);
    border-color: rgba(255, 191, 64, .30);
}

body.medem-theme-dark .gigachat-thread {
    background: linear-gradient(180deg, rgba(55, 120, 255, .08), rgba(17, 27, 38, 0));
}

body.medem-theme-dark .task-ai-card {
    background: linear-gradient(135deg, rgba(17, 27, 38, .98), rgba(20, 35, 52, .98));
    border-color: var(--med-border);
}

body.medem-theme-dark .task-ai-card__icon {
    color: #8FB8FF;
    background: rgba(79, 143, 247, .14);
    border-color: rgba(79, 143, 247, .24);
}

body.medem-theme-dark .gigachat-message__avatar {
    background: rgba(55, 120, 255, .14);
    border-color: rgba(82, 146, 255, .22);
}

body.medem-theme-dark .gigachat-message--user .gigachat-message__avatar,
body.medem-theme-dark .gigachat-message--user .gigachat-message__bubble {
    color: #DDF8EC;
    background: rgba(27, 112, 82, .18);
    border-color: rgba(72, 180, 135, .24);
}

body.medem-theme-dark .gigachat-message--error .gigachat-message__avatar,
body.medem-theme-dark .gigachat-message--error .gigachat-message__bubble {
    color: #FFD7D7;
    background: rgba(154, 52, 52, .18);
    border-color: rgba(235, 120, 120, .24);
}

body.medem-theme-dark .settings-note strong,
body.medem-theme-dark .settings-task-archive strong,
body.medem-theme-dark .task-ai-card__head h3,
body.medem-theme-dark .task-ai-card__preview-main strong,
body.medem-theme-dark .task-ai-card__preview-grid strong,
body.medem-theme-dark .task-description,
body.medem-theme-dark .task-calendar-picker__nav strong,
body.medem-theme-dark .task-calendar-picker__day,
body.medem-theme-dark .task-deadline-empty strong,
body.medem-theme-dark .task-upload-file,
body.medem-theme-dark .task-facts > div > strong,
body.medem-theme-dark .task-clarification-question p,
body.medem-theme-dark .task-comment__meta strong,
body.medem-theme-dark .task-comment__body,
body.medem-theme-dark .task-rich-editor__area,
body.medem-theme-dark .task-rich-editor__toolbar button,
body.medem-theme-dark .task-rich-editor__toolbar select,
body.medem-theme-dark .task-history__item p,
body.medem-theme-dark .task-comment__quote p,
body.medem-theme-dark .task-kanban__column header,
body.medem-theme-dark .task-kanban-card,
body.medem-theme-dark .task-calendar__cell,
body.medem-theme-dark .task-calendar-task {
    color: var(--med-ink);
}

body.medem-theme-dark .task-description {
    border-left-color: rgba(79, 143, 247, .76);
}

body.medem-theme-dark .task-facts > div > span {
    color: #8EA0B6;
}

body.medem-theme-dark .settings-task-archive p,
body.medem-theme-dark .settings-task-archive label span {
    color: var(--med-muted);
}

body.medem-theme-dark .task-facts > div > strong {
    color: #DCE6F1;
}

body.medem-theme-dark .task-facts .task-execution-fact__label {
    color: #8EA0B6;
}

body.medem-theme-dark .task-facts .task-execution-fact__value,
body.medem-theme-dark .task-facts .task-execution-fact__value .task-user-list,
body.medem-theme-dark .task-facts .task-execution-fact__value .task-user-list__item {
    color: #DCE6F1;
}

body.medem-theme-dark .task-score-label {
    color: #FFE0A3;
    background: rgba(217, 149, 22, .13);
    border-color: rgba(255, 191, 64, .28);
}

body.medem-theme-dark .task-score-label .fa,
body.medem-theme-dark .task-score-icon {
    color: #FFCF73;
}

body.medem-theme-dark .gamification-toggle,
body.medem-theme-dark .gamification-period-preview,
body.medem-theme-dark .gamification-rules div {
    background: #111B26;
    border-color: var(--med-border);
}

body.medem-theme-dark .gamification-settings__note strong,
body.medem-theme-dark .gamification-rules strong {
    color: #DCEAFF;
}

body.medem-theme-dark .task-comment__quote {
    background: var(--med-surface);
    border-color: var(--med-border);
}

body.medem-theme-dark .task-comment--attention {
    background: rgba(55, 210, 200, .08);
    border-left-color: var(--med-coral-hover);
}

body.medem-theme-dark .task-comment__meta .task-comment__attention-label {
    color: #FFE4DF;
    background: rgba(217, 99, 80, .16);
    border-color: rgba(217, 99, 80, .34);
}

body.medem-theme-dark .task-comment-mentions strong,
body.medem-theme-dark .task-mention-option:hover,
body.medem-theme-dark .task-mention-option:focus,
body.medem-theme-dark .task-mention-chip {
    color: #DCEAFF;
}

body.medem-theme-dark .task-comment-mentions i {
    color: var(--med-teal);
}

body.medem-theme-dark .task-mention-picker {
    background: #111B26;
    border-color: var(--med-border);
    box-shadow: 0 16px 32px rgba(0, 0, 0, .34);
}

body.medem-theme-dark .task-mention-option {
    color: var(--med-ink);
}

body.medem-theme-dark .task-mention-option:hover,
body.medem-theme-dark .task-mention-option:focus {
    background: rgba(79, 143, 247, .14);
}

body.medem-theme-dark .task-mention-chip {
    background: rgba(79, 143, 247, .16);
    border-color: rgba(79, 143, 247, .3);
}

body.medem-theme-dark .task-assignee-calendar-warning,
body.medem-theme-dark .user-work-calendar-panel,
body.medem-theme-dark .medem-date-range-picker,
body.medem-theme-dark .medem-date-range-picker__summary span,
body.medem-theme-dark .medem-date-range-picker__month,
body.medem-theme-dark .medem-date-range-picker__day,
body.medem-theme-dark .medem-datetime-picker,
body.medem-theme-dark .medem-datetime-picker__day,
body.medem-theme-dark .production-calendar__top,
body.medem-theme-dark .production-employee-filters,
body.medem-theme-dark .production-calendar-stats > div,
body.medem-theme-dark .production-month,
body.medem-theme-dark .production-side-panel .box,
body.medem-theme-dark .production-day,
body.medem-theme-dark .production-employee-card,
body.medem-theme-dark .production-list-row,
body.medem-theme-dark .production-event-attachment a,
body.medem-theme-dark .production-event-history div,
body.medem-theme-dark .production-event-editor form,
body.medem-theme-dark .production-duty-card,
body.medem-theme-dark .production-cycle-days label,
body.medem-theme-dark .production-user-day {
    background: #111B26;
    border-color: var(--med-border);
    color: var(--med-ink);
}

body.medem-theme-dark .production-calendar-tabs {
    border-bottom-color: var(--med-border);
}

body.medem-theme-dark .production-calendar-tabs > li > a {
    color: #BFD3EC !important;
    background: transparent;
    border-color: transparent;
    border-radius: 4px 4px 0 0;
    font-weight: 600;
    transition: color .16s ease, background-color .16s ease, border-color .16s ease, box-shadow .16s ease;
}

body.medem-theme-dark .production-calendar-tabs > li > a .fa {
    color: inherit;
}

body.medem-theme-dark .production-calendar-tabs > li > a:hover,
body.medem-theme-dark .production-calendar-tabs > li > a:focus {
    color: #EAF3FF !important;
    background: rgba(79, 143, 247, .12);
    border-color: rgba(79, 143, 247, .28);
    border-bottom-color: transparent;
    box-shadow: inset 0 -2px 0 rgba(55, 210, 200, .55);
}

body.medem-theme-dark .production-calendar-tabs > li.active > a,
body.medem-theme-dark .production-calendar-tabs > li.active > a:hover,
body.medem-theme-dark .production-calendar-tabs > li.active > a:focus {
    color: #FFFFFF !important;
    background: #172536;
    border-color: var(--med-border);
    border-bottom-color: #172536;
    box-shadow: inset 0 3px 0 var(--med-teal);
}

.production-calendar-tabs--dark {
    border-bottom-color: #33445A;
}

.production-calendar-tabs--dark > li > a {
    color: #BFD3EC !important;
    background: transparent !important;
    border-color: transparent !important;
}

.production-calendar-tabs--dark > li > a:hover,
.production-calendar-tabs--dark > li > a:focus {
    color: #EAF3FF !important;
    background: rgba(79, 143, 247, .12) !important;
    border-color: rgba(79, 143, 247, .28) !important;
    border-bottom-color: transparent !important;
    box-shadow: inset 0 -2px 0 #37D2C8;
}

.production-calendar-tabs--dark > li.active > a,
.production-calendar-tabs--dark > li.active > a:hover,
.production-calendar-tabs--dark > li.active > a:focus {
    color: #FFFFFF !important;
    background: #172536 !important;
    border-color: #33445A !important;
    border-bottom-color: #172536 !important;
    box-shadow: inset 0 3px 0 #37D2C8;
}

body.medem-theme-dark .production-day--weekend,
body.medem-theme-dark .production-user-day--weekend {
    background: rgba(142, 160, 182, .08);
}

body.medem-theme-dark .production-day--holiday,
body.medem-theme-dark .production-user-day--holiday,
body.medem-theme-dark .production-status--sick,
body.medem-theme-dark .production-status--holiday {
    color: #FFE4DF;
    background: rgba(217, 99, 80, .16);
}

body.medem-theme-dark .production-day--short,
body.medem-theme-dark .production-user-day--short,
body.medem-theme-dark .production-status--short {
    color: #FFE7B8;
    background: rgba(246, 180, 84, .14);
}

body.medem-theme-dark .production-day--special,
body.medem-theme-dark .production-user-day--special,
body.medem-theme-dark .production-status--special {
    color: #E9DFFF;
    background: rgba(122, 91, 199, .16);
}

body.medem-theme-dark .production-day em {
    color: #E9DFFF;
    background: rgba(122, 91, 199, .24);
    border-color: rgba(122, 91, 199, .42);
}

body.medem-theme-dark .production-calendar__top h2,
body.medem-theme-dark .medem-date-range-picker__top strong,
body.medem-theme-dark .medem-date-range-picker__month h4,
body.medem-theme-dark .medem-datetime-picker__nav strong,
body.medem-theme-dark .production-calendar-stats strong,
body.medem-theme-dark .production-month h3,
body.medem-theme-dark .production-employee-card strong,
body.medem-theme-dark .production-list-row strong,
body.medem-theme-dark .production-duty-card strong,
body.medem-theme-dark .production-user-day strong,
body.medem-theme-dark .production-event-attachment a,
body.medem-theme-dark .user-work-calendar-panel strong {
    color: var(--med-ink);
}

body.medem-theme-dark .production-calendar__top p,
body.medem-theme-dark .medem-date-range-picker__summary b,
body.medem-theme-dark .medem-date-range-picker__summary small,
body.medem-theme-dark .medem-date-range-picker__weekdays span,
body.medem-theme-dark .medem-datetime-picker__weekdays span,
body.medem-theme-dark .medem-datetime-picker__time label,
body.medem-theme-dark .production-calendar-user-header__status,
body.medem-theme-dark .production-calendar-stats span,
body.medem-theme-dark .production-month__weekdays,
body.medem-theme-dark .production-employee-card span,
body.medem-theme-dark .production-employee-card small,
body.medem-theme-dark .production-list-row small,
body.medem-theme-dark .production-event-history span,
body.medem-theme-dark .production-event-history em,
body.medem-theme-dark .production-event-history small,
body.medem-theme-dark .production-duty-card span,
body.medem-theme-dark .production-duty-card small,
body.medem-theme-dark .production-user-day small,
body.medem-theme-dark .user-work-calendar-panel__label {
    color: var(--med-muted);
}

body.medem-theme-dark .medem-date-range-picker__nav {
    color: #DCEAFF;
    background: #111B26;
    border-color: var(--med-border);
}

body.medem-theme-dark .production-event-history summary,
body.medem-theme-dark .production-event-editor summary {
    color: #DCEAFF;
    background: rgba(79, 143, 247, .14);
    border-color: rgba(79, 143, 247, .28);
}

body.medem-theme-dark .medem-datetime-picker__nav button {
    color: #DCEAFF;
    background: #111B26;
    border-color: var(--med-border);
}

body.medem-theme-dark .medem-datetime-trigger {
    color: var(--med-ink);
    background: #17212C;
    border-color: var(--med-border);
}

body.medem-theme-dark .medem-datetime-trigger.is-empty {
    color: var(--med-muted);
}

body.medem-theme-dark .medem-datetime-trigger.has-error {
    border-color: rgba(221, 70, 54, .42);
    box-shadow: 0 0 0 2px rgba(221, 70, 54, .13);
}

body.medem-theme-dark .medem-datetime-trigger .fa {
    color: #DCEAFF;
}

body.medem-theme-dark .medem-datetime-popover.is-open .medem-datetime-trigger {
    border-color: rgba(79, 143, 247, .42);
    box-shadow: 0 0 0 2px rgba(79, 143, 247, .13);
}

body.medem-theme-dark .medem-datetime-picker--popover {
    box-shadow: 0 18px 42px rgba(0, 0, 0, .34);
}

body.medem-theme-dark .medem-date-range-picker__nav:hover,
body.medem-theme-dark .medem-date-range-picker__nav:focus,
body.medem-theme-dark .medem-datetime-picker__nav button:hover,
body.medem-theme-dark .medem-datetime-picker__nav button:focus {
    color: #fff;
    background: rgba(79, 143, 247, .14);
    border-color: rgba(79, 143, 247, .34);
}

body.medem-theme-dark .medem-date-range-picker__summary strong {
    color: #DCEAFF;
}

body.medem-theme-dark .medem-date-range-picker__day.is-in-range {
    color: #DCEAFF;
    background: rgba(79, 143, 247, .18);
    border-color: rgba(79, 143, 247, .30);
}

body.medem-theme-dark .task-calendar-picker__day.is-production-weekend:not(.is-selected),
body.medem-theme-dark .medem-date-range-picker__day.is-production-weekend:not(.is-range-start):not(.is-range-end),
body.medem-theme-dark .medem-datetime-picker__day.is-production-weekend:not(.is-selected) {
    color: #A9B8C9;
    background: rgba(142, 160, 182, .12);
}

body.medem-theme-dark .task-calendar-picker__day.is-production-holiday:not(.is-selected),
body.medem-theme-dark .medem-date-range-picker__day.is-production-holiday:not(.is-range-start):not(.is-range-end),
body.medem-theme-dark .medem-datetime-picker__day.is-production-holiday:not(.is-selected) {
    color: #FFE4DF;
    background: rgba(217, 99, 80, .16);
}

body.medem-theme-dark .task-calendar-picker__day.is-production-short:not(.is-selected),
body.medem-theme-dark .medem-date-range-picker__day.is-production-short:not(.is-range-start):not(.is-range-end),
body.medem-theme-dark .medem-datetime-picker__day.is-production-short:not(.is-selected) {
    color: #FFE7B8;
    background: rgba(246, 180, 84, .15);
}

body.medem-theme-dark .task-calendar-picker__day.is-production-special:not(.is-selected),
body.medem-theme-dark .medem-date-range-picker__day.is-production-special:not(.is-range-start):not(.is-range-end),
body.medem-theme-dark .medem-datetime-picker__day.is-production-special:not(.is-selected) {
    color: #E9DFFF;
    background: rgba(122, 91, 199, .18);
}

body.medem-theme-dark .task-calendar__cell--production-weekend {
    background: rgba(142, 160, 182, .10);
}

body.medem-theme-dark .task-calendar__cell--production-holiday {
    background: rgba(217, 99, 80, .12);
    border-color: rgba(217, 99, 80, .24);
}

body.medem-theme-dark .task-calendar__cell--production-short {
    background: rgba(246, 180, 84, .12);
    border-color: rgba(246, 180, 84, .26);
}

body.medem-theme-dark .task-calendar__cell--production-special {
    background: rgba(122, 91, 199, .14);
    border-color: rgba(122, 91, 199, .28);
}

body.medem-theme-dark .task-calendar__day-info {
    color: #A9B8C9;
}

body.medem-theme-dark .task-kanban__column header,
body.medem-theme-dark .task-kanban-card,
body.medem-theme-dark .task-kanban-modal__dialog,
body.medem-theme-dark .task-kanban-modal__footer,
body.medem-theme-dark .task-calendar-unscheduled,
body.medem-theme-dark .task-calendar__cell {
    background: var(--med-surface);
    border-color: var(--med-border);
}

body.medem-theme-dark .task-kanban__column.is-dragover {
    background: rgba(79, 143, 247, .14);
    border-color: rgba(79, 143, 247, .36);
}

body.medem-theme-dark .task-kanban-card__title,
body.medem-theme-dark .task-kanban-modal__header h3 {
    color: var(--med-ink);
}

body.medem-theme-dark .task-kanban-modal__backdrop {
    background: rgba(2, 8, 14, .68);
}

body.medem-theme-dark .task-kanban-modal__close {
    color: var(--med-muted);
    background: #17212C;
    border-color: var(--med-border);
}

body.medem-theme-dark .task-calendar-picker__nav button,
body.medem-theme-dark .task-calendar-picker__day,
body.medem-theme-dark .task-priority-picker__option,
body.medem-theme-dark .task-deadline-mode-picker__option,
body.medem-theme-dark .task-rich-editor__toolbar button,
body.medem-theme-dark .task-rich-editor__toolbar select {
    background: #17212C;
    border-color: var(--med-border);
}

body.medem-theme-dark .task-upload-control.is-dragover,
body.medem-theme-dark .task-calendar-picker__day.is-today {
    background: rgba(79, 143, 247, .16);
    border-color: rgba(79, 143, 247, .34);
}

body.medem-theme-dark .task-calendar-picker__day.is-before-min:not(.is-selected),
body.medem-theme-dark .medem-datetime-picker__day.is-before-min:not(.is-selected),
body.medem-theme-dark .task-deadline-warning {
    color: #FFB9AD;
    background: rgba(221, 70, 54, .13);
    border-color: rgba(221, 70, 54, .3);
}

body.medem-theme-dark .medem-datetime-picker__warning {
    color: #FFD2CB;
    background: rgba(221, 70, 54, .13);
    border-color: rgba(221, 70, 54, .30);
}

body.medem-theme-dark .medem-datetime-picker__warning i {
    color: #FF8D7E;
}

body.medem-theme-dark .task-deadline-warning i {
    color: #FF8D7E;
}

body.medem-theme-dark .task-deadline-warning span {
    color: #FFD2CB;
}

body.medem-theme-dark .task-calendar-picker__day.is-selected,
body.medem-theme-dark .task-priority-picker__input:checked + .task-priority-picker__option--normal {
    color: #fff;
    background: #2F6FE4;
    border-color: #2F6FE4;
}

body.medem-theme-dark .task-deadline-mode-picker__input:checked + .task-deadline-mode-picker__option--soft {
    color: #fff;
    background: #2F7D62;
    border-color: #2F7D62;
}

body.medem-theme-dark .task-deadline-mode-picker__input:checked + .task-deadline-mode-picker__option--strict {
    color: #fff;
    background: #B97714;
    border-color: #B97714;
}

body.medem-theme-dark .task-form-lock-overlay {
    background: rgba(15, 21, 29, .62);
}

body.medem-theme-dark .task-form-lock-card {
    color: var(--med-ink);
    background: rgba(23, 33, 44, .92);
    border-color: var(--med-border);
    box-shadow: 0 18px 46px rgba(0, 0, 0, .28);
}

body.medem-theme-dark .task-badge--default,
body.medem-theme-dark .task-priority--primary,
body.medem-theme-dark .task-calendar-unscheduled__item,
body.medem-theme-dark .task-calendar-task {
    color: #DCEAFF;
    background: rgba(79, 143, 247, .14);
    border-color: rgba(79, 143, 247, .28);
}

body.medem-theme-dark .task-public-id {
    color: #DCEAFF;
    background: rgba(79, 143, 247, .12);
    border-color: rgba(79, 143, 247, .24);
}

body.medem-theme-dark .task-badge--success {
    color: #B8F1DD;
    background: rgba(34, 197, 94, .12);
    border-color: rgba(34, 197, 94, .24);
}

body.medem-theme-dark .task-badge--warning,
body.medem-theme-dark .task-priority--warning {
    color: #FFE0A3;
    background: rgba(245, 158, 11, .14);
    border-color: rgba(245, 158, 11, .28);
}

body.medem-theme-dark .task-badge--danger,
body.medem-theme-dark .task-priority--danger,
body.medem-theme-dark .task-overdue-label {
    color: #FFC4B8;
    background: rgba(216, 90, 69, .16);
    border-color: rgba(216, 90, 69, .32);
}

body.medem-theme-dark .task-archive-label {
    color: #DCE6F1;
    background: rgba(142, 160, 182, .12);
    border-color: rgba(142, 160, 182, .28);
}

body.medem-theme-dark .task-badge--muted,
body.medem-theme-dark .task-priority--muted {
    color: var(--med-muted);
    background: #111B26;
    border-color: var(--med-border);
}

body.medem-theme-dark .task-calendar-task,
body.medem-theme-dark .task-calendar-unscheduled__item,
body.medem-theme-dark .task-kanban-card {
    border-left-color: var(--task-status-color);
}

body.medem-theme-dark .task-calendar-task,
body.medem-theme-dark .task-calendar-unscheduled__item {
    border-right-color: var(--task-priority-color);
}

body.medem-theme-dark .id-hash.user-menu-id {
    color: rgba(220, 234, 255, .64);
    background: rgba(15, 21, 29, .38);
    border-color: rgba(79, 143, 247, .16);
}

body.medem-theme-dark .id-hash.user-menu-id:hover,
body.medem-theme-dark .id-hash.user-menu-id:focus {
    color: #DCEAFF;
    background: rgba(79, 143, 247, .14);
    border-color: rgba(79, 143, 247, .34);
    box-shadow: 0 0 0 2px rgba(79, 143, 247, .12);
}

body.medem-theme-dark.skin-black .navbar-nav > #user-profile.user-menu > .dropdown-menu > .user-footer .btn {
    background: #111B26 !important;
    color: #DCEAFF !important;
    border-color: var(--med-border) !important;
    box-shadow: none !important;
}

body.medem-theme-dark.skin-black .navbar-nav > #user-profile.user-menu > .dropdown-menu > .user-footer .btn:hover,
body.medem-theme-dark.skin-black .navbar-nav > #user-profile.user-menu > .dropdown-menu > .user-footer .btn:focus {
    background: rgba(79, 143, 247, .18) !important;
    color: #fff !important;
    border-color: rgba(79, 143, 247, .42) !important;
}

body.medem-theme-dark .pagination > li > a,
body.medem-theme-dark .pagination > li > span {
    color: var(--med-primary-dark);
    background: #111B26;
    border-color: var(--med-border);
}

body.medem-theme-dark .pagination > .active > a,
body.medem-theme-dark .pagination > .active > span,
body.medem-theme-dark .pagination > li > a:hover {
    color: #fff;
    background: var(--med-primary);
    border-color: var(--med-primary);
}

body.medem-theme-dark .alert-success {
    color: #D9FFF9;
    background: rgba(55, 210, 200, .14);
    border-color: rgba(55, 210, 200, .28);
}

body.medem-theme-dark .alert-danger {
    color: #FFE4DF;
    background: rgba(217, 99, 80, .15);
    border-color: rgba(217, 99, 80, .34);
}

@media (max-width: 1399px) {
    .task-filter-panel {
        grid-template-columns: 1fr;
    }

    .task-filter-panel__grid {
        grid-template-columns: repeat(6, minmax(120px, 1fr));
    }

    .task-form-bottom {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1199px) {
    .user-form-grid--4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .user-form-grid--3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .task-form-composer,
    .task-form-bottom {
        grid-template-columns: 1fr;
    }

    .task-deadline-panel {
        max-width: 420px;
    }

    .gamification-settings__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .gamification-rules {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 899px) {
    .task-ai-card__editor {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .task-ai-card__preview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .task-filter-panel__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .crm-auth-page {
        padding: 18px 12px;
    }

    .crm-auth__panel {
        grid-template-columns: 1fr;
        border-radius: 16px;
    }

    .crm-auth__intro,
    .crm-auth__form {
        padding: 28px 22px;
    }

    .crm-auth__title {
        font-size: 31px;
    }

    .crm-error-shell {
        width: calc(100% - 20px);
        padding: 10px 0 24px;
    }

    .crm-error-header,
    .crm-error-summary,
    .crm-error-panel__head {
        align-items: flex-start;
        flex-direction: column;
    }

    .crm-error-header__meta {
        justify-content: flex-start;
    }

    .crm-error-summary,
    .crm-error-grid {
        grid-template-columns: 1fr;
    }

    .crm-error-summary {
        padding: 16px;
    }

    .crm-error-summary h1 {
        font-size: 23px;
    }

    .crm-error-summary__status {
        justify-items: start;
        text-align: left;
    }

    .crm-error-panel__head span {
        text-align: left;
    }

    .crm-error-code__line {
        grid-template-columns: 48px minmax(560px, 1fr);
    }

    .crm-error-trace__item summary {
        grid-template-columns: 30px minmax(0, 1fr);
    }

    .crm-error-trace__item summary em {
        grid-column: 2;
    }

    .crm-error-trace__item pre {
        padding-left: 12px;
    }

    .content-header {
        display: flex;
        flex-direction: column;
        gap: 8px;
        padding: 12px 12px 0;
    }

    .content-header > h1 {
        order: 2;
        width: 100%;
        min-width: 0;
        flex: 0 1 auto;
        font-size: 22px;
        line-height: 1.18;
    }

    .content-header > h1 > small {
        margin-left: 4px;
        padding-left: 0;
        font-size: 13px;
    }

    .content-header > .breadcrumb {
        position: static;
        order: 1;
        width: 100%;
        max-width: none;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-start;
        gap: 0;
        float: none;
        margin: 0;
        padding: 0 0 2px;
        overflow: visible;
        background: transparent;
    }

    .content-header > .breadcrumb > li {
        flex: 0 1 auto;
        max-width: 100%;
    }

    .content-header > .breadcrumb > li > a,
    .content-header > .breadcrumb > li.active {
        display: inline-flex;
        min-height: 0;
        align-items: center;
        padding: 0;
        border: 0;
        background: transparent;
        color: var(--med-muted);
        font-size: 12px;
        line-height: 1.35;
    }

    .content-header > .breadcrumb > li.active {
        max-width: 64vw;
        color: var(--med-ink);
    }

    .content-header > .breadcrumb > li + li:before {
        padding: 0 7px;
        color: #9aabc0;
    }

    .id-hash {
        max-width: 160px;
    }

    .user-form-section {
        padding: 18px 0 20px;
    }

    .user-form-grid,
    .user-form-grid--2,
    .user-form-grid--3,
    .user-form-grid--4,
    .settings-task-summary,
    .settings-task-archive,
    .task-ai-card__editor,
    .task-ai-card__preview-grid,
    .task-filter-panel__grid,
    .task-form-grid,
    .task-form-grid--main,
    .task-form-row--top,
    .task-form-row--assignment,
    .task-facts {
        grid-template-columns: 1fr;
    }

    .task-fact--execution {
        grid-column: auto;
    }

    .task-ai-card {
        padding: 14px;
    }

    .task-ai-card__head {
        align-items: flex-start;
    }

    .task-ai-card__actions,
    .task-ai-card__editor-actions,
    .task-ai-card__preview-actions,
    .task-ai-card__empty {
        align-items: stretch;
        flex-direction: column;
    }

    .task-ai-card__actions .btn,
    .task-ai-card__editor-actions .btn,
    .task-ai-card__preview-actions .btn,
    .task-ai-card__empty .btn {
        width: 100%;
    }

    .task-facts .task-execution-fact__row {
        grid-template-columns: 1fr;
        gap: 2px;
    }

    .production-calendar__top,
    .production-calendar-user-header,
    .user-work-calendar-panel {
        align-items: stretch;
        flex-direction: column;
    }

    .production-calendar-stats,
    .production-calendar-grid,
    .production-year,
    .production-form-pair,
    .production-lunch-break,
    .production-employee-filters,
    .production-event-editor__grid,
    .production-inline-form,
    .production-request-filters {
        grid-template-columns: 1fr;
    }

    .production-lunch-breaks__head {
        align-items: stretch;
        flex-direction: column;
    }

    .production-lunch-break > .btn {
        width: 100%;
    }

    .production-employee-filters__actions,
    .production-employee-filters__count {
        justify-content: flex-start;
    }

    .medem-date-range-picker__summary {
        grid-template-columns: 1fr;
    }

    .medem-date-range-picker__top {
        grid-template-columns: 32px 32px minmax(0, 1fr) 32px 32px;
    }

    .medem-datetime-picker__time {
        grid-template-columns: 1fr;
    }

    .medem-datetime-picker--popover {
        width: min(320px, calc(100vw - 24px));
    }

    .production-user-month {
        overflow: visible;
    }

    .production-user-month__weekdays {
        display: none;
    }

    .production-user-month__week {
        display: block;
        min-width: 0;
    }

    .production-user-day {
        min-height: 0;
        grid-template-columns: 44px minmax(0, 1fr);
        align-items: center;
        align-content: center;
        margin-bottom: 6px;
        padding: 10px 12px;
    }

    .production-user-day--blank {
        display: none;
    }

    .production-user-day strong {
        grid-row: 1 / span 2;
        font-size: 15px;
    }

    .production-user-day small,
    .production-user-day .production-event {
        grid-column: 2;
    }

    .task-form-layout--composer {
        gap: 18px;
    }

    .task-form-composer,
    .task-form-composer__main,
    .task-form-row,
    .task-form-bottom {
        gap: 16px;
    }

    .task-extra-participants {
        grid-column: auto;
    }

    .task-employee-picker__dropdown {
        min-width: 0;
        max-width: calc(100vw - 28px);
    }

    .task-employee-picker__list {
        max-height: 360px;
    }

    .task-deadline-panel {
        max-width: none;
        padding: 10px;
    }

    .task-priority-picker {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-analytics,
    .dashboard-analytics--no-gamification {
        grid-template-columns: 1fr;
    }

    .dashboard-card,
    .dashboard-analytics--no-gamification .dashboard-card--tasks,
    .dashboard-analytics--no-gamification .dashboard-card--vacation {
        grid-column: auto;
    }

    .dashboard-task-graph {
        grid-template-columns: 112px minmax(0, 1fr);
        gap: 12px;
    }

    .dashboard-progress-ring {
        width: 108px;
        height: 108px;
    }

    .dashboard-progress-ring strong {
        font-size: 23px;
    }

    .dashboard-stat-grid {
        grid-template-columns: 1fr;
    }

    .gamification-settings__grid,
    .gamification-rules {
        grid-template-columns: 1fr;
    }

    .medem-gamification-stars {
        padding: 0 9px !important;
    }

    .medem-voice-briefing-button {
        width: 32px;
        padding: 0 !important;
    }

    .medem-voice-briefing-button span {
        display: none;
    }

    .medem-voice-briefing-popover {
        right: -44px;
        width: 300px;
    }

    .medem-voice-briefing-popover::before {
        right: 54px;
    }

    .task-calendar-picker__day,
    .task-calendar-picker__blank {
        height: 36px;
    }

    .task-time-picker {
        grid-template-columns: 1fr;
    }

    .task-time-picker .btn {
        justify-self: start;
    }

    .task-kanban {
        grid-template-columns: none;
        grid-auto-flow: column;
        grid-auto-columns: minmax(300px, 88vw);
    }

    .task-calendar-unscheduled__header {
        align-items: flex-start;
        flex-direction: column;
    }

    .task-calendar-unscheduled__list {
        grid-template-columns: 1fr;
    }

    .task-calendar-schedule__controls {
        grid-template-columns: 1fr;
    }

    .task-kanban-card {
        cursor: default;
    }

    .task-kanban-card__mobile-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .task-kanban-modal {
        align-items: end;
        padding: 10px;
    }

    .task-kanban-modal__dialog {
        width: 100%;
    }

    .task-form-bottom {
        padding-top: 18px;
    }

    .task-rich-editor__area {
        min-height: 190px;
    }

    .task-upload-control--form {
        min-height: 118px;
    }

    .user-form-field:empty {
        display: none;
    }

    .user-photo-form {
        align-items: flex-start;
    }

    .user-photo-upload {
        align-items: stretch;
    }

    .user-photo-upload__button {
        justify-content: center;
    }

    .user-form-roles div[id$="_roles"] {
        grid-template-columns: 1fr;
    }
}
